Commit Graph

107120 Commits

Author SHA1 Message Date
GDB Administrator
f76f728ffd Automatic date update in version.in 2021-12-23 00:00:37 +00:00
GDB Administrator
a370d72ecf Automatic date update in version.in 2021-12-22 00:00:26 +00:00
GDB Administrator
929b774352 Automatic date update in version.in 2021-12-21 00:00:35 +00:00
GDB Administrator
5605cc18dd Automatic date update in version.in 2021-12-20 00:00:24 +00:00
GDB Administrator
d98eeb47ea Automatic date update in version.in 2021-12-19 00:00:39 +00:00
GDB Administrator
810d072bd7 Automatic date update in version.in 2021-12-18 00:00:24 +00:00
GDB Administrator
e3d95ca82e Automatic date update in version.in 2021-12-17 00:00:34 +00:00
GDB Administrator
e6e466cedd Automatic date update in version.in 2021-12-16 00:00:24 +00:00
GDB Administrator
ea170f6ffe Automatic date update in version.in 2021-12-15 00:00:39 +00:00
GDB Administrator
45be8a2b16 Automatic date update in version.in 2021-12-14 00:00:23 +00:00
GDB Administrator
273fac204d Automatic date update in version.in 2021-12-13 00:00:23 +00:00
GDB Administrator
ab55bbac1f Automatic date update in version.in 2021-12-12 00:00:18 +00:00
Bruno Larsen
b6fc91c70a PR gdb/28480: Improve ambiguous member detection
Basic ambiguity detection assumes that when 2 fields with the same name
have the same byte offset, it must be an unambiguous request. This is not
always correct. Consider the following code:

class empty { };

class A {
public:
  [[no_unique_address]] empty e;
};

class B {
public:
  int e;
};

class C: public A, public B { };

if we tried to use c.e in code, the compiler would warn of an ambiguity,
however, since A::e does not demand an unique address, it gets the same
address (and thus byte offset) of the members, making A::e and B::e have the
same address. however, "print c.e" would fail to report the ambiguity,
and would instead print it as an empty class (first path found).

The new code solves this by checking for other found_fields that have
different m_struct_path.back() (final class that the member was found
in), despite having the same byte offset.

The testcase gdb.cp/ambiguous.exp was also changed to test for this
behavior.

gdb/ChangeLog:

        PR gdb/28480
        * valops.c (struct_field_searcher::update_result): Improve
        ambiguous member detection.

gdb/testsuite/ChangeLog:

        PR gdb/28480

        Pushed by Joel Brobecker  <brobecker@adacore.com>
        * gdb.cp/ambiguous.cc: Add code to permit ambiguous member testing.
        * gdb.cp/ambiguous.exp: Add ambiguous member test.

(cherry picked from commit a41ad3474c)
2021-12-11 11:47:53 +04:00
GDB Administrator
773d894825 Automatic date update in version.in 2021-12-11 00:00:18 +00:00
GDB Administrator
2d77b379a9 Automatic date update in version.in 2021-12-10 00:00:33 +00:00
GDB Administrator
2d5dce68ed Automatic date update in version.in 2021-12-09 00:00:34 +00:00
GDB Administrator
d317660e0f Automatic date update in version.in 2021-12-08 00:00:27 +00:00
GDB Administrator
f032db248f Automatic date update in version.in 2021-12-07 00:00:22 +00:00
GDB Administrator
50cf27bed5 Automatic date update in version.in 2021-12-06 00:00:25 +00:00
GDB Administrator
f6447d9f92 Automatic date update in version.in 2021-12-05 00:00:31 +00:00
GDB Administrator
fc73c76917 Automatic date update in version.in 2021-12-04 00:00:26 +00:00
GDB Administrator
59830e9697 Automatic date update in version.in 2021-12-03 00:00:25 +00:00
GDB Administrator
63d2050f29 Automatic date update in version.in 2021-12-02 00:00:27 +00:00
GDB Administrator
c652828a45 Automatic date update in version.in 2021-12-01 00:00:24 +00:00
GDB Administrator
70dbf597ad Automatic date update in version.in 2021-11-30 00:00:35 +00:00
Tom Tromey
29b161c9be Allow DW_ATE_UTF for Rust characters
The Rust compiler plans to change the encoding of a Rust 'char' type
to use DW_ATE_UTF.  You can see the discussion here:

    https://github.com/rust-lang/rust/pull/89887

However, this fails in gdb.  I looked into this, and it turns out that
the handling of DW_ATE_UTF is currently fairly specific to C++.  In
particular, the code here assumes the C++ type names, and it creates
an integer type.

This comes from commit 53e710acd ("GDB thinks char16_t and char32_t
are signed in C++").  The message says:

    Both places need fixing.  But since I couldn't tell why dwarf2read.c
    needs to create a new type, I've made it use the per-arch built-in
    types instead, so that the types are only created once per arch
    instead of once per objfile.  That seems to work fine.

... which is fine, but it seems to me that it's also correct to make a
new character type; and this approach is better because it preserves
the type name as well.  This does use more memory, but first we
shouldn't be too concerned about the memory use of types coming from
debuginfo; and second, if we are, we should implement type interning
anyway.

Changing this code to use a character type revealed a couple of
oddities in the C/C++ handling of TYPE_CODE_CHAR.  This patch fixes
these as well.

I filed PR rust/28637 for this issue, so that this patch can be
backported to the gdb 11 branch.

(cherry picked from commit 1c0e43634c)
2021-11-29 13:26:44 -07:00
GDB Administrator
a15b33284f Automatic date update in version.in 2021-11-29 00:00:19 +00:00
GDB Administrator
9c23016e64 Automatic date update in version.in 2021-11-28 00:00:25 +00:00
GDB Administrator
f7f95dcace Automatic date update in version.in 2021-11-27 00:00:25 +00:00
GDB Administrator
06c0d1d26c Automatic date update in version.in 2021-11-26 00:00:36 +00:00
GDB Administrator
3dbaf8b8d6 Automatic date update in version.in 2021-11-25 00:00:28 +00:00
GDB Administrator
5fcc74d627 Automatic date update in version.in 2021-11-24 00:00:20 +00:00
GDB Administrator
11d793d493 Automatic date update in version.in 2021-11-23 00:00:32 +00:00
GDB Administrator
a3d56dd2ce Automatic date update in version.in 2021-11-22 00:00:28 +00:00
GDB Administrator
fa99595e20 Automatic date update in version.in 2021-11-21 00:00:24 +00:00
GDB Administrator
8bf74da8b5 Automatic date update in version.in 2021-11-20 00:00:23 +00:00
GDB Administrator
844167be7e Automatic date update in version.in 2021-11-19 00:00:21 +00:00
GDB Administrator
cd7cd26244 Automatic date update in version.in 2021-11-18 00:00:28 +00:00
GDB Administrator
999d24edf9 Automatic date update in version.in 2021-11-17 00:00:22 +00:00
GDB Administrator
505b342993 Automatic date update in version.in 2021-11-16 00:00:20 +00:00
GDB Administrator
13ba01c9c0 Automatic date update in version.in 2021-11-15 00:00:40 +00:00
GDB Administrator
e16aac146c Automatic date update in version.in 2021-11-14 00:00:26 +00:00
GDB Administrator
84c7311167 Automatic date update in version.in 2021-11-13 00:00:49 +00:00
GDB Administrator
c340a77598 Automatic date update in version.in 2021-11-12 00:00:57 +00:00
GDB Administrator
08487122c9 Automatic date update in version.in 2021-11-11 00:00:49 +00:00
GDB Administrator
30e9dd04ca Automatic date update in version.in 2021-11-10 00:00:40 +00:00
Tom Tromey
df9ebc472a Fix build on rhES5
The rhES5 build failed due to an upstream import a while back.  The
bug here is that, while the 'personality' function exists,
ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not
<sys/personality.h>.

However, <linux/personality.h> does not declare the 'personality'
function, and <sys/personality.h> and <linux/personality.h> cannot
both be included.

This patch restores one of the removed configure checks and updates
the code to check it.

We had this as a local patch at AdaCore, because it seemed like there
was no interest upstream.  However, now it turns out that this fixes
PR build/28555, so I'm sending it now.
2021-11-09 14:21:39 -07:00
GDB Administrator
73bcd9e0d6 Automatic date update in version.in 2021-11-09 00:00:40 +00:00
GDB Administrator
c43a199306 Automatic date update in version.in 2021-11-08 00:00:33 +00:00
GDB Administrator
3de9076f4a Automatic date update in version.in 2021-11-07 00:00:23 +00:00