Re: [PATCH] Add top-level config support for gold mips target

2015-02-03 Thread Cary Coutant
Ping^3. Should I be addressing this to someone else? -cary On Mon, Dec 1, 2014 at 2:15 PM, Cary Coutant ccout...@google.com wrote: Ping^2. -cary On Wed, Oct 29, 2014 at 12:04 PM, Cary Coutant ccout...@google.com wrote: Ping? On Mon, Oct 20, 2014 at 10:31 AM, Cary Coutant ccout

Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file

2015-02-03 Thread Cary Coutant
The plugin is not supposed to call release_input_file from the claim_file handler. That interface is only for releasing a file descriptor obtained via get_input_file during the all_symbols_read callback. When the linker calls the claim_file handler, the file descriptor is open, and the plugin is

Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}

2015-02-04 Thread Cary Coutant
DW_LANG_Fortran03 and DW_LANG_Fortran08 DW_AT_language values were recently accepted into DWARF5. This patch changes GCC to handle those similarly to how e.g. the -std=c++11, -std=c++14 or -std=c11 are handled. As it will take some time for consumers to catch up, I'm enabling that only if

Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}

2015-02-04 Thread Cary Coutant
PS: Talking about DWARF5, do you know when it will be available as public draft? I am especially looking forward to http://dwarfstd.org/ShowIssue.php?issue=121221.1 (Allow DW_AT_type with DW_TAG_string_type), which would be a low-hanging fruit in terms of implementation. Contrary to the array

Re: [RFC PATCH] Emit DW_LANG_Fortran{03,08}

2015-02-04 Thread Cary Coutant
did with -gdwarf-4). We're still putting a version number of 2 in the compilation unit header! But I guess even upgrading the CU header to We are not. On most targets we default to -gdwarf-4 and emit v. 4: Oops, sorry, you're right. I carelessly misread this: dw2_asm_output_data (2, ver,

Re: [PATCH] Added PLUGIN_FINISH_TYPE callback on enum type processing

2015-02-02 Thread Cary Coutant
I am forwarding this reply to Cary Coutant, Diego Novillo and Le-Chun Wu, as they were listed as the plugin maintainers. Cary, Diego, Le-Chun, please let me know if you are on it, or if I should send it to someone else. Sorry, this isn't my kind of plugin -- I'm a maintainer for the LTO

Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file

2015-02-04 Thread Cary Coutant
If you're going to insist on calling the release_input_file API from the claim_file handler, I'm going to have to fix gold to ignore the call to avoid a premature unlock of the object file. What's the proper solution for not leaking those filedescriptors? There was a bug in gold where it wasn't

Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options

2015-01-28 Thread Cary Coutant
Not quite clear why we need block_table. This table is not gonna be emitted. And we can easily get subprog_entry through block-block_num When final_scan_insn() calls dwarf2out_begin_block(), all it passes is a block number. I don't know a way to get from block number to the block, so I

Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options

2015-01-28 Thread Cary Coutant
+static subprog_entry * +add_subprog_entry (tree decl, bool is_inlined) +{ + subprog_entry **slot; + subprog_entry *entry; + + slot = subprog_table-find_slot_with_hash (decl, DECL_UID (decl), INSERT); + if (*slot == HTAB_EMPTY_ENTRY) +{ + entry = XCNEW (struct

Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options

2015-01-29 Thread Cary Coutant
Is it correct that block_num has 1-1 mapping with block_table. And block_table has 1-1 mapping with logical_table? The first part, yes -- there's one entry in block_table for each block_num in the function tree. But two or more blocks may map to a single logical, and some blocks may not

Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file

2015-01-28 Thread Cary Coutant
This patch makes claim_file_handler to call release_input_file after it finishes processing input file. OK for trunk? OK. How did you test this? I did normal bootstrap and make check on Linux/x86-64. I also run ld.bfd and ld.gold by hand to verify that release_input_file is called. But

Re: [google/gcc-4_9] Minor changes to -ftwo-level-line-tables

2015-03-03 Thread Cary Coutant
@@ -21817,22 +21823,39 @@ out_subprog_directive (subprog_entry *su { tree decl = subprog-decl; tree decl_name = DECL_NAME (decl); - const char *name; + tree origin; Explicitly initialize origin to NULL_TREE; Done. + /* For inlined subroutines, use the linkage name. + If

Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options

2015-01-29 Thread Cary Coutant
Here's a very slightly revised patch, fixing a couple of bugs found during GDB testing. In out_logical_entry, I should pass along the value of is_stmt when creating a logical for the calling context, so that we get a breakpoint location for the point of call: context = out_logical_entry

[patch] Update my email address

2015-04-08 Thread Cary Coutant
I'm retiring, and my last day at google is this Friday, April 10. I plan to continue to contribute to GCC and binutils in my retirement. I've updated the MAINTAINERS file to use my personal address, ccout...@gmail.com. -cary 2015-04-08 Cary Coutant ccout...@gmail.com * MAINTAINERS

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
Based on Richard's suggestion, I have a patch to localize comdat functions which seems like a very effective solution to this problem. The text size increase is limited to the extra comdat copies generated for the specialized modules (modules with unsafe options) which is usually only a few.

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
Thanks, will make those changes. Do you recommend a different name for this flag like -fmake-comdat-functions-static? Well, the C++ ABI refers to this as vague linkage. It may be a bit too long or too ABI-specific, but maybe something like -f[no-]use-vague-linkage-for-functions or

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-08-18 Thread Cary Coutant
+@item -fno-weak-comdat-functions +@opindex fno-weak-comdat-functions +Do not use weak symbol support for comdat non-virtual functions, even if it +is provided by the linker. By default, G++ uses weak symbols if they are +available. This option is useful when comdat functions generated in

Re: [PATCH] Add extensions to dwarf2.def

2015-08-13 Thread Cary Coutant
I'm currently working on migrating debugging information for Ada from GNAT encodings to standard DWARF. At the moment, I have worked on two topics that I believe are not (completely) supported in standard DWARF: - fixed point types with arbitrary scale factors; - scalar types with biased

[committed patch] Sync top-level configure.ac with binutils-gdb

2016-03-19 Thread Cary Coutant
I'm committing this patch to sync the top-level configure with binutils-gdb. -cary 2016-03-17 Cary Coutant <ccout...@gmail.com> * configure.ac: Add mips and s390 to the gold target check. * configure: Regenerate. Index: con

[commit] Sync include/plugin-api.h with binutils

2016-03-04 Thread Cary Coutant
I'm committing the attached patch to sync include/plugin-api.h with binutils. -cary 2016-03-03 Than McIntosh * plugin-api.h: Add new hooks to the plugin transfer vector to to support querying section alignment and section size.

[patch] Fix ICEs with -gsplit-dwarf

2014-07-01 Thread Cary Coutant
2014-07-01 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (remove_addr_table_entry): Remove unnecessary hash table lookup. (resolve_addr_in_expr): When replacing the rtx in a location list entry, get a new address table entry. (dwarf2out_finish): Call

Re: [patch] Fix ICEs with -gsplit-dwarf

2014-07-01 Thread Cary Coutant
Any objections to backporting these fixes to the 4.9 branch? -cary On Tue, Jul 1, 2014 at 2:37 PM, Cary Coutant ccout...@google.com wrote: This patch fixes a couple of ICEs when using -gsplit-dwarf. When compiling a small-enough compilation unit that has no address table entries

[patch] [4.9] Backport fix for ICEs with -gsplit-dwarf

2014-07-10 Thread Cary Coutant
I've backported this patch from trunk at r212211. Committed to gcc-4_9 at r212434. https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00076.html -cary 2014-07-01 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (remove_addr_table_entry): Remove unnecessary hash table lookup

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-07-24 Thread Cary Coutant
It seems that the problem here is more general; a template argument list is not in scope within that same template argument list. Can't we fix that without special-casing conversion ops? I think conversion ops really are a special case. It's the only case where the template parameters refer

Re: [PATCH 1/6] RTL dwarf2out changes

2014-07-28 Thread Cary Coutant
+ /* ??? MD5 of another hash doesn't make a lot of sense... */ + hash = hstate.end(); CHECKSUM (hash); [citation needed] I don't see why you think that. Maybe it'd be nicer if we could use hash_loc_operands() to feed its input directly into the MD5 checksum, but I think in this case it's

Re: [PATCH 1/6] RTL dwarf2out changes

2014-07-28 Thread Cary Coutant
In the case of loc_checksum(), we're tied to MD5 by the DWARF standard. Otherwise, we could just rewrite it to use inchash throughout. I'm not sure I understand the motivation. If gcc hashes in gcc specific stuff (and this hash, even before my changes is) then the output can never be

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-11-10 Thread Cary Coutant
Ping. I'm getting more reports of this bug internally, and it would be nice to have the fix upstream. -cary On Mon, Oct 13, 2014 at 11:43 AM, Cary Coutant ccout...@google.com wrote: Ping. Jason, do you still think the special-case for conversion ops is inappropriate? -cary On Fri, Jul 25

[google/gcc-4_9] Backport pending patch to fix demangler crash

2014-11-10 Thread Cary Coutant
Backport pending upstream patch to fix demangler crash. https://gcc.gnu.org/ml/gcc-patches/2014-05/msg02279.html This patch is for the google/gcc-4_9 branch. Google ref: 17891596 -cary 2014-05-27 Pedro Alves pal...@redhat.com include/ * demangle.h (enum demangle_component_type)

Re: Avoid privatization of TLS variables

2014-09-25 Thread Cary Coutant
The plugin API doesn't have a way to mark a symbol as TLS, but it doesn't really matter since the linker simply overrides the placeholder from the claimed file with the symbol provided in the replacement. Unfortunately, I excluded common symbols from this logic in gold, so the symbol isn't getting

Re: Avoid privatization of TLS variables

2014-09-25 Thread Cary Coutant
Thank you! Now when I have your attention, perhaps we could discuss the original motivation of the change that exposed this bug. I was building libreoffice with profile feedback and I run into a message cannot load any more object with static TLS that took me a while to track as I did not

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

2014-10-03 Thread Cary Coutant
O. Then I was indeed wrong and defaulted does not impact ABI at all. At least that is one worry less for the abi checkers :) As Siva mentioned, it does in fact impact the ABI. A class with a non-trivial destructor is not a POD, and affects the calling convention, so the debugger needs to know

Re: [google/gcc-4_9] Add gcc driver option -no-pie

2014-10-09 Thread Cary Coutant
If adding a new option, you need to document it in invoke.texi. Patch updated. Is this alright for google/gcc-4_9? +no-pie +Driver RejectNegative Negative(pie) +Create a position dependent executable I'd suggest adding an alias for -no-pie (meaning --no-pie) -- see earlier in common.opt

Re: [google/gcc-4_9] Add gcc driver option -no-pie

2014-10-09 Thread Cary Coutant
I'd suggest adding an alias for -no-pie (meaning --no-pie) -- see earlier in common.opt where -pie is declared as an alias for pie, and similarly for -shared. Patch Updated. OK for google/gcc-4_9 branch. Thanks! -cary

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
The linker already has a --strip-lto-sections option, and it's on by default. I'll approve a patch that modifies gold to recognize .gnu.offload_lto.* sections as part of --strip-lto-sections. Really, though, you should be setting the SHF_EXCLUDE bit on these sections. Do that and no

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
The question is what will old assemblers and/or linkers do with that, and if there are any that support linker plugins, but not SHF_EXCLUDE. If it helps answer that question, SHF_EXCLUDE support has been in gold for 6 years, and in gas for 4. -cary

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-10-13 Thread Cary Coutant
Ping. Jason, do you still think the special-case for conversion ops is inappropriate? -cary On Fri, Jul 25, 2014 at 2:16 AM, Pedro Alves pal...@redhat.com wrote: On 07/24/2014 11:35 PM, Cary Coutant wrote: It seems that the problem here is more general; a template argument list

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-15 Thread Cary Coutant
My preference would be to add the | SECTION_EXCLUDE unconditionally, and instead guard the if (flags SECTION_EXCLUDE) *f++ = 'e'; in varasm.c (default_elf_asm_named_section). The only other user of SECTION_EXCLUDE seems to be -gsplit-dwarf right now, Cary, is such a change ok with

[PATCH] Add top-level config support for gold mips target

2014-10-20 Thread Cary Coutant
This patch adds support for the mips target in gold. OK to commit? -cary 2014-10-20 Cary Coutant ccout...@google.com * configure (--enable-gold): Add mips*-*-*. * configure.ac: Regenerate. Index: configure

Re: [PATCH] PR debug/57519 - Emit DW_TAG_imported_declaration under the right class for 'using' statements in a class

2014-04-03 Thread Cary Coutant
ChangeLog: 2014-03-25 Siva Chandra Reddy sivachan...@google.com Fix PR debug/57519 /cp PR debug/57519 * class.c (handle_using_decl): Pass the correct scope to cp_emit_debug_info_for_using. testsuite/ PR debug/57519 *

Re: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-10 Thread Cary Coutant
However it would be nice to be assured that the gcc change is ok in principle first. The DWARF bits are fine with me. -cary

Re: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-04-11 Thread Cary Coutant
The DWARF bits are fine with me. Thanks. Who can approve the other bits? You should probably get C and C++ front end approval. I'm not really sure who needs to review patches in c-family/. Since the part in c/ is so tiny, maybe all you need is a C++ front end maintainer. Both Richard Henderson

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Cary Coutant
* dwarf2out.c (gen_enumeration_type_die): Add DW_AT_const_value as unsigned or int depending on type and value used. Since stage 1 opened up I would like to request approval again to push this. Patch rebased to current master attached. The discussion that led to that TODO is here:

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-14 Thread Cary Coutant
Also note that size_of_die and value_format will still choose DW_FORM_data[1248] for dw_val_class_unsigned_const in most cases. Don't you really want to use DW_FORM_udata? DW_FORM_data[1248] is in many cases smaller than DW_FORM_udata (though, one has to take into account possibly larger

Re: [PATCH] Add DW_AT_const_value as unsigned or int depending on type and value used.

2014-04-15 Thread Cary Coutant
Added a clarifying comment to the code and reinstated the TODO for the double case. OK to push? * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_const_value as unsigned or int depending on type and value used. OK. Thanks! -cary

Re: [PATCH] dwarf2out: Use normal constant values in bound_info if possible.

2014-04-15 Thread Cary Coutant
+ /* If HOST_WIDE_INT is big enough then represent the bound as + a constant value. Note that we need to make sure the type + is signed or unsigned. We cannot just add an unsigned + constant if the value itself is positive. Some DWARF + consumers

PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections

2014-04-25 Thread Cary Coutant
2014-04-25 Cary Coutant ccout...@google.com gcc/ PR debug/60929 * dwarf2out.c (should_move_die_to_comdat): A type definition can contain a subprogram definition, but don't move it to a comdat unit. (clone_as_declaration): Copy DW_AT_abstract_origin attribute

Re: PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections

2014-04-28 Thread Cary Coutant
What are the rules for backporting to 4.9.1? Should I backport this patch? -cary 2014-04-25 Cary Coutant ccout...@google.com gcc/ PR debug/60929 * dwarf2out.c (should_move_die_to_comdat): A type definition can contain a subprogram definition, but don't move

[google/gcc-4_9] PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections

2014-04-28 Thread Cary Coutant
I've backported the following patch from trunk at r209812. Committed on the google/gcc-4_9 branch at r209875. Google ref: 14230806. -cary gcc/ * dwarf2out.c (should_move_die_to_comdat): A type definition can contain a subprogram definition, but don't move it to a comdat

Re: [GOOGLE] backport discriminator support from google-4_8 to google-4_9

2014-05-12 Thread Cary Coutant
On Mon, May 12, 2014 at 1:11 PM, Dehao Chen de...@google.com wrote: This patch backports r199154 from google-4_8 to google-4_9 Bootstrapped and passed regression test. OK for google-4_9 branch? Don't forget the follow-ons listed below. Any reason not to combine them into this patch? Looks

Re: [GOOGLE] backport discriminator support from google-4_8 to google-4_9

2014-05-12 Thread Cary Coutant
Yes, this patch is a combination of all these patches. Some of them are already in trunk. OK for google 4.9 branch. Thanks! -cary

[google/gcc-4_8] Add -fskeleton-type-units flag.

2014-05-12 Thread Cary Coutant
it conditional on this flag. OK to commit? -cary 2014-05-12 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (output_skeleton_debug_sections): Check -fskeleton-type-units flag. (output_comdat_type_unit): Likewise. (dwarf2out_finish): Likewise

Re: [GOOGLE] Updates highest_location when updating next_discriminator_location

2014-05-13 Thread Cary Coutant
Index: gcc/input.c === --- gcc/input.c (revision 210338) +++ gcc/input.c (working copy) @@ -910,6 +910,8 @@ location_with_discriminator (location_t locus, int : next_discriminator_location);

Re: [GOOGLE] Updates highest_location when updating next_discriminator_location

2014-05-13 Thread Cary Coutant
The problem is that linemap_location_from_macro_expansion_p will always return true if locus has discriminator. And in linemap_lookup, this will lead to call linemap_macro_map_lookup, in which there is an assertion: linemap_assert (line = LINEMAPS_MACRO_LOWEST_LOCATION (set)); However,

[PATCH] Use -ggnu-pubnames with -gsplit-dwarf

2014-05-13 Thread Cary Coutant
This patch forces the use of -ggnu-pubnames when using -gsplit-dwarf. This is necessary so that the gold linker can generate .gdb_index version 7. No new regressions. Committed as trivial (has no effect if you're not using -gsplit-dwarf). -cary 2014-05-13 Cary Coutant ccout...@google.com gcc

[google/gcc-4_9] Force the use of -ggnu-pubnames when using -gsplit-dwarf

2014-05-13 Thread Cary Coutant
I've backported this patch from trunk at r210395. -cary gcc/ * opts.c (finish_options): Use -ggnu-pubnames with -gsplit-dwarf.

Re: [GOOGLE] Updates highest_location when updating next_discriminator_location

2014-05-13 Thread Cary Coutant
Attached patch passes regression tests and benchmark test. OK for google-4_9? OK. Thanks again! -cary

[patch] PR debug/61013: Change -g so that it will override -g1 but not -g3

2014-05-14 Thread Cary Coutant
the debug level to 2 if it was either off or at level 1 before. OK to commit? -cary 2014-05-14 Cary Coutant ccout...@google.com gcc/ PR debug/61013 * opts.c (common_handle_option): Don't special-case -g. (set_debug_level): Default to at least level 2 with -g. Index

Re: [patch] PR debug/61013: Change -g so that it will override -g1 but not -g3

2014-05-14 Thread Cary Coutant
PR debug/61013 * opts.c (common_handle_option): Don't special-case -g. (set_debug_level): Default to at least level 2 with -g. Ok. Thanks, Forgot to ask -- OK to backport to the 4.9 branch? -cary

Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters

2014-05-30 Thread Cary Coutant
Fix this by adding a new DEMANGLE_COMPONENT_CONVERSION component type, which does what DEMANGLE_COMPONENT_CAST does today, and making DEMANGLE_COMPONENT_CAST just simply print its component subtree. I think we could instead reuse DEMANGLE_COMPONENT_CAST and in d_print_comp_inner still do:

[google/gcc-4_8] Fix ICE with -gsplit-dwarf and FDO

2014-06-04 Thread Cary Coutant
: b/15417905 2014-06-04 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (dwarf2out_finish): Call index_location_lists even if addr_index_table is NULL. Index: gcc/dwarf2out.c === --- gcc/dwarf2out.c

Re: [GOOGLE] Emit linkage_name when built with -gmlt and for abstract decls

2014-06-11 Thread Cary Coutant
This will increase c++ g1/g2 binary size a little. For all spec cint2006 benchmarks, the binary size change is shown below. 400 0.00% 0.00% 0.00% 0.00% 401 0.00% 0.00% 0.00% 0.00% 403 0.00% 0.00% 0.00% 0.00% 429 0.00% 0.00% 0.00% 0.00% 445 0.00% 0.00% 0.00% 0.00% 456 0.00% 0.00% 0.00%

Re: [C++ RFC/Patch] PR 58561

2014-01-29 Thread Cary Coutant
in this bug we ICE in dwarf2out.c:is_base_type with -g, because it doesn't know how to handle the TEMPLATE_TYPE_PARM coming from the C++ front-end and representing 'auto' in this kind of C++1y code. That it shouldn't ICE and return 0 instead I'm pretty sure, I'm less sure about the next

[google gcc-4_8] Remove DW_AT_GNU_addr_base from skeleton type unit DIEs

2014-02-11 Thread Cary Coutant
takes. This patch is for the google/gcc-4_8 branch. I will submit it for trunk when stage 1 is open. Tested with crosstool_validate.py. 2014-02-11 Cary Coutant ccout...@google.com * dwarf2out.c (add_top_level_skeleton_die_attrs): Don't add DW_AT_GNU_addr_base to all skeleton DIEs

Re: [PATCH] Don't add DW_AT_{main_subprogram,calling_convention} attributes more than once (PR debug/60152)

2014-02-12 Thread Cary Coutant
gen_subprogram_die is often called more than once for the same decl (e.g. the first time through force_decl_die etc.), but it always unconditionally calls add_calling_convention_attribute which thus may add the attributes several times. Fixed thusly, bootstrapped/regtested on x86_64-linux

[google/gcc-4_8] Fix demangler to handle conversion operators correctly

2014-02-20 Thread Cary Coutant
I've backported this patch from trunk at r205292. Committed on google/gcc-4_8 branch as r207971. Tested with make check in libiberty. -cary 2013-11-22 Cary Coutant ccout...@google.com libiberty/ * cp-demangle.c (struct d_info_checkpoint): New struct. (struct

Re: [PATCH] PR debug/16063. Add DW_AT_type to DW_TAG_enumeration.

2014-03-24 Thread Cary Coutant
gcc/cp/ * dwarf2out.c (gen_enumeration_type_die): Add DW_AT_type if enum_underlying_base_type defined and DWARF version 3. * langhooks.h (struct lang_hooks_for_types): Add enum_underlying_base_type. * langhooks-def.h

Re: [PATCH] Add top-level config support for gold mips target

2014-10-29 Thread Cary Coutant
Ping? On Mon, Oct 20, 2014 at 10:31 AM, Cary Coutant ccout...@google.com wrote: This patch adds support for the mips target in gold. OK to commit? -cary 2014-10-20 Cary Coutant ccout...@google.com * configure (--enable-gold): Add mips*-*-*. * configure.ac: Regenerate

Re: [GOOGLE, AUTOFDO] Assign different discriminators to calls with the same lineno

2014-08-29 Thread Cary Coutant
To avoid the unused new discriminator value, I added a map found_call_this_line to track whether a call is the first call in a source line seen when assigning discriminators. For the first call in a source line, its discriminator is 0. For the following calls in the same source line, a new

Re: [GOOGLE, AUTOFDO] Assign different discriminators to calls with the same lineno

2014-08-29 Thread Cary Coutant
for next_discriminator_for_locus. (assign_discriminators): Assign different discriminators for calls belonging to the same source line. OK for google/gcc-4_9 branch. Thanks! -cary On Fri, Aug 29, 2014 at 1:59 PM, Wei Mi w...@google.com wrote: On Fri, Aug 29, 2014 at 10:11 AM, Cary Coutant ccout

[google/4_9] Add a new flag bit to .debug_gnu_pubnames entries

2014-09-11 Thread Cary Coutant
and namespaces only. -cary 2014-09-11 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (output_pubname): Use a reserved bit in the flags byte to tell gold it's OK to keep just one CU in the CU list for this index entry. Index: dwarf2out.c

Re: [Google 4.7] Backport upstream fission changes (issue6852101)

2012-12-03 Thread Cary Coutant
2012-11-27 Sterling Augustine saugust...@google.com Backport changes to fission implementation required by trunk. See http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02684.html and susbsequent messages for a full description of what needed to change

Re: [PATCH] Improve debug info for various cases where we drop location info on the floor (PR debug/55608)

2012-12-07 Thread Cary Coutant
This patch adds DW_AT_const_value or DW_AT_location for unused static vars (thus, not really modified and their DECL_INITIAL can be used for location/constant value info), and optimizes various cases using DW_OP_GNU_implicit_pointer (e.g. DW_OP_addr symbol DW_OP_stack_value where symbol is

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread Cary Coutant
2012-12-07 Steve Ellcey sell...@mips.com PR target/54061 * rtl.h (IGNORED_DWARF_REGNUM): New. * dwarfwout.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM. Typo: s/dwarfwout/dwarf2out/ (mem_loc_descriptor): Ditto. * config/mips/mips.c

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-10 Thread Cary Coutant
2012-12-07 Steve Ellcey sell...@mips.com PR target/54061 rtl.h (IGNORED_DWARF_REGNUM): New. * dwarf2out.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM. (mem_loc_descriptor): Ditto. * config/mips/mips.h (ALL_COP_REG_FIRST): New.

Re: Follow-up to PR bootstrap/54820

2012-12-19 Thread Cary Coutant
Two test cases, debug_msg_so.err and debug_msg_ndebug.err, are still broken by the original patch, because (a) debug_msg.so has a DT_NEEDED entry for libstdc++.so, (b) the use of -static-libstdc++ means that that DT_NEEDED entry is unknown when we link the executable, and (c) the undefined symbols

Re: [google 4.7] Fix for PR 8013197 (issue7140044)

2013-01-16 Thread Cary Coutant
2013-01-16 Sterling Augustine saugust...@google.com * gcc/dwarf2out.c (resolve_addr): Delete call to remove_addr_table_entry. OK for google/gcc-4_7. The commit log entry should say Google ref: b/8013197 instead of PR Thanks! -cary

Re: [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053)

2013-01-18 Thread Cary Coutant
commit dc0b9bc855444332e7a3b1f3473a70ce0c72d66c Author: Sterling Augustine saugust...@google.com Date: Fri Jan 18 10:38:30 2013 -0800 Fix for Google Ref: b/8028506 Calling find_AT_string can resize the debug_str hash table, even if the string is already present in the hash

Re: [google 4.7] Fix for PR 8013197 (issue7140044)

2013-01-18 Thread Cary Coutant
2013-01-16 Sterling Augustine saugust...@google.com * gcc/dwarf2out.c (resolve_addr): Delete call to remove_addr_table_entry. OK for google/gcc-4_7. The commit log entry should say Google ref: b/8013197 instead of PR I'll file an upstream bug for this as well (as

Re: [Google 4.7 Split Dwarf] Use .debug_str for some strings. (issue7241067)

2013-02-04 Thread Cary Coutant
@@ -22385,21 +22448,21 @@ static void output_indirect_strings (void) { + switch_to_section (debug_str_section); if (!dwarf_split_debug_info) -{ - switch_to_section (debug_str_section); - htab_traverse (debug_str_hash, output_indirect_string, NULL); -} +

Re: [Google 4.7 Split Dwarf] Use .debug_str for some strings. (issue7241067)

2013-02-04 Thread Cary Coutant
Ahh, good catch. Fixed as attached. Looks good, thanks. OK for the google/gcc-4_7 branch. (And, yes, please do port this to trunk when Stage 1 reopens.) -cary

[RFC] Modify -g1 to produce line tables

2013-02-06 Thread Cary Coutant
. * gcc.dg/debug/dwarf2/mlt2.c: New test. 2013-02-06 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (want_pubnames): Don't do pubnames for -g1. (add_linkage_name): Don't add linkage name for -g1. (decls_for_scope): Process subblocks for -g1

[google/integration] Add -gfission and -gmlt options as synonyms

2013-02-06 Thread Cary Coutant
This patch adds -g[no-]fission as a synonym for -g[no-]split-dwarf, and modifies the existing stub we have for -gmlt to make it a synonym for -g1. The implementation of -gsplit-dwarf is already in trunk (and therefore g/i), and the implementation of -g1 to produce line tables will be submitted for

[google/main] Generate line tables at -g1 (aka -gmlt)

2013-02-06 Thread Cary Coutant
=== --- testsuite/gcc.dg/debug/dwarf2/mlt2.c(revision 0) +++ testsuite/gcc.dg/debug/dwarf2/mlt2.c(revision 0) @@ -0,0 +1,31 @@ +/* Test that -g overrides -g1. */ +/* Origin: Cary Coutant ccout...@google.com */ +/* { dg-do compile } */ +/* { dg

Re: [RFC PATCH] Typed DWARF stack

2011-03-25 Thread Cary Coutant
This patch on top of http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01224.html and http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01723.html implements parts of Cary's typed DWARF stack proposal: http://www.dwarfstd.org/doc/040408.1.html I haven't looked at the patch yet, but this sounds great;

Ping: [libiberty patch] Add demangler support for cloned function symbols (PR 40831)

2011-09-22 Thread Cary Coutant
Ping? http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01626.html -cary include/ChangeLog:        PR 40831        * demangle.h (enum demangle_component_type): Add        DEMANGLE_COMPONENT_CLONE. libiberty/ChangeLog:        PR 40831        * cp-demangle.c (d_make_comp): Add new

Re: Ping: [libiberty patch] Add demangler support for cloned function symbols (PR 40831)

2011-09-23 Thread Cary Coutant
This patch is OK, with or without the testsuite additions Jakub mentions. Thanks, I added the new tests, and tweaked the clone suffix parsing to allow the leading _. Committed as r179132. -cary

Re: Ping: [libiberty patch] Add demangler support for cloned function symbols (PR 40831)

2011-09-23 Thread Cary Coutant
This patch is OK, with or without the testsuite additions Jakub mentions. Thanks, I added the new tests, and tweaked the clone suffix parsing to allow the leading _. Committed as r179132. Should I backport this patch to gcc-4_6-branch? -cary

Re: Ping: [libiberty patch] Add demangler support for cloned function symbols (PR 40831)

2011-09-26 Thread Cary Coutant
This patch is OK, with or without the testsuite additions Jakub mentions. Thanks, I added the new tests, and tweaked the clone suffix parsing to allow the leading _. Committed as r179132. Should I backport this patch to gcc-4_6-branch? Since you offer, that would be nice. OK,

[patch] Sync include/plugin-api.h with binutils

2011-09-26 Thread Cary Coutant
For PR lto/47247, I updated the linker plugin API to add a new entry point, LDPT_GET_SYMBOLS_V2, and a new symbol resolution code, LDPR_PREVAILING_DEF_IRONLY_EXP. Ian approved the patch on the binutils side, but it includes a change to an include file shared with gcc. This patch to sync

Re: [google] Add SECTION_EXCLUDE flag and exclude .gnu.callgraph sections (issue5126041)

2011-09-27 Thread Cary Coutant
Index: final.c === --- final.c     (revision 179104) +++ final.c     (working copy) @@ -4428,7 +4428,7 @@ rest_of_handle_final (void)       cgraph_node (current_function_decl) != NULL       (cgraph_node

[google] Cherry pick r179209 to add demangler support for cloned functions

2011-09-27 Thread Cary Coutant
OK to cherry-pick r179209 from gcc-4_6-branch to google/gcc-4_6? http://gcc.gnu.org/ml/gcc-cvs/2011-09/msg00828.html -cary include/ChangeLog: PR 40831 * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_CLONE. libiberty/ChangeLog: PR 40831

Re: [google] record compiler options to .note sections

2011-10-10 Thread Cary Coutant
Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug section), and with -frecord-gcc-switches? 2) may be better to use option name: -frecord-gcc-switches-in-object Sections whose

Re: [google] record compiler options to .note sections

2011-10-11 Thread Cary Coutant
How about .gnu.switches.text.quote_paths? Sounds good to me. -cary

Re: [Google 4.6 Fission] Skeleton debug info sections don't have siblings

2012-04-20 Thread Cary Coutant
2012-04-20   Sterling Augustine  saugust...@google.com        * gcc/dwarf2out.c (output_skeleton_debug_sections): Fix off-by-one        error. OK for google/gcc-4_6 branch. -cary

Re: [RFA] dwarf2.h (dwarf_location_atom): Add DW_OP_GNU_addr_index.

2012-04-25 Thread Cary Coutant
Ping. This is approved on the binutils side. I just need approval on the gcc side. My understanding is that a patch to sync binutils/include and gcc/include falls under the trivial and obvious rule. True? -cary

[patch] Update DWARF codes for Fission

2012-05-01 Thread Cary Coutant
? -cary include/ 2012-05-01 Cary Coutant ccout...@google.com * dwarf2.def: Remove DW_FORM_GNU_ref_index, replace DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base. commit bc45612d20fad44534b0efeeb821671d8e8c5b63 Author: Cary Coutant ccout...@google.com Date: Tue May 1 16:08:08

Re: [patch] Update DWARF codes for Fission

2012-05-02 Thread Cary Coutant
This patch to include/dwarf2.def updates the DW_FORM and DW_AT codes for the Fission extensions. We've eliminated DW_FORM_GNU_ref_index, and replaced DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base. (The wiki page at http://gcc.gnu.org/wiki/DebugFission has been updated.) OK for binutils and

Re: RFC: PATCH to allow symbolic and sig8 DWARF references in the same compile

2012-05-02 Thread Cary Coutant
Here's my patch to allow -feliminate-dwarf2-dups and -fdebug-types-section to coexist, so that I can then use symbolic references for my function COMDAT work.  Does this look reasonable to you? Yep, looks good to me. -cary

Re: DWARF patch to reduce the number of inter-CU refs

2012-05-03 Thread Cary Coutant
Incidentally, I notice that we have unnecessary duplication in the type units.  For instance, with nested-3.C:        .uleb128 0x2    # (DIE (0x25) DW_TAG_namespace)        .long   .LASF0  # DW_AT_name: thread                        # DW_AT_declaration        .long   0x34    # DW_AT_sibling

[google/gcc-4_6] Fission improvements and bug fixes (issue6189052)

2012-05-07 Thread Cary Coutant
and tested on x86_64. 2012-05-07 Sterling Augustine saugust...@google.com Cary Coutant ccout...@google.com include/ * dwarf2.h (enum dwarf_form): Remove DW_FORM_GNU_ref_index. (enum dwarf_attribute): Replace DW_AT_GNU_ref_base with DW_AT_GNU_ranges_base. gcc

  1   2   3   4   >