Code::Blocks

User forums => Embedded development => Topic started by: phamtv on July 01, 2014, 12:02:00 am

Title: modifying register list in CPU register window
Post by: phamtv on July 01, 2014, 12:02:00 am
Hi, 

I am working on integrating a custom compiler and debugger for our embedded device into C::B.  My debugger returns the correct list of registers I provided through the command set tdesc filename (xml file) when I use the info all-reg command.  I am wondering how I can remove the default CPU registers and get the registers, that I provided, to populate in the CPU registers dialog.  Thanks in advance for your time and support.

Title: Re: modifying register list in CPU register window
Post by: oBFusCATed on July 01, 2014, 01:43:52 am
Are you doing a debugger plugin from scratch or are you modifying the current gdb/cdb debugger plugin?
(I guess it is the latter, because if it was the former you wouldn't have asked the question)
Title: Re: modifying register list in CPU register window
Post by: phamtv on July 01, 2014, 01:33:38 pm
Hi oBFusCATed,

We modified a gdb debugger.  Just to mention, everything seem to be working properly.  We got our compiler to build our embedded application and we're able to load the elf file to the device. What I am trying to do is get the registers I have defined to show up in the CPU register window.  What I am currently seeing in the CPU registers are the default registers (I think).  I would like to get rid of these registers and have the window populate the list I provided and verified when I manually send the command info all-registers.  I notice that when I bring up the CPU registers, that same command is being sent and the response I get is what I expect.  I am just not sure how to modify the CPU register window.  Do I have to create a plugin?  Are there samples you can point me to?  Please advise.

Best regards.
Title: Re: modifying register list in CPU register window
Post by: oBFusCATed on July 01, 2014, 09:23:51 pm
CPU regiosters window doesn't know about registers.
It just displays what the plugin has specified.
See where CPURegistersDlg::SetRegisterValue is being called.