User forums > General (but related to Code::Blocks)

zmm-reg in debug?

<< < (2/2)

TreeLibrarian:

--- Quote from: Miguel Gimenez on January 05, 2024, 05:54:28 pm ---The panel inside the dialog is created in cpuregistersdlg.cpp, you can access it via DebuggerManager::GetCPURegistersDialog()

Updating is done by GdbCmd_InfoRegisters::ParseOutput() or GdbCmd_InfoRegisters::ParseOutputFromOR32gdbPort() in gdb_command.h, every register matching the reRegisters regex (in gdb_commands.h) should be shown.

--- End quote ---

OK, got it. Thanks  :)

so the simple solution is just to change the "info registers" command to gdb to "info all-registers"...
...except that gdb spits out unusably much info (every possible interpretation of the register, all on one line) and I think the regex would get very confused since it's only intended to get 2 hex values per line...

so my second thought is to convert the data sent by "info vector" down to just the v8int64 version, convert to a uint64_t[] to send to the dialog, from which it can reinterpret-cast the data to whatever type is selected. (the float data interpretations given by gdb aren't actually as float text anyway, but as hex with "repeated 15 times" if they're all the same). converting to text should be done on the fly according to the selected interpretation ... that said, I'm not sure this is possible for a wxListCtrl's list items.

A simpler option would be to have 3 interpretations on 3 lines for each register: right-to-left hex (with appropriate visual division) covers all integer interpretations, then float and double, also right-to-left to align with the hex.

Any opinions?

Miguel Gimenez:
You can create a regex similar to this

--- Code: ---([xyz]*mm[0-9]+)[[:blank:]]+(.*)
--- End code ---
and try to match it before the current one. If it matches, send register name (match[1]) and whatever you want from match[2] to the list control.

The mxcsr register will be accepted by the current regex.

I do not know if sending all registers will penalty debugging performance too much, in this case a setting would be a must.

Navigation

[0] Message Index

[*] Previous page

Go to full version