aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2007-09-03 23:06:35 +0000
committerPedro Alves <palves@redhat.com>2007-09-03 23:06:35 +0000
commitde584861439dac10f422843cf2bf85d0ff4ad628 (patch)
tree56c67d72c95e69c0ebb4bcf43b3fa15ead551204 /gdb/gdbarch.c
parent7160c4c357f1e15085c0cd6c9d56b5035f356f6e (diff)
downloadgdb-de584861439dac10f422843cf2bf85d0ff4ad628.zip
gdb-de584861439dac10f422843cf2bf85d0ff4ad628.tar.gz
gdb-de584861439dac10f422843cf2bf85d0ff4ad628.tar.bz2
* gdbarch.sh (core_xfer_shared_libraries): New.
* corelow.c (core_xfer_partial): Handle TARGET_OBJECT_LIBRARIES. * gdb_obstack.h (obstack_grow_str, obstack_grow_str0): New. * xml-support.c (gdb_xml_parse): Debug output tweaks. (xml_escape_text): New. * xml-support.h (xml_escape_text): Declare. * config/i386/cygwin.mh (NATDEPFILES): Move corelow.o to ... * config/i386/cygwin.mt (TDEPFILES): ... here. * win32-nat.c: (fetch_elf_core_registers): Delete. (win32_elf_core_fn): Delete. (_initialize_core_win32): Delete. * i386-cygwin-tdep.c: Include "regset.h", "gdb_objstack.h", "xml-support.h" and "gdbcore.h". (i386_win32_gregset_reg_offset): New. (I386_WIN32_SIZEOF_GREGSET): New. (i386_win32_regset_from_core_section): New. (win32_xfer_shared_library): New. (struct cpms_data): New. (core_process_module_section): New. (win32_core_xfer_shared_libraries): New. (i386_cygwin_skip_trampoline_code): Register gregset_reg_offset, gregset_num_regs, sizeof_gregset members of tdep. Register regset_from_core_section and core_xfer_shared_libraries callbacks. * Makefile.in (i386-cygwin-tdep.o): Update dependencies. * gdbarch.h, gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 873a1e7..e4bcaca 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -2,7 +2,7 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GDB.
@@ -11,12 +11,12 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -225,6 +225,7 @@ struct gdbarch
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
gdbarch_regset_from_core_section_ftype *regset_from_core_section;
+ gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
int vtable_function_descriptors;
int vbit_in_delta;
gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
@@ -346,6 +347,7 @@ struct gdbarch startup_gdbarch =
default_register_reggroup_p, /* register_reggroup_p */
0, /* fetch_pointer_argument */
0, /* regset_from_core_section */
+ 0, /* core_xfer_shared_libraries */
0, /* vtable_function_descriptors */
0, /* vbit_in_delta */
0, /* skip_permanent_breakpoint */
@@ -592,6 +594,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of register_reggroup_p, invalid_p == 0 */
/* Skip verify of fetch_pointer_argument, has predicate */
/* Skip verify of regset_from_core_section, has predicate */
+ /* Skip verify of core_xfer_shared_libraries, has predicate */
/* Skip verify of vtable_function_descriptors, invalid_p == 0 */
/* Skip verify of vbit_in_delta, invalid_p == 0 */
/* Skip verify of skip_permanent_breakpoint, has predicate */
@@ -711,6 +714,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
"gdbarch_dump: convert_register_p = <0x%lx>\n",
(long) current_gdbarch->convert_register_p);
fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
+ gdbarch_core_xfer_shared_libraries_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: core_xfer_shared_libraries = <0x%lx>\n",
+ (long) current_gdbarch->core_xfer_shared_libraries);
+ fprintf_unfiltered (file,
"gdbarch_dump: decr_pc_after_break = 0x%s\n",
paddr_nz (current_gdbarch->decr_pc_after_break));
fprintf_unfiltered (file,
@@ -2887,6 +2896,30 @@ set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
}
int
+gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->core_xfer_shared_libraries != NULL;
+}
+
+LONGEST
+gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
+ return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
+}
+
+void
+set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
+ gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
+{
+ gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
+}
+
+int
gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);