* jv-lang.c: White space.
* jv-typeprint.c: White space.
* jv-valprint.c: White space.
* language.c: White space.
* libunwind-frame.c: White space.
* linespec.c: White space.
* linux-nat.c: White space.
* linux-record.c: White space.
* linux-thread-db.c: White space.
2010-05-14 Michael Snyder <msnyder@vmware.com>
+ * jv-lang.c: White space.
+ * jv-typeprint.c: White space.
+ * jv-valprint.c: White space.
+ * language.c: White space.
+ * libunwind-frame.c: White space.
+ * linespec.c: White space.
+ * linux-nat.c: White space.
+ * linux-record.c: White space.
+ * linux-thread-db.c: White space.
+
* infcall.c: White space.
* inf-child.c: White space.
* infcmd.c: White space.
struct objfile *objfile = get_dynamics_objfile (gdbarch);
struct blockvector *bv;
struct block *bl;
+
class_symtab = allocate_symtab ("<java-classes>", objfile);
class_symtab->language = language_java;
bv = (struct blockvector *)
struct symtab *symtab
= get_java_class_symtab (get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile));
struct blockvector *bv = BLOCKVECTOR (symtab);
+
dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym);
}
add_class_symbol (struct type *type, CORE_ADDR addr)
{
struct symbol *sym;
+
sym = (struct symbol *)
obstack_alloc (&dynamics_objfile->objfile_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
java_lookup_class (char *name)
{
struct symbol *sym;
+
sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, NULL);
if (sym != NULL)
return SYMBOL_TYPE (sym);
#if 0
CORE_ADDR addr;
+
if (called from parser)
{
call lookup_class (or similar) in inferior;
else
addr = 0;
struct type *type;
+
type = alloc_type (objfile);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
INIT_CPLUS_SPECIFIC (type);
struct value *temp = name;
int name_length;
CORE_ADDR data_addr;
+
temp = value_struct_elt (&temp, NULL, "length", NULL, "structure");
name_length = (int) value_as_long (temp);
data_addr = value_address (temp) + TYPE_LENGTH (value_type (temp));
{
struct value *vtable = value_struct_elt (&clas, NULL, "vtable", NULL, "struct");
CORE_ADDR i = value_as_address (vtable);
+
return (int) (i & 0x7fffffff) == (int) 0x7fffffff;
}
if (java_class_is_primitive (clas))
{
struct value *sig;
+
temp = clas;
sig = value_struct_elt (&temp, NULL, "method_count", NULL, "structure");
return java_primitive_type (gdbarch, value_as_long (sig));
{
char *signature = name;
int namelen = java_demangled_signature_length (signature);
+
if (namelen > strlen (name))
name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
java_demangled_signature_copy (name, signature);
{
int accflags;
int boffset;
+
if (fields == NULL)
{
temp = clas;
{ /* Re-use field value for next field. */
CORE_ADDR addr
= value_address (field) + TYPE_LENGTH (value_type (field));
+
set_value_address (field, addr);
set_value_lazy (field, 1);
}
else
{
struct type *ftype;
+
temp = field;
temp = value_struct_elt (&temp, NULL, "type", NULL, "structure");
ftype = type_from_class (gdbarch, temp);
{
char *mname;
int k;
+
if (methods == NULL)
{
temp = clas;
{ /* Re-use method value for next method. */
CORE_ADDR addr
= value_address (method) + TYPE_LENGTH (value_type (method));
+
set_value_address (method, addr);
set_value_lazy (method, 1);
}
if (strcmp (mname, fn_fieldlists[j].name) == 0)
{ /* Found an existing method with the same name. */
int l;
+
if (mname != unqualified_name)
obstack_free (&objfile->objfile_obstack, mname);
mname = fn_fieldlists[j].name;
if (java_object_type == NULL)
{
struct symbol *sym;
+
sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, NULL);
if (sym == NULL)
error (_("cannot find java.lang.Object"));
get_java_object_header_size (struct gdbarch *gdbarch)
{
struct type *objtype = get_java_object_type ();
+
if (objtype == NULL)
return (2 * gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
else
java_demangled_signature_length (char *signature)
{
int array = 0;
+
for (; *signature == '['; signature++)
array += 2; /* Two chars for "[]". */
switch (signature[0])
int array = 0;
char *ptr;
int i;
+
while (*signature == '[')
{
array++;
{
int length = java_demangled_signature_length (signature);
char *result = xmalloc (length + 1);
+
java_demangled_signature_copy (result, signature);
result[length] = '\0';
return result;
struct value *arg1;
struct value *arg2;
struct type *type;
+
switch (op)
{
case UNOP_IND:
int len;
char *mangled_name;
char *demangled_name;
- QUIT;
+ QUIT;
wrap_here (" ");
if (type == NULL)
if (TYPE_TAG_NAME (type) != NULL && TYPE_TAG_NAME (type)[0] == '[')
{ /* array type */
char *name = java_demangle_type_signature (TYPE_TAG_NAME (type));
+
fputs_filtered (name, stream);
xfree (name);
break;
int reps;
struct type *el_type
= java_primitive_type_from_name (gdbarch, name, i - 2);
+
i = 0;
read_memory (address + get_java_object_header_size (gdbarch), buf4, 4);
if (field_is_static (&TYPE_FIELD (type, i)))
{
char *name = TYPE_FIELD_NAME (type, i);
+
if (!options->static_field_print)
continue;
if (name != NULL && strcmp (name, "class") == 0)
else if (field_is_static (&TYPE_FIELD (type, i)))
{
struct value *v = value_static_field (type, i);
+
if (v == NULL)
fputs_filtered ("<optimized out>", stream);
else
{
struct value_print_options opts;
struct type *t = check_typedef (value_type (v));
+
if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
v = value_addr (v);
opts = *options;
else
{
struct value_print_options opts = *options;
+
opts.deref_ref = 0;
val_print (TYPE_FIELD_TYPE (type, i),
valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
if (options->format || options->output_format)
{
struct value_print_options opts = *options;
+
opts.format = (options->format ? options->format
: options->output_format);
print_scalar_formatted (valaddr, type, &opts, 0, stream);
type_error (const char *string,...)
{
va_list args;
- va_start (args, string);
+ va_start (args, string);
switch (type_check)
{
case type_check_warn:
range_error (const char *string,...)
{
va_list args;
- va_start (args, string);
+ va_start (args, string);
switch (range_check)
{
case range_check_warn:
if (languages[i]->skip_trampoline)
{
CORE_ADDR real_pc = (languages[i]->skip_trampoline) (frame, pc);
+
if (real_pc)
return real_pc;
}
{
struct language_gdbarch *ld = gdbarch_data (gdbarch,
language_gdbarch_data);
+
return ld->arch_info[la->la_language].string_char_type;
}
if (ld->arch_info[la->la_language].bool_type_symbol)
{
struct symbol *sym;
+
sym = lookup_symbol (ld->arch_info[la->la_language].bool_type_symbol,
NULL, VAR_DOMAIN, NULL);
if (sym)
{
struct type *type = SYMBOL_TYPE (sym);
+
if (type && TYPE_CODE (type) == TYPE_CODE_BOOL)
return type;
}
struct language_gdbarch *ld = gdbarch_data (gdbarch,
language_gdbarch_data);
struct type *const *p;
+
for (p = ld->arch_info[la->la_language].primitive_type_vector;
(*p) != NULL;
p++)
{
struct libunwind_descr *descr = GDBARCH_OBSTACK_ZALLOC (gdbarch,
struct libunwind_descr);
+
return descr;
}
libunwind_frame_dealloc_cache (struct frame_info *self, void *this_cache)
{
struct libunwind_frame_cache *cache = this_cache;
+
if (cache->as)
unw_destroy_addr_space_p (cache->as);
}
{
struct ui_file *tmp_stream;
char *message;
+
tmp_stream = mem_fileopen ();
make_cleanup_ui_file_delete (tmp_stream);
{
va_list args;
+
va_start (args, fmt);
vfprintf_unfiltered (tmp_stream, fmt, args);
va_end (args);
{
struct symtabs_and_lines values;
+
values = decode_objc (argptr, funfirstline, NULL,
canonical, saved_arg);
if (values.sals != NULL)
if (p[0] == '<')
{
char *temp_end = find_template_name_end (p);
+
if (!temp_end)
error (_("malformed template specification in command"));
p = temp_end;
if (*is_quote_enclosed)
{
char *closing_quote = strchr (p - 1, '"');
+
if (closing_quote && closing_quote[1] == '\0')
*closing_quote = '\0';
}
{
/* At this point argptr->"fun". */
char *a;
+
p = *argptr;
while (*p && *p != ' ' && *p != '\t' && *p != ',' && *p != ':'
&& *p != '(')
if (*p && current_language->la_language == language_java)
{
struct type *type;
+
p2 = p;
while (*p2)
++p2;
using VAR_DOMAIN (where typedefs live) and double-check that we
found a struct/class type. */
struct symbol *s = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
+
if (s != NULL)
{
struct type *t = SYMBOL_TYPE (s);
+
CHECK_TYPEDEF (t);
if (TYPE_CODE (t) == TYPE_CODE_STRUCT)
return s;
if (strchr (saved_arg, '(') != NULL)
{
int i;
+
for (i = 0; i < i1; ++i)
{
char *name = saved_arg;
char *canon = cp_canonicalize_string (name);
+
if (canon != NULL)
name = canon;
{
/* We have a value history reference. */
struct value *val_history;
+
sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
val_history = access_value_history ((copy[1] == '$') ? -index : index);
if (TYPE_CODE (value_type (val_history)) != TYPE_CODE_INT)
struct symtab *file_symtab, int *not_found_ptr)
{
struct symbol *sym;
-
struct minimal_symbol *msymbol;
sym = lookup_symbol (copy,
{
struct blockvector *bv = BLOCKVECTOR (SYMBOL_SYMTAB (sym));
struct block *b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+
if (lookup_block_symbol (b, copy, VAR_DOMAIN) != NULL)
build_canonical_line_spec (values.sals, copy, canonical);
}
add_to_pid_list (struct simple_pid_list **listp, int pid, int status)
{
struct simple_pid_list *new_pid = xmalloc (sizeof (struct simple_pid_list));
+
new_pid->pid = pid;
new_pid->status = status;
new_pid->next = *listp;
if ((*p)->pid == pid)
{
struct simple_pid_list *next = (*p)->next;
+
*status = (*p)->status;
xfree (*p);
*p = next;
else if (non_stop && !is_executing (lp->ptid))
{
struct thread_info *tp = find_thread_ptid (lp->ptid);
+
signo = tp->stop_signal;
}
else if (!non_stop)
if (GET_LWP (lp->ptid) == GET_LWP (last_ptid))
{
struct thread_info *tp = find_thread_ptid (lp->ptid);
+
signo = tp->stop_signal;
}
}
else
{
ptid_t ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
+
/* Stop all threads before killing them, since ptrace requires
that the thread is stopped to sucessfully PTRACE_KILL. */
iterate_over_lwps (ptid, stop_callback, NULL);
linux_spu_make_corefile_notes (bfd *obfd, char *note_data, int *note_size)
{
struct linux_spu_corefile_data args;
+
args.obfd = obfd;
args.note_data = note_data;
args.note_size = note_size;
if ((procfile = fopen (fname1, "r")) != NULL)
{
struct cleanup *cleanup = make_cleanup_fclose (procfile);
+
if (fgets (buffer, sizeof (buffer), procfile))
printf_filtered ("cmdline = '%s'\n", buffer);
else
if ((procfile = fopen (fname1, "r")) != NULL)
{
struct cleanup *cleanup = make_cleanup_fclose (procfile);
+
while (fgets (buffer, sizeof (buffer), procfile) != NULL)
puts_filtered (buffer);
do_cleanups (cleanup);
static LONGEST
linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object,
- const char *annex, gdb_byte *readbuf,
- const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+ const char *annex, gdb_byte *readbuf,
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
/* We make the process list snapshot when the object starts to be
read. */
if (offset == 0)
{
if (len_avail != -1 && len_avail != 0)
- obstack_free (&obstack, NULL);
+ obstack_free (&obstack, NULL);
len_avail = 0;
buf = NULL;
obstack_init (&obstack);
dirp = opendir ("/proc");
if (dirp)
- {
- struct dirent *dp;
- while ((dp = readdir (dirp)) != NULL)
- {
- struct stat statbuf;
- char procentry[sizeof ("/proc/4294967295")];
-
- if (!isdigit (dp->d_name[0])
- || NAMELEN (dp) > sizeof ("4294967295") - 1)
- continue;
-
- sprintf (procentry, "/proc/%s", dp->d_name);
- if (stat (procentry, &statbuf) == 0
- && S_ISDIR (statbuf.st_mode))
- {
- char *pathname;
- FILE *f;
- char cmd[MAXPATHLEN + 1];
- struct passwd *entry;
-
- pathname = xstrprintf ("/proc/%s/cmdline", dp->d_name);
- entry = getpwuid (statbuf.st_uid);
-
- if ((f = fopen (pathname, "r")) != NULL)
- {
- size_t len = fread (cmd, 1, sizeof (cmd) - 1, f);
- if (len > 0)
- {
- int i;
- for (i = 0; i < len; i++)
- if (cmd[i] == '\0')
- cmd[i] = ' ';
- cmd[len] = '\0';
-
- obstack_xml_printf (
- &obstack,
- "<item>"
- "<column name=\"pid\">%s</column>"
- "<column name=\"user\">%s</column>"
- "<column name=\"command\">%s</column>"
- "</item>",
- dp->d_name,
- entry ? entry->pw_name : "?",
- cmd);
- }
- fclose (f);
- }
-
- xfree (pathname);
- }
- }
-
- closedir (dirp);
- }
+ {
+ struct dirent *dp;
+
+ while ((dp = readdir (dirp)) != NULL)
+ {
+ struct stat statbuf;
+ char procentry[sizeof ("/proc/4294967295")];
+
+ if (!isdigit (dp->d_name[0])
+ || NAMELEN (dp) > sizeof ("4294967295") - 1)
+ continue;
+
+ sprintf (procentry, "/proc/%s", dp->d_name);
+ if (stat (procentry, &statbuf) == 0
+ && S_ISDIR (statbuf.st_mode))
+ {
+ char *pathname;
+ FILE *f;
+ char cmd[MAXPATHLEN + 1];
+ struct passwd *entry;
+
+ pathname = xstrprintf ("/proc/%s/cmdline", dp->d_name);
+ entry = getpwuid (statbuf.st_uid);
+
+ if ((f = fopen (pathname, "r")) != NULL)
+ {
+ size_t len = fread (cmd, 1, sizeof (cmd) - 1, f);
+
+ if (len > 0)
+ {
+ int i;
+
+ for (i = 0; i < len; i++)
+ if (cmd[i] == '\0')
+ cmd[i] = ' ';
+ cmd[len] = '\0';
+
+ obstack_xml_printf (
+ &obstack,
+ "<item>"
+ "<column name=\"pid\">%s</column>"
+ "<column name=\"user\">%s</column>"
+ "<column name=\"command\">%s</column>"
+ "</item>",
+ dp->d_name,
+ entry ? entry->pw_name : "?",
+ cmd);
+ }
+ fclose (f);
+ }
+
+ xfree (pathname);
+ }
+ }
+
+ closedir (dirp);
+ }
obstack_grow_str0 (&obstack, "</osdata>\n");
buf = obstack_finish (&obstack);
for (;;)
{
int n;
+
content = xrealloc (content, content_read + 1024);
n = fread (content + content_read, 1, 1024, f);
content_read += n;
linux_nat_core_of_thread (struct target_ops *ops, ptid_t ptid)
{
struct lwp_info *info = find_lwp_pid (ptid);
+
if (info)
return info->core;
return -1;
case gdb_sys_exit:
{
int q;
+
target_terminal_ours ();
q = yquery (_("The next instruction is syscall exit. "
"It will make the program exit. "
case gdb_sys_read:
{
ULONGEST addr, count;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &addr);
regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
if (record_arch_list_add_mem ((CORE_ADDR) addr, (int) count))
case gdb_sys_readlink:
{
ULONGEST len;
+
regcache_raw_read_unsigned (regcache, tdep->arg2,
&tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
case gdb_sys_reboot:
{
int q;
+
target_terminal_ours ();
- q =
- yquery (_("The next instruction is syscall reboot. "
- "It will restart the computer. "
- "Do you want to stop the program?"));
+ q = yquery (_("The next instruction is syscall reboot. "
+ "It will restart the computer. "
+ "Do you want to stop the program?"));
target_terminal_inferior ();
if (q)
return 1;
case gdb_sys_getpeername:
{
ULONGEST len;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
case gdb_sys_recvfrom:
{
ULONGEST len;
+
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
case gdb_sys_recv:
{
ULONGEST size;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) size))
{
ULONGEST optvalp;
gdb_byte *optlenp = alloca (tdep->size_int);
+
if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
tdep->size_int))
{
case RECORD_SYS_SOCKETPAIR:
{
gdb_byte *a = alloca (tdep->size_ulong);
+
regcache_raw_read_unsigned (regcache, tdep->arg2,
&tmpulongest);
if (tmpulongest)
case gdb_sys_msgrcv:
{
ULONGEST msgp;
+
regcache_raw_read_signed (regcache, tdep->arg3, &tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
tmpint = (int) tmpulongest + tdep->size_long;
{
ULONGEST second;
ULONGEST ptr;
+
regcache_raw_read_signed (regcache, tdep->arg3, &second);
regcache_raw_read_unsigned (regcache, tdep->arg5, &ptr);
tmpint = (int) second + tdep->size_long;
if (tmpulongest == 0 || tmpulongest == 2)
{
ULONGEST ptr, bytecount;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &ptr);
regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
if (record_arch_list_add_mem ((CORE_ADDR) ptr, (int) bytecount))
case gdb_sys_getdents:
{
ULONGEST count;
+
regcache_raw_read_unsigned (regcache, tdep->arg2,
&tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
if (tmpulongest)
{
ULONGEST nfds;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_pollfd * nfds))
if (tmpulongest == 7 || tmpulongest == 8)
{
int rsize;
+
if (tmpulongest == 7)
rsize = tdep->size_NFS_FHSIZE;
else
if (tmpulongest)
{
ULONGEST sigsetsize;
+
regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) sigsetsize))
if (tmpulongest)
{
ULONGEST count;
+
regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) count))
return -1;
if (tmpulongest)
{
ULONGEST size;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) size))
return -1;
if (tmpulongest)
{
ULONGEST gidsetsize;
+
regcache_raw_read_unsigned (regcache, tdep->arg1,
&gidsetsize);
tmpint = tdep->size_gid_t * (int) gidsetsize;
case gdb_sys_getdents64:
{
ULONGEST count;
+
regcache_raw_read_unsigned (regcache, tdep->arg2,
&tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
if (tmpulongest)
{
ULONGEST size;
+
regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) size))
return -1;
if (tmpulongest)
{
ULONGEST size;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) size))
return -1;
if (tmpulongest)
{
ULONGEST len;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
return -1;
if (tmpulongest)
{
ULONGEST nr;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
nr * tdep->size_io_event))
case gdb_sys_exit_group:
{
int q;
+
target_terminal_ours ();
q = yquery (_("The next instruction is syscall exit_group. "
"It will make the program exit. "
if (tmpulongest)
{
ULONGEST len;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
return -1;
if (tmpulongest)
{
ULONGEST maxevents;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
maxevents * tdep->size_epoll_event))
if (tmpulongest)
{
ULONGEST maxnode;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
maxnode * tdep->size_long))
if (tmpulongest)
{
ULONGEST msg_len;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) msg_len))
if (tmpulongest)
{
ULONGEST buflen;
+
regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) buflen))
if (tmpulongest)
{
ULONGEST bufsiz;
+
regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) bufsiz))
return -1;
if (tmpulongest)
{
ULONGEST nfds;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_pollfd * nfds))
if (tmpulongest)
{
ULONGEST nr_pages;
+
regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest,
nr_pages * tdep->size_int))
if (tmpulongest)
{
ULONGEST maxevents;
+
regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
tmpint = (int) maxevents * tdep->size_epoll_event;
if (record_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
have_threads_callback (struct thread_info *thread, void *args)
{
int pid = * (int *) args;
+
if (ptid_get_pid (thread->ptid) != pid)
return 0;
}
if (except.reason < 0 && info_verbose)
- {
- exception_fprintf (gdb_stderr, except,
- "Warning: thread_db_find_new_threads_silently: ");
- }
+ {
+ exception_fprintf (gdb_stderr, except,
+ "Warning: thread_db_find_new_threads_silently: ");
+ }
}
/* Lookup a library in which given symbol resides.
while (*search_path)
{
const char *end = strchr (search_path, ':');
+
if (end)
{
size_t len = end - search_path;
+
if (len + 1 + strlen (LIBTHREAD_DB_SO) + 1 > sizeof (path))
{
char *cp = xmalloc (len + 1);
+
memcpy (cp, search_path, len);
cp[len] = '\0';
warning (_("libthread_db_search_path component too long,"
if (info->need_stale_parent_threads_check)
{
int tgid = linux_proc_get_tgid (ti.ti_lid);
+
if (tgid != -1 && tgid != info->pid)
return 0;
}