-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Dwarf sourceline info #3449
Dwarf sourceline info #3449
Conversation
Can you show here on GH how the output changes before and after your PR? What is the difference between |
add a test, please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLease add a test
librz/core/disasm.c
Outdated
@@ -349,7 +350,8 @@ static void ds_print_sysregs(RzDisasmState *ds); | |||
static void ds_print_fcn_name(RzDisasmState *ds); | |||
static void ds_print_as_string(RzDisasmState *ds); | |||
static bool ds_print_core_vmode(RzDisasmState *ds, int pos); | |||
static void ds_print_dwarf(RzDisasmState *ds); | |||
// static void ds_print_dwarf(RzDisasmState *ds); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
librz/core/disasm.c
Outdated
|
||
RzBinFile *binfile = core->bin->cur; | ||
if (!binfile || !binfile->o) { | ||
// rz_cons_printf("No file loaded.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
librz/core/disasm.c
Outdated
} | ||
RzBinSourceLineInfo *li = binfile->o->lines; | ||
if (!li) { | ||
// rz_cons_printf("No Source line information available"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
// return true; | ||
} | ||
if (ds->dwarfShowLines && ds->show_dwarf && SourceLineInfoExists && binFileExists) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can extract that part into a separate static function for clarity
librz/core/disasm.c
Outdated
break; | ||
} | ||
temps = &li->samples[i]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
The overall format should be |
Will work on making these changes ASAP, thanks for the feedback! |
also it should be like a comment so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test, for both disabled and enabled states.
@imbillow feel free to take over as part of your GSoC |
What do you mean by 'take over'? Should I review the PR, or close it, open a new one and continue working from there? |
Sorry that I couldnt finish it quick. Goodluck to @imbillow ! |
take over |
Follow-up work in the new PR #3511 |
Your checklist for this pull request
Detailed description
Added a handler in
ds_print_dwarf()
function inlibrz/core/disasm.c
, if the variable asm.dwarf.lines is set to true. asm.dwarf.lines is set to false by default....
Test plan
...
Closing issues
This PR is with regards to issue 653
...