And still, gdb doesn't recognize D strings. Thanks for the Macro!
Am 02.06.2013 08:08, schrieb dennis luehring: > the post ist more than 3 years old > > Am 02.06.2013 07:04, schrieb sha0coder: >>>> (gdb) p s >>>> $1 = 578159222890430469 >>>> >>>> No luck :( >>> >>> try this: >>> >>> (gdb) x/dwx &mystirng >>> 0xbffff4f4: 0x0000003c <- size of string >>> (gdb) >>> 0xbffff4f8: 0xb7ca2540 <- ptr to the string >>> >>> (gdb) x/s 0xb7ca2540 >>> 0xb7ca2540: "this is my string" >>> (gdb) >> >> add this macro to your ~/.gdbinit >> >> >> define ps >> x/s *(unsigned long *)(((char *)&$arg0)+4) >> end >> >> then you can do: >> >> (gdb) ps myString >> 0xb7ca2540: "this is my string" >> >