[PATCH] [gdb.base] Enable macro test for clang compiler

Simon Marchi simon.marchi@polymtl.ca
Mon Apr 26 19:38:09 GMT 2021


On 2021-03-16 1:14 a.m., Tomar, Sourabh Singh via Gdb-patches wrote:
> [AMD Public Use]
> 
> Hi Tom,
> 
>>> This is ok with one minor tweak.  If you have write access (I didn't
>>> look) you can just fix it up and check it in.
> Thanks for reviewing this! I have made the suggested changes. I do not have write access(as of now),
> Could you please commit this on my behalf 😊
> 
>>> The body of the if/elseif/else blocks should be indented.
>>> For Tcl, GDB uses a 4 space indent.
> Thanks for the pointers, I'll keep this in mind for future reviews/patches.
> 
> ChangeLog:
> gdb/testsuite/ChangeLog
> 2021-03-16  Sourabh Singh Tomar  <SourabhSingh.Tomar@amd.com>
> 
>     * gdb.base/info-macros.exp: Append -fdebug-macro to
>       additional_flags for clang.
>     * gdb.base/macscp.exp: Likewise.
>     * gdb.base/style.exp: Likewise.
>     * gdb.linespec/macro-relative.exp: Likewise.
> 
> Thanks,
> Sourabh.

Hi all,

This pattern will likely come up again in:

    https://sourceware.org/pipermail/gdb-patches/2021-April/178210.html

I was thinking that we could come up with a new options keyword to
gdb_compile denoting that we want to include macros in the debug info?
This way the individual tests wouldn't have to know each compiler.
Something like:

  gdb_compile ... {debug macros}

or
  gdb_compile ... {debug-macros}

Simon


More information about the Gdb-patches mailing list