]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 May 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 May 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 May 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 May 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 May 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 May 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoBump GDB version number to 7.7.1.DATE-cvs.
Joel Brobecker [Mon, 5 May 2014 22:11:24 +0000 (15:11 -0700)] 
Bump GDB version number to 7.7.1.DATE-cvs.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.7.1.DATE-cvs.

11 years agoDocument the GDB 7.7.1 release in gdb/ChangeLog
Joel Brobecker [Mon, 5 May 2014 22:02:50 +0000 (15:02 -0700)] 
Document the GDB 7.7.1 release in gdb/ChangeLog

gdb/ChangeLog:

GDB 7.7.1 released.

11 years agoSet GDB version number to 7.7.1. gdb-7.7.1-release
Joel Brobecker [Mon, 5 May 2014 21:51:25 +0000 (14:51 -0700)] 
Set GDB version number to 7.7.1.

gdb/ChangeLog:

* version.in: Set GDB version number to 7.7.1.

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 May 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 May 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 May 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 May 2014 00:00:12 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 May 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Apr 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoFollowing up on Tom's suggestion I am checking in a patch to replace the various
Nick Clifton [Wed, 29 Jan 2014 13:46:39 +0000 (13:46 +0000)] 
Following up on Tom's suggestion I am checking in a patch to replace the various
bfd_xxx_set macros with static inline functions, so that we can avoid compile time
warnings about comma expressions with unused values.

PR build/16873
* bfd-in.h (bfd_set_section_vma): Delete.
(bfd_set_section_alignment): Delete.
(bfd_set_section_userdata): Delete.
(bfd_set_cacheable): Delete.
* bfd.c (bfd_set_cacheable): New static inline function.
* section.c (bfd_set_section_userdata): Likewise.
(bfd_set_section_vma): Likewise.
(bfd_set_section_alignment): Likewise.
* bfd-in2.h: Regenerate.

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Apr 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoPR gdb/14018 -- avoid "PC register not available" errors.
Eli Zaretskii [Sat, 19 Apr 2014 08:12:19 +0000 (11:12 +0300)] 
PR gdb/14018 -- avoid "PC register not available" errors.

gdb/windows-nat.c (thread_rec): Don't display a warning when
SuspendThread fails with ERROR_ACCESS_DENIED.  If SuspendThread
fails for any reason, set th->suspended to -1, so that we don't
try to resume such a thread.  Also, don't return NULL in these
cases, to avoid completely ruin the session due to "PC register is
not available" error.
(do_windows_fetch_inferior_registers): Check errors in
GetThreadContext call.
(windows_continue): Accept an additional argument KILLED; if not
zero, ignore errors in the SetThreadContext call, since the
inferior was killed and is shutting down.
(windows_resume, get_windows_debug_event)
(windows_create_inferior, windows_mourn_inferior)
(windows_kill_inferior): All callers of windows_continue changed
to adjust to its new calling sequence.

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoErroneous backtrace on AVR.
Pierre Langlois [Fri, 21 Mar 2014 19:46:07 +0000 (19:46 +0000)] 
Erroneous backtrace on AVR.

PR backtrace/16721
PR backtrace/16832
* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
(avr_gdbarch_init): Add xmega architectures given by bfd_architecture
when setting the size of call_length.
(avr_scan_prologue): Accept push r1 instruction for small stack
allocation.
* MAINTAINERS (Write After Approval): Add "Pierre Langlois".

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Apr 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Apr 2014 00:00:12 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Apr 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Apr 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Apr 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 31 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Mar 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Mar 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Mar 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Mar 2014 00:00:11 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAIX 32-bit core loading, high section addresses.
Pedro Alves [Wed, 12 Mar 2014 10:28:59 +0000 (10:28 +0000)] 
AIX 32-bit core loading, high section addresses.

I noticed GDB was failing to enable threading support for 32-bit AIX
cores.  I traced it to failure to read variables from libpthreads.a.
The issue is that data for that library is loaded at a high address,
and bfd is sign extending the section addresses:

 (gdb) info files
 Symbols from "/home/palves/crash".
 Local core dump file:
 `/home/palves/core', file type aixcoff-rs6000.
 0x2ff22000 - 0x2ff23000 is .stack
 0x20000000 - 0x200316e0 is .data
 0x20000e90 - 0x200016c0 is .data
 0xfffffffff0254000 - 0xfffffffff0297920 is .data
 0xfffffffff07b46a8 - 0xfffffffff07b47c8 is .data
 0xfffffffff0298000 - 0xfffffffff029bfcc is .data
 0xfffffffff06dafe0 - 0xfffffffff07b3838 is .data
 Local exec file:
 `/home/palves/crash', file type aixcoff-rs6000.
 Entry point: 0x20001394
 0x10000150 - 0x10000e90 is .text
 0x20000e90 - 0x2000149c is .data
 0x2000149c - 0x200016c0 is .bss
 0xd053b124 - 0xd053e15f is .text in /usr/lib/libpthreads.a(shr_comm.o)
 0xf0254000 - 0xf0297920 is .data in /usr/lib/libpthreads.a(shr_comm.o)
 0xf0254450 - 0xf0297920 is .bss in /usr/lib/libpthreads.a(shr_comm.o)
 0xd053a280 - 0xd053aabe is .text in /usr/lib/libcrypt.a(shr.o)
 0xf07b46a8 - 0xf07b47c8 is .data in /usr/lib/libcrypt.a(shr.o)
 0xf07b47c8 - 0xf07b47c8 is .bss in /usr/lib/libcrypt.a(shr.o)
 0xd04fb180 - 0xd053917e is .text in /usr/lib/libpthreads.a(shr_xpg5.o)
 0xf0298000 - 0xf029bfcc is .data in /usr/lib/libpthreads.a(shr_xpg5.o)
 0xf029bf64 - 0xf029bfcc is .bss in /usr/lib/libpthreads.a(shr_xpg5.o)
 0xd0100900 - 0xd04fa39c is .text in /usr/lib/libc.a(shr.o)
 0xf06dafe0 - 0xf07b3838 is .data in /usr/lib/libc.a(shr.o)
 0xf0751e94 - 0xf07b3838 is .bss in /usr/lib/libc.a(shr.o)

Notice:
...
0xfffffffff0298000 - 0xfffffffff029bfcc is .data
...

Those are the bfd section start/end addresses.  It't not visible here:

         ...
 0xf0298000 - 0xf029bfcc is .data in /usr/lib/libpthreads.a(shr_xpg5.o)
         ...

... just because GDB trims that number to 32-bit when printing.

GDB then fails to find the memory for libpthreads.a variables in the
core, and falls back to reading it directly from the executable (which
yields the values as originally initialized in the code).

E.g.:

 (gdb) p &__n_pthreads
 $2 = (<data variable, no debug info> *) 0xf074fda8 <__n_pthreads>
 (gdb) p __n_pthreads
 $1 = -1

That should have returned 2 instead of -1.

bfd/
2014-03-12  Pedro Alves  <palves@redhat.com>

PR gdb/16696
* rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
through ptr_to_uint instead of through long.

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 10 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 9 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 8 Mar 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 7 Mar 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 6 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoPR gdb/16575: stale breakpoint instructions in the code cache
Pedro Alves [Wed, 5 Mar 2014 14:18:28 +0000 (14:18 +0000)] 
PR gdb/16575: stale breakpoint instructions in the code cache

In non-stop mode, or rather, breakpoints always-inserted mode, the
code cache can easily end up with stale breakpoint instructions:

All it takes is filling a cache line when breakpoints already exist in
that memory region, and then delete the breakpoint.

Vis. (from the new test):

 (gdb) set breakpoint always-inserted on
 (gdb) b 23
 Breakpoint 2 at 0x400540: file ../../../src/gdb/testsuite/gdb.base/breakpoint-shadow.c, line 23.
 (gdb) b 24
 Breakpoint 3 at 0x400547: file ../../../src/gdb/testsuite/gdb.base/breakpoint-shadow.c, line 24.
 disass main
 Dump of assembler code for function main:
    0x000000000040053c <+0>:     push   %rbp
    0x000000000040053d <+1>:     mov    %rsp,%rbp
 => 0x0000000000400540 <+4>:     movl   $0x1,-0x4(%rbp)
    0x0000000000400547 <+11>:    movl   $0x2,-0x4(%rbp)
    0x000000000040054e <+18>:    mov    $0x0,%eax
    0x0000000000400553 <+23>:    pop    %rbp
    0x0000000000400554 <+24>:    retq
 End of assembler dump.

So far so good.  Now flush the code cache:

 (gdb) set code-cache off
 (gdb) set code-cache on

Requesting a disassembly works as expected, breakpoint shadowing is
applied:

 (gdb) disass main
 Dump of assembler code for function main:
    0x000000000040053c <+0>:     push   %rbp
    0x000000000040053d <+1>:     mov    %rsp,%rbp
 => 0x0000000000400540 <+4>:     movl   $0x1,-0x4(%rbp)
    0x0000000000400547 <+11>:    movl   $0x2,-0x4(%rbp)
    0x000000000040054e <+18>:    mov    $0x0,%eax
    0x0000000000400553 <+23>:    pop    %rbp
    0x0000000000400554 <+24>:    retq
 End of assembler dump.

However, now delete the breakpoints:

 (gdb) delete
 Delete all breakpoints? (y or n) y

And disassembly shows the old breakpoint instructions:

 (gdb) disass main
 Dump of assembler code for function main:
    0x000000000040053c <+0>:     push   %rbp
    0x000000000040053d <+1>:     mov    %rsp,%rbp
 => 0x0000000000400540 <+4>:     int3
    0x0000000000400541 <+5>:     rex.RB cld
    0x0000000000400543 <+7>:     add    %eax,(%rax)
    0x0000000000400545 <+9>:     add    %al,(%rax)
    0x0000000000400547 <+11>:    int3
    0x0000000000400548 <+12>:    rex.RB cld
    0x000000000040054a <+14>:    add    (%rax),%al
    0x000000000040054c <+16>:    add    %al,(%rax)
    0x000000000040054e <+18>:    mov    $0x0,%eax
    0x0000000000400553 <+23>:    pop    %rbp
    0x0000000000400554 <+24>:    retq
 End of assembler dump.

Those breakpoint instructions are no longer installed in target memory
they're stale in the code cache.  Easily confirmed by just disabling
the code cache:

 (gdb) set code-cache off
 (gdb) disass main
 Dump of assembler code for function main:
    0x000000000040053c <+0>:     push   %rbp
    0x000000000040053d <+1>:     mov    %rsp,%rbp
 => 0x0000000000400540 <+4>:     movl   $0x1,-0x4(%rbp)
    0x0000000000400547 <+11>:    movl   $0x2,-0x4(%rbp)
    0x000000000040054e <+18>:    mov    $0x0,%eax
    0x0000000000400553 <+23>:    pop    %rbp
    0x0000000000400554 <+24>:    retq
 End of assembler dump.

I stumbled upon this when writing a patch to infrun.c, that made
handle_inferior_event & co fill in the cache before breakpoints were
removed from the target.  Recall that wait_for_inferior flushes the
dcache for every event.  So in that case, always-inserted mode was not
necessary to trigger this.  It's just a convenient way to expose the
issue.

The dcache works at the raw memory level.  We need to update it
whenever memory is written, no matter what kind of target memory
object was originally passed down by the caller.  The issue is that
the dcache update code isn't reached when a caller explicitly writes
raw memory.  Breakpoint insertion/removal is one such case --
mem-break.c uses target_write_read_memory/target_write_raw_memory.

The fix is to move the dcache update code from memory_xfer_partial_1
to raw_memory_xfer_partial so that it's always reachable.

When we do that, we can actually simplify a series of things.
memory_xfer_partial_1 no longer needs to handle writes for any kind of
memory object, and therefore dcache_xfer_memory no longer needs to
handle writes either.  So the latter (dcache_xfer_memory) and its
callees can be simplified to only care about reads.  While we're
touching dcache_xfer_memory's prototype, might as well rename it to
reflect that fact that it only handles reads.

Currently dcache_xfer_memory handles the case of a write failing.  The
whole cache line is invalidated when that happens.  However,
dcache_update, the sole mechanism for handling writes that will remain
after the patch, does not presently handle that scenario.  That's a
bug.  The patch makes it handle that, by passing down the
to_xfer_partial result from the caller, so that it can better decide
what to do itself.  While I was changing the function's prototype, I
constified the myaddr parameter, getting rid of the need for the cast
as seen in its existing caller.

Tested on x86_64 Fedora 17, native and gdbserver.

gdb/
2014-03-05  Pedro Alves  <palves@redhat.com>

PR gdb/16575
* dcache.c (dcache_poke_byte): Constify ptr parameter.  Return
void.  Update comment.
(dcache_xfer_memory): Delete.
(dcache_read_memory_partial): New, based on the read bits of
dcache_xfer_memory.
(dcache_update): Add status parameter.  Use ULONGEST for len, and
adjust.  Discard cache lines if the reason for the update was
error.
* dcache.h (dcache_xfer_memory): Delete declaration.
(dcache_read_memory_partial): New declaration.
(dcache_update): Update prototype.
* target.c (raw_memory_xfer_partial): Update the dcache here.
(memory_xfer_partial_1): Don't handle dcache writes here.

gdb/testsuite/
2014-03-05  Pedro Alves  <palves@redhat.com>

PR gdb/16575
* gdb.base/breakpoint-shadow.exp (compare_disassembly): New
procedure.
(top level): Adjust to use it.  Add tests that exercise breakpoint
interaction with the code-cache.

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 5 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 4 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 3 Mar 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 2 Mar 2014 00:00:06 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 1 Mar 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Feb 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoMake sure we don't resume the stepped thread by accident.
Pedro Alves [Wed, 26 Feb 2014 16:52:24 +0000 (16:52 +0000)] 
Make sure we don't resume the stepped thread by accident.

Say:

<stopped at a breakpoint in thread 2>
(gdb) thread 3
(gdb) step

The above triggers the prepare_to_proceed/deferred_step_ptid process,
which switches back to thread 2, to step over its breakpoint before
getting back to thread 3 and "step" it.

If while stepping over the breakpoint in thread 2, a signal arrives,
and it is set to pass/nostop, we'll set a step-resume breakpoint at
the supposed signal-handler resume address, and call keep_going.  The
problem is that we were supposedly stepping thread 3, and that
keep_going delivers a signal to thread 2, and due to scheduler-locking
off, resumes everything else, _including_ thread 3, the thread we want
stepping.  This means that we lose control of thread 3 until the next
event, when we stop everything.  The end result for the user, is that
GDB lost control of the "step".

Here's the current infrun debug output of the above, with the testcase
in the patch below:

infrun: clear_proceed_status_thread (Thread 0x2aaaab8f5700 (LWP 11663))
infrun: clear_proceed_status_thread (Thread 0x2aaaab6f4700 (LWP 11662))
infrun: clear_proceed_status_thread (Thread 0x2aaaab4f2b20 (LWP 11659))
infrun: proceed (addr=0xffffffffffffffff, signal=144, step=1)
infrun: prepare_to_proceed (step=1), switched to [Thread 0x2aaaab6f4700 (LWP 11662)]
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGUSR1
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40098f
infrun: random signal 30

Program received signal SIGUSR1, User defined signal 1.
infrun: signal arrived while stepping over breakpoint
infrun: inserting step-resume breakpoint at 0x40098f
infrun: resume (step=0, signal=30), trap_expected=0, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f

^^^ this is a wildcard resume.

infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40098f
infrun: BPSTAT_WHAT_STEP_RESUME
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 0x2aaaab6f4700 (LWP 11662)] at 0x40098f

^^^ step-resume hit, meaning the handler returned, so we go back to stepping thread 3.

infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab6f4700 (LWP 11662)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED

infrun: stop_pc = 0x40088b
infrun: switching back to stepped thread
infrun: Switching context from Thread 0x2aaaab6f4700 (LWP 11662) to Thread 0x2aaaab8f5700 (LWP 11663)
infrun: resume (step=1, signal=0), trap_expected=0, current thread [Thread 0x2aaaab8f5700 (LWP 11663)] at 0x400938
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab8f5700 (LWP 11663)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40093a
infrun: keep going
infrun: resume (step=1, signal=0), trap_expected=0, current thread [Thread 0x2aaaab8f5700 (LWP 11663)] at 0x40093a
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   11659 [Thread 0x2aaaab8f5700 (LWP 11663)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x40091e
infrun: stepped to a different line
infrun: stop_stepping
[Switching to Thread 0x2aaaab8f5700 (LWP 11663)]
69            (*myp) ++; /* set breakpoint child_two here */

^^^ we stopped at the wrong line.  We still stepped a bit because the
test is running in a loop, and when we got back to stepping thread 3,
it happened to be in the stepping range.  (The loop increments a
counter, and the test makes sure it increments exactly once.  Without
the fix, the counter increments a bunch, since the user-stepped thread
runs free without GDB noticing.)

The fix is to switch to the stepping thread before continuing for the
step-resume breakpoint.

gdb/
2014-02-26  Pedro Alves  <palves@redhat.com>

PR breakpoints/16292
* infrun.c (handle_signal_stop) <signal arrives while stepping
over a breakpoint>: Switch back to the stepping thread.

gdb/testsuite/
2014-02-26  Pedro Alves  <pedro@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR breakpoints/16292
* gdb.threads/signal-while-stepping-over-bp-other-thread.c: New
file.
* gdb.threads/signal-while-stepping-over-bp-other-threadexp: New
file.

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoPR gdb/16626
Jan Kratochvil [Tue, 25 Feb 2014 19:47:09 +0000 (20:47 +0100)] 
PR gdb/16626

gdb/testsuite/
2014-02-25  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR gdb/16626
* gdb.base/auto-load.exp: Fix out-of-srctree run.

Message-ID: <87k3cjt3jl.fsf@fleche.redhat.com>

11 years agoPR gdb/16626
Jan Kratochvil [Tue, 25 Feb 2014 17:32:32 +0000 (18:32 +0100)] 
PR gdb/16626

Fix auto-load 7.7 regression,
the regression affects any loading from /usr/share/gdb/auto-load .

5b2bf9471f1499bee578fcd60c05afe85794e280 is the first bad commit
commit 5b2bf9471f1499bee578fcd60c05afe85794e280
Author: Doug Evans <xdje42@gmail.com>
Date:   Fri Nov 29 21:29:26 2013 -0800
    Move .debug_gdb_script processing to auto-load.c.
    Simplify handling of auto-loaded objfile scripts.

Fedora 20 x86_64
$ gdb -q /usr/lib64/libgobject-2.0.so
Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from
/usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done.
done.
(gdb) _

Fedora Rawhide x86_64
$ gdb -q /usr/lib64/libgobject-2.0.so
Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from
/usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done.
done.
warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path'
set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
line to your configuration file "/home/jkratoch/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/jkratoch/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
(gdb) _

That is it tries to load "forbidden"
/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
but it should load instead
/usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py*
Although that is also not exactly this way, there does not exist any
/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
despite regressed GDB says so.

gdb/
2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR gdb/16626
* auto-load.c (auto_load_objfile_script_1): Change filename to
debugfile.

gdb/testsuite/
2014-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR gdb/16626
* gdb.base/auto-load-script: New file.
* gdb.base/auto-load.c: New file.
* gdb.base/auto-load.exp: New file.

Message-ID: <20140223212400.GA8831@host2.jankratochvil.net>

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Feb 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Feb 2014 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Feb 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Feb 2014 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Feb 2014 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

11 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Feb 2014 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in