/* Objective-C language support routines for GDB, the GNU debugger.
- Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Contributed by Apple Computer, Inc.
Written by Michael Snyder.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "symtab.h"
if (noerr)
return 0;
else
- error ("No struct type named %s.", name);
+ error (_("No struct type named %s."), name);
}
if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_STRUCT)
{
if (noerr)
return 0;
else
- error ("This context has class, union or enum %s, not a struct.",
+ error (_("This context has class, union or enum %s, not a struct."),
name);
}
return sym;
function = find_function_in_inferior("objc_lookup_class");
else
{
- complaint (&symfile_complaints, "no way to lookup Objective-C classes");
+ complaint (&symfile_complaints, _("no way to lookup Objective-C classes"));
return 0;
}
function = find_function_in_inferior("sel_get_any_uid");
else
{
- complaint (&symfile_complaints, "no way to lookup Objective-C selectors");
+ complaint (&symfile_complaints, _("no way to lookup Objective-C selectors"));
return 0;
}
nsstringValue = call_function_by_hand(function, 3, &stringValue[0]);
}
else
- error ("NSString: internal error -- no way to create new NSString");
+ error (_("NSString: internal error -- no way to create new NSString"));
deprecated_set_value_type (nsstringValue, type);
return nsstringValue;
FORCE_ELLIPSES. */
static void
-objc_printstr (struct ui_file *stream, const bfd_byte *string,
+objc_printstr (struct ui_file *stream, const gdb_byte *string,
unsigned int length, int width, int force_ellipses)
{
unsigned int i;
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "<?type?>", objfile);
- warning ("internal error: no C/C++ fundamental type %d", typeid);
+ warning (_("internal error: no C/C++ fundamental type %d"), typeid);
break;
case FT_VOID:
type = init_type (TYPE_CODE_VOID,
&builtin_type_char, /* Type of string elements */
default_word_break_characters,
NULL, /* FIXME: la_language_arch_info. */
+ default_print_array_index,
LANG_MAGIC
};
msglist_sel = sel->msglist_sel;
selid = lookup_child_selector(p);
if (!selid)
- error("Can't find selector \"%s\"", p);
+ error (_("Can't find selector \"%s\""), p);
write_exp_elt_longcst (selid);
xfree(p);
write_exp_elt_longcst (val); /* Number of args */
aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
if (aname == NULL || bname == NULL)
- error ("internal: compare_selectors(1)");
+ error (_("internal: compare_selectors(1)"));
aname = strchr(aname, ' ');
bname = strchr(bname, ' ');
if (aname == NULL || bname == NULL)
- error ("internal: compare_selectors(2)");
+ error (_("internal: compare_selectors(2)"));
return specialcmp (aname+1, bname+1);
}
{
val = re_comp (myregexp);
if (val != 0)
- error ("Invalid regexp (%s): %s", val, regexp);
+ error (_("Invalid regexp (%s): %s"), val, regexp);
}
/* First time thru is JUST to get max length and count. */
}
if (matches)
{
- printf_filtered ("Selectors matching \"%s\":\n\n",
+ printf_filtered (_("Selectors matching \"%s\":\n\n"),
regexp ? regexp : "*");
sym_arr = alloca (matches * sizeof (struct symbol *));
begin_line();
}
else
- printf_filtered ("No selectors matching \"%s\"\n", regexp ? regexp : "*");
+ printf_filtered (_("No selectors matching \"%s\"\n"), regexp ? regexp : "*");
}
/*
aname = SYMBOL_PRINT_NAME (*(struct symbol **) a);
bname = SYMBOL_PRINT_NAME (*(struct symbol **) b);
if (aname == NULL || bname == NULL)
- error ("internal: compare_classes(1)");
+ error (_("internal: compare_classes(1)"));
return specialcmp (aname+1, bname+1);
}
{
val = re_comp (myregexp);
if (val != 0)
- error ("Invalid regexp (%s): %s", val, regexp);
+ error (_("Invalid regexp (%s): %s"), val, regexp);
}
/* First time thru is JUST to get max length and count. */
}
if (matches)
{
- printf_filtered ("Classes matching \"%s\":\n\n",
+ printf_filtered (_("Classes matching \"%s\":\n\n"),
regexp ? regexp : "*");
sym_arr = alloca (matches * sizeof (struct symbol *));
matches = 0;
begin_line();
}
else
- printf_filtered ("No classes matching \"%s\"\n", regexp ? regexp : "*");
+ printf_filtered (_("No classes matching \"%s\"\n"), regexp ? regexp : "*");
}
/*
struct value *object, *function, *description;
CORE_ADDR string_addr, object_addr;
int i = 0;
- char c = -1;
+ gdb_byte c = 0;
if (!args || !*args)
error (
function = find_function_in_inferior ("_NSPrintForDebugger");
if (function == NULL)
- error ("Unable to locate _NSPrintForDebugger in child process");
+ error (_("Unable to locate _NSPrintForDebugger in child process"));
description = call_function_by_hand (function, 1, &object);
string_addr = value_as_long (description);
if (string_addr == 0)
- error ("object returns null description");
+ error (_("object returns null description"));
read_memory (string_addr + i++, &c, 1);
- if (c != '\0')
+ if (c != 0)
do
{ /* Read and print characters up to EOS. */
QUIT;
read_memory (string_addr + i++, &c, 1);
} while (c != 0);
else
- printf_filtered("<object returns empty description>");
+ printf_filtered(_("<object returns empty description>"));
printf_filtered ("\n");
}
{
add_language (&objc_language_defn);
add_info ("selectors", selectors_info, /* INFO SELECTORS command. */
- "All Objective-C selectors, or those matching REGEXP.");
+ _("All Objective-C selectors, or those matching REGEXP."));
add_info ("classes", classes_info, /* INFO CLASSES command. */
- "All Objective-C classes, or those matching REGEXP.");
+ _("All Objective-C classes, or those matching REGEXP."));
add_com ("print-object", class_vars, print_object_command,
- "Ask an Objective-C object to print itself.");
+ _("Ask an Objective-C object to print itself."));
add_com_alias ("po", "print-object", class_vars, 1);
}