public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Zaric, Zoran (Zare)" <Zoran.Zaric@amd.com>
To: Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v2] Replace the symbol needs evaluator with a parser
Date: Thu, 12 Nov 2020 21:29:25 +0000	[thread overview]
Message-ID: <DM6PR12MB27625E6584A0912609CE96C3F8E70@DM6PR12MB2762.namprd12.prod.outlook.com> (raw)
In-Reply-To: <DM6PR12MB2762BBBBCC1D6B21522ABF99F8E70@DM6PR12MB2762.namprd12.prod.outlook.com>

[AMD Official Use Only - Internal Distribution Only]

> > For gimli (again) we have a maximum operation count to avoid this kind
> > of problem.  gdb could do this as well.
> >
> > Meanwhile, about the linear scan -- it seems to me that nothing in
> > DWARF requires (1) that the expression not contain embedded garbage,
> > and (2) that it not be possible to branch to the middle of some other
> > instruction.  (If there is text along these lines, I'd like to hear
> > about it; I looked in the past and couldn't find it.)
> 
> I am not sure about your point about  expressions not contain embedded
> garbage. The DWARF expression is a byte stream with clearly defined
> content for every operation.
> 
> Regarding jumping in the middle of another operation, this is true, DWARF
> doesn't prevent that or define what is supposed to be done.
> 
> And I agree it would be really useful to have a checking mechanism that
> converts that byte stream into an internal representation, where during that
> conversion we could check and report all kind of things that can be wrong
> with the expression.
> 

Sorry Tom, I didn't get what you were aiming at by the 1 and 2. To late for me I guess.

And yes, my scanner would have a problem if somebody used DWARF like that, and it would behave differently then the evaluator, but the previous evaluation (without accessing the target) would hit many the same issues as well. The only issue that it wouldn't probably hit is if the absolute jump would jump over the garbage.

Zoran

  reply	other threads:[~2020-11-12 21:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 17:26 Zoran Zaric
2020-10-21 20:35 ` Tom Tromey
2020-10-22 14:58   ` Zaric, Zoran (Zare)
2020-10-27 19:51     ` Pedro Alves
2020-11-12 20:03     ` Tom Tromey
2020-11-12 20:11 ` Tom Tromey
2020-11-12 21:17   ` Zaric, Zoran (Zare)
2020-11-12 21:29     ` Zaric, Zoran (Zare) [this message]
2020-11-30 18:18       ` Zaric, Zoran (Zare)

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=DM6PR12MB27625E6584A0912609CE96C3F8E70@DM6PR12MB2762.namprd12.prod.outlook.com \
    --to=zoran.zaric@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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).