Author Topic: MSP430 linux toolchain with C::B  (Read 26369 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13003
    • Travis build status
Re: MSP430 linux toolchain with C::B
« Reply #30 on: May 19, 2012, 10:43:57 pm »
No, but you can load a file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ywi

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: MSP430 linux toolchain with C::B
« Reply #31 on: May 21, 2012, 05:06:47 pm »
I found a solution using just the watch mechanism of C::B. Actually gdb will execute
Code: [Select]
output ...where "..." is the content of a line of the watch file. For example when variables toto, blabla, ole are watched, the content of the watch file is
Code: [Select]
toto
blabla
ole
Now, it is possible to add more arguments in the watch file, or read absolute addresses instead of symbols. For example output /x (my_type)*0x1234 will read at address 0x1234 and interpret it as a variable of type my_type in hexadecimal. Subsequently it is possible to read remote content by 1) defining a structure containing the remote registry (let say msp430_regs_t in my case) 2) adding in a default watch file
Code: [Select]
/x  (msp430_regs_t)*0xXXXXwhere 0xXXXX is the registry base. I checked that this is correctly interpreted by C::B.

Regards, Yordan

Offline ywi

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: MSP430 linux toolchain with C::B
« Reply #32 on: May 21, 2012, 08:15:01 pm »
One (probably) last question : is it possible to automatically load a watch file at the beginning of a debug session (or project open) ?

tux-tor

  • Guest
Re: MSP430 linux toolchain with C::B
« Reply #33 on: July 08, 2012, 12:33:18 pm »
Are you aware of the .gdbinit and .mspdebug files where some presets can be made? regards, Kees