* Makefile.in (dsrec.o): Update dependencies.
* dsrec.c: Include "gdb_assert.h".
(make_srec): Use snprintf instead of sprintf, use a literal format
string.
* gdb.disasm/8300s.s: Fix syntax of bsr insn.
* gdb.disasm/h8300s.exp : Minor changes in disassembler output require
patterns to be more general, accepting old and new output.
Some output chars (such as '+') also must be quoted.
Some addresses are displayed numerically instead of
symbolically.
instead of frame_read_register.
(i386_fetch_pointer_argument): Use get_frame_register_unsigned
instead of frame_read_register. Use I386_ESP_REGNUM instead of
SP_REGNUM.
(i386_frame_prev_register): Use frame_unwind_register_unsigned
instead of frame_unwind_unsigned_register. Use
I386_EFLAGS_REGISTER instead of PS_REGNUM.
(i386_get_longjmp_target): Use regcache_read_unsigned_register
instead of read_register. Use builtin_type_void_data_ptr instead
of builtin_type_void_func_ptr when extracting the address of the
jmp_buf.
(i386_extract_return_value, i386_store_return_value,
i386_pseudo_register_read, i386_pseudo_register_write): Use
register_size instead REGISTER_RAW_SIZE.
(i387_print_float_info): Use get_frame_register and
get_frame_register_unsigned instead of frame_register_read.
(child_resume): Make `eflags' an ULONGEST. Use
regcache_cooked_read_unsigned and regcache_cooked_write_unsigned
instead of register_read and register_write.
Fix GDB PR cli/926.
* cli/cli-decode.c (add_setshow_uinteger_cmd): New function.
* command.h (add_setshow_uinteger_cmd): Declare.
* frame.c (set_backtrace_cmd): New function.
(show_backtrace_cmd): New function.
* frame.c (_initialize_frame): Replace "set/show
backtrace-below-main" with "set/show backtrace past-main". Add
command "set/show backtrace limit".
(backtrace_past_main): Rename "backtrace_below_main".
(backtrace_limit): New variable.
(get_prev_frame): Update. Check the backtrace_limit.
2003-08-09 Andrew Cagney <cagney@redhat.com>
* gdb.texinfo (Backtrace): Replace "set/show backtrace-below-main"
with "set/show backtrace past-main" and "set/show backtrace
limit".
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.174
diff -u -r1.174 gdb.texinfo
--- doc/gdb.texinfo 8 Aug 2003 01:58:00 -0000 1.174
+++ doc/gdb.texinfo 9 Aug 2003 14:57:10 -0000
@@ -3922,27 +3922,40 @@
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
-@kindex set backtrace-below-main
-@kindex show backtrace-below-main
+@kindex set backtrace past-main
+@kindex show backtrace past-main
+@kindex set backtrace limit
+@kindex show backtrace limit
-Most programs have a standard entry point---a place where system libraries
-and startup code transition into user code. For C this is @code{main}.
-When @value{GDBN} finds the entry function in a backtrace it will terminate
-the backtrace, to avoid tracing into highly system-specific (and generally
-uninteresting) code. If you need to examine the startup code, then you can
-change this behavior.
+Most programs have a standard user entry point---a place where system
+libraries and startup code transition into user code. For C this is
+@code{main}. When @value{GDBN} finds the entry function in a backtrace
+it will terminate the backtrace, to avoid tracing into highly
+system-specific (and generally uninteresting) code.
+
+If you need to examine the startup code, or limit the number of levels
+in a backtrace, you can change this behavior:
@table @code
-@item set backtrace-below-main off
+@item set backtrace past-main
+@itemx set backtrace past-main on
+Backtraces will continue past the user entry point.
+
+@item set backtrace past-main off
Backtraces will stop when they encounter the user entry point. This is the
default.
-@item set backtrace-below-main
-@itemx set backtrace-below-main on
-Backtraces will continue past the user entry point to the top of the stack.
+@item show backtrace past-main
+Display the current user entry point backtrace policy.
+
+@item set backtrace limit @var{n}
+@itemx set backtrace limit 0
+@cindex backtrace limit
+Limit the backtrace to @var{n} levels. A value of zero means
+unlimited.
-@item show backtrace-below-main
-Display the current backtrace policy.
+@item show backtrace limit
+Display the current limit on backtrace levels.
@end table
@node Selection
* interps.c (interp_set): Check for a NULL "old_interp".
Index: mi/ChangeLog
2003-08-08 Andrew Cagney <cagney@redhat.com>
* mi-main.c (captured_mi_execute_command): Add "mi2" and "mi3" to
interpreters that hack around CLI.
* mi-interp.c (mi3_command_loop): New function.
(mi_interpreter_resume): Check for "mi3", default to "mi2".
2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (FLAGS_TO_PASS): Add DESTDIR.
(install-only): Support DESTDIR.
(uninstall): Likewise.
(install-gdbtk): Likewise.
gdb/doc/
2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (install-info): Support DESTDIR.
(install-html): Likewise.
gdb/gdbserver/
2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (install-only): Create dest dir. Support DESTDIR.
(uninstall): Support DESTDIR.
mmalloc/
2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (install-info): Create dest dir. Support DESTDIR.
(install): Likewise.
* inferior.h (AT_SYMBOL): Define.
* blockframe.c (inside_entry_file): Check for AT_SYMBOL.
* infcall.c (call_function_by_hand): Add code to handle AT_SYMBOL.
* mips-tdep.c (mips_call_dummy_address): Delete function.
(mips_gdbarch_init): Set call_dummy_location to AT_SYMBOL, do not
set call_dummy_address.
* gdb.base/attach.exp, gdb.base/detach.exp, gdb.base/gcore.exp,
gdb.mi/mi-basics.exp, gdb.threads/gcore-thread.exp,
gdb.trace/save-trace.exp: Make sure that full pathnames are
escaped correctly.
* gdb.texinfo (Mode Options): Mention that level three is the
highest available and that level 2 is deprecated.
(Annotations Overview): Mention annotation levels. Cross reference
to "Limitations of the Annotation Interface" in annotate.texi.
(TODO, Value Annotations, Frame Annotations): Delete section.
(Displays, Breakpoint Info): Delete.
* mi-cmd-env.c (env_execute_cli_command): Use an explicit "%s %s"
when constructing the run command.
(mi_cmd_env_cd, mi_cmd_env_path, mi_cmd_env_dir): Simplify command
string removing the "%s".
* agentexpr.texi: Delete @bye.
* Makefile.in (STABS_DOC_SOURCE_INCLUDES): Add "fdl.texi"
(stabs.info): Add $(srcdir) to include search path.
(html): Depend on "annotate_toc.html", and not "annotate.html".
* stabs.texinfo: Ditto. Include "fdl.texi".
* gdbint.texinfo: Update copyright statement's list of invariant
sections.
* NEWS: Mention that m32r is multi-arch.
From 2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>:
* configure.tgt: Recognize m32r-*-*.
* config/m32r/tm-m32r.h: Delete file.
* config/m32r/m32r.mt: New file.
* m32r-rom.c (m32r_upload_command): Use hostent only when
gethostname succeeds, in order to avoid a compilation
warning.
* m32r-tdep.c (m32r_store_return_value): Add a cast to remove a
compiler warning.
* user-regs.c (struct user_reg): Add "next" link.
(struct user_regs): Replace "user" with "first" and "last" links.
(append_user_reg): Add pre-allocated "reg" parameter.
(builtin_user_regs): Provide initial value for "last".
(user_reg_add_builtin): XMALLOC memory for append_user_reg.
(user_regs_init): Allocate memory from the gdbarch obstack.
(user_reg_add): GDBARCH_OBSTACK_ZALLOC memory for append_user_reg.
(user_reg_map_name_to_regnum): Rewrite to search the user_reg
linked list.
(usernum_to_user_reg): New function.
(user_reg_map_regnum_to_name): Use usernum_to_user_reg.
(value_of_user_reg): Use usernum_to_user_reg.
(user_regs_free): Delete function.
(_initialize_user_regs): Update register_gdbarch_data call.
* structs.h (value_being_returned): Add a struct_addr argument.
* infcall.c (call_function_by_hand): Pass struct_addr to
value_being_returned.
* infcmd.c (print_return_value): Pass zero as struct_addr.
* values.c (value_being_returned): If struct_addr is passed,
use it instead of trying to recover it from the inferior.
the prologue analyzer won't need to attempt to extract the pc
value from the woefully incomplete dummy frame.
(mn10300_analyze_prologue): Avoid calls to get_frame_pc() when
possible. Disable code which modifies the frame.
* Makefile.in (INFO_DEPS): Add annotate.info.
(dvi, ps, html, pdf): Add annotate.
(ANNOTATE_DOC_SOURCE_INCLUDES): New macro.
(ANNOTATE_DOC_BUILD_INCLUDES): New macro.
(ANNOTATE_DOC_FILES): New macro.
(ANNOTATE_TEX_TMPS): New macro.
(annotate.info, annotate_toc.html): Specify dependencies.
(annotate.ps, annotate.pdf, annotate.dvi): Ditto.
* annotate.texinfo: Rename annotate.texi. Get building. Add
"Migrating to GDB/MI" and "Limitations of the Annotation
Interface" chapters. Mention why it is not part of the user
guide. Update copyright notice. Include "fdl.texi".
* regcache.c (struct regcache_descr): Update comments on
nr_raw_registers.
(init_legacy_regcache_descr): Don't set nr_raw_registers or
sizeof_raw_register_valid_p.
(init_regcache_descr): Set nr_raw_registers and
sizeof_raw_register_valid_p before calling
init_legacy_regcache_descr.
pattern.
* gdb.threads/tls-shared.exp: Don't use gdb_suppress_entire_file.
* gdb.threads/tls.exp: Recognize one case of the host library not
supporting TLS.
frame unwind information.
(m68hc11_scan_prologue): New function from m68hc11_guess_from_prologue
and adapted for frame unwinding.
(m68hc11_skip_prologue): Update to scan prologue in temporary object.
(m68hc11_unwind_pc): New function.
(m68hc11_frame_unwind_cache): New function to analyze frames.
(m68hc11_frame_this_id): New function to create new frame struct.
(m68hc11_frame_prev_register): New function to unwind a register from
the frame.
(m68hc11_frame_unwind): Default 68hc11/68hc12 unwinder.
(m68hc11_frame_p): New function for the above.
(m68hc11_frame_base_address): New function to return fp of frame.
(m68hc11_frame_args_address): Update for frame.
(m68hc11_frame_base): Default 68hc11/68hc12 frame.
(m68hc11_unwind_sp): New function.
(m68hc11_unwind_dummy_id): New function.
(m68hc11_gdbarch_init): Install the above frames; remove deprecated
calls.
* config/pa/tm-hppa.h (init_frame_pc_default): Declare.
* infcall.c (legacy_push_dummy_code) [GDB_TARGET_IS_HPPA]: Update
REAL_PC and not the pointer.
* hppa-hpux-tdep.c: Include frame.h
Patch from 2003-07-22 Kei Sakamoto <sakamoto.kei@renesas.com>:
* m32r-tdep.c (m32r_memory_insert_breakpoint): Fix code style -
operator at start and not end of line.
(decode_prologue): Ditto.
(m32r_frame_unwind_cache, m32r_unwind_sp, m32r_unwind_pc): Use
frame_unwind_register_unsigned instead of
frame_unwind_unsigned_register.
(m32r_read_pc): Use regcache_cooked_read_unsigned instead of
read_register.
(m32r_push_dummy_call): Use register_size instead of
REGISTER_RAW_SIZE.
(m32r_frame_sniffer): Replace m32r_frame_p.
(m32r_gdbarch_init): Call frame_unwind_append_sniffer.
* m32r-rom.c (report_transfer_performance): Delete extern
declaration.
(m32r_load, m32r_upload_command): Use print_transfer_performance
instead of report_transfer_performance.
(_initialize_m32r_rom): Use add_setshow_cmd instead of add_set_cmd
/ add_show_from_set.
window and give focus to a next window.
(tui_initialize_readline): Bind it to c-x o.
(tui_rl_next_keymap): Activate TUI mode when entering SingleKey mode.
* m68hc11-tdep.c (_initialize_m68hc11_tdep): Deprecate "regs" command.
(m68hc11_print_register): New function to print out one register.
(m68hc11_print_registers_info): New function to print registers.
(show_regs): Deprecate and use the above.
(m68hc11_gdbarch_init): Install the print_registers_info.
(tui_suspend): Remember in which TUI mode we are.
(_initialize_tui_interp): Use the tui interpreter even when no
other interpreter was set and define in which TUI mode to start.
* h8300-tdep.c (h8300_extract_return_value): Teach it how to
handle 8-bit returns (long long).
(h8300h_extract_return_value): Ditto.
(h8300_gdbarch_init): Long long is 8 bytes, char is unsigned.
* gdbarch.c Include "gdb_obstack.h".
(struct gdbarch): Add an "obstack".
(alloc_gdbarch_data): Allocate the gdbarch data using
GDBARCH_OBSTACK_CALLOC.
(free_gdbarch_data): Delete function.
(gdbarch_obstack_zalloc): New function.
(gdbarch_free): Free the obstack, do not call free_gdbarch_data.
Assert that the architecture is not initialized.
(gdbarch_alloc): Allocate an obstack, allocate the architecture
vector from the obstack.
(alloc_gdbarch_data, init_gdbarch_swap): Allocate memory using the
architecture obstack.
(GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Define.
(set_gdbarch_data): Assert that the data is not initialized.
(struct gdbarch_data): Delete member "free".
(register_gdbarch_data): Do not initialize "free".
* gdbarch.h, gdbarch.c: Re-generate.
* gdb.threads/tls.c : New file.
* gdb.threads/tls.exp : New file.
* gdb.threads/tls-main.c : New file.
* gdb.threads/tls-shared.c : New file.
* gdb.threads/tls-shared.exp : New file.
* findvar.c (read_var_value): Remove case for thread local storage
variables. It is now entirely handled by the dwarf2 location
expression code.
* printcmd.c (address_info): Ditto.
* symtab.h (address_class): Remove LOC_THREAD_LOCAL_STATIC
enumeration value.
(struct symbol): Remove objfile field, which was used by
LOC_THREAD_LOCAL_STATIC only.
* dwarf2read.c (decode_locdesc): Remove is_thread_local variable.
* dwarf2loc.h (struct dwarf2_loclist_baton): Add comment about
usage of objfile pointer.
* dwarf2loc.c (locexpr_describe_location): Add case to handle
thread local variables.
Add include of objfiles.h.
* dwarf2expr.c (execute_stack_op): Add comments about thread local
storage variables.
* Makefile.in (dwarf2loc.o): Update dependencies.
regcache_cooked_read_unsigned instead of read_register.
(m68hc11_saved_pc_after_call): Likewise.
(m68hc11_pseudo_register_write): Use regcache_cooked_write_unsigned
instead of write_register.
(m68hc11_register_type): New function.
(m68hc11_register_virtual_type): Remove.
(m68hc11_store_return_value): Convert to use the regcache.
(m68hc11_extract_struct_value_address): Likewise.
(m68hc11_gdbarch_init): Remove deprecated ops for register to use
m68hc11_register_type; undeprecate store_return_value and
extract_struct_value_address.
* gdbarch.sh (DWARF2_BUILD_FRAME_INFO): Delete method.
* gdbarch.h, gdbarch.c: Re-generate.
* i386-tdep.c (i386_gdbarch_init): Do not set
DWARF2_BUILD_FRAME_INFO.
* elfread.c (elf_symfile_read): Call dwarf2_build_frame_info
unconditionally.
* alpha-tdep.c (alpha_dwarf2_init_abi): Do not set
DWARF2_BUILD_FRAME_INFO.