This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: "Tedeschi\, Walfred" <walfred dot tedeschi at intel dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 23 Sep 2013 16:04:06 +0200
- Subject: Re: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
- Authentication-results: sourceware.org; auth=none
- References: <87ioxradrb dot fsf at oracle dot com> <AC542571535E904D8E8ADAE745D60B191B197923 at IRSMSX104 dot ger dot corp dot intel dot com>
Hi.
Have you observed some failure to submit this patch? If so could you
also provide a test case?
I noticed that watchpoints were not surviving ld.so. Consider this test
program:
int jorl;
int main ()
{
jorl = 20;
return 0;
}
If you set a watchpoint to watch writes to the variable 'jorl' and then
[jemarch@jemarch1 ~]$ gdb foo
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.0.2.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "sparc64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jemarch/foo...(no debugging symbols
found)...done.
(gdb) watch jorl
Watchpoint 1: jorl
(gdb) run
Starting program: /home/jemarch/foo
0xfffff8010001c444 in mmap64 () from /lib64/ld-linux.so.2
Could not insert single-step breakpoint at 0x1
(gdb)
As described in the patch the problem is that single-stepping over 'ta
0x6d' instructions is not working properly. And the reason is that
sparc64_linux_step_trap is only intended to be useful when
single-stepping sigreturn syscalls and must return zero in any other
case.
Do you want a test for gdb/testsuite? In that case, what would be the
best place where to add the test? gdb.base?