diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2008-08-09 18:21:59 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2008-08-09 18:21:59 +0000 |
commit | 7be67755523dad8c86b7d169435c312c02172a6e (patch) | |
tree | 118038e28d2c6d65a5e642f0c8e71a459ad678a6 /gdb/solib-pa64.c | |
parent | e0c621985547f16d502a707ca8fca082579ca0a7 (diff) | |
download | gdb-7be67755523dad8c86b7d169435c312c02172a6e.zip gdb-7be67755523dad8c86b7d169435c312c02172a6e.tar.gz gdb-7be67755523dad8c86b7d169435c312c02172a6e.tar.bz2 |
* solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
DT_HP_DEBUG_PRIVATE. Add warning if DT_HP_DEBUG_PRIVATE is not set.
Revise comment.
(pa64_current_sos): Remove map private warning warning.
* solib-som.c: Include string.h and sys/utsname.h.
(get_hpux_major_release): New function.
(som_solib_create_inferior_hook): Read dynamic linker header. Warn
about shared library private mapping on HP-UX 11 and later. Only force
private mapping of shared libraries on HP-UX 10 and earlier.
(link_map_start): Delete warning.
Diffstat (limited to 'gdb/solib-pa64.c')
-rw-r--r-- | gdb/solib-pa64.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c index af04b4d..772b5dfc 100644 --- a/gdb/solib-pa64.c +++ b/gdb/solib-pa64.c @@ -322,13 +322,12 @@ bfd_lookup_symbol (bfd *abfd, char *symname) to tell the dynamic linker that a private copy of the library is needed (so GDB can set breakpoints in the library). - We need to set two flag bits in this routine. - - DT_HP_DEBUG_PRIVATE to indicate that shared libraries should be - mapped private. - - DT_HP_DEBUG_CALLBACK to indicate that we want the dynamic linker to - call the breakpoint routine for significant events. */ + We need to set DT_HP_DEBUG_CALLBACK to indicate that we want the + dynamic linker to call the breakpoint routine for significant events. + We used to set DT_HP_DEBUG_PRIVATE to indicate that shared libraries + should be mapped private. However, this flag can be set using + "chatr +dbg enable". Not setting DT_HP_DEBUG_PRIVATE allows debugging + with shared libraries mapped shareable. */ static void pa64_solib_create_inferior_hook (void) @@ -360,8 +359,15 @@ pa64_solib_create_inferior_hook (void) if (! read_dynamic_info (shlib_info, &dld_cache)) error (_("Unable to read the .dynamic section.")); + /* If the libraries were not mapped private, warn the user. */ + if ((dld_cache.dld_flags & DT_HP_DEBUG_PRIVATE) == 0) + warning + (_("Private mapping of shared library text was not specified\n" + "by the executable; setting a breakpoint in a shared library which\n" + "is not privately mapped will not work. See the HP-UX 11i v3 chatr\n" + "manpage for methods to privately map shared library text.")); + /* Turn on the flags we care about. */ - dld_cache.dld_flags |= DT_HP_DEBUG_PRIVATE; dld_cache.dld_flags |= DT_HP_DEBUG_CALLBACK; status = target_write_memory (dld_cache.dld_flags_addr, (char *) &dld_cache.dld_flags, @@ -454,12 +460,6 @@ pa64_current_sos (void) if (! read_dld_descriptor ()) return NULL; - /* If the libraries were not mapped private, warn the user. */ - if ((dld_cache.dld_flags & DT_HP_DEBUG_PRIVATE) == 0) - warning (_("The shared libraries were not privately mapped; setting a\n" - "breakpoint in a shared library will not work until you rerun " - "the program.\n")); - for (dll_index = -1; ; dll_index++) { struct load_module_desc dll_desc; |