User forums > Embedded development

MSP430 linux toolchain with C::B

<< < (7/7)

oBFusCATed:
No, but you can load a file.

ywi:
I found a solution using just the watch mechanism of C::B. Actually gdb will execute

--- Code: ---output ...
--- End code ---
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: ---toto
blabla
ole
--- End code ---
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: --- /x  (msp430_regs_t)*0xXXXX
--- End code ---
where 0xXXXX is the registry base. I checked that this is correctly interpreted by C::B.

Regards, Yordan

ywi:
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:
Are you aware of the .gdbinit and .mspdebug files where some presets can be made? regards, Kees

Navigation

[0] Message Index

[*] Previous page

Go to full version