public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Igor Khavkine <igor.kh@gmail.com>
To: gdb@sourceware.org, Daniel Jacobowitz <drow@false.org>
Subject: Re: C99 variable length arrays
Date: Thu, 26 Jan 2006 23:33:00 -0000	[thread overview]
Message-ID: <ab2dc45b0601261530l64625183k3a98b0892f8a1498@mail.gmail.com> (raw)
In-Reply-To: <20060126134926.GA3501@nevyn.them.org>

On 1/26/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Jan 26, 2006 at 08:41:46AM -0500, Igor Khavkine wrote:

> > I'm using GDB to debug some code that uses local variable length
> > arrays. This feature is available for C as of the C99 standard. GCC
> > has support for it.
> >
> > Sadly, GDB doesn't seem to be smart enough to figure out the size of
> > the arrays at run time. This leads to things like 'print array[1][2]'
> > at the GDB prompt not printing the same value as would 'printf("%g\n",
> > array[1][2])' in the code. This is a problem for multidimensional
> > arrays especially. Needless to say, this makes the code more difficult
> > to debug.
>
> The first thing to do is to write a small testcase, and post the
> testcase along with the debugging output that your GCC generates
> for it.

There is a test case already in the GDB bug database (PR 1796, as I
mentioned in my first message). What kind of debugging output should I
post? Is there an option to make gcc dump the debugging info in human
readable form?

Thanks in advance.

Igor

  reply	other threads:[~2006-01-26 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 13:49 Igor Khavkine
2006-01-26 15:08 ` Daniel Jacobowitz
2006-01-26 23:33   ` Igor Khavkine [this message]
2006-01-27  0:02     ` Daniel Jacobowitz
2006-01-27  8:15       ` Igor Khavkine

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=ab2dc45b0601261530l64625183k3a98b0892f8a1498@mail.gmail.com \
    --to=igor.kh@gmail.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).