This is the mail archive of the
mailing list for the GDB project.
Re: gdb 6.x 'next' does not work on mips-linux/mipsel-linux
- From: Andrew Cagney <cagney at gnu dot org>
- To: Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 04 Jan 2005 15:29:59 -0500
- Subject: Re: gdb 6.x 'next' does not work on mips-linux/mipsel-linux
- References: <email@example.com>
Atsushi Nemoto wrote:
Hi. I noticed gdb 6.3 'next' command does not work (even for the
"hello world" program) on mips-linux/mipsel-linux. It works well for
statically linked programs.
I found PR#1716 (for gdb 6.1.1). Is this solved on gdb 6.3?
Can you test/debug a mainline GDB? The MIPS code has been completely
Also I found discussions in this ML (Subject: "Unable to step over (n
and ni) on mipsel-linux...") but can not see final solution.
Here is my inspection:
When 'next' failed, following call (infrun.c:1772) stores 0 in
find_pc_partial_function (stop_pc, &ecs->stop_func_name,
More exactly, following call (blockframe.c:211) returned NULL.
msymbol = lookup_minimal_symbol_by_pc_section (mapped_pc, section);
'mapped_pc' was an address of a STUB section to the libc function
(printf) and 'section' was ".MIPS.stubs".
When I tried gdb 5.3, the 'section' variable was NULL in that point.
So I suppose something wrong with ".MIPS.stubs" section handling.
With this quick and dirty hack, 'next' command works well.
--- gdb-6.3.org/gdb/blockframe.c 2004-09-01 23:13:31.000000000 +0900
+++ gdb-6.3/gdb/blockframe.c 2004-12-24 17:50:27.747543472 +0900
@@ -199,6 +199,10 @@
section = NULL;
section = obj_section->the_bfd_section;
+#if 1 /* dirty hack... */
+ if (section && strcmp(section->name, ".MIPS.stubs") == 0)
+ section = NULL;
mapped_pc = overlay_mapped_address (pc, section);
I do not think this hack is correct at all, but hope it helps fixing
the real problem.
P.S. I'm not on this ML. Please CC to me.