Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for -break-insert main returning multiple bind points #729

Merged
merged 2 commits into from
Jun 12, 2018

Conversation

pieandcakes
Copy link
Collaborator

This fix is to support -break-insert main returning multiple bind
points, which was causing a dictionary error on multiple keys.

Fix for: microsoft/vscode-cpptools#2056

@paulmaybee Can you verify that this change won't break your use cases?

Copy link
Contributor

@paulmaybee paulmaybee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Not sure why we ever parsed the results string explicitly here.

@pieandcakes
Copy link
Collaborator Author

@paulmaybee I tried converting them but sometimes the results come back as a string and not as a Result, so I thought best to leave it the way it is at this point.

{
this._entryPointBreakpoint = dict["number"];
bkpt = (b as ValueListValue).Content[0] as TupleValue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here describing when this will get used?


if (bkpt != null)
{
this._entryPointBreakpoint = bkpt.FindString("number");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does GDB do the .1 thing with number in the multiple bind case? If so, do we need to do anything else to pre-process the number before we send it to breakpoint delete?

Copy link
Member

@gregg-miskelly gregg-miskelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

@pieandcakes
Copy link
Collaborator Author

@gregg-miskelly From other instances where we use this method, the Content[0] index will return the parent breakpoint of "1" where the children of it will be "1.1" "1.2" etc. so if we delete 1, it looks like it deletes its children too.

This fix is to support -break-insert main returning multiple bind
points, which was causing a dictionary error on multiple keys.
@pieandcakes pieandcakes merged commit a1141ae into master Jun 12, 2018
@pieandcakes pieandcakes deleted the users/piel/breakMainFix branch May 7, 2019 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants