This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Need help with GDB commands


Hello,

Is there a way to determine whether Class x has a member variable y at GDB 
runtime?

I want to create a script like:

define printmember
    if exists (x.y) output x.y
    .....
end

In other words: How can I get rid of that "No symbol y in current context" 
and just output the right member?

Harry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]