What is the way to get a line number and a file name given an address with gdb --interpreter mi
? Standard cli way is: info line *0x00000000
, note the asterisk *
.
I tried -info-symbol-line 0x00401FA0
, which is found in some docs but not others, got:
^error,msg="Undefined MI command: info-symbol-line",code="undefined-command"
I don't think there is currently a way.
What happened is that, in the distant past, someone came up with a plan for this command. It was called -symbol-info-line
. They documented it in the manual, but then never implemented it. This documentation lived on for many years until it was finally commented out, on account of not reflecting reality.
One option might be to use the ordinary CLI info line
and parse the output.
Implementing -symbol-info-line
would also be fine, though of course that is more difficult.
User contributions licensed under CC BY-SA 3.0