From 7df59f4d852078cf4abd10f8d275e2ec6564005bf4e384c10295154a132410e9 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 13 Jul 2007 16:03:25 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=20 --- async-command-editing.diff | 132 -------------------------------- gdb-6.6.50.20070621-cvs.tar.bz2 | 3 - gdb-6.6.50.20070713-cvs.tar.bz2 | 3 + gdb.changes | 5 ++ gdb.spec | 18 ++--- loader_break.diff | 86 --------------------- pie-relocate.diff | 119 ++++++++++++++-------------- 7 files changed, 76 insertions(+), 290 deletions(-) delete mode 100644 async-command-editing.diff delete mode 100644 gdb-6.6.50.20070621-cvs.tar.bz2 create mode 100644 gdb-6.6.50.20070713-cvs.tar.bz2 delete mode 100644 loader_break.diff diff --git a/async-command-editing.diff b/async-command-editing.diff deleted file mode 100644 index 05be6c5..0000000 --- a/async-command-editing.diff +++ /dev/null @@ -1,132 +0,0 @@ -From nobody Sun Jun 24 18:21:49 2007 -From: Daniel Jacobowitz -Subject: Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list -To: Nick Roberts , gdb-patches@sourceware.org -Date: Sun, 24 Jun 2007 11:47:00 -0400 -Mail-Followup-To: Nick Roberts , - gdb-patches@sourceware.org - -On Tue, Jun 05, 2007 at 09:27:00AM -0400, Daniel Jacobowitz wrote: -> On Wed, Jun 06, 2007 at 12:55:55AM +1200, Nick Roberts wrote: -> > > > This change breaks the behaviour of annotations with commands that span -> > > > multiple lines, like if, while, etc: -> > > -> > > Sorry, I didn't even know we had special annotations for this (and the -> > > testsuite must not cover it)... -> > -> > Here's a test for gdb.base/annota3.exp. I can do the same for -> > gdb.base/annota1.exp and gdb.cp/annota3.exp, if needed. -> -> Thanks. This is OK once we fix the problem. I haven't gotten back to -> you about that yet because I want to figure out what other issues were -> solved by the original patch - there were several. But I've been on -> vacation and I'm in a mad rush at home now, so it may be a bit longer. - -Nick, does this work for emacs? It fixes the testcase (which I -updated to fail and not time out for broken GDBs). - --- -Daniel Jacobowitz -CodeSourcery - -2007-06-24 Daniel Jacobowitz - - * top.c (gdb_readline_wrapper_line): Call rl_callback_handler_remove. - (struct gdb_readline_wrapper_cleanup): Remove prompt_orig. - (gdb_readline_wrapper_cleanup): Do not reset the prompt. - (gdb_readline_wrapper): Do not save the prompt. Pass our prompt - to display_gdb_prompt. - -2007-06-24 Nick Roberts - Daniel Jacobowitz - - * gdb.base/annota3.exp: Test for if construct. - -Index: top.c -=================================================================== -RCS file: /cvs/src/src/gdb/top.c,v -retrieving revision 1.120 -diff -u -p -r1.120 top.c ---- top.c 29 Mar 2007 18:55:01 -0000 1.120 -+++ top.c 24 Jun 2007 15:42:02 -0000 -@@ -751,12 +751,16 @@ gdb_readline_wrapper_line (char *line) - /* Prevent operate-and-get-next from acting too early. */ - saved_after_char_processing_hook = after_char_processing_hook; - after_char_processing_hook = NULL; -+ -+ /* Prevent parts of the prompt from being redisplayed if annotations -+ are enabled, and readline's state getting out of sync. */ -+ if (async_command_editing_p) -+ rl_callback_handler_remove (); - } - - struct gdb_readline_wrapper_cleanup - { - void (*handler_orig) (char *); -- char *prompt_orig; - int already_prompted_orig; - }; - -@@ -766,7 +770,6 @@ gdb_readline_wrapper_cleanup (void *arg) - struct gdb_readline_wrapper_cleanup *cleanup = arg; - - rl_already_prompted = cleanup->already_prompted_orig; -- PROMPT (0) = cleanup->prompt_orig; - - gdb_assert (input_handler == gdb_readline_wrapper_line); - input_handler = cleanup->handler_orig; -@@ -790,14 +793,12 @@ gdb_readline_wrapper (char *prompt) - cleanup->handler_orig = input_handler; - input_handler = gdb_readline_wrapper_line; - -- cleanup->prompt_orig = get_prompt (); -- PROMPT (0) = prompt; - cleanup->already_prompted_orig = rl_already_prompted; - - back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup); - - /* Display our prompt and prevent double prompt display. */ -- display_gdb_prompt (NULL); -+ display_gdb_prompt (prompt); - rl_already_prompted = 1; - - if (after_char_processing_hook) -Index: testsuite/gdb.base/annota3.exp -=================================================================== -RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota3.exp,v -retrieving revision 1.12 -diff -u -p -r1.12 annota3.exp ---- testsuite/gdb.base/annota3.exp 9 Jan 2007 17:59:09 -0000 1.12 -+++ testsuite/gdb.base/annota3.exp 24 Jun 2007 15:42:02 -0000 -@@ -99,7 +99,29 @@ gdb_expect_list "annotation set at level - "set annotate 3" - } - -- -+# -+# if construct: -+# -+send_gdb "if 1\n" -+gdb_expect { -+ -re "^if 1\r\n\r\n\032\032post-prompt\r\n\r\n\032\032pre-commands\r\n >\r\n\032\032commands\r\n$" { -+ pass "start if construct" -+ } -+ -re ".*\032\032commands\r\n" { -+ fail "start if construct" -+ } -+ timeout { fail "start if construct (timeout)" } -+} -+send_gdb "end\n" -+gdb_expect { -+ -re "^end\r\n\r\n\032\032post-commands\r\n$gdb_prompt$" { -+ pass "end if construct" -+ } -+ -re ".*$gdb_prompt$" { -+ fail "end if construct" -+ } -+ timeout { fail "end if construct (timeout)" } -+} - # - # info break: - # - diff --git a/gdb-6.6.50.20070621-cvs.tar.bz2 b/gdb-6.6.50.20070621-cvs.tar.bz2 deleted file mode 100644 index c32fa99..0000000 --- a/gdb-6.6.50.20070621-cvs.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cd4dd71f307d8a1d63bf58937a43b63c73793d25ba7cd035b4b7d55028e5bf2 -size 14517280 diff --git a/gdb-6.6.50.20070713-cvs.tar.bz2 b/gdb-6.6.50.20070713-cvs.tar.bz2 new file mode 100644 index 0000000..01705ab --- /dev/null +++ b/gdb-6.6.50.20070713-cvs.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cae27a0c770ac049366224820e584aea015961e421a2aa3c2175e5a021fc649f +size 14344912 diff --git a/gdb.changes b/gdb.changes index 029775c..4e276bc 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 13 11:46:27 CEST 2007 - schwab@suse.de + +- Update to head of trunk. + ------------------------------------------------------------------- Sun Jun 24 18:52:47 CEST 2007 - schwab@suse.de diff --git a/gdb.spec b/gdb.spec index 9c44f9f..6ef4df5 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,5 +1,5 @@ # -# spec file for package gdb (Version 6.6.50.20070621) +# spec file for package gdb (Version 6.6.50.20070713) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -19,12 +19,12 @@ BuildRequires: libunwind-devel BuildRequires: gcc-ada %endif URL: http://www.gnu.org/software/gdb/ -License: GNU General Public License (GPL) +License: GPL v2 or later Group: Development/Tools/Debuggers Autoreqprov: on PreReq: %{install_info_prereq} -Version: 6.6.50.20070621 -Release: 2 +Version: 6.6.50.20070713 +Release: 1 Summary: The GNU Debugger Source: gdb-%{version}-cvs.tar.bz2 Patch1: gdb-misc.patch @@ -35,11 +35,9 @@ Patch5: gstack.patch Patch6: sect-index-text.diff Patch7: pie-relocate.diff Patch8: mst-solib-trampoline.diff -Patch9: loader_break.diff Patch10: ppc-long-double.diff Patch11: elf-symtab-read.diff Patch12: find-pc-sect-line.diff -Patch13: async-command-editing.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -76,15 +74,9 @@ Authors: %patch6 %patch7 %patch8 -cd gdb -%patch9 -cd .. %patch10 %patch11 %patch12 -cd gdb -%patch13 -cd .. %build CFLAGS="$RPM_OPT_FLAGS" \ @@ -140,6 +132,8 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Jul 13 2007 - schwab@suse.de +- Update to head of trunk. * Sun Jun 24 2007 - schwab@suse.de - Fix annotations for commands prompt. * Thu Jun 21 2007 - schwab@suse.de diff --git a/loader_break.diff b/loader_break.diff deleted file mode 100644 index 6f8f244..0000000 --- a/loader_break.diff +++ /dev/null @@ -1,86 +0,0 @@ -2006-05-25 Paul Gilliam enable_state == bp_disabled || b->enable_state == bp_shlib_disabled || @@ -31,7 +31,7 @@ b->enable_state == bp_call_disabled) ? " (disabled)" : b->enable_state == bp_permanent -@@ -4586,6 +4587,60 @@ +@@ -4575,6 +4576,60 @@ re_enable_breakpoints_in_shlibs (void) } } @@ -92,7 +92,7 @@ static void solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname, char *cond_string, enum bptype bp_kind) -@@ -7023,6 +7078,7 @@ +@@ -7012,6 +7067,7 @@ delete_breakpoint (struct breakpoint *bp && !b->loc->duplicate && b->enable_state != bp_disabled && b->enable_state != bp_shlib_disabled @@ -100,7 +100,7 @@ && !b->pending && b->enable_state != bp_call_disabled) { -@@ -7241,7 +7297,8 @@ +@@ -7230,7 +7286,8 @@ breakpoint_re_set_one (void *bint) break; save_enable = b->enable_state; @@ -112,7 +112,7 @@ /* If resetting a shlib-disabled breakpoint, we don't want to --- gdb/breakpoint.h +++ gdb/breakpoint.h -@@ -155,6 +155,7 @@ +@@ -155,6 +155,7 @@ enum enable_state automatically enabled and reset when the call "lands" (either completes, or stops at another eventpoint). */ @@ -120,7 +120,7 @@ bp_permanent /* There is a breakpoint instruction hard-wired into the target's code. Don't try to write another breakpoint instruction on top of it, or restore -@@ -793,8 +794,12 @@ +@@ -793,8 +794,12 @@ extern void remove_thread_event_breakpoi extern void disable_breakpoints_in_shlibs (int silent); @@ -135,7 +135,7 @@ extern void create_solib_unload_event_breakpoint (char *, int, --- gdb/dwarf2read.c +++ gdb/dwarf2read.c -@@ -1237,7 +1237,7 @@ +@@ -1233,7 +1233,7 @@ dwarf2_build_psymtabs (struct objfile *o else dwarf2_per_objfile->loc_buffer = NULL; @@ -146,7 +146,7 @@ { --- gdb/elfread.c +++ gdb/elfread.c -@@ -541,7 +541,7 @@ +@@ -613,7 +613,7 @@ elf_symfile_read (struct objfile *objfil /* If we are reinitializing, or if we have never loaded syms yet, set table to empty. MAINLINE is cleared so that *_read_psymtab functions do not all also re-initialize the psymbol table. */ @@ -157,7 +157,7 @@ mainline = 0; --- gdb/infrun.c +++ gdb/infrun.c -@@ -2223,6 +2223,11 @@ +@@ -2252,6 +2252,11 @@ process_event_stop_test: code segments in shared libraries might be mapped in now. */ re_enable_breakpoints_in_shlibs (); @@ -180,7 +180,7 @@ /* Prototypes for local functions */ -@@ -261,7 +263,16 @@ +@@ -261,7 +263,16 @@ init_entry_point_info (struct objfile *o CORE_ADDR entry_point_address (void) { @@ -216,22 +216,28 @@ static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -261,8 +263,6 @@ +@@ -251,8 +253,6 @@ static char *debug_loader_name; /* Local function prototypes */ -static int match_main (char *); - - static CORE_ADDR bfd_lookup_symbol (bfd *, char *, flagword); + static CORE_ADDR bfd_lookup_symbol (bfd *, char *); /* -@@ -387,6 +387,16 @@ - gdb_byte *buf; - gdb_byte *bufend; - int arch_size; -+ CORE_ADDR relocated_dyninfo_addr, entry_addr; +@@ -358,6 +358,8 @@ scan_dyntag (int dyntag, bfd *abfd, CORE + Elf32_External_Dyn *x_dynp_32; + Elf64_External_Dyn *x_dynp_64; + struct bfd_section *sect; ++ CORE_ADDR relocated_dyn_addr, entry_addr; + int ret; -+ + + if (abfd == NULL) + return 0; +@@ -365,16 +367,26 @@ scan_dyntag (int dyntag, bfd *abfd, CORE + if (arch_size == -1) + return 0; + + /* Find the address of the entry point of the program from the + auxv vector. */ + ret = target_auxv_search (¤t_target, AT_ENTRY, &entry_addr); @@ -239,25 +245,24 @@ + if (ret <= 0) + /* No auxv info, maybe an older kernel. Fake our way through. */ + entry_addr = bfd_get_start_address (exec_bfd); - ++ /* Find the start address of the .dynamic section. */ - dyninfo_sect = bfd_get_section_by_name (exec_bfd, ".dynamic"); -@@ -404,11 +414,13 @@ - } - - dyninfo_addr = bfd_section_vma (exec_bfd, dyninfo_sect); -+ relocated_dyninfo_addr -+ = dyninfo_addr + entry_addr - bfd_get_start_address (exec_bfd); + sect = bfd_get_section_by_name (abfd, ".dynamic"); + if (sect == NULL) + return 0; + dyn_addr = bfd_section_vma (abfd, sect); ++ relocated_dyn_addr ++ = dyn_addr + entry_addr - bfd_get_start_address (exec_bfd); /* Read in .dynamic section, silently ignore errors. */ - dyninfo_sect_size = bfd_section_size (exec_bfd, dyninfo_sect); - buf = alloca (dyninfo_sect_size); -- if (target_read_memory (dyninfo_addr, buf, dyninfo_sect_size)) -+ if (target_read_memory (relocated_dyninfo_addr, buf, dyninfo_sect_size)) - return 0; - - /* Find the DT_DEBUG entry in the the .dynamic section. -@@ -757,9 +769,55 @@ + sect_size = bfd_section_size (abfd, sect); + buf = alloca (sect_size); +- if (target_read_memory (dyn_addr, buf, sect_size)) ++ if (target_read_memory (relocated_dyn_addr, buf, sect_size)) + { + /* If target_read_memory fails, try reading the BFD file. */ + if (!bfd_get_section_contents (abfd, sect, +@@ -735,9 +747,55 @@ svr4_current_sos (void) does have a name, so we can no longer use a missing name to decide when to ignore it. */ if (IGNORE_FIRST_LINK_MAP_ENTRY (new) && ldsomap == 0) @@ -314,7 +319,7 @@ int errcode; char *buffer; -@@ -777,10 +835,8 @@ +@@ -755,10 +813,8 @@ svr4_current_sos (void) strcpy (new->so_original_name, new->so_name); } @@ -327,7 +332,7 @@ free_so (new); else { -@@ -876,24 +932,6 @@ +@@ -854,24 +910,6 @@ svr4_fetch_objfile_link_map (struct objf return 0; } @@ -352,7 +357,7 @@ /* Return 1 if PC lies in the dynamic symbol resolution code of the SVR4 run time loader. */ static CORE_ADDR interp_text_sect_low; -@@ -1374,6 +1412,8 @@ +@@ -1351,6 +1389,8 @@ svr4_solib_create_inferior_hook (void) while (stop_signal != TARGET_SIGNAL_TRAP); stop_soon = NO_STOP_QUIETLY; #endif /* defined(_SCO_DS) */ @@ -363,7 +368,7 @@ static void --- gdb/solib.c +++ gdb/solib.c -@@ -394,15 +394,37 @@ +@@ -400,15 +400,37 @@ symbol_add_stub (void *arg) /* Have we already loaded this shared object? */ ALL_OBJFILES (so->objfile) { @@ -404,7 +409,7 @@ free_section_addr_info (sap); return (1); -@@ -583,28 +605,7 @@ +@@ -589,28 +611,7 @@ update_solib_list (int from_tty, struct /* Fill in the rest of each of the `struct so_list' nodes. */ for (i = inferior; i; i = i->next) { @@ -434,7 +439,7 @@ /* Notify any observer that the shared object has been loaded now that we've added it to GDB's tables. */ -@@ -700,6 +701,39 @@ +@@ -706,6 +707,39 @@ solib_add (char *pattern, int from_tty, } } @@ -476,7 +481,7 @@ --- gdb/solist.h +++ gdb/solist.h -@@ -61,6 +61,8 @@ +@@ -63,6 +63,8 @@ struct so_list bfd *abfd; char symbols_loaded; /* flag: symbols read in yet? */ char from_tty; /* flag: print msgs? */ @@ -485,7 +490,7 @@ struct objfile *objfile; /* objfile for loaded lib */ struct section_table *sections; struct section_table *sections_end; -@@ -115,6 +117,10 @@ +@@ -128,6 +130,10 @@ struct so_list *master_so_list (void); /* Find solib binary file and open it. */ extern int solib_open (char *in_pathname, char **found_pathname); @@ -498,7 +503,7 @@ --- gdb/symfile-mem.c +++ gdb/symfile-mem.c -@@ -110,7 +110,7 @@ +@@ -110,7 +110,7 @@ symbol_file_add_from_memory (struct bfd } objf = symbol_file_add_from_bfd (nbfd, from_tty, @@ -509,7 +514,7 @@ reinit_frame_cache (); --- gdb/symfile.c +++ gdb/symfile.c -@@ -708,7 +708,7 @@ +@@ -781,7 +781,7 @@ syms_from_objfile (struct objfile *objfi /* Now either addrs or offsets is non-zero. */ @@ -518,7 +523,7 @@ { /* We will modify the main symbol table, make sure that all its users will be cleaned up if an error occurs during symbol reading. */ -@@ -736,7 +736,7 @@ +@@ -809,7 +809,7 @@ syms_from_objfile (struct objfile *objfi We no longer warn if the lowest section is not a text segment (as happens for the PA64 port. */ @@ -527,7 +532,7 @@ { asection *lower_sect; asection *sect; -@@ -905,14 +905,14 @@ +@@ -978,14 +978,14 @@ new_symfile_objfile (struct objfile *obj /* If this is the main symbol file we have to clean up all users of the old main symbol file. Otherwise it is sufficient to fixup all the breakpoints that may have been redefined by this symbol file. */ @@ -544,7 +549,7 @@ { breakpoint_re_set (); } -@@ -958,7 +958,7 @@ +@@ -1031,7 +1031,7 @@ symbol_file_add_with_addrs_or_offsets (b interactively wiping out any existing symbols. */ if ((have_full_symbols () || have_partial_symbols ()) @@ -553,7 +558,7 @@ && from_tty && !query ("Load new symbol table from \"%s\"? ", name)) error (_("Not confirmed.")); -@@ -1138,6 +1138,11 @@ +@@ -1211,6 +1211,11 @@ symbol_file_clear (int from_tty) symfile_objfile->name) : !query (_("Discard symbol table? ")))) error (_("Not confirmed.")); @@ -565,7 +570,7 @@ free_all_objfiles (); /* solib descriptors may have handles to objfiles. Since their -@@ -2277,6 +2282,8 @@ +@@ -2358,6 +2363,8 @@ reread_symbols (void) /* Discard cleanups as symbol reading was successful. */ discard_cleanups (old_cleanups); @@ -574,7 +579,7 @@ /* If the mtime has changed between the time we set new_modtime and now, we *want* this to be out of date, so don't call stat again now. */ -@@ -2643,6 +2650,7 @@ +@@ -2724,6 +2731,7 @@ clear_symtab_users (void) set_default_breakpoint (0, 0, 0, 0); clear_pc_function_cache (); observer_notify_new_objfile (NULL); @@ -584,7 +589,7 @@ FIXME: It's not clear which of these are supposed to persist --- gdb/varobj.c +++ gdb/varobj.c -@@ -1077,6 +1077,58 @@ +@@ -1077,6 +1077,58 @@ install_new_value (struct varobj *var, s return changed; } @@ -645,7 +650,7 @@ expression to see if it's changed. Then go all the way --- gdb/varobj.h +++ gdb/varobj.h -@@ -114,4 +114,6 @@ +@@ -114,4 +114,6 @@ extern int varobj_update (struct varobj extern void varobj_invalidate (void);