From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22615 invoked by alias); 5 May 2010 14:24:59 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 22463 invoked by uid 9561); 5 May 2010 14:24:54 -0000 Date: Wed, 05 May 2010 14:24:00 -0000 Message-ID: <20100505142453.22417.qmail@sourceware.org> From: swagiaal@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: Merge remote branch 'gdb/master' X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 16b6a32f73a0866442f1b78182fce9e11c23a909 X-Git-Newrev: 6b1c425da60b73c7750a970b230182cbf369aa56 X-SW-Source: 2010-q2/txt/msg00054.txt.bz2 List-Id: The branch, master has been updated via 6b1c425da60b73c7750a970b230182cbf369aa56 (commit) via 1a22a6c3542b50b14d9a643ad02e4ddf70a90197 (commit) via e6a6f67279ed4843912e864c540ee6601ac5f5ec (commit) via 54952cba3d95276f558ac80a992d96e01cbf4dc1 (commit) via c913f394e94562e6fd963416bb17952246734faf (commit) via 1bbadf4550f95c8bc2afc4ac66f42f7922f6d220 (commit) via 60d15ff6d78921d080aee681e60372abe6627570 (commit) via 384b96f4e6097e1d6492e9e3681017fe04d56749 (commit) via 3c0433dfe2835ab40ad098baec7e87cfcca0c0e2 (commit) via 503dfd9d572fc2ddfad9a6815f53eec7b5a5e42c (commit) via a3c404365402daef3839e40a2f3345455dfa2876 (commit) via ca1f9e2a7ee7afc8d329da94300a908836716511 (commit) via dff477d9782f50e0d163363de1fac6f2a8d9a226 (commit) via 872b7c6f612a861b17cd42732356223d0503016f (commit) via f016e160c1bc915d5826cd251db03bc43924e31f (commit) via eeb30181669a21f349574a169469936a9516c88a (commit) via 5b6d7b27faf540240234d9e0893bd06e61a9a44e (commit) via ed0ee89233b61555c0a7f5a0c25c33fc82b86e0c (commit) from 16b6a32f73a0866442f1b78182fce9e11c23a909 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 6b1c425da60b73c7750a970b230182cbf369aa56 Merge: 16b6a32f73a0866442f1b78182fce9e11c23a909 1a22a6c3542b50b14d9a643ad02e4ddf70a90197 Author: Sami Wagiaalla Date: Wed May 5 10:16:58 2010 -0400 Merge remote branch 'gdb/master' commit 1a22a6c3542b50b14d9a643ad02e4ddf70a90197 Author: Hui Zhu Date: Wed May 5 09:20:18 2010 +0000 2010-05-05 Hui Zhu * gdbarch.h (gdbarch_has_dos_based_file_system): Update comment. commit e6a6f67279ed4843912e864c540ee6601ac5f5ec Author: Hui Zhu Date: Wed May 5 09:20:18 2010 +0000 2010-05-05 Hui Zhu * gdbarch.h (gdbarch_has_dos_based_file_system): Update comment. commit 54952cba3d95276f558ac80a992d96e01cbf4dc1 Author: gdbadmin Date: Wed May 5 00:00:33 2010 +0000 *** empty log message *** commit c913f394e94562e6fd963416bb17952246734faf Author: Alan Modra Date: Wed May 5 00:00:04 2010 +0000 daily update commit 1bbadf4550f95c8bc2afc4ac66f42f7922f6d220 Author: Mark Kettenis Date: Tue May 4 21:09:20 2010 +0000 * remote.c (register_remote_support_xml) (remote_query_supported_append, remote_query_supported): Add cast to NULL used as sentinel. * tracepoint.c (tvariables_info_1): Likewise. * utils.c (add_internal_problem_command): Likewise. commit 60d15ff6d78921d080aee681e60372abe6627570 Author: mgretton Date: Tue May 4 09:54:17 2010 +0000 * gdb/dwarf2loc.c (read_pieced_value, write_pieced_value, dwarf2_evaluate_loc_desc): Handle not being able to access DWARF registers gracefully. commit 384b96f4e6097e1d6492e9e3681017fe04d56749 Author: mgretton Date: Tue May 4 08:47:11 2010 +0000 * gdb/exec.c (print_section_info): Display entry point without arch specific parts. commit 3c0433dfe2835ab40ad098baec7e87cfcca0c0e2 Author: Pierre Muller Date: Tue May 4 06:48:25 2010 +0000 PR exp/11349. * printcmd.c (x_command): Only dereference once implicitly for TYPE_CODE_REF. testsuite dir: PR exp/11349. * testsuite/gdb.cp/ref-types.exp: Add test to examine use a reference local variable. commit 503dfd9d572fc2ddfad9a6815f53eec7b5a5e42c Author: Alan Modra Date: Tue May 4 01:45:00 2010 +0000 daily update commit a3c404365402daef3839e40a2f3345455dfa2876 Author: gdbadmin Date: Tue May 4 00:00:32 2010 +0000 *** empty log message *** commit ca1f9e2a7ee7afc8d329da94300a908836716511 Author: Doug Evans Date: Mon May 3 20:58:20 2010 +0000 * event-loop.c (gdb_timer): Delete unused global. (create_timer): Update. commit dff477d9782f50e0d163363de1fac6f2a8d9a226 Author: Doug Evans Date: Mon May 3 20:53:21 2010 +0000 * event-loop.c (struct callback_event): New struct. (callback_list): New global. (append_callback_event, delete_callback_event): New functions. (process_callback): New function. (start_event_loop): Call it. * remote-utils.c (NOT_SCHEDULED): Define. (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals, moved out of readchar. (readchar): Rewrite. Call reschedule before returning. (reset_readchar): New function. (remote_close): Call it. (process_remaining, reschedule): New functions. * server.h (callback_handler_func): New typedef. (append_callback_event, delete_callback_event): Declare. commit 872b7c6f612a861b17cd42732356223d0503016f Author: Jan Kratochvil Date: Mon May 3 20:10:22 2010 +0000 gdb/ * cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the CURRENT->DECLARATION case. * cp-support.h (struct using_direct): Provide extended comment. commit f016e160c1bc915d5826cd251db03bc43924e31f Author: Mark Kettenis Date: Mon May 3 19:59:12 2010 +0000 * hppaobsd-tdep.c (HPPAOBSD_SIZEOF_GREGS): Renamed from HPPABSD_SIZEOF_GREGS. (HPPAOBSD_SIZEOF_FPREGS): New define. (hppaobsd_supply_gregset): Renamed from hppabsd_supply_gregset. (hppaobsd_supply_fpregset): New function. (hppaobsd_gregset): Renamed from hppabsd_gregset. (hppaobsd_fpregset): New variable. (hppaobsd_regset_from_core_section): Handle floating-point registers. (_initialize_hppabsd_tdep): Remove spurious blank line. commit eeb30181669a21f349574a169469936a9516c88a Author: Pedro Alves Date: Mon May 3 18:13:36 2010 +0000 gdb/gdbserver/ * proc-service.c (ps_pglobal_lookup): Use thread_db_look_up_one_symbol. * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb' parameter. Use it instead of all_symbols_looked_up. * server.h (struct process_info) : Delete field. (all_symbols_looked_up): Don't declare. (look_up_one_symbol): Add new `may_ask_gdb' parameter. * thread-db.c (struct thread_db) : New field. (thread_db_look_up_symbols): Adjust call to look_up_one_symbol. Set all_symbols_looked_up here. (thread_db_look_up_one_symbol): New. (thread_db_get_tls_address): Adjust. (thread_db_load_search, try_thread_db_load_1): Always allocate the thread_db object on the heap, and tentatively set it in the process structure. (thread_db_init): Don't set all_symbols_looked_up here. * linux-low.h (thread_db_look_up_one_symbol): Declare. commit 5b6d7b27faf540240234d9e0893bd06e61a9a44e Author: Tristan Gingold Date: Mon May 3 16:04:29 2010 +0000 bfd/ 2010-05-03 Tristan Gingold * vms-lib.c (vms_lib_bopen): Fix the size threshold to read selective_search flag. Add comments. * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section before output_has_begun is set. commit ed0ee89233b61555c0a7f5a0c25c33fc82b86e0c Author: Pierre Muller Date: Mon May 3 13:38:26 2010 +0000 PR pascal/11349. * p-valprint.c (pascal_value_print): Always dereference a value with type code TYPE_CODE_REF. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 9 +++ bfd/version.h | 2 +- bfd/vms-alpha.c | 31 ++++++---- bfd/vms-lib.c | 4 +- gdb/ChangeLog | 58 ++++++++++++++++++ gdb/cp-namespace.c | 12 ++-- gdb/cp-support.h | 51 ++++++++++++---- gdb/dwarf2loc.c | 35 +++++++++-- gdb/event-loop.c | 5 +- gdb/exec.c | 7 ++- gdb/gdbarch.h | 6 +- gdb/gdbserver/ChangeLog | 39 ++++++++++++ gdb/gdbserver/event-loop.c | 115 ++++++++++++++++++++++++++++++++++++ gdb/gdbserver/linux-low.h | 1 + gdb/gdbserver/proc-service.c | 2 +- gdb/gdbserver/remote-utils.c | 110 +++++++++++++++++++++++++++-------- gdb/gdbserver/server.h | 11 ++-- gdb/gdbserver/thread-db.c | 100 ++++++++++++++++++++------------ gdb/hppaobsd-tdep.c | 54 ++++++++++++++--- gdb/p-valprint.c | 5 +- gdb/printcmd.c | 2 +- gdb/remote.c | 8 +- gdb/testsuite/ChangeLog | 6 ++ gdb/testsuite/gdb.cp/ref-types.exp | 5 ++ gdb/tracepoint.c | 4 +- gdb/utils.c | 10 ++- gdb/version.in | 2 +- 27 files changed, 558 insertions(+), 136 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6ebbe7f..13c242d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,13 @@ 2010-05-03 Tristan Gingold + * vms-lib.c (vms_lib_bopen): Fix the size threshold to read + selective_search flag. + Add comments. + * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section + before output_has_begun is set. + +2010-05-03 Tristan Gingold + * vms-alpha.c: Add comments. (struct vms_private_data_struct): Remove image_autoextend field. (dst_check_allocation): Removed. @@ -11,6 +19,7 @@ Write the dmt section. (evax_bfd_print_image): Also print the dst size in hexa. Fix typo. (alpha_vms_read_sections_content): Do not set image_autoextend. + (alpha_vms_bfd_final_link): Generate the dst. 2010-05-03 Tristan Gingold diff --git a/bfd/version.h b/bfd/version.h index 80a43b6..791d072 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20100503 +#define BFD_VERSION_DATE 20100505 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 92d0693..5ae54c2 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -8364,6 +8364,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) bfd_vma base_addr; bfd_vma last_addr; asection *dst; + asection *dmt; bfd_get_outsymbols (abfd) = NULL; bfd_get_symcount (abfd) = 0; @@ -8478,6 +8479,21 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) alpha_vms_link_hash (info)->fixup = fixupsec; alpha_vms_link_hash (info)->base_addr = base_addr; + /* Create the DMT section, if necessary. */ + dst = PRIV (dst_section); + if (dst != NULL && dst->size == 0) + dst = NULL; + if (dst != NULL) + { + dmt = bfd_make_section_anyway_with_flags + (info->output_bfd, "$DMT$", + SEC_DEBUGGING | SEC_HAS_CONTENTS | SEC_LINKER_CREATED); + if (dmt == NULL) + return FALSE; + } + else + dmt = NULL; + /* Read all sections from the inputs. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next) { @@ -8491,7 +8507,8 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) return FALSE; } - /* Handle all the link order information for the sections. */ + /* Handle all the link order information for the sections. + Note: past this point, it is not possible to create new sections. */ for (o = abfd->sections; o != NULL; o = o->next) { for (p = o->map_head.link_order; p != NULL; p = p->next) @@ -8518,21 +8535,11 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) return FALSE; /* Compute the DMT. */ - dst = PRIV (dst_section); - if (dst != NULL && dst->size == 0) - dst = NULL; - if (dst != NULL) + if (dmt != NULL) { - asection *dmt; int pass; unsigned char *contents = NULL; - dmt = bfd_make_section_anyway_with_flags - (info->output_bfd, "$DMT$", - SEC_DEBUGGING | SEC_HAS_CONTENTS | SEC_LINKER_CREATED); - if (dmt == NULL) - return FALSE; - /* In pass 1, compute the size. In pass 2, write the DMT contents. */ for (pass = 0; pass < 2; pass++) { diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index bbef19c..0b45a13 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -577,6 +577,7 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind) off = bfd_getl16 (sbm->next); if (off != 0) { + /* Read the 'next' array. */ sbmdesc->next = (unsigned short *)bfd_alloc (abfd, sbm_len * sizeof (unsigned short)); buf1 = data + off; @@ -585,6 +586,7 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind) } else { + /* There is no next array if there is only one submap. */ BFD_ASSERT (tdata->nbr_dcxsbm == 1); sbmdesc->next = NULL; } @@ -1200,7 +1202,7 @@ vms_lib_bopen (bfd *el, file_ptr filepos) /* Check id. */ if (mhd->id != MHD__C_MHDID) return FALSE; - if (len >= sizeof (struct vms_mhd)) + if (len >= MHD__C_MHDLEN + 1) el->selective_search = (mhd->objstat & MHD__M_SELSRC) ? 1 : 0; el->mtime = vms_rawtime_to_time_t (mhd->datim); el->mtime_set = TRUE; diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9c3591c..4f56ff1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,61 @@ +2010-05-05 Hui Zhu + + * gdbarch.h (gdbarch_has_dos_based_file_system): Update comment. + +2010-05-04 Mark Kettenis + + * remote.c (register_remote_support_xml) + (remote_query_supported_append, remote_query_supported): Add cast + to NULL used as sentinel. + * tracepoint.c (tvariables_info_1): Likewise. + * utils.c (add_internal_problem_command): Likewise. + +2010-05-04 Matthew Gretton-Dann + + * dwarf2loc.c (read_pieced_value, write_pieced_value, + dwarf2_evaluate_loc_desc): Handle not being able to access DWARF + registers gracefully. + +2010-05-04 Matthew Gretton-Dann + + * exec.c (print_section_info): Display entry point without arch + specific parts. + +2010-05-04 Pierre Muller + + PR exp/11349. + * printcmd.c (x_command): Only dereference once implicitly for + TYPE_CODE_REF. + +2010-05-03 Doug Evans + + * event-loop.c (gdb_timer): Delete unused global. + (create_timer): Update. + +2010-05-03 Jan Kratochvil + + * cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the + CURRENT->DECLARATION case. + * cp-support.h (struct using_direct): Provide extended comment. + +2010-05-03 Mark Kettenis + + * hppaobsd-tdep.c (HPPAOBSD_SIZEOF_GREGS): Renamed from + HPPABSD_SIZEOF_GREGS. + (HPPAOBSD_SIZEOF_FPREGS): New define. + (hppaobsd_supply_gregset): Renamed from hppabsd_supply_gregset. + (hppaobsd_supply_fpregset): New function. + (hppaobsd_gregset): Renamed from hppabsd_gregset. + (hppaobsd_fpregset): New variable. + (hppaobsd_regset_from_core_section): Handle floating-point registers. + (_initialize_hppabsd_tdep): Remove spurious blank line. + +2010-05-03 Pierre Muller + + PR pascal/11349. + * p-valprint.c (pascal_value_print): Always dereference a value with + type code TYPE_CODE_REF. + 2010-05-03 Pedro Alves * remote.c (remote_notice_signals): New. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index c050d1a..e042463 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -355,12 +355,14 @@ cp_lookup_symbol_imports (const char *scope, searched_cleanup = make_cleanup (reset_directive_searched, current); /* If there is an import of a single declaration, compare the imported - declaration with the sought out name. If there is a match pass - current->import_src as NAMESPACE to direct the search towards the - imported namespace. */ - if (current->declaration && strcmp (name, current->declaration) == 0) + declaration (after optional renaming by its alias) with the sought + out name. If there is a match pass current->import_src as NAMESPACE + to direct the search towards the imported namespace. */ + if (current->declaration + && strcmp (name, current->alias ? current->alias + : current->declaration) == 0) sym = cp_lookup_symbol_in_namespace (current->import_src, - name, + current->declaration, block, domain); diff --git a/gdb/cp-support.h b/gdb/cp-support.h index f2f202f..dd4df84 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -37,19 +37,44 @@ struct type; struct demangle_component; /* This struct is designed to store data from using directives. It - says that names from namespace IMPORT_SRC should be visible within - namespace IMPORT_DEST. These form a linked list; NEXT is the next element - of the list. If the imported namespace has been aliased, ALIAS is set to a - string representing the alias. Otherwise, ALIAS is NULL. - Eg: - namespace C = A::B; - ALIAS = "C" - DECLARATION is the name of the imported declaration, if this import - statement represents one. - Eg: - using A::x; - Where x is variable in namespace A. DECLARATION is set to x. -*/ + says that names from namespace IMPORT_SRC should be visible within namespace + IMPORT_DEST. These form a linked list; NEXT is the next element of the + list. If the imported namespace or declaration has been aliased within the + IMPORT_DEST namespace, ALIAS is set to a string representing the alias. + Otherwise, ALIAS is NULL. DECLARATION is the name of the imported + declaration, if this import statement represents one. Otherwise DECLARATION + is NULL and this import statement represents a namespace. + + C++: using namespace A; + Fortran: use A + import_src = "A" + import_dest = local scope of the import statement even such as "" + alias = NULL + declaration = NULL + + C++: using A::x; + Fortran: use A, only: x + import_src = "A" + import_dest = local scope of the import statement even such as "" + alias = NULL + declaration = "x" + The declaration will get imported as import_dest::x. + + C++: namespace LOCALNS = A; + Fortran has no way to address non-local namespace/module. + import_src = "A" + import_dest = local scope of the import statement even such as "" + alias = "LOCALNS" + declaration = NULL + The namespace will get imported as the import_dest::LOCALNS namespace. + + C++ cannot express it, it would be something like: using localname = A::x; + Fortran: use A, only localname => x + import_src = "A" + import_dest = local scope of the import statement even such as "" + alias = "localname" + declaration = "x" + The declaration will get imported as localname or `import_dest`localname. */ struct using_direct { diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 8fbf651..2bd45d9 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -284,8 +284,16 @@ read_pieced_value (struct value *v) /* Big-endian, and we want less than full size. */ reg_offset = register_size (arch, gdb_regnum) - p->size; - get_frame_register_bytes (frame, gdb_regnum, reg_offset, p->size, - contents + offset); + if (gdb_regnum != -1) + { + get_frame_register_bytes (frame, gdb_regnum, reg_offset, + p->size, contents + offset); + } + else + { + error (_("Unable to access DWARF register number %s"), + paddress (arch, p->v.expr.value)); + } } break; @@ -356,8 +364,16 @@ write_pieced_value (struct value *to, struct value *from) /* Big-endian, and we want less than full size. */ reg_offset = register_size (arch, gdb_regnum) - p->size; - put_frame_register_bytes (frame, gdb_regnum, reg_offset, p->size, - contents + offset); + if (gdb_regnum != -1) + { + put_frame_register_bytes (frame, gdb_regnum, reg_offset, + p->size, contents + offset); + } + else + { + error (_("Unable to write to DWARF register number %s"), + paddress (arch, p->v.expr.value)); + } } break; case DWARF_VALUE_MEMORY: @@ -454,7 +470,16 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, struct gdbarch *arch = get_frame_arch (frame); CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0); int gdb_regnum = gdbarch_dwarf2_reg_to_regnum (arch, dwarf_regnum); - retval = value_from_register (SYMBOL_TYPE (var), gdb_regnum, frame); + if (gdb_regnum != -1) + { + retval = value_from_register (SYMBOL_TYPE (var), + gdb_regnum, frame); + } + else + { + error (_("Unable to access DWARF register number %s"), + paddress (arch, dwarf_regnum)); + } } break; diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 533eefe..735d0f6 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -218,8 +218,7 @@ struct gdb_timer struct gdb_timer *next; timer_handler_func *proc; /* Function to call to do the work */ gdb_client_data client_data; /* Argument to async_handler_func */ - } -gdb_timer; + }; /* List of currently active timers. It is sorted in order of increasing timers. */ @@ -1188,7 +1187,7 @@ create_timer (int milliseconds, timer_handler_func * proc, gdb_client_data clien gettimeofday (&time_now, NULL); - timer_ptr = (struct gdb_timer *) xmalloc (sizeof (gdb_timer)); + timer_ptr = (struct gdb_timer *) xmalloc (sizeof (*timer_ptr)); timer_ptr->when.tv_sec = time_now.tv_sec + delta.tv_sec; timer_ptr->when.tv_usec = time_now.tv_usec + delta.tv_usec; /* carry? */ diff --git a/gdb/exec.c b/gdb/exec.c index 89511bd..5757a91 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -669,6 +669,7 @@ print_section_info (struct target_section_table *t, bfd *abfd) { /* gcc-3.4 does not like the initialization in

sections_end>. */ bfd_vma displacement = 0; + bfd_vma entry_point; for (p = t->sections; p < t->sections_end; p++) { @@ -690,9 +691,11 @@ print_section_info (struct target_section_table *t, bfd *abfd) warning (_("Cannot find section for the entry point of %s.\n"), bfd_get_filename (abfd)); + entry_point = gdbarch_addr_bits_remove (gdbarch, + bfd_get_start_address (abfd) + + displacement); printf_filtered (_("\tEntry point: %s\n"), - paddress (gdbarch, (bfd_get_start_address (abfd) - + displacement))); + paddress (gdbarch, entry_point)); } for (p = t->sections; p < t->sections_end; p++) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 6ccabfc..71da45b 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -950,9 +950,9 @@ extern void set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch_auto extern const char * gdbarch_solib_symbols_extension (struct gdbarch *gdbarch); extern void set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, const char * solib_symbols_extension); -/* If true the target OS has DOS-based file system semantics. That is, - absolute paths include a drive name, and the backslash is considered - a path separator. */ +/* If true, the target OS has DOS-based file system semantics. That + is, absolute paths include a drive name, and the backslash is + considered a directory separator. */ extern int gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch); extern void set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, int has_dos_based_file_system); diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 2cb1ac0..eb82920 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,42 @@ +2010-05-03 Doug Evans + + * event-loop.c (struct callback_event): New struct. + (callback_list): New global. + (append_callback_event, delete_callback_event): New functions. + (process_callback): New function. + (start_event_loop): Call it. + * remote-utils.c (NOT_SCHEDULED): Define. + (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals, + moved out of readchar. + (readchar): Rewrite. Call reschedule before returning. + (reset_readchar): New function. + (remote_close): Call it. + (process_remaining, reschedule): New functions. + * server.h (callback_handler_func): New typedef. + (append_callback_event, delete_callback_event): Declare. + +2010-05-03 Pedro Alves + + * proc-service.c (ps_pglobal_lookup): Use + thread_db_look_up_one_symbol. + * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb' + parameter. Use it instead of all_symbols_looked_up. + * server.h (struct process_info) : Delete + field. + (all_symbols_looked_up): Don't declare. + (look_up_one_symbol): Add new `may_ask_gdb' parameter. + * thread-db.c (struct thread_db) : New + field. + (thread_db_look_up_symbols): Adjust call to look_up_one_symbol. + Set all_symbols_looked_up here. + (thread_db_look_up_one_symbol): New. + (thread_db_get_tls_address): Adjust. + (thread_db_load_search, try_thread_db_load_1): Always allocate the + thread_db object on the heap, and tentatively set it in the + process structure. + (thread_db_init): Don't set all_symbols_looked_up here. + * linux-low.h (thread_db_look_up_one_symbol): Declare. + 2010-05-03 Pedro Alves * linux-low.c (linux_kill, linux_detach): Adjust. diff --git a/gdb/gdbserver/event-loop.c b/gdb/gdbserver/event-loop.c index 6471772..bc5c1f7 100644 --- a/gdb/gdbserver/event-loop.c +++ b/gdb/gdbserver/event-loop.c @@ -141,6 +141,36 @@ static struct } gdb_notifier; +/* Callbacks are just routines that are executed before waiting for the + next event. In GDB this is struct gdb_timer. We don't need timers + so rather than copy all that complexity in gdbserver, we provide what + we need, but we do so in a way that if/when the day comes that we need + that complexity, it'll be easier to add - replace callbacks with timers + and use a delta of zero (which is all gdb currently uses timers for anyway). + + PROC will be executed before gdbserver goes to sleep to wait for the + next event. */ + +struct callback_event + { + int id; + callback_handler_func *proc; + gdb_client_data *data; + struct callback_event *next; + }; + +/* Table of registered callbacks. */ + +static struct + { + struct callback_event *first; + struct callback_event *last; + + /* Id of the last callback created. */ + int num_callbacks; + } +callback_list; + /* Insert an event object into the gdb event queue. EVENT_PTR points to the event to be inserted into the queue. The @@ -220,6 +250,81 @@ process_event (void) return 0; hooks/post-receive -- Repository for Project Archer.