0

I'm debugging the Linux kernel. I can print the content of a structure like this:

(gdb) p *(struct rb_node*)0xffff88813b160388
 $6 = {
 __rb_parent_color = 1, 
 rb_right = 0xffff88813b31a5c8, 
 rb_left = 0xffff88813b1608c8
}

Instead of printing the whole structure content, I'm trying to print a particular value of a structure. For example, something like, rb_right = 0xffff88813b31a5c8. I try the following way, it shows me an error, I'm not quite sure if this is the right approach or not.

(gdb) p *((struct rb_node*)rb_right) 0xffff88813b160388
 No symbol "rb_right" in current context.

Please help.

1 Answer 1

1

It's a structure, use C syntax:

p (*(struct rb_node*) 0xffff88813b160388).rb_right
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.