[Bug symtab/16264] New: support DW_AT_main_subprogram

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] New: support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

            Bug ID: 16264
           Summary: support DW_AT_main_subprogram
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at redhat dot com

DWARF 4 specifies DW_AT_main_subprogram, and apparently
gcc has emitted it for years: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43414

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
In reply to this post by konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/ml/gdb-patches/2016-11/msg00362.html

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
In reply to this post by konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <[hidden email]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c1b455e294c6debb4efedc7f1346f3c43249f15

commit 0c1b455e294c6debb4efedc7f1346f3c43249f15
Author: Tom Tromey <[hidden email]>
Date:   Sun Nov 13 20:56:34 2016 -0700

    PR symtab/16264 - support DW_AT_main_subprogram

    This patch adds support for DW_AT_main_subprogram.
    This is PR symtab/16264.

    DW_AT_main_subprogram is used to mark a program's entry point.  GCC
    can emit this, and I hope to change the Rust compiler to emit it as
    well.

    GDB already supports an older, pre-DWARF 4 convention adopted by
    FORTRAN compilers, namely to emit DW_AT_calling_convention for the
    "main" function.  However, I think this support in GDB had a small
    bug, in that it seems to rely on the DW_AT_name being read before
    DW_AT_calling_convention.  This patch fixes this as well.

    Built and regtested on x86-64 Fedora 24 and the buildbot.  New test
    case included.

    2016-12-02  Tom Tromey  <[hidden email]>

        PR symtab/16264:
        * dwarf2read.c (struct partial_die_info) <main_subprogram>: New
        member.
        (add_partial_symbol): Call set_objfile_main_name.
        (read_partial_die): Handle DW_AT_main_subprogram.
        <DW_AT_calling_convention>: don't call set_objfile_main_name, but
        set main_subprogram flag.

    2016-12-02  Tom Tromey  <[hidden email]>

        * gdb.dwarf2/main-subprogram.c: New file.
        * gdb.dwarf2/main-subprogram.exp: New file.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
In reply to this post by konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |8.0

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/16264] support DW_AT_main_subprogram

konrad.schwarz at siemens dot com
In reply to this post by konrad.schwarz at siemens dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16264

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <[hidden email]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81873cc81effbd657efe5f525d369e430ce77d7a

commit 81873cc81effbd657efe5f525d369e430ce77d7a
Author: Tom de Vries <[hidden email]>
Date:   Mon Jun 10 09:28:30 2019 +0200

    [gdb/symtab] Support DW_AT_main_subprogram with -readnow.

    DW_AT_main_subprogram is supported in normal mode in read_partial_die, but
not
    in -readnow mode.

    Fix this by adding support for DW_AT_main_subprogram in read_func_scope.

    Tested on x86_64-linux with native and RFC target board readnow (
    https://sourceware.org/ml/gdb-patches/2019-05/msg00073.html ).

    gdb/ChangeLog:

    2019-06-10  Tom de Vries  <[hidden email]>

        PR symtab/16264
        PR symtab/24517
        * dwarf2read.c (read_func_scope): Handle DW_AT_main_subprogram.

--
You are receiving this mail because:
You are on the CC list for the bug.