aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-02-04 22:54:41 +0000
committerDoug Evans <dje@google.com>2010-02-04 22:54:41 +0000
commit48379de60be44f30b57a463d6f66d23c9568a0d5 (patch)
tree96f8f46611447c7f4f39b60bbbcacce503e267fc /gdb
parentfd87baa91eea302a5cf8230e51b8b173235ec727 (diff)
downloadgdb-48379de60be44f30b57a463d6f66d23c9568a0d5.zip
gdb-48379de60be44f30b57a463d6f66d23c9568a0d5.tar.gz
gdb-48379de60be44f30b57a463d6f66d23c9568a0d5.tar.bz2
* solib-svr4.c (enable_break): Add comment.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/solib-svr4.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1248c2d..4fda810 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-04 Doug Evans <dje@google.com>
+
+ * solib-svr4.c (enable_break): Add comment.
+
2010-02-04 Anthony Green <green@moxielogic.com>
* moxie-tdep.c (moxie_analyze_prologue): Fail protocol analysis
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 5689bf3..2833ed1 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1318,6 +1318,25 @@ enable_break (struct svr4_info *info, int from_tty)
sym_addr,
&current_target));
+ /* On at least some versions of Solaris there's a dynamic relocation
+ on _r_debug.r_brk and SYM_ADDR may not be relocated yet, e.g., if
+ we get control before the dynamic linker has self-relocated.
+ Check if SYM_ADDR is in a known section, if it is assume we can
+ trust its value. This is just a heuristic though, it could go away
+ or be replaced if it's getting in the way.
+
+ On ARM we need to know whether the ISA of rtld_db_dlactivity (or
+ however it's spelled in your particular system) is ARM or Thumb.
+ That knowledge is encoded in the address, if it's Thumb the low bit
+ is 1. However, we've stripped that info above and it's not clear
+ what all the consequences are of passing a non-addr_bits_remove'd
+ address to create_solib_event_breakpoint. The call to
+ find_pc_section verifies we know about the address and have some
+ hope of computing the right kind of breakpoint to use (via
+ symbol info). It does mean that GDB needs to be pointed at a
+ non-stripped version of the dynamic linker in order to obtain
+ information it already knows about. Sigh. */
+
os = find_pc_section (sym_addr);
if (os != NULL)
{