LANG=C ; export LANG
LC_ALL=C ; export LC_ALL
-
-compare_new ()
-{
- file=$1
- if test ! -r "${file}"
- then
- echo "${file} missing? cp new-${file} ${file}" 1>&2
- elif diff -u "${file}" "new-${file}"
- then
- echo "${file} unchanged" 1>&2
- else
- echo "${file} has changed? cp new-${file} ${file}" 1>&2
- fi
-}
-
-
# Format of the input table
read="class returntype function formal actual staticdefault predefault postdefault invalid_p print garbage_at_eol"
# On some SH's, 'read' trims leading and trailing whitespace by
# default (e.g., bash), while on others (e.g., dash), it doesn't.
# Set IFS to empty to disable the trimming everywhere.
+ # shellcheck disable=SC2162
while IFS='' read line
do
if test "${line}" = ""
EOF
IFS="${OFS}"
- if test -n "${garbage_at_eol}"
+ if test -n "${garbage_at_eol:-}"
then
echo "Garbage at end-of-line in ${line}" 1>&2
kill $$
done
case "${class}" in
- m ) staticdefault="${predefault}" ;;
+ m ) staticdefault="${predefault:-}" ;;
M ) staticdefault="0" ;;
* ) test "${staticdefault}" || staticdefault=0 ;;
esac
case "${class}" in
F | V | M )
- case "${invalid_p}" in
+ case "${invalid_p:-}" in
"" )
if test -n "${predefault}"
then
#invalid_p="gdbarch->${function} == ${predefault}"
- predicate="gdbarch->${function} != ${predefault}"
+ predicate="gdbarch->${function:-} != ${predefault}"
elif class_is_variable_p
then
predicate="gdbarch->${function} != 0"
fallback_default_p ()
{
- { [ -n "${postdefault}" ] && [ "x${invalid_p}" != "x0" ]; } \
+ { [ -n "${postdefault:-}" ] && [ "x${invalid_p}" != "x0" ]; } \
|| { [ -n "${predefault}" ] && [ "x${invalid_p}" = "x0" ]; }
}
# If the instruction cannot execute out of line, return NULL. The
# core falls back to stepping past the instruction in-line instead in
# that case.
-M;displaced_step_closure_up;displaced_step_copy_insn;CORE_ADDR from, CORE_ADDR to, struct regcache *regs;from, to, regs
+M;displaced_step_copy_insn_closure_up;displaced_step_copy_insn;CORE_ADDR from, CORE_ADDR to, struct regcache *regs;from, to, regs
# Return true if GDB should use hardware single-stepping to execute
# the displaced instruction identified by CLOSURE. If false,
#
# The default implementation returns false on all targets that
# provide a gdbarch_software_single_step routine, and true otherwise.
-m;int;displaced_step_hw_singlestep;struct displaced_step_closure *closure;closure;;default_displaced_step_hw_singlestep;;0
+m;int;displaced_step_hw_singlestep;struct displaced_step_copy_insn_closure *closure;closure;;default_displaced_step_hw_singlestep;;0
# Fix up the state resulting from successfully single-stepping a
# displaced instruction, to give the result we would have gotten from
#
# For a general explanation of displaced stepping and how GDB uses it,
# see the comments in infrun.c.
-M;void;displaced_step_fixup;struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs;closure, from, to, regs;;NULL
+M;void;displaced_step_fixup;struct displaced_step_copy_insn_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs;closure, from, to, regs;;NULL
# Return the address of an appropriate place to put displaced
# instructions while we step over them. There need only be one such
#
# For a general explanation of displaced stepping and how GDB uses it,
# see the comments in infrun.c.
-m;CORE_ADDR;displaced_step_location;void;;;NULL;;(! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)
+#m;CORE_ADDR;displaced_step_location;thread_info *;thread;;NULL;;(! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)
+#m;CORE_ADDR;displaced_step_release_location;CORE_ADDR;addr;;NULL;;(! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)
+M;displaced_step_prepare_status;displaced_step_prepare;thread_info *thread;thread
+m;displaced_step_finish_status;displaced_step_finish;thread_info *thread, gdb_signal sig;thread, sig;;NULL;;(! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)
# Relocate an instruction to execute at a different address. OLDLOC
# is the address in the inferior memory where the instruction to
#
# The .log file
#
-exec > new-gdbarch.log
+exec > gdbarch.log
function_list | while do_read
do
cat <<EOF
-${class} ${returntype} ${function} ($formal)
+${class} ${returntype:-} ${function} (${formal:-})
EOF
for r in ${read}
do
done
exec 1>&2
-compare_new gdbarch.log
copyright ()
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* This file was created with the aid of \`\`gdbarch.sh''.
-
- The Bourne shell script \`\`gdbarch.sh'' creates the files
- \`\`new-gdbarch.c'' and \`\`new-gdbarch.h and then compares them
- against the existing \`\`gdbarch.[hc]''. Any differences found
- being reported.
-
- If editing this file, please also run gdbarch.sh and merge any
- changes into that script. Conversely, when making sweeping changes
- to this file, modifying gdbarch.sh and using its output may prove
- easier. */
+/* This file was created with the aid of \`\`gdbarch.sh''. */
EOF
}
#include "gdb_obstack.h"
#include "infrun.h"
#include "osabi.h"
+#include "displaced-stepping.h"
struct floatformat;
struct ui_file;
#endif
EOF
exec 1>&2
-#../move-if-change new-gdbarch.h gdbarch.h
-compare_new gdbarch.h
+../move-if-change new-gdbarch.h gdbarch.h
+rm -f new-gdbarch.h
#
fi
printf " if (gdbarch_debug >= 2)\n"
printf " fprintf_unfiltered (gdb_stdlog, \"gdbarch_%s called\\\\n\");\n" "$function"
- if [ "x${actual}" = "x-" ] || [ "x${actual}" = "x" ]
+ if [ "x${actual:-}" = "x-" ] || [ "x${actual:-}" = "x" ]
then
if class_is_multiarch_p
then
# close things off
exec 1>&2
-#../move-if-change new-gdbarch.c gdbarch.c
-compare_new gdbarch.c
+../move-if-change new-gdbarch.c gdbarch.c
+rm -f new-gdbarch.c