| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <002201c030af$b80e0330$1605a018@austin.rr.com> |
| From: | "Shelby Cain" <scain1 AT austin DOT rr DOT com> |
| To: | "cygwin" <cygwin AT sources DOT redhat DOT com> |
| Subject: | Creating core dumps and gdb tracing... |
| Date: | Sat, 7 Oct 2000 17:41:22 -0500 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
Consider a simple program like so:
int main()
{
char * foo = 0;
crashme(foo);
}
int crashme(char * cp);
{
strcpy(cp, "KABOOM!!");
}
Compiling and linking it under W2K using cygwin produces an executable that
does not produce a core file when it crashes. One way around this would be
to run it via gdb (ie: gdb crashme.exe) which will allow me to catch the
offending statement. However, I would really prefer a core file to work
with as I don't have to "recreate" the situation in order to see what is
going on.
Regardless, when I use gdb to catch the seg fault... the stack window isn't
providing me with any useful information. When I open up the gdb console
and try "backtrace" I get something to the effect of:
"Error: #0 0x61070850 in _size_of_stack_reserve__ ()
Cannot access memory at address 0x2000000"
Normally I would expect the backtrace to produce something meaningful like
it does under Solaris like so:
#0 0xef6a4644 in strcpy () from /usr/lib/libc.so.1
#1 0x10598 in crashme (cp=0x0) at test.c:9
#2 0x10574 in main () at test.c:4
So my questions are:
1) How do I have executables automatically create a core file?
2) Why can't I see the stack frames in gdb?
Could anyone explain this to me outright or point me towards a FAQ?
Regards,
Shelby Cain
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |