mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
75 lines
2.4 KiB
Plaintext
75 lines
2.4 KiB
Plaintext
# Copyright 1999-2024 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# Test -file-list-exec-source-files.
|
|
|
|
load_lib mi-support.exp
|
|
set MIFLAGS "-i=mi"
|
|
|
|
standard_testfile basics.c
|
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
untested "failed to compile"
|
|
return -1
|
|
}
|
|
|
|
if {[mi_clean_restart]} {
|
|
return
|
|
}
|
|
mi_gdb_file_cmd ${binfile}
|
|
|
|
proc test_file_list_exec_source_file {} {
|
|
global srcfile
|
|
global srcdir
|
|
global subdir
|
|
global fullname_syntax
|
|
if { [is_remote host] } {
|
|
set srcfilepath ".*${srcfile}"
|
|
} else {
|
|
set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
|
|
}
|
|
|
|
# get the path and absolute path to the current executable
|
|
#
|
|
# In gdb 6.2 (at least), the default line number is set by
|
|
# select_source_symtab to the first line of "main" minus
|
|
# the value of "lines_to_list" (which defaults to 10) plus one.
|
|
# --chastain 2004-08-13
|
|
|
|
set line_main_head [gdb_get_line_number "main ("]
|
|
set line_main_body [expr $line_main_head + 2]
|
|
set gdb_lines_to_list 10
|
|
set line_default [expr $line_main_body - $gdb_lines_to_list + 1]
|
|
|
|
mi_gdb_test "111-file-list-exec-source-file" \
|
|
"111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"$fullname_syntax${srcfile}\",macro-info=\"0\"" \
|
|
"request path info of current source file (${srcfile})"
|
|
}
|
|
|
|
proc test_file_list_exec_source_files {} {
|
|
global srcfile
|
|
global fullname_syntax
|
|
|
|
# get the path and absolute path to the current executable
|
|
mi_gdb_test "222-file-list-exec-source-files" \
|
|
"222\\\^done,files=\\\[\{file=\".*${srcfile}\",fullname=\"$fullname_syntax${srcfile}\",debug-fully-read=\"\[^\"\]+\"\}.*]" \
|
|
"Getting a list of source files."
|
|
}
|
|
|
|
test_file_list_exec_source_file
|
|
test_file_list_exec_source_files
|
|
|
|
mi_gdb_exit
|