Chromium Code Reviews| 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) |