This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Post mortem debugging for Windows CE


On Wednesday 06 May 2009 21:04:16, Danny Backx wrote:
> I've done a couple of tests. (See below, lengthy.) The bottom line :
> - I should have used solib-search-path the first time you told me, not
> ? after the second time :-)
> - without setting solib-search-path, the output for both live and post-
> ? mortem (minidump) sessions is a list of DLLs without address range.
> - with setting solib-search-path, the output of both live and postmortem
> ? sessions shows addresses for those DLLs found

Right, that is because GDB only shows that info if it finds
symbols for the shared library:

 From        To          Syms Read   Shared Object Library
                         No          bad.dll

                         ^^

vs:

 From        To          Syms Read   Shared Object Library
 0x01451000  0x01456044  Yes         /home/danny/tmp/arm/test/pedro/bad.dll
                         ^^^

On Wednesday 06 May 2009 21:04:16, Danny Backx wrote:
> > BTW, does "info threads" show the correct list of threads?
> 
> Not yet. The place where I found the register contents until now was not
> 'thread-safe' - there's only one set of registers there.
> 
> The only additional info I found points to memory regions that the minidump
> doesn't contain a copy of.
> 
> Further poking on MSDN reveals a table that explains the contents of "context
> dumps" (limited in size) vs. "system dumps" and "complete dumps".
> See http://msdn.microsoft.com/en-us/library/ms939598.aspx .

Ah, I see.  If the data ain't there, there's nothing we can do
about it.

> Also http://msdn.microsoft.com/en-us/library/ms939607.aspx describes
> registry settings to influence dump handling. Can't find a way to change
> the type of dump though.

I think that if you clean this up and post it, it will be nice
addition already.  You'll need the copyright assignment issues sorted
first before we can accept the code though, for binutils (bfd)
and gdb.

A few suggestions:

 - Please forgive me if you know this already.
   Your minidump bfd code should work on all hosts, 64-bit, 32-bit,
   big endian or little endian.  This means that code like:

    typedef struct FooStructureMSDefinesToBePresentInTheFile
    {
       DWORD foo;
       char b;
       int c;
    } FooStructureMSDefinesToBePresentInTheFile;

    FooStructureMSDefinesToBePresentInTheFile bar;

    read (fildes, &bar, sizeof (bar));

   ... is unacceptable.  You need to use the bfd_get_32 and friends
   to parse the data on the file.

 - Be sure to follow the coding standards:

    http://www.gnu.org/prep/standards/html_node/Formatting.html

    Standard nit-picks:

     space between function name and '('.
     double space after periods in comments.
     tabs are prefered to spaces.

 - Don't forget a ChangeLog entry.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]