From: Geoffrey Keating <geoffk@geoffk.org>
To: Devang Patel <dpatel@apple.com>
Cc: gcc-patches@gcc.gnu.org, gdb@sources.redhat.com
Subject: Re: [PATCH] Debugging Vector Types
Date: Sat, 23 Apr 2005 00:13:00 -0000 [thread overview]
Message-ID: <m2d5smgxio.fsf@greed.local> (raw)
In-Reply-To: <547BC9E3-4C03-4724-8BB5-BB1A99BB3625@apple.com>
Devang Patel <dpatel@apple.com> writes:
> GCC encodes Vector Types as an array of N elements (at least, in
> STABS format). This means, GDB is not able to distinguish it from a
> normal Array. And these may lead to confusing output from GDB. One of
> our user reported that for
>
> vector unsigned char a = (vector unsigned char) (
> 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 );
>
> gdb prints
>
> (gdb) print a
> $1 = "\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020"
>
> If following is used
>
> vector unsigned char a = (vector unsigned char) (
> 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p' );
>
> then gdb prints
>
> (gdb) print a
> $1 = "abcdefghijklmnop"
>
> but, it's not vector!
>
> If GCC provides GDB some kind of hints then GDB may be able to
> display something meaningful. This patch attaches "attribute vector"
> to the stabs string used to represent vector types. I am told that
> GDB ignores attributes that it does not recognize. So we can update
> GCC independently. I tested small test cases and our darwin GDB does
> not get offended by this additional attribute.
>
> * dbxout.c (dbxout_type): Emit attribute vector.
> * config/darwin.h (DBX_USE_VECTOR_ATTRIBUTE): Define.
> * doc/tm.texi (DBX_USE_VECTOR_ATTRIBUTE): Document.
>
> * gcc.dg/stabs-attrib-vect.c: New test.
>
> Bootstrapped and tested on powerpc-darwin.
> OK for mainline ?
- I don't think this should be Darwin-specific. Shouldn't everyone have it?
It's not like it can break Solaris dbx or something, unless people are
using vector types, in which case IMO they should just use GDB.
- You need to update stabs.texi, which I think lives in GDB. (It's
the only stabs documentation we have, so keeping it up-to-date is
important!)
Other than that the patch seems reasonable enough to me.
The GDB people may have some more comments, so I've CCed them.
GDB people: As I understand the patch, what it does is add '@V;' to
the end to the stab for the type, so it looks like "vi:(0,16)=@V;".
next parent reply other threads:[~2005-04-23 0:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <547BC9E3-4C03-4724-8BB5-BB1A99BB3625@apple.com>
2005-04-23 0:13 ` Geoffrey Keating [this message]
2005-04-23 0:36 ` Devang Patel
2005-04-23 0:51 ` Geoff Keating
2005-04-24 22:35 ` Daniel Jacobowitz
2005-04-25 2:19 ` Devang Patel
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=m2d5smgxio.fsf@greed.local \
--to=geoffk@geoffk.org \
--cc=dpatel@apple.com \
--cc=gcc-patches@gcc.gnu.org \
--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