Age | Commit message (Collapse) | Author | Files | Lines |
|
This changes some tests to use "require is_c_compiler_gcc".
|
|
This changes some tests to use "require dwarf2_support".
|
|
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
|
|
After this commit the gcc_compiled global is no longer exported from
lib/gdb.exp. In theory we could switch over all uses of gcc_compiled
to instead call test_compiler_info directly, however, I have instead
added a new proc to gdb.exp: 'is_c_compiler_gcc'. I've then updated
the testsuite to call this proc instead of using the global.
Having a new proc specifically for this task means that we have a
single consistent pattern for detecting gcc. By wrapping this logic
within a proc that calls test_compiler_info, rather than using the
global, means that test scripts don't need to call get_compiler_info
before they read the global, simply calling the new proc does
everything in one go.
As a result I've been able to remove the get_compiler_info calls from
all the test scripts that I've touched in this commit.
In some of the tests e.g. gdb.dwarf2/*.exp, the $gcc_compiled flag was
being checked at the top of the script to decide if the whole script
should be skipped or not. In these cases I've called the new proc
directly and removed all uses of gcc_compiled.
In other cases, e.g. most of the gdb.base scripts, there were many
uses of gcc_compiled. In these cases I set a new global gcc_compiled
near the top of the script, and leave the rest of the script
unchanged.
There should be no changes in what is tested after this commit.
|
|
This commit brings all the changes made by running gdb/copyright.py
as per GDB's Start of New Year Procedure.
For the avoidance of doubt, all changes in this commits were
performed by the script.
|
|
While looking into a failure in gdb.go/package.exp with gcc-11, I noticed that
gdb shows some complaints when loading the executable (also with gcc-10, where
the test-case passes):
...
$ gdb -batch -iex "set complaints 100" package.10 -ex start
During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset)
Temporary breakpoint 1 at 0x402ae6: file gdb.go/package1.go, line 8.
During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset)
During symbol reading: Invalid .debug_rnglists data (no base address)
...
Fix this by using as_unsigned () to read DW_AT_ranges in the partial DIE
reader, similar to how that is done in dwarf2_get_pc_bounds.
Tested on x86_64-linux.
gdb/ChangeLog:
2021-01-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
Simon Marchi <simon.marchi@polymtl.ca>
Tom de Vries <tdevries@suse.de>
* dwarf2/read.c (partial_die_info::read): Use as_unsigned () for
DW_AT_ranges.
gdb/testsuite/ChangeLog:
2021-01-25 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/dw2-ranges-psym.exp (gdb_load_no_complaints): New proc.
* lib/gdb.exp: Use gdb_load_no_complaints.
|
|
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
|
|
When creating a .debug_ranges section using the testsuite's DWARF
assembler, it currently looks like this:
ranges {
sequence {
{base ...}
{range ...}
{range ...}
}
}
The sub-tree of sequence is manually traversed as a list of lists. I
think it would be nicer if `base` and `range` where procedure, just like
the other levels:
ranges {
sequence {
base ...
range ...
range ...
}
}
That makes the implementation more robust, and the usage a bit nicer
(less special characters). It also allows having comments in between
the range list entries:
ranges {
sequence {
base ...
range ...
# Hello world.
range ...
}
}
... which doesn't work with the current approach.
gdb/testsuite/ChangeLog:
* lib/dwarf.exp (ranges): Handle "base" and "range" as
proceduresu.
* gdb.dwarf/dw2-bad-elf.exp: Adjust.
* gdb.dwarf2/dw2-inline-many-frames.exp: Adjust.
* gdb.dwarf2/dw2-inline-stepping.exp: Adjust.
* gdb.dwarf2/dw2-ranges-base.exp: Adjust.
* gdb.dwarf2/dw2-ranges-func.exp: Adjust.
* gdb.dwarf2/dw2-ranges-overlap.exp: Adjust.
* gdb.dwarf2/dw2-ranges-psym.exp: Adjust.
* gdb.dwarf2/enqueued-cu-base-addr.exp: Adjust.
Change-Id: I0b2af480faff54d0fd4214e0cc8d042d9583a865
|
|
There's a common occurance in dwarf assembly test-cases, where a file test.exp
contains:
...
standard_testfile test.c test-dw.S
...
The "test.c" arg can be abbreviated to ".c".
Make standard_testfile treat args with "-" prefix the same as with "." prefix,
such that we can write:
...
standard_testfile .c -dw.S
...
and apply this in gdb.dwarf2/*.exp.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-10-17 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (standard_testfile): Also treat args starting with '-'
as suffix.
* gdb.dwarf2/atomic.c: Rename to ...
* gdb.dwarf2/atomic-type.c: ... this.
* gdb.dwarf2/dw2-ranges2.c: Rename to ...
* gdb.dwarf2/dw2-ranges-2.c: ... this.
* gdb.dwarf2/dw2-ranges3.c: Rename to ...
* gdb.dwarf2/dw2-ranges-3.c: ... this.
* gdb.dwarf2/fission-mix2.c: Rename to ...
* gdb.dwarf2/fission-mix-2.c: ... this.
* gdb.dwarf2/ada-linkage-name.exp: Use more suffix args for
standard_testfile.
* gdb.dwarf2/ada-valprint-error.exp: Same.
* gdb.dwarf2/arr-stride.exp: Same.
* gdb.dwarf2/arr-subrange.exp: Same.
* gdb.dwarf2/atomic-type.exp: Same.
* gdb.dwarf2/bad-regnum.exp: Same.
* gdb.dwarf2/break-inline-psymtab.exp: Same.
* gdb.dwarf2/clang-debug-names-2.exp: Same.
* gdb.dwarf2/clang-debug-names.exp: Same.
* gdb.dwarf2/comp-unit-lang.exp: Same.
* gdb.dwarf2/corrupt.exp: Same.
* gdb.dwarf2/count.exp: Same.
* gdb.dwarf2/cpp-linkage-name.exp: Same.
* gdb.dwarf2/data-loc.exp: Same.
* gdb.dwarf2/dw2-align.exp: Same.
* gdb.dwarf2/dw2-bad-elf.exp: Same.
* gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Same.
* gdb.dwarf2/dw2-bad-unresolved.exp: Same.
* gdb.dwarf2/dw2-case-insensitive.exp: Same.
* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Same.
* gdb.dwarf2/dw2-ifort-parameter.exp: Same.
* gdb.dwarf2/dw2-inline-many-frames.exp: Same.
* gdb.dwarf2/dw2-inline-param.exp: Same.
* gdb.dwarf2/dw2-inline-small-func.exp: Same.
* gdb.dwarf2/dw2-inline-stepping.exp: Same.
* gdb.dwarf2/dw2-is-stmt-2.exp: Same.
* gdb.dwarf2/dw2-is-stmt.exp: Same.
* gdb.dwarf2/dw2-line-number-zero.exp: Same.
* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Same.
* gdb.dwarf2/dw2-opt-structptr.exp: Same.
* gdb.dwarf2/dw2-param-error.exp: Same.
* gdb.dwarf2/dw2-ranges-base.exp: Same.
* gdb.dwarf2/dw2-ranges.exp: Same.
* gdb.dwarf2/dw2-unusual-field-names.exp: Same.
* gdb.dwarf2/dw2-vendor-extended-opcode.exp: Same.
* gdb.dwarf2/dw4-sig-types.exp: Same.
* gdb.dwarf2/dynarr-ptr.exp: Same.
* gdb.dwarf2/enum-type.exp: Same.
* gdb.dwarf2/fission-mix.exp: Same.
* gdb.dwarf2/formdata16.exp: Same.
* gdb.dwarf2/implptrconst.exp: Same.
* gdb.dwarf2/implptrpiece.exp: Same.
* gdb.dwarf2/info-locals-optimized-out.exp: Same.
* gdb.dwarf2/main-subprogram.exp: Same.
* gdb.dwarf2/method-ptr.exp: Same.
* gdb.dwarf2/missing-sig-type.exp: Same.
* gdb.dwarf2/nonvar-access.exp: Same.
* gdb.dwarf2/opaque-type-lookup.exp: Same.
* gdb.dwarf2/shortpiece.exp: Same.
* gdb.dwarf2/staticvirtual.exp: Same.
* gdb.dwarf2/subrange.exp: Same.
* gdb.dwarf2/symtab-producer.exp: Same.
* gdb.dwarf2/typedef-void-finish.exp: Same.
* gdb.dwarf2/var-access.exp: Same.
* gdb.dwarf2/variant.exp: Same.
* gdb.dwarf2/void-type.exp: Same.
* gdb.dwarf2/dw2-ranges-psym.exp: Same. Use main.c instead of
dw2-ranges-main.c.
* gdb.dwarf2/dw2-ranges-main.c: Remove.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...
Detect this pattern in proc gdb_test:
...
global gdb_prompt
upvar timeout timeout
if [llength $args]>2 then {
set message [lindex $args 2]
+ if { $message == [lindex $args 0] && [llength $args] == 3 } {
+ error "HERE"
+ }
} else {
set message [lindex $args 0]
}
...
and fix all occurrences in some gdb testsuite subdirs.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-10-31 Tom de Vries <tdevries@suse.de>
* gdb.arch/amd64-disp-step-avx.exp: Drop superfluous 3rd argument to
gdb_test.
* gdb.arch/amd64-disp-step.exp: Same.
* gdb.asm/asm-source.exp: Same.
* gdb.btrace/buffer-size.exp: Same.
* gdb.btrace/cpu.exp: Same.
* gdb.btrace/enable.exp: Same.
* gdb.dwarf2/count.exp: Same.
* gdb.dwarf2/dw2-ranges-func.exp: Same.
* gdb.dwarf2/dw2-ranges-psym.exp: Same.
* gdb.fortran/vla-datatypes.exp: Same.
* gdb.fortran/vla-history.exp: Same.
* gdb.fortran/vla-ptype.exp: Same.
* gdb.fortran/vla-value.exp: Same.
* gdb.fortran/whatis_type.exp: Same.
* gdb.guile/guile.exp: Same.
* gdb.multi/tids.exp: Same.
* gdb.python/py-finish-breakpoint.exp: Same.
* gdb.python/py-framefilter.exp: Same.
* gdb.python/py-pp-registration.exp: Same.
* gdb.python/py-xmethods.exp: Same.
* gdb.python/python.exp: Same.
* gdb.server/connect-with-no-symbol-file.exp: Same.
* gdb.server/no-thread-db.exp: Same.
* gdb.server/run-without-local-binary.exp: Same.
* gdb.stabs/weird.exp: Same.
* gdb.threads/attach-many-short-lived-threads.exp: Same.
* gdb.threads/thread-find.exp: Same.
* gdb.threads/tls-shared.exp: Same.
* gdb.threads/tls.exp: Same.
* gdb.threads/wp-replication.exp: Same.
* gdb.trace/ax.exp: Same.
* lib/gdb.exp (gdb_test_exact, help_test_raw): Same.
Change-Id: I2fa544c68f8c0099a77e03ff04ddc010eb2b6c7c
|
|
add_partial_subprogram does not handle DW_AT_ranges, while the full
symtab reader does. This can lead to discrepancies where a function
is not put into a partial symtab, and so is not available to "break"
and the like -- but is available if the full symtab has somehow been
read.
This patch fixes the bug by arranging to read DW_AT_ranges when
reading partial DIEs.
This is PR symtab/23331.
The new test case is derived from dw2-ranges-func.exp, which is why I
kept the copyright dates.
gdb/ChangeLog
2019-04-01 Tom Tromey <tromey@adacore.com>
PR symtab/23331:
* dwarf2read.c (partial_die_info::read): Handle DW_AT_ranges.
gdb/testsuite/ChangeLog
2019-04-01 Tom Tromey <tromey@adacore.com>
PR symtab/23331:
* gdb.dwarf2/dw2-ranges-main.c: New file.
* gdb.dwarf2/dw2-ranges-psym.c: New file.
* gdb.dwarf2/dw2-ranges-psym.exp: New file.
|