Mail Archives: djgpp/2012/11/19/14:45:15
On 18 Nov., 22:24, Eli Zaretskii <e DOT DOT DOT AT gnu DOT org> wrote:
> > Date: Sun, 18 Nov 2012 21:40:05 +0100
> > From: Juan Manuel Guerrero <juan DOT guerr DOT DOT DOT AT gmx DOT de>
> > CC: dj DOT DOT DOT AT delorie DOT com
>
> > > . what happens if you set a breakpoint not at entry to
> > > __crt1_startup, but on the line that calls 'setup_environment'?
> > > You can still see how djgpp.env is parsed, but all the critical
> > > setup should be already done, so maybe you won't crash NTVDM.
> > It crashes always no matter what I do.
> > If I set the breakpoint at setup_environment();
> > and quit then, it crashes.
> > If I stop there and continue one line more and quit
> > then, it crashes.
> > If I set the breakpoint at exit(main(__crt0_argc, __crt0_argv, _environ));
> > and quit then, it crashes.
>
> And if you set a breakpoint inside some other function, that is called
> directly or indirectly from 'main', does it crash then? If it does,
> then you are actually saying that you cannot debug ld.exe, and maybe
> other programs as well, without crashing NTVDM, is that right?
Yes.
I have freshly installed gcc401b, bnu219, gdb64b and djdev204. I
started
the installed ld.exe with the control file I posted elsewhere. I
disabled _all_
entries except the r command without omiting any options but
adjusting
them to reflect the installed binaries. Because there are no
breakpoints
the program runs until it successfully finished. A working binary is
produced,
but when I quit GDB it crashes NTVDM the same way as described before.
The surprising fact is that GDB works flawlessly executing ld.exe
as soon as I copy ld.exe into the working directory. I other words,
I used to start the debug session like this:
gdb c:/djgpp-2.04/bin/ld.exe
This makes crash NTVDM when leaving GDB. As soon as I copy ld into
the working directory containing the object file that shall be linked
(this is 1.o
of the sample program posted else where) I can start the GDB session
like
this:
gdb ld.exe
and it works. I have also tried to start like this:
gdb c:\djgpp-2.04\bin\ld.exe
but it crashes the same way.
It does not heart me to much because I can step through the code to
investigate what I want to investigate.
If more info is needed please let me know.
Regards,
Juan M. Guerrero
- Raw text -