aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-09 PR binutils/16022Nick Clifton2-15/+19
* elf32-rx.c (rx_dump_symtab): Add missing break statements.
2013-10-09 PR binutils/16023Nick Clifton2-2/+5
* debug.c (debug_type_samep): Add missing break statement.
2013-10-09 PR binutils/16024Nick Clifton2-6/+10
* objdump.c (usage): Mark as a no-return function. (main): Add comment explaining why a break statement is not needed.
2013-10-09 PR gas/16025Nick Clifton2-1/+6
* config/tc-epiphany.c (md_convert_frag): Add missing break statement.
2013-10-09Minor O_CLOEXEC optimization, "regression" fixJan Kratochvil2-10/+17
gdb/ 2013-10-09 Jan Kratochvil <jan.kratochvil@redhat.com> * common/filestuff.c (gdb_fopen_cloexec): Remove initialization of result variable. Rename variable fopen_e_ever_failed to fopen_e_ever_failed_einval. Retry fopen only for errno EINVAL.
2013-10-09monitor.c: Don't install a deprecated_xfer_memory method.Pedro Alves2-15/+44
This removes another yet instance of a deprecated_xfer_memory user. Tested by building a --enable-targets=all gdb, on x86-64 Fedora 17. gdb/ 2013-10-09 Pedro Alves <palves@redhat.com> * monitor.c (monitor_write_memory, monitor_write_memory_bytes) (monitor_write_memory_longlongs, monitor_write_memory_block): Constify 'myaddr' parameter. (monitor_xfer_memory): Adjust interface as monitor_xfer_partial helper. (monitor_xfer_partial): New function. (init_base_monitor_ops): Don't install a deprecated_xfer_memory hook. Install a to_xfer_partial hook.
2013-10-09 PR gas/16026Nick Clifton2-2/+8
* config/tc-mn10200.c (md_convert_frag): Add missing break statement.
2013-10-09 * opncls.c (get_alt_debug_link_info_shim): Update type of 'len'.Tom Tromey2-1/+5
2013-10-09 PR ld/16021Nick Clifton2-84/+6
* elf32-rl78.c (rl78_dump_symtab): Delete. (rl78_get_reloc): Delete.
2013-10-09Uniquefy gdb.base/catch-syscall.exp test names.Pedro Alves2-112/+147
catch-syscall.exp has a series of duplicated output in gdb.sum. This patch makes sure all test names are unique, using with_test_prefix. Tested on x86_64 Fedora 17. gdb/testsuite/ 2013-10-09 Pedro Alves <palves@redhat.com> * gdb.base/catch-syscall.exp (test_catch_syscall_without_args) (test_catch_syscall_with_args, test_catch_syscall_with_many_args) (test_catch_syscall_with_wrong_args) (test_catch_syscall_restarting_inferior) (test_catch_syscall_fail_nodatadir) (test_catch_syscall_without_args_noxml) (test_catch_syscall_with_args_noxml) (test_catch_syscall_with_wrong_args_noxml): Use with_test_prefix.
2013-10-09bfdTom Tromey5-4/+20
* bfd-in2.h: Rebuild. * opncls.c (bfd_get_alt_debug_link_info): Change type of buildid_len to bfd_size_type. gdb * dwarf2read.c (dwarf2_get_dwz_file): Update for type change in bfd_get_alt_debug_link_info.
2013-10-09 * dwarf.c (add64): New function.Nick Clifton2-3/+39
(read_and_display_attr_value): Add CU offset in to the value displayed for a DW_AT_ref8 attribute.
2013-10-09New flag OBJF_NOT_FILENAMEJan Kratochvil6-4/+26
gdb/ 2013-10-09 Jan Kratochvil <jan.kratochvil@redhat.com> New flag OBJF_NOT_FILENAME. * auto-load.c (auto_load_objfile_script): Check also OBJF_NOT_FILENAME. * jit.c (jit_object_close_impl): Use OBJF_NOT_FILENAME for allocate_objfile. (jit_bfd_try_read_symtab): Use OBJF_NOT_FILENAME for symbol_file_add_from_bfd. * jv-lang.c (get_dynamics_objfile): Use OBJF_NOT_FILENAME for allocate_objfile. * objfiles.c (allocate_objfile): Assert OBJF_NOT_FILENAME if NAME is NULL. * objfiles.h (OBJF_NOT_FILENAME): New.
2013-10-09bfd/ChangeLogSergio Durigan Junior2-17/+69
2013-10-09 Sergio Durigan Junior <sergiodj@redhat.com> PR binutils/15993 * elf32-m32c.c (dump_symtab): Add missing "break;" statement on each "case". Reindent "switch" statements.
2013-10-08daily updateAlan Modra1-1/+1
2013-10-08fix PR symtab/15597Tom Tromey12-155/+530
This patch fixes gdb PR symtab/15597. The bug is that the .gnu_debugaltlink section includes the build-id of the alt file, but gdb does not use it. This patch fixes the problem by changing gdb to do what it ought to always have done: verify the build id of the file found using the filename in .gnu_debugaltlink; and if that does not match, try to find the correct debug file using the build-id and debug-file-directory. This patch touches BFD. Previously, gdb had its own code for parsing .gnu_debugaltlink; I changed it to use the BFD functions after those were introduced. However, the BFD functions are incorrect -- they assume that .gnu_debugaltlink is formatted like .gnu_debuglink. However, it it is not. Instead, it consists of a file name followed by the build-id -- no alignment, and the build-id is not a CRC. Fixing this properly is a bit of a pain. But, because separate_alt_debug_file_exists just has a FIXME for the build-id case, I did not fix it properly. Instead I introduced a hack. This leaves BFD working just as well as it did before my patch. I'm willing to do something better here but I could use some guidance as to what. It seems that the build-id code in BFD is largely punted on. FWIW gdb is the only user of bfd_get_alt_debug_link_info outside of BFD itself. I moved the build-id logic out of elfread.c and into a new file. This seemed cleanest to me. Writing a test case was a bit of a pain. I added a couple new features to the DWARF assembler to handle this. Built and regtested on x86-64 Fedora 18. * bfd-in2.h: Rebuild. * opncls.c (bfd_get_alt_debug_link_info): Add buildid_len parameter. Change type of buildid_out. Update. (get_alt_debug_link_info_shim): New function. (bfd_follow_gnu_debuglink): Use it. * Makefile.in (SFILES): Add build-id.c. (HFILES_NO_SRCDIR): Add build-id.h. * build-id.c: New file, largely from elfread.c. Modified most functions. * build-id.h: New file. * dwarf2read.c (dwarf2_get_dwz_file): Update for change to bfd_get_alt_debug_link_info. Verify dwz file's build-id. Search for dwz file using build-id. * elfread.c (build_id_bfd_get, build_id_verify) (build_id_to_debug_filename, find_separate_debug_file): Remove. * gdb.dwarf2/dwzbuildid.exp: New file. * lib/dwarf.exp (Dwarf::_section): Add "flags" and "type" parameters. (Dwarf::_defer_output): Change "section" parameter to "section_spec"; update. (Dwarf::gnu_debugaltlink, Dwarf::_note, Dwarf::build_id): New procs.
2013-10-08* elf32-m68k.c (elf_m68k_size_dynamic_sections): Add DT_DEBUG alsoAndreas Schwab2-2/+7
for PIE executables.
2013-10-08gas/Jan Beulich2-14/+13
2013-10-08 Jan Beulich <jbeulich@suse.com> * tc-i386.c (check_word_reg): Remove misplaced "else". (check_long_reg): Restore symmetry with check_word_reg.
2013-10-08opcodes/Jan Beulich3-26/+33
2013-10-08 Jan Beulich <jbeulich@suse.com> * i386-opc.tbl (invlpg): Use Anysize instead of Unspecified. (clflush): Use Anysize instead of Byte|Unspecified. (prefetch*): Likewise. * i386-tbl.h: Re-generate.
2013-10-082013-10-08 Jan-Benedict Glaw <jbglaw@lug-owl.de>Jan-Benedict Glaw3-2/+7
* configure.ac: Update from GCC. * configure: Regenerate.
2013-10-08[Ada] psymbol search failure due to comparison function discrepancyJoel Brobecker2-7/+62
Upon trying to print the value of a variant record, a user noticed the following problem: (gdb) print rt warning: Unknown upper bound, using 1. warning: Unknown upper bound, using 1. $1 = (a => ((a1 => (4), a2 => (4)), (a1 => (8), a2 => (8)))) The expected output is: (gdb) print rt $1 = (a => ((a1 => (4, 4), a2 => (8, 8)), (a1 => (4, 4), a2 => (8, 8)))) The problems comes from the fact that components "a1" and "a2" are defined as arrays whose upper bound is dynamic. To determine the value of that upper bound, GDB relies on the GNAT encoding and searches for the parallel ___U variable. Unfortunately, the search fails while doing a binary search inside the partial symtab of the unit where the array and its bound (and therefore the parallel ___U variable) are defined. It fails because partial symbols are sorted using strcmp_iw_ordered, while Ada symbol lookups are performed using a different comparison function (ada-lang.c:compare_names). The two functions are supposed to be compatible, but a change performed in April 2011 modified strcmp_iw_ordered, introducing case-sensitivity issues. As a result, the two functions would now disagree when passed the following two arguments: string1="common__inner_arr___SIZE_A_UNIT" string2="common__inner_arr__T4s___U" The difference starts at "_SIZE_A_UNIT" vs "T4s___U". So, it's mostly a matter of comparing '_' with 'T'. On the one hand, strcmp_iw_ordered would return -1, while compare_names returned 11. The change that made all the difference is that strcmp_iw_ordered now performs a case-insensitive comparison, and only resorts to case-sentitive comparison if the first comparison finds an equality. This changes everything, because while 'T' (84) and 't' (116) are on opposite sides of '_' (95). This patch aims at restoring the compatibility between the two functions, by adding case-sensitivity handling in the Ada comparison function. gdb/ChangeLog: * ada-lang.c (compare_names_with_case): Renamed from compare_names, adding a new parameter "casing" and its handling. New function documentation. (compare_names): New function, implemented using compare_names_with_case.
2013-10-08Add missing ChangeLog entry.Joel Brobecker1-0/+4
2013-10-08[Ada] Remove unnecessary ada_exception_sal advance declaration.Joel Brobecker1-3/+0
gdb/ChangeLog: * ada-lang.c (ada_exception_sal): Remove advance declaration.
2013-10-08gdb.ada/mi_catch_ex.exp: Make test names unique.Joel Brobecker2-4/+8
gdb/testsuite/ChangeLog: * gdb.ada/mi_catch_ex.exp: Make "mi_execute_to" test names unique.
2013-10-08gas/Jan Beulich5-5/+23
2013-10-08 Jan Beulich <jbeulich@suse.com> * gas/config/tc-arm.c (do_t_push_pop): Honor inst.size_req. Simplify LR/PC check. gas/testsuite/ 2013-10-08 Jan Beulich <jbeulich@suse.com> * gas/arm/thumb-w-good.s: Add PUSH.W and POP.W tests. * gas/arm/thumb-w-good.d: Update accordingly.
2013-10-08 * config/tc-msp430.c (msp430_operands): Accept "<foo>.a" as an aliasNick Clifton9-46/+175
for "<foo>a". Issue error messages for unrecognised or corrrupt size extensions. * gas/msp430/bad.s: New test: Checks erroneous size extensions. * gas/msp430/bad.d: New test command file. * gas/msp430/bad.l: New file: Expected error messages. * gas/msp430/msp430.exp: Run the new test. * gas/msp430/msp430x.s: Add "<foo>.a" aliases of "<foo>a" instructions. * gas/msp430/msp430x.d: Update expected disassembly.
2013-10-07daily updateAlan Modra1-1/+1
2013-10-07move the demangled_names_hash into the per-BFDTom Tromey5-24/+34
This moves the demangled_names_hash from the objfile into the per-BFD object. This is part of the objfile splitting project. The demangled names hash is independent of the program space. And, it is needed by the symbol tables. Both of these things indicate that it must be pushed into the per-BFD object, which this patch does. Built and regtested on x86-64 Fedora 18. * objfiles.c (free_objfile_per_bfd_storage): Delete the demangled_names_hash. (free_objfile): Don't delete the demangled_names_hash. * objfiles.h (struct objfile_per_bfd_storage) <demangled_names_hash>: New field. (struct objfile) <demangled_names_hash>: Move to objfile_per_bfd_storage. * symfile.c (reread_symbols): Don't delete the demangled_names_hash. * symtab.c (create_demangled_names_hash): Update. (symbol_set_names): Update.
2013-10-07don't share per-BFD data if relocations are neededTom Tromey4-4/+53
Right now we always share per-BFD data across objfiles, if there is a BFD. This works fine. However, we're going to start sharing more data, and sometimes this data will come directly from sections of the BFD. If such a section has SEC_RELOC set, then the data coming from that section will not be truly sharable -- the section will be program-space-dependent, and re-read by gdb for each objfile. This patch disallows per-BFD sharing in this case. This is a bit "heavy" in that we could in theory examine each bit of shared data for suitability. However, that is more complicated, and SEC_RELOC is rare enough that I think we needn't bother. Note that the "no sharing" case is equivalent to "gdb works as it historically did". That is, the sharing is a new(-ish) optimization. Built and regtested on x86-64 Fedora 18. * gdb_bfd.c (struct gdb_bfd_data) <relocation_computed, needs_relocations>: New fields. (gdb_bfd_requires_relocations): New function. * gdb_bfd.h (gdb_bfd_requires_relocations): Declare. * objfiles.c (get_objfile_bfd_data): Disallow sharing if the BFD needs relocations applied.
2013-10-07 * lib/mi-support.exp (varobj_tree::walk_tree): Set _root_idxTom Tromey2-0/+8
to 0.
2013-10-072013-10-07 Chao-ying Fu <Chao-ying.Fu@imgtec.com>Chao-ying Fu2-4/+8
* gas/mips/micromips@virt64.d: Fix dmfgc0 and dmtgc0.
2013-10-072013-10-07 Chao-ying Fu <Chao-ying.Fu@imgtec.com>Chao-ying Fu2-4/+8
* micromips-opc.c (micromips_opcodes): Fix dmfgc0 and dmtgc0.
2013-10-07gold/Cary Coutant3-17/+31
PR gold/16010 * testsuite/Makefile.am (icf_test): Fix dependencies. (icf_safe_test): Likewise. (icf_safe_so_test): Likewise. (large_symbol_alignment): Add empty _LDADD rule. * testsuite/Makefile.in: Regenerate.
2013-10-07[DOC] Mention what happens when the thread of a thread-specific breakpoint ↵Pedro Alves2-0/+24
disappears. We recently made GDB auto-delete thread-specific breakpoints when the corresponding thread is removed from the thread list, but we hadn't mentioned it in the manual. gdb/ 2013-10-07 Pedro Alves <palves@redhat.com> PR breakpoints/11568 * gdb.texinfo (Thread-Specific Breakpoints): Mention what happens when the thread is removed from the thread list.
2013-10-07Thread-specific breakpoints: say "no longer in the thread list" instead of ↵Pedro Alves2-1/+7
"gone". It seems "gone" may confuse people, while that was exactly what it was trying to avoid. Switch to saying "no longer in the thread list", which is really the predicate GDB uses. gdb/ 2013-10-07 Pedro Alves <palves@redhat.com> PR breakpoints/11568 * breakpoint.c (remove_threaded_breakpoints): Say "no longer in the thread list" instead of "gone".
2013-10-07This patch adds a new convenience variable called "$_exitsignal", whichSergio Durigan Junior12-3/+308
will hold the signal number when the inferior terminates due to the uncaught signal. I've made modifications on infrun.c:handle_inferior_event such that $_exitcode gets cleared when the inferior signalled, and vice-versa. This assumption was made because the variables are mutually exclusive, i.e., when the inferior terminates because of an uncaught signal it is not possible for it to return. I have also made modifications such that when a corefile is loaded, $_exitsignal gets set to the uncaught signal that "killed" the inferior, and $_exitcode is cleared. The patch also adds a NEWS entry, documentation bits, and a testcase. The documentation entry explains how to use $_exitsignal and $_exitcode in a GDB script, by making use of the new $_isvoid convenience function. gdb/ 2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * NEWS: Mention new convenience variable $_exitsignal. * corelow.c (core_open): Reset exit convenience variables. Set $_exitsignal to the uncaught signal which generated the corefile. * infrun.c (handle_inferior_event): Reset exit convenience variables. Set $_exitsignal for TARGET_WAITKIND_SIGNALLED. (clear_exit_convenience_vars): New function. * inferior.h (clear_exit_convenience_vars): New prototype. gdb/testsuite/ 2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.base/corefile.exp: Test whether $_exitsignal is set and $_exitcode is void when opening a corefile. * gdb.base/exitsignal.exp: New file. * gdb.base/segv.c: Likewise. * gdb.base/normal.c: Likewise. gdb/doc/ 2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.texinfo (Convenience Variables): Document $_exitsignal. Update entry for $_exitcode.
2013-10-06daily updateAlan Modra1-1/+1
2013-10-06gdb/Yao Qi2-1/+6
* varobj.h: Add comments to enum varobj_languages.
2013-10-05daily updateAlan Modra1-1/+1
2013-10-05(dwarf2_section_info): Comment tweaks missed in previous checkin.Doug Evans1-2/+2
2013-10-05 Add support for DWP file format version 2.Doug Evans3-118/+802
* NEWS: Mention support for DWP file format version 2. * dwarf2read.c (dwarf2_section_info): Convert asection field to a union of asection, containing_section. New fields virtual_offset and is_virtual. Change type of readin filed from int to char. (dwo_sections, dwo_file): Tweak comments. (dwp_v2_section_ids): New enum. (dwp_sections): New fields abbrev, info, line, loc, macinfo, macro, str_offsets, types. (virtual_v1_dwo_sections): Renamed from virtual_dwo_sections. All uses updated. (virtual_v2_dwo_sections): New struct. (dwp_hash_table): New fields version, nr_columns. Change type of section_pool field to a union. (dwp_file): New field version. (dwarf2_has_info): Check for virtual sections. (get_containing_section): New function. (get_section_bfd_owner, get_section_bfd_section): Call it. (dwarf2_locate_sections): Update. (dwarf2_section_empty_p): Update. (dwarf2_read_section): Handle virtual sections. (locate_dwz_sections): Update. (create_dwp_hash_table): Document and handle V2 format. (locate_v1_virtual_dwo_sections): Renamed from locate_virtual_dwo_sections and update. All callers updated. (create_dwo_unit_in_dwp_v1): Renamed from create_dwo_in_dwp. Delete arg htab. Rename arg section_index to unit_index. All callers updated. (MAX_NR_V1_DWO_SECTIONS): Renamed from MAX_NR_DWO_SECTIONS. All uses updated. (create_dwp_v2_section, create_dwo_unit_in_dwp_v2): New functions. (lookup_dwo_unit_in_dwp): Add V2 support. (dwarf2_locate_dwo_sections): Update. (dwarf2_locate_common_dwp_sections): Renamed from dwarf2_locate_dwp_sections and update. All callers updated. (dwarf2_locate_v2_dwp_sections): New function. (open_and_init_dwp_file): Add V2 support. (read_str_index): New locals str_section, str_offsets_section.
2013-10-05daily updateAlan Modra1-1/+1
2013-10-04[gas/]Kyrylo Tkachov6-1/+19
2013-10-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/tc-arm.c (do_t_mvn_tst): Use narrow form for tst when possible. [gas/testsuite/] 2013-10-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * gas/arm/thumb2_it.s: Add test for narrow tst. * gas/arm/thumb2_it.d: Update expected output. * gas/arm/thumb2_it_auto.d: Likewise.
2013-10-04Clean up ptid.h/ptid.c.Pedro Alves3-49/+50
The ptid_t contructors, accessors and predicates are documented in _three_ places, and each place uses a different wording. E.g, the descriptions in the .c file of the new ptid_lwp_p, ptid_tid_p weren't updated in the final revision like the descriptions in the .h file were. Clearly, switching to a style that has a single central description avoids such issues. Worse, some of the existing descriptions are plain wrong, such as: /* Attempt to find and return an existing ptid with the given PID, LWP, and TID components. If none exists, create a new one and return that. */ ptid_t ptid_build (int pid, long lwp, long tid); The function does nothing that complicated. It's just a simple constructor. So this gets rid of all the unnecessary descriptions, leaving only the ones near the function declarations in the header file, and fixes/clarifies those that remain. gdb/ 2013-10-04 Pedro Alves <palves@redhat.com> * common/ptid.c (null_ptid, minus_one_ptid, ptid_build) (pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid) (ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p): Replace describing comments with references to ptid.h. * common/ptid.h: Remove intro description of constructors, accessors and predicates. (struct ptid): Reformat. (minus_one_ptid, ptid_build, pid_to_ptid, ptid_get_pid) (ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid): Change describing comments.
2013-10-04Fix syntax error in aix-thread.c:sync_threadlistsJoel Brobecker2-1/+6
This patch fixes a small typo after the BUILD_THREAD -> ptid_build conversion. gdb/ChangeLog: * aix-thread.c (sync_threadlists): Add missing ')' in call to ptid_build.
2013-10-04Fix build failure in procfs.c after MERGEPID -> ptid_build conversion.Joel Brobecker2-1/+6
gdb/ChangeLog: * procfs.c (procfs_init_inferior): Fix typo causing the build to fail.
2013-10-04Remove unnecessary cast in aix-thread.c:ptrace32.Joel Brobecker2-1/+5
We're casting "addr" into "addr_ptr", but this variable is actually a parameter with that very same type... gdb/ChangeLog: * aix-thread.c (ptrace32): Remove cast to addr_ptr.
2013-10-04Add support for --start option in -exec-run GDB/MI command.Joel Brobecker8-5/+151
gdb/ChangeLog: * mi/mi-main.c (run_one_inferior): Add function description. Make ARG a pointer to an integer whose value determines whether we should "run" or "start" the program. (mi_cmd_exec_run): Add handling of the "--start" option. Reject all other command-line options. * NEWS: Add entry for "-exec-run"'s new "--start" option. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Program Execution): Document "-exec-run"'s new "--start" option. gdb/testsuite/ChangeLog: * gdb.mi/mi-start.c, gdb.mi/mi-start.exp: New files.
2013-10-04Move pending_event to remote_notif_state.Yao Qi4-47/+118
This patch moves pending_event to remote_notif_state. All pending events are destroyed in remote_notif_state_xfree. However, discard_pending_stop_replies release pending event too, so the pending event of stop notification is released twice, we need some refactor here. We add a new function discard_pending_stop_replies_in_queue which only discard events in stop_reply_queue, and let remote_notif_state_xfree release pending event for all notif_client. After this change, discard_pending_stop_replies is only attached to ifnerior_exit observer, so the INF can't be NULL any more. The NULL checking is removed too. gdb: 2013-10-04 Yao Qi <yao@codesourcery.com> * remote-notif.h (REMOTE_NOTIF_ID): New enum. (struct notif_client) <pending_event>: Moved to struct remote_notif_state. <id>: New field. (struct remote_notif_state) <pending_event>: New field. (notif_event_xfree): Declare. * remote-notif.c (handle_notification): Adjust. (notif_event_xfree): New function. (do_notif_event_xfree): Call notif_event_xfree. (remote_notif_state_xfree): Call notif_event_xfree to free each element in field pending_event. * remote.c (discard_pending_stop_replies): Remove declaration. (discard_pending_stop_replies_in_queue): Declare. (remote_close): Call discard_pending_stop_replies_in_queue instead of discard_pending_stop_replies. (remote_start_remote): Adjust. (stop_reply_xfree): Call notif_event_xfree. (notif_client_stop): Adjust initialization. (remote_notif_remove_all): Rename it to ... (remove_stop_reply_for_inferior): ... this. Update comments. Don't check INF is NULL. (discard_pending_stop_replies): Return early if notif_state is NULL. Adjust. Don't check INF is NULL. (remote_notif_get_pending_events): Adjust. (discard_pending_stop_replies_in_queue): New function. (remote_wait_ns): Likewise.
2013-10-04Move notif_queue and remote_async_get_pending_events_token to remote_stateYao Qi4-57/+103
This patch also removes notif_xfree, and don't pass it QUEUE_alloc, because we don't have to free notif_client when the remote_notif_state is freed. gdb: 2013-10-04 Yao Qi <yao@codesourcery.com> * remote-notif.c (DECLARE_QUEUE_P): Remove. (notif_queue): Remove. (remote_notif_process): Add one parameter 'notif_queue'. Update comments. Callers update. (remote_async_get_pending_events_token): Remove. (remote_notif_register_async_event_handler): Remove. (remote_notif_unregister_async_event_handler): Remove. (handle_notification): Add parameter 'notif_queue'. Update comments. Callers update. (notif_xfree): Remove. (remote_notif_state_allocate): New function. (remote_notif_state_xfree): New function. (_initialize_notif): Remove code to allocate queue. * remote-notif.h (DECLARE_QUEUE_P): Moved from remote-notif.c. (struct remote_notif_state): New. (handle_notification): Update declaration. (remote_notif_process): Likewise. (remote_notif_register_async_event_handler): Remove. (remote_notif_unregister_async_event_handler): Remove. (remote_notif_state_allocate): Declare. (remote_notif_state_xfree): Declare. * remote.c (struct remote_state) <notif_state>: New field. (remote_close): Don't call remote_notif_unregister_async_event_handler. Call remote_notif_state_xfree. (remote_open_1): Don't call remote_notif_register_async_event_handler. Call remote_notif_state_allocate.