2

Learning disassably and debugging with GDB, and for weeks I have not succeeded to solve problem with adjusting gdb to print human readable format data, I assume it is connected to charset option in gdb.

(gdb) show charset
The host character set is "auto; currently UTF-8".
The target character set is "auto; currently UTF-8".
The target wide character set is "auto; currently UTF-32".

While debugging different programs I get data printed in gdb as:

(gdb) whatis m_transfers[0].m_key_image.data 
type = char [32]
(gdb) p m_transfers[0].m_key_image.data 
$4 = "\224\331\366\232\237ȗ\216\242\374G\376\264\006\224P`/S\242\063\343i˲/\302I\237v\031\300"

(gdb) whatis m_transfers[0].m_txid.data
type = char [32]
p m_transfers[0].m_txid.data
$5 = "%h\\225\n\262\217_\267O\321z\334V\213\b\300s\257\242\365_\372\202%5\375\275@\251\312#"

Have tried different setting without success. Internet and reading GBD documetation has not helped me so far to get "%h\\225\n\262\217_\267O\321z\334V\213\b\300s\257\242\365_\372\202%5\375\275@\251\312#" printed in format that makes more sense.

Any suggestions are welcome.

SLaski
  • 21
  • 1

0 Answers0