Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » MSP430 MSPGCC Debugging in Eclipse: Variable miss?(Eclipse miscalculates variable addresses)
MSP430 MSPGCC Debugging in Eclipse: Variable miss? [message #708662] Wed, 03 August 2011 03:50 Go to next message
iamthemik3 is currently offline iamthemik3Friend
Messages: 2
Registered: August 2011
Junior Member
Hello all,
I have been slowly chipping away at getting MSPGCC and MSPDebug working with Eclipse and i'm 99% there except for one odd hangup. When debugging, Eclipse doesn't seem to be able to calculate the correct address for local variables (when displayed in the variables window). Global variables seem to be fine since they always have an absolute address. Local ones, which depend on the value of the stack pointer, are off by a few. (If I force a local variable into a CPU register, it works fine)
For example: lets say I declare a variable "x" in a function. Viewing how the code addresses the variable in disassembly, i deduce that the address of '"x" is 0x027A. However when i type "&x" in the expressions pane to get what Eclipse "thinks" the address is, i get 0x0286.
Otherwise, programs run completely fine. It seems like the issue is somewhere in Eclipse and that it doesn't seem to be handling the stack pointer properly when debugging.
Any ideas? I'm completely stumped
Re: MSP430 MSPGCC Debugging in Eclipse: Variable miss? [message #709048 is a reply to message #708662] Wed, 03 August 2011 12:50 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Assuming you are using DSF-GDB, it is not Eclipse that calculates the variables or their addresses, it is GDB. You can look at the requests sent to GDB to see if there is a reason GDB gives you an unexpected answer:
http://wiki.eclipse.org/CDT/User/FAQ#I.27ve_been_asked_for_.27gdb_traces.27.2C_where_can_I_find_them.3F

Marc
Re: MSP430 MSPGCC Debugging in Eclipse: Variable miss? [message #709169 is a reply to message #709048] Wed, 03 August 2011 15:29 Go to previous message
iamthemik3 is currently offline iamthemik3Friend
Messages: 2
Registered: August 2011
Junior Member
Ok thanks. Looks like I have to talk to the MSPGCC guys since they implemented their own gdb
Previous Topic:Question regarding ASTRewrite
Next Topic:No static libraries with Cross GCC?
Goto Forum:
  


Current Time: Sat Apr 27 02:43:39 GMT 2024

Powered by FUDForum. Page generated in 0.03258 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top