I have added a new rsc script that makes the same as the ¡list' command of GDB.
For example
$ rsc list src/main.c 80
src/main.c 80
76 config_set("file.project", optarg);
77 break;
78 case 'w':
79 config_set("cfg.write", "true");
* 80 break;
81 case 's':
82 config.seek = (u64)get_offset(optarg);
83 if (config.seek < 0) config.seek =
(u64)0;
84 break;
So you can use addr2line GNU program to identify the number line in the source
file,
and debug viewing the source code at the same time.
THis is available thru the 'pR' command (print Reference). this is:
> pR @ 0x8049320
> pR @ sym_main
To go into the visual and follow eip use the new 'scr.seek' that forces the
screen
to seek all the time to a certain position:
> eval scr.seek = eip
> pR
> Visual
<press 's' to step over the code>
You can define the path to the sources in the LINEPATH environvar, I plan to
make it more
flexible to support for bin-to-source address translation backends, like java
and so :)
I think this 'rsc list' command can be useful also for developers!
Have fun! :D
_______________________________________________
radare mailing list
[email protected]
https://lists.nopcode.org/mailman/listinfo/radare