Re: kernel sparse annotations vs. compiler attributes and debug_annotate_{type,decl} WAS: Re: [PATCH 0/9] Add debug_annotate attributes

2022-07-07 Thread Jose E. Marchesi via Gcc-patches
Hi Yonghong. > On 6/21/22 9:12 AM, Jose E. Marchesi wrote: >> >>> On 6/17/22 10:18 AM, Jose E. Marchesi wrote: Hi Yonghong. > On 6/15/22 1:57 PM, David Faust wrote: >> >> On 6/14/22 22:53, Yonghong Song wrote: >>> >>> >>> On 6/7/22 2:43 PM, David Faust wrote: >

Re: kernel sparse annotations vs. compiler attributes and debug_annotate_{type,decl} WAS: Re: [PATCH 0/9] Add debug_annotate attributes

2022-06-21 Thread Jose E. Marchesi via Gcc-patches
> On 6/17/22 10:18 AM, Jose E. Marchesi wrote: >> Hi Yonghong. >> >>> On 6/15/22 1:57 PM, David Faust wrote: On 6/14/22 22:53, Yonghong Song wrote: > > > On 6/7/22 2:43 PM, David Faust wrote: >> Hello, >> >> This patch series adds support for: >> >> - Tw

kernel sparse annotations vs. compiler attributes and debug_annotate_{type,decl} WAS: Re: [PATCH 0/9] Add debug_annotate attributes

2022-06-17 Thread Jose E. Marchesi via Gcc-patches
Hi Yonghong. > On 6/15/22 1:57 PM, David Faust wrote: >> >> On 6/14/22 22:53, Yonghong Song wrote: >>> >>> >>> On 6/7/22 2:43 PM, David Faust wrote: Hello, This patch series adds support for: - Two new C-language-level attributes that allow to associate (to "annot

Re: [ping2][PATCH 0/8][RFC] Support BTF decl_tag and type_tag annotations

2022-05-24 Thread Jose E. Marchesi via Gcc-patches
> On 5/11/22 11:44 AM, David Faust wrote: >> >> On 5/10/22 22:05, Yonghong Song wrote: >>> >>> >>> On 5/10/22 8:43 PM, Yonghong Song wrote: On 5/6/22 2:18 PM, David Faust wrote: > > > On 5/5/22 16:00, Yonghong Song wrote: >> >> >> On 5/4/22 10:03 AM, David

Re: [PATCH v2] bpf: ensure correct string offsets in BTF.ext

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > BPF CO-RE relocations contain offsets to strings buffered in the BTF > string table. These BTF-specific strings are stored in memory in the > CTF auxilliary strtab, which at output time is concatenated onto

Re: [PATCH v2] bpf: write CO-RE relocation record size only once

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > The CO-RE relocation record size should be written only once in the > .BTF.ext section, not once for each section with relocations. > > Tested for bpf-unknown-none. OK to install? This is OK. Thanks for the

[COMMITTED] bpf: mark/remove unused arguments and remove an unused function

2021-12-06 Thread Jose E. Marchesi via Gcc-patches
This patch does a little bit of cleanup by removing some unused arguments, or marking them as unused. It also removes the function ctfc_debuginfo_early_finish_p and the corresponding hook macro definition, which are not used by GCC. gcc/ * config/bpf/bpf.c (bpf_handle_preserve_access_inde

[COMMITTED] dwarf2ctf: fix typo in comment

2021-10-13 Thread Jose E. Marchesi via Gcc-patches
gcc/ChangeLog: * dwarf2ctf.c: Fix typo in comment. --- gcc/dwarf2ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/dwarf2ctf.c b/gcc/dwarf2ctf.c index b686bafda44..c9e70798a3b 100644 --- a/gcc/dwarf2ctf.c +++ b/gcc/dwarf2ctf.c @@ -33,7 +33,7 @@ static ctf_id_t

Re: [PATCH] bpf: correct extra_headers

2021-09-28 Thread Jose E. Marchesi via Gcc-patches
Hi David. > The BPF CO-RE support (commit 8bdabb37549f12ce727800a1c8aa182c0b1dd42a) > mistakenly overwrote bpf-*-* extra_headers in config.gcc, causing > bpf-helpers.h to not be installed. The redefinition with coreout.h is > unneeded, so delete it. This is OK. Thanks. > > gcc/ChangeLog: > >

Re: [COMMITTED][patch][version 9]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-09-13 Thread Jose E. Marchesi via Gcc-patches
> On Fri, Sep 10, 2021 at 3:47 PM Jose E. Marchesi via Gcc-patches > wrote: >> >> >> Hi Richard. >> >> > On Thu, 9 Sep 2021, Kees Cook wrote: >> > >> >> On Thu, Sep 09, 2021 at 10:49:11PM +, Qing Zhao wrote: >> >&g

Re: [PATCH 0/3] bpf: add -mcpu and related feature options

2021-09-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. > New instructions have been added over time to the eBPF ISA, but > previously there has been no good method to select which version to > target in GCC. > > This patch adds the following options to the BPF backend: > > -mcpu={v1, v2, v3} > Select which version of the eBPF ISA to

Re: [COMMITTED][patch][version 9]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-09-10 Thread Jose E. Marchesi via Gcc-patches
Hi Richard. > On Thu, 9 Sep 2021, Kees Cook wrote: > >> On Thu, Sep 09, 2021 at 10:49:11PM +, Qing Zhao wrote: >> > Hi, FYI >> > >> > I just committed the following patch to gcc upstream: >> > >> > >> > https://gcc.gnu.org/pipermail/gcc-cvs/2021-September/353195.html >> >> Hurray! Thank

Re: [PATCH] bpf: correct zero_extend output templates

2021-09-09 Thread Jose E. Marchesi via Gcc-patches
Hi David. > The output templates for zero_extendhidi2 and zero_extendqidi2 could > lead to incorrect code generation when zero-extending one register into > another. This patch adds a new output template to the define_insns to > handle such cases and produce correct asm. > > gcc/ChangeLog: >

Re: [PATCH,V2 1/3] bpf: Add new -mcore option for BPF CO-RE

2021-08-26 Thread Jose E. Marchesi via Gcc-patches
Hi Richard. > On Tue, Aug 10, 2021 at 5:45 PM Jose E. Marchesi > wrote: >> >> >> > On Thu, Aug 5, 2021 at 2:54 AM Indu Bhagat via Gcc-patches >> > wrote: >> >> >> >> -mcore in the BPF backend enables code generation for the CO-RE usecase. >> >> LTO is >> >> disabled for CO-RE compilations. >>

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-19 Thread Jose E. Marchesi via Gcc-patches
> Hmm, well. How about emitting .BTF.ext.string from GCC and have the linker > merge the .BTF.ext.string section with the CTF string section then? You can't > really say "the ship has sailed" if I read the CTF webpage - there seems to be > many format changes planned. Forgot to mention that BP

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-19 Thread Jose E. Marchesi via Gcc-patches
> On Tue, Aug 17, 2021 at 7:26 PM Indu Bhagat wrote: >> >> On 8/17/21 1:04 AM, Richard Biener wrote: >> > On Mon, Aug 16, 2021 at 7:39 PM Indu Bhagat wrote: >> >> >> >> On 8/10/21 4:54 AM, Richard Biener wrote: >> >>> On Thu, Aug 5, 2021 at 2:52 AM Indu Bhagat via Gcc-patches >> >>> wrote: >>

Re: [PATCH,V2 1/3] bpf: Add new -mcore option for BPF CO-RE

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
> On Thu, Aug 5, 2021 at 2:54 AM Indu Bhagat via Gcc-patches > wrote: >> >> -mcore in the BPF backend enables code generation for the CO-RE usecase. LTO >> is >> disabled for CO-RE compilations. > > -mcore reads like "core", why not -mco-re? Anyway, ... > >> gcc/ChangeLog: >> >> * conf

Re: [PATCH 6/7] bpf testsuite: Add BPF CO-RE tests

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. This BPF part is OK. > This commit adds several tests for the new BPF CO-RE functionality to > the BPF target testsuite. > > gcc/testsuite/ChangeLog: > > * gcc.target/bpf/core-attr-1.c: New test. > * gcc.target/bpf/core-attr-2.c: Likewise. > * gcc.target/bpf/core-attr

Re: [PATCH 5/7] bpf: BPF CO-RE support

2021-08-10 Thread Jose E. Marchesi via Gcc-patches
Hi David. This BPF part is OK. > This commit introduces support for BPF Compile Once - Run > Everywhere (CO-RE) in GCC. > > gcc/ChangeLog: > > * config/bpf/bpf.c: Adjust includes. > (bpf_handle_preserve_access_index_attribute): New function. > (bpf_attribute_table): Use it here

[COMMITTED V10 4/7] CTF/BTF testsuites

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-06-28 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[COMMITTED V10 6/7] Enable BTF generation in the BPF backend

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[COMMITTED V10 7/7] libiberty: copy over .BTF section when using LTO

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
libiberty/ChangeLog: * simple-object.c (handle_lto_debug_sections): Copy over .BTF section. --- libiberty/simple-object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c index 909995dd166..facbf94fd09 100644 --- a/libiberty/simp

[COMMITTED V10 5/7] CTF/BTF documentation

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-06-28 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 32 +++- 1 file changed, 31 insertions(+), 1 del

[COMMITTED V10 0/7] Support for the CTF and BTF debug formats

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
[Changes from V9: All the patches have been OKed, provided a few things were fixed before pushing. These points, raised by Richard Biener and Jason Merrill, have been all addressed as part of the following changes: - No dwarf2int.h header is introduced anymore in the patch series. Instea

[COMMITTED V10 2/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

[COMMITTED V10 1/7] dwarf: externalize some DWARF internals for needs of CTF/BTF

2021-06-28 Thread Jose E. Marchesi via Gcc-patches
This patch externalizes some internal DIE structures and their attributes for the use of DWARF-based debug formats like CTF and BTF. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2out.h: -

Re: [[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

2021-06-24 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. >>> >>> Why not put these bits in dwarf2out.h? >> We think that it makes sense to have a separated interface file for >> the >> implementation of DWARF-b

Re: [[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

2021-06-24 Thread Jose E. Marchesi via Gcc-patches
Hi Jason. > On 5/31/21 12:57 PM, Jose E. Marchesi via Gcc-patches wrote: >> This patch introduces a dwarf2int.h header, to be used by code that >> needs access to the internal DIE structures and their attributes. > > Why not put these bits in dwarf2out.h? We think that it

Re: [[PATCH V9] 3/7] CTF/BTF debug formats

2021-06-21 Thread Jose E. Marchesi via Gcc-patches
> OK otherwise. I think I OKed 1/7 lst time and thus this should now have > all parts OKed by me besides the BPF backend changes. > > Please leave others a day or two to comment (and obviously the BPF > maintainer to ack his part). The BPF parts are OK. (Speaking as the BPF maintainer.) > Than

Re: [[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-06-14 Thread Jose E. Marchesi via Gcc-patches
ping > [Changes from V8: > - Rebased to today's master. > - Adapted to use the write-symbols new infrastructure recently > applied upstream. > - Little change in libiberty to copy .BTF sections over when > LTOing.] > > Hi people! > > Last year we submitted a first patch series introducing su

[[PATCH V9] 4/7] CTF/BTF testsuites

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-05-14 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[[PATCH V9] 7/7] libiberty: copy over .BTF section when using LTO

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
libiberty/ChangeLog: * simple-object.c (handle_lto_debug_sections): Copy over .BTF section. --- libiberty/simple-object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c index 909995dd166..facbf94fd09 100644 --- a/libiberty/simp

[[PATCH V9] 6/7] Enable BTF generation in the BPF backend

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[[PATCH V9] 5/7] CTF/BTF documentation

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-05-14 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
[Changes from V8: - Rebased to today's master. - Adapted to use the write-symbols new infrastructure recently applied upstream. - Little change in libiberty to copy .BTF sections over when LTOing.] Hi people! Last year we submitted a first patch series introducing support for the CTF debuggin

[[PATCH V9] 2/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

[[PATCH V9] 1/7] dwarf: add a dwarf2int.h internal interface

2021-05-31 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V8 6/7] CTF/BTF documentation

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-05-14 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V8 7/7] Enable BTF generation in the BPF backend

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V8 5/7] CTF/BTF testsuites

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-05-14 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[PATCH V8 0/7] Support for the CTF and BTF debug formats

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
[Notes for V8: - In order to not disturb the on-going review, this series is still based on the two already accepted preparatory patches: + dwarf: new dwarf_debuginfo_p predicate + dwarf: add a dwarf2int.h internal interface Instead of being based on the patch: + opts: change write_symbol

[PATCH V8 2/7] dwarf: new dwarf_debuginfo_p predicate

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols. 2021-04-14 Indu Bhagat gcc/ChangeLog * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * confi

[PATCH V8 1/7] dwarf: add a dwarf2int.h internal interface

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V8 3/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

Re: [PATCH V7 4/7] CTF/BTF debug formats

2021-04-30 Thread Jose E. Marchesi via Gcc-patches
>> For a moment, for the sake of this question, if we establish that CTF/BTF >> generation always feeds off DWARF DIEs (so there is no need to access >> type/decl tree nodes), what will it take to keep LTO support while keeping >> ctf_debug_finalize in dwarf2out_finish ? > > I don't think it's po

Re: [PATCH v11] Practical improvement to libgcc complex divide

2021-04-28 Thread Jose E. Marchesi via Gcc-patches
> This patch version is OK. I just pushed the patch to master in Patrick's behalf.

Re: [PATCH 2/2] bpf: allow BSS symbols to be global symbols

2021-04-27 Thread Jose E. Marchesi via Gcc-patches
Hi David. >> Hi YiFei. >> >>> Prior to this, a BSS declaration such as: >>> >>> int foo; >>> static int bar; >>> >>> Generates: >>> >>> .global foo >>> .local foo >>> .comm foo,4,4 >>> .local bar >>> .comm bar,4,4 >>> >>> Creating symbols: >>> >>> b fo

Re: [PATCH 2/2] bpf: allow BSS symbols to be global symbols

2021-04-22 Thread Jose E. Marchesi via Gcc-patches
Hi YiFei. > Prior to this, a BSS declaration such as: > > int foo; > static int bar; > > Generates: > > .global foo > .local foo > .comm foo,4,4 > .local bar > .comm bar,4,4 > > Creating symbols: > > b foo > 0004 b bar > > Both symbols a

Re: [PATCH 1/2] bpf: align function entry point to 64 bits

2021-04-22 Thread Jose E. Marchesi via Gcc-patches
Hi YiFei. This is OK for both trunk and GCC 10. Thanks for the fix! [I see you don't have a copyright transfer contract in place. I believe this change, and also the patch in 2/2, are small/trivial enough to not require one, but if you plan to do more contributions in the future we will nee

[PATCH V7 5/7] CTF/BTF testsuites

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-04-14 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[PATCH V7 6/7] CTF/BTF documentation

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-04-14 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V7 7/7] Enable BTF generation in the BPF backend

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V7 3/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

[PATCH V7 2/7] dwarf: new dwarf_debuginfo_p predicate

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols. 2021-04-14 Indu Bhagat gcc/ChangeLog * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * confi

[PATCH V7 1/7] dwarf: add a dwarf2int.h internal interface

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V7 0/7] Support for the CTF and BTF debug formats

2021-04-19 Thread Jose E. Marchesi via Gcc-patches
[Changes from V6: - Rebased to today's master. - A GC related regression introduced in V5 has been fixed. This regression also uncovered a related bug that has been also fixed in this version. Basically ctfc_types and ctfc_vars were being incorrectly collected and this was uncovered by the f

[PATCH V6 5/7] CTF/BTF testsuites

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-04-14 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[PATCH V6 7/7] Enable BTF generation in the BPF backend

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V6 6/7] CTF/BTF documentation

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-04-14 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V6 0/7] Support for the CTF and BTF debug formats

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
[Changes from V5: - Rebased to today's master. - New preparatory patch: factorize some code in gcc-dg-debug-runtest into a new procedure. This is used by the CTF testsuite. - Expose get_AT_file and related data structures in dwarf2int. - Move the call to ctf_debug_finalize into dwarf2out_finis

[PATCH V6 1/7] dwarf: add a dwarf2int.h internal interface

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V6 2/7] dwarf: new dwarf_debuginfo_p predicate

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols. 2021-04-14 Indu Bhagat gcc/ChangeLog * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * confi

[PATCH V6 3/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-04-14 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

Re: [PATCH V5 0/6] Support for the CTF and BTF debug formats

2021-04-01 Thread Jose E. Marchesi via Gcc-patches
ping > [Changes from V4: > - Rebased to latest master. > - Support for DATASEC in BTF. > - Bug fixes in the CTF support. > - Be more silent: do not inform() the user anymore if -gctf is used > along with a frontend for which there is no CTF support. Ignore > the request instead. > - Got rid

[PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2021-03-23 Thread Jose E. Marchesi via Gcc-patches
ping Any hope for getting this in? We really need this support. Thanks! > On 3/12/21 6:39 PM, Martin Liška wrote: > PING^2 > > On 3/1/21 1:07 PM, Martin Liška wrote: >> PING >> On 2/18/21 10:18 AM, Martin Liška wrote: >>> On 2/16/21 10:17 PM, Qing Zhao wrote: Hello, What’s the

Re: [PATCH V5 0/6] Support for the CTF and BTF debug formats

2021-03-19 Thread Jose E. Marchesi via Gcc-patches
> [Changes from V4: > - Rebased to latest master. > - Support for DATASEC in BTF. > - Bug fixes in the CTF support. > - Be more silent: do not inform() the user anymore if -gctf is used > along with a frontend for which there is no CTF support. Ignore > the request instead. > - Got rid of la

[PATCH V5 4/6] CTF/BTF testsuites

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-03-18 Indu Bhagat David Faust gcc/testsuite/ * gcc.dg/debug/btf/btf-1.c: New test. * gcc.dg/debug/btf/btf-2.c: Likewise. * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise. * gcc.d

[PATCH V5 6/6] Enable BTF generation in the BPF backend

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V5 5/6] CTF/BTF documentation

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-02-18 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V5 1/6] dwarf: add a dwarf2int.h internal interface

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V5 0/6] Support for the CTF and BTF debug formats

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
[Changes from V4: - Rebased to latest master. - Support for DATASEC in BTF. - Bug fixes in the CTF support. - Be more silent: do not inform() the user anymore if -gctf is used along with a frontend for which there is no CTF support. Ignore the request instead. - Got rid of lang_GNU_GIMPLE, whi

[PATCH V5 2/6] dwarf: new dwarf_debuginfo_p predicate

2021-03-18 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols. 2021-03-18 Indu Bhagat gcc/ChangeLog * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * confi

Re: [PATCH V3 1/5] Add new function lang_GNU_GIMPLE

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
> On Mon, Mar 1, 2021 at 12:17 PM Jose E. Marchesi via Gcc-patches > wrote: > > I think I've already said this at some point but you shouldn't need > this. There's no > "GIMPLE language", the user wrote C or C++ or Fortran or ... Ok we will drop this patch from the series.

Re: [PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
> On Tue, Mar 9, 2021 at 11:46 AM Jose E. Marchesi > wrote: >> >> >> >> It probably should define BTF_DEBUGGING_INFO and that should >> >> enable parts guarded with DWARF2_DEBUGGING_INFO as well. >> > >> > BTW, is there a git branch one can more easily browse the new code? >> >> I can push the b

Re: [PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
Hi Richard. Thanks for looking at this :) [Today I sent a V4 of the series containing a couple of fixes to the BTF code. It doesn't contain big changes so the discussion below still applies.] >> In turn, debug_format_do_cu traverses the tree of DIEs passed to it calling >> ctf_do_die on the

Re: [PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
>> It probably should define BTF_DEBUGGING_INFO and that should >> enable parts guarded with DWARF2_DEBUGGING_INFO as well. > > BTW, is there a git branch one can more easily browse the new code? I can push the branch to users/jemarch/ctf-v4 if thats ok?

[PATCH V4 3/5] CTF/BTF testsuites

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-02-18 Indu Bhagat David Faust gcc/testsuite/ * gcc.dg/debug/btf/btf-1.c: New test. * gcc.dg/debug/btf/btf-2.c: Likewise. * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise. * gcc.d

[PATCH V4 5/5] Enable BTF generation in the BPF backend

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V4 4/5] CTF/BTF documentation

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-02-18 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V4 0/5] Support for the CTF and BTF debug formats

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
[Changes from V3: - Rebased to latest master. - Several bug fixes in the BTF support. - More testing: 860 Gentoo packages built with -gctf activated by default.] Hi people! Last year we submitted a first patch series introducing support for the CTF debugging format in GCC [1]. We got a lot of

[PATCH V4 1/5] Add new function lang_GNU_GIMPLE

2021-03-09 Thread Jose E. Marchesi via Gcc-patches
2021-02-18 Indu Bhagat * langhooks.c (lang_GNU_GIMPLE): New Function. * langhooks.h: New Prototype. --- gcc/langhooks.c | 9 + gcc/langhooks.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 2354386f7b4..0082ee9f350 100644

Re: [PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-08 Thread Jose E. Marchesi via Gcc-patches
ping > [Changes from V2: > - Rebased to latest master. > - Several bug fixes in the CTF support. > - Several bug fixes in the BTF support. > - New tests for BTF. > - Fix a couple of tests in the CTF testsuite. > - More testing: we are building Gentoo with -gctf activated by > default and fixin

Re: [PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
> - More testing: we are building Gentoo with -gctf activated by > default and fixing problems as we find them. More than 160 packages > built so far.] This count is now 860 packages built ;)

[PATCH V3 3/5] CTF/BTF testsuites

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-02-18 Indu Bhagat David Faust gcc/testsuite/ * gcc.dg/debug/btf/btf-1.c: New test. * gcc.dg/debug/btf/btf-2.c: Likewise. * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise. * gcc.d

[PATCH V3 5/5] Enable BTF generation in the BPF backend

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V3 4/5] CTF/BTF documentation

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-02-18 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V3 0/5] Support for the CTF and BTF debug formats

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
[Changes from V2: - Rebased to latest master. - Several bug fixes in the CTF support. - Several bug fixes in the BTF support. - New tests for BTF. - Fix a couple of tests in the CTF testsuite. - More testing: we are building Gentoo with -gctf activated by default and fixing problems as we find th

[PATCH V3 1/5] Add new function lang_GNU_GIMPLE

2021-03-01 Thread Jose E. Marchesi via Gcc-patches
2021-02-18 Indu Bhagat * langhooks.c (lang_GNU_GIMPLE): New Function. * langhooks.h: New Prototype. --- gcc/langhooks.c | 9 + gcc/langhooks.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 2354386f7b4..0082ee9f350 100644

[PATCH V2 3/5] CTF/BTF testsuites

2021-02-18 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-02-18 Indu Bhagat David Faust gcc/testsuite/ * gcc.dg/debug/btf/btf-1.c: New test. * gcc.dg/debug/btf/btf-2.c: Likewise. * gcc.dg/debug/btf/btf-anonymous-struct-1.c: Likewise. * gcc.d

[PATCH V2 5/5] Enable BTF generation in the BPF backend

2021-02-18 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V2 4/5] CTF/BTF documentation

2021-02-18 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-02-18 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

[PATCH V2 0/5] Support for the CTF and BTF debug formats

2021-02-18 Thread Jose E. Marchesi via Gcc-patches
[Changes from V1: - Added support for BTF: implementation, documentation and tests. - The previous code has been refactored to accommodate BTF better. - The command-line option -gt has been renamed to -gctf.] Hi people! Last year we submitted a first patch series introducing support for the CTF d

[PATCH V2 1/5] Add new function lang_GNU_GIMPLE

2021-02-18 Thread Jose E. Marchesi via Gcc-patches
2021-02-18 Indu Bhagat * langhooks.c (lang_GNU_GIMPLE): New Function. * langhooks.h: New Prototype. --- gcc/langhooks.c | 9 + gcc/langhooks.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 2354386f7b4..0082ee9f350 100644

[PATCH 3/4] CTF testsuite

2021-01-22 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-01-22 Indu Bhagat gcc/testsuite/ * gcc.dg/debug/ctf/ctf-1.c: New test. * gcc.dg/debug/ctf/ctf-2.c: Likewise. * gcc.dg/debug/ctf/ctf-anonymous-struct-1.c: Likewise. * gcc.dg/debug/ctf/ctf-anonymous-

[PATCH 0/4] Support for the CTF debug format

2021-01-22 Thread Jose E. Marchesi via Gcc-patches
Hi people! Last year we submitted a first patch series introducing support for the CTF debugging format in GCC [1]. We got a lot of feedback that prompted us to change the approach used to generate the debug info, and this patch series is the result of that. This implementation works, but there

[PATCH 2/4] CTF debug format

2021-01-22 Thread Jose E. Marchesi via Gcc-patches
This commit introduces support for generating CTF debugging information from GCC. 2021-01-22 Indu Bhagat Jose E. Marchesi Weimin Pan gcc/ * Makefile.in: Add ctfout.* files to GTFILES. Add new object files. * common.opt: Add CTF debug info options.

[PATCH 1/4] Add new function lang_GNU_GIMPLE

2021-01-22 Thread Jose E. Marchesi via Gcc-patches
2021-01-22 Indu Bhagat * langhooks.c (lang_GNU_GIMPLE): New Function. * langhooks.h: New Prototype. --- gcc/langhooks.c | 9 + gcc/langhooks.h | 1 + 2 files changed, 10 insertions(+) diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 2354386f7b4..0082ee9f350 100644

[PATCH 4/4] CTF documentation

2021-01-22 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF debug format. 2021-01-22 Indu Bhagat * doc/invoke.texi: Document the CTF debug info options. --- gcc/doc/invoke.texi | 16 1 file changed, 16 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2020-11-13 Thread Jose E. Marchesi via Gcc-patches
> PING^7 on the following patch proposed 8 months ago for gcc11: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542198.html > > > The deadline for gcc11 stage 1 is approaching. The pinged patch is > one that has been se

Re: dg-options after board/cflags

2020-09-28 Thread Jose E. Marchesi via Gcc-patches
>> Your patch dealt with board/multilib_flags, but the same problem exists >> for board/cflags and many other flag-containing options. > > What's the use case for that? IIUC board flags are supposed to be ones > that are absolutely required for executables to run with a given board, > such as

<    1   2   3   >