STABS and xcoff have been removed, but are still in debug_type_names,
which ought to match debug_type_masks. This results in the following
minor bug with GCC 13:
$ x86_64-pc-linux-gnu-gcc -gvms -c tmp.c
cc1: error: target system does not support the ‘dwarf-2’ debug format
---
gcc/opts.cc | 4 ++--
Outputs the S_COMPILE3 symbol in the CodeView .debug$S debug section.
The DEBUG_S_SYMBOLS block added here makes up pretty much everything
that isn't data structures or line numbers; we add the S_COMPILE3 symbol
here to start it off.
This is a descriptive bit, the most interesting part of which is
Outputs the file name and MD5 hash of the main source file into the
CodeView .debug$S section, along with that of any #include'd files.
---
gcc/dwarf2codeview.cc | 254 ++
gcc/dwarf2codeview.h | 1 +
gcc/dwarf2out.cc | 3 +
3 files changed, 258 ins
This patch and the following add initial support for Microsoft's
CodeView debugging format, as used by MSVC, to mingw targets.
Note that you will need a recent version of binutils for this to be
useful. The best way to view the output is to run Microsoft's
cvdump.exe, found in their microsoft-pdb
Outputs the DEBUG_S_LINES block in the CodeView .debug$S section, which
maps between line numbers and addresses.
You'll need a fairly recent version of GAS for the .secidx directive to
be recognized.
---
gcc/dwarf2codeview.cc | 303 ++
gcc/dwarf2codeview.h
On 26/10/23 10:35, Richard Biener wrote:
On Mon, Oct 23, 2023 at 2:57 AM Mark Harmstone wrote:
This patch and the following add initial support for Microsoft's
CodeView debugging format, as used by MSVC, to mingw targets.
A high-level question - it seems there's almost no informat
Changes from initial version:
* First patch now accepted
* Added #ifdefs to avoid compilation failures on other targets
Outputs the DEBUG_S_LINES block in the CodeView .debug$S section, which
maps between line numbers and addresses.
You'll need a fairly recent version of GAS for the .secidx directive to
be recognized.
---
gcc/dwarf2codeview.cc | 303 ++
gcc/dwarf2codeview.h
Outputs the S_COMPILE3 symbol in the CodeView .debug$S debug section.
The DEBUG_S_SYMBOLS block added here makes up pretty much everything
that isn't data structures or line numbers; we add the S_COMPILE3 symbol
here to start it off.
This is a descriptive bit, the most interesting part of which is
This patch and the following add initial support for Microsoft's
CodeView debugging format, as used by MSVC, to mingw targets.
Note that you will need a recent version of binutils for this to be
useful. The best way to view the output is to run Microsoft's
cvdump.exe, found in their microsoft-pdb
Outputs the file name and MD5 hash of the main source file into the
CodeView .debug$S section, along with that of any #include'd files.
---
gcc/dwarf2codeview.cc | 254 ++
gcc/dwarf2codeview.h | 1 +
gcc/dwarf2out.cc | 5 +
3 files changed, 260 ins
Both current lld and the next version of ld have an option -pdb, which
creates a PDB file which Microsoft's debuggers can use. This patch adds
a -gcodeview option, which passes this to the linker.
I do intend to expand this so it also creates the .debug$S and .debug$T
sections which would make thi
On 24/10/22 12:08, Martin Storsjö wrote:
Hmm, what does this end up passing to the linker in the end - does it just pass "-pdb="? (What does the "*" parameter do here?) If that's the case - that sounds reasonable - assuming that if a user passes an extra -Wl,--pdb,myspecificname.pdb, that would ta
On 25/10/22 09:21, Martin Storsjö wrote:
Btw, stylistically, should we strive towards using double dashes for the pdb option? I
think that's the most canonical way for such getopt options (even though it doesn't make
any practical difference). I've started trying to update various users to pref
Changed to double dashes as per
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
---
gcc/common.opt | 4
gcc/doc/invoke.texi | 7 +++
gcc/gcc.cc | 4
gcc/opts.cc | 3 +++
4 files changed, 18 insertions(+)
diff --git a/gcc/common.opt b/gcc/co
nsuring support for the AArch64 architecture
within these libraries. These changes collectively enhance the
capabilities of GCC for the specified target.
Coauthors: Zac Walker ,
Mark Harmstone and
Ron Riddle
Refactored, prepared, and validated by
Radek Barton and
Evgeny Karpov
Special thanks t
On 22/2/24 11:11, Richard Earnshaw (lists) wrote:
Most of the free world has left COFF behind since several decades, so I won't
comment on that. YMMV.
This isn't helpful. Windows platforms use (a derivative of) COFF, so that's
what the tools need to use when targetting that platform.
Also,
On 23/2/24 17:54, Andrew Pinski wrote:
There is arm64ec ABI defined for aarch64 windows which is a different
ABI from the standard windows aarch64 ABI, though I am not sure if it
supported with the patches here.
It is documented at
https://learn.microsoft.com/en-us/cpp/build/arm64ec-windows-abi-c
Make everything more gdb-friendly by using an enum for type constants
rather than #defines.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Define.
(struct codeview_subtype): Use enum cv_leaf_type.
(struct codeview_custom_type): Use enum cv_leaf_type.
Make everything more gdb-friendly by using an enum for symbol constants
rather than #defines.
gcc/
* dwarf2codeview.cc (S_LDATA32, S_GDATA32, S_COMPILE3): Undefine.
(enum cv_sym_type): Define.
(struct codeview_symbol): Use enum cv_sym_type.
(writ
Adds names for the padding magic numbers to enum cv_leaf_type.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add padding constants.
(write_cv_padding): Use names for padding constants.
---
gcc/dwarf2codeview.cc | 11 +++
1 file changed, 7 insertions(+), 4 delet
CodeView symbols have to be multiples of four bytes; add an alignment
directive to write_data_symbol to ensure this.
Note that these can be zeroes, so we can rely on GAS to do this for us;
it's only types that need f3, f2, f1 values.
gcc/
* dwarf2codeview.cc (write_data_symbol): A
gcc/
* dwarf2codeview.cc (write_lf_modifier): Expand upon comment.
---
gcc/dwarf2codeview.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/dwarf2codeview.cc b/gcc/dwarf2codeview.cc
index 5a33b439b14..df53d8bab9d 100644
--- a/gcc/dwarf2codeview.cc
+++ b/gcc
Translate DW_TAG_subprogram DIEs into CodeView LF_FUNC_ID types and
S_GPROC32_ID / S_LPROC32_ID symbols. ld will then transform these into
S_GPROC32 / S_LPROC32 symbols, which map addresses to unmangled function
names.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add new values.
(
Translates DW_TAG_rvalue_reference_type DIEs into LF_POINTER types.
gcc/
* dwarf2codeview.cc (get_type_num_reference_type): Handle rvalue refs.
(get_type_num_array_type): Add DW_TAG_rvalue_reference_type to switch.
(get_type_num): Handle DW_TAG_rvalue_reference_type DIEs.
Translates DW_TAG_reference_type DIEs into LF_POINTER types.
gcc/
* dwarf2codeview.cc (get_type_num_reference_type): New function.
(get_type_num_array_type): Add DW_TAG_reference_type to switch.
(get_type_num): Handle DW_TAG_reference_type DIEs.
* dwarf2codeview.h (
Initialize last_type to 0 to silence two spurious maybe-uninitialized warnings.
We issue an LF_INDEX continuation subtype for any LF_FIELDLISTs that
overflow, so LF_INDEXes will always have a subtype preceding them (and
thus last_type will always be set).
gcc/
* dwarf2codeview.cc (get_type
Thanks for this - I've just submitted a patch to fix these warnings.
Mark
On 12/08/2024 20:09, Jan-Benedict Glaw wrote:
Building with a really recent GCC on the host for
--target=i686-mingw32crt or --target=i686-cygwin --enable-threads=yes,
I get these new warnings (--enable-werror-always is in
Outputs CodeView S_REGREL32 symbols for unoptimized local variables that
are stored on the stack. This includes a change to dwarf2out.cc to make
it easier to extract the function frame base without having to worry
about the function prologue or epilogue.
gcc/
* dwarf2codeview.cc (enum cv_s
Outputs CodeView S_LDATA32 symbols, for static variables within
functions, along with S_BLOCK32 and S_END for the beginning and end of
lexical blocks.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add S_END and S_BLOCK32.
(write_local_s_ldata32): New function.
(write_unoptim
Outputs CodeView S_REGISTER symbols, representing local variables or
parameters that are held in a register.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add S_REGISTER.
(enum cv_x86_register): New type.
(enum cv_amd64_register): New type.
(dwarf_reg_to_cv): New fun
wrote:
On 8/12/24 6:24 PM, Mark Harmstone wrote:
Outputs CodeView S_LDATA32 symbols, for static variables within
functions, along with S_BLOCK32 and S_END for the beginning and end of
lexical blocks.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add S_END and S_BLOCK32
Outputs S_DEFRANGE_REGISTER_REL symbols for optimized local variables that are
on the stack, consisting of the stack register, the offset, and the code range
for which this applies.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add S_DEFRANGE_REGISTER_REL.
(write_defrange_register_r
Write S_FRAMEPROC symbols, which aren't very useful but seem to be necessary
for Microsoft debuggers to function properly. These symbols come after S_LOCAL
symbols for optimized variables, but before S_REGISTER and S_REGREL32 for
unoptimized variables.
gcc/
* dwarf2codeview.cc (enum cv_sym
Write CodeView S_LDATA32 symbols for static locals in optimized code. We have
to handle these separately, as they come after the S_FRAMEPROC, plus you can't
have S_BLOCK32 symbols like you can in unoptimized code.
gcc/
* dwarf2codeview.cc (write_optimized_static_local_vars): New function.
Enable variable tracking when outputting CodeView debug information, and make
it so that we issue debug symbols for optimized variables in registers. This
consists of S_LOCAL symbols, which give the name and the type of local
variables, followed by S_DEFRANGE_REGISTER symbols for the register and t
Run all CodeView names through a new function get_name, which chains
together a DIE's DW_AT_name with that of its parent to create a
C++-style name.
gcc/
* dwarf2codeview.cc (get_name): New function.
(add_enum_forward_def): Call get_name.
(get_type_num_enumeration_type): Ca
If recording the definition of a struct member function, write an
LF_MFUNC_ID type rather than an LF_FUNC_ID. This links directly to the
struct type, rather than to an LF_STRING_ID with its name.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add LF_MFUNC_ID.
(write_lf_mfunc_id): Ne
If a function is in a namespace, create an LF_STRING_ID type for the
name of its parent, and record this in the LF_FUNC_ID type we create
for the function.
gcc/
* dwarf2codeview.cc (enum cf_leaf_type): Add LF_STRING_ID.
(struct codeview_custom_type): Add lf_string_id to union.
Record LF_STMEMBER field list subtypes to represent static data members
in structs.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add LF_STMEMBER.
(struct codeview_subtype): Add lf_static_member to union.
(write_lf_fieldlist): Handle LF_STMEMBER.
(add_struct_member)
CodeView has two ways of recording struct member functions.
Non-overloaded functions have an LF_ONEMETHOD sub-type in the field
list, which records the name and the function type (LF_MFUNCTION).
Overloaded functions have an LF_METHOD instead, which points to an
LF_METHODLIST, which is an array of l
Thanks Jeff. Yes, sounds good to me.
Mark
On 27/08/2024 16:23, Jeff Law wrote:
On 8/26/24 4:48 PM, Mark Harmstone wrote:
Run all CodeView names through a new function get_name, which chains
together a DIE's DW_AT_name with that of its parent to create a
C++-style name.
C++ things.
Mark Harmstone (11):
Output CodeView data about variables
Handle CodeView base types
Handle typedefs for CodeView
Handle pointers for CodeView
Handle const and varible modifiers for CodeView
Handle enums for CodeView
Handle structs and classes for CodeView
Handle
Translates DW_TAG_pointer_type DIEs into LF_POINTER symbols, which get
output into the .debug$T section.
gcc/
* dwarf2codeview.cc (FIRST_TYPE): Define.
(struct codeview_custom_type): New structure.
(custom_types, last_custom_type): New variables.
Parse the DW_TAG_variable DIEs, and outputs S_GDATA32 (for global variables)
and S_LDATA32 (static global variables) symbols into the .debug$S section.
gcc/
* dwarf2codeview.cc (S_LDATA32, S_GDATA32): Define.
(struct codeview_symbol): New structure.
(sym, la
Translates DW_TAG_structure_type DIEs into LF_STRUCTURE symbols, and
DW_TAG_class_type DIEs into LF_CLASS symbols.
gcc/
* dwarf2codeview.cc
(struct codeview_type): Add is_fwd_ref member.
(struct codeview_subtype): Add lf_member to union.
(struct
Translate DW_TAG_const_type and DW_TAG_volatile_type DIEs into
LF_MODIFIER symbols.
gcc/
* dwarf2codeview.cc
(struct codeview_custom_type): Add lf_modifier to union.
(write_cv_padding, write_lf_modifier): New functions.
(write_custom_types): Call
Translates structure members with DW_AT_data_bit_offset set in DWARF
into LF_BITFIELD symbols.
gcc/
* dwarf2codeview.cc
(struct codeview_custom_type): Add lf_bitfield to union.
(write_lf_bitfield): New function.
(write_custom_types): Call write_l
gcc/
* dwarf2codeview.cc (get_type_num): Handle typedefs.
---
gcc/dwarf2codeview.cc | 6 ++
1 file changed, 6 insertions(+)
diff --git a/gcc/dwarf2codeview.cc b/gcc/dwarf2codeview.cc
index eb7c1270e31..5006a176260 100644
--- a/gcc/dwarf2codeview.cc
+++ b/gcc/dwarf2codeview.cc
Adds a get_type_num function to translate type DIEs into CodeView
numbers, along with a hash table for this. For now we just deal with
the base types (integers, Unicode chars, floats, and bools).
gcc/
* dwarf2codeview.cc (struct codeview_type): New structure.
(struct d
Translates DW_TAG_enumeration_type DIEs into LF_ENUM symbols.
gcc/
* dwarf2codeview.cc (MAX_FIELDLIST_SIZE): Define.
(struct codeview_integer): New structure.
(struct codeview_subtype): Likewise
(struct codeview_custom_type): Add lf_fieldlist and
Translates DW_TAG_union_type DIEs into LF_UNION symbols.
gcc/
* dwarf2codeview.cc (write_lf_union): New function.
(write_custom_types): Call write_lf_union.
(add_struct_forward_def): Handle DW_TAG_union_type DIEs.
(get_type_num_struct): Handle un
Translates DW_TAG_array_type DIEs into LF_ARRAY symbols.
gcc/
* dwarf2codeview.cc
(struct codeview_custom_type): Add lf_array to union.
(write_lf_array): New function.
(write_custom_types): Call write_lf_array.
(get_type_num_array_typ
Translates DW_TAG_subroutine_type DIEs into LF_PROCEDURE symbols.
gcc/
* dwarf2codeview.cc
(struct codeview_custom_type): Add lf_procedure and lf_arglist
to union.
(write_lf_procedure, write_lf_arglist): New functions.
(write_cust
On 24/6/24 04:39, Jeff Law wrote:
So presumably you're freeing these objects elsewhere? I see the free
(custom_types), but I don' see where you free an subobjects. Did I miss
something?
I'll go ahead and commit, but please double check for memory leaks.
Thanks Jeff. I just realized I wro
Empty structs result in empty LF_FIELDLIST types, which are valid, but
we weren't accounting for this and assuming they had to contain
subtypes.
gcc/
* dwarf2codeview.cc (get_type_num_struct): Fix NULL pointer dereference.
---
gcc/dwarf2codeview.cc | 7 +--
1 file changed, 5 insertion
DWARF represents voids in DW_TAG_const_type and DW_TAG_volatile_type
DIEs by the absence of a DW_AT_type attribute, which we weren't handling
correctly.
gcc/
* dwarf2codeview.cc (get_type_num_const_type): Handle missing
DW_AT_type attribute.
(get_type_num_volatile_type): Li
e OPT_gstabs:
case OPT_gstabs_:
set_debug_level (DBX_DEBUG, code == OPT_gstabs_, arg, opts, opts_set,
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
new file mode 100644
index 000..e8f39bb64ea
--- /dev/null
+++ b/gcc/pdbout.c
@@ -0,0 +1,70 @@
+/* Output CodeView debugging information from G
---
gcc/pdbout.c | 149 +--
gcc/pdbout.h | 12 +
2 files changed, 158 insertions(+), 3 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index feaab37cc37..17011134d7a 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -29,14 +29,25 @@
#inclu
---
gcc/pdbout.c | 417 ++-
gcc/pdbout.h | 89 +++
2 files changed, 504 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index e8f39bb64ea..feaab37cc37 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -25,13 +25,37 @@
---
gcc/pdbout.c | 242 ++-
gcc/pdbout.h | 21 +
2 files changed, 260 insertions(+), 3 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 2f5b52b6fc3..29b0d1c131f 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -51,6 +51,7 @@ static vo
---
gcc/pdbout.c | 150 ++-
gcc/pdbout.h | 10
2 files changed, 159 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index a4424fa470d..040ac6fe8e4 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -54,6 +54,11 @@ static voi
---
gcc/pdbout.c | 195 ++-
gcc/pdbout.h | 16 +
2 files changed, 209 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 29b0d1c131f..a4424fa470d 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -32,6 +32,7 @@
#include
---
gcc/pdbout.c | 1272 +-
gcc/pdbout.h | 969 ++
2 files changed, 2238 insertions(+), 3 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 17011134d7a..2f5b52b6fc3 100644
--- a/gcc/pdbout.c
+++ b/gcc/p
---
gcc/pdbout.c | 338 ++-
gcc/pdbout.h | 23
2 files changed, 359 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 040ac6fe8e4..64f7c1d71bc 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -32,6 +32,7 @@
#include
---
gcc/pdbout.c | 131 ---
gcc/pdbout.h | 36 ++
2 files changed, 161 insertions(+), 6 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 64f7c1d71bc..08bb14364e5 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -76,6 +76,7 @@
---
gcc/pdbout.c | 85
gcc/pdbout.h | 11 +++
2 files changed, 96 insertions(+)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 08bb14364e5..fa3b1fb0312 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -78,6 +78,7 @@ static struct pdb_type *t
---
gcc/pdbout.c | 76 +++-
gcc/pdbout.h | 22 +++
2 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 8376b0e762c..5089203e339 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -55,6 +55,7 @@ st
---
gcc/pdbout.c | 133 +++
gcc/pdbout.h | 15 ++
2 files changed, 148 insertions(+)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index fa3b1fb0312..8376b0e762c 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -79,6 +79,7 @@ static struct pdb_type *
---
gcc/pdbout.c | 449 +++
gcc/pdbout.h | 43 +
2 files changed, 492 insertions(+)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 5089203e339..9701aaf8902 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -46,6 +46,8 @@
#define FIRST_TYPE_NUM
---
gcc/pdbout.c | 62 +++-
gcc/pdbout.h | 1 +
2 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 3bfec519877..7d493513e06 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -829,6 +829,7 @@ free_type (st
---
gcc/pdbout.c | 469 ++-
gcc/pdbout.h | 51 ++
2 files changed, 517 insertions(+), 3 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 9701aaf8902..3bfec519877 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -83,6 +83,7 @@ static s
---
gcc/pdbout.c | 93 ++--
gcc/pdbout.h | 8 +
2 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 7d493513e06..d3f251f22d2 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -85,6 +85,7 @@ static stru
---
gcc/pdbout.c | 93 ++--
1 file changed, 91 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index d3f251f22d2..fb40f066bd9 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -1484,24 +1484,113 @@ pdbout_finish (const char *fil
---
gcc/pdbout.c | 346 ++-
1 file changed, 344 insertions(+), 2 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index fb40f066bd9..0cae4d33469 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -73,6 +73,7 @@ static void pdbout_end_block (unsign
---
gcc/pdbout.c | 79 +++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 0cae4d33469..dae5c1ef679 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -3344,6 +3344,8 @@ alias_hasher::equal (const value_t
---
gcc/pdbout.c | 208 ++-
gcc/pdbout.h | 10 +++
2 files changed, 217 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index dae5c1ef679..8dbd8f58a87 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -79,6 +79,7 @@ static struc
---
gcc/pdbout.c | 256 ++-
gcc/pdbout.h | 1 +
2 files changed, 254 insertions(+), 3 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 8dbd8f58a87..3d15c620db5 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -1438,7 +1438,8 @@ write_typ
---
gcc/pdbout.c | 151 ++-
gcc/pdbout.h | 1 +
2 files changed, 151 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 3d15c620db5..d9ad659cd9a 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -84,7 +84,7 @@ static struct
---
gcc/pdbout.c | 226 ++-
gcc/pdbout.h | 2 +
2 files changed, 170 insertions(+), 58 deletions(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index 0f5315f7f07..b4528fb79e8 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -71,6 +71,7 @@ static void
---
gcc/pdbout.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gcc/pdbout.c b/gcc/pdbout.c
index d9ad659cd9a..0f5315f7f07 100644
--- a/gcc/pdbout.c
+++ b/gcc/pdbout.c
@@ -2175,7 +2175,33 @@ get_tree_name (tree t)
static const char anon_ns[] = "
Thanks Richard.
> How do CV and DWARF debug differ and is emitting CV debug from a DWARF
> representation possible (I suppose there might even exist offline
> conversion tools?)
I don't know enough about DWARF internals to answer that, but I'd be surprised
if the answer is "no".
Do you mean that
On 20/11/22 16:43, Jeff Law wrote:
On 10/26/22 21:38, Mark Harmstone wrote:
Changed to double dashes as per
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604287.html.
What value is there in providing this option now? IIUC we don't have any of
the bits yet to actually produc
Translate DW_TAG_ptr_to_member_type DIEs into special extended
LF_POINTER CodeView types.
gcc/
* dwarf2codeview.cc (struct codeview_custom_type): Add new fields to
lf_pointer struct in union.
(write_lf_pointer): Write containing_class and ptr_to_mem_type if
applicab
Follow MSVC in having a special type value, T_HRESULT, for (signed)
longs that have been typedef'd with the name "HRESULT". This is so that
the debugger can display user-friendly constant names when debugging COM
code.
gcc/
* dwarf2codeview.cc (get_type_num_typedef): New function.
When writing the CodeView type definition for a struct, translate
DW_TAG_inheritance DIEs into LF_BCLASS records, to record which other
structs this one inherits from.
gcc/
* dwarf2codeview.cc (enum cv_leaf_type): Add LF_BCLASS.
(struct codeview_subtype): Add lf_bclass to union.
If a function is contained in two sections, for instance if it is
partially cold, it gets a DW_AT_ranges attribute in its DIE rather than
the normal DW_AT_low_pc and DW_AT_high_pc.
There's no way to express this in CodeView, so rather than skipping the
function entirely, use the labels in the firs
When outputting the .debug$S CodeView section, also write an
S_INLINEELINES subsection, which records the filename and line number of
the start of each inlined function.
gcc/
* dwarf2codeview.cc (DEBUG_S_INLINEELINES): Define.
(CV_INLINEE_SOURCE_LINE_SIGNATURE): Define.
(st
Add a parameter to the begin_block debug hook that is a pointer to the
tree_node of the block in question. CodeView needs this as it records
line numbers of inlined functions in a different manner, so we need to
be able to tell if the block is actually the start of an inlined
function.
gcc/
If we encounter an inlined function, treat it as another
codeview_function, and skip over these when outputting line numbers.
This information will instead be output as part of the S_INLINESITE
symbols.
gcc/
* dwarf2codeview.cc (struct codeview_function): Add parent and
inline_bloc
Translate DW_TAG_inlined_subroutine DIEs into S_INLINESITE CodeView
symbols, marking inlined functions.
gcc/
* dwarf2codeview.cc (enum cv_sym_type): Add S_INLINESITE and
S_INLINESITE_END.
(get_func_id): Add declaration.
(write_s_inlinesite): New function.
(w
Add "binary annotations" at the end of CodeView S_INLINESITE symbols,
which are a series of compressed integers that represent how line
numbers map to addresses.
This requires assembler support; you will need commit b3aa594d ("gas:
add .cv_ucomp and .cv_scomp pseudo-directives") in binutils.
gcc/
On 18/11/2024 05:05, Jeff Law wrote:
On 11/17/24 9:01 AM, Mark Harmstone wrote:
If a CodeView struct, class, or union has as a member an anonymous
struct, class, or union, this gets flattened. The sub-struct's members
will appear as if they were part of their parent.
For this, we move
On 18/11/2024 04:57, Jeff Law wrote:
On 11/17/24 8:40 AM, Mark Harmstone wrote:
Add "binary annotations" at the end of CodeView S_INLINESITE symbols,
which are a series of compressed integers that represent how line
numbers map to addresses.
This requires assembler support; you
If a CodeView struct, class, or union has as a member an anonymous
struct, class, or union, this gets flattened. The sub-struct's members
will appear as if they were part of their parent.
For this, we move part of get_type_num_struct into a new function
add_to_fieldlist, which also handles creatin
If the DIE for a struct, class, or union contains a nested type, add a
LF_NESTTYPE entry to its field list recording this.
Plus if we use a nested type, make sure that its parent also gets
defined. This may entail adding a forward definition and creating a
deferred type, so we need to call flush_d
Add "binary annotations" at the end of CodeView S_INLINESITE symbols,
which are a series of compressed integers that represent how line
numbers map to addresses.
This requires assembler support; you will need commit b3aa594d ("gas:
add .cv_ucomp and .cv_scomp pseudo-directives") in binutils.
gcc/
CodeView symbols in PDB files are aligned to four-byte boundaries. It's
not really clear what logic MSVC uses to enforce this; sometimes the
symbols are padded in the object file, sometimes the linker seems to do
the work.
It makes more sense to do this in the compiler, so fix the two instances
wh
Commit 4ed189854eae ("Add block parameter to begin_block debug hook") changed
the definition of the begin_block function pointer to add another parameter,
but I missed a call in vmsdbgout_begin_block.
Fixes bug #118123.
gcc/
* vmsdbgout.cc (vmsdbgout_begin_block): Fix compilation error.
-
99 matches
Mail list logo