From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb@sources.redhat.com
Subject: Re: How to catch GDB crash
Date: Mon, 23 Jun 2008 16:57:00 -0000 [thread overview]
Message-ID: <g3okkf$js3$1@ger.gmane.org> (raw)
In-Reply-To: <E1KAoxN-0001HF-00.divis1969-mail-ru@f132.mail.ru>
Dmitry Smirnov wrote:
> Hi,
>
> I've encountered the very annoying problem with GDB. While debugging, it crashes for some reason and I cannot catch this moment. I have a possibility to attach to the running process with another GDB, but it does not help. Perhaps, there is some way to catch some system exception or something similar?
>
> I'm using a litle bit complex setup, so there is no much freedom (at least I cannot simplify the situation). First, I'm debugging from Eclipse (and it looks this crash happens only while running from Eclipse, I've tried from commad line - there is no crash). The debugger I'm using is cross-compiled arm-elf-gdb. It is compiled on windows (i686) platform:
> GNU gdb (GDB) 6.8.50.20080620
> ...
> This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf".
>
> I doubt this can be linked to GDB version. I recall I've seen this crash earlier with arm-elf-gdb 6.5 from GNUARM. I was just skipped this crash somehow but now I cannot continue my job.
>
Hello, I am working on a problem that might be related (although gdb version I am using is 6.7).
Could you try with this sample code? (from cmd line, set a breakpoint in printSimple and once the breakpoint is hit do 'print p' and see if the output makes sense).
Thanks,
Aleksandar Ristovski
QNX Software Systems
#include <stdlib.h>
#include <stdio.h>
struct participant {
char name[15];
char country[15];
float score;
int age;
};
void printSimpleP(struct participant *p)
{
printf("Name: %s, Country: %s, Score: %f, Age: %d\n",
p->name, p->country, p->score, p->age);
}
void printSimple(struct participant p)
{
printSimpleP(&p);
}
int main(int argc, char *argv[]) {
struct participant p = { "Foo", "Bar", 1.2, 45 };
printSimple(p);
return 0;
}
next prev parent reply other threads:[~2008-06-23 16:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 16:32 Dmitry Smirnov
2008-06-23 16:57 ` Aleksandar Ristovski [this message]
2008-06-23 17:12 ` Michael Snyder
2008-06-23 18:23 ` Eli Zaretskii
2008-06-23 18:32 ` Michael Snyder
2008-06-23 18:36 ` Pedro Alves
2008-06-23 19:37 ` Brian Dessent
2008-06-23 20:50 ` Dr. Rolf Jansen
2008-06-23 20:59 ` Dr. Rolf Jansen
2008-06-24 8:52 Dmitry Smirnov
2008-06-24 12:39 Dmitry Smirnov
2008-06-24 12:58 ` Pedro Alves
2008-06-24 17:03 Dmitry Smirnov
2008-06-24 17:29 ` Pedro Alves
2008-06-25 8:03 ` Dmitry Smirnov
2008-06-25 23:28 ` Pedro Alves
2008-06-26 13:56 ` Dmitry Smirnov
2008-06-26 14:21 ` Pedro Alves
2008-06-26 14:33 ` Dmitry Smirnov
2008-06-30 15:58 ` Dmitry Smirnov
2008-07-02 11:05 ` Dmitry Smirnov
2008-07-02 11:52 ` Pedro Alves
2008-07-02 12:51 ` Re[2]: " Dmitry Smirnov
2008-07-05 3:15 ` Pedro Alves
2008-07-07 8:36 ` Dmitry Smirnov
2008-07-07 14:29 ` Pedro Alves
2008-07-07 15:47 ` Dmitry Smirnov
2008-07-07 16:01 ` Pedro Alves
2008-07-08 8:27 ` Dmitry Smirnov
2008-07-01 11:38 ` Vladimir Prus
2008-07-01 11:41 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g3okkf$js3$1@ger.gmane.org' \
--to=aristovski@qnx.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox