This commit is contained in:
parent
736f078442
commit
e9584446ba
@ -1,17 +0,0 @@
|
|||||||
Index: gdb/ia64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
|
|
||||||
retrieving revision 1.172
|
|
||||||
retrieving revision 1.172.2.1
|
|
||||||
diff -u -a -p -u -p -a -r1.172 -r1.172.2.1
|
|
||||||
--- gdb/ia64-tdep.c 20 Feb 2008 14:31:40 -0000 1.172
|
|
||||||
+++ gdb/ia64-tdep.c 31 Mar 2008 03:40:42 -0000 1.172.2.1
|
|
||||||
@@ -1234,7 +1234,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADD
|
|
||||||
spill_reg = rN;
|
|
||||||
last_prologue_pc = next_pc;
|
|
||||||
}
|
|
||||||
- else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM] &&
|
|
||||||
+ else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
|
|
||||||
rN < 256 && imm == 0)
|
|
||||||
{
|
|
||||||
/* mov rN, rM where rM is an input register */
|
|
85
find-separate-debug-file.diff
Normal file
85
find-separate-debug-file.diff
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
Index: gdb/symfile.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/src/src/gdb/symfile.c,v
|
||||||
|
retrieving revision 1.205
|
||||||
|
diff -u -a -p -u -p -a -r1.205 gdb/symfile.c
|
||||||
|
--- gdb/symfile.c 5 Jun 2008 19:21:55 -0000 1.205
|
||||||
|
+++ gdb/symfile.c 10 Jun 2008 09:56:34 -0000
|
||||||
|
@@ -1414,12 +1414,13 @@ find_separate_debug_file (struct objfile
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
dir = xstrdup (objfile->name);
|
||||||
|
+ canon_name = lrealpath (dir);
|
||||||
|
|
||||||
|
/* Strip off the final filename part, leaving the directory name,
|
||||||
|
followed by a slash. Objfile names should always be absolute and
|
||||||
|
tilde-expanded, so there should always be a slash in there
|
||||||
|
somewhere. */
|
||||||
|
- for (i = strlen(dir) - 1; i >= 0; i--)
|
||||||
|
+ for (i = strlen (dir) - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (IS_DIR_SEPARATOR (dir[i]))
|
||||||
|
break;
|
||||||
|
@@ -1427,8 +1428,20 @@ find_separate_debug_file (struct objfile
|
||||||
|
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
|
||||||
|
dir[i+1] = '\0';
|
||||||
|
|
||||||
|
+ if (canon_name)
|
||||||
|
+ {
|
||||||
|
+ for (i = strlen (canon_name) - 1; i >= 0; i--)
|
||||||
|
+ {
|
||||||
|
+ if (IS_DIR_SEPARATOR (canon_name[i]))
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ gdb_assert (i >= 0 && IS_DIR_SEPARATOR (canon_name[i]));
|
||||||
|
+ canon_name[i+1] = '\0';
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
debugfile = alloca (strlen (debug_file_directory) + 1
|
||||||
|
- + strlen (dir)
|
||||||
|
+ + (canon_name != NULL && strlen (canon_name) > strlen (dir)
|
||||||
|
+ ? strlen (canon_name) : strlen (dir))
|
||||||
|
+ strlen (DEBUG_SUBDIRECTORY)
|
||||||
|
+ strlen ("/")
|
||||||
|
+ strlen (basename)
|
||||||
|
@@ -1440,6 +1453,8 @@ find_separate_debug_file (struct objfile
|
||||||
|
|
||||||
|
if (separate_debug_file_exists (debugfile, crc32))
|
||||||
|
{
|
||||||
|
+ if (canon_name)
|
||||||
|
+ xfree (canon_name);
|
||||||
|
xfree (basename);
|
||||||
|
xfree (dir);
|
||||||
|
return xstrdup (debugfile);
|
||||||
|
@@ -1453,6 +1468,8 @@ find_separate_debug_file (struct objfile
|
||||||
|
|
||||||
|
if (separate_debug_file_exists (debugfile, crc32))
|
||||||
|
{
|
||||||
|
+ if (canon_name)
|
||||||
|
+ xfree (canon_name);
|
||||||
|
xfree (basename);
|
||||||
|
xfree (dir);
|
||||||
|
return xstrdup (debugfile);
|
||||||
|
@@ -1461,11 +1478,13 @@ find_separate_debug_file (struct objfile
|
||||||
|
/* Then try in the global debugfile directory. */
|
||||||
|
strcpy (debugfile, debug_file_directory);
|
||||||
|
strcat (debugfile, "/");
|
||||||
|
- strcat (debugfile, dir);
|
||||||
|
+ strcat (debugfile, canon_name ? canon_name : dir);
|
||||||
|
strcat (debugfile, basename);
|
||||||
|
|
||||||
|
if (separate_debug_file_exists (debugfile, crc32))
|
||||||
|
{
|
||||||
|
+ if (canon_name)
|
||||||
|
+ xfree (canon_name);
|
||||||
|
xfree (basename);
|
||||||
|
xfree (dir);
|
||||||
|
return xstrdup (debugfile);
|
||||||
|
@@ -1473,7 +1492,6 @@ find_separate_debug_file (struct objfile
|
||||||
|
|
||||||
|
/* If the file is in the sysroot, try using its base path in the
|
||||||
|
global debugfile directory. */
|
||||||
|
- canon_name = lrealpath (dir);
|
||||||
|
if (canon_name
|
||||||
|
&& strncmp (canon_name, gdb_sysroot, strlen (gdb_sysroot)) == 0
|
||||||
|
&& IS_DIR_SEPARATOR (canon_name[strlen (gdb_sysroot)]))
|
@ -9,7 +9,7 @@ Index: gdb/i386-tdep.c
|
|||||||
- else
|
- else
|
||||||
+ else if (cache->pc)
|
+ else if (cache->pc)
|
||||||
{
|
{
|
||||||
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
|
get_frame_register (this_frame, I386_ESP_REGNUM, buf);
|
||||||
cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
|
cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
|
||||||
}
|
}
|
||||||
+ else
|
+ else
|
||||||
|
3
gdb-6.8.50.20080618-cvs.tar.bz2
Normal file
3
gdb-6.8.50.20080618-cvs.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:842b1776aaa3d28c1fde81ca032bb4fc24327415b3043ecb8588c44e5c03d330
|
||||||
|
size 15390228
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eedffd586bf41cf2ae2f77e6819545d6eb1e5062052320a27332fdfaaebdf818
|
|
||||||
size 15581509
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 18 16:47:02 CEST 2008 - schwab@suse.de
|
||||||
|
|
||||||
|
- Update to head of trunk.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 23 11:29:13 CEST 2008 - matz@suse.de
|
Fri May 23 11:29:13 CEST 2008 - matz@suse.de
|
||||||
|
|
||||||
|
26
gdb.spec
26
gdb.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gdb (Version 6.8)
|
# spec file for package gdb (Version 6.8.50.20080618)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
@ -17,7 +17,7 @@ BuildRequires: libexpat-devel
|
|||||||
%else
|
%else
|
||||||
BuildRequires: expat
|
BuildRequires: expat
|
||||||
%endif
|
%endif
|
||||||
%ifarch %ix86 x86_64 ia64
|
%ifarch ia64
|
||||||
BuildRequires: libunwind-devel
|
BuildRequires: libunwind-devel
|
||||||
%endif
|
%endif
|
||||||
%ifnarch ppc64 s390x
|
%ifnarch ppc64 s390x
|
||||||
@ -29,9 +29,9 @@ Group: Development/Tools/Debuggers
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
PreReq: %{install_info_prereq}
|
PreReq: %{install_info_prereq}
|
||||||
Summary: The GNU Debugger
|
Summary: The GNU Debugger
|
||||||
Version: 6.8
|
Version: 6.8.50.20080618
|
||||||
Release: 20
|
Release: 1
|
||||||
%define sss %{nil}
|
%define sss -cvs
|
||||||
Source: gdb-%{version}%{sss}.tar.bz2
|
Source: gdb-%{version}%{sss}.tar.bz2
|
||||||
Patch1: find-pc-sect-line.diff
|
Patch1: find-pc-sect-line.diff
|
||||||
Patch2: warn.patch
|
Patch2: warn.patch
|
||||||
@ -40,11 +40,8 @@ Patch4: readnever.patch
|
|||||||
Patch5: gstack.patch
|
Patch5: gstack.patch
|
||||||
Patch6: sect-index-text.diff
|
Patch6: sect-index-text.diff
|
||||||
Patch7: pie-relocate.diff
|
Patch7: pie-relocate.diff
|
||||||
Patch8: infcall.diff
|
Patch8: find-separate-debug-file.diff
|
||||||
Patch9: examine-prologue.diff
|
Patch9: fix-gdb-backtrace.diff
|
||||||
Patch10: watchpoints.diff
|
|
||||||
Patch11: get-prev-frame-1.diff
|
|
||||||
Patch12: fix-gdb-backtrace.diff
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -77,8 +74,6 @@ Summary: Remote Server for the GNU Debugger
|
|||||||
Group: Development/Tools/Debuggers
|
Group: Development/Tools/Debuggers
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Provides: gdb:/usr/bin/gdbserver
|
Provides: gdb:/usr/bin/gdbserver
|
||||||
Version: 6.8
|
|
||||||
Release: 7
|
|
||||||
|
|
||||||
%description -n gdbserver
|
%description -n gdbserver
|
||||||
GDBSERVER is a program that allows you to run GDB on a different
|
GDBSERVER is a program that allows you to run GDB on a different
|
||||||
@ -113,11 +108,8 @@ Authors:
|
|||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
%patch7
|
%patch7
|
||||||
%patch8 -p1
|
%patch8
|
||||||
%patch9
|
%patch9
|
||||||
%patch10
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" \
|
CFLAGS="$RPM_OPT_FLAGS" \
|
||||||
@ -179,6 +171,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 18 2008 schwab@suse.de
|
||||||
|
- Update to head of trunk.
|
||||||
* Fri May 23 2008 matz@suse.de
|
* Fri May 23 2008 matz@suse.de
|
||||||
- Try harder to provide backtraces without debuginfo on i386. [bnc #390722]
|
- Try harder to provide backtraces without debuginfo on i386. [bnc #390722]
|
||||||
* Wed May 21 2008 schwab@suse.de
|
* Wed May 21 2008 schwab@suse.de
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
2008-05-20 Pedro Alves <pedro@codesourcery.com>
|
|
||||||
|
|
||||||
* frame.c (get_prev_frame_1): Build frame id before setting
|
|
||||||
this_frame->prev_p, not after.
|
|
||||||
|
|
||||||
---
|
|
||||||
gdb/frame.c | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: src/gdb/frame.c
|
|
||||||
===================================================================
|
|
||||||
--- src.orig/gdb/frame.c 2008-05-20 22:41:07.000000000 +0100
|
|
||||||
+++ src/gdb/frame.c 2008-05-20 22:49:59.000000000 +0100
|
|
||||||
@@ -1179,13 +1179,17 @@ get_prev_frame_1 (struct frame_info *thi
|
|
||||||
}
|
|
||||||
return this_frame->prev;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ /* If the frame id hasn't been built yet, it must be done before
|
|
||||||
+ setting a stop reason. */
|
|
||||||
+ this_id = get_frame_id (this_frame);
|
|
||||||
+
|
|
||||||
this_frame->prev_p = 1;
|
|
||||||
this_frame->stop_reason = UNWIND_NO_REASON;
|
|
||||||
|
|
||||||
/* Check that this frame's ID was valid. If it wasn't, don't try to
|
|
||||||
unwind to the prev frame. Be careful to not apply this test to
|
|
||||||
the sentinel frame. */
|
|
||||||
- this_id = get_frame_id (this_frame);
|
|
||||||
if (this_frame->level >= 0 && !frame_id_p (this_id))
|
|
||||||
{
|
|
||||||
if (frame_debug)
|
|
891
infcall.diff
891
infcall.diff
@ -1,891 +0,0 @@
|
|||||||
From nobody Fri Mar 28 10:36:27 2008
|
|
||||||
From: "Ulrich Weigand" <uweigand@de.ibm.com>
|
|
||||||
Subject: [rfc] Fix inferior calls during interrupted system calls on PowerPC
|
|
||||||
To: gdb-patches@sourceware.org
|
|
||||||
Date: Thu, 27 Mar 2008 20:33:51 +0100 (CET)
|
|
||||||
|
|
||||||
Hello,
|
|
||||||
|
|
||||||
PowerPC still suffers from a problem that was fixed on other
|
|
||||||
platforms a while ago: if GDB wants to perform an inferior
|
|
||||||
call while the inferior is blocked in an (interrupted) system
|
|
||||||
call, the Linux kernel gets confused.
|
|
||||||
|
|
||||||
With recent kernel versions (>= 2.6.23 I think), it is possible
|
|
||||||
to correctly handle this situation using a similar approach to
|
|
||||||
what is currently done on i386: there, GDB informs the kernel
|
|
||||||
that it wants to do an inferior call by writing to the "special"
|
|
||||||
ORIG_EAX register -- this causes the kernel to not attempt to
|
|
||||||
"restart" the system call. After the inferior call is finished,
|
|
||||||
the original contents of ORIG_EAX are restored.
|
|
||||||
|
|
||||||
On PowerPC, the same mechanism is possible, except that there
|
|
||||||
are two registers that need to be restored, ORIG_R3 and TRAP.
|
|
||||||
When initiating an inferior call, only TRAP has to be reset.
|
|
||||||
|
|
||||||
The patch below implements this by adding two new registers,
|
|
||||||
ORIG_R3 and TRAP to the PowerPC Linux register sets. As these
|
|
||||||
are only available on Linux, I've added two new XML features
|
|
||||||
powerpc-linux32 and powerpc-linux64 that include these new
|
|
||||||
registers.
|
|
||||||
|
|
||||||
Native code in ppc-linux-nat.c will register that it supports
|
|
||||||
those by returning the appropriate feature from ppc_linux_read_description.
|
|
||||||
|
|
||||||
Similarly, the new ppc_linux_core_read_description routine will
|
|
||||||
handle Linux core files.
|
|
||||||
|
|
||||||
gdbserver is switched to always use powerpc-linux32/64 instead
|
|
||||||
of powerpc-32/64. This still leaves the new registers out on
|
|
||||||
any non-AltiVec platforms. I guess for powerpc-e500 we could
|
|
||||||
create a similar powerpc-linuxe500 feature, if this is required.
|
|
||||||
I'm not sure how to handle the default (non-AltiVec, non-SPE)
|
|
||||||
case which does not yet use XML. Simply adding registers to
|
|
||||||
the .dat files is probably not a good idea as it might break
|
|
||||||
old GDBs that connect to the new gdbserver ...
|
|
||||||
|
|
||||||
Any suggestion how we should handle that? Any other comments
|
|
||||||
on this approach are welcome ...
|
|
||||||
|
|
||||||
Note that the patch below assumes that the AltiVec auto-detection
|
|
||||||
patch is already applied.
|
|
||||||
|
|
||||||
Tested on powerpc-linux and powerpc64-linux, both natively and
|
|
||||||
using a local gdbserver. Fixes all interrupt.exp failures.
|
|
||||||
|
|
||||||
Bye,
|
|
||||||
Ulrich
|
|
||||||
|
|
||||||
|
|
||||||
ChangeLog:
|
|
||||||
|
|
||||||
* ppc-tdep.h (struct ppc_reg_offsets): New members
|
|
||||||
orig_r3_offset and trap_offset.
|
|
||||||
(struct gdbarch_tdep): New members ppc_orig_r3_regnum
|
|
||||||
and ppc_trap_regnum.
|
|
||||||
(PPC_ORIG_R3_REGNUM, PPC_TRAP_REGNUM): New enum members.
|
|
||||||
(tdesc_powerpc_linux32, tdesc_powerpc_linux64): Declare.
|
|
||||||
|
|
||||||
* rs6000-tdep.c: Include features/rs6000/powerpc-linux32.c
|
|
||||||
and features/rs6000/powerpc-linux64.c.
|
|
||||||
(ppc_greg_offset): Handle orig_r3 and trap.
|
|
||||||
(ppc_supply_gregset, ppu_collect_gregset): Likewise.
|
|
||||||
(rs6000_gdbarch_init): Handle org.gnu.gdb.power.linux feature.
|
|
||||||
Set up ppc_orig_r3_regnum and ppc_trap_regnum tdep entries.
|
|
||||||
(_initialize_rs6000_tdep): Call initialize_tdesc_powerpc_linux32
|
|
||||||
and initialize_tdesc_powerpc_linux64
|
|
||||||
|
|
||||||
* ppc-linux-tdep.c (ppc32_linux_reg_offsets): Initialize
|
|
||||||
orig_r3_offset and trap_offset fields.
|
|
||||||
(ppc64_linux_reg_offsets): Likewise.
|
|
||||||
(ppc_linux_write_pc): New function.
|
|
||||||
(ppc_linux_core_read_description): New function.
|
|
||||||
(ppc_linux_init_abi): Install them.
|
|
||||||
|
|
||||||
* ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Initialize
|
|
||||||
ppcnbsd_reg_offsets.orig_r3_offset and
|
|
||||||
ppcnbsd_reg_offsets.trap_offset.
|
|
||||||
* ppcobsd-tdep.c (_initialize_ppcobsd_tdep): Initialize
|
|
||||||
ppcobsd_reg_offsets.orig_r3_offset and
|
|
||||||
ppcobsd_reg_offsets.trap_offset.
|
|
||||||
* rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Initialize
|
|
||||||
orig_r3_offset and trap_offset fields.
|
|
||||||
(rs6000_aix64_reg_offsets): Likewise.
|
|
||||||
|
|
||||||
* ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Define if necessary.
|
|
||||||
(ppc_register_u_addr): Handle orig_r3 and trap.
|
|
||||||
(fetch_ppc_registers, store_ppc_registers, store_register): Likewise.
|
|
||||||
(ppc_linux_read_description): Return tdesc_powerpc_linux32 or
|
|
||||||
tdesc_powerpc_linux64 as appropriate.
|
|
||||||
|
|
||||||
|
|
||||||
diff -urNp gdb-orig/gdb/features/rs6000/powerpc-linux32.c gdb-head/gdb/features/rs6000/powerpc-linux32.c
|
|
||||||
--- gdb-orig/gdb/features/rs6000/powerpc-linux32.c 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ gdb-head/gdb/features/rs6000/powerpc-linux32.c 2008-03-27 00:05:36.394145047 +0100
|
|
||||||
@@ -0,0 +1,168 @@
|
|
||||||
+/* THIS FILE IS GENERATED. Original: powerpc-linux32.xml */
|
|
||||||
+
|
|
||||||
+#include "defs.h"
|
|
||||||
+#include "gdbtypes.h"
|
|
||||||
+#include "target-descriptions.h"
|
|
||||||
+
|
|
||||||
+struct target_desc *tdesc_powerpc_linux32;
|
|
||||||
+static void
|
|
||||||
+initialize_tdesc_powerpc_linux32 (void)
|
|
||||||
+{
|
|
||||||
+ struct target_desc *result = allocate_target_description ();
|
|
||||||
+ struct tdesc_feature *feature;
|
|
||||||
+ struct type *field_type, *type;
|
|
||||||
+
|
|
||||||
+ set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common"));
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
|
|
||||||
+ tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r28", 28, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "pc", 64, 1, NULL, 32, "code_ptr");
|
|
||||||
+ tdesc_create_reg (feature, "msr", 65, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "cr", 66, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "lr", 67, 1, NULL, 32, "code_ptr");
|
|
||||||
+ tdesc_create_reg (feature, "ctr", 68, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
|
|
||||||
+ tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f3", 35, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f4", 36, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f5", 37, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f6", 38, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f7", 39, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f8", 40, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f9", 41, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f10", 42, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f11", 43, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f12", 44, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f13", 45, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f14", 46, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f15", 47, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f16", 48, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f17", 49, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f18", 50, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f19", 51, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f20", 52, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f21", 53, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f22", 54, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f23", 55, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f24", 56, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f25", 57, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f26", 58, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f27", 59, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f28", 60, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f29", 61, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f30", 62, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
|
|
||||||
+ tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 32, "int");
|
|
||||||
+ tdesc_create_reg (feature, "trap", 72, 1, NULL, 32, "int");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
|
|
||||||
+ field_type = tdesc_named_type (feature, "ieee_single");
|
|
||||||
+ type = init_vector_type (field_type, 4);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v4f");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int32");
|
|
||||||
+ type = init_vector_type (field_type, 4);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v4i32");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int16");
|
|
||||||
+ type = init_vector_type (field_type, 8);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v8i16");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int8");
|
|
||||||
+ type = init_vector_type (field_type, 16);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v16i8");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ type = init_composite_type (NULL, TYPE_CODE_UNION);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("vec128");
|
|
||||||
+ field_type = tdesc_named_type (feature, "uint128");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("uint128"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v4f");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v4_float"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v4i32");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v4_int32"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v8i16");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v8_int16"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v16i8");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v16_int8"), field_type);
|
|
||||||
+ TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr2", 75, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr3", 76, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr4", 77, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr5", 78, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr6", 79, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr7", 80, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr8", 81, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr9", 82, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr10", 83, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr11", 84, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr12", 85, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr13", 86, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr14", 87, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr15", 88, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr16", 89, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr17", 90, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr18", 91, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr19", 92, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr20", 93, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr21", 94, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr22", 95, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr23", 96, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr24", 97, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr25", 98, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr26", 99, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr27", 100, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr28", 101, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr29", 102, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr30", 103, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr31", 104, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
|
|
||||||
+ tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
|
|
||||||
+
|
|
||||||
+ tdesc_powerpc_linux32 = result;
|
|
||||||
+}
|
|
||||||
diff -urNp gdb-orig/gdb/features/rs6000/powerpc-linux32.xml gdb-head/gdb/features/rs6000/powerpc-linux32.xml
|
|
||||||
--- gdb-orig/gdb/features/rs6000/powerpc-linux32.xml 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ gdb-head/gdb/features/rs6000/powerpc-linux32.xml 2008-03-27 00:05:36.397144616 +0100
|
|
||||||
@@ -0,0 +1,21 @@
|
|
||||||
+<?xml version="1.0"?>
|
|
||||||
+<!-- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ Copying and distribution of this file, with or without modification,
|
|
||||||
+ are permitted in any medium without royalty provided the copyright
|
|
||||||
+ notice and this notice are preserved. -->
|
|
||||||
+
|
|
||||||
+<!-- PowerPC UISA - a PPC processor as viewed by user-level code. A UISA-only
|
|
||||||
+ view of the PowerPC. Includes Linux-only special "registers". -->
|
|
||||||
+
|
|
||||||
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
|
||||||
+<target>
|
|
||||||
+ <architecture>powerpc:common</architecture>
|
|
||||||
+ <xi:include href="power-core.xml"/>
|
|
||||||
+ <xi:include href="power-fpu.xml"/>
|
|
||||||
+ <feature name="org.gnu.gdb.power.linux">
|
|
||||||
+ <reg name="orig_r3" bitsize="32"/>
|
|
||||||
+ <reg name="trap" bitsize="32"/>
|
|
||||||
+ </feature>
|
|
||||||
+ <xi:include href="power-altivec.xml"/>
|
|
||||||
+</target>
|
|
||||||
diff -urNp gdb-orig/gdb/features/rs6000/powerpc-linux64.c gdb-head/gdb/features/rs6000/powerpc-linux64.c
|
|
||||||
--- gdb-orig/gdb/features/rs6000/powerpc-linux64.c 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ gdb-head/gdb/features/rs6000/powerpc-linux64.c 2008-03-27 00:05:36.403143754 +0100
|
|
||||||
@@ -0,0 +1,168 @@
|
|
||||||
+/* THIS FILE IS GENERATED. Original: powerpc-linux64.xml */
|
|
||||||
+
|
|
||||||
+#include "defs.h"
|
|
||||||
+#include "gdbtypes.h"
|
|
||||||
+#include "target-descriptions.h"
|
|
||||||
+
|
|
||||||
+struct target_desc *tdesc_powerpc_linux64;
|
|
||||||
+static void
|
|
||||||
+initialize_tdesc_powerpc_linux64 (void)
|
|
||||||
+{
|
|
||||||
+ struct target_desc *result = allocate_target_description ();
|
|
||||||
+ struct tdesc_feature *feature;
|
|
||||||
+ struct type *field_type, *type;
|
|
||||||
+
|
|
||||||
+ set_tdesc_architecture (result, bfd_scan_arch ("powerpc:common64"));
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.core");
|
|
||||||
+ tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "pc", 64, 1, NULL, 64, "code_ptr");
|
|
||||||
+ tdesc_create_reg (feature, "msr", 65, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "cr", 66, 1, NULL, 32, "uint32");
|
|
||||||
+ tdesc_create_reg (feature, "lr", 67, 1, NULL, 64, "code_ptr");
|
|
||||||
+ tdesc_create_reg (feature, "ctr", 68, 1, NULL, 64, "uint64");
|
|
||||||
+ tdesc_create_reg (feature, "xer", 69, 1, NULL, 32, "uint32");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.fpu");
|
|
||||||
+ tdesc_create_reg (feature, "f0", 32, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f1", 33, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f2", 34, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f3", 35, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f4", 36, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f5", 37, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f6", 38, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f7", 39, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f8", 40, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f9", 41, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f10", 42, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f11", 43, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f12", 44, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f13", 45, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f14", 46, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f15", 47, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f16", 48, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f17", 49, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f18", 50, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f19", 51, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f20", 52, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f21", 53, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f22", 54, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f23", 55, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f24", 56, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f25", 57, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f26", 58, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f27", 59, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f28", 60, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f29", 61, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f30", 62, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "f31", 63, 1, NULL, 64, "ieee_double");
|
|
||||||
+ tdesc_create_reg (feature, "fpscr", 70, 1, "float", 32, "int");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.linux");
|
|
||||||
+ tdesc_create_reg (feature, "orig_r3", 71, 1, NULL, 64, "int");
|
|
||||||
+ tdesc_create_reg (feature, "trap", 72, 1, NULL, 64, "int");
|
|
||||||
+
|
|
||||||
+ feature = tdesc_create_feature (result, "org.gnu.gdb.power.altivec");
|
|
||||||
+ field_type = tdesc_named_type (feature, "ieee_single");
|
|
||||||
+ type = init_vector_type (field_type, 4);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v4f");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int32");
|
|
||||||
+ type = init_vector_type (field_type, 4);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v4i32");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int16");
|
|
||||||
+ type = init_vector_type (field_type, 8);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v8i16");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ field_type = tdesc_named_type (feature, "int8");
|
|
||||||
+ type = init_vector_type (field_type, 16);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("v16i8");
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ type = init_composite_type (NULL, TYPE_CODE_UNION);
|
|
||||||
+ TYPE_NAME (type) = xstrdup ("vec128");
|
|
||||||
+ field_type = tdesc_named_type (feature, "uint128");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("uint128"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v4f");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v4_float"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v4i32");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v4_int32"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v8i16");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v8_int16"), field_type);
|
|
||||||
+ field_type = tdesc_named_type (feature, "v16i8");
|
|
||||||
+ append_composite_type_field (type, xstrdup ("v16_int8"), field_type);
|
|
||||||
+ TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
|
|
||||||
+ tdesc_record_type (feature, type);
|
|
||||||
+
|
|
||||||
+ tdesc_create_reg (feature, "vr0", 73, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr1", 74, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr2", 75, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr3", 76, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr4", 77, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr5", 78, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr6", 79, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr7", 80, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr8", 81, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr9", 82, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr10", 83, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr11", 84, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr12", 85, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr13", 86, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr14", 87, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr15", 88, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr16", 89, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr17", 90, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr18", 91, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr19", 92, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr20", 93, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr21", 94, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr22", 95, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr23", 96, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr24", 97, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr25", 98, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr26", 99, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr27", 100, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr28", 101, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr29", 102, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr30", 103, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vr31", 104, 1, NULL, 128, "vec128");
|
|
||||||
+ tdesc_create_reg (feature, "vscr", 105, 1, "vector", 32, "int");
|
|
||||||
+ tdesc_create_reg (feature, "vrsave", 106, 1, "vector", 32, "int");
|
|
||||||
+
|
|
||||||
+ tdesc_powerpc_linux64 = result;
|
|
||||||
+}
|
|
||||||
diff -urNp gdb-orig/gdb/ppc-linux-nat.c gdb-head/gdb/ppc-linux-nat.c
|
|
||||||
--- gdb-orig/gdb/ppc-linux-nat.c 2008-03-27 00:52:46.050416072 +0100
|
|
||||||
+++ gdb-head/gdb/ppc-linux-nat.c 2008-03-27 00:05:36.427140307 +0100
|
|
||||||
@@ -43,6 +43,14 @@
|
|
||||||
#include "gregset.h"
|
|
||||||
#include "ppc-tdep.h"
|
|
||||||
|
|
||||||
+/* This sometimes isn't defined. */
|
|
||||||
+#ifndef PT_ORIG_R3
|
|
||||||
+#define PT_ORIG_R3 34
|
|
||||||
+#endif
|
|
||||||
+#ifndef PT_TRAP
|
|
||||||
+#define PT_TRAP 40
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* Glibc's headers don't define PTRACE_GETVRREGS so we cannot use a
|
|
||||||
configure time check. Some older glibc's (for instance 2.2.1)
|
|
||||||
don't have a specific powerpc version of ptrace.h, and fall back on
|
|
||||||
@@ -200,6 +208,10 @@ ppc_register_u_addr (struct gdbarch *gdb
|
|
||||||
#endif
|
|
||||||
if (regno == tdep->ppc_ps_regnum)
|
|
||||||
u_addr = PT_MSR * wordsize;
|
|
||||||
+ if (regno == tdep->ppc_orig_r3_regnum)
|
|
||||||
+ u_addr = PT_ORIG_R3 * wordsize;
|
|
||||||
+ if (regno == tdep->ppc_trap_regnum)
|
|
||||||
+ u_addr = PT_TRAP * wordsize;
|
|
||||||
if (tdep->ppc_fpscr_regnum >= 0
|
|
||||||
&& regno == tdep->ppc_fpscr_regnum)
|
|
||||||
{
|
|
||||||
@@ -476,6 +488,10 @@ fetch_ppc_registers (struct regcache *re
|
|
||||||
fetch_register (regcache, tid, tdep->ppc_xer_regnum);
|
|
||||||
if (tdep->ppc_mq_regnum != -1)
|
|
||||||
fetch_register (regcache, tid, tdep->ppc_mq_regnum);
|
|
||||||
+ if (tdep->ppc_orig_r3_regnum != -1)
|
|
||||||
+ fetch_register (regcache, tid, tdep->ppc_orig_r3_regnum);
|
|
||||||
+ if (tdep->ppc_trap_regnum != -1)
|
|
||||||
+ fetch_register (regcache, tid, tdep->ppc_trap_regnum);
|
|
||||||
if (tdep->ppc_fpscr_regnum != -1)
|
|
||||||
fetch_register (regcache, tid, tdep->ppc_fpscr_regnum);
|
|
||||||
if (have_ptrace_getvrregs)
|
|
||||||
@@ -676,9 +692,12 @@ store_register (const struct regcache *r
|
|
||||||
regaddr += sizeof (long);
|
|
||||||
|
|
||||||
if (errno == EIO
|
|
||||||
- && regno == tdep->ppc_fpscr_regnum)
|
|
||||||
+ && (regno == tdep->ppc_fpscr_regnum
|
|
||||||
+ || regno == tdep->ppc_orig_r3_regnum
|
|
||||||
+ || regno == tdep->ppc_trap_regnum))
|
|
||||||
{
|
|
||||||
- /* Some older kernel versions don't allow fpscr to be written. */
|
|
||||||
+ /* Some older kernel versions don't allow fpscr, orig_r3
|
|
||||||
+ or trap to be written. */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -763,6 +782,10 @@ store_ppc_registers (const struct regcac
|
|
||||||
store_register (regcache, tid, tdep->ppc_xer_regnum);
|
|
||||||
if (tdep->ppc_mq_regnum != -1)
|
|
||||||
store_register (regcache, tid, tdep->ppc_mq_regnum);
|
|
||||||
+ if (tdep->ppc_orig_r3_regnum != -1)
|
|
||||||
+ store_register (regcache, tid, tdep->ppc_orig_r3_regnum);
|
|
||||||
+ if (tdep->ppc_trap_regnum != -1)
|
|
||||||
+ store_register (regcache, tid, tdep->ppc_trap_regnum);
|
|
||||||
if (tdep->ppc_fpscr_regnum != -1)
|
|
||||||
store_register (regcache, tid, tdep->ppc_fpscr_regnum);
|
|
||||||
if (have_ptrace_getvrregs)
|
|
||||||
@@ -964,16 +987,31 @@ ppc_linux_read_description (struct targe
|
|
||||||
return tdesc_powerpc_e500;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- /* EIO means that the PTRACE_GETEVRREGS request isn't supported. */
|
|
||||||
- if (errno == EIO)
|
|
||||||
- return NULL;
|
|
||||||
- else
|
|
||||||
- /* Anything else needs to be reported. */
|
|
||||||
+ /* EIO means that the PTRACE_GETEVRREGS request isn't supported.
|
|
||||||
+ Anything else needs to be reported. */
|
|
||||||
+ if (errno != EIO)
|
|
||||||
perror_with_name (_("Unable to fetch SPE registers"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- return NULL;
|
|
||||||
+ /* Check for 64-bit inferior process. This is the case when the host is
|
|
||||||
+ 64-bit, and in addition the top bit of the MSR register is set. */
|
|
||||||
+#ifdef __powerpc64__
|
|
||||||
+ {
|
|
||||||
+ long msr;
|
|
||||||
+
|
|
||||||
+ int tid = TIDGET (inferior_ptid);
|
|
||||||
+ if (tid == 0)
|
|
||||||
+ tid = PIDGET (inferior_ptid);
|
|
||||||
+
|
|
||||||
+ errno = 0;
|
|
||||||
+ msr = (long) ptrace (PTRACE_PEEKUSER, tid, PT_MSR * 8, 0);
|
|
||||||
+ if (errno == 0 && msr < 0)
|
|
||||||
+ return tdesc_powerpc_linux64;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ return tdesc_powerpc_linux32;
|
|
||||||
}
|
|
||||||
|
|
||||||
void _initialize_ppc_linux_nat (void);
|
|
||||||
diff -urNp gdb-orig/gdb/ppc-linux-tdep.c gdb-head/gdb/ppc-linux-tdep.c
|
|
||||||
--- gdb-orig/gdb/ppc-linux-tdep.c 2008-03-27 00:52:46.093409899 +0100
|
|
||||||
+++ gdb-head/gdb/ppc-linux-tdep.c 2008-03-27 00:05:36.471133987 +0100
|
|
||||||
@@ -656,7 +656,11 @@ static const struct ppc_reg_offsets ppc3
|
|
||||||
/* AltiVec registers. */
|
|
||||||
/* .vr0_offset = */ 0,
|
|
||||||
/* .vscr_offset = */ 512 + 12,
|
|
||||||
- /* .vrsave_offset = */ 528
|
|
||||||
+ /* .vrsave_offset = */ 528,
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ /* .orig_r3_offset = */ 136,
|
|
||||||
+ /* .trap_offset = */ 160
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct ppc_reg_offsets ppc64_linux_reg_offsets =
|
|
||||||
@@ -681,7 +685,11 @@ static const struct ppc_reg_offsets ppc6
|
|
||||||
/* AltiVec registers. */
|
|
||||||
/* .vr0_offset = */ 0,
|
|
||||||
/* .vscr_offset = */ 512 + 12,
|
|
||||||
- /* .vrsave_offset = */ 528
|
|
||||||
+ /* .vrsave_offset = */ 528,
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ /* .orig_r3_offset = */ 272,
|
|
||||||
+ /* .trap_offset = */ 320
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct regset ppc32_linux_gregset = {
|
|
||||||
@@ -895,6 +903,50 @@ static struct tramp_frame ppc64_linux_si
|
|
||||||
ppc64_linux_sighandler_cache_init
|
|
||||||
};
|
|
||||||
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+ppc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
|
||||||
+{
|
|
||||||
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
|
||||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
||||||
+
|
|
||||||
+ regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch), pc);
|
|
||||||
+
|
|
||||||
+ /* Set special TRAP register to -1 to prevent the kernel from
|
|
||||||
+ messing with the PC we just installed, if we happen to be
|
|
||||||
+ within an interrupted system call that the kernel wants to
|
|
||||||
+ restart.
|
|
||||||
+
|
|
||||||
+ Note that after we return from the dummy call, the TRAP and
|
|
||||||
+ ORIG_R3 registers will be automatically restored, and the
|
|
||||||
+ kernel continues to restart the system call at this point. */
|
|
||||||
+ regcache_cooked_write_unsigned (regcache, tdep->ppc_trap_regnum, -1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static const struct target_desc *
|
|
||||||
+ppc_linux_core_read_description (struct gdbarch *gdbarch,
|
|
||||||
+ struct target_ops *target,
|
|
||||||
+ bfd *abfd)
|
|
||||||
+{
|
|
||||||
+ asection *section = bfd_get_section_by_name (abfd, ".reg");
|
|
||||||
+ if (! section)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ switch (bfd_section_size (abfd, section))
|
|
||||||
+ {
|
|
||||||
+ case 48 * 4:
|
|
||||||
+ return tdesc_powerpc_linux32;
|
|
||||||
+
|
|
||||||
+ case 48 * 8:
|
|
||||||
+ return tdesc_powerpc_linux64;
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
ppc_linux_init_abi (struct gdbarch_info info,
|
|
||||||
struct gdbarch *gdbarch)
|
|
||||||
@@ -914,6 +966,9 @@ ppc_linux_init_abi (struct gdbarch_info
|
|
||||||
set_gdbarch_convert_from_func_ptr_addr
|
|
||||||
(gdbarch, ppc_linux_convert_from_func_ptr_addr);
|
|
||||||
|
|
||||||
+ /* Handle inferior calls during interrupted system calls. */
|
|
||||||
+ set_gdbarch_write_pc (gdbarch, ppc_linux_write_pc);
|
|
||||||
+
|
|
||||||
if (tdep->wordsize == 4)
|
|
||||||
{
|
|
||||||
/* Until November 2001, gcc did not comply with the 32 bit SysV
|
|
||||||
@@ -951,6 +1006,7 @@ ppc_linux_init_abi (struct gdbarch_info
|
|
||||||
tramp_frame_prepend_unwinder (gdbarch, &ppc64_linux_sighandler_tramp_frame);
|
|
||||||
}
|
|
||||||
set_gdbarch_regset_from_core_section (gdbarch, ppc_linux_regset_from_core_section);
|
|
||||||
+ set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description);
|
|
||||||
|
|
||||||
/* Enable TLS support. */
|
|
||||||
set_gdbarch_fetch_tls_load_module_address (gdbarch,
|
|
||||||
diff -urNp gdb-orig/gdb/ppcnbsd-tdep.c gdb-head/gdb/ppcnbsd-tdep.c
|
|
||||||
--- gdb-orig/gdb/ppcnbsd-tdep.c 2008-03-27 00:52:46.098409181 +0100
|
|
||||||
+++ gdb-head/gdb/ppcnbsd-tdep.c 2008-03-27 00:05:36.513127954 +0100
|
|
||||||
@@ -231,5 +231,9 @@ _initialize_ppcnbsd_tdep (void)
|
|
||||||
ppcnbsd_reg_offsets.vr0_offset = 0;
|
|
||||||
ppcnbsd_reg_offsets.vrsave_offset = 512;
|
|
||||||
ppcnbsd_reg_offsets.vscr_offset = 524;
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ ppcnbsd_reg_offsets.orig_r3_offset = -1;
|
|
||||||
+ ppcnbsd_reg_offsets.trap_offset = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff -urNp gdb-orig/gdb/ppcobsd-tdep.c gdb-head/gdb/ppcobsd-tdep.c
|
|
||||||
--- gdb-orig/gdb/ppcobsd-tdep.c 2008-03-27 00:52:46.102408607 +0100
|
|
||||||
+++ gdb-head/gdb/ppcobsd-tdep.c 2008-03-27 00:05:36.517127379 +0100
|
|
||||||
@@ -325,6 +325,10 @@ _initialize_ppcobsd_tdep (void)
|
|
||||||
ppcobsd_reg_offsets.vr0_offset = 0;
|
|
||||||
ppcobsd_reg_offsets.vscr_offset = 512;
|
|
||||||
ppcobsd_reg_offsets.vrsave_offset = 520;
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ ppcobsd_reg_offsets.orig_r3_offset = -1;
|
|
||||||
+ ppcobsd_reg_offsets.trap_offset = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ppcobsd_fpreg_offsets.fpscr_offset == 0)
|
|
||||||
diff -urNp gdb-orig/gdb/ppc-tdep.h gdb-head/gdb/ppc-tdep.h
|
|
||||||
--- gdb-orig/gdb/ppc-tdep.h 2008-03-27 00:52:46.107407889 +0100
|
|
||||||
+++ gdb-head/gdb/ppc-tdep.h 2008-03-27 00:05:36.522126661 +0100
|
|
||||||
@@ -102,6 +102,10 @@ struct ppc_reg_offsets
|
|
||||||
int vr0_offset;
|
|
||||||
int vscr_offset;
|
|
||||||
int vrsave_offset;
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. Size in gpr_size. */
|
|
||||||
+ int orig_r3_offset;
|
|
||||||
+ int trap_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Supply register REGNUM in the general-purpose register set REGSET
|
|
||||||
@@ -194,6 +198,10 @@ struct gdbarch_tdep
|
|
||||||
/* Multiplier-Quotient Register (older POWER architectures only). */
|
|
||||||
int ppc_mq_regnum;
|
|
||||||
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ int ppc_orig_r3_regnum; /* GPR3 at syscall entry. */
|
|
||||||
+ int ppc_trap_regnum; /* Syscall trap code. */
|
|
||||||
+
|
|
||||||
/* Altivec registers. */
|
|
||||||
int ppc_vr0_regnum; /* First AltiVec register */
|
|
||||||
int ppc_vrsave_regnum; /* Last AltiVec register */
|
|
||||||
@@ -255,6 +263,8 @@ enum {
|
|
||||||
PPC_VR0_REGNUM = 106,
|
|
||||||
PPC_VSCR_REGNUM = 138,
|
|
||||||
PPC_VRSAVE_REGNUM = 139,
|
|
||||||
+ PPC_ORIG_R3_REGNUM = 140,
|
|
||||||
+ PPC_TRAP_REGNUM = 141,
|
|
||||||
PPC_NUM_REGS
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -265,6 +275,8 @@ enum {
|
|
||||||
/* Estimate for the maximum number of instrctions in a function epilogue. */
|
|
||||||
#define PPC_MAX_EPILOGUE_INSTRUCTIONS 52
|
|
||||||
|
|
||||||
+extern struct target_desc *tdesc_powerpc_linux32;
|
|
||||||
+extern struct target_desc *tdesc_powerpc_linux64;
|
|
||||||
extern struct target_desc *tdesc_powerpc_e500;
|
|
||||||
|
|
||||||
#endif /* ppc-tdep.h */
|
|
||||||
diff -urNp gdb-orig/gdb/rs6000-aix-tdep.c gdb-head/gdb/rs6000-aix-tdep.c
|
|
||||||
--- gdb-orig/gdb/rs6000-aix-tdep.c 2008-03-27 00:52:46.126405161 +0100
|
|
||||||
+++ gdb-head/gdb/rs6000-aix-tdep.c 2008-03-27 00:05:52.840308201 +0100
|
|
||||||
@@ -52,7 +52,11 @@ static struct ppc_reg_offsets rs6000_aix
|
|
||||||
/* AltiVec registers. */
|
|
||||||
-1, /* vr0_offset */
|
|
||||||
-1, /* vscr_offset */
|
|
||||||
- -1 /* vrsave_offset */
|
|
||||||
+ -1, /* vrsave_offset */
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ -1, /* orig_r3_offset */
|
|
||||||
+ -1 /* trap_offset */
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct ppc_reg_offsets rs6000_aix64_reg_offsets =
|
|
||||||
@@ -77,7 +81,11 @@ static struct ppc_reg_offsets rs6000_aix
|
|
||||||
/* AltiVec registers. */
|
|
||||||
-1, /* vr0_offset */
|
|
||||||
-1, /* vscr_offset */
|
|
||||||
- -1 /* vrsave_offset */
|
|
||||||
+ -1, /* vrsave_offset */
|
|
||||||
+
|
|
||||||
+ /* Linux-specific registers. */
|
|
||||||
+ -1, /* orig_r3_offset */
|
|
||||||
+ -1 /* trap_offset */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
diff -urNp gdb-orig/gdb/rs6000-tdep.c gdb-head/gdb/rs6000-tdep.c
|
|
||||||
--- gdb-orig/gdb/rs6000-tdep.c 2008-03-27 00:52:46.138403438 +0100
|
|
||||||
+++ gdb-head/gdb/rs6000-tdep.c 2008-03-27 00:05:52.852306477 +0100
|
|
||||||
@@ -64,6 +64,7 @@
|
|
||||||
#include "rs6000-tdep.h"
|
|
||||||
|
|
||||||
#include "features/rs6000/powerpc-32.c"
|
|
||||||
+#include "features/rs6000/powerpc-linux32.c"
|
|
||||||
#include "features/rs6000/powerpc-403.c"
|
|
||||||
#include "features/rs6000/powerpc-403gc.c"
|
|
||||||
#include "features/rs6000/powerpc-505.c"
|
|
||||||
@@ -72,6 +73,7 @@
|
|
||||||
#include "features/rs6000/powerpc-603.c"
|
|
||||||
#include "features/rs6000/powerpc-604.c"
|
|
||||||
#include "features/rs6000/powerpc-64.c"
|
|
||||||
+#include "features/rs6000/powerpc-linux64.c"
|
|
||||||
#include "features/rs6000/powerpc-7400.c"
|
|
||||||
#include "features/rs6000/powerpc-750.c"
|
|
||||||
#include "features/rs6000/powerpc-860.c"
|
|
||||||
@@ -448,6 +450,12 @@ ppc_greg_offset (struct gdbarch *gdbarch
|
|
||||||
if (regnum == tdep->ppc_ctr_regnum)
|
|
||||||
return offsets->ctr_offset;
|
|
||||||
|
|
||||||
+ if (regnum == tdep->ppc_orig_r3_regnum)
|
|
||||||
+ return offsets->orig_r3_offset;
|
|
||||||
+
|
|
||||||
+ if (regnum == tdep->ppc_trap_regnum)
|
|
||||||
+ return offsets->trap_offset;
|
|
||||||
+
|
|
||||||
*regsize = offsets->xr_size;
|
|
||||||
if (regnum == tdep->ppc_cr_regnum)
|
|
||||||
return offsets->cr_offset;
|
|
||||||
@@ -526,6 +534,10 @@ ppc_supply_gregset (const struct regset
|
|
||||||
gregs, offsets->lr_offset, gpr_size);
|
|
||||||
ppc_supply_reg (regcache, tdep->ppc_ctr_regnum,
|
|
||||||
gregs, offsets->ctr_offset, gpr_size);
|
|
||||||
+ ppc_supply_reg (regcache, tdep->ppc_orig_r3_regnum,
|
|
||||||
+ gregs, offsets->orig_r3_offset, gpr_size);
|
|
||||||
+ ppc_supply_reg (regcache, tdep->ppc_trap_regnum,
|
|
||||||
+ gregs, offsets->trap_offset, gpr_size);
|
|
||||||
ppc_supply_reg (regcache, tdep->ppc_cr_regnum,
|
|
||||||
gregs, offsets->cr_offset, offsets->xr_size);
|
|
||||||
ppc_supply_reg (regcache, tdep->ppc_xer_regnum,
|
|
||||||
@@ -654,6 +666,10 @@ ppc_collect_gregset (const struct regset
|
|
||||||
gregs, offsets->lr_offset, gpr_size);
|
|
||||||
ppc_collect_reg (regcache, tdep->ppc_ctr_regnum,
|
|
||||||
gregs, offsets->ctr_offset, gpr_size);
|
|
||||||
+ ppc_collect_reg (regcache, tdep->ppc_orig_r3_regnum,
|
|
||||||
+ gregs, offsets->orig_r3_offset, gpr_size);
|
|
||||||
+ ppc_collect_reg (regcache, tdep->ppc_trap_regnum,
|
|
||||||
+ gregs, offsets->trap_offset, gpr_size);
|
|
||||||
ppc_collect_reg (regcache, tdep->ppc_cr_regnum,
|
|
||||||
gregs, offsets->cr_offset, offsets->xr_size);
|
|
||||||
ppc_collect_reg (regcache, tdep->ppc_xer_regnum,
|
|
||||||
@@ -3267,6 +3283,7 @@ rs6000_gdbarch_init (struct gdbarch_info
|
|
||||||
int soft_float;
|
|
||||||
enum powerpc_vector_abi vector_abi = powerpc_vector_abi_global;
|
|
||||||
int have_fpu = 1, have_spe = 0, have_mq = 0, have_altivec = 0, have_dfp = 0;
|
|
||||||
+ int have_linux_regs = 0;
|
|
||||||
int tdesc_wordsize = -1;
|
|
||||||
const struct target_desc *tdesc = info.target_desc;
|
|
||||||
struct tdesc_arch_data *tdesc_data = NULL;
|
|
||||||
@@ -3415,6 +3432,26 @@ rs6000_gdbarch_init (struct gdbarch_info
|
|
||||||
wordsize = tdesc_wordsize;
|
|
||||||
|
|
||||||
feature = tdesc_find_feature (tdesc,
|
|
||||||
+ "org.gnu.gdb.power.linux");
|
|
||||||
+ if (feature != NULL)
|
|
||||||
+ {
|
|
||||||
+ valid_p = 1;
|
|
||||||
+ valid_p &= tdesc_numbered_register (feature, tdesc_data,
|
|
||||||
+ PPC_ORIG_R3_REGNUM, "orig_r3");
|
|
||||||
+ valid_p &= tdesc_numbered_register (feature, tdesc_data,
|
|
||||||
+ PPC_TRAP_REGNUM, "trap");
|
|
||||||
+
|
|
||||||
+ if (!valid_p)
|
|
||||||
+ {
|
|
||||||
+ tdesc_data_cleanup (tdesc_data);
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+ have_linux_regs = 1;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ have_linux_regs = 0;
|
|
||||||
+
|
|
||||||
+ feature = tdesc_find_feature (tdesc,
|
|
||||||
"org.gnu.gdb.power.fpu");
|
|
||||||
if (feature != NULL)
|
|
||||||
{
|
|
||||||
@@ -3657,6 +3694,9 @@ rs6000_gdbarch_init (struct gdbarch_info
|
|
||||||
tdep->ppc_xer_regnum = PPC_XER_REGNUM;
|
|
||||||
tdep->ppc_mq_regnum = have_mq ? PPC_MQ_REGNUM : -1;
|
|
||||||
|
|
||||||
+ tdep->ppc_orig_r3_regnum = have_linux_regs ? PPC_ORIG_R3_REGNUM : -1;
|
|
||||||
+ tdep->ppc_trap_regnum = have_linux_regs ? PPC_TRAP_REGNUM : -1;
|
|
||||||
+
|
|
||||||
tdep->ppc_fp0_regnum = have_fpu ? PPC_F0_REGNUM : -1;
|
|
||||||
tdep->ppc_fpscr_regnum = have_fpu ? PPC_FPSCR_REGNUM : -1;
|
|
||||||
tdep->ppc_vr0_regnum = have_altivec ? PPC_VR0_REGNUM : -1;
|
|
||||||
@@ -3923,6 +3963,7 @@ _initialize_rs6000_tdep (void)
|
|
||||||
|
|
||||||
/* Initialize the standard target descriptions. */
|
|
||||||
initialize_tdesc_powerpc_32 ();
|
|
||||||
+ initialize_tdesc_powerpc_linux32 ();
|
|
||||||
initialize_tdesc_powerpc_403 ();
|
|
||||||
initialize_tdesc_powerpc_403gc ();
|
|
||||||
initialize_tdesc_powerpc_505 ();
|
|
||||||
@@ -3931,6 +3972,7 @@ _initialize_rs6000_tdep (void)
|
|
||||||
initialize_tdesc_powerpc_603 ();
|
|
||||||
initialize_tdesc_powerpc_604 ();
|
|
||||||
initialize_tdesc_powerpc_64 ();
|
|
||||||
+ initialize_tdesc_powerpc_linux64 ();
|
|
||||||
initialize_tdesc_powerpc_7400 ();
|
|
||||||
initialize_tdesc_powerpc_750 ();
|
|
||||||
initialize_tdesc_powerpc_860 ();
|
|
||||||
--
|
|
||||||
Dr. Ulrich Weigand
|
|
||||||
GNU Toolchain for Linux on System z and Cell BE
|
|
||||||
Ulrich.Weigand@de.ibm.com
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
|||||||
--- gdb/Makefile.in
|
--- gdb/Makefile.in
|
||||||
+++ gdb/Makefile.in
|
+++ gdb/Makefile.in
|
||||||
@@ -2559,7 +2559,7 @@ objfiles.o: objfiles.c $(defs_h) $(bfd_h
|
@@ -2605,7 +2605,7 @@ objfiles.o: objfiles.c $(defs_h) $(bfd_h
|
||||||
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(mdebugread_h) \
|
|
||||||
$(gdb_assert_h) $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) \
|
$(gdb_assert_h) $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) \
|
||||||
$(hashtab_h) $(breakpoint_h) $(block_h) $(dictionary_h) $(source_h) \
|
$(hashtab_h) $(breakpoint_h) $(block_h) $(dictionary_h) $(source_h) \
|
||||||
- $(parser_defs_h) $(expression_h) $(addrmap_h)
|
$(parser_defs_h) $(expression_h) $(addrmap_h) $(arch_utils_h) \
|
||||||
+ $(parser_defs_h) $(expression_h) $(addrmap_h) $(auxv_h) $(elf_common_h)
|
- $(exec_h)
|
||||||
|
+ $(exec_h) $(auxv_h) $(elf_common_h)
|
||||||
observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \
|
observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \
|
||||||
$(observer_inc)
|
$(observer_inc)
|
||||||
obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h)
|
obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h)
|
||||||
@@ -2758,7 +2758,7 @@ solib-sunos.o: solib-sunos.c $(defs_h) $
|
@@ -2810,7 +2810,7 @@ solib-sunos.o: solib-sunos.c $(defs_h) $
|
||||||
$(bcache_h) $(regcache_h)
|
$(bcache_h) $(regcache_h)
|
||||||
solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
|
solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
|
||||||
$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
|
$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
|
||||||
@ -20,7 +20,7 @@
|
|||||||
solib-target.o: solib-target.c $(defs_h) $(objfiles_h) $(solist_h) \
|
solib-target.o: solib-target.c $(defs_h) $(objfiles_h) $(solist_h) \
|
||||||
--- gdb/breakpoint.c
|
--- gdb/breakpoint.c
|
||||||
+++ gdb/breakpoint.c
|
+++ gdb/breakpoint.c
|
||||||
@@ -3892,6 +3892,7 @@ describe_other_breakpoints (CORE_ADDR pc
|
@@ -4045,6 +4045,7 @@ describe_other_breakpoints (CORE_ADDR pc
|
||||||
printf_filtered (" (thread %d)", b->thread);
|
printf_filtered (" (thread %d)", b->thread);
|
||||||
printf_filtered ("%s%s ",
|
printf_filtered ("%s%s ",
|
||||||
((b->enable_state == bp_disabled ||
|
((b->enable_state == bp_disabled ||
|
||||||
@ -28,7 +28,23 @@
|
|||||||
b->enable_state == bp_call_disabled)
|
b->enable_state == bp_call_disabled)
|
||||||
? " (disabled)"
|
? " (disabled)"
|
||||||
: b->enable_state == bp_permanent
|
: b->enable_state == bp_permanent
|
||||||
@@ -4544,6 +4545,60 @@ disable_breakpoints_in_unloaded_shlib (s
|
@@ -4120,6 +4121,7 @@ check_duplicates_for (CORE_ADDR address,
|
||||||
|
ALL_BP_LOCATIONS (b)
|
||||||
|
if (b->owner->enable_state != bp_disabled
|
||||||
|
&& b->owner->enable_state != bp_call_disabled
|
||||||
|
+ && b->owner->enable_state != bp_startup_disabled
|
||||||
|
&& b->enabled
|
||||||
|
&& !b->shlib_disabled
|
||||||
|
&& b->address == address /* address / overlay match */
|
||||||
|
@@ -4155,6 +4157,7 @@ check_duplicates_for (CORE_ADDR address,
|
||||||
|
{
|
||||||
|
if (b->owner->enable_state != bp_disabled
|
||||||
|
&& b->owner->enable_state != bp_call_disabled
|
||||||
|
+ && b->owner->enable_state != bp_startup_disabled
|
||||||
|
&& b->enabled && !b->shlib_disabled
|
||||||
|
&& b->address == address /* address / overlay match */
|
||||||
|
&& (!overlay_debugging || b->section == section)
|
||||||
|
@@ -4681,6 +4684,60 @@ disable_breakpoints_in_unloaded_shlib (s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,15 +105,7 @@
|
|||||||
static void
|
static void
|
||||||
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
create_fork_vfork_event_catchpoint (int tempflag, char *cond_string,
|
||||||
enum bptype bp_kind)
|
enum bptype bp_kind)
|
||||||
@@ -6908,6 +6963,7 @@ delete_breakpoint (struct breakpoint *bp
|
@@ -7432,6 +7489,7 @@ breakpoint_re_set_one (void *bint)
|
||||||
&& loc2->section == loc->section
|
|
||||||
&& !loc->duplicate
|
|
||||||
&& loc2->owner->enable_state != bp_disabled
|
|
||||||
+ && loc2->owner->enable_state != bp_startup_disabled
|
|
||||||
&& loc2->enabled
|
|
||||||
&& !loc2->shlib_disabled
|
|
||||||
&& loc2->owner->enable_state != bp_call_disabled)
|
|
||||||
@@ -7230,6 +7286,7 @@ breakpoint_re_set_one (void *bint)
|
|
||||||
if (not_found
|
if (not_found
|
||||||
&& (b->condition_not_parsed
|
&& (b->condition_not_parsed
|
||||||
|| (b->loc && b->loc->shlib_disabled)
|
|| (b->loc && b->loc->shlib_disabled)
|
||||||
@ -115,7 +123,7 @@
|
|||||||
bp_permanent /* There is a breakpoint instruction hard-wired into
|
bp_permanent /* There is a breakpoint instruction hard-wired into
|
||||||
the target's code. Don't try to write another
|
the target's code. Don't try to write another
|
||||||
breakpoint instruction on top of it, or restore
|
breakpoint instruction on top of it, or restore
|
||||||
@@ -818,6 +819,10 @@ extern void remove_thread_event_breakpoi
|
@@ -827,6 +828,10 @@ extern void remove_thread_event_breakpoi
|
||||||
|
|
||||||
extern void disable_breakpoints_in_shlibs (void);
|
extern void disable_breakpoints_in_shlibs (void);
|
||||||
|
|
||||||
@ -128,7 +136,7 @@
|
|||||||
|
|
||||||
--- gdb/dwarf2read.c
|
--- gdb/dwarf2read.c
|
||||||
+++ gdb/dwarf2read.c
|
+++ gdb/dwarf2read.c
|
||||||
@@ -1222,7 +1222,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
@@ -1256,7 +1256,7 @@ dwarf2_build_psymtabs (struct objfile *o
|
||||||
else
|
else
|
||||||
dwarf2_per_objfile->loc_buffer = NULL;
|
dwarf2_per_objfile->loc_buffer = NULL;
|
||||||
|
|
||||||
@ -139,7 +147,7 @@
|
|||||||
{
|
{
|
||||||
--- gdb/elfread.c
|
--- gdb/elfread.c
|
||||||
+++ gdb/elfread.c
|
+++ gdb/elfread.c
|
||||||
@@ -644,7 +644,7 @@ elf_symfile_read (struct objfile *objfil
|
@@ -678,7 +678,7 @@ elf_symfile_read (struct objfile *objfil
|
||||||
/* If we are reinitializing, or if we have never loaded syms yet,
|
/* If we are reinitializing, or if we have never loaded syms yet,
|
||||||
set table to empty. MAINLINE is cleared so that *_read_psymtab
|
set table to empty. MAINLINE is cleared so that *_read_psymtab
|
||||||
functions do not all also re-initialize the psymbol table. */
|
functions do not all also re-initialize the psymbol table. */
|
||||||
@ -150,7 +158,7 @@
|
|||||||
mainline = 0;
|
mainline = 0;
|
||||||
--- gdb/infrun.c
|
--- gdb/infrun.c
|
||||||
+++ gdb/infrun.c
|
+++ gdb/infrun.c
|
||||||
@@ -2267,6 +2267,11 @@ process_event_stop_test:
|
@@ -1806,6 +1806,11 @@ handle_inferior_event (struct execution_
|
||||||
#endif
|
#endif
|
||||||
target_terminal_inferior ();
|
target_terminal_inferior ();
|
||||||
|
|
||||||
@ -164,16 +172,16 @@
|
|||||||
and place breakpoints in initializer routines for
|
and place breakpoints in initializer routines for
|
||||||
--- gdb/objfiles.c
|
--- gdb/objfiles.c
|
||||||
+++ gdb/objfiles.c
|
+++ gdb/objfiles.c
|
||||||
@@ -48,6 +48,8 @@
|
@@ -50,6 +50,8 @@
|
||||||
#include "dictionary.h"
|
|
||||||
#include "source.h"
|
|
||||||
#include "addrmap.h"
|
#include "addrmap.h"
|
||||||
|
#include "arch-utils.h"
|
||||||
|
#include "exec.h"
|
||||||
+#include "auxv.h"
|
+#include "auxv.h"
|
||||||
+#include "elf/common.h"
|
+#include "elf/common.h"
|
||||||
|
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
|
|
||||||
@@ -260,7 +262,16 @@ init_entry_point_info (struct objfile *o
|
@@ -278,7 +280,16 @@ init_entry_point_info (struct objfile *o
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
entry_point_address (void)
|
entry_point_address (void)
|
||||||
{
|
{
|
||||||
@ -201,7 +209,7 @@
|
|||||||
|
|
||||||
#include "gdb_assert.h"
|
#include "gdb_assert.h"
|
||||||
|
|
||||||
@@ -246,8 +247,6 @@ static char *debug_loader_name;
|
@@ -280,8 +281,6 @@ static char *debug_loader_name;
|
||||||
|
|
||||||
/* Local function prototypes */
|
/* Local function prototypes */
|
||||||
|
|
||||||
@ -210,7 +218,7 @@
|
|||||||
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
|
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -353,6 +352,8 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
@@ -387,6 +386,8 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||||
Elf32_External_Dyn *x_dynp_32;
|
Elf32_External_Dyn *x_dynp_32;
|
||||||
Elf64_External_Dyn *x_dynp_64;
|
Elf64_External_Dyn *x_dynp_64;
|
||||||
struct bfd_section *sect;
|
struct bfd_section *sect;
|
||||||
@ -219,7 +227,7 @@
|
|||||||
|
|
||||||
if (abfd == NULL)
|
if (abfd == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -360,11 +361,20 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
@@ -394,11 +395,20 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||||
if (arch_size == -1)
|
if (arch_size == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -240,7 +248,7 @@
|
|||||||
|
|
||||||
/* Read in .dynamic from the BFD. We will get the actual value
|
/* Read in .dynamic from the BFD. We will get the actual value
|
||||||
from memory later. */
|
from memory later. */
|
||||||
@@ -404,7 +414,7 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
@@ -438,7 +448,7 @@ scan_dyntag (int dyntag, bfd *abfd, CORE
|
||||||
gdb_byte ptr_buf[8];
|
gdb_byte ptr_buf[8];
|
||||||
CORE_ADDR ptr_addr;
|
CORE_ADDR ptr_addr;
|
||||||
|
|
||||||
@ -249,14 +257,14 @@
|
|||||||
if (target_read_memory (ptr_addr, ptr_buf, arch_size / 8) == 0)
|
if (target_read_memory (ptr_addr, ptr_buf, arch_size / 8) == 0)
|
||||||
dyn_ptr = extract_typed_address (ptr_buf,
|
dyn_ptr = extract_typed_address (ptr_buf,
|
||||||
builtin_type_void_data_ptr);
|
builtin_type_void_data_ptr);
|
||||||
@@ -740,9 +750,55 @@ svr4_current_sos (void)
|
@@ -793,11 +803,55 @@ svr4_current_sos (void)
|
||||||
does have a name, so we can no longer use a missing name to
|
|
||||||
decide when to ignore it. */
|
decide when to ignore it. */
|
||||||
if (IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
|
if (IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0)
|
||||||
- free_so (new);
|
{
|
||||||
+ {
|
|
||||||
+ /* It is the first link map entry, i.e. it is the main
|
+ /* It is the first link map entry, i.e. it is the main
|
||||||
+ executable. */
|
+ executable. */
|
||||||
|
main_lm_addr = new->lm_info->lm_addr;
|
||||||
|
- free_so (new);
|
||||||
+ if (bfd_get_start_address (exec_bfd) == entry_point_address ())
|
+ if (bfd_get_start_address (exec_bfd) == entry_point_address ())
|
||||||
+ {
|
+ {
|
||||||
+ /* Non-pie case, main executable has not been relocated. */
|
+ /* Non-pie case, main executable has not been relocated. */
|
||||||
@ -293,7 +301,7 @@
|
|||||||
+ *link_ptr = new;
|
+ *link_ptr = new;
|
||||||
+ link_ptr = &new->next;
|
+ link_ptr = &new->next;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
+ /* This is not the first link map entry, i.e. is not the main
|
+ /* This is not the first link map entry, i.e. is not the main
|
||||||
@ -306,7 +314,7 @@
|
|||||||
int errcode;
|
int errcode;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
|
||||||
@@ -760,10 +816,8 @@ svr4_current_sos (void)
|
@@ -804,10 +860,8 @@ svr4_current_sos (void)
|
||||||
}
|
}
|
||||||
xfree (buffer);
|
xfree (buffer);
|
||||||
|
|
||||||
@ -319,7 +327,7 @@
|
|||||||
free_so (new);
|
free_so (new);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -862,24 +916,6 @@ svr4_fetch_objfile_link_map (struct objf
|
@@ -906,24 +960,6 @@ svr4_fetch_objfile_link_map (struct objf
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +352,7 @@
|
|||||||
/* Return 1 if PC lies in the dynamic symbol resolution code of the
|
/* Return 1 if PC lies in the dynamic symbol resolution code of the
|
||||||
SVR4 run time loader. */
|
SVR4 run time loader. */
|
||||||
static CORE_ADDR interp_text_sect_low;
|
static CORE_ADDR interp_text_sect_low;
|
||||||
@@ -1369,6 +1405,8 @@ svr4_solib_create_inferior_hook (void)
|
@@ -1466,6 +1502,8 @@ svr4_solib_create_inferior_hook (void)
|
||||||
while (stop_signal != TARGET_SIGNAL_TRAP);
|
while (stop_signal != TARGET_SIGNAL_TRAP);
|
||||||
stop_soon = NO_STOP_QUIETLY;
|
stop_soon = NO_STOP_QUIETLY;
|
||||||
#endif /* defined(_SCO_DS) */
|
#endif /* defined(_SCO_DS) */
|
||||||
@ -519,7 +527,7 @@
|
|||||||
{
|
{
|
||||||
asection *lower_sect;
|
asection *lower_sect;
|
||||||
asection *sect;
|
asection *sect;
|
||||||
@@ -976,14 +976,14 @@ new_symfile_objfile (struct objfile *obj
|
@@ -971,14 +971,14 @@ new_symfile_objfile (struct objfile *obj
|
||||||
/* If this is the main symbol file we have to clean up all users of the
|
/* If this is the main symbol file we have to clean up all users of the
|
||||||
old main symbol file. Otherwise it is sufficient to fixup all the
|
old main symbol file. Otherwise it is sufficient to fixup all the
|
||||||
breakpoints that may have been redefined by this symbol file. */
|
breakpoints that may have been redefined by this symbol file. */
|
||||||
@ -536,7 +544,7 @@
|
|||||||
{
|
{
|
||||||
breakpoint_re_set ();
|
breakpoint_re_set ();
|
||||||
}
|
}
|
||||||
@@ -1029,7 +1029,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
@@ -1024,7 +1024,7 @@ symbol_file_add_with_addrs_or_offsets (b
|
||||||
interactively wiping out any existing symbols. */
|
interactively wiping out any existing symbols. */
|
||||||
|
|
||||||
if ((have_full_symbols () || have_partial_symbols ())
|
if ((have_full_symbols () || have_partial_symbols ())
|
||||||
@ -545,7 +553,7 @@
|
|||||||
&& from_tty
|
&& from_tty
|
||||||
&& !query ("Load new symbol table from \"%s\"? ", name))
|
&& !query ("Load new symbol table from \"%s\"? ", name))
|
||||||
error (_("Not confirmed."));
|
error (_("Not confirmed."));
|
||||||
@@ -1213,6 +1213,11 @@ symbol_file_clear (int from_tty)
|
@@ -1208,6 +1208,11 @@ symbol_file_clear (int from_tty)
|
||||||
symfile_objfile->name)
|
symfile_objfile->name)
|
||||||
: !query (_("Discard symbol table? "))))
|
: !query (_("Discard symbol table? "))))
|
||||||
error (_("Not confirmed."));
|
error (_("Not confirmed."));
|
||||||
@ -557,7 +565,7 @@
|
|||||||
free_all_objfiles ();
|
free_all_objfiles ();
|
||||||
|
|
||||||
/* solib descriptors may have handles to objfiles. Since their
|
/* solib descriptors may have handles to objfiles. Since their
|
||||||
@@ -2467,6 +2472,8 @@ reread_symbols (void)
|
@@ -2469,6 +2474,8 @@ reread_symbols (void)
|
||||||
/* Discard cleanups as symbol reading was successful. */
|
/* Discard cleanups as symbol reading was successful. */
|
||||||
discard_cleanups (old_cleanups);
|
discard_cleanups (old_cleanups);
|
||||||
|
|
||||||
|
@ -6,18 +6,29 @@
|
|||||||
* top.h (readnever_symbol_files): Declare.
|
* top.h (readnever_symbol_files): Declare.
|
||||||
* main.c (captured_main): Add --readnever option.
|
* main.c (captured_main): Add --readnever option.
|
||||||
|
|
||||||
diff -ur ../gdb+dejagnu-20040607/gdb/dwarf2read.c ./gdb/dwarf2read.c
|
================================================================================
|
||||||
--- ../gdb+dejagnu-20040607/gdb/dwarf2read.c 2004-11-18 18:38:25.841030736 -0500
|
--- gdb/Makefile.in
|
||||||
+++ ./gdb/dwarf2read.c 2004-11-18 13:39:45.516334184 -0500
|
+++ gdb/Makefile.in
|
||||||
@@ -45,6 +45,7 @@
|
@@ -2101,7 +2101,7 @@ dwarf2read.o: dwarf2read.c $(defs_h) $(b
|
||||||
#include "hashtab.h"
|
$(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
|
||||||
|
$(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
|
||||||
|
$(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \
|
||||||
|
- $(cp_support_h) $(hashtab_h) $(command_h) $(gdbcmd_h) \
|
||||||
|
+ $(cp_support_h) $(hashtab_h) $(command_h) $(gdbcmd_h) $(top_h) \
|
||||||
|
$(addrmap_h) $(gdb_string_h) $(gdb_assert_h)
|
||||||
|
elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \
|
||||||
|
$(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
|
||||||
|
--- gdb/dwarf2read.c
|
||||||
|
+++ gdb/dwarf2read.c
|
||||||
|
@@ -46,6 +46,7 @@
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
|
#include "addrmap.h"
|
||||||
+#include "top.h"
|
+#include "top.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
@@ -984,7 +985,8 @@
|
@@ -1094,7 +1095,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||||
dwarf_loc_section = 0;
|
dwarf_loc_section = 0;
|
||||||
|
|
||||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
||||||
@ -26,11 +37,10 @@ diff -ur ../gdb+dejagnu-20040607/gdb/dwarf2read.c ./gdb/dwarf2read.c
|
|||||||
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is mapped across the sections and remembers the
|
/* When loading sections, we can either look for ".<name>", or for
|
||||||
diff -ur ../gdb+dejagnu-20040607/gdb/main.c ./gdb/main.c
|
--- gdb/main.c
|
||||||
--- ../gdb+dejagnu-20040607/gdb/main.c 2004-04-21 19:52:20.000000000 -0400
|
+++ gdb/main.c
|
||||||
+++ ./gdb/main.c 2004-11-18 13:07:30.000000000 -0500
|
@@ -295,6 +295,7 @@ captured_main (void *data)
|
||||||
@@ -261,6 +261,7 @@
|
|
||||||
{"xdb", no_argument, &xdb_commands, 1},
|
{"xdb", no_argument, &xdb_commands, 1},
|
||||||
{"dbx", no_argument, &dbx_commands, 1},
|
{"dbx", no_argument, &dbx_commands, 1},
|
||||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||||
@ -38,10 +48,9 @@ diff -ur ../gdb+dejagnu-20040607/gdb/main.c ./gdb/main.c
|
|||||||
{"r", no_argument, &readnow_symbol_files, 1},
|
{"r", no_argument, &readnow_symbol_files, 1},
|
||||||
{"quiet", no_argument, &quiet, 1},
|
{"quiet", no_argument, &quiet, 1},
|
||||||
{"q", no_argument, &quiet, 1},
|
{"q", no_argument, &quiet, 1},
|
||||||
diff -ur ../gdb+dejagnu-20040607/gdb/symfile.c ./gdb/symfile.c
|
--- gdb/symfile.c
|
||||||
--- ../gdb+dejagnu-20040607/gdb/symfile.c 2004-11-18 18:38:25.352105064 -0500
|
+++ gdb/symfile.c
|
||||||
+++ ./gdb/symfile.c 2004-11-18 13:19:05.000000000 -0500
|
@@ -76,6 +76,7 @@ static void clear_symtab_users_cleanup (
|
||||||
@@ -87,6 +87,7 @@
|
|
||||||
|
|
||||||
/* Global variables owned by this file */
|
/* Global variables owned by this file */
|
||||||
int readnow_symbol_files; /* Read full symbols immediately */
|
int readnow_symbol_files; /* Read full symbols immediately */
|
||||||
@ -49,10 +58,9 @@ diff -ur ../gdb+dejagnu-20040607/gdb/symfile.c ./gdb/symfile.c
|
|||||||
|
|
||||||
/* External variables and functions referenced. */
|
/* External variables and functions referenced. */
|
||||||
|
|
||||||
diff -ur ../gdb+dejagnu-20040607/gdb/top.h ./gdb/top.h
|
--- gdb/top.h
|
||||||
--- ../gdb+dejagnu-20040607/gdb/top.h 2004-01-19 14:56:02.000000000 -0500
|
+++ gdb/top.h
|
||||||
+++ ./gdb/top.h 2004-11-18 13:08:11.000000000 -0500
|
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
|
||||||
@@ -57,6 +57,7 @@
|
|
||||||
|
|
||||||
/* From random places. */
|
/* From random places. */
|
||||||
extern int readnow_symbol_files;
|
extern int readnow_symbol_files;
|
||||||
|
225
watchpoints.diff
225
watchpoints.diff
@ -1,225 +0,0 @@
|
|||||||
2008-04-23 Andreas Schwab <schwab@suse.de>
|
|
||||||
|
|
||||||
* target.h (struct target_ops): Add
|
|
||||||
to_watchpoint_addr_within_range.
|
|
||||||
(target_watchpoint_addr_within_range): New function.
|
|
||||||
* target.c (update_current_target): Inherit
|
|
||||||
to_watchpoint_addr_within_range, defaulting to
|
|
||||||
default_watchpoint_addr_within_range.
|
|
||||||
(default_watchpoint_addr_within_range): New function.
|
|
||||||
(debug_to_watchpoint_addr_within_range): New function.
|
|
||||||
(setup_target_debug): Set to_watchpoint_addr_within_range.
|
|
||||||
* ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
|
|
||||||
New function.
|
|
||||||
(_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
|
|
||||||
* breakpoint.c (watchpoints_triggered): Use
|
|
||||||
target_watchpoint_addr_within_range.
|
|
||||||
|
|
||||||
doc/:
|
|
||||||
* gdbint.texinfo (Algorithms): Describe
|
|
||||||
target_watchpoint_addr_within_range.
|
|
||||||
|
|
||||||
Index: gdb/breakpoint.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/breakpoint.c,v
|
|
||||||
retrieving revision 1.310
|
|
||||||
diff -u -a -p -a -u -p -r1.310 gdb/breakpoint.c
|
|
||||||
--- gdb/breakpoint.c 18 Apr 2008 00:41:28 -0000 1.310
|
|
||||||
+++ gdb/breakpoint.c 23 Apr 2008 11:00:51 -0000
|
|
||||||
@@ -2552,8 +2552,9 @@ watchpoints_triggered (struct target_wai
|
|
||||||
for (loc = b->loc; loc; loc = loc->next)
|
|
||||||
/* Exact match not required. Within range is
|
|
||||||
sufficient. */
|
|
||||||
- if (addr >= loc->address
|
|
||||||
- && addr < loc->address + loc->length)
|
|
||||||
+ if (target_watchpoint_addr_within_range (¤t_target,
|
|
||||||
+ addr, loc->address,
|
|
||||||
+ loc->length))
|
|
||||||
{
|
|
||||||
b->watchpoint_triggered = watch_triggered_yes;
|
|
||||||
break;
|
|
||||||
Index: gdb/ppc-linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
|
|
||||||
retrieving revision 1.78
|
|
||||||
diff -u -a -p -a -u -p -r1.78 gdb/ppc-linux-nat.c
|
|
||||||
--- gdb/ppc-linux-nat.c 16 Jan 2008 04:48:55 -0000 1.78
|
|
||||||
+++ gdb/ppc-linux-nat.c 23 Apr 2008 11:00:52 -0000
|
|
||||||
@@ -889,6 +889,16 @@ ppc_linux_stopped_by_watchpoint (void)
|
|
||||||
return ppc_linux_stopped_data_address (¤t_target, &addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int
|
|
||||||
+ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
|
|
||||||
+ CORE_ADDR addr,
|
|
||||||
+ CORE_ADDR start, int length)
|
|
||||||
+{
|
|
||||||
+ addr &= ~7;
|
|
||||||
+ /* Check whether [start, start+length-1] intersects [addr, addr+7]. */
|
|
||||||
+ return start <= addr + 7 && start + length - 1 >= addr;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
ppc_linux_store_inferior_registers (struct regcache *regcache, int regno)
|
|
||||||
{
|
|
||||||
@@ -997,6 +1007,7 @@ _initialize_ppc_linux_nat (void)
|
|
||||||
t->to_remove_watchpoint = ppc_linux_remove_watchpoint;
|
|
||||||
t->to_stopped_by_watchpoint = ppc_linux_stopped_by_watchpoint;
|
|
||||||
t->to_stopped_data_address = ppc_linux_stopped_data_address;
|
|
||||||
+ t->to_watchpoint_addr_within_range = ppc_linux_watchpoint_addr_within_range;
|
|
||||||
|
|
||||||
t->to_read_description = ppc_linux_read_description;
|
|
||||||
|
|
||||||
Index: gdb/target.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/target.c,v
|
|
||||||
retrieving revision 1.159
|
|
||||||
diff -u -a -p -a -u -p -r1.159 gdb/target.c
|
|
||||||
--- gdb/target.c 28 Mar 2008 16:37:08 -0000 1.159
|
|
||||||
+++ gdb/target.c 23 Apr 2008 11:00:52 -0000
|
|
||||||
@@ -49,6 +49,9 @@ static void kill_or_be_killed (int);
|
|
||||||
|
|
||||||
static void default_terminal_info (char *, int);
|
|
||||||
|
|
||||||
+static int default_watchpoint_addr_within_range (struct target_ops *,
|
|
||||||
+ CORE_ADDR, CORE_ADDR, int);
|
|
||||||
+
|
|
||||||
static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
|
|
||||||
|
|
||||||
static int nosymbol (char *, CORE_ADDR *);
|
|
||||||
@@ -131,6 +134,9 @@ static int debug_to_stopped_by_watchpoin
|
|
||||||
|
|
||||||
static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
|
|
||||||
|
|
||||||
+static int debug_to_watchpoint_addr_within_range (struct target_ops *,
|
|
||||||
+ CORE_ADDR, CORE_ADDR, int);
|
|
||||||
+
|
|
||||||
static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
|
|
||||||
|
|
||||||
static void debug_to_terminal_init (void);
|
|
||||||
@@ -416,9 +422,10 @@ update_current_target (void)
|
|
||||||
INHERIT (to_insert_watchpoint, t);
|
|
||||||
INHERIT (to_remove_watchpoint, t);
|
|
||||||
INHERIT (to_stopped_data_address, t);
|
|
||||||
- INHERIT (to_stopped_by_watchpoint, t);
|
|
||||||
INHERIT (to_have_steppable_watchpoint, t);
|
|
||||||
INHERIT (to_have_continuable_watchpoint, t);
|
|
||||||
+ INHERIT (to_stopped_by_watchpoint, t);
|
|
||||||
+ INHERIT (to_watchpoint_addr_within_range, t);
|
|
||||||
INHERIT (to_region_ok_for_hw_watchpoint, t);
|
|
||||||
INHERIT (to_terminal_init, t);
|
|
||||||
INHERIT (to_terminal_inferior, t);
|
|
||||||
@@ -544,6 +551,8 @@ update_current_target (void)
|
|
||||||
de_fault (to_stopped_data_address,
|
|
||||||
(int (*) (struct target_ops *, CORE_ADDR *))
|
|
||||||
return_zero);
|
|
||||||
+ de_fault (to_watchpoint_addr_within_range,
|
|
||||||
+ default_watchpoint_addr_within_range);
|
|
||||||
de_fault (to_region_ok_for_hw_watchpoint,
|
|
||||||
default_region_ok_for_hw_watchpoint);
|
|
||||||
de_fault (to_terminal_init,
|
|
||||||
@@ -1873,6 +1882,14 @@ default_region_ok_for_hw_watchpoint (COR
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
+default_watchpoint_addr_within_range (struct target_ops *target,
|
|
||||||
+ CORE_ADDR addr,
|
|
||||||
+ CORE_ADDR start, int length)
|
|
||||||
+{
|
|
||||||
+ return addr >= start && addr < start + length;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
return_zero (void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
@@ -2440,6 +2457,23 @@ debug_to_stopped_data_address (struct ta
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
+debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
|
||||||
+ CORE_ADDR addr,
|
|
||||||
+ CORE_ADDR start, int length)
|
|
||||||
+{
|
|
||||||
+ int retval;
|
|
||||||
+
|
|
||||||
+ retval = debug_target.to_watchpoint_addr_within_range (target, addr,
|
|
||||||
+ start, length);
|
|
||||||
+
|
|
||||||
+ fprintf_filtered (gdb_stdlog,
|
|
||||||
+ "target_watchpoint_addr_within_range (0x%lx, 0x%lx, %d) = %d\n",
|
|
||||||
+ (unsigned long) addr, (unsigned long) start, length,
|
|
||||||
+ retval);
|
|
||||||
+ return retval;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
debug_to_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
|
|
||||||
{
|
|
||||||
int retval;
|
|
||||||
@@ -2782,6 +2816,7 @@ setup_target_debug (void)
|
|
||||||
current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
|
|
||||||
current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
|
|
||||||
current_target.to_stopped_data_address = debug_to_stopped_data_address;
|
|
||||||
+ current_target.to_watchpoint_addr_within_range = debug_to_watchpoint_addr_within_range;
|
|
||||||
current_target.to_region_ok_for_hw_watchpoint = debug_to_region_ok_for_hw_watchpoint;
|
|
||||||
current_target.to_terminal_init = debug_to_terminal_init;
|
|
||||||
current_target.to_terminal_inferior = debug_to_terminal_inferior;
|
|
||||||
Index: gdb/target.h
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/target.h,v
|
|
||||||
retrieving revision 1.116
|
|
||||||
diff -u -a -p -a -u -p -r1.116 gdb/target.h
|
|
||||||
--- gdb/target.h 8 Apr 2008 17:02:23 -0000 1.116
|
|
||||||
+++ gdb/target.h 23 Apr 2008 11:00:52 -0000
|
|
||||||
@@ -367,6 +367,8 @@ struct target_ops
|
|
||||||
int to_have_steppable_watchpoint;
|
|
||||||
int to_have_continuable_watchpoint;
|
|
||||||
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
|
|
||||||
+ int (*to_watchpoint_addr_within_range) (struct target_ops *,
|
|
||||||
+ CORE_ADDR, CORE_ADDR, int);
|
|
||||||
int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
|
|
||||||
void (*to_terminal_init) (void);
|
|
||||||
void (*to_terminal_inferior) (void);
|
|
||||||
@@ -1093,6 +1095,9 @@ extern int target_stopped_data_address_p
|
|
||||||
#define target_stopped_data_address_p(CURRENT_TARGET) (1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#define target_watchpoint_addr_within_range(target, addr, start, length) \
|
|
||||||
+ (*target.to_watchpoint_addr_within_range) (target, addr, start, length)
|
|
||||||
+
|
|
||||||
extern const struct target_desc *target_read_description (struct target_ops *);
|
|
||||||
|
|
||||||
/* Command logging facility. */
|
|
||||||
--- gdb/doc/gdbint.texinfo.~1.281.~ 2008-04-22 11:46:53.000000000 +0200
|
|
||||||
+++ gdb/doc/gdbint.texinfo 2008-04-23 12:01:04.000000000 +0200
|
|
||||||
@@ -9,7 +9,7 @@
|
|
||||||
@ifinfo
|
|
||||||
This file documents the internals of the GNU debugger @value{GDBN}.
|
|
||||||
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001,
|
|
||||||
- 2002, 2003, 2004, 2005, 2006
|
|
||||||
+ 2002, 2003, 2004, 2005, 2006, 2008
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
Contributed by Cygnus Solutions. Written by John Gilmore.
|
|
||||||
Second Edition by Stan Shebs.
|
|
||||||
@@ -743,10 +743,19 @@ target's watchpoint indication is sticky
|
|
||||||
resuming, this method should clear it. For instance, the x86 debug
|
|
||||||
control register has sticky triggered flags.
|
|
||||||
|
|
||||||
+@findex target_watchpoint_addr_within_range
|
|
||||||
+@item target_watchpoint_addr_within_range (@var{addr}, @var{start}, @var{length})
|
|
||||||
+Check whether @var{addr} (as returned by @code{target_stopped_data_address}x)
|
|
||||||
+lies within the hardware-defined watchpoint region described by
|
|
||||||
+@var{start} and @var{length}. This only needs to be provided if the
|
|
||||||
+granularity of a watchpoint is greater than one byte, i.e., if the
|
|
||||||
+watchpoint can also trigger on nearby addresses outside of the watched
|
|
||||||
+region.
|
|
||||||
+
|
|
||||||
@findex HAVE_STEPPABLE_WATCHPOINT
|
|
||||||
@item HAVE_STEPPABLE_WATCHPOINT
|
|
||||||
If defined to a non-zero value, it is not necessary to disable a
|
|
||||||
-watchpoint to step over it. Like @code{gdbarch_have_nonsteppable_watchpoint},
|
|
||||||
+watchpoint to step over it. Like @code{gdbarch_have_nonsteppable_watchpoint},
|
|
||||||
this is usually set when watchpoints trigger at the instruction
|
|
||||||
which will perform an interesting read or write. It should be
|
|
||||||
set if there is a temporary disable bit which allows the processor
|
|
Loading…
x
Reference in New Issue
Block a user