Hi,
So what is the status of gdb?
It seems to work with Pascal, but it does not seem to be able to display String()'s and I could not figure out how to use "call" to call CFShow (Apple says:
call (void)CFShow(cf)
but that just gives a syntax error). (CFShow is a debugging routine that prints out the decoded value of the input parameter).
And print S gives:
$1 = (&$$1 = record ) @$bffff7c0: <incomplete type>
Thanks, Peter.
Peter N Lewis a écrit:
Hi,
So what is the status of gdb?
It seems to work with Pascal, but it does not seem to be able to display String()'s and I could not figure out how to use "call" to call CFShow (Apple says:
call (void)CFShow(cf)
but that just gives a syntax error). (CFShow is a debugging routine that prints out the decoded value of the input parameter).
And print S gives:
$1 = (&$$1 = record ) @$bffff7c0: <incomplete type>
To print strings I frequently use an explicit type cast print WrkString(S) (actually it is under rhide, but I suppose it translates this way to gdb).
Maurice
BTW I use stabs debugging
Peter N Lewis wrote:
So what is the status of gdb?
It seems to work with Pascal, but it does not seem to be able to display String()'s and I could not figure out how to use "call" to call CFShow (Apple says:
call (void)CFShow(cf)
but that just gives a syntax error). (CFShow is a debugging routine that prints out the decoded value of the input parameter).
I suppose that's because of the Pascal syntax activated (so `(void)' isn't accepted). But I think just `call CFShow (cf)' should work (if CFShow is a routine, of course).
And print S gives:
$1 = (&$$1 = record ) @$bffff7c0: <incomplete type>
If this happens for string parameters and pointers, not for plain variables, then at least I've identified the problem in GPC now, but it may be hard to fix.
dbxout.c says: "No way in DBX fmt to describe a variable size." Provided that's correct, and DBX (= stabs, AFAIK) is the only available debugging format (dwarf2 still seems to confuse gdb, AFAIK), we have a problem, since e.g. a parameter of type `String' (without discriminant) does have a variable size.
Now, in the special case of strings we could perhaps "lie" to the debug info (because the size is not really needed there, I think -- the length is used for printing, and the field offsets are constant). For some other schema types, this won't work. The problem is that debug info is generated by the backend, so we'd have to lie to the backend and be careful not to cause other problems in the process. So it might be tricky ...
Frank
Frank Heckenbach a écrit:
Peter N Lewis wrote:
So what is the status of gdb?
It seems to work with Pascal, but it does not seem to be able to display String()'s and I could not figure out how to use "call" to call CFShow (Apple says:
call (void)CFShow(cf)
but that just gives a syntax error). (CFShow is a debugging routine that prints out the decoded value of the input parameter).
I suppose that's because of the Pascal syntax activated (so `(void)' isn't accepted). But I think just `call CFShow (cf)' should work (if CFShow is a routine, of course).
And print S gives:
$1 = (&$$1 = record ) @$bffff7c0: <incomplete type>
If this happens for string parameters and pointers, not for plain variables, then at least I've identified the problem in GPC now, but it may be hard to fix.
dbxout.c says: "No way in DBX fmt to describe a variable size." Provided that's correct, and DBX (= stabs, AFAIK) is the only available debugging format (dwarf2 still seems to confuse gdb, AFAIK), we have a problem, since e.g. a parameter of type `String' (without discriminant) does have a variable size.
So this explains why the trick I usually use to display a string, typecast to a string type of fixed size, actually works.
Maurice