[haiku-commits] r39817 - haiku/trunk/src/apps/debugger/arch

Author: anevilyak
Date: 2010-12-11 21:13:15 +0100 (Sat, 11 Dec 2010)
New Revision: 39817
Changeset: http://dev.haiku-os.org/changeset/39817

Modified:
   haiku/trunk/src/apps/debugger/arch/Architecture.cpp
Log:
- Set up correct stack pointer rule (value offset, not location offset).
- Init all registers to same value by default. gcc doesn't set up explicit CFI
  for same-value registers, so assume any register follows that rule until
  explicitly told otherwise (c.f. gdb/dwarf2-frame.c:793).



Modified: haiku/trunk/src/apps/debugger/arch/Architecture.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/arch/Architecture.cpp 2010-12-11 19:05:54 UTC 
(rev 39816)
+++ haiku/trunk/src/apps/debugger/arch/Architecture.cpp 2010-12-11 20:13:15 UTC 
(rev 39817)
@@ -73,15 +73,12 @@
                switch (registers[i].Type()) {
                        case REGISTER_TYPE_STACK_POINTER:
                        {
-                               // TODO: determine why this fails to retrieve 
the
-                               // correct values.
-//                             
context.RegisterRule(dwarfReg)->SetToLocationOffset(0);
+                               
context.RegisterRule(dwarfReg)->SetToValueOffset(0);
                                break;
                        }
                        default:
                        {
-                               if (registers[i].IsCalleePreserved())
-                                       
context.RegisterRule(dwarfReg)->SetToSameValue();
+                               
context.RegisterRule(dwarfReg)->SetToSameValue();
                                break;
                        }
                }


Other related posts:

  • » [haiku-commits] r39817 - haiku/trunk/src/apps/debugger/arch - anevilyak