This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]