[ipxe-devel] GDB remote debugging on relocated iPXE code within virtual machine

Huy, Hermann (NSN - DE/Munich) hermann.huy at nsn.com
Tue Sep 11 08:37:09 UTC 2012


Hi Michael,

thanks a lot for your fast response and your suggestions. I tried
them out both then with following outcome: 
> -----Original Message-----
> From: ext Michael Brown [mailto:mbrown at fensystems.co.uk]
> Sent: Monday, August 13, 2012 12:59 PM
> To: ipxe-devel at ipxe.org
> Cc: Huy, Hermann (NSN - DE/Munich)
> Subject: Re: [ipxe-devel] GDB remote debugging on relocated iPXE code
> within virtual machine
> 
> 
> You may also want to try iPXE's built-in support for GDB, since that
> will show
> only the virtual addresses to GDB, and so won't require any relocation
> calculation within GDB.
Defining GDBUDP in config/local/general.h changed things drastically:
The stopping in TFTP loading did not occur any longer, linux kernel
and initrd were loaded successfully. Unfortunately this made further
debugging impossible.

> 
> As a quick check, it might be worth enabling all assertions by editing
> include/assert.h and adding a
> 
>   #undef NDEBUG
> 
> immediately before the "#ifdef NDEBUG".  This will enable assertions
> (but no
> other debug statements) in all objects, which can often catch memory-
> corruption problems.
Undefining NDEBUG did not produce any additional output.


In the meantime I worked on further correcting and improving my ixgbevf
driver code, but I am still confronted with the stopping of the TFTP
transfer
when the accumulated user data exceed 32KB. (Remarks: 1.) pxelinux.0
handles 
the TFTP layer and uses the PXE UDP interface. 2.) This happens with a
pxelinux.0 size of about 13KB).
This stopping occurs with most of my builds, but there are exceptions:
When I added for example just two DBG statements in procedure
pxe_api_call
in file arch/i386/interface/pxe/pxe_call.c the 32KB error was gone.

Furthermore it seems that size of loaded pxelinux.0 matters:
Using a pxelinux.0 of about 13KB size the iPXE/ixgbevf
runs into the 32KB error, using the very same iPXE/ixgbevf with a
pxelinux.0 of about 26KB size the code execution seems to stop
immediately after the pxelinux.0 is loaded (maybe control was handed
over to pxelinux.0 at that time).

My guess is that some kind of code corruption happens, either when a
32KB limit is exceed or by loading the bigger pxelinux.0.

Any suggestions on what to check in the area of linking, code loading
and
relocating in relation with an additional network driver are welcome!

TIA

Hermann





More information about the ipxe-devel mailing list