On Sun, 10 Aug 2008 11:12:42 +0100 (BST), John-Mark Bell wrote:
> Well, to get to that point, one of the instances of goto no_memory must
> have been hit. The only way that can happen is if something failed and
> returnet a NULL pointer. You can do print <varname> to print out the
> current value of a variable. Also make sure you're building with -O0, as
> optimisation can obfuscate things.
I've attached the output from gdb as I'm not really sure what I'm
looking for.
Chris
(gdb) next
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
231 last_success = &sentinel;
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
232 sentinel.next = 0;
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
234 charset = form_acceptable_charset(form);
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 0
trad_frame_realreg_p: 1
trad_frame_value_p: 0
alt 2, regnum: 64 realreg: 67
form_acceptable_charset (form=0x67d4d758) at render/form.c:629
629 {
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
form_acceptable_charset (form=0x67389d20) at render/form.c:632
632 if (!form)
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
635 if (!form->accept_charsets) {
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
637 if (form->document_charset)
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 1
trad_frame_realreg_p: 0
trad_frame_value_p: 0
alt 1
639 return strdup(form->document_charset);
(gdb) next
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 0
trad_frame_realreg_p: 1
trad_frame_value_p: 0
alt 2, regnum: 64 realreg: 67
0x7d2ccb04 in strdup ()
(gdb) next
Single stepping until exit from function strdup,
which has no line number information.
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
BS 00000000
Current action: 0
trad_frame_addr_p: 0
trad_frame_realreg_p: 1
trad_frame_value_p: 0
alt 2, regnum: 64 realreg: 67
BS 67288780
Current action: 3
Current action: 0
Reading symbols from /AmigaOS/Classes/requester.class...done.