projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent problems with section alignment by not shrinking the .rsrc section.
[deliverable/binutils-gdb.git]
/
gdb
/
objc-lang.c
diff --git
a/gdb/objc-lang.c
b/gdb/objc-lang.c
index 227ecc0e2c8e09525abdca75551cef004a02e69a..43d83da0ba772e806f3cb3d04c5aa1160bb7a197 100644
(file)
--- a/
gdb/objc-lang.c
+++ b/
gdb/objc-lang.c
@@
-1,6
+1,6
@@
/* Objective-C language support routines for GDB, the GNU debugger.
/* Objective-C language support routines for GDB, the GNU debugger.
- Copyright (C) 2002-201
5
Free Software Foundation, Inc.
+ Copyright (C) 2002-201
6
Free Software Foundation, Inc.
Contributed by Apple Computer, Inc.
Written by Michael Snyder.
Contributed by Apple Computer, Inc.
Written by Michael Snyder.
@@
-281,6
+281,15
@@
objc_demangle (const char *mangled, int options)
return NULL; /* Not an objc mangled name. */
}
return NULL; /* Not an objc mangled name. */
}
+/* la_sniff_from_mangled_name for ObjC. */
+
+static int
+objc_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+ *demangled = objc_demangle (mangled, 0);
+ return *demangled != NULL;
+}
+
/* Determine if we are currently in the Objective-C dispatch function.
If so, get the address of the method function that the dispatcher
would call and use that as the function to step into instead. Also
/* Determine if we are currently in the Objective-C dispatch function.
If so, get the address of the method function that the dispatcher
would call and use that as the function to step into instead. Also
@@
-350,6
+359,11
@@
static const struct op_print objc_op_print_tab[] =
{NULL, OP_NULL, PREC_NULL, 0}
};
{NULL, OP_NULL, PREC_NULL, 0}
};
+static const char *objc_extensions[] =
+{
+ ".m", NULL
+};
+
const struct language_defn objc_language_defn = {
"objective-c", /* Language name */
"Objective-C",
const struct language_defn objc_language_defn = {
"objective-c", /* Language name */
"Objective-C",
@@
-358,9
+372,10
@@
const struct language_defn objc_language_defn = {
case_sensitive_on,
array_row_major,
macro_expansion_c,
case_sensitive_on,
array_row_major,
macro_expansion_c,
+ objc_extensions,
&exp_descriptor_standard,
c_parse,
&exp_descriptor_standard,
c_parse,
- c_error,
+ c_
yy
error,
null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
null_post_parser,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
@@
-375,6
+390,7
@@
const struct language_defn objc_language_defn = {
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
objc_demangle, /* Language specific symbol demangler */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
basic_lookup_transparent_type,/* lookup_transparent_type */
objc_demangle, /* Language specific symbol demangler */
+ objc_sniff_from_mangled_name,
NULL, /* Language specific
class_name_from_physname */
objc_op_print_tab, /* Expression operators for printing */
NULL, /* Language specific
class_name_from_physname */
objc_op_print_tab, /* Expression operators for printing */
@@
-981,7
+997,7
@@
find_methods (char type, const char *theclass, const char *category,
unsigned int objfile_csym = 0;
unsigned int objfile_csym = 0;
- objc_csym = objfile_data (objfile, objc_objfile_data);
+ objc_csym =
(unsigned int *)
objfile_data (objfile, objc_objfile_data);
if (objc_csym != NULL && *objc_csym == 0)
/* There are no ObjC symbols in this objfile. Skip it entirely. */
continue;
if (objc_csym != NULL && *objc_csym == 0)
/* There are no ObjC symbols in this objfile. Skip it entirely. */
continue;
@@
-1177,14
+1193,11
@@
print_object_command (char *args, int from_tty)
"The 'print-object' command requires an argument (an Objective-C object)");
{
"The 'print-object' command requires an argument (an Objective-C object)");
{
- struct expression *expr = parse_expression (args);
- struct cleanup *old_chain =
- make_cleanup (free_current_contents, &expr);
+ expression_up expr = parse_expression (args);
int pc = 0;
object = evaluate_subexp (builtin_type (expr->gdbarch)->builtin_data_ptr,
int pc = 0;
object = evaluate_subexp (builtin_type (expr->gdbarch)->builtin_data_ptr,
- expr, &pc, EVAL_NORMAL);
- do_cleanups (old_chain);
+ expr.get (), &pc, EVAL_NORMAL);
}
/* Validate the address for sanity. */
}
/* Validate the address for sanity. */
This page took
0.024524 seconds
and
4
git commands to generate.