Bug 21451 - gdb mi's -data-disassemble command only outputs lines starting from the closest function
Summary: gdb mi's -data-disassemble command only outputs lines starting from the close...
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: mi (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-01 19:39 UTC by grassfedcode
Modified: 2017-05-01 19:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grassfedcode 2017-05-01 19:39:15 UTC
When running gdb v7.6 up to current HEAD (ee7e95efb9) with the mi2 interpreter, and trying to view disassembly in mode 4 (mixed source and disassembly), the line number argument is being ignored. 

for example
```
-file-exec-and-symbols /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/a.out
-data-disassemble -f /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c -l 16 -n 1 4\n
^done,asm_insns=[src_and_asm_line={line="16",file="hello.c",fullname="/home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c",line_asm_insn=[{address="0x000000000040057d",func-name="main",offset="0",inst="push   %rbp"}]}]
```

but when I try to look at the next line (17), it outputs the same line (16):
```
-data-disassemble -f /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c -l 17 -n 1 4
^done,asm_insns=[src_and_asm_line={line="16",file="hello.c",fullname="/home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c",line_asm_insn=[{address="0x000000000040057d",func-name="main",offset="0",inst="push   %rbp"}]}]
```