倉庫指標
- 星標
- (5,820 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
Is your feature request related to a problem? Please describe.
The source code window needs to be quite small when debugging so all the other information can fit on the screen. But sometimes I would like to look at the source code surrounding the PC but doing this with gdb's list command is finicky.
An improvement to this would be nice especially when the source code is fetched with debuginfod and we're first being exposed to it while debugging.
Describe the solution you'd like
A new command to list the source code. It should also show the current line like so:
nearpc and u already exist and fulfil a similar purpose but they only show the disassembly. Currently one can get that behaviour with list *$rip but there isn't a way (that I know of) to specify the number of lines so one has to set listsize <number of lines> each time to get the same behaviour that u has as a convenient argument.
An especially useful feature would be a flag to the command which prints the whole source code of the current function, as there isn't an easy way (that I know of at least) to replicate this within gdb.