This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
mi/1101: disassembly broken for mi and Insight
- From: hunt at redhat dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 27 Feb 2003 21:03:14 -0000
- Subject: mi/1101: disassembly broken for mi and Insight
- Reply-to: hunt at redhat dot com
>Number: 1101
>Category: mi
>Synopsis: disassembly broken for mi and Insight
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Feb 27 21:08:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: hunt at redhat dot com
>Release: cvs head 02/27/03
>Organization:
>Environment:
RH Linux 8.0 native build
>Description:
Insight and MI have the same flawed mixed-mode disassembly.
In disasm.c, we have
/* Assume symtab is valid for whole PC range */
symtab = find_pc_symtab (low);
The assumption is not correct. When GDB picks the wrong one, the output in MI or Insight will be blank.
>How-To-Repeat:
Easiest way to reproduce is use gdb.base/list test case.
~/redhat/build/gdb> ./gdb -i=mi testsuite/gdb.base/list
~"GNU gdb 2003-02-27-cvs\n"
~"Copyright 2003 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n"
~"welcome to change it and/or distribute copies of it under certain conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"..."
~"\n"
~"Setting up the environment for debugging gdb.\n"
&".gdbinit:5: Error in sourced command file:\n"
&"Function \"internal_error\" not defined.\n"
(gdb)
b foo
&"b foo\n"
^done
(gdb)
r
&"r\n"
^done,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048362",func="foo",args=[{name="x",value="0"}],file="../../../src/gdb/testsuite/gdb.base/list0.h",line="9"}
(gdb)
111-data-disassemble -s $pc -e "$pc + 12" -- 0
111^done,asm_insns=[{address="0x08048362",func-name="foo",offset="6",inst="sub $0xc,%esp"},{address="0x08048365",func-name="foo",offset="9",inst="mov 0x8(%ebp),%eax"},{address="0x08048368",func-name="foo",offset="12",inst="push %eax"},{address="0x08048369",func-name="foo",offset="13",inst="incl 0x8(%ebp)"},{address="0x0804836c",func-name="foo",offset="16",inst="call 0x8048774 <bar>"}](gdb)
111-data-disassemble -s $pc -e "$pc + 12" -- 1
111^done,asm_insns=[]
(gdb)
On Insight, run insight on "list", set a bp on foo. Continue to there.
Select MIXED mode display. It will be blank.
>Fix:
None yet.
>Release-Note:
>Audit-Trail:
>Unformatted: