This is the mail archive of the gdb@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] |
Hello, ... (gdb) p sizeof(struct servent) $1 = 16
When I extract
from #2: sptr = (struct servent *) 0x804b028
from #4:
r = 0x804b030
as servent has a size of 16 bytes
804b028 + 16 = 0x804b038
These two variables seem to overlap. Do you agree?
No. ;) Maybe I'm wrong, but sptr is a pointer, so it uses 0x804b028 and 0x804b029. The memory pointed by this pointer is the one that has size 16.
Regards, Raul.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |