public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	 Aditya Kamath1 via Gdb-patches <gdb-patches@sourceware.org>,
	 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [RFC] Looking to fix AIX whatis-ptype-typedefs.exp
Date: Wed, 10 Jan 2024 08:07:43 -0700	[thread overview]
Message-ID: <874jfltef4.fsf@tromey.com> (raw)
In-Reply-To: <CH2PR15MB3544C6E12813BBB0461F4EFAD6692@CH2PR15MB3544.namprd15.prod.outlook.com> (Aditya Kamath1's message of "Wed, 10 Jan 2024 07:21:25 +0000")

>>>>> Aditya Kamath1 <Aditya.Kamath1@ibm.com> writes:

> When we try to check a type which is type casted then we are getting a
> syntax error. This looks like a parsing issue at first glance.

> For example,
> (gdb) whatis (void_typedef) void_typedef

> A syntax error in expression, near `'.

> Whenever we typecast, we get this error message. 
 
> I am trying to understand why this happened while in other targets it
> runs smoothly.  To fix the same for GDB community and AIX I need some
> guidance. Kindly help me with your knowledge and expertise.
 
> Do we need to install any parsing package and need to configure GDB to
> use the same? Or is it got to with incorrect AIX specific code which
> is parsing the command. If it is the latter, then let me know the
> starting point to understand why this happened.

There's nothing (well, very little) that is target-dependent about this
code.  You don't need to install anything special.

gdb is very dependent on the compiler's output.  I would probably start
by looking there -- which compiler is it, etc.  Perhaps the compiler is
generating DWARF that gdb doesn't understand, or perhaps it is
generating bad DWARF.  Another possibility that comes to mind is whether
the compiler is emitting stabs instead of DWARF.

There's normally no easy way to figure this out, you pretty much have to
inspect the debug info and then trace from there.

Tom

      reply	other threads:[~2024-01-10 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10  7:21 Aditya Kamath1
2024-01-10 15:07 ` Tom Tromey [this message]

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=874jfltef4.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).