From: Wu Zhou <woodzltc@cn.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Manoj Iyer <manjo@austin.ibm.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] gdb.server testcases (resend)
Date: Mon, 23 May 2005 11:21:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.63.0505230530360.22761@plinuxt18.cn.ibm.com> (raw)
In-Reply-To: <20050522171520.GA1223@nevyn.them.org>
> Yes, this will not work. The correct way to handle this is to wait
> until I have implemented the available target features proposal I've
> posted on gdb@, and then I can make gdbserver inform GDB that 64-bit
> registers are available so that it will expect them.
So you are going to add a command for gdbserver to notify remote gdb
the availability of 64-bit registers? That is good. But I am also
thinking of other ways. The first solution I thought of is to let
gdbserver choose which set of registers to use according to the
arch (32-bit or 64-bit) of the debuggee. The other solution I could
thought of is to let host-side gdb accept 64-bit register as well.
I even tried some coding with the second method. It seems that it
worked sorta, at least I can set breakpoint, continue the process
and so on. But I did met problems with "next" and "step" commands,
which didn't go on with executing the process at all.
Because I am not that familar with the code of gdb/gdbserver, so I
am not very sure where to find the root cause of these problems. I
am also not sure whether these two methods are workable? Would you
please help evaluate this? If it is really workable, what is the
pros and cons of these methods compared to your proposal? Thanks
a lot!
> This will require some surgery in GDB, I'm sure. The way MIPS
> implements this is not very reliable.
>
> > Program received signal SIGFPE, Arithmetic exception.
> > 0x000000800013fd64 in .vfprintf () from /lib64/tls/libc.so.6
> > (gdb)
> >
>
> I have no idea what causes this one, sorry.
That SIGFPE error disappeared after applying your patch to latest
GDB cvs tree. But I met with another strange problem when debugging
gdb.base/break, which defines the following function:
int factorial (value)
int value;
#endif
{
if (value > 1) { /* set breakpoint 7 here */
value *= factorial (value - 1);
}
return (value); /* set breakpoint 19 here */
}
normally factorial(6) will recursively call itself 5 times and return
720. However while using 64-bit gdbserver on 64-bit binary, it doesn't
call factorial(5) at all, return directly 6 as the result.
I am suspecting that "value > 1" doesn't get executed, so I change the
conditional statement to "if (value - 1)", it worked! So it turn out
that "value > 1" always return 0 in this running context. That is really
odd. Any clues you could thought of? Thanks in advance.
Cheers
- Wu Zhou
next prev parent reply other threads:[~2005-05-23 6:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 14:46 Wu Zhou
2005-05-19 17:52 ` Manoj Iyer
2005-05-28 22:51 ` [commit] gdbserver for powerpc64-linux Daniel Jacobowitz
2005-05-22 20:40 ` [RFC] gdb.server testcases (resend) Daniel Jacobowitz
2005-05-22 21:01 ` Daniel Jacobowitz
2005-05-23 11:21 ` Wu Zhou [this message]
2005-05-23 18:26 ` Daniel Jacobowitz
2005-05-24 4:17 ` Wu Zhou
2005-05-24 8:29 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2005-05-17 2:38 Manoj Iyer
2005-05-17 19:02 ` Manoj Iyer
2005-05-18 1:45 ` Daniel Jacobowitz
2005-05-18 9:52 ` Manoj Iyer
2005-05-18 16:01 ` Daniel Jacobowitz
2005-05-18 16:29 ` Manoj Iyer
2005-05-18 18:08 ` Daniel Jacobowitz
2005-05-18 22:08 ` Manoj Iyer
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=Pine.LNX.4.63.0505230530360.22761@plinuxt18.cn.ibm.com \
--to=woodzltc@cn.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=manjo@austin.ibm.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