Commit Graph

71 Commits

Author SHA1 Message Date
Pedro Alves fe978cb071 C++ keyword cleanliness, mostly auto-generated
This patch renames symbols that happen to have names which are
reserved keywords in C++.

Most of this was generated with Tromey's cxx-conversion.el script.
Some places where later hand massaged a bit, to fix formatting, etc.
And this was rebased several times meanwhile, along with re-running
the script, so re-running the script from scratch probably does not
result in the exact same output.  I don't think that matters anyway.

gdb/
2015-02-27  Tom Tromey  <tromey@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	Rename symbols whose names are reserved C++ keywords throughout.

gdb/gdbserver/
2015-02-27  Tom Tromey  <tromey@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	Rename symbols whose names are reserved C++ keywords throughout.
2015-02-27 16:33:07 +00:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Gary Benson 6d3d12ebef Include string.h in common-defs.h
This commit includes string.h in common-defs.h and removes all other
inclusions.

gdb/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* common/common-defs.h: Include string.h.
	* aarch64-tdep.c: Do not include string.h.
	* ada-exp.y: Likewise.
	* ada-lang.c: Likewise.
	* ada-lex.l: Likewise.
	* ada-typeprint.c: Likewise.
	* ada-valprint.c: Likewise.
	* aix-thread.c: Likewise.
	* alpha-linux-tdep.c: Likewise.
	* alpha-mdebug-tdep.c: Likewise.
	* alpha-nat.c: Likewise.
	* alpha-osf1-tdep.c: Likewise.
	* alpha-tdep.c: Likewise.
	* alphanbsd-tdep.c: Likewise.
	* amd64-dicos-tdep.c: Likewise.
	* amd64-linux-tdep.c: Likewise.
	* amd64-nat.c: Likewise.
	* amd64-sol2-tdep.c: Likewise.
	* amd64fbsd-tdep.c: Likewise.
	* amd64obsd-tdep.c: Likewise.
	* arch-utils.c: Likewise.
	* arm-linux-nat.c: Likewise.
	* arm-linux-tdep.c: Likewise.
	* arm-tdep.c: Likewise.
	* arm-wince-tdep.c: Likewise.
	* armbsd-tdep.c: Likewise.
	* armnbsd-nat.c: Likewise.
	* armnbsd-tdep.c: Likewise.
	* armobsd-tdep.c: Likewise.
	* avr-tdep.c: Likewise.
	* ax-gdb.c: Likewise.
	* ax-general.c: Likewise.
	* bcache.c: Likewise.
	* bfin-tdep.c: Likewise.
	* breakpoint.c: Likewise.
	* build-id.c: Likewise.
	* buildsym.c: Likewise.
	* c-exp.y: Likewise.
	* c-lang.c: Likewise.
	* c-typeprint.c: Likewise.
	* c-valprint.c: Likewise.
	* charset.c: Likewise.
	* cli-out.c: Likewise.
	* cli/cli-cmds.c: Likewise.
	* cli/cli-decode.c: Likewise.
	* cli/cli-dump.c: Likewise.
	* cli/cli-interp.c: Likewise.
	* cli/cli-logging.c: Likewise.
	* cli/cli-script.c: Likewise.
	* cli/cli-setshow.c: Likewise.
	* cli/cli-utils.c: Likewise.
	* coffread.c: Likewise.
	* common/agent.c: Likewise.
	* common/buffer.c: Likewise.
	* common/buffer.h: Likewise.
	* common/common-utils.c: Likewise.
	* common/filestuff.c: Likewise.
	* common/filestuff.c: Likewise.
	* common/format.c: Likewise.
	* common/print-utils.c: Likewise.
	* common/rsp-low.c: Likewise.
	* common/signals.c: Likewise.
	* common/vec.h: Likewise.
	* common/xml-utils.c: Likewise.
	* core-regset.c: Likewise.
	* corefile.c: Likewise.
	* corelow.c: Likewise.
	* cp-abi.c: Likewise.
	* cp-name-parser.y: Likewise.
	* cp-support.c: Likewise.
	* cp-valprint.c: Likewise.
	* cris-tdep.c: Likewise.
	* d-exp.y: Likewise.
	* darwin-nat.c: Likewise.
	* dbxread.c: Likewise.
	* dcache.c: Likewise.
	* demangle.c: Likewise.
	* dicos-tdep.c: Likewise.
	* disasm.c: Likewise.
	* doublest.c: Likewise.
	* dsrec.c: Likewise.
	* dummy-frame.c: Likewise.
	* dwarf2-frame.c: Likewise.
	* dwarf2loc.c: Likewise.
	* dwarf2read.c: Likewise.
	* elfread.c: Likewise.
	* environ.c: Likewise.
	* eval.c: Likewise.
	* event-loop.c: Likewise.
	* exceptions.c: Likewise.
	* exec.c: Likewise.
	* expprint.c: Likewise.
	* f-exp.y: Likewise.
	* f-lang.c: Likewise.
	* f-typeprint.c: Likewise.
	* f-valprint.c: Likewise.
	* fbsd-nat.c: Likewise.
	* findcmd.c: Likewise.
	* findvar.c: Likewise.
	* fork-child.c: Likewise.
	* frame.c: Likewise.
	* frv-linux-tdep.c: Likewise.
	* frv-tdep.c: Likewise.
	* gdb.c: Likewise.
	* gdb_bfd.c: Likewise.
	* gdbarch.c: Likewise.
	* gdbarch.sh: Likewise.
	* gdbtypes.c: Likewise.
	* gnu-nat.c: Likewise.
	* gnu-v2-abi.c: Likewise.
	* gnu-v3-abi.c: Likewise.
	* go-exp.y: Likewise.
	* go-lang.c: Likewise.
	* go32-nat.c: Likewise.
	* guile/guile.c: Likewise.
	* guile/scm-auto-load.c: Likewise.
	* hppa-hpux-tdep.c: Likewise.
	* hppa-linux-nat.c: Likewise.
	* hppanbsd-tdep.c: Likewise.
	* hppaobsd-tdep.c: Likewise.
	* i386-cygwin-tdep.c: Likewise.
	* i386-dicos-tdep.c: Likewise.
	* i386-linux-tdep.c: Likewise.
	* i386-nto-tdep.c: Likewise.
	* i386-sol2-tdep.c: Likewise.
	* i386-tdep.c: Likewise.
	* i386bsd-tdep.c: Likewise.
	* i386gnu-nat.c: Likewise.
	* i386nbsd-tdep.c: Likewise.
	* i386obsd-tdep.c: Likewise.
	* i387-tdep.c: Likewise.
	* ia64-libunwind-tdep.c: Likewise.
	* ia64-linux-nat.c: Likewise.
	* inf-child.c: Likewise.
	* inf-ptrace.c: Likewise.
	* inf-ttrace.c: Likewise.
	* infcall.c: Likewise.
	* infcmd.c: Likewise.
	* inflow.c: Likewise.
	* infrun.c: Likewise.
	* interps.c: Likewise.
	* iq2000-tdep.c: Likewise.
	* irix5-nat.c: Likewise.
	* jv-exp.y: Likewise.
	* jv-lang.c: Likewise.
	* jv-typeprint.c: Likewise.
	* jv-valprint.c: Likewise.
	* language.c: Likewise.
	* linux-fork.c: Likewise.
	* linux-nat.c: Likewise.
	* lm32-tdep.c: Likewise.
	* m2-exp.y: Likewise.
	* m2-typeprint.c: Likewise.
	* m32c-tdep.c: Likewise.
	* m32r-linux-nat.c: Likewise.
	* m32r-linux-tdep.c: Likewise.
	* m32r-rom.c: Likewise.
	* m32r-tdep.c: Likewise.
	* m68hc11-tdep.c: Likewise.
	* m68k-tdep.c: Likewise.
	* m68kbsd-tdep.c: Likewise.
	* m68klinux-nat.c: Likewise.
	* m68klinux-tdep.c: Likewise.
	* m88k-tdep.c: Likewise.
	* machoread.c: Likewise.
	* macrocmd.c: Likewise.
	* main.c: Likewise.
	* mdebugread.c: Likewise.
	* mem-break.c: Likewise.
	* memattr.c: Likewise.
	* memory-map.c: Likewise.
	* mep-tdep.c: Likewise.
	* mi/mi-cmd-break.c: Likewise.
	* mi/mi-cmd-disas.c: Likewise.
	* mi/mi-cmd-env.c: Likewise.
	* mi/mi-cmd-stack.c: Likewise.
	* mi/mi-cmd-var.c: Likewise.
	* mi/mi-cmds.c: Likewise.
	* mi/mi-console.c: Likewise.
	* mi/mi-getopt.c: Likewise.
	* mi/mi-interp.c: Likewise.
	* mi/mi-main.c: Likewise.
	* mi/mi-parse.c: Likewise.
	* microblaze-rom.c: Likewise.
	* microblaze-tdep.c: Likewise.
	* mingw-hdep.c: Likewise.
	* minidebug.c: Likewise.
	* minsyms.c: Likewise.
	* mips-irix-tdep.c: Likewise.
	* mips-linux-tdep.c: Likewise.
	* mips-tdep.c: Likewise.
	* mips64obsd-tdep.c: Likewise.
	* mipsnbsd-tdep.c: Likewise.
	* mipsread.c: Likewise.
	* mn10300-linux-tdep.c: Likewise.
	* mn10300-tdep.c: Likewise.
	* monitor.c: Likewise.
	* moxie-tdep.c: Likewise.
	* mt-tdep.c: Likewise.
	* nat/linux-btrace.c: Likewise.
	* nat/linux-osdata.c: Likewise.
	* nat/linux-procfs.c: Likewise.
	* nat/linux-ptrace.c: Likewise.
	* nat/linux-waitpid.c: Likewise.
	* nbsd-tdep.c: Likewise.
	* nios2-linux-tdep.c: Likewise.
	* nto-procfs.c: Likewise.
	* nto-tdep.c: Likewise.
	* objc-lang.c: Likewise.
	* objfiles.c: Likewise.
	* opencl-lang.c: Likewise.
	* osabi.c: Likewise.
	* osdata.c: Likewise.
	* p-exp.y: Likewise.
	* p-lang.c: Likewise.
	* p-typeprint.c: Likewise.
	* parse.c: Likewise.
	* posix-hdep.c: Likewise.
	* ppc-linux-nat.c: Likewise.
	* ppc-sysv-tdep.c: Likewise.
	* ppcfbsd-tdep.c: Likewise.
	* ppcnbsd-tdep.c: Likewise.
	* ppcobsd-tdep.c: Likewise.
	* printcmd.c: Likewise.
	* procfs.c: Likewise.
	* prologue-value.c: Likewise.
	* python/py-auto-load.c: Likewise.
	* python/py-gdb-readline.c: Likewise.
	* ravenscar-thread.c: Likewise.
	* regcache.c: Likewise.
	* registry.c: Likewise.
	* remote-fileio.c: Likewise.
	* remote-m32r-sdi.c: Likewise.
	* remote-mips.c: Likewise.
	* remote-notif.c: Likewise.
	* remote-sim.c: Likewise.
	* remote.c: Likewise.
	* reverse.c: Likewise.
	* rs6000-aix-tdep.c: Likewise.
	* ser-base.c: Likewise.
	* ser-go32.c: Likewise.
	* ser-mingw.c: Likewise.
	* ser-pipe.c: Likewise.
	* ser-tcp.c: Likewise.
	* ser-unix.c: Likewise.
	* serial.c: Likewise.
	* sh-tdep.c: Likewise.
	* sh64-tdep.c: Likewise.
	* shnbsd-tdep.c: Likewise.
	* skip.c: Likewise.
	* sol-thread.c: Likewise.
	* solib-dsbt.c: Likewise.
	* solib-frv.c: Likewise.
	* solib-osf.c: Likewise.
	* solib-som.c: Likewise.
	* solib-spu.c: Likewise.
	* solib-target.c: Likewise.
	* solib.c: Likewise.
	* somread.c: Likewise.
	* source.c: Likewise.
	* sparc-nat.c: Likewise.
	* sparc-sol2-tdep.c: Likewise.
	* sparc-tdep.c: Likewise.
	* sparc64-tdep.c: Likewise.
	* sparc64fbsd-tdep.c: Likewise.
	* sparc64nbsd-tdep.c: Likewise.
	* sparcnbsd-tdep.c: Likewise.
	* spu-linux-nat.c: Likewise.
	* spu-multiarch.c: Likewise.
	* spu-tdep.c: Likewise.
	* stabsread.c: Likewise.
	* stack.c: Likewise.
	* std-regs.c: Likewise.
	* symfile.c: Likewise.
	* symmisc.c: Likewise.
	* symtab.c: Likewise.
	* target.c: Likewise.
	* thread.c: Likewise.
	* tilegx-linux-nat.c: Likewise.
	* tilegx-tdep.c: Likewise.
	* top.c: Likewise.
	* tracepoint.c: Likewise.
	* tui/tui-command.c: Likewise.
	* tui/tui-data.c: Likewise.
	* tui/tui-disasm.c: Likewise.
	* tui/tui-file.c: Likewise.
	* tui/tui-layout.c: Likewise.
	* tui/tui-out.c: Likewise.
	* tui/tui-regs.c: Likewise.
	* tui/tui-source.c: Likewise.
	* tui/tui-stack.c: Likewise.
	* tui/tui-win.c: Likewise.
	* tui/tui-windata.c: Likewise.
	* tui/tui-winsource.c: Likewise.
	* typeprint.c: Likewise.
	* ui-file.c: Likewise.
	* ui-out.c: Likewise.
	* user-regs.c: Likewise.
	* utils.c: Likewise.
	* v850-tdep.c: Likewise.
	* valarith.c: Likewise.
	* valops.c: Likewise.
	* valprint.c: Likewise.
	* value.c: Likewise.
	* varobj.c: Likewise.
	* vax-tdep.c: Likewise.
	* vaxnbsd-tdep.c: Likewise.
	* vaxobsd-tdep.c: Likewise.
	* windows-nat.c: Likewise.
	* xcoffread.c: Likewise.
	* xml-support.c: Likewise.
	* xstormy16-tdep.c: Likewise.
	* xtensa-linux-nat.c: Likewise.

gdb/gdbserver/
2014-08-07  Gary Benson  <gbenson@redhat.com>

	* server.h: Do not include string.h.
	* event-loop.c: Likewise.
	* linux-low.c: Likewise.
	* regcache.c: Likewise.
	* remote-utils.c: Likewise.
	* spu-low.c: Likewise.
	* utils.c: Likewise.
2014-08-07 09:06:47 +01:00
Tom Tromey 64e61d290e constify command prefix
This constifies the "prefix" argument to the various command-adding
functions.

2014-07-24  Tom Tromey  <tromey@redhat.com>

	* cli/cli-decode.c (print_help_for_command): Make "prefix" const.
	(add_prefix_cmd, add_abbrev_prefix_cmd, apropos_cmd, help_list)
	(help_cmd_list): Constify.
	(lookup_cmd): Update.
	* cli/cli-decode.h (struct cmd_list_element) <prefixname>: Now
	const.
	(help_cmd_list, apropos_cmd): Update.
	* cli/cli-script.c (show_user): Update.
	* cli/cli-setshow.c (cmd_show_list): Make "prefix" const.
	* cli/cli-setshow.h (cmd_show_list): Update.
	* command.h (add_prefix_cmd, add_abbrev_prefix_cmd, help_list)
	(cmd_show_list): Update.
	* guile/scm-cmd.c (cmdscm_destroyer): Update.
	* python/py-cmd.c (cmdpy_destroyer): Update.
2014-07-24 11:30:04 -06:00
Tom Tromey 069003265c constify do_set_command and do_show_command
This changes do_set_command and do_show_command to take const
arguments.

2014-06-26  Tom Tromey  <tromey@redhat.com>

	* cli/cli-setshow.c (do_set_command): Make "arg" const.
	(do_show_command): Make "arg" const.
	* cli/cli-setshow.h (do_set_command, do_show_command): Update.
2014-06-26 09:14:17 -06:00
Tom Tromey 5bc98e5269 constify parse_cli_boolean_value
This changes a parameter of parse_cli_boolean_value to be const.

2014-06-18  Tom Tromey  <tromey@redhat.com>

	* cli/cli-setshow.h (parse_cli_boolean_value): Update.
	* cli/cli-setshow.c (parse_cli_boolean_value): Make "arg" const.
2014-06-18 08:16:56 -06:00
Tom Tromey 42c85435d6 remove deprecated_set_hook
This removes deprecated_set_hook.  Insight was the last user of this
hook, but I recently checked in a patch to have it use the
command_param_changed observer instead.

2014-01-13  Tom Tromey  <tromey@redhat.com>

	* cli/cli-setshow.c (do_set_command): Update.
	* defs.h (deprecated_set_hook): Remove.
	* top.c (deprecated_set_hook): Remove.
2014-01-13 12:33:43 -07:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Tom Tromey 0e9f083f4c remove gdb_string.h
This removes gdb_string.h.  This patch is purely mechanical.  I
created it by running the two commands:

    git rm common/gdb_string.h
    perl -pi -e's/"gdb_string.h"/<string.h>/;'  *.[chyl] */*.[chyl]

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/gdb_string.h: Remove.
	* aarch64-tdep.c: Use string.h, not gdb_string.h.
	* ada-exp.y: Use string.h, not gdb_string.h.
	* ada-lang.c: Use string.h, not gdb_string.h.
	* ada-lex.l: Use string.h, not gdb_string.h.
	* ada-typeprint.c: Use string.h, not gdb_string.h.
	* ada-valprint.c: Use string.h, not gdb_string.h.
	* aix-thread.c: Use string.h, not gdb_string.h.
	* alpha-linux-tdep.c: Use string.h, not gdb_string.h.
	* alpha-mdebug-tdep.c: Use string.h, not gdb_string.h.
	* alpha-nat.c: Use string.h, not gdb_string.h.
	* alpha-osf1-tdep.c: Use string.h, not gdb_string.h.
	* alpha-tdep.c: Use string.h, not gdb_string.h.
	* alphanbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64-dicos-tdep.c: Use string.h, not gdb_string.h.
	* amd64-linux-nat.c: Use string.h, not gdb_string.h.
	* amd64-linux-tdep.c: Use string.h, not gdb_string.h.
	* amd64-nat.c: Use string.h, not gdb_string.h.
	* amd64-sol2-tdep.c: Use string.h, not gdb_string.h.
	* amd64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64obsd-tdep.c: Use string.h, not gdb_string.h.
	* arch-utils.c: Use string.h, not gdb_string.h.
	* arm-linux-nat.c: Use string.h, not gdb_string.h.
	* arm-linux-tdep.c: Use string.h, not gdb_string.h.
	* arm-tdep.c: Use string.h, not gdb_string.h.
	* arm-wince-tdep.c: Use string.h, not gdb_string.h.
	* armbsd-tdep.c: Use string.h, not gdb_string.h.
	* armnbsd-nat.c: Use string.h, not gdb_string.h.
	* armnbsd-tdep.c: Use string.h, not gdb_string.h.
	* armobsd-tdep.c: Use string.h, not gdb_string.h.
	* avr-tdep.c: Use string.h, not gdb_string.h.
	* ax-gdb.c: Use string.h, not gdb_string.h.
	* ax-general.c: Use string.h, not gdb_string.h.
	* bcache.c: Use string.h, not gdb_string.h.
	* bfin-tdep.c: Use string.h, not gdb_string.h.
	* breakpoint.c: Use string.h, not gdb_string.h.
	* build-id.c: Use string.h, not gdb_string.h.
	* buildsym.c: Use string.h, not gdb_string.h.
	* c-exp.y: Use string.h, not gdb_string.h.
	* c-lang.c: Use string.h, not gdb_string.h.
	* c-typeprint.c: Use string.h, not gdb_string.h.
	* c-valprint.c: Use string.h, not gdb_string.h.
	* charset.c: Use string.h, not gdb_string.h.
	* cli-out.c: Use string.h, not gdb_string.h.
	* cli/cli-cmds.c: Use string.h, not gdb_string.h.
	* cli/cli-decode.c: Use string.h, not gdb_string.h.
	* cli/cli-dump.c: Use string.h, not gdb_string.h.
	* cli/cli-interp.c: Use string.h, not gdb_string.h.
	* cli/cli-logging.c: Use string.h, not gdb_string.h.
	* cli/cli-script.c: Use string.h, not gdb_string.h.
	* cli/cli-setshow.c: Use string.h, not gdb_string.h.
	* cli/cli-utils.c: Use string.h, not gdb_string.h.
	* coffread.c: Use string.h, not gdb_string.h.
	* common/common-utils.c: Use string.h, not gdb_string.h.
	* common/filestuff.c: Use string.h, not gdb_string.h.
	* common/linux-procfs.c: Use string.h, not gdb_string.h.
	* common/linux-ptrace.c: Use string.h, not gdb_string.h.
	* common/signals.c: Use string.h, not gdb_string.h.
	* common/vec.h: Use string.h, not gdb_string.h.
	* core-regset.c: Use string.h, not gdb_string.h.
	* corefile.c: Use string.h, not gdb_string.h.
	* corelow.c: Use string.h, not gdb_string.h.
	* cp-abi.c: Use string.h, not gdb_string.h.
	* cp-support.c: Use string.h, not gdb_string.h.
	* cp-valprint.c: Use string.h, not gdb_string.h.
	* cris-tdep.c: Use string.h, not gdb_string.h.
	* d-lang.c: Use string.h, not gdb_string.h.
	* dbxread.c: Use string.h, not gdb_string.h.
	* dcache.c: Use string.h, not gdb_string.h.
	* demangle.c: Use string.h, not gdb_string.h.
	* dicos-tdep.c: Use string.h, not gdb_string.h.
	* disasm.c: Use string.h, not gdb_string.h.
	* doublest.c: Use string.h, not gdb_string.h.
	* dsrec.c: Use string.h, not gdb_string.h.
	* dummy-frame.c: Use string.h, not gdb_string.h.
	* dwarf2-frame.c: Use string.h, not gdb_string.h.
	* dwarf2loc.c: Use string.h, not gdb_string.h.
	* dwarf2read.c: Use string.h, not gdb_string.h.
	* elfread.c: Use string.h, not gdb_string.h.
	* environ.c: Use string.h, not gdb_string.h.
	* eval.c: Use string.h, not gdb_string.h.
	* event-loop.c: Use string.h, not gdb_string.h.
	* exceptions.c: Use string.h, not gdb_string.h.
	* exec.c: Use string.h, not gdb_string.h.
	* expprint.c: Use string.h, not gdb_string.h.
	* f-exp.y: Use string.h, not gdb_string.h.
	* f-lang.c: Use string.h, not gdb_string.h.
	* f-typeprint.c: Use string.h, not gdb_string.h.
	* f-valprint.c: Use string.h, not gdb_string.h.
	* fbsd-nat.c: Use string.h, not gdb_string.h.
	* findcmd.c: Use string.h, not gdb_string.h.
	* findvar.c: Use string.h, not gdb_string.h.
	* fork-child.c: Use string.h, not gdb_string.h.
	* frame.c: Use string.h, not gdb_string.h.
	* frv-linux-tdep.c: Use string.h, not gdb_string.h.
	* frv-tdep.c: Use string.h, not gdb_string.h.
	* gdb.c: Use string.h, not gdb_string.h.
	* gdb_bfd.c: Use string.h, not gdb_string.h.
	* gdbarch.c: Use string.h, not gdb_string.h.
	* gdbtypes.c: Use string.h, not gdb_string.h.
	* gnu-nat.c: Use string.h, not gdb_string.h.
	* gnu-v2-abi.c: Use string.h, not gdb_string.h.
	* gnu-v3-abi.c: Use string.h, not gdb_string.h.
	* go-exp.y: Use string.h, not gdb_string.h.
	* go-lang.c: Use string.h, not gdb_string.h.
	* go32-nat.c: Use string.h, not gdb_string.h.
	* hppa-hpux-tdep.c: Use string.h, not gdb_string.h.
	* hppa-linux-nat.c: Use string.h, not gdb_string.h.
	* hppanbsd-tdep.c: Use string.h, not gdb_string.h.
	* hppaobsd-tdep.c: Use string.h, not gdb_string.h.
	* i386-cygwin-tdep.c: Use string.h, not gdb_string.h.
	* i386-dicos-tdep.c: Use string.h, not gdb_string.h.
	* i386-linux-nat.c: Use string.h, not gdb_string.h.
	* i386-linux-tdep.c: Use string.h, not gdb_string.h.
	* i386-nto-tdep.c: Use string.h, not gdb_string.h.
	* i386-sol2-tdep.c: Use string.h, not gdb_string.h.
	* i386-tdep.c: Use string.h, not gdb_string.h.
	* i386bsd-tdep.c: Use string.h, not gdb_string.h.
	* i386gnu-nat.c: Use string.h, not gdb_string.h.
	* i386nbsd-tdep.c: Use string.h, not gdb_string.h.
	* i386obsd-tdep.c: Use string.h, not gdb_string.h.
	* i387-tdep.c: Use string.h, not gdb_string.h.
	* ia64-libunwind-tdep.c: Use string.h, not gdb_string.h.
	* ia64-linux-nat.c: Use string.h, not gdb_string.h.
	* inf-child.c: Use string.h, not gdb_string.h.
	* inf-ptrace.c: Use string.h, not gdb_string.h.
	* inf-ttrace.c: Use string.h, not gdb_string.h.
	* infcall.c: Use string.h, not gdb_string.h.
	* infcmd.c: Use string.h, not gdb_string.h.
	* inflow.c: Use string.h, not gdb_string.h.
	* infrun.c: Use string.h, not gdb_string.h.
	* interps.c: Use string.h, not gdb_string.h.
	* iq2000-tdep.c: Use string.h, not gdb_string.h.
	* irix5-nat.c: Use string.h, not gdb_string.h.
	* jv-exp.y: Use string.h, not gdb_string.h.
	* jv-lang.c: Use string.h, not gdb_string.h.
	* jv-typeprint.c: Use string.h, not gdb_string.h.
	* jv-valprint.c: Use string.h, not gdb_string.h.
	* language.c: Use string.h, not gdb_string.h.
	* linux-fork.c: Use string.h, not gdb_string.h.
	* linux-nat.c: Use string.h, not gdb_string.h.
	* lm32-tdep.c: Use string.h, not gdb_string.h.
	* m2-exp.y: Use string.h, not gdb_string.h.
	* m2-typeprint.c: Use string.h, not gdb_string.h.
	* m32c-tdep.c: Use string.h, not gdb_string.h.
	* m32r-linux-nat.c: Use string.h, not gdb_string.h.
	* m32r-linux-tdep.c: Use string.h, not gdb_string.h.
	* m32r-rom.c: Use string.h, not gdb_string.h.
	* m32r-tdep.c: Use string.h, not gdb_string.h.
	* m68hc11-tdep.c: Use string.h, not gdb_string.h.
	* m68k-tdep.c: Use string.h, not gdb_string.h.
	* m68kbsd-tdep.c: Use string.h, not gdb_string.h.
	* m68klinux-nat.c: Use string.h, not gdb_string.h.
	* m68klinux-tdep.c: Use string.h, not gdb_string.h.
	* m88k-tdep.c: Use string.h, not gdb_string.h.
	* macrocmd.c: Use string.h, not gdb_string.h.
	* main.c: Use string.h, not gdb_string.h.
	* mdebugread.c: Use string.h, not gdb_string.h.
	* mem-break.c: Use string.h, not gdb_string.h.
	* memattr.c: Use string.h, not gdb_string.h.
	* memory-map.c: Use string.h, not gdb_string.h.
	* mep-tdep.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-break.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-disas.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-env.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-stack.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-var.c: Use string.h, not gdb_string.h.
	* mi/mi-cmds.c: Use string.h, not gdb_string.h.
	* mi/mi-console.c: Use string.h, not gdb_string.h.
	* mi/mi-getopt.c: Use string.h, not gdb_string.h.
	* mi/mi-interp.c: Use string.h, not gdb_string.h.
	* mi/mi-main.c: Use string.h, not gdb_string.h.
	* mi/mi-parse.c: Use string.h, not gdb_string.h.
	* microblaze-rom.c: Use string.h, not gdb_string.h.
	* microblaze-tdep.c: Use string.h, not gdb_string.h.
	* mingw-hdep.c: Use string.h, not gdb_string.h.
	* minidebug.c: Use string.h, not gdb_string.h.
	* minsyms.c: Use string.h, not gdb_string.h.
	* mips-irix-tdep.c: Use string.h, not gdb_string.h.
	* mips-linux-tdep.c: Use string.h, not gdb_string.h.
	* mips-tdep.c: Use string.h, not gdb_string.h.
	* mips64obsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsnbsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsread.c: Use string.h, not gdb_string.h.
	* mn10300-linux-tdep.c: Use string.h, not gdb_string.h.
	* mn10300-tdep.c: Use string.h, not gdb_string.h.
	* monitor.c: Use string.h, not gdb_string.h.
	* moxie-tdep.c: Use string.h, not gdb_string.h.
	* mt-tdep.c: Use string.h, not gdb_string.h.
	* nbsd-tdep.c: Use string.h, not gdb_string.h.
	* nios2-linux-tdep.c: Use string.h, not gdb_string.h.
	* nto-procfs.c: Use string.h, not gdb_string.h.
	* nto-tdep.c: Use string.h, not gdb_string.h.
	* objc-lang.c: Use string.h, not gdb_string.h.
	* objfiles.c: Use string.h, not gdb_string.h.
	* opencl-lang.c: Use string.h, not gdb_string.h.
	* osabi.c: Use string.h, not gdb_string.h.
	* osdata.c: Use string.h, not gdb_string.h.
	* p-exp.y: Use string.h, not gdb_string.h.
	* p-lang.c: Use string.h, not gdb_string.h.
	* p-typeprint.c: Use string.h, not gdb_string.h.
	* parse.c: Use string.h, not gdb_string.h.
	* posix-hdep.c: Use string.h, not gdb_string.h.
	* ppc-linux-nat.c: Use string.h, not gdb_string.h.
	* ppc-sysv-tdep.c: Use string.h, not gdb_string.h.
	* ppcfbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcobsd-tdep.c: Use string.h, not gdb_string.h.
	* printcmd.c: Use string.h, not gdb_string.h.
	* procfs.c: Use string.h, not gdb_string.h.
	* prologue-value.c: Use string.h, not gdb_string.h.
	* python/py-auto-load.c: Use string.h, not gdb_string.h.
	* python/py-gdb-readline.c: Use string.h, not gdb_string.h.
	* ravenscar-thread.c: Use string.h, not gdb_string.h.
	* regcache.c: Use string.h, not gdb_string.h.
	* registry.c: Use string.h, not gdb_string.h.
	* remote-fileio.c: Use string.h, not gdb_string.h.
	* remote-m32r-sdi.c: Use string.h, not gdb_string.h.
	* remote-mips.c: Use string.h, not gdb_string.h.
	* remote-sim.c: Use string.h, not gdb_string.h.
	* remote.c: Use string.h, not gdb_string.h.
	* reverse.c: Use string.h, not gdb_string.h.
	* rs6000-aix-tdep.c: Use string.h, not gdb_string.h.
	* ser-base.c: Use string.h, not gdb_string.h.
	* ser-go32.c: Use string.h, not gdb_string.h.
	* ser-mingw.c: Use string.h, not gdb_string.h.
	* ser-pipe.c: Use string.h, not gdb_string.h.
	* ser-tcp.c: Use string.h, not gdb_string.h.
	* ser-unix.c: Use string.h, not gdb_string.h.
	* serial.c: Use string.h, not gdb_string.h.
	* sh-tdep.c: Use string.h, not gdb_string.h.
	* sh64-tdep.c: Use string.h, not gdb_string.h.
	* shnbsd-tdep.c: Use string.h, not gdb_string.h.
	* skip.c: Use string.h, not gdb_string.h.
	* sol-thread.c: Use string.h, not gdb_string.h.
	* solib-dsbt.c: Use string.h, not gdb_string.h.
	* solib-frv.c: Use string.h, not gdb_string.h.
	* solib-osf.c: Use string.h, not gdb_string.h.
	* solib-spu.c: Use string.h, not gdb_string.h.
	* solib-target.c: Use string.h, not gdb_string.h.
	* solib.c: Use string.h, not gdb_string.h.
	* somread.c: Use string.h, not gdb_string.h.
	* source.c: Use string.h, not gdb_string.h.
	* sparc-nat.c: Use string.h, not gdb_string.h.
	* sparc-sol2-tdep.c: Use string.h, not gdb_string.h.
	* sparc-tdep.c: Use string.h, not gdb_string.h.
	* sparc64-tdep.c: Use string.h, not gdb_string.h.
	* sparc64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparc64nbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* spu-linux-nat.c: Use string.h, not gdb_string.h.
	* spu-multiarch.c: Use string.h, not gdb_string.h.
	* spu-tdep.c: Use string.h, not gdb_string.h.
	* stabsread.c: Use string.h, not gdb_string.h.
	* stack.c: Use string.h, not gdb_string.h.
	* std-regs.c: Use string.h, not gdb_string.h.
	* symfile.c: Use string.h, not gdb_string.h.
	* symmisc.c: Use string.h, not gdb_string.h.
	* symtab.c: Use string.h, not gdb_string.h.
	* target.c: Use string.h, not gdb_string.h.
	* thread.c: Use string.h, not gdb_string.h.
	* tilegx-linux-nat.c: Use string.h, not gdb_string.h.
	* tilegx-tdep.c: Use string.h, not gdb_string.h.
	* top.c: Use string.h, not gdb_string.h.
	* tracepoint.c: Use string.h, not gdb_string.h.
	* tui/tui-command.c: Use string.h, not gdb_string.h.
	* tui/tui-data.c: Use string.h, not gdb_string.h.
	* tui/tui-disasm.c: Use string.h, not gdb_string.h.
	* tui/tui-file.c: Use string.h, not gdb_string.h.
	* tui/tui-layout.c: Use string.h, not gdb_string.h.
	* tui/tui-out.c: Use string.h, not gdb_string.h.
	* tui/tui-regs.c: Use string.h, not gdb_string.h.
	* tui/tui-source.c: Use string.h, not gdb_string.h.
	* tui/tui-stack.c: Use string.h, not gdb_string.h.
	* tui/tui-win.c: Use string.h, not gdb_string.h.
	* tui/tui-windata.c: Use string.h, not gdb_string.h.
	* tui/tui-winsource.c: Use string.h, not gdb_string.h.
	* typeprint.c: Use string.h, not gdb_string.h.
	* ui-file.c: Use string.h, not gdb_string.h.
	* ui-out.c: Use string.h, not gdb_string.h.
	* user-regs.c: Use string.h, not gdb_string.h.
	* utils.c: Use string.h, not gdb_string.h.
	* v850-tdep.c: Use string.h, not gdb_string.h.
	* valarith.c: Use string.h, not gdb_string.h.
	* valops.c: Use string.h, not gdb_string.h.
	* valprint.c: Use string.h, not gdb_string.h.
	* value.c: Use string.h, not gdb_string.h.
	* varobj.c: Use string.h, not gdb_string.h.
	* vax-tdep.c: Use string.h, not gdb_string.h.
	* vaxnbsd-tdep.c: Use string.h, not gdb_string.h.
	* vaxobsd-tdep.c: Use string.h, not gdb_string.h.
	* windows-nat.c: Use string.h, not gdb_string.h.
	* xcoffread.c: Use string.h, not gdb_string.h.
	* xml-support.c: Use string.h, not gdb_string.h.
	* xstormy16-tdep.c: Use string.h, not gdb_string.h.
	* xtensa-linux-nat.c: Use string.h, not gdb_string.h.
2013-11-18 13:29:00 -07:00
Keith Seitz d7561cbbf2 Constification of parse_linespec and fallout:
https://sourceware.org/ml/gdb-patches/2013-09/msg01017.html
https://sourceware.org/ml/gdb-patches/2013-09/msg01018.html
https://sourceware.org/ml/gdb-patches/2013-09/msg01019.html
https://sourceware.org/ml/gdb-patches/2013-09/msg01020.html
2013-10-02 00:46:07 +00:00
Pedro Alves f81d112039 Accept "set foo unlimited" in integer/uinteger/zuinteger_unlimited commands.
Currently, several commands take "0" or "-1" to mean "unlimited".

"show" knows when to print "unlimited":

 (gdb) show height
 Number of lines gdb thinks are in a page is 45.
 (gdb) set height 0
 (gdb) show height
 Number of lines gdb thinks are in a page is unlimited.

However, the user can't herself specify "unlimited" directly:

 (gdb) set height unlimited
 No symbol table is loaded.  Use the "file" command.
 (gdb)

This patch addresses that, by adjusting the set handler for all
integer/uinteger/zuinteger_unlimited commands to accept literal
"unlimited".  It also installs a completer.  Presently, we complete on
symbols by default, and at
<http://sourceware.org/ml/gdb-patches/2013-03/msg00864.html> I've
shown a WIP prototype that tried to keep that half working in these
commands.  In the end, it turned out to be more complicated than
justifiable, IMO.  It's super rare to want to pass the value of a
variable/symbol in the program to a GDB set/show knob.  That'll still
work, it's just that we won't assist with completion anymore.  This
patch just sticks with the simple, and completes on "unlimited", and
nothing else.  This simplification means that

  "set he<tab><tab>"

is all it takes to get to:

  "set height unlimited"

The patch then goes through all integer/uinteger/zuinteger_unlimited
commands in the tree, and updates both the online help and the manual
to mention that "unlimited" is accepted in addition to 0/-1.  In the
cases where the command had no online help text at all, this adds it.
I've tried to make the texts read in a way that "unlimited" is
suggested before "0" or "-1" is.

Tested on x86_64 Fedora 17.

gdb/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* cli/cli-decode.c (integer_unlimited_completer): New function.
	(add_setshow_integer_cmd, add_setshow_uinteger_cmd)
	(add_setshow_zuinteger_unlimited_cmd): Install the "unlimited"
	completer.
	* cli/cli-setshow.c: Include "cli/cli-utils.h".
	(is_unlimited_literal): New function.
	(do_set_command): Handle literal "unlimited" arguments.
	* frame.c (_initialize_frame) <set backtrace limit>: Document
	"unlimited".
	* printcmd.c (_initialize_printcmd) <set print
	max-symbolic-offset>: Add help text.
	* record-full.c (_initialize_record_full) <set record full
	insn-number-max>: Likewise.
	* record.c (_initialize_record) <set record
	instruction-history-size, set record function-call-history-size>:
	Add help text.
	* ser-tcp.c (_initialize_ser_tcp) <set tcp connect-timeout>: Add
	help text.
	* tracepoint.c (_initialize_tracepoint) <set trace-buffer-size>:
	Likewise.
	* source.c (_initialize_source) <set listsize>: Add help text.
	* utils.c (initialize_utils) <set height, set width>: Likewise.
	<set pagination>: Mention "set height unlimited".
	* valprint.c (_initialize_valprint) <set print elements, set print
	repeats>: Document "unlimited".

gdb/doc/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Process Record and Replay): Document that "set
	record full insn-number-max", "set record
	instruction-history-size" and "set record
	function-call-history-size" accept "unlimited".
	(Backtrace): Document that "set backtrace limit" accepts
	"unlimited".
	(List): Document that "set listsize" accepts "unlimited".
	(Print Settings)" Document that "set print max-symbolic-offset",
	"set print elements" and "set print repeats" accept "unlimited".
	(Starting and Stopping Trace Experiments): Document that "set
	trace-buffer-size" accepts "unlimited".
	(Remote Configuration): Document that "set tcp connect-timeout"
	accepts "unlimited".
	(Command History): Document that "set history size" accepts
	"unlimited".
	(Screen Size): Document that "set height" and "set width" accepts
	"unlimited".  Adjust "set pagination"'s description to suggest
	"set height unlimited" instead of "set height 0".

gdb/testsuite/
2013-04-10  Pedro Alves  <palves@redhat.com>

	* gdb.base/completion.exp: Test "set height", "set listsize" and
	"set trace-buffer-size" completion.
	* gdb.base/setshow.exp: Test "set height unlimited".
	* gdb.trace/trace-buffer-size.exp: Test "set trace-buffer-size
	unlimited".
2013-04-10 15:11:12 +00:00
Pedro Alves 82b821e99d Subject: Fix range validation of integer commands with "unlimited".
The range validation added by

  http://sourceware.org/ml/gdb-patches/2013-03/msg00767.html

Changes things to allow setting the command to INT_MAX or UINT_MAX
directly, with signed and unsigned commands respectively.  However,
that went a little bit too far, as in the cases of var_integer and
var_uinteger, those values are actually implementation detail.  It's
better to not expose them in the interface, and have users assume
those values mean "unlimited" too, so to be safer to expand the range
of the commands in the future if we want to.  Yes, it's pedantic, and
it's not likely users actually will do this, but MI frontends and
Python scripts might.

gdb/
2013-03-22  Pedro Alves  <palves@redhat.com>
	    Yao Qi  <yao@codesourcery.com>
	    Mark Kettenis  <kettenis@gnu.org>

	* cli/cli-setshow.c (do_set_command) <var_uinteger>:
	Don't let the user set the value to UINT_MAX directly.
	<var_integer>: Don't let the user set the value to INT_MAX
	directly.
2013-03-22 20:25:40 +00:00
Pedro Alves ab19f3254b Whoops, wrong patch. Reverting. 2013-03-22 20:23:58 +00:00
Pedro Alves 2ce09ced3c Subject: Fix range validation of integer commands with "unlimited".
The range validation added by

  http://sourceware.org/ml/gdb-patches/2013-03/msg00767.html

Changes things to allow setting the command to INT_MAX or UINT_MAX
directly, with signed and unsigned commands respectively.  However,
that went a little bit too far, as in the cases of var_integer and
var_uinteger, those values are actually implementation detail.  It's
better to not expose them in the interface, and have users assume
those values mean "unlimited" too, so to be safer to expand the range
of the commands in the future if we want to.  Yes, it's pedantic, and
it's not likely users actually will do this, but MI frontends and
Python scripts might.

gdb/
2013-03-22  Pedro Alves  <palves@redhat.com>
	    Yao Qi  <yao@codesourcery.com>
	    Mark Kettenis  <kettenis@gnu.org>

	* cli/cli-setshow.c (do_set_command) <var_uinteger>:
	Don't let the user set the value to UINT_MAX directly.
	<var_integer>: Don't let the user set the value to INT_MAX
	directly.
2013-03-22 20:21:48 +00:00
Doug Evans bd712aed2f New commands "mt set per-command {space,time,symtab} {on,off}".
* NEWS: Add entry.
	* event-top.c: #include "maint.h".
	* main.c: #include "maint.h".
	* maint.c: #include <sys/time.h>, <time.h>, block.h, top.h,
	timeval-utils.h, maint.h, cli/cli-setshow.h.
	(per_command_time, per_command_space): New static globals.
	(per_command_symtab): New static global.
	(per_command_setlist, per_command_showlist): New static globals.
	(struct cmd_stats): Move here from utils.c.
	(set_per_command_time): Renamed from set_display_time in utils.c
	and moved here.  All callers updated.
	(set_per_command_space): Renamed from set_display_space in utils.c
	and moved here.  All callers updated.
	(count_symtabs_and_blocks): New function.
	(report_command_stats): Moved here from utils.c.  Add support for
	printing symtab stats.  Only print data if enabled before command
	executed.
	(make_command_stats_cleanup): Ditto.
	(sert_per_command_cmd, show_per_command_cmd): New functions.
	(_initialize_maint_cmds): Add new commands
	mt set per-command {space,time,symtab} {on,off}.
	* maint.h: New file.
	* top.c: #include "maint.h".
	* utils.c (reset_prompt_for_continue_wait_time): New function.
	(get_prompt_for_continue_wait_time): New function.
	* utils.h (reset_prompt_for_continue_wait_time): Declare
	(get_prompt_for_continue_wait_time): Declare.
	(make_command_stats_cleanup): Moved to maint.h.
	(set_display_time, set_display_space): Moved to maint.h and renamed
	to set_per_command_time, set_per_command_space.
	* cli/cli-setshow.c (parse_cli_boolean_value): Renamed from
	parse_binary_operation and made non-static.  Don't call error,
	just return an error marker.  All callers updated.
	* cli/cli-setshow.h (parse_cli_boolean_value): Declare.

	doc/
	* gdb.texinfo (Maintenance Commands): Add docs for
	"mt set per-command {space,time,symtab} {on,off}".

	testsuite/
	* gdb.base/maint.exp: Update tests for per-command stats.
2013-03-21 17:37:30 +00:00
Pedro Alves ef0026f03b Fix PR gdb/15289 - "set remote hardware-watchpoint-limit" broken (zinteger commands)
This is a regression from 7.5, introduced/exposed by:
  http://sourceware.org/ml/gdb-patches/2012-07/msg00259.html

There are a series of issues with this code.

It does:

	unsigned int val = parse_and_eval_long (arg);
	^^^^^^^^^^^^

(unsigned, usually 32-bit) while parse_and_eval_long returns a LONGEST
(usually 64-bit), so we lose precision without noticing:

  (gdb) set remote hardware-watchpoint-limit 0x100000000
  (gdb) show remote hardware-watchpoint-limit 0x100000000
  The maximum number of target hardware watchpoints is 0.

While at it, print the invalid number with plongest, so the user sees
what GDB thought the number was:

  (gdb) set remote hardware-watchpoint-limit 0x100000000
  integer 4294967296 out of range

So with "set remote hardware-watchpoint-limit -1", val ends converted
to 0xffffffff, which then fails the

	else if (val >= INT_MAX)
	  error (_("integer %u out of range"), val);

test.

Looking at that INT_MAX check, we forbid INT_MAX itself, but we
shouldn't, as that does fit in 'int' -- we want to forbid values
_greater_ than INT_MAX (and less than INT_MIN, while at it):

  (gdb) set remote hardware-watchpoint-limit 2147483647
  integer 2147483647 out of range

The same problem is in the new var_zuinteger_unlimited code, which
also uses "int" for variable.

Also, when printing a 'signed int', we should use %d, not %u.

This adds a couple regression tests.  Not completely thorough in checking
all kinds of invalid input; I'm saving more exaustive testing around
zXXinteger commands for something like new test-assisting commands
like "maint test cmd-zinteger -1", where testing would focus on the
command types, and thus be independent of particular user commands of
particular GDB features.

Tested on x86_64 Fedora 17.

gdb/
2013-03-20  Pedro Alves  <palves@redhat.com>

	PR gdb/15289

	* cli/cli-setshow.c (do_set_command)
	<var_uinteger, var_zuinteger>: Use LONGEST for variable holding
	the result of parsing the command argument.  Throw error if the
	value is greater than UINT_MAX.  Print the invalid value with
	plongest.
	<var_integer, var_zinteger>: Use LONGEST for variable holding the
	result of parsing the command argument.  Throw error if the value
	is greater than INT_MAX, not greater or equal.  Also throw error
	if the value is less than INT_MIN.  Print the invalid value with
	plongest.
	<var_zuinteger_unlimited>: Throw error if the value is greater
	than INT_MAX, not greater or equal.
	(do_show_command) <var_integer, var_zinteger,
	var_zuinteger_unlimited>: Use %d for printing int, not %u.

gdb/testsuite/
2013-03-20  Pedro Alves  <palves@redhat.com>

	PR gdb/15289

	* gdb.base/remote.exp: Test
	"set remote hardware-watchpoint-limit -1",
	"set remote hardware-breakpoint-limit -1",
	"set remote hardware-watchpoint-limit 2147483647" and
	"set remote hardware-breakpoint-limit 2147483647".
2013-03-20 18:58:16 +00:00
Pedro Alves 0b1afbb37b Consistent use of (C) after "Copyright".
While writing the previous patch, I noticed that we're not consistent
with the (C) in the copyright header.  The maintainers manual prefers
having it, though also says it's optional.  We have over 10x more
files with (C) than without in gdb's code, so I spent a few minutes
grepping and fixing.  Funny enough, the testsuite has it backwards.
I'll leave that for another time.

gdb/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* amd64-darwin-tdep.c: Add (C) after Copyright.
	* cli/cli-cmds.h: Ditto.
	* cli/cli-decode.c: Ditto.
	* cli/cli-decode.h: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-dump.h: Ditto.
	* cli/cli-interp.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-script.h: Ditto.
	* cli/cli-setshow.c: Ditto.
	* cli/cli-setshow.h: Ditto.
	* cli/cli-utils.c: Ditto.
	* cli/cli-utils.h: Ditto.
	* config/alpha/nm-osf3.h: Ditto.
	* config/djgpp/djconfig.sh: Ditto.
	* config/i386/nm-fbsd.h: Ditto.
	* config/i386/nm-i386gnu.h: Ditto.
	* config/nm-linux.h: Ditto.
	* config/nm-nto.h: Ditto.
	* config/rs6000/nm-rs6000.h: Ditto.
	* config/sparc/nm-sol2.h: Ditto.
	* darwin-nat-info.c: Ditto.
	* dfp.c: Ditto.
	* dfp.h: Ditto.
	* gdb-demangle.h: Ditto.
	* i386-darwin-nat.c: Ditto.
	* i386-darwin-tdep.c: Ditto.
	* linux-fork.h: Ditto.
	* m32c-tdep.c: Ditto.
	* microblaze-linux-tdep.c: Ditto.
	* microblaze-rom.c: Ditto.
	* microblaze-tdep.c: Ditto.
	* microblaze-tdep.h: Ditto.
	* mips-linux-tdep.h: Ditto.
	* ppc-ravenscar-thread.c: Ditto.
	* ppc-ravenscar-thread.h: Ditto.
	* prologue-value.c: Ditto.
	* prologue-value.h: Ditto.
	* ravenscar-thread.c: Ditto.
	* ravenscar-thread.h: Ditto.
	* sparc-ravenscar-thread.c: Ditto.
	* sparc-ravenscar-thread.h: Ditto.
	* tilegx-linux-tdep.c: Ditto.
	* unwind_stop_reasons.def: Ditto.
	* windows-nat.h: Ditto.
	* xtensa-linux-tdep.c: Ditto.
	* xtensa-xtregs.c: Ditto.
	* regformats/regdat.sh: Ditto.
	* regformats/regdef.h: Ditto.

gdb/gdbserver/
2013-02-12  Pedro Alves  <palves@redhat.com>

	* linux-xtensa-low.c: Ditto.
	* xtensa-xtregs.c: Ditto.
2013-02-12 19:03:57 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Yao Qi 6fc1c7733e gdb/
* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New.
	Update comment to add_setshow_integer_cmd.
	* cli/cli-setshow.c (do_set_command): Handle case
	'var_zuinteger_unlimited'.
	(do_show_command): Likewise.
	* cli/cli-cmds.c (init_cmds): Call add_setshow_zuinteger_unlimited_cmd
	for command 'remotetimeout'.
	* command.h (enum var_types): New zuinteger_unlimited.  Update comment
	to var_integer.
	* source.c (_initialize_source): Call add_setshow_zuinteger_unlimited_cmd
	for command 'set listsize'.

gdb/doc/
	* gdb.texinfo (List): Describe the meaning of 0 and -1 in
	'set listsize'.

gdb/testsuite/
	* gdb.base/list.exp (set_listsize): Don't set arg to "unlimited"
	when it is less than 0.
2012-09-17 08:42:14 +00:00
Yao Qi 5b9afe8a35 gdb/
* cli/cli-decode.c (set_cmd_prefix): New.
	(lookup_cmd_for_prefixlist): New.
	(add_prefix_cmd): Call set_cmd_prefix and update field 'prefix'
	of each cmd_list_element in *prefixlist.
	(add_setshow_cmd_full): set_cmd_prefix.
	(add_alias_cmd): Likewise.
	* cli/cli-decode.h (struct cmd_list_element) <prefix>: New field.
	Declare 'auto_boolean_enums'.
	* cli/cli-setshow.c: Include "observer.h".
	(notify_command_param_changed_p): New.
	(add_setshow_auto_boolean_cmd): Move auto_boolean_enums out.
	Remove 'static'.
	(do_setshow_command): Split it to ...
	(do_set_command, do_show_command): ... them.  New.
	(do_set_command): Call observer_notify_command_param_changed if
	notify_command_param_changed_p returns true.
	(cmd_show_list): Caller update.
	* auto-load.c (set_auto_load_cmd): Likewise.
	* remote.c (show_remote_cmd): Likewise.
	* cli/cli-setshow.h: Update declarations.
	* top.c (execute_command): Call do_set_command and do_show_command.

	* NEWS: Mention new MI notification.
	* mi/mi-interp.c: Declare mi_command_param_changed.
	(mi_interpreter_init): Attach mi_command_param_changed to
	observer command_param_changed.
	(mi_command_param_changed): New.
	Remove mi_suppress_breakpoint_notifications.
	Define global variable mi_suppress_notification.
	(mi_breakpoint_created): Update.
	(mi_breakpoint_deleted): Likewise.
	(mi_breakpoint_modified): Likewise.
	* mi/mi-main.c (mi_cmd_execute): Likewise.  Check command
	'gdb-set' and set mi_suppress_notification.
	* mi/mi-main.h: (mi_suppress_notification): New struct.

gdb/doc/

	* observer.texi: New observer command_param_changed.
	* gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'.

gdb/testsuite/

	* gdb.mi/mi-cmd-param-changed.exp: New.
	* gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed".
	* gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-prompt.exp: Likewise.
2012-08-09 12:53:46 +00:00
Yao Qi e2d12c2152 gdb/
* cli/cli-setshow.c (do_setshow_command): Handle case 'var_uinteger'
	and 'var_zuninteger' together.  Handle case 'var_integer' and
	'var_zinteger' together.
2012-07-24 12:49:22 +00:00
Yao Qi c24343e289 gdb/
* cli/cli-setshow.c (do_setshow_command): Don't check pointer is
	NULL for xfree.
2012-07-20 08:59:32 +00:00
Yao Qi 6ace3df1ec * cli/cli-setshow.c (do_setshow_command): Handle case 'var_filename'
and case 'var_optional_filename' together.
	* infcmd.c (_initialize_infcmd): Call add_setshow_string_noescape_cmd
	instead of add_setshow_optional_filename_cmd for setshow command
	'args'.  Set completer for 'set args'.

gdb/testsuite:

	* gdb.base/setshow.exp: Test 'set args ~'.
2012-07-19 12:48:17 +00:00
Pedro Alves f99d8bf46c 2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream.

	* ui-out.h (struct ui_stream): Delete.
	(ui_out_field_stream): Adjust prototype.
	(ui_out_stream_new, ui_out_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete declarations.
	* ui-out.c (ui_out_field_stream): Change prototype to take a
	ui_file instead of a ui_stream.  Adjust.
	(ui_out_stream_new, ui_out_stream_delete, do_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete.
	* breakpoint.c (print_breakpoint_location)
	(print_one_detail_ranged_breakpoint, print_it_watchpoint): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* disasm.c (dump_insns): Ditto.
	(do_mixed_source_and_assembly, do_assembly_only): Adjust
	prototype.
	(gdb_disassembly): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* infcmd.c (print_return_value): Ditto.
	* osdata.c (info_osdata_command): Don't allocate a local
	ui_stream.
	* stack.c (print_frame_arg, print_frame_args, print_frame): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* tracepoint.c (print_one_static_tracepoint_marker): Don't
	allocate a local ui_stream.
	* mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen
	instead of ui_stream/ui_out_stream_new.
	(list_args_or_locals): Don't allocate a local ui_stream.
	* mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression)
	(mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* cli/cli-setshow.c (do_setshow_command): Ditto.
2012-03-27 19:08:37 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Pedro Alves 79a45e254f 2011-08-04 Pedro Alves <pedro@codesourcery.com>
* ui-out.h (uiout): Rename to ...
	(current_uiout): ... this.
	* ui-out.c (uiout): Rename to ...
	(current_uiout): ... this.
	* ada-lang.c (print_it_exception, print_one_exception)
	(print_mention_exception): Adjust.
	* breakpoint.c (watchpoint_check): Adjust.
	(print_breakpoint_location, print_one_breakpoint, breakpoint_1)
	(default_collect_info, watchpoints_info, print_one_catch_fork)
	(print_one_catch_vfork, print_one_catch_syscall)
	(print_one_catch_exec, mention, print_it_ranged_breakpoint)
	(print_one_ranged_breakpoint, print_mention_ranged_breakpoint)
	(print_it_watchpoint, print_mention_watchpoint)
	(print_it_masked_watchpoint, print_mention_masked_watchpoint)
	(print_it_exception_catchpoint, print_one_exception_catchpoint)
	(print_mention_exception_catchpoint, say_where, bkpt_print_it)
	(bkpt_print_mention, momentary_bkpt_print_it)
	(tracepoint_print_mention, update_static_tracepoint)
	(tracepoints_info, save_breakpoints): Adjust.
	* cli-out.c (field_separator): Adjust.
	* cp-abi.c (list_cp_abis, show_cp_abi_cmd): Adjust.
	* exceptions.c (catch_exceptions_with_msg, catch_errors): Adjust.
	* frame.c (get_current_frame): Adjust.
	* infcmd.c (run_command_1, print_return_value): Adjust.
	* inferior.c (inferior_command, info_inferiors_command): Adjust.
	* infrun.c (print_end_stepping_range_reason): Adjust.
	(print_signal_exited_reason, print_exited_reason): Adjust.
	(print_signal_received_reason, print_no_history_reason): Adjust.
	* interps.c (interp_set): Adjust.
	* osdata.c (info_osdata_command): Adjust.
	* progspace.c (maintenance_info_program_spaces_command): Adjust.
	* remote-fileio.c (remote_fileio_request): Adjust.
	* remote.c (show_remote_cmd): Adjust.
	* solib.c (info_sharedlibrary_command): Adjust.
	* source.c (print_source_lines_base): Adjust.
	* stack.c (print_stack_frame): Adjust.
	(do_gdb_disassembly, print_frame_info, print_frame): Adjust.
	* symfile-mem.c (add_vsyscall_page): Adjust.
	* symfile.c (load_progress, generic_load)
	(print_transfer_performance): Adjust.
	* thread.c (info_threads_command, restore_selected_frame)
	(thread_command): Adjust.
	* top.c (make_cleanup_restore_ui_file): Adjust.
	* tracepoint.c (tvariables_info_1, trace_status_mi, tfind_1)
	(print_one_static_tracepoint_marker): Adjust.
	* cli/cli-cmds.c (print_disassembly): Adjust.
	* cli/cli-decode.c (print_doc_line): Adjust.
	* cli/cli-interp.c (safe_execute_command): Adjust.
	* cli/cli-logging.c (set_logging_redirect, pop_output_files)
	(handle_redirections): Adjust.
	* cli/cli-script.c (show_user_1): Adjust.
	* cli/cli-setshow.c (do_setshow_command, cmd_show_list): Adjust.
	* mi/mi-cmd-break.c (breakpoint_notify): Adjust.
	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Adjust.
	* mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_path)
	(mi_cmd_env_dir): Adjust.
	* mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
	(print_partial_file_name, mi_cmd_file_list_exec_source_files): Adjust.
	* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
	(mi_cmd_stack_info_depth, mi_cmd_stack_list_args)
	(list_args_or_locals): Adjust.
	* mi/mi-cmd-var.c (print_varobj, mi_cmd_var_create)
	(mi_cmd_var_delete, mi_cmd_var_set_format, mi_cmd_var_set_frozen)
	(mi_cmd_var_show_format, mi_cmd_var_info_num_children)
	(mi_cmd_var_list_children, mi_cmd_var_info_type)
	(mi_cmd_var_info_path_expression, mi_cmd_var_info_expression)
	(mi_cmd_var_show_attributes, mi_cmd_var_evaluate_expression)
	(mi_cmd_var_assign, mi_cmd_var_update, varobj_update_one): Adjust.
	* mi/mi-interp.c (mi_on_normal_stop): Adjust.
	* mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_thread_select)
	(mi_cmd_thread_list_ids, mi_cmd_thread_info, print_one_inferior)
	(list_available_thread_groups, mi_cmd_list_thread_groups)
	(mi_cmd_data_list_register_names)
	(mi_cmd_data_list_changed_registers)
	(mi_cmd_data_list_register_values, get_register)
	(mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
	(mi_cmd_data_read_memory_bytes, mi_cmd_list_features)
	(mi_cmd_list_target_features, mi_cmd_add_inferior)
	(mi_execute_command, mi_load_progress): Adjust.
	* mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Adjust.
	* python/py-auto-load.c (print_script, info_auto_load_scripts):
	Adjust.
	* python/py-breakpoint.c (bppy_get_commands): Adjust.
	* tui/tui-interp.c (tui_command_loop): Adjust.
	* tui/tui-io.c (tui_setup_io, tui_initialize_io): Adjust.
2011-08-04 19:10:14 +00:00
Andrew Burgess a40a111fc7 http://sourceware.org/ml/gdb-patches/2011-07/msg00085.html
* cli/cli-setshow.c (do_setshow_command): Display var_zinteger
	variables as signed, not unsigned.
2011-07-07 08:38:37 +00:00
Michael Snyder db5f229b95 2011-02-14 Michael Snyder <msnyder@vmware.com>
* command.h (enum command_class): New class 'no_set_class', for
	"show" commands without a corresponding "set" command.
	* value.c (_initialize_values): Use 'no_set_class' for "show values".
	* copying.c (_initialize_copying): Ditto for "show copying" and
	"show warranty".
	* cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and
	"show version".
	* cli/cli-setshow.c (cmd_show_list): Skip "show" commands for
	which there is no corresponding "set" command (eg. "show copying").
2011-02-14 23:41:33 +00:00
Michael Snyder 9a2b4c1ba7 2011-01-05 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: Shorten lines of >= 80 columns.
	* cli/cli-decode.c: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* common/signals.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-disas.c: Ditto.
	* mi/mi-cmd-stack.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-cmds.c: Ditto.
	* mi/mi-common.h: Ditto.
	* mi/mi-console.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
	* osf-share/cma_attr.c: Ditto.
	* osf-share/cma_deb_core.h: Ditto.
	* osf-share/cma_debug_client.h: Ditto.
	* osf-share/cma_handle.h: Ditto.
	* osf-share/cma_mutex.h: Ditto.
	* osf-share/cma_stack_int.h: Ditto.
	* osf-share/cma_tcb_defs.h: Ditto.
	* python/py-auto-load.c: Ditto.
	* python/py-breakpoint.c: Ditto.
	* python/py-cmd.c: Ditto.
	* python/py-frame.c: Ditto.
	* python/py-objfile.c: Ditto.
	* python/py-param.c: Ditto.
	* python/py-progspace.c: Ditto.
	* python/py-symbol.c: Ditto.
	* python/py-value.c: Ditto.
	* python/python-internal.h: Ditto.
	* python/python.c: Ditto.
	* tui/tui-data.c: Ditto.
	* tui/tui-disasm.c: Ditto.
	* tui/tui-hooks.c: Ditto.
	* tui/tui-io.c: Ditto.
	* tui/tui-layout.c: Ditto.
	* tui/tui-regs.c: Ditto.
	* tui/tui-source.c: Ditto.
	* tui/tui-stack.c: Ditto.
	* tui/tui-win.c: Ditto.
	* tui/tui-windata.c: Ditto.
	* tui/tui-winsource.c: Ditto.
2011-01-06 00:57:05 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Michael Snyder ebcd3b23ee 2010-12-28 Michael Snyder <msnyder@vmware.com>
* command.h: Comment clean-up.
	* cli/cli-cmds.c: Ditto.
	* cli/cli-cmds.h: Ditto.
	* cli/cli-decode.c: Ditto.
	* cli/cli-decode.h: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-interp.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* cli/cli-setshow.h: Ditto.
2010-12-29 02:11:04 +00:00
Michael Snyder cdb27c12f3 2010-05-17 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: White space.
	* cli/cli-decode.c: White space.
	* cli/cli-dump.c: White space.
	* cli/cli-interp.c: White space.
	* cli/cli-logging.c: White space.
	* cli/cli-script.c: White space.
	* cli/cli-setshow.c: White space.
2010-05-17 19:28:12 +00:00
Tom Tromey f870a310ee gdb
2010-03-05  Corinna Vinschen  <vinschen@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* utils.c (host_char_to_target): Add 'gdbarch' argument.
	(parse_escape): Likewise.
	* python/py-utils.c (unicode_to_target_string): Update.
	(unicode_to_target_python_string): Update.
	(target_string_to_unicode): Update.
	* printcmd.c (printf_command): Update.
	* p-exp.y (yylex): Update.
	* objc-exp.y (yylex): Update.
	* mi/mi-parse.c: Include charset.h.
	(mi_parse_escape): New function.
	(mi_parse_argv): Use it.
	* jv-exp.y (yylex): Update.
	* i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
	function.
	(i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
	* gdbarch.sh (auto_charset, auto_wide_charset): New.
	* gdbarch.c: Rebuild.
	* gdbarch.h: Rebuild.
	* defs.h (parse_escape): Update.
	* cli/cli-setshow.c: Include arch-utils.h.
	(do_setshow_command): Update.
	* cli/cli-cmds.c (echo_command): Update.
	* charset.h (target_charset, target_wide_charset): Update.
	* charset.c: Include arch-utils.h.
	(target_charset_name): Default to "auto".
	(target_wide_charset_name): Likewise.
	(show_target_charset_name): Handle "auto".
	(show_target_wide_charset_name): Likewise.
	(be_le_arch): New global.
	(set_be_le_names): Add 'gdbarch' argument.
	(validate): Likewise.  Don't call set_be_le_names.
	(set_charset_sfunc, set_host_charset_sfunc)
	(set_target_charset_sfunc, set_target_wide_charset_sfunc):
	Update.
	(target_charset): Add 'gdbarch' argument.
	(target_wide_charset): Likewise.  Remove 'byte_order' argument.
	(auto_target_charset_name): New global.
	(default_auto_charset, default_auto_wide_charset): New functions.
	(_initialize_charset): Set auto_target_charset_name.  Allow "auto"
	for target charsets.  Copy result of nl_langinfo.  Use GetACP if
	USE_WIN32API.
	* c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
	remove 'byte_order' argument.  Update.
	(classify_type): Likewise.
	(c_emit_char): Update.
	(c_printchar): Update.
	(c_printstr): Update.
	(c_get_string): Update.
	(evaluate_subexp_c): Update.
	* arch-utils.h (default_auto_charset, default_auto_wide_charset):
	Declare.
	* python/python.c (gdbpy_target_charset): New function.
	(gdbpy_target_wide_charset): Likewise.
	(GdbMethods): Update.
	* NEWS: Update.
gdb/doc
	* gdb.texinfo (Basic Python): Document target_charset and
	target_wide_charset.
gdb/testsuite
	* gdb.python/py-prettyprint.py (pp_nullstr.to_string): Use
	gdb.target_charset.
	(pp_ns.to_string): Likewise.
2010-03-05 20:18:19 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Pedro Alves 759ef83693 * ui-file.h (ui_file_xstrdup): Mention that the length argument
may be NULL.
	* ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is
	NULL.
	* aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length
	parameter to ui_file_xstrdup.
	* arm-tdep.c (_initialize_arm_tdep): Ditto.
	* infrun.c (print_target_wait_results): Ditto.
	* language.c (add_language): Ditto.
	* linespec.c (cplusplus_error): Ditto.
	* remote.c (escape_buffer): Ditto.
	* typeprint.c (type_to_string): Ditto.
	* utils.c (error_stream): Ditto.
	* varobj.c (value_get_print_value): Ditto.
	* xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with
	`length' local.  Pass it to ui_file_xstrdup, and avoid an strlen
	call.
	* gdbarch.sh (verify_gdbarch): Ditto.
	* gdbarch.c: Regenerate.
	* cli/cli-setshow.c (do_setshow_command): Pass NULL as length
	parameter to ui_file_xstrdup.
	* python/python-frame.c (frapy_str): Ditto.
	* python/python-type.c (typy_str): Use the length local instead of
	calling strlen.
	* python/python-value.c (valpy_str): Pass NULL as length parameter
	to ui_file_xstrdup.
2009-08-14 00:32:33 +00:00
Jan Kratochvil 1b36a34b7a gdb/
Replace the savestring calls by xstrdup calls where possible.
	* breakpoint.c (condition_command, set_raw_breakpoint)
	(create_catchpoint, update_breakpoint_locations): Replace the
	savestring calls by xstrdup calls where possible.
	* buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
	(record_producer): Likewise.
	* coffread.c (coff_start_symtab, complete_symtab): Likewise.
	* corefile.c (set_gnutarget): Likewise.
	* dbxread.c (add_new_header_file): Likewise.
	* demangle.c (set_demangling_command, set_demangling_style): Likewise.
	* event-top.c (push_prompt, pop_prompt, command_line_handler)
	(set_async_prompt): Likewise.
	* infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
	Likewise.
	* language.c (set_language_command, _initialize_language): Likewise.
	* linespec.c (decode_line_2): Likewise.
	* rs6000-nat.c (add_vmap): Likewise.
	* top.c (set_prompt, init_history, init_main): Likewise.
	* tracepoint.c (stringify_collection_list): Likewise.
	* varobj.c (varobj_create): Remove variable expr_len.  Replace the
	savestring calls by xstrdup calls where possible.
	(value_of_root, c_name_of_variable, c_describe_child): Replace the
	savestring calls by xstrdup calls where possible.
	* xcoffread.c (complete_symtab): Likewise.
	* cli/cli-script.c (build_command_line, define_command): Likewise.
	* cli/cli-setshow.c (do_setshow_command): Likewise.
2009-05-23 16:17:18 +00:00
Pedro Alves 1e8fb9762b 2009-01-23 Pedro Alves <pedro@codesourcery.com>
* cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
	* cli/cli-setshow.c (do_setshow_command): Handle it.
	* command.h (enum var_types): Add var_zuinteger.
	(add_setshow_zuinteger_cmd): Declare.

	* valprint.c (_initialize_valprint): Change the set input-radix
	and set output-radix commands to zuinteger type.

2009-01-23  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/radix.exp: Add tests to ensure that that set
	input-radix 0 and set output-radix 0 are really rejected.
2009-01-23 18:47:46 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Ulrich Weigand f070423477 * cli/cli-setshow.c (do_setshow_command): Use dynamically sized buffer
to construct error message if no argument was supplied.
2007-11-17 00:57:01 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Maciej W. Rozycki 1430be3e90 * cli/cli-setshow.c (do_setshow_command): Remove trailing
whitespace when setting a var_filename.
2007-05-10 13:28:03 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 427c3a89d3 gdb/
* remote.c (set_remote_cmd): Call help_list.
	(show_remote_cmd): Skip legacy aliases.  Handle non-show_cmd
	entries.  Add missed cleanup.
	* cli/cli-setshow.c (cmd_show_list): Handle non-show_cmd entries.
gdb/doc/
	* gdb.texinfo (Remote configuration): Rewrite documentation for
	packet configuration commands.
	(OS Information): Adjust reference to qXfer:auxv:read.
	(General Query Packets): Remove references to read-aux-vector-packet
	and set remote get-thread-local-storage-address.
2006-11-14 21:40:19 +00:00
Eli Zaretskii 10f9c2135e * cli/cli-utils.h:
* cli/cli-utils.c:
	* cli/cli-setshow.h:
	* cli/cli-setshow.c:
	* cli/cli-script.h:
	* cli/cli-script.c:
	* cli/cli-logging.c:
	* cli/cli-interp.c:
	* cli/cli-dump.h:
	* cli/cli-dump.c:
	* cli/cli-decode.h:
	* cli/cli-decode.c:
	* cli/cli-cmds.h:
	* cli/cli-cmds.c: Add (c) after Copyright.  Update FSF address.
2005-12-17 22:40:17 +00:00
Daniel Jacobowitz 3b113db73f * cli/cli-setshow.c (do_setshow_command): Partially revert previous
change.  Cast to "char **" for var_string.
2005-05-28 18:27:28 +00:00
Andrew Cagney 47b667dea5 2005-05-26 Andrew Cagney <cagney@gnu.org>
* command.h (add_setshow_integer_cmd): Make VAR an integer.
	* cli/cli-decode.c (add_setshow_integer_cmd): Update to match.
	* valops.c (value_string): Add a cast.
	* eval.c (evaluate_subexp_standard): Use gdb_byte for byte buffers.
	* breakpoint.c (re_enable_breakpoints_in_shlibs): Use gdb_byte for
	byte buffers.
	* target.h (struct target_ops): For to_insert_hw_breakpoint and
	to_remove_hw_breakpoint use gdb_byte for byte buffer parameters.
	* breakpoint.h (struct bp_location): Make shadow_contents a
	gdb_byte buffer.
	* cli/cli-setshow.c (do_setshow_command): Fix cast.
	* cli/cli-dump.c (restore_section_callback)
	(restore_binary_file): Use gdb_byte for byte buffers.
	* proc-service.c (ps_ptwrite, ps_ptread, ps_pdwrite): Fix casts.
	(ps_xfer_memory): Use gdb_byte for byte buffers.
	* tracepoint.c (mem2hex): Use gdb_byte for byte buffers, and char
	for string buffers.
	* ser-tcp.c (net_open): Make len a socklen_t.
2005-05-26 20:49:03 +00:00
Andrew Cagney 525226b563 2005-02-21 Andrew Cagney <cagney@gnu.org>
Replace string variables with a filename completer with
	add_setshow_optional_filename_cmd.
	* solib.c, symfile.c: Update.
	* cli/cli-setshow.c: Do not tidle expand the file.
2005-02-21 07:08:42 +00:00
Andrew Cagney 4d28ad1ece 2005-02-21 Andrew Cagney <cagney@gnu.org>
Add more uses of add_setshow_string_cmd, add_setshow_integer_cmd,
	and add_setshow_string_noescape_cmd.
	* cli/cli-setshow.c (deprecated_show_value_hack): Do not print a
	NULL command's value.
	* kod.c, language.c, ocd.c, remote-e7000.c, remote-mips.c: Update.
	* remote-sds.c, remote.c, symfile.c, top.c: Update.
2005-02-21 06:21:09 +00:00
Andrew Cagney b4b4ac0b71 2005-02-20 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_optional_filename_cmd): New
	function.
	* cli/cli-setshow.c (deprecated_show_value_hack)
	(do_setshow_command): Handle var_optional_filename.
	* command.h (enum var_types): Add var_optional_filename.
	(add_setshow_optional_filename_cmd): Declare.
	* infcmd.c (notice_args_read): Use.
2005-02-21 03:25:56 +00:00