This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Usually you'd use val_print.+ fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]);I do not think that this is the right way of printing the register value, by doing all the work yourself. I am not completely sure what the best solution would be, though. The other Global Maintainers may have a more definitive answer, but perhaps plongest (value_as_long (register_value)). My suggestion is a little iffy because it assumes for instance that all register values are signed / or unsigned.
rax 0x7ffff7bd5f60 140737349771104 rbx 0x0 0 rcx 0x0 0
rax 0x00007FFFF7BD5F60 rbx 0x000000000000000 rcx 0x000000000000000
How about just exporting and calling default_print_one_register_info? You get consistency with other archs for free, and unavailable values handled too.
--- Regards, Jiong
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |