Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: gdb/solib-svr4.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/solib-sunos.c ('k') | gdb/somread.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Handle SVR4 shared libraries for GDB, the GNU Debugger. 1 /* Handle SVR4 shared libraries for GDB, the GNU Debugger.
2 2
3 Copyright (C) 1990-1996, 1998-2001, 2003-2012 Free Software 3 Copyright (C) 1990-1996, 1998-2001, 2003-2012 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is part of GDB. 6 This file is part of GDB.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or 10 the Free Software Foundation; either version 3 of the License, or
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 svr4_current_sos (void) 1263 svr4_current_sos (void)
1264 { 1264 {
1265 CORE_ADDR lm; 1265 CORE_ADDR lm;
1266 struct so_list *head = NULL; 1266 struct so_list *head = NULL;
1267 struct so_list **link_ptr = &head; 1267 struct so_list **link_ptr = &head;
1268 struct svr4_info *info; 1268 struct svr4_info *info;
1269 struct cleanup *back_to; 1269 struct cleanup *back_to;
1270 int ignore_first; 1270 int ignore_first;
1271 struct svr4_library_list library_list; 1271 struct svr4_library_list library_list;
1272 1272
1273 /* Fall back to manual examination of the target if the packet is not
1274 supported or gdbserver failed to find DT_DEBUG. gdb.server/solib-list.exp
1275 tests a case where gdbserver cannot find the shared libraries list while
1276 GDB itself is able to find it via SYMFILE_OBJFILE.
1277
1278 Unfortunately statically linked inferiors will also fall back through this
1279 suboptimal code path. */
1280
1273 if (svr4_current_sos_via_xfer_libraries (&library_list)) 1281 if (svr4_current_sos_via_xfer_libraries (&library_list))
1274 { 1282 {
1275 if (library_list.main_lm) 1283 if (library_list.main_lm)
1276 { 1284 {
1277 info = get_svr4_info (); 1285 info = get_svr4_info ();
1278 info->main_lm_addr = library_list.main_lm; 1286 info->main_lm_addr = library_list.main_lm;
1279 } 1287 }
1280 1288
1281 return library_list.head ? library_list.head : svr4_default_sos (); 1289 return library_list.head ? library_list.head : svr4_default_sos ();
1282 } 1290 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 { 1710 {
1703 sym_addr = SYMBOL_VALUE_ADDRESS (msymbol); 1711 sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
1704 sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch, 1712 sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
1705 sym_addr, 1713 sym_addr,
1706 &current_target); 1714 &current_target);
1707 create_solib_event_breakpoint (target_gdbarch, sym_addr); 1715 create_solib_event_breakpoint (target_gdbarch, sym_addr);
1708 return 1; 1716 return 1;
1709 } 1717 }
1710 } 1718 }
1711 1719
1712 if (!current_inferior ()->attach_flag) 1720 if (interp_name != NULL && !current_inferior ()->attach_flag)
1713 { 1721 {
1714 for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++) 1722 for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
1715 { 1723 {
1716 msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile); 1724 msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile);
1717 if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0)) 1725 if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
1718 { 1726 {
1719 sym_addr = SYMBOL_VALUE_ADDRESS (msymbol); 1727 sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
1720 sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch, 1728 sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
1721 sym_addr, 1729 sym_addr,
1722 &current_target); 1730 &current_target);
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 Now run the target. It will eventually hit the breakpoint, at 2260 Now run the target. It will eventually hit the breakpoint, at
2253 which point all of the libraries will have been mapped in and we 2261 which point all of the libraries will have been mapped in and we
2254 can go groveling around in the dynamic linker structures to find 2262 can go groveling around in the dynamic linker structures to find
2255 out what we need to know about them. */ 2263 out what we need to know about them. */
2256 2264
2257 inf = current_inferior (); 2265 inf = current_inferior ();
2258 tp = inferior_thread (); 2266 tp = inferior_thread ();
2259 2267
2260 clear_proceed_status (); 2268 clear_proceed_status ();
2261 inf->control.stop_soon = STOP_QUIETLY; 2269 inf->control.stop_soon = STOP_QUIETLY;
2262 tp->suspend.stop_signal = TARGET_SIGNAL_0; 2270 tp->suspend.stop_signal = GDB_SIGNAL_0;
2263 do 2271 do
2264 { 2272 {
2265 target_resume (pid_to_ptid (-1), 0, tp->suspend.stop_signal); 2273 target_resume (pid_to_ptid (-1), 0, tp->suspend.stop_signal);
2266 wait_for_inferior (); 2274 wait_for_inferior ();
2267 } 2275 }
2268 while (tp->suspend.stop_signal != TARGET_SIGNAL_TRAP); 2276 while (tp->suspend.stop_signal != GDB_SIGNAL_TRAP);
2269 inf->control.stop_soon = NO_STOP_QUIETLY; 2277 inf->control.stop_soon = NO_STOP_QUIETLY;
2270 #endif /* defined(_SCO_DS) */ 2278 #endif /* defined(_SCO_DS) */
2271 } 2279 }
2272 2280
2273 static void 2281 static void
2274 svr4_clear_solib (void) 2282 svr4_clear_solib (void)
2275 { 2283 {
2276 struct svr4_info *info; 2284 struct svr4_info *info;
2277 2285
2278 info = get_svr4_info (); 2286 info = get_svr4_info ();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook; 2534 svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook;
2527 svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling; 2535 svr4_so_ops.special_symbol_handling = svr4_special_symbol_handling;
2528 svr4_so_ops.current_sos = svr4_current_sos; 2536 svr4_so_ops.current_sos = svr4_current_sos;
2529 svr4_so_ops.open_symbol_file_object = open_symbol_file_object; 2537 svr4_so_ops.open_symbol_file_object = open_symbol_file_object;
2530 svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code; 2538 svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
2531 svr4_so_ops.bfd_open = solib_bfd_open; 2539 svr4_so_ops.bfd_open = solib_bfd_open;
2532 svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol; 2540 svr4_so_ops.lookup_lib_global_symbol = elf_lookup_lib_symbol;
2533 svr4_so_ops.same = svr4_same; 2541 svr4_so_ops.same = svr4_same;
2534 svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core; 2542 svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core;
2535 } 2543 }
OLDNEW
« no previous file with comments | « gdb/solib-sunos.c ('k') | gdb/somread.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698