Latest GDB version problems

dennis luehring dl.soluz at gmx.net
Sat Jun 1 23:08:15 PDT 2013


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"
>



More information about the Digitalmars-d-learn mailing list