[Crash-utility] PRE_GDB/POST_GDB initialization?

anderson at prospeed.net anderson at prospeed.net
Fri Sep 26 19:28:06 UTC 2008


> Hi,
>
> We are doing some initializations in 2 phases: pre-gdb and post-gdb.
> Why is that necessary? Can we do that in 1 phase only?

No.

>
> I guess the post-init step is needed because it cannot be done before
> gdb is initialized, which is of course done between pre-gdb and
> post-gdb. I looked at the code, but dont see anything special that can
> answer this question. But I am sure that I missed something there. Any
> pointer?
>

Look at main().  The things that are done in the per-arch PRE_GDB
machdep_init() functions are required for things like virtual-to-physical
address translation of unity-mapped kernel virtual addresses.  Without
doing them first, read_in_kernel_config() and/or kernel_init() could not
run at all, which is where the first readmem() calls are made.  Later on,
after gdb has run, further datatype-specific information is gathered in
the POST_GDB sections.

Dave Anderson


> Many thanks,
> J
>
>
>
> ------------------------------
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
>
> End of Crash-utility Digest, Vol 36, Issue 19
> *********************************************
>





More information about the Crash-utility mailing list