[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    Re: problem with exec-file when targetting remote machine
From:       "Kris Warkentin" <kewarken () qnx ! com>
Date:       2003-03-30 1:17:19
Message-ID: 000901c2f65a$1c8430b0$2a00a8c0 () dash
[Download RAW message or body]

> Assume the code was originally added because of a bug :-)  I'm guessing
> something like:
>
> (gdb) file executable
> (gdb) disassemble main
>
> will break.  It will select the wrong disassembler.  Why isn't the
> executable being recognized, and why do the defaults fail?  (NickC
> pointed me at an endian problem recently).

In case anyone is curious as to what the problem was, here it is.

I was suspicious about the $pc being incorrect even though it hit the
breakpoint at main.  I stepped into our register stuffing code and observed
that everything was fine.  As soon as I continued and checked the registers,
they were changed but only from $r15 onward (this is an sh4 target).  I set
a watchpoint and it turns out that our floating point stuffing routine was
calculating the offset incorrectly and clobbering some of the gp registers.

The reason it was only happening with exec-file is that the default sh arch
wasn't retrieving fpregs and when it got a slightly different arch based on
the bfd, it would start asking for them and they'd get clobbered.

Cheers,

Kris

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic