User forums > Embedded development

avr-gdb debugging and disassembly window

<< < (2/2)

kenzanin:
Hi
Iam also have the same problem and i have to change this file
gdb_commands.h
-- static wxRegEx reDisassemblyInitFunc(_T("eip = (0x[A-Fa-f0-9]+) in ([^;]*)"));
++ static wxRegEx reDisassemblyInitFunc(_T("PC2 = (0x[A-Fa-f0-9]+) in ([^;]*)"));

            if(hexAddrStr.IsEmpty())
                //****NOTE: If this branch is taken, disassembly may not reflect the program's
                //actual current location.  Other areas of code will change the current (stack) frame
                //which results in $pc reflecting the eip(x86-based) of that frame.  After changing to
                //a non-top frame, a request (gdb 7.2 x86) to print either '$pc' or '$eip' will
                //return the same value.
                //So, there seems to be no way to obtain the actual current address in this (non-MI)
                //interface.  Hence, we can't get the correct disassembly (when the $pc does not
                //reflect actual current address.)  GDB itself does continue to step from the correct address, so
                //there may be some other way to obtain it yet to be found.
                m_Cmd << _T(" $pc");
            -- else if(wxT("0x") == hexAddrStr.Left(2) || wxT("0X") == hexAddrStr.Left(2))
            --  m_Cmd << wxT(" ") << hexAddrStr;
            else
       ++ m_Cmd << _T(" $pc");
            --  m_Cmd << wxT(" 0x") << hexAddrStr;

But this make pc gcc gdb fail to work
If you have other solution please let me know.
Thanks

Navigation

[0] Message Index

[*] Previous page

Go to full version