Index: gdb/frame.c |
diff --git a/gdb/frame.c b/gdb/frame.c |
index b7698733c2aea38d1a2b0c1329325980c5008521..4866d730356f6c5a80efd3d76a2e3e36c37186df 100644 |
--- a/gdb/frame.c |
+++ b/gdb/frame.c |
@@ -448,6 +448,7 @@ int |
frame_id_eq (struct frame_id l, struct frame_id r) |
{ |
int eq; |
+ const uint32_t max_addr = (uint32_t) -1; |
if (!l.stack_addr_p && l.special_addr_p |
&& !r.stack_addr_p && r.special_addr_p) |
@@ -461,7 +462,12 @@ frame_id_eq (struct frame_id l, struct frame_id r) |
/* Like a NaN, if either ID is invalid, the result is false. |
Note that a frame ID is invalid iff it is the null frame ID. */ |
eq = 0; |
- else if (l.stack_addr != r.stack_addr) |
+ /* Hack for PNaCl support. Due to base address hiding |
+ stack_addr may differ by base address. This creates false |
+ positives for normal 64-bit mode, so we need to find a better way. */ |
+ else if ((l.stack_addr != r.stack_addr && l.stack_addr > max_addr |
+ && r.stack_addr > max_addr) |
+ || (uint32_t)l.stack_addr != (uint32_t)r.stack_addr) |
eaeltsin
2013/08/07 18:03:38
Do we have any way to figure out we are in NaCl vs
|
/* If .stack addresses are different, the frames are different. */ |
eq = 0; |
else if (l.code_addr_p && r.code_addr_p && l.code_addr != r.code_addr) |