the main structure is
struct my_struct
{
int x;
void* md_template;
void* md_capture_buff;
....
};
When i am doing
(gdb) p ((struct my_struct *)dev_base->next->priv)
The output is like this
$1 = {
x= 15 '\017'
md_template = ,
md_capture_buff =
}
And when i am doing it with p/x:
(gdb) p/x ((struct my_struct *)dev_base->next->priv)
The output is like this
$1 = {
x= 0xf;
md_template =0x410027001a50 ,
md_capture_buff = 0x41002c0c5490
}
In gdb-python:
python val = gdb.parse_and_eval('((struct my_struct *)dev_base->next->priv)')
python print val
The output is:
$1 = {
x= 15 '\017'
md_template = ,
md_capture_buff =
}
So how to write equivalent to p/x in gdb-python? or how to get the address of 'md_capture_buff' in python script as python val = gdb.parse_and_eval('((struct my_struct *)dev_base->next->priv)').address
is not prining the address?