From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19589 invoked by alias); 14 Mar 2012 18:54:41 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 19534 invoked by uid 9079); 14 Mar 2012 18:54:39 -0000 Date: Wed, 14 Mar 2012 18:54:00 -0000 Message-ID: <20120314185439.19519.qmail@sourceware.org> From: kseitz@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-keiths-linespec-rewrite: Merge remote-tracking branch 'gdb/master' into archer-keiths-linespec-rewrite X-Git-Refname: refs/heads/archer-keiths-linespec-rewrite X-Git-Reftype: branch X-Git-Oldrev: 828153415da5654864cace16f9118bbc873ff7d2 X-Git-Newrev: 5ee352b2795621dea72001d3b4a5d586b4d8e633 X-SW-Source: 2012-q1/txt/msg00062.txt.bz2 List-Id: The branch, archer-keiths-linespec-rewrite has been updated via 5ee352b2795621dea72001d3b4a5d586b4d8e633 (commit) via fb7f39bc778010f4d1fc32d5e13660159f60b149 (commit) via da6ec63a13ac3cd2cf6b8a8ea7e59ea1ee4f6cb9 (commit) via 0067cc7c1ad992da92f1a4e8568c6e7990f5c6e4 (commit) via 1c603d2d9bc394132964ca3681eb4745a84932f3 (commit) via 181c7f1c94a549fad5ce0a73c8855f462a184a8c (commit) via c1b07e788b83e73e0a76306392c8d94b86bdaeb9 (commit) via d7a9e1cdfb8eb4ba72c32e97bf143db71c6d94b7 (commit) via 7058f6ce5949ab67021d681410cdc363ff8e6141 (commit) via 8b1db1260675f235c66446533c4b224d644ea51f (commit) via 820dd2b62a2f176874c5b08c114d89d70ca3880f (commit) via e0da1dbc89bdddf6f45e7f98eef935fcb5ca30c3 (commit) via a6c252423c3bfe1adb83d8e1120c7cede77ecd04 (commit) via 7e0874ee6165f4284daf1d378fe44a665ee46be1 (commit) via 3b8846cfe9c3f6f33666d8d22dfd0efbd67edb22 (commit) from 828153415da5654864cace16f9118bbc873ff7d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 5ee352b2795621dea72001d3b4a5d586b4d8e633 Merge: fb7f39b da6ec63 Author: keiths Date: Wed Mar 14 11:42:39 2012 -0700 Merge remote-tracking branch 'gdb/master' into archer-keiths-linespec-rewrite commit fb7f39bc778010f4d1fc32d5e13660159f60b149 Author: keiths Date: Wed Mar 14 11:42:16 2012 -0700 EOF -> EOI commit da6ec63a13ac3cd2cf6b8a8ea7e59ea1ee4f6cb9 Author: Jan Kratochvil Date: Wed Mar 14 07:58:01 2012 +0000 gdb/ Fix double prompt of 'interpreter-exec mi'. * mi/mi-interp.c (mi_execute_command_input_handler): New prototype. (mi_interpreter_resume): use it. (mi_execute_command_input_handler): New function. * mi/mi-main.c (mi_execute_command): Move prompt printing to mi_execute_command_input_handler. gdb/testsuite/ * gdb.mi/mi2-prompt.exp: New file. commit 0067cc7c1ad992da92f1a4e8568c6e7990f5c6e4 Author: Mike Frysinger Date: Wed Mar 14 05:04:18 2012 +0000 sim: ppc: fix compilation on AIX 7.1 due to st_pad name collisions AIX 7.1 defines st_pad[123] to st_[amc]tim.tv_pad, respectively, breaking declaration of st_pad[123] members in struct solaris_stat. Undefine them as this is no less terrible than other solutions (like renaming the fields and losing the binding to Solaris' names). From: Michael Haubenwallner commit 1c603d2d9bc394132964ca3681eb4745a84932f3 Author: Joel Brobecker Date: Wed Mar 14 01:47:45 2012 +0000 Mark latest entry in ChangeLog as "tiny change". commit 181c7f1c94a549fad5ce0a73c8855f462a184a8c Author: Joel Brobecker Date: Wed Mar 14 01:46:59 2012 +0000 Fix -Wmissing-prototypes build warnings on Darwin. gdb/ 2012-03-13 Josh Matthews * darwin-nat-info.c (_initialize_darwin_info_commands): Add prototype. (darwin_debug_port_info): Make static. * darwin-nat.c (_initialize_darwin_inferior): Add prototype. * machoread.c (_initialize_machoread): Add prototype. * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get) (i386_darwin_set_control, i386_darwin_get_control) i386_darwin_dr_set_addr, i386_darwin_get_addr) i386_darwin_get_status, i386_darwin_get_control): Comment out with HW_WATCHPOINT_NOT_YET_ENABLED macro. commit c1b07e788b83e73e0a76306392c8d94b86bdaeb9 Author: Joel Brobecker Date: Wed Mar 14 01:39:11 2012 +0000 Testcase for: "ax-gdb: Do not treat enums and bools as integers". gdb/testsuite/ChangeLog: * gdb.base/enum_cond.c, gdb.base/enum_cond.exp: New testcase. commit d7a9e1cdfb8eb4ba72c32e97bf143db71c6d94b7 Author: Joel Brobecker Date: Wed Mar 14 01:38:58 2012 +0000 ax-gdb: Do not treat enums and bools as integers. This patch fixes a problem when using gdb + gdbserver, and trying to break on a function when one of the (enum) parameters is equal to a certain value, and the size of that enum is 1 byte. (gdb) break mixed.adb:15 if light = green Breakpoint 2 at 0x402d5a: file mixed.adb, line 15. (gdb) cont Continuing. [Inferior 1 (process 9742) exited normally] The debugger should have stopped once when our function was call with light set to green. Here is what happens: Because we're using a recent GDBserver, GDB hands off the evaluation of the condition to GDBserver, by providing it in the Z0 packet. This is what GDB sends: $Z0,402d5a,1;X13,26000622100223ff1c16100219162022011327#cf I decoded the condition as follow: 260006 reg 6 -> push 2210 const8 0x10 -> push 02 add (stack now has 1 element equal to reg6 + 16) 23ff1c const16 0xff1c 1610 ext 16 (sign extend 16 bits) 02 add (stack now has 1 element equal to reg6 + 16 - 228) 19 ref32: Pop as addr, push 32bit value at addr. 1620 ext 32 (sign extend 32 bits) 2201 const8 0x01 13 equal 27 end The beginning of the agent expression can be explained by the address of symbol "light": (gdb) info addr light Symbol "light" is a variable at frame base reg $rbp offset 16+-228. However, the mistake is the "ext 32" operation (extend 32 bits), because our variable is *not* 32bits, only 8: (gdb) print light'size $5 = 8 But the reason why GDB decides to use a 32bit extension is because it overrides the symbol's type with a plain integer type in ax-gdb.c:gen_usual_unary... /* If the value is an enum or a bool, call it an integer. */ case TYPE_CODE_ENUM: case TYPE_CODE_BOOL: value->type = builtin_type (exp->gdbarch)->builtin_int; break; ... before calling require_rvalue. And of course, that causes the generator to generate a sizeof(int) extension of the result. One way to fix this would be to use an integer type of the correct size, but I do not understand why this is necessary. The two routines that use that information to generate the opcode down the line are gen_fetch (for a memory value), or gen_extend (for a register value). And they both have handling of enums and bools. So the fix we elected to implement was simply to remove that code. gdb/ChangeLog: * ax-gdb.c (gen_usual_unary): Remove special handling of enum and bool types. commit 7058f6ce5949ab67021d681410cdc363ff8e6141 Author: Joel Brobecker Date: Wed Mar 14 01:38:50 2012 +0000 testcase for "gdb-ax.c: Add handling of TYPE_CODE_RANGE types" gdb/testsuite/ChangeLog: * gdb.ada/bp_range_type: New testcase. commit 8b1db1260675f235c66446533c4b224d644ea51f Author: Joel Brobecker Date: Wed Mar 14 01:38:29 2012 +0000 ax-gdb.c: Add handling of TYPE_CODE_RANGE types. This patch fixes an error that occurs with GDB + GDBserver when trying to insert a breakpoint with a condition that involves a range type. For instance: type INT_T is range 0 .. 1000; INT_VAR : INT_T := 12; And then trying to insert the breakpoint: (gdb) break foo.adb:18 if int_var > 15 Breakpoint 1 at 0x4021eb: file foo.adb, line 18. (gdb) cont Continuing. /[...]/ax-gdb.c:560: internal-error: gen_fetch: bad type code A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) This patch fixes the problem by adding handling for range types in gen_fetch. gdb/ChangeLog: * ax-gdb.c (gen_fetch): Add handling for TYPE_CODE_RANGE types. commit 820dd2b62a2f176874c5b08c114d89d70ca3880f Author: gdbadmin Date: Wed Mar 14 00:00:32 2012 +0000 *** empty log message *** commit e0da1dbc89bdddf6f45e7f98eef935fcb5ca30c3 Author: Alan Modra Date: Tue Mar 13 23:00:05 2012 +0000 daily update commit a6c252423c3bfe1adb83d8e1120c7cede77ecd04 Author: Joel Brobecker Date: Tue Mar 13 22:29:45 2012 +0000 Minor cleanup in aix-thread.c:supply_fprs. This is a minor cleanup that makes supply_fprs more consistent with how fill_fprs was written. gdb/ChangeLog: * aix-thread.c (supply_fprs): Make more consistent with fill_fprs. commit 7e0874ee6165f4284daf1d378fe44a665ee46be1 Author: Joel Brobecker Date: Tue Mar 13 22:27:11 2012 +0000 Fix buffer overflow in aix-thread.c:fill_fprs gdb/ 2012-03-08 Chris January * aix-thread.c (fill_sprs): Store the floating point registers at the correct offsets into vals. commit 3b8846cfe9c3f6f33666d8d22dfd0efbd67edb22 Author: Doug Evans Date: Tue Mar 13 21:02:35 2012 +0000 * NEWS: Mention symbol-reloading has been deleted. * symfile.c (symbol_reloading): Delete. (show_symbol_reloading): Delete. (_initialize_symfile): Delete set/show symbol-reloading. doc/ * gdb.texinfo (Help): Change apropos example to use "alias" instead of "reload". (Symbols): Delete docs for set/show symbol-reloading. * gdbint.texinfo (Defining Other Architecture Features): Delete SYMBOL_RELOADING_DEFAULT. * refcard.tex: Delete reference to symbol-reloading. testsuite/ * gdb.base/default.exp: Delete tests for symbol-reloading. * gdb.base/help.exp: Ditto. * gdb.base/setshow.exp: Ditto. * gdb.base/gdb_history: Delete references to symbol-reloading. ----------------------------------------------------------------------- Summary of changes: bfd/version.h | 2 +- gdb/ChangeLog | 45 +++++++++++++++++++++++++ gdb/NEWS | 2 + gdb/aix-thread.c | 11 ++++-- gdb/ax-gdb.c | 9 ++--- gdb/darwin-nat-info.c | 5 ++- gdb/darwin-nat.c | 3 ++ gdb/doc/ChangeLog | 9 +++++ gdb/doc/gdb.texinfo | 38 +++------------------ gdb/doc/gdbint.texinfo | 5 --- gdb/doc/refcard.tex | 2 +- gdb/i386-darwin-nat.c | 3 +- gdb/linespec.c | 24 +++++++------- gdb/machoread.c | 3 ++ gdb/mi/mi-interp.c | 14 +++++++- gdb/mi/mi-main.c | 3 -- gdb/symfile.c | 25 -------------- gdb/testsuite/ChangeLog | 19 ++++++++++ gdb/testsuite/gdb.ada/bp_range_type.exp | 41 +++++++++++++++++++++++ gdb/testsuite/gdb.ada/bp_range_type/foo.adb | 26 ++++++++++++++ gdb/testsuite/gdb.ada/bp_range_type/pck.adb | 21 ++++++++++++ gdb/testsuite/gdb.ada/bp_range_type/pck.ads | 19 ++++++++++ gdb/testsuite/gdb.base/default.exp | 4 -- gdb/testsuite/gdb.base/enum_cond.c | 48 +++++++++++++++++++++++++++ gdb/testsuite/gdb.base/enum_cond.exp | 44 ++++++++++++++++++++++++ gdb/testsuite/gdb.base/gdb_history | 2 - gdb/testsuite/gdb.base/help.exp | 4 -- gdb/testsuite/gdb.base/setshow.exp | 4 -- gdb/testsuite/gdb.linespec/ls-errs.exp | 6 ++-- gdb/testsuite/gdb.mi/mi2-prompt.exp | 38 +++++++++++++++++++++ gdb/version.in | 2 +- sim/ppc/ChangeLog | 4 ++ sim/ppc/emul_unix.c | 5 +++ 33 files changed, 380 insertions(+), 110 deletions(-) create mode 100644 gdb/testsuite/gdb.ada/bp_range_type.exp create mode 100644 gdb/testsuite/gdb.ada/bp_range_type/foo.adb create mode 100644 gdb/testsuite/gdb.ada/bp_range_type/pck.adb create mode 100644 gdb/testsuite/gdb.ada/bp_range_type/pck.ads create mode 100644 gdb/testsuite/gdb.base/enum_cond.c create mode 100644 gdb/testsuite/gdb.base/enum_cond.exp create mode 100644 gdb/testsuite/gdb.mi/mi2-prompt.exp First 500 lines of diff: diff --git a/bfd/version.h b/bfd/version.h index ac88154..e422220 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20120313 +#define BFD_VERSION_DATE 20120314 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0db4a16..f3d56c1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,50 @@ +2012-03-14 Jan Kratochvil + + Fix double prompt of 'interpreter-exec mi'. + * mi/mi-interp.c (mi_execute_command_input_handler): New prototype. + (mi_interpreter_resume): use it. + (mi_execute_command_input_handler): New function. + * mi/mi-main.c (mi_execute_command): Move prompt printing to + mi_execute_command_input_handler. + +2012-03-13 Josh Matthews (tiny change) + + * darwin-nat-info.c (_initialize_darwin_info_commands): Add + prototype. + (darwin_debug_port_info): Make static. + * darwin-nat.c (_initialize_darwin_inferior): Add prototype. + * machoread.c (_initialize_machoread): Add prototype. + * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get) + (i386_darwin_set_control, i386_darwin_get_control) + i386_darwin_dr_set_addr, i386_darwin_get_addr) + i386_darwin_get_status, i386_darwin_get_control): + Comment out with HW_WATCHPOINT_NOT_YET_ENABLED macro. + +2012-03-13 Joel Brobecker + + * ax-gdb.c (gen_usual_unary): Remove special handling of + enum and bool types. + +2012-03-13 Joel Brobecker + + * ax-gdb.c (gen_fetch): Add handling for TYPE_CODE_RANGE types. + +2012-03-13 Joel Brobecker + + * aix-thread.c (supply_fprs): Make more consistent with fill_fprs. + +2012-03-13 Chris January + + * aix-thread.c (fill_sprs): Store the floating point registers + at the correct offsets into vals. + 2012-03-13 Doug Evans + * NEWS: Mention symbol-reloading has been deleted. + * symfile.c (symbol_reloading): Delete. + (show_symbol_reloading): Delete. + (_initialize_symfile): Delete set/show symbol-reloading. + * dwarf2read.c (load_partial_comp_unit): Defer adding cu to read_in_chain until we have successfully read it in. (load_full_comp_unit): Ditto. diff --git a/gdb/NEWS b/gdb/NEWS index 9c89346..7d70404 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -3,6 +3,8 @@ *** Changes since GDB 7.4 +* The option "symbol-reloading" has been deleted as it is no longer used. + * Python scripting ** GDB commands implemented in Python can now be put in command class diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 3cdab48..534f731 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1075,9 +1075,11 @@ supply_fprs (struct regcache *regcache, double *vals) floating-point registers. */ gdb_assert (ppc_floating_point_unit_p (gdbarch)); - for (regno = 0; regno < ppc_num_fprs; regno++) - regcache_raw_supply (regcache, regno + tdep->ppc_fp0_regnum, - (char *) (vals + regno)); + for (regno = tdep->ppc_fp0_regnum; + regno < tdep->ppc_fp0_regnum + ppc_num_fprs; + regno++) + regcache_raw_supply (regcache, regno, + (char *) (vals + regno - tdep->ppc_fp0_regnum)); } /* Predicate to test whether given register number is a "special" register. */ @@ -1356,7 +1358,8 @@ fill_fprs (const struct regcache *regcache, double *vals) regno < tdep->ppc_fp0_regnum + ppc_num_fprs; regno++) if (REG_VALID == regcache_register_status (regcache, regno)) - regcache_raw_collect (regcache, regno, vals + regno); + regcache_raw_collect (regcache, regno, + vals + regno - tdep->ppc_fp0_regnum); } /* Store the special registers into the specified 64-bit and 32-bit diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index bd81338..a76e781 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -515,6 +515,9 @@ gen_fetch (struct agent_expr *ax, struct type *type) ax_trace_quick (ax, TYPE_LENGTH (type)); } + if (TYPE_CODE (type) == TYPE_CODE_RANGE) + type = TYPE_TARGET_TYPE (type); + switch (TYPE_CODE (type)) { case TYPE_CODE_PTR: @@ -877,12 +880,6 @@ gen_usual_unary (struct expression *exp, struct agent_expr *ax, case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: return; - - /* If the value is an enum or a bool, call it an integer. */ - case TYPE_CODE_ENUM: - case TYPE_CODE_BOOL: - value->type = builtin_type (exp->gdbarch)->builtin_int; - break; } /* If the value is an lvalue, dereference it. */ diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c index 9170e14..9741538 100644 --- a/gdb/darwin-nat-info.c +++ b/gdb/darwin-nat-info.c @@ -301,7 +301,7 @@ info_mach_ports_command (char *args, int from_tty) } -void +static void darwin_debug_port_info (task_t task, mach_port_t port) { kern_return_t kret; @@ -843,6 +843,9 @@ info_mach_exceptions_command (char *args, int from_tty) } } +/* -Wmissing-prototypes */ +extern initialize_file_ftype _initialize_darwin_info_commands; + void _initialize_darwin_info_commands (void) { diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 0feebe3..de661a3 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -2015,6 +2015,9 @@ darwin_supports_multi_process (void) return 1; } +/* -Wmissing-prototypes */ +extern initialize_file_ftype _initialize_darwin_inferior; + void _initialize_darwin_inferior (void) { diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 20f2816..80dd326 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,12 @@ +2012-03-13 Doug Evans + + * gdb.texinfo (Help): Change apropos example to use "alias" instead + of "reload". + (Symbols): Delete docs for set/show symbol-reloading. + * gdbint.texinfo (Defining Other Architecture Features): Delete + SYMBOL_RELOADING_DEFAULT. + * refcard.tex: Delete reference to symbol-reloading. + 2012-03-07 Pedro Alves * gdb.texinfo (General Query Packets): Document new diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index e8bbded..a5022d4 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1700,7 +1700,7 @@ commands, and their documentation, for the regular expression specified in @var{args}. It prints out all matches found. For example: @smallexample -apropos reload +apropos alias @end smallexample @noindent @@ -1708,10 +1708,11 @@ results in: @smallexample @c @group -set symbol-reloading -- Set dynamic symbol table reloading - multiple times in one run -show symbol-reloading -- Show dynamic symbol table reloading - multiple times in one run +alias -- Define a new command that is an alias of an existing command +aliases -- Aliases of other commands +d -- Delete some breakpoints or auto-display expressions +del -- Delete some breakpoints or auto-display expressions +delete -- Delete some breakpoints or auto-display expressions @c @end group @end smallexample @@ -14721,33 +14722,6 @@ from the @code{ptype} command can be overwhelming and hard to use. The which match the regular-expression @var{regexp}. @end ignore -@cindex reloading symbols -Some systems allow individual object files that make up your program to -be replaced without stopping and restarting your program. For example, -in VxWorks you can simply recompile a defective object file and keep on -running. If you are running on one of these systems, you can allow -@value{GDBN} to reload the symbols for automatically relinked modules: - -@table @code -@kindex set symbol-reloading -@item set symbol-reloading on -Replace symbol definitions for the corresponding source file when an -object file with a particular name is seen again. - -@item set symbol-reloading off -Do not replace symbol definitions when encountering object files of the -same name more than once. This is the default state; if you are not -running on a system that permits automatic relinking of modules, you -should leave @code{symbol-reloading} off, since otherwise @value{GDBN} -may discard symbols when linking large programs, that may contain -several modules (from different directories or libraries) with the same -name. - -@kindex show symbol-reloading -@item show symbol-reloading -Show the current @code{on} or @code{off} setting. -@end table - @cindex opaque data types @kindex set opaque-type-resolution @item set opaque-type-resolution on diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 026dc59..fcc106c 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -4916,11 +4916,6 @@ number of that register. Use this function to convert stab register @var{stab_regnr} into @value{GDBN} regnum. If not defined, no conversion will be done. -@item SYMBOL_RELOADING_DEFAULT -@findex SYMBOL_RELOADING_DEFAULT -The default value of the ``symbol-reloading'' variable. (Never defined in -current sources.) - @item TARGET_CHAR_BIT @findex TARGET_CHAR_BIT Number of bits in a char; defaults to 8. diff --git a/gdb/doc/refcard.tex b/gdb/doc/refcard.tex index c6656e5..bee7c3d 100644 --- a/gdb/doc/refcard.tex +++ b/gdb/doc/refcard.tex @@ -68,7 +68,7 @@ % all variations of a command. % The GDB-under-Emacs section omits gdb-mode functions without default % keybindings. GDB startup options are not described. -% set print sevenbit-strings, set symbol-reloading omitted. +% set print sevenbit-strings omitted. % printsyms, printpsyms, omitted since they're for GDB maintenance primarily % share omitted due to obsolescence % set check range/type omitted at least til code is in GDB. diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c index b452f1e..ced2903 100644 --- a/gdb/i386-darwin-nat.c +++ b/gdb/i386-darwin-nat.c @@ -260,7 +260,7 @@ i386_darwin_store_inferior_registers (struct target_ops *ops, } } - +#ifdef HW_WATCHPOINT_NOT_YET_ENABLED /* Support for debug registers, boosted mostly from i386-linux-nat.c. */ static void @@ -410,6 +410,7 @@ i386_darwin_dr_get_control (void) { return i386_darwin_dr_get (DR_CONTROL); } +#endif void darwin_check_osabi (darwin_inferior *inf, thread_t thread) diff --git a/gdb/linespec.c b/gdb/linespec.c index c8fd5f1..533ff0e 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -199,8 +199,8 @@ enum ls_token_type /* A number */ LSTOKEN_NUMBER, - /* EOF */ - LSTOKEN_EOF, + /* EOI (end of input) */ + LSTOKEN_EOI, /* Consumed token */ LSTOKEN_CONSUMED @@ -451,7 +451,7 @@ skip_quote_char (const char *string, char quote_char) else if (*p == quote_char) { /* We found the quote_char, but keep going until - we see EOF or a terminal. */ + we see EOI or a terminal. */ found = p; } @@ -562,7 +562,7 @@ linespec_lexer_lex_string (linespec_parser *parser) PARSER_STREAM (parser) = p; } - /* If the next character is EOF or (single) ':', the + /* If the next character is EOI or (single) ':', the string is complete; return the token. */ if (*PARSER_STREAM (parser) == 0) { @@ -623,7 +623,7 @@ linespec_lexer_lex_one (linespec_parser *parser) switch (*PARSER_STREAM (parser)) { case 0: - parser->lexer.current.type = LSTOKEN_EOF; + parser->lexer.current.type = LSTOKEN_EOI; break; case '+': case '-': @@ -1216,7 +1216,7 @@ unexpected_linespec_error (linespec_parser *parser) { linespec_token token; static const char * token_type_strings[] - = {"keyword", "colon", "string", "number", "EOF"}; + = {"keyword", "colon", "string", "number", "end-of-input"}; /* Get the token that generated the error. */ token = linespec_lexer_lex_one (parser); @@ -1279,8 +1279,8 @@ linespec_parse_basic (linespec_parser *parser) /* Get the next token. */ token = linespec_lexer_lex_one (parser); - /* If it is EOF or KEYWORD, issue an error. */ - if (token.type == LSTOKEN_KEYWORD || token.type == LSTOKEN_EOF) + /* If it is EOI or KEYWORD, issue an error. */ + if (token.type == LSTOKEN_KEYWORD || token.type == LSTOKEN_EOI) unexpected_linespec_error (parser); /* If it is a LSTOKEN_NUMBER, we have an offset. */ else if (token.type == LSTOKEN_NUMBER) @@ -1302,13 +1302,13 @@ linespec_parse_basic (linespec_parser *parser) && *LS_TOKEN_STOKEN (token).ptr == ',') return; - /* If the next token is anything but EOF or KEYWORD, issue + /* If the next token is anything but EOI or KEYWORD, issue an error. */ - if (token.type != LSTOKEN_KEYWORD && token.type != LSTOKEN_EOF) + if (token.type != LSTOKEN_KEYWORD && token.type != LSTOKEN_EOI) unexpected_linespec_error (parser); } - if (token.type == LSTOKEN_KEYWORD || token.type == LSTOKEN_EOF) + if (token.type == LSTOKEN_KEYWORD || token.type == LSTOKEN_EOI) return; /* Next token must be LSTOKEN_STRING. */ @@ -1965,7 +1965,7 @@ parse_linespec (linespec_parser *parser, char **argptr) /* Get the last token and record how much of the input was parsed if necessary. */ token = linespec_lexer_lex_one (parser); - if (token.type != LSTOKEN_EOF && token.type != LSTOKEN_KEYWORD) + if (token.type != LSTOKEN_EOI && token.type != LSTOKEN_KEYWORD) PARSER_STREAM (parser) = LS_TOKEN_STOKEN (token).ptr; /* Convert the data in PARSER_RESULT to SALs. */ diff --git a/gdb/machoread.c b/gdb/machoread.c index 88ce612..8a6b500 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -1035,6 +1035,9 @@ static const struct sym_fns macho_sym_fns = { &psym_functions }; +/* -Wmissing-prototypes */ +extern initialize_file_ftype _initialize_machoread; + void _initialize_machoread () { diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index cb12549..daae480 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -40,6 +40,7 @@ interpreter. */ static void mi_execute_command_wrapper (char *cmd); +static void mi_execute_command_input_handler (char *cmd); static void mi_command_loop (int mi_version); /* These are hooks that we put in place while doing interpreter_exec @@ -151,7 +152,7 @@ mi_interpreter_resume (void *data) /* These overwrite some of the initialization done in _intialize_event_loop. */ call_readline = gdb_readline2; - input_handler = mi_execute_command_wrapper; + input_handler = mi_execute_command_input_handler; add_file_handler (input_fd, stdin_event_handler, 0); async_command_editing_p = 0; /* FIXME: This is a total hack for now. PB's use of the MI @@ -297,6 +298,17 @@ mi_execute_command_wrapper (char *cmd) mi_execute_command (cmd, stdin == instream); } +/* mi_execute_command_wrapper wrapper suitable for INPUT_HANDLER. */ + +static void +mi_execute_command_input_handler (char *cmd) +{ + mi_execute_command_wrapper (cmd); + + fputs_unfiltered ("(gdb) \n", raw_stdout); + gdb_flush (raw_stdout); +} + static void mi1_command_loop (void) { diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 787d247..9f14f01 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -2029,9 +2029,6 @@ mi_execute_command (char *cmd, int from_tty) mi_parse_free (command); } - - fputs_unfiltered ("(gdb) \n", raw_stdout); - gdb_flush (raw_stdout); } static void diff --git a/gdb/symfile.c b/gdb/symfile.c index ad46748..816b574 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -147,23 +147,6 @@ DEF_VEC_P (sym_fns_ptr); static VEC (sym_fns_ptr) *symtab_fns = NULL; -/* Flag for whether user will be reloading symbols multiple times. - Defaults to ON for VxWorks, otherwise OFF. */ - -#ifdef SYMBOL_RELOADING_DEFAULT -int symbol_reloading = SYMBOL_RELOADING_DEFAULT; -#else -int symbol_reloading = 0; -#endif -static void -show_symbol_reloading (struct ui_file *file, int from_tty, - struct cmd_list_element *c, const char *value) -{ - fprintf_filtered (file, _("Dynamic symbol table reloading " - "multiple times in one run is %s.\n"), - value); -} - /* If non-zero, shared library symbols will be added automatically when the inferior is created, new libraries are loaded, or when attaching to the inferior. This is almost always what users will @@ -3833,14 +3816,6 @@ for access from GDB.\n\ A load OFFSET may also be given."), &cmdlist); set_cmd_completer (c, filename_completer); - add_setshow_boolean_cmd ("symbol-reloading", class_support, - &symbol_reloading, _("\ -Set dynamic symbol table reloading multiple times in one run."), _("\ -Show dynamic symbol table reloading multiple times in one run."), NULL, - NULL, - show_symbol_reloading, - &setlist, &showlist); - add_prefix_cmd ("overlay", class_support, overlay_command, _("Commands for debugging overlays."), &overlaylist, "overlay ", 0, &cmdlist); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog hooks/post-receive -- Repository for Project Archer.