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

Side by Side Diff: gdb/glibc-tdep.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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/glibc-tdep.h ('k') | gdb/gnu-nat.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Target-dependent code for the GNU C Library (glibc). 1 /* Target-dependent code for the GNU C Library (glibc).
2 2
3 Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc. 3 Copyright (C) 2002-2013 Free Software Foundation, Inc.
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 the same objfile. If we are at the entry point of `fixup', then 46 the same objfile. If we are at the entry point of `fixup', then
47 we set a breakpoint at the return address (at the top of the 47 we set a breakpoint at the return address (at the top of the
48 stack), and continue. 48 stack), and continue.
49 49
50 It's kind of gross to do all these checks every time we're 50 It's kind of gross to do all these checks every time we're
51 called, since they don't change once the executable has gotten 51 called, since they don't change once the executable has gotten
52 started. But this is only a temporary hack --- upcoming versions 52 started. But this is only a temporary hack --- upcoming versions
53 of GNU/Linux will provide a portable, efficient interface for 53 of GNU/Linux will provide a portable, efficient interface for
54 debugging programs that use shared libraries. */ 54 debugging programs that use shared libraries. */
55 55
56 struct objfile *objfile; 56 struct bound_minimal_symbol resolver
57 struct minimal_symbol *resolver 57 = lookup_minimal_symbol_and_objfile ("_dl_runtime_resolve");
58 = lookup_minimal_symbol_and_objfile ("_dl_runtime_resolve", &objfile);
59 58
60 if (resolver) 59 if (resolver.minsym)
61 { 60 {
62 /* The dynamic linker began using this name in early 2005. */ 61 /* The dynamic linker began using this name in early 2005. */
63 struct minimal_symbol *fixup 62 struct minimal_symbol *fixup
64 » = lookup_minimal_symbol ("_dl_fixup", NULL, objfile); 63 » = lookup_minimal_symbol ("_dl_fixup", NULL, resolver.objfile);
65 64
66 /* This is the name used in older versions. */ 65 /* This is the name used in older versions. */
67 if (! fixup) 66 if (! fixup)
68 fixup = lookup_minimal_symbol ("fixup", NULL, objfile); 67 fixup = lookup_minimal_symbol ("fixup", NULL, resolver.objfile);
69 68
70 if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc) 69 if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
71 return frame_unwind_caller_pc (get_current_frame ()); 70 return frame_unwind_caller_pc (get_current_frame ());
72 } 71 }
73 72
74 return 0; 73 return 0;
75 } 74 }
OLDNEW
« no previous file with comments | « gdb/glibc-tdep.h ('k') | gdb/gnu-nat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698