Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: gdb/frame.c

Issue 22399003: Fix finish command for PNaCl. (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698