[Bug mi/21451] New: gdb mi's -data-disassemble command only outputs lines starting from the closest function

grassfedcode at gmail dot com sourceware-bugzilla@sourceware.org
Mon May 1 19:39:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21451

            Bug ID: 21451
           Summary: gdb mi's -data-disassemble command only outputs lines
                    starting from the closest function
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: grassfedcode at gmail dot com
  Target Milestone: ---

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"}]}]
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list