Author Topic: modifying register list in CPU register window  (Read 11866 times)

Offline phamtv

  • Multiple posting newcomer
  • *
  • Posts: 11
modifying register list in CPU register window
« 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.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: modifying register list in CPU register window
« Reply #1 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)
(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 phamtv

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: modifying register list in CPU register window
« Reply #2 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.
« Last Edit: July 01, 2014, 01:35:57 pm by phamtv »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: modifying register list in CPU register window
« Reply #3 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.
(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!]