1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Speed up debugging in the context of unexpected traps by printing

the address of the image base of the loader. Given cr.iip, we can
use the symbol table to figure out what function caused the trap.
This commit is contained in:
Marcel Moolenaar 2003-03-01 05:18:28 +00:00
parent 884d549049
commit 59c9bb54ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111693
2 changed files with 12 additions and 10 deletions

View File

@ -131,12 +131,15 @@ main(int argc, CHAR16 *argv[])
efinet_init_driver();
/* Get our loaded image protocol interface structure. */
BS->HandleProtocol(IH, &imgid, (VOID**)&img);
printf("Image base: 0x%016lx\n", (u_long)img->ImageBase);
printf("\n");
printf("%s, Revision %s\n", bootprog_name, bootprog_rev);
printf("(%s, %s)\n", bootprog_maker, bootprog_date);
#if 0
printf("Memory: %ld k\n", memsize() / 1024);
#endif
/*
* XXX quick and dirty check to see if we're loaded from the
@ -144,8 +147,6 @@ main(int argc, CHAR16 *argv[])
* other cases we set the default device to 'disk'. We presume
* fixed positions in devsw for both net and disk.
*/
BS->HandleProtocol(IH, &imgid, (VOID**)&img);
status = BS->HandleProtocol(img->DeviceHandle, &netid, (VOID**)&net);
if (status == EFI_SUCCESS && net != NULL) {
currdev.d_dev = devsw[1]; /* XXX net */

View File

@ -131,12 +131,15 @@ main(int argc, CHAR16 *argv[])
efinet_init_driver();
/* Get our loaded image protocol interface structure. */
BS->HandleProtocol(IH, &imgid, (VOID**)&img);
printf("Image base: 0x%016lx\n", (u_long)img->ImageBase);
printf("\n");
printf("%s, Revision %s\n", bootprog_name, bootprog_rev);
printf("(%s, %s)\n", bootprog_maker, bootprog_date);
#if 0
printf("Memory: %ld k\n", memsize() / 1024);
#endif
/*
* XXX quick and dirty check to see if we're loaded from the
@ -144,8 +147,6 @@ main(int argc, CHAR16 *argv[])
* other cases we set the default device to 'disk'. We presume
* fixed positions in devsw for both net and disk.
*/
BS->HandleProtocol(IH, &imgid, (VOID**)&img);
status = BS->HandleProtocol(img->DeviceHandle, &netid, (VOID**)&net);
if (status == EFI_SUCCESS && net != NULL) {
currdev.d_dev = devsw[1]; /* XXX net */