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]
Other format: [Raw text]

GDB and C++: handling of POD/non-POD objects


Hi all,

I am working on C++ support in our GDB port, and
currently fixing bugs with the handling of how
objects are returned by function called "by hand".

Our compiler conforms to the common vendor ABI,
and I have to distinguish POD and non-POD objects.
For the latter, a hidden parameter is supplied
by the caller, which is a pointer to a memory
area to store the return value.

I have looked in GDB how POD and non-POD objects
are handled and found only a few lines in the
AMD64 port. I have to mention that it looks buggy,
as non-POD objects are equivalent to objects
which have base classes, which is not the right
definition.

I am surprised that no other target already has
code to handle this: is it because every other
target always needs the hidden pointer parameter
to handle object return, whether POD or non-POD?

I guess I will have to write my own code.

Regards,

Christophe.


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