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

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..2df99c7d0a136b365433a0667c56064e10cf2328 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;
+ uint32_t max_addr = (uint32_t) -1;
eaeltsin 2013/08/06 18:14:42 const or #define? if you use this for &, then eit
halyavin 2013/08/07 08:04:25 I used conversion instead of &.
if (!l.stack_addr_p && l.special_addr_p
&& !r.stack_addr_p && r.special_addr_p)
@@ -461,7 +462,9 @@ 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)
+ else if ((l.stack_addr != r.stack_addr && l.stack_addr > max_addr
+ && r.stack_addr > max_addr)
+ || (l.stack_addr & max_addr) != (r.stack_addr & max_addr))
eaeltsin 2013/08/06 18:14:42 This definitely needs a comment, explaining what t
halyavin 2013/08/07 08:04:25 One value is read from the stack, the other is rea
/* 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