Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: Kevin Buettner <kevinb@redhat.com>,
	"Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Subject: Re: mipsbe solib event breakpoint endian?
Date: Thu, 10 Jul 2003 15:09:00 -0000	[thread overview]
Message-ID: <20030710150944.GA31232@nevyn.them.org> (raw)
In-Reply-To: <0c4d01c346f4$c69d0690$0202040a@catdog>

On Thu, Jul 10, 2003 at 11:06:01AM -0400, Kris Warkentin wrote:
> Finally got around to chasing this again and I've found the problem.  I'm
> hoping someone might be able to explain why I'm seeing what I'm seeing.
> 
> GDB-5.2.1 targetting QNX MipsBE:
> Breakpoint 4, enable_break () at ../../gdb/solib-svr4.c:939
> 939           if (!load_addr_found)
> (top) n
> 940             load_addr = read_pc () - tmp_bfd->start_address;
> (top) p read_pc()
> $1 = 1882417036
> (top) p /x read_pc()
> $2 = 0x7033678c
> (top)
> 
> 
> GDB-HEAD targetting QNX MipsBE:
> Breakpoint 3, enable_break () at ../../gdb/solib-svr4.c:1039
> 1039            load_addr = read_pc () - tmp_bfd->start_address;
> (top) p read_pc()
> $1 = 8084919611063009279
> (top) p /x read_pc()
> $2 = 0x7033678ceeffffff
> (top)
> 
> Looks like someone thinks the program counter is a 64 bit value....  Any
> hints?

The CORE_ADDR type _is_ a 64-bit value, and MIPS addresses do sign
extend; this has caused all sorts of interesting problems, if you check
the list archives.  Something has read it in endian-swapped, however. 
I'd investigate what; maybe REGISTER_BYTE fallout?

I haven't seen this happen on my MIPS targets either.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-07-10 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03 14:59 Kris Warkentin
     [not found] ` <1030708201312.ZM4704@localhost.localdomain>
2003-07-10 15:05   ` Kris Warkentin
2003-07-10 15:09     ` Daniel Jacobowitz [this message]
2003-07-10 15:15     ` Kevin Buettner
2003-07-10 15:33       ` Kris Warkentin
2003-07-10 17:05         ` Andrew Cagney
2003-07-10 17:16           ` Kris Warkentin
2003-07-10 18:42             ` Andrew Cagney
2003-07-10 19:14               ` Kris Warkentin

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=20030710150944.GA31232@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@redhat.com \
    --cc=kewarken@qnx.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