Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types

2015-04-23 Thread Jan Kratochvil
On Fri, 24 Apr 2015 00:06:46 +0200, Jeff Law wrote: > On 04/18/2015 04:19 AM, Jan Kratochvil wrote: > > Instead of current: > > plugin_build_record_type: > > record_type = make_node (RECORD_TYPE) > > plugin_build_add_field: > > add f

Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types

2015-04-18 Thread Jan Kratochvil
On Fri, 17 Apr 2015 17:22:13 +0200, Jan Kratochvil wrote: > How to get 'volatile struct sv' GCC 'tree' type for: > volatile struct sv { volatile struct sv *p; }; I have found out how it can work, even with no change on the GCC side: Instead of current:

Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types

2015-04-17 Thread Jan Kratochvil
On Tue, 14 Apr 2015 08:09:05 +0200, Jan Kratochvil wrote: > On Fri, 10 Apr 2015 14:31:45 +0200, Jan Kratochvil wrote: > > What is the recommended fix? I expect pointer to a declaration / opaque > > type > > which gets completed only when one references the 'p' f

Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types

2015-04-13 Thread Jan Kratochvil
On Fri, 10 Apr 2015 14:31:45 +0200, Jan Kratochvil wrote: > What is the recommended fix? I expect pointer to a declaration / opaque type > which gets completed only when one references the 'p' field later? It looks as it got fixed by: -plugin_build_record_type (cc1_plugin::

Re: How to implement '@' GDB-like operator for libcc1

2015-03-21 Thread Jan Kratochvil
On Mon, 16 Mar 2015 15:43:21 +0100, Tom Tromey wrote: > It seems like there should be some kind of reference to &op0, that is, > lowering ATSIGN_EXPR to *(typeof(OP0)[OP1]*)(&OP0). OK, I got it now. I was using GDB-like 'struct type *' where 'struct value *' should have been as in GCC both are 't

Re: How to implement '@' GDB-like operator for libcc1

2015-03-16 Thread Jan Kratochvil
On Mon, 16 Mar 2015 10:33:26 +0100, Manuel López-Ibáñez wrote: > On 16 March 2015 at 09:32, Jan Kratochvil wrote: > > On Mon, 16 Mar 2015 04:22:35 +0100, Manuel López-Ibáñez wrote: > >> Thus, the question is what info GDB needs from GCC to be able to print > >>

Re: How to implement '@' GDB-like operator for libcc1

2015-03-16 Thread Jan Kratochvil
On Mon, 16 Mar 2015 04:22:35 +0100, Manuel López-Ibáñez wrote: > > > > But GDB features a useful custom expression operator '@': > > https://sourceware.org/gdb/onlinedocs/gdb/Arrays.html > > > > I have problems implementing '@' into GCC, could you suggest at which place > > should I call build_

How to implement '@' GDB-like operator for libcc1

2015-03-15 Thread Jan Kratochvil
Hi, based on the GCC libcc1 plugin GDB will implement GDB command 'compile print' equivalent to default 'print' but evaluating the expression by GCC: https://github.com/tromey/gdb/tree/pmuldoon/compile/print It is currently done by compiling a .c->.o file and checking its DWARF for the ty

Re: [GCC PR55056] Re: [RFC patch] testsuite: Workaround issues with GCC 4.8.0pre + gdb.trace new KFAIL

2013-06-14 Thread Jan Kratochvil
On Fri, 14 Jun 2013 15:02:47 +0200, Thomas Schwinge wrote: > On Sun, 3 Feb 2013 18:27:21 +0100, Jan Kratochvil > wrote: > > gdb/testsuite/ > > 2013-02-02 Jan Kratochvil > > > > Workaround GCC PR debug/55056 and GDB PR server/15081. > > * gdb.bas

Re: stabs/dwarf size comparison on CSiBE (Was: stabs support in binutils, gcc, and gdb)

2013-01-15 Thread Jan Kratochvil
On Tue, 15 Jan 2013 11:09:46 +0100, Steven Bosscher wrote: > Unless someone can shoot holes in this test approach, While the sum of *.o files sizes may make sense in some cases I would find more useful to measure it only for the final executables and after they have been processed by dwz. Besides

Re: stabs support in binutils, gcc, and gdb

2013-01-14 Thread Jan Kratochvil
On Mon, 14 Jan 2013 17:12:25 +0100, Doug Evans wrote: > Not that I think it's a priori worth the effort to dig deeper, but for > another datapoint, Redhat added an lza-compressed mini-dwarf-debug > section. I'm not sure what it supports (if anything beyond making > backtraces better). It can cont

-fdebug-types-section unidentifiable anonymous struct (PR debug/49750)

2011-09-28 Thread Jan Kratochvil
Hi all and Cary, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49750 It is a part of former Bug (FIXED): http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510 currently -fdebug-types-section regresses GDB testsuite for: FAIL: gdb.cp/anon-struct.exp: print type of X::t2::t2 FAIL: gdb.cp/

Re: RFC: DWARF Extensions for Separate Debug Info Files ("Fission")

2011-09-23 Thread Jan Kratochvil
On Fri, 23 Sep 2011 02:21:44 +0200, Cary Coutant wrote: > * .debug_pubtypes - Public types for use in building the > .gdb_index section at link time. This section will have an > extended format to allow it to represent both types in the > .debug_dwo_info section and type units in .debug_types

C++ member function template id not matching linkage name (PR debug/49408)

2011-06-15 Thread Jan Kratochvil
Hi, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49408 struct S { void m (int x) {} }; template struct K { void f () { S s; (s.*F) (5); } }; int main () { K<&S::m> k; k.f (); } <1><64>: Abbrev Number: 8 (DW_TAG_structure_type) <65> DW_AT_name: K<&S::m>

Re: debugging

2011-03-23 Thread Jan Kratochvil
On Wed, 23 Mar 2011 08:51:25 +0100, Jakub Jelinek wrote: > http://sourceware.org/git/?p=archer.git;a=shortlog;h=refs/heads/archer-jankratochvil-entryval > is the git branch with gdb support for this, though as I was told > it is a GDB 7.4 material rather than 7.3 (the msg00268.html > commit is hope

Re: dwarf2 - multiple DW_TAG_variable for global variable

2010-01-10 Thread Jan Kratochvil
On Sun, 10 Jan 2010 00:31:56 +0100, Nenad Vukicevic wrote: ... > <1><54>: Abbrev Number: 4 (DW_TAG_variable) > <55> DW_AT_name: (indirect string, offset: 0x38): x > <59> DW_AT_decl_file : 1 > <5a> DW_AT_decl_line : 1 > <5b> DW_AT_type: <0x4d> > <5f> DW_AT_external

Re: dwarf2 - multiple DW_TAG_variable for global variable

2010-01-09 Thread Jan Kratochvil
On Sat, 09 Jan 2010 22:01:54 +0100, Gary Funck wrote: > On 01/09/10 12:39:55, Nenad Vukicevic wrote: > > This dwarf code started appearing since this patch: > > Here's the GCC bug report that led to this patch: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39563 Such DIEs duplicities are being tr

Re: Strange error message from gdb

2007-12-22 Thread Jan Kratochvil
On Thu, 20 Dec 2007 15:33:14 +0100, Andrew Haley wrote: > Alexandre Oliva writes: > > > > How about this patch, instead? It will restore debuggability to Java > > while at the same time maintaining the progress of using the > > long-supported-by-GDB DW_TAG_class_type in both C++ and Java. > > >

[PATCH] Re: Unwinding CFI gcc practice of assumed `same value' regs

2006-12-13 Thread Jan Kratochvil
patches are be 100% reliable and also backward compatible. Regards, Jan 2006-12-13 Jan Kratochvil <[EMAIL PROTECTED]> * sysdeps/unix/sysv/linux/i386/clone.S: CFI `clone' unwinding outermost frame indicator replaced by more unwinders compatible termination ind

Re: Unwinding CFI gcc practice of assumed `same value' regs

2006-12-12 Thread Jan Kratochvil
On Tue, 12 Dec 2006 16:26:34 +0100, Andrew Haley wrote: ... > It's certainly an inconsistency in the specification, which says that > null-termination is supported, and this implies that you can't put a zero in > there. I tested now that you can put the zero there for both the libgcc unwinder and

Unwinding CFI gcc practice of assumed `same value' regs

2006-12-11 Thread Jan Kratochvil
Hello, currently (on x86_64) the gdb backtrace does not properly stop at the outermost frame: #3 0x0036ddb0610a in start_thread () from /lib64/tls/libpthread.so.0 #4 0x0036dd0c68c3 in clone () from /lib64/tls/libc.so.6 #5 0x in ?? () Currently it relies only on clearin

[32bit] `main' missing argc/argv DW_AT_location

2006-10-23 Thread Jan Kratochvil
Hi, is it a known bug that `main' function (and so even specially compiled with the specific prologue/epilogue) missing DWARF `DW_AT_location' for its `argc' and `argv' on 32-bit targets? I did not find a Bugzilla entry for it. affected: x86_64-redhat-linux with -m32, i386-redhat-linux not affec