Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: gdb@sources.redhat.com
Subject: Re: gdb 6.x 'next' does not work on mips-linux/mipsel-linux
Date: Tue, 04 Jan 2005 20:30:00 -0000	[thread overview]
Message-ID: <41DAFCC7.5010306@gnu.org> (raw)
In-Reply-To: <20041224.183224.32500163.nemoto@toshiba-tops.co.jp>

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 
overhauled.

Andrew

> 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
> ecs->stop_func_start.
> 
>   find_pc_partial_function (stop_pc, &ecs->stop_func_name,
> 			    &ecs->stop_func_start, &ecs->stop_func_end);
> 
> 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;
>        else
>  	section = obj_section->the_bfd_section;
> +#if 1	/* dirty hack... */
> +      if (section && strcmp(section->name, ".MIPS.stubs") == 0)
> +	section = NULL;
> +#endif
>      }
>  
>    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.
> 
> Thank you.
> 
> 
> P.S.  I'm not on this ML.  Please CC to me.
> ---
> Atsushi Nemoto
> 


  reply	other threads:[~2005-01-04 20:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-24  9:32 Atsushi Nemoto
2005-01-04 20:30 ` Andrew Cagney [this message]
2005-01-06 10:37   ` Atsushi Nemoto
2005-01-07  1:12     ` Daniel Jacobowitz
2005-04-22 22:39 John Van Horne
2005-04-25  6:22 ` Atsushi Nemoto
2005-04-25 13:05   ` Daniel Jacobowitz
2005-04-27 14:18     ` Daniel Jacobowitz
2005-04-27 16:00       ` Daniel Jacobowitz
2005-04-28 15:16         ` Atsushi Nemoto
2005-05-09  3:16         ` Atsushi Nemoto
2005-05-09  3:36           ` Daniel Jacobowitz
2005-04-27 16:36 John Van Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41DAFCC7.5010306@gnu.org \
    --to=cagney@gnu.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox