This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] Report the main thread.


 > >  > struct thread_info is defined in gdbthread.h. What prevents you from
 > >  > including that header?
 > > 
 > > I think the idea is not to expose the internals to other parts of the code.
 > 
 > There's nothing in gdbthread.h to indicate that, I think.

It's not specific to gdbthread.h but a general principle.  Look at varobj.h.
It just declares struct varobj (without it's members) which means that all
the setters and getters (varobj_set/get_*) need to be defined in varobj.c
for mi-cmd-var.c to access the members.  I guess it's a poor man's data
encapsulation.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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