ld/x86: Remove hidden _edata, __bss_start, and _end
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12018-06-08 Tom Tromey <tom@tromey.com>
2
3 * linux-low.c (linux_low_read_btrace): Update.
4
52018-06-04 Stan Cox <scox@redhat.com>
6
7 * server.h (struct client_state): New.
8 * server.c (cont_thread, general_thread, multi_process)
9 (report_fork_events, report_vfork_events, report_exec_events)
10 (report_thread_events, swbreak_feature, hwbreak_feature)
11 (vCont_supported, disable_randomization, pass_signals)
12 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
13 Moved to client_state.
14 * remote-utils.c (remote_debug, noack_mode)
15 (transport_is_reliable): Moved to client_state.
16 * tracepoint.c (current_traceframe): Moved to client_state.
17
18 Update all callers.
19 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
20 linux-low.c, remote-utils.h, target.c: Use client_state.
21
222018-05-31 Alan Hayward <alan.hayward@arm.com>
23
24 * configure.srv: Add new c/h file.
25
262018-05-31 Alan Hayward <alan.hayward@arm.com>
27
28 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
29 null VQ.
30
312018-05-25 Maciej W. Rozycki <macro@mips.com>
32
33 * gdb.arch/mips-fpregset-core.exp: New test.
34 * gdb.arch/mips-fpregset-core.c: New test source.
35
362018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
37
38 PR server/23198
39 * hostio.c (require_int): Do not report overflow for integers
40 between 0xfffffff and 0x7fffffff.
41
422018-05-22 Maciej W. Rozycki <macro@mips.com>
43
44 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
45 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
46 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
47 functions.
48 (the_low_target): Wire them.
49
502018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
51
52 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
53 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
54 mode. Call collect_register_by_name with vscr using
55 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
56 (ppc_store_vrregset): Add and set vscr_offset variable as in
57 ppc_fill_vrregset. Call supply_register_by_name with vscr using
58 vscr_offset.
59
602018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
61
62 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
63 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
64 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
65
662018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
67
68 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
69 (ppc_store_vsxregset): Likewise.
70 (ppc_fill_vrregset): Likewise.
71 (ppc_store_vrregset): Likewise.
72 (ppc_fill_evrregset): Likewise.
73 (ppc_store_evrregset): Likewise.
74 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
75 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
76 needed.
77
782018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
79
80 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
81 wordsize of the inferior. Call ppc_linux_target_wordsize.
82
832018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
84
85 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
86 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
87 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
88 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
89 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
90 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
91 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
92 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
93 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
94 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
95 (tdesc_powerpc_e500l): Remove.
96 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
97 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
98 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
99 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
100 linux-ppc-tdesc.h.
101 (ppc_arch_setup): Remove target description matching code. Fill a
102 ppc_linux_features struct and call ppc_linux_match_description
103 with it.
104
1052018-05-22 Maciej W. Rozycki <macro@mips.com>
106
107 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
108 width of the requested register exceeds the width of the
109 `ptrace' data type.
110 (mips_cannot_store_register): Likewise.
111
1122018-05-21 Maciej W. Rozycki <macro@mips.com>
113
114 * linux-mips-low.c (mips_fetch_register): New function. Update
115 preceding comment.
116 (mips_store_gregset): Supply 0 rather than $restart for $zero.
117 (the_low_target): Wire `mips_fetch_register'.
118
1192018-05-10 Joel Brobecker <brobecker@adacore.com>
120
121 * lynx-i386-low.c (LYNXOS_178): New macro.
122 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
123 the layout on LynxOS-178.
124 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
125 handle floating point registers that are not supported by
126 LynxOS-178.
127
1282018-05-10 Tom Tromey <tom@tromey.com>
129
130 * configure: Rebuild.
131
1322018-05-10 Joel Brobecker <brobecker@adacore.com>
133
134 PR server/23158:
135 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
136 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
137 Use it to set the expedite_regs field in the given tdesc.
138 * x86-tdesc.h: New file.
139 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
140 Adjust following the addition of the new expedite_regs parameter
141 to init_target_desc.
142 * linux-tic6x-low.c (tic6x_read_description): Likewise.
143 * linux-x86-tdesc.c: #include "x86-tdesc.h".
144 (i386_linux_read_description, amd64_linux_read_description):
145 Adjust following the addition of the new expedite_regs parameter
146 to init_target_desc.
147 * lynx-i386-low.c: #include "x86-tdesc.h".
148 (lynx_i386_arch_setup): Adjust following the addition of the new
149 expedite_regs parameter to init_target_desc.
150 * nto-x86-low.c: #include "x86-tdesc.h".
151 (nto_x86_arch_setup): Adjust following the addition of the new
152 expedite_regs parameter to init_target_desc.
153 * win32-i386-low.c: #include "x86-tdesc.h".
154 (i386_arch_setup): Adjust following the addition of the new
155 expedite_regs parameter to init_target_desc.
156
1572018-05-10 Joel Brobecker <brobecker@adacore.com>
158
159 PR server/23158:
160 * win32-low.c (win32_create_inferior): Add call to my_wait
161 setting last_status global.
162
1632018-05-10 Joel Brobecker <brobecker@adacore.com>
164
165 PR server/23158:
166 * win32-low.c (create_process): Only call gdb_tilde_expand if
167 inferior_cwd is not NULL.
168
1692018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
170
171 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
172 registers to the cache if their values have changed.
173 (i387_xsave_to_cache): Provide default values for x87 control
174 registers when these features are available, but disabled.
175 * regcache.c (supply_register_by_name_zeroed): New function.
176 * regcache.h (supply_register_by_name_zeroed): Declare new
177 function.
178
1792018-05-07 Tom Tromey <tom@tromey.com>
180
181 * configure: Rebuild.
182
1832018-05-04 Tom Tromey <tom@tromey.com>
184
185 * configure: Rebuild.
186
1872018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
188 Pedro Alves <palves@redhat.com>
189
190 * linux-aarch64-low.c (aarch64_stopped_data_address):
191 Likewise.
192
1932018-04-27 Tom Tromey <tom@tromey.com>
194
195 * configure: Rebuild.
196
1972018-04-23 Tom Tromey <tom@tromey.com>
198
199 * configure: Rebuild.
200
2012018-04-19 Simon Marchi <simon.marchi@ericsson.com>
202
203 * Makefile.in (depcomp): Add "..".
204 (all_deps_files): New and use it.
205
2062018-04-18 Alan Hayward <alan.hayward@arm.com>
207
208 * configure.srv (aarch64*-*-linux*): Don't include xml.
209 (i[34567]86-*-cygwin*): Likewise.
210 (i[34567]86-*-linux*): Likewise.
211 (i[34567]86-*-lynxos*): Likewise.
212 (i[34567]86-*-mingw32ce*): Likewise.
213 (i[34567]86-*-mingw*): Likewise.
214 (i[34567]86-*-nto*): Likewise.
215 (tic6x-*-uclinux): Likewise.
216 (x86_64-*-linux*): Likewise.
217 (x86_64-*-mingw*): Likewise.
218 (x86_64-*-cygwin*): Likewise.
219
2202018-04-18 Alan Hayward <alan.hayward@arm.com>
221
222 * tdesc.c: Remove xml parameter.
223
2242018-04-18 Alan Hayward <alan.hayward@arm.com>
225
226 * server.c (get_features_xml): Remove cast.
227 * tdesc.c (void target_desc::accept): Fill in function.
228 (tdesc_get_features_xml): Remove old xml creation.
229 (print_xml_feature::visit_pre): Add xml vistor.
230 * tdesc.h (struct target_desc): Make xmltarget mutable.
231 (tdesc_get_features_xml): Remove declaration.
232
2332018-04-18 Alan Hayward <alan.hayward@arm.com>
234
235 * tdesc.c (tdesc_architecture_name): Add new function.
236 (tdesc_osabi_name): Likewise.
237 (tdesc_get_features_xml): Use new functions.
238
2392018-04-18 Alan Hayward <alan.hayward@arm.com>
240
241 * tdesc.c (tdesc_create_flags): Remove.
242 (tdesc_add_flag): Likewise.
243 (tdesc_named_type): Likewise.
244 (tdesc_create_union): Likewise.
245 (tdesc_create_struct): Likewise.
246 (tdesc_create_vector): Likewise.
247 (tdesc_add_bitfield): Likewise.
248 (tdesc_add_field): Likewise.
249 (tdesc_set_struct_size): Likewise.
250
2512018-04-18 Alan Hayward <alan.hayward@arm.com>
252
253 * tdesc.c (~target_desc): Remove implictly deleted items.
254 (init_target_desc): Iterate all features.
255 (tdesc_get_features_xml): Use vector.
256 (tdesc_create_feature): Create feature.
257 * tdesc.h (tdesc_feature) Remove
258 (target_desc): Add features.
259
2602018-04-18 Alan Hayward <alan.hayward@arm.com>
261
262 * Makefile.in: Add common/tdesc.c
263 * tdesc.c (init_target_desc): init all reg_defs from register
264 vector.
265 (tdesc_create_reg): Create tdesc_reg.
266 * tdesc.h (tdesc_feature): Add register vector.
267
2682018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
269
270 * tdesc.h (struct target_desc) <features>: Change type to
271 std::vector<std::string>.
272 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
273 changes.
274 (tdesc_get_features_xml): Likewise.
275 (tdesc_create_feature): Likewise.
276
2772018-03-26 Alan Hayward <alan.hayward@arm.com>
278
279 * regcache.c (find_register_by_number): Return a ref.
280 (find_regno): Use references.
281 (register_size): Likewise.
282 (register_data): Likewise.
283 * tdesc.c (target_desc::~target_desc): Remove free calls.
284 (target_desc::operator==): Use std::vector compare.
285 (init_target_desc): Use reference.
286 (tdesc_create_reg): Use reg constructors.
287 * tdesc.h (struct target_desc): Replace pointer with object.
288
2892018-03-23 Alan Hayward <alan.hayward@arm.com>
290
291 * regcache.c (find_register_by_number): Make static.
292 (find_regno): Use find_register_by_number
293 * regcache.h (struct reg): Remove declaration.
294
2952018-03-23 Alan Hayward <alan.hayward@arm.com>
296
297 * tdesc.c (target_desc::~target_desc): Move to here.
298 (target_desc::operator==): Likewise.
299 * tdesc.h (target_desc::~target_desc): Move from here.
300 (target_desc::operator==): Likewise.
301
3022018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
303
304 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
305
3062018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
307
308 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
309 S390_TDESC_GS.
310 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
311 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
312 and init_registers_s390_gs_linux64.
313
3142018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
315
316 * linux-s390-low.c (s390_fill_gs): Remove function.
317 (s390_fill_gsbc): Remove function.
318 (s390_regsets): Set fill functions for the guarded storage regsets
319 to NULL.
320
3212018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
322
323 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
324 the word size. Add comment.
325 (s390_get_wordsize): New function.
326 (s390_arch_setup): No longer select a temporary tdesc to fetch the
327 pswm with it. Instead, use s390_get_wordsize to determine the
328 word size first and derive the correct tdesc from that directly.
329
3302018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * Makefile.in: Include silent-rules.mk.
333 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
334 (COMPILE): Add ECHO_CXX.
335 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
336 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
337 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
338 (version-generated.c): Add ECHO_GEN.
339 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
340 (IPAGENT_COMPILE): Add ECHO_CXX.
341 (%-generated.c): Add ECHO_REGDAT.
342
3432018-03-14 Tom Tromey <tom@tromey.com>
344
345 PR cli/14977:
346 * ax.c (ax_printf): Special case for NULL.
347
3482018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
349
350 * linux-low.c (linux_qxfer_libraries_svr4): Use
351 xml_escape_text_append.
352
3532018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
356
3572018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * server.c (handle_general_set): Remove unnecessary xstrdup.
360
3612018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * server.c (parse_debug_format_options): Adjust to
364 delim_string_to_char_ptr_vec changes.
365 * thread-db.c (thread_db_load_search): Adjust to
366 dirnames_to_char_ptr_vec changes.
367
3682018-03-01 Markus Metzger <markus.t.metzger@intel.com>
369
370 * target.h (target_enable_btrace, target_disable_btrace)
371 (target_read_btrace, target_read_btrace_conf): Turn macro into
372 inline function. Throw error if target method is not defined.
373 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
374 check for btrace target method. Be prepared to handle exceptions
375 from btrace target methods.
376
3772018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
378
379 * server.c (captured_main): Change order of error message printed
380 when the current working directory cannot be found.
381
3822018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
383
384 * server.c: Include "filenames.h" and "pathstuff.h".
385 (program_name): Delete variable.
386 (program_path): New anonymous class.
387 (get_exec_wrapper): Use "program_path" instead of
388 "program_name".
389 (handle_v_run): Likewise.
390 (captured_main): Likewise.
391 (process_serial_event): Likewise.
392
3932018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
394
395 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
396 (OBJS): Add "pathstuff.o".
397 * server.c (current_directory): New global variable.
398 (captured_main): Initialize "current_directory".
399
4002018-02-26 Alan Hayward <alan.hayward@arm.com>
401
402 * tdesc.c: Use common/tdesc.h.
403 * tdesc.h: Likewise.
404
4052018-02-20 Alan Hayward <alan.hayward@arm.com>
406 Simon Marchi <simon.marchi@ericsson.com>
407
408 * Makefile.in: Switch order of make rules.
409
4102018-02-19 Alan Hayward <alan.hayward@arm.com>
411
412 * Makefile.in: Add common directory in build.
413 * configure.ac: Add common reference.
414 * configure: Regenerate.
415
4162018-02-09 Markus Metzger <markus.t.metzger@intel.com>
417
418 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
419 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
420 * spu-low.c (spu_target_ops): Likewise.
421 * win32-low.c (win32_target_ops): Likewise.
422 * server.c (supported_btrace_packets): Report packets unconditionally.
423 * target.h (target_ops) <supports_btrace>: Remove.
424 (target_supports_btrace): Remove.
425
4262018-02-09 Markus Metzger <markus.t.metzger@intel.com>
427
428 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
429 (handle_btrace_disable): Change return type to void. Use exceptions
430 to report errors.
431 (handle_btrace_general_set): Catch exception and copy message to
432 return message.
433
4342018-02-08 Tom Tromey <tom@tromey.com>
435
436 * linux-low.c (install_software_single_step_breakpoints): Use
437 make_scoped_restore.
438 * inferiors.c (make_cleanup_restore_current_thread): Remove.
439 (do_restore_current_thread_cleanup): Remove.
440 * gdbthread.h (make_cleanup_restore_current_thread): Don't
441 declare.
442
4432018-02-08 Tom Tromey <tom@tromey.com>
444
445 * mem-break.c (set_raw_breakpoint_at): Use
446 gdb::unique_xmalloc_ptr.
447
4482018-01-30 Pedro Alves <palves@redhat.com>
449
450 PR gdb/13211
451 * target.c (target_terminal::terminal_state): Rename to ...
452 (target_terminal::m_terminal_state): ... this.
453
4542018-01-19 James Clarke <jrtc27@jrtc27.com>
455
456 * linux-low.c (handle_extended_wait): Surround call to
457 thread_db_notice_clone with #ifdef USE_THREAD_DB.
458
4592018-01-17 Simon Marchi <simon.marchi@ericsson.com>
460
461 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
462 linux_ptrace_attach_fail_reason_string now returning an
463 std::string.
464 (linux_attach): Likewise.
465 * thread-db.c (attach_thread): Likewise.
466
4672018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
468
469 PR gdb/21559
470 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
471 checking for fs_base/gs_base fields in struct user_regs_struct.
472 * configure: Regenerate.
473
4742018-01-16 Yao Qi <yao.qi@linaro.org>
475
476 PR gdb/18749
477 * linux-low.c (fetch_register): Call supply_register instead of
478 error.
479
4802018-01-08 Yao Qi <yao.qi@linaro.org>
481 Simon Marchi <simon.marchi@ericsson.com>
482
483 * Makefile.in (OBS): Remove selftest.o.
484 * configure.ac: Set srv_selftest_objs if $development is true.
485 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
486 * configure: Re-generated.
487 * server.c (captured_main): Wrap variable selftest_filter with
488 GDB_SELF_TEST.
489
4902018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * server.c (parse_debug_format_options): Return std::string.
493 (handle_monitor_command, captured_main): Adjust.
494
4952018-01-05 Pedro Alves <palves@redhat.com>
496
497 PR gdb/18653
498 * server.c (captured_main): Pass quiet=false to
499 save_original_signals_state.
500
5012018-01-01 Joel Brobecker <brobecker@adacore.com>
502
503 * gdbreplay.c (gdbreplay_version): Update copyright year in
504 version message.
505 * server.c (gdbserver_version): Likewise.
506
5072017-12-08 Tom Tromey <tom@tromey.com>
508
509 * ax.c (ax_printf): Update.
510
5112017-12-07 Yao Qi <yao.qi@linaro.org>
512
513 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
514 aarch64_linux_read_description.
515 * linux-amd64-ipa.c (idx2mask): New array.
516 (get_ipa_tdesc): Move idx2mask out.
517 (initialize_low_tracepoint): Initialize target descriptions.
518 * linux-i386-ipa.c (idx2mask): New array.
519 (get_ipa_tdesc): Move idx2mask out.
520 (initialize_low_tracepoint): Initialize target descriptions.
521
5222017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
523
524 * tdesc.c (struct tdesc_type): Change return type.
525 (tdesc_add_flag): Change parameter type.
526 (tdesc_add_bitfield): Likewise.
527 (tdesc_add_field): Likewise.
528 (tdesc_set_struct_size): Likewise.
529
5302017-12-05 Simon Marchi <simon.marchi@ericsson.com>
531
532 * regcache.c (registers_to_string): Remove unused variable.
533
5342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
535
536 * inferiors.c (for_each_inferior_with_data): Remove.
537 * inferiors.h (for_each_inferior_with_data): Remove.
538 * server.c (handle_qxfer_threads_worker): Change parameter type.
539 (handle_qxfer_threads_proper): Use for_each_thread.
540
5412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * inferiors.c (for_each_inferior): Remove.
544 (clear_inferiors): Use for_each_thread.
545 * inferiors.h (for_each_inferior): Remove.
546 * linux-low.c (linux_wait_for_event_filtered): Use
547 for_each_thread.
548 (linux_stabilize_threads): Likewise.
549 * regcache.c (regcache_release): Likewise.
550 * server.c (gdb_wants_all_threads_stopped): Likewise.
551 (clear_pending_status_callback): Remove.
552 (handle_status): Use for_each_thread.
553 (captured_main): Likewise.
554 * win32-low.c (child_init_thread_list): Likewise.
555 (win32_clear_inferiors): Likewise.
556 (fake_breakpoint_event): Likewise.
557
5582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * inferiors.h (find_inferior): Remove.
561 * inferiors.c (find_inferior): Remove.
562
5632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * linux-low.c (resume_status_pending_p): Update comment.
566 (need_step_over_p): Update comment.
567
5682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * linux-low.c (proceed_one_lwp): Return void, change parameter
571 type.
572 (unsuspend_and_proceed_one_lwp): Likewise.
573 (proceed_all_lwps): Use for_each_thread.
574 (unstop_all_lwps): Likewise.
575
5762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * linux-low.c (linux_resume_one_thread): Return void, take
579 parameter directly.
580 (linux_resume): Use for_each_thread.
581
5822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-low.c (send_sigstop_callback): Return void, change
585 parameter type. Rename to...
586 (send_sigstop): ... this.
587 (suspend_and_send_sigstop_callback): Return void, change parameter
588 type. Rename to...
589 (suspend_and_send_sigstop): ... this.
590 (stop_all_lwps): Use for_each_thread.
591
5922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * linux-low.c (lwp_running): Return bool, remove unused
595 argument.
596 (linux_stabilize_threads): Use find_thread.
597
5982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
599
600 * linux-low.c (select_singlestep_lwp_callback): Remove.
601 (count_events_callback): Remove.
602 (select_event_lwp_callback): Remove.
603 (select_event_lwp): Use find_thread/for_each_thread.
604
6052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
606
607 * linux-low.c (not_stopped_callback): Return bool, take filter
608 argument directly.
609 (linux_wait_for_event_filtered): Use find_thread.
610 (linux_wait_1): Likewise.
611
6122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * linux-low.c (same_lwp): Remove.
615 (find_lwp_pid): Use find_thread.
616
6172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
618
619 * linux-low.c (delete_lwp_callback): Remove.
620 (linux_mourn): Use for_each_thread.
621
6222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
623
624 * linux-low.c (linux_detach_lwp_callback): Return void, remove
625 args parameter, don't check for pid.
626 (linux_detach): Use for_each_thread.
627
6282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
629
630 * linux-low.c (struct counter): Remove.
631 (second_thread_of_pid_p): Remove.
632 (last_thread_of_process_p): Use find_thread.
633
6342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * inferiors.c (find_inferior_in_random): Remove.
637 * inferiors.h (find_inferior_in_random): Remove.
638 * linux-low.c (status_pending_p_callback): Return bool, accept
639 parameter ptid directly.
640 (linux_wait_for_event_filtered): Use find_thread_in_random.
641 (linux_wait_1): Likewise.
642
6432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
644
645 * inferiors.c (find_inferior_id): Remove.
646 (find_thread_ptid): Move implemention from find_inferior_id to
647 here.
648 * inferiors.h (find_inferior_id): Remove.
649 * server.c (handle_status): Use find_thread_ptid.
650 (process_serial_event): Likewise.
651 * thread-db.c (find_one_thread): Likewise.
652 (thread_db_thread_handle): Likewise.
653 * win32-low.c (thread_rec): Likewise.
654 (child_delete_thread): Likewise.
655 (win32_thread_alive): Likewise.
656 (get_child_debug_event): Likewise.
657
6582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
659
660 * linux-mips-low.c (update_watch_registers_callback): Return
661 void, remove pid_p parameter, don't check for pid.
662 (mips_insert_point, mips_remove_point): Use for_each_thread.
663
6642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
665
666 * lynx.low (lynx_delete_thread_callback): Remove.
667 (lynx_mourn): Use for_each_thread.
668
6692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * regcache.c (regcache_invalidate_one): Remove.
672 (regcache_invalidate_pid): use for_each_thread.
673
6742017-11-26 Tom Tromey <tom@tromey.com>
675
676 * linux-low.c (linux_create_inferior): Update.
677
6782017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
679
680 * spu-low.c (spu_create_inferior): Fix typo in argument name.
681
6822017-11-24 Alan Hayward <alan.hayward@arm.com>
683
684 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
685 * linux-aarch64-low.c (initialize_low_arch): Call init func.
686 * linux-aarch64-tdesc-selftest.c: New file.
687 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
688
6892017-11-24 Alan Hayward <alan.hayward@arm.com>
690
691 * configure.srv: Add new file.
692 * linux-aarch64-low.c (initialize_low_arch): Call init func.
693 * linux-aarch64-tdesc-selftest.c: New file.
694 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
695
6962017-11-24 Alan Hayward <alan.hayward@arm.com>
697
698 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
699 * linux-aarch64-low.c (initialize_low_arch): Remove init.
700 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
701
7022017-11-24 Alan Hayward <alan.hayward@arm.com>
703
704 * configure.srv: Add new files.
705 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
706 aarch64_linux_read_description.
707 * linux-aarch64-low.c (aarch64_linux_read_description):
708 Merge with aarch64_arch_setup.
709 (aarch64_arch_setup): Call aarch64_linux_read_description.
710 * linux-aarch64-tdesc.c: New file.
711 * linux-aarch64-tdesc.h: New file.
712
7132017-11-24 Yao Qi <yao.qi@linaro.org>
714
715 * configure.srv: Set $srv_regobj for tic6x-linux.
716 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
717 (tic6x_read_description): Move some code to tic6x_arch_setup.
718 (tic6x_tdesc_test): New function.
719 (initialize_low_arch): Call selftests::register_test.
720
7212017-11-22 Yao Qi <yao.qi@linaro.org>
722
723 * remote-utils.c (prepare_resume_reply): Use memcpy.
724
7252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
726
727 * linux-low.c (kill_one_lwp_callback): Return void, take
728 argument directly, don't filter on pid.
729 (linux_kill): Use for_each_thread.
730
7312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
732
733 * linux-low.c (need_step_over_p): Return bool, remove dummy
734 argument.
735 (linux_resume, proceed_all_lwps): Use find_thread.
736
7372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
738
739 * linux-low.c (resume_status_pending_p): Return bool, remove
740 flag_p argument.
741 (linux_resume): Use find_thread.
742
7432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
744
745 * linux-low.c (struct thread_resume_array): Remove.
746 (linux_set_resume_request): Return void, take arguments
747 directly.
748 (linux_resume): Use for_each_thread.
749
7502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
751
752 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
753 return bool, remove data argument.
754 (linux_stabilize_threads): Use find_thread.
755
7562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
757
758 * linux-low.c (unsuspend_one_lwp): Remove.
759 (unsuspend_all_lwps): Use for_each_thread, inline code from
760 unsuspend_one_lwp.
761
7622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
763
764 * gdbthread.h (find_thread): Add overload with ptid_t filter.
765 * linux-low.c (struct iterate_over_lwps_args): Remove.
766 (iterate_over_lwps_filter): Remove.
767 (iterate_over_lwps): Use find_thread.
768
7692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
770
771 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
772 (linux_handle_new_gdb_connection): Use for_each_thread, inline
773 code from reset_lwp_ptrace_options_callback.
774
7752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
776
777 * linux-arm-low.c (struct update_registers_data): Remove.
778 (update_registers_callback): Return void, take arguments
779 directly, don't check thread's pid.
780 (arm_insert_point, arm_remove_point): Use for_each_thread.
781
7822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
783
784 * win32-low.c (continue_one_thread): Return void, take argument
785 directly.
786 (child_continue): Use for_each_thread.
787
7882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
789
790 * win32-i386-low.c (update_debug_registers_callback): Rename
791 to ...
792 (update_debug_registers): ... this, return void, remove pid_p arg.
793 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
794
7952017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
796
797 * inferiors.h (struct process_info): Add constructor, initialize
798 fields..
799 <syscalls_to_catch>: Change type to std::vector<int>.
800 * inferiors.c (add_process): Allocate process_info with new.
801 (remove_process): Free process_info with delete.
802 * linux-low.c (handle_extended_wait): Adjust.
803 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
804 * server.c (handle_general_set): Adjust.
805
8062017-11-16 Pedro Alves <palves@redhat.com>
807
808 * remote-utils.c (remote_close): Block SIGIO signals instead of
809 uninstalling the SIGIO handler.
810
8112017-11-16 Alan Hayward <alan.hayward@arm.com>
812
813 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
814
8152017-11-16 Yao Qi <yao.qi@linaro.org>
816
817 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
818 (tic6x_store_gregset): Likewise.
819 (tic6x_usrregs_info): Move it up.
820
8212017-11-15 Alan Hayward <alan.hayward@arm.com>
822
823 * Makefile.in: Update arch rules.
824 * configure.srv: Explicitly mark arch/ files.
825
8262017-11-13 Andreas Schwab <schwab@suse.de>
827
828 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
829 function.
830 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
831
8322017-11-06 Pedro Alves <palves@redhat.com>
833
834 * config.in, configure: Regenerate.
835
8362017-10-27 Simon Marchi <simon.marchi@ericsson.com>
837
838 * target.c (struct thread_search): Remove.
839 (thread_search_callback): Remove.
840 (prepare_to_access_memory): Use for_each_thread instead of
841 find_inferior. Inline code from thread_search_callback.
842
8432017-10-27 Simon Marchi <simon.marchi@ericsson.com>
844
845 * server.c (struct visit_actioned_threads_data): Remove.
846 (visit_actioned_threads): Change prototype to take arguments
847 directly.
848 (resume): Use find_thread instead of find_inferior.
849
8502017-10-27 Simon Marchi <simon.marchi@ericsson.com>
851
852 * server.c (queue_stop_reply_callback): Change prototype, return
853 void.
854 (find_status_pending_thread_callback): Remove.
855 (handle_status): Replace find_inferior with find_thread and
856 for_each_thread.
857
8582017-10-25 Alan Hayward <alan.hayward@arm.com>
859
860 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
861 with REGNO.
862 (aarch64_store_gregset): Likewise.
863 (aarch64_fill_fpregset): Likewise.
864 (aarch64_store_fpregset): Likewise.
865
8662017-10-21 Simon Marchi <simon.marchi@ericsson.com>
867
868 * gdbthread.h (find_thread, for_each_thread): New functions.
869 * inferiors.c (thread_of_pid): Remove.
870 (find_any_thread_of_pid): Use find_thread.
871 * linux-low.c (num_lwps): Use for_each_thread.
872
8732017-10-17 Yao Qi <yao.qi@linaro.org>
874
875 * Makefile.in: Remove one rule.
876 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
877
8782017-10-17 Yao Qi <yao.qi@linaro.org>
879
880 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
881 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
882
8832017-10-17 Yao Qi <yao.qi@linaro.org>
884
885 * configure.srv: Rename arm.o with arch/arm.o.
886
8872017-10-17 Yao Qi <yao.qi@linaro.org>
888
889 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
890 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
891 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
892 (arch-i386.o, arch-amd64.o): Remove rules.
893 (arch/%.o): New rule.
894 Update POSTCOMPILE and COMPILE.pre.
895 * configure.ac: Invoke AC_CONFIG_COMMANDS.
896 * configure: Re-generated.
897 * configure.srv: Replace arch-i386.o with arch/i386.o.
898 Replace arch-amd64.o with arch/amd64.o.
899
9002017-10-16 Yao Qi <yao.qi@linaro.org>
901
902 * configure: Regenerated.
903
9042017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * inferiors.h: (struct inferior_list): Remove.
907 (struct inferior_list_entry); Remove.
908 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
909 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
910 get_first_inferior): Remove.
911 (for_each_inferior, for_each_inferior_with_data, find_inferior,
912 find_inferior_id, find_inferior_in_random): Change signature.
913 * inferiors.c (all_threads): Change type to
914 std::list<thread_info *>.
915 (get_thread): Remove macro.
916 (find_inferior, find_inferior_id): Change signature, implement
917 using find_thread.
918 (find_inferior_in_random): Change signature, implement using
919 find_thread_in_random.
920 (for_each_inferior, for_each_inferior_with_data): Change
921 signature, implement using for_each_thread.
922 (add_inferior_to_list, remove_inferior): Remove.
923 (add_thread, get_first_thread, thread_of_pid,
924 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
925 (get_first_inferior, one_inferior_p, clear_inferior_list):
926 Remove.
927 (clear_inferiors, get_thread_process): Update.
928 * gdbthread.h: Include <list>.
929 (struct thread_info) <entry>: Remove field.
930 <id>: New field.
931 (all_threads): Change type to std::list<thread_info *>.
932 (get_first_inferior): Add doc.
933 (find_thread, for_each_thread, find_thread_in_random): New
934 functions.
935 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
936 * linux-arm-low.c (update_registers_callback): Update.
937 * linux-low.c (second_thread_of_pid_p): Update.
938 (kill_one_lwp_callback, linux_detach_lwp_callback,
939 delete_lwp_callback, status_pending_p_callback, same_lwp,
940 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
941 iterate_over_lwps, not_stopped_callback,
942 resume_stopped_resumed_lwps, count_events_callback,
943 select_singlestep_lwp_callback, select_event_lwp_callback,
944 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
945 suspend_and_send_sigstop_callback, wait_for_sigstop,
946 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
947 lwp_running, linux_set_resume_request, resume_status_pending_p,
948 need_step_over_p, start_step_over, linux_resume_one_thread,
949 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
950 reset_lwp_ptrace_options_callback): Update.
951 * linux-mips-low.c (update_watch_registers_callback): Update.
952 * regcache.c (regcache_invalidate_one, regcache_invalidate):
953 Update.
954 (free_register_cache_thread_one): Remove.
955 (regcache_release): Update.
956 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
957 handle_qxfer_threads_worker): Update.
958 (handle_query): Update, use list iterator.
959 (visit_actioned_threads, handle_pending_status,
960 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
961 clear_pending_status_callback, set_pending_status_callback,
962 find_status_pending_thread_callback, handle_status,
963 process_serial_event): Update.
964 * target.c (thread_search_callback): Update.
965 * thread-db.c (thread_db_get_tls_address): Update.
966 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
967 Update.
968 * win32-i386-low.c (update_debug_registers_callback): Update.
969 * win32-low.c (delete_thread_info, child_delete_thread,
970 continue_one_thread, suspend_one_thread,
971 get_child_debug_event): Adjust.
972
9732017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
974
975 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
976 * inferiors.h: Include <list>.
977 (struct process_info) <entry>: Remove field.
978 <pid>: New field.
979 (pid_of): Change macro to function.
980 (ptid_of, lwpid_of): Remove macro.
981 (all_processes): Change type to std::list<process_info *>.
982 (ALL_PROCESSES): Remove macro.
983 (for_each_process, find_process): New function.
984 * inferiors.c (all_processes): Change type to
985 std::list<process_info *>.
986 (find_thread_process): Adjust.
987 (add_process): Likewise.
988 (remove_process): Likewise.
989 (find_process_pid): Likewise.
990 (get_first_process): Likewise.
991 (started_inferior_callback): Remove.
992 (have_started_inferiors_p): Adjust.
993 (attached_inferior_callback): Remove.
994 (have_attached_inferiors_p): Adjust.
995 * linux-low.c (check_zombie_leaders): Likewise.
996 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
997 (x86_linux_update_xmltarget): Adjust.
998 * server.c (handle_query): Likewise.
999 (gdb_reattached_process): Remove.
1000 (handle_status): Adjust.
1001 (kill_inferior_callback): Likewise.
1002 (detach_or_kill_inferior): Remove.
1003 (print_started_pid): Likewise.
1004 (print_attached_pid): Likewise.
1005 (detach_or_kill_for_exit): Update.
1006 (process_serial_event): Likewise.
1007 * linux-arm-low.c (arm_new_fork): Likewise.
1008
10092017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * dll.h: Include <list>.
1012 (struct dll_info): Add constructor.
1013 <entry>: Remove field.
1014 (all_dlls): Change type to std::list<dll_info>.
1015 * dll.c: Include <algorithm>.
1016 (get_dll): Remove macro.
1017 (all_dlls): Change type to std::list<dll_info *>.
1018 (free_one_dll): Remove.
1019 (match_dll): Likewise.
1020 (loaded_dll): Adjust.
1021 (unloaded_dll): Adjust to all_dlls type change, use
1022 std::find_if. Inline code from match_dll.
1023 (clear_dlls): Adjust to all_dlls type change.
1024 * server.c (emit_dll_description): Remove.
1025 (handle_qxfer_libraries): Adjust to all_dlls type change,
1026 integrate emit_dll_description's functionality.
1027
10282017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * linux-low.h (struct linux_target_ops) <delete_process>: New
1031 field.
1032 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1033 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1034 (struct linux_target_ops): Add delete_process callback.
1035 * linux-arm-low.c (arm_delete_process): New.
1036 (struct linux_target_ops): Add delete_process callback.
1037 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1038 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1039 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1040 * linux-mips-low.c (mips_linux_delete_process): New.
1041 (struct linux_target_ops): Add delete_process callback.
1042 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1043 * linux-s390-low.c (struct linux_target_ops): Likewise.
1044 * linux-sh-low.c (struct linux_target_ops): Likewise.
1045 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1046 * linux-tile-low.c (struct linux_target_ops): Likewise.
1047 * linux-x86-low.c (x86_linux_delete_process): New.
1048 (struct linux_target_ops): Add delete_process callback.
1049 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1050
10512017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1052
1053 * linux-aarch64-low.c (the_low_target): Add thread delete
1054 callback.
1055 * linux-arm-low.c (arm_delete_thread): New function.
1056 (the_low_target): Add thread delete callback.
1057 * linux-bfin-low.c (the_low_target): Likewise.
1058 * linux-crisv32-low.c (the_low_target): Likewise.
1059 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1060 set.
1061 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1062 field.
1063 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1064 * linux-mips-low.c (mips_linux_delete_thread): New function.
1065 (the_low_target): Add thread delete callback.
1066 * linux-ppc-low.c (the_low_target): Likewise.
1067 * linux-s390-low.c (the_low_target): Likewise.
1068 * linux-sh-low.c (the_low_target): Likewise.
1069 * linux-tic6x-low.c (the_low_target): Likewise.
1070 * linux-tile-low.c (the_low_target): Likewise.
1071 * linux-x86-low.c (the_low_target): Likewise.
1072 * linux-xtensa-low.c (the_low_target): Likewise.
1073
10742017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1075
1076 * win32-low.c: Include "common-inferior.h".
1077
10782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1079
1080 * inferiors.c (set_inferior_cwd): New function.
1081 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1082 (handle_query): Inform that QSetWorkingDir is supported.
1083 * win32-low.c (create_process): Pass the inferior's cwd to
1084 CreateProcess.
1085
10862017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1087
1088 * inferiors.c (current_inferior_cwd): New global variable.
1089 (get_inferior_cwd): New function.
1090 * inferiors.h (struct process_info) <cwd>: New field.
1091
10922017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1093
1094 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1095 (OBS): Add gdb_tilde_expand.o.
1096
10972017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1098
1099 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1100 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1101
11022017-09-29 Pedro Alves <palves@redhat.com>
1103
1104 * ax.c (gdb_parse_agent_expr): Constify.
1105 * ax.h (gdb_parse_agent_expr): Constify.
1106 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1107 Constify.
1108 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1109 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1110 * remote-utils.h (read_ptid): Constify.
1111 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1112 (process_point_options, process_serial_event): Constify.
1113 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1114 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1115 (cmd_qtbuffer): Constify.
1116
11172017-09-29 Pedro Alves <palves@redhat.com>
1118
1119 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1120 fails.
1121
11222017-09-29 Pedro Alves <palves@redhat.com>
1123
1124 * linux-low.c (handle_extended_wait): Pass parent thread instead
1125 of process to thread_db_notice_clone.
1126 * linux-low.h (thread_db_notice_clone): Replace parent process
1127 parameter with parent thread parameter.
1128 * thread-db.c (find_one_thread): Add comment.
1129 (thread_db_notice_clone): Replace parent process parameter with
1130 parent thread parameter. Temporarily switch to the parent thread.
1131
11322017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1133
1134 * gdbthread.h: Include "common-gdbthread.h".
1135 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1136 "if" when validating the ptid.
1137 * remote-utils.c: Include "gdbthread.h".
1138 (prepare_resume_reply): Use "switch_to_thread".
1139 * target.c (done_accessing_memory): Likewise.
1140
11412017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1142
1143 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1144 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1145 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1146 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1147 s390x-gs-linux64-ipa.o to ipa_obj.
1148 * linux-s390-low.c (HWCAP_S390_GS): New define.
1149 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1150 New functions.
1151 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1152 (s390_arch_setup): Check for guarded-storage support and choose
1153 appropriate tdesc.
1154 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1155 init_registers_s390x_gs_linux64.
1156 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1157 enum value.
1158 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1159 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1160
11612017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1164
11652017-09-21 Kevin Buettner <kevinb@redhat.com>
1166
1167 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1168 (thread_db_thread_handle): Declare.
1169 * linux-low.c (linux_target_ops): Initialize thread_handle.
1170 * server.c (handle_qxfer_threads_worker): Add support for
1171 "handle" attribute.
1172 * target.h (struct target_ops): Add new function pointer,
1173 thread_handle.
1174 (target_thread_handle): Define.
1175 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1176 field in lwp.
1177 (thread_db_thread_handle): New function.
1178
11792017-09-21 Kevin Buettner <kevinb@redhat.com>
1180
1181 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1182 * linux-low.h (thread_db_notice_clone): Declare.
1183 * thread-db.c (thread_db_notice_clone): New function.
1184
11852017-09-21 Pedro Alves <palves@redhat.com>
1186
1187 * server.c (gdb_read_memory, handle_status, process_serial_event)
1188 (handle_serial_event, handle_target_event): Adjust to
1189 set_desired_thread prototype change.
1190 * target.c (set_desired_thread): Remove 'use_general' parameter
1191 and adjust.
1192 * target.h (set_desired_thread): Remove 'use_general' parameter.
1193
11942017-09-20 Tom Tromey <tom@tromey.com>
1195
1196 * target.c (target_terminal::terminal_state): Define.
1197 (target_terminal::init): Rename from target_terminal_init.
1198 (target_terminal::inferior): Rename from
1199 target_terminal_inferior.
1200 (target_terminal::ours): Rename from target_terminal_ours.
1201 (target_terminal::ours_for_output, target_terminal::info): New.
1202
12032017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1204
1205 * server.c (accumulate_file_name_length): Remove.
1206 (emit_dll_description): Adjust to std::string change.
1207 (handle_qxfer_libraries): Use std::string to hold document.
1208
12092017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1212 return type of xml_escape_text.
1213 * server.c (emit_dll_description): Likewise.
1214
12152017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1216
1217 * server.c (captured_main): Accept argument for --selftest.
1218 Update run_tests call.
1219 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1220 when registering selftests.
1221
12222017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1223
1224 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1225 instead of "VEC" for "target_desc.reg_defs".
1226 (regcache_cpy): Likewise.
1227 (registers_to_string): Likewise.
1228 (registers_from_string): Likewise.
1229 (find_regno): Likewise.
1230 (supply_regblock): Likewise.
1231 (regcache_raw_read_unsigned): Likewise.
1232 * tdesc.c (init_target_desc): Likewise.
1233 (tdesc_create_reg): Likewise.
1234 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1235 (struct target_desc) <reg_defs>: Convert to "std::vector".
1236 (target_desc): Do not initialize "reg_defs".
1237 (~target_desc): Update code to use "std::vector" instead of "VEC"
1238 for "target_desc.reg_defs".
1239 (operator==): Likewise.
1240
12412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1242
1243 * inferiors.h (thread_to_gdb_id): Remove.
1244 * inferiors.c (thread_to_gdb_id): Remove.
1245 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1246 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1247 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1248 Likewise.
1249 * nto-low.c (nto_fetch_registers, nto_store_registers,
1250 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1251
12522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1253
1254 * inferiors.h (gdb_id_to_thread_id): Remove.
1255 * inferiors.c (gdb_id_to_thread_id): Remove.
1256 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1257 removal. Move pid declaration closer to where it's used.
1258
12592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1260
1261 * server.c (handle_detach): New function.
1262 (process_serial_event): Move code out, call handle_detach.
1263
12642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1265
1266 * server.c (require_running): Rename to ...
1267 (require_running_or_return): ... this ...
1268 (require_running_or_break): ... and this.
1269 (handle_query, process_serial_event): Adjust.
1270
12712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * linux-low.c (linux_set_resume_request): Remove unused
1274 variables.
1275
12762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1277
1278 * server.c (first_thread_of): Remove.
1279 (process_serial_event): Replace usage of first_thread_of with
1280 find_any_thread_of_pid.
1281 * tracepoint.c (same_process_p): Remove.
1282 (gdb_agent_about_to_close): Replace usage of same_process_p with
1283 find_any_thread_of_pid.
1284 * linux-x86-low.c (same_process_callback): Remove.
1285 (x86_arch_setup_process_callback): Replace usage of
1286 same_process_callback with find_any_thread_of_pid.
1287 * thread-db.c (any_thread_of): Remove.
1288 (switch_to_process): Replace usage of any_thread_of with
1289 find_any_thread_of_pid.
1290 * inferiors.c (thread_pid_matches_callback): Remove.
1291 (find_thread_process): Adjust to use find_any_thread_of_pid.
1292
12932017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1294
1295 * regcache.c (get_thread_regcache): Guard calls to "memset"
1296 with "!VEC_empty".
1297
12982017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1299
1300 * linux-low.c (handle_extended_wait): Use
1301 "allocate_target_description" instead of "XNEW".
1302 * linux-x86-low.c (initialize_low_arch): Likewise.
1303
13042017-09-05 Yao Qi <yao.qi@linaro.org>
1305
1306 * configure.srv (srv_i386_regobj): Remove.
1307 (srv_amd64_regobj): Remove.
1308 (srv_regobj): Set it to "" for x86 non-linux targets.
1309 * linux-x86-tdesc.c (i386_linux_read_description):
1310 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1311 (init_registers_i386): Remove the declaration.
1312 (tdesc_i386): Remove the declaration.
1313 (lynx_i386_arch_setup): Call i386_create_target_description.
1314 * nto-x86-low.c: Likewise.
1315 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1316 [!__x86_64__]: include arch/i386.h.
1317 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1318
13192017-09-05 Yao Qi <yao.qi@linaro.org>
1320
1321 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1322 i386/amd64-XXX-linux from it.
1323
13242017-09-05 Yao Qi <yao.qi@linaro.org>
1325
1326 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1327 false.
1328 (ipa_amd64_linux_regobj): Remove.
1329 (ipa_x32_linux_regobj): Remove.
1330
13312017-09-05 Yao Qi <yao.qi@linaro.org>
1332
1333 * Makefile.in (arch-amd64.o): New rule.
1334 * configure.srv: Append arch-amd64.o.
1335 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1336 (get_ipa_tdesc): Call amd64_linux_read_description.
1337 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1338 and init_registers_amd64_XXX.
1339 * linux-x86-low.c (x86_linux_read_description): Call
1340 amd64_linux_read_description.
1341 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1342 (initialize_low_arch): Don't call init_registers_x32_XXX and
1343 init_registers_amd64_XXX.
1344 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1345 and tdesc_amd64_XXX.
1346 [__x86_64__] (amd64_tdesc_test): New function.
1347 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1348 and init_registers_amd64_XXX.
1349 * linux-x86-tdesc.c: Include arch/amd64.h.
1350 (xcr0_to_tdesc_idx): New function.
1351 (i386_linux_read_description): New function.
1352 (amd64_get_ipa_tdesc_idx): New function.
1353 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1354 (amd64_get_ipa_tdesc): Declare.
1355
13562017-09-05 Yao Qi <yao.qi@linaro.org>
1357
1358 * configure.srv (srv_i386_linux_xmlfiles): Remove
1359 i386/i386-XXX-linux.xml from it.
1360
13612017-09-05 Yao Qi <yao.qi@linaro.org>
1362
1363 * configure.srv: Set srv_i386_linux_regobj empty if $development
1364 is false.
1365 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1366 initialize_low_tdesc.
1367 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1368 with #if initialize_low_tdesc.
1369 * linux-x86-tdesc-selftest.c: New file.
1370 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1371
13722017-09-05 Yao Qi <yao.qi@linaro.org>
1373
1374 * Makefile.in (arch-i386.o): New rule.
1375 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1376 (x86_64-*-linux*): Likewise.
1377 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1378 include arch/i386.h.
1379 (i386_linux_read_description): Remove code and call
1380 i386_create_target_description.
1381 * tdesc.c (allocate_target_description): New function.
1382 * tdesc.h (set_tdesc_architecture): Remove declaration.
1383 (set_tdesc_osabi): Likewise.
1384
13852017-09-05 Yao Qi <yao.qi@linaro.org>
1386
1387 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1388 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1389 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1390 .xmltarget.
1391 * server.c (get_features_xml): Call tdesc_get_features_xml.
1392 * tdesc.c (set_tdesc_architecture): New function.
1393 (set_tdesc_osabi): New function.
1394 (tdesc_get_features_xml): New function.
1395 (tdesc_create_feature): Add an argument.
1396 * tdesc.h (struct target_desc) <features>: New field.
1397 <arch, osabi>: New field.
1398 (~target_desc): xfree features, arch, and osabi.
1399 (target_desc::oerator==): Don't compare .xmltarget.
1400 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1401 (set_tdesc_osabi): Likewise.
1402 (tdesc_get_features_xml): Likewise.
1403
14042017-09-05 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-x86-tdesc.c: Include selftest.h.
1407 (i386_tdesc_test): New function.
1408 (initialize_low_tdesc): Call selftests::register_test.
1409 * tdesc.h: Include regdef.h.
1410 (target_desc): Override operator == and !=.
1411
14122017-09-05 Yao Qi <yao.qi@linaro.org>
1413
1414 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1415 (ipa_obj): Likewise.
1416 * linux-i386-ipa.c: Include common/x86-xstate.h
1417 (get_ipa_tdesc): Call i386_linux_read_description.
1418 (initialize_low_tracepoint): Don't call init_registers_XXX
1419 functions, call initialize_low_tdesc instead.
1420 * linux-x86-low.c (x86_linux_read_description): Call
1421 i386_linux_read_description.
1422 (initialize_low_arch): Don't call init_registers_i386_XXX
1423 functions, call initialize_low_tdesc.
1424 * linux-x86-tdesc.c: New file.
1425 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1426 (i386_get_ipa_tdesc_idx): Declare.
1427 (i386_get_ipa_tdesc): Declare.
1428 (initialize_low_tdesc): Declare.
1429
14302017-09-05 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1433 instead of 0.
1434
14352017-09-05 Yao Qi <yao.qi@linaro.org>
1436
1437 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1438 * regcache.c (get_thread_regcache): Use VEC_length.
1439 (init_register_cache): Likewise.
1440 (regcache_cpy): Likewise.
1441 (registers_to_string): Iterate reg_defs via VEC_iterate.
1442 (find_regno): Likewise.
1443 (find_register_by_number): Use VEC_index.
1444 (register_size): Call find_register_by_number.
1445 (register_data): Call find_register_by_number.
1446 (supply_regblock): Use VEC_length.
1447 (regcache_raw_read_unsigned): Likewise.
1448 * tdesc.c (init_target_desc): Iterate reg_defs via
1449 VEC_iterate.
1450 (default_description): Update initializer.
1451 (copy_target_description): Don't update field num_registers.
1452 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1453 <num_registers>: Remove.
1454
14552017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * Makefile.in (.SECONDARY): Define target.
1458
14592017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1460
1461 * linux-low.c (linux_wait_1): Adjust.
1462 * server.c (queue_stop_reply_callback): Adjust.
1463
14642017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1465
1466 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1467 QEnvironmentUnset and QEnvironmentReset packets.
1468 (handle_query): Inform remote that QEnvironmentHexEncoded,
1469 QEnvironmentUnset and QEnvironmentReset are supported.
1470
14712017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1472
1473 * inferiors.h (inferior_target_data): Rename to ...
1474 (thread_target_data): ... this.
1475 (inferior_regcache_data): Rename to ...
1476 (thread_regcache_data): ... this.
1477 (set_inferior_regcache_data): Rename to ...
1478 (set_thread_regcache_data): ... this.
1479 * inferiors.c (inferior_target_data): Rename to ...
1480 (thread_target_data): ... this.
1481 (inferior_regcache_data): Rename to ...
1482 (thread_regcache_data): ... this.
1483 (set_inferior_regcache_data): Rename to ...
1484 (set_thread_regcache_data): ... this.
1485 (free_one_thread): Update.
1486 * linux-low.h (get_thread_lwp): Update.
1487 * regcache.c (get_thread_regcache): Update.
1488 (regcache_invalidate_thread): Update.
1489 (free_register_cache_thread): Update.
1490 * win32-i386-low.c (update_debug_registers_callback): Update.
1491 (win32_get_current_dr): Update.
1492 * win32-low.c (thread_rec): Update.
1493 (delete_thread_info): Update.
1494 (continue_one_thread): Update.
1495 (suspend_one_thread): Update.
1496
14972017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1498
1499 * inferiors.c (set_inferior_target_data): Remove.
1500 * inferiors.h (set_inferior_target_data): Remove.
1501
15022017-08-18 Yao Qi <yao.qi@linaro.org>
1503
1504 * Makefile.in (OBS): Add selftest.o.
1505 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1506 * configure, config.in: Re-generated.
1507 * server.c: Include common/sefltest.h.
1508 (captured_main): Handle option --selftest.
1509
15102017-08-09 Yao Qi <yao.qi@linaro.org>
1511
1512 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1513 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1514 i386-avx-mpx.o and i386-mmx.o.
1515 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1516 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1517 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1518 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1519 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1520 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1521 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1522 i386/amd64-avx-mpx.xml.
1523
15242017-08-09 Yao Qi <yao.qi@linaro.org>
1525
1526 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1527 and x32-avx-avx512.o.
1528 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1529 i386/x32-avx-avx512.xml.
1530
15312017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * tracepoint.h (enum class fast_tpoint_collect_result): New
1534 enumeration.
1535 (fast_tracepoint_collecting): Change return type to
1536 fast_tpoint_collect_result.
1537 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1538 * linux-low.h: Include tracepoint.h.
1539 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1540 fast_tpoint_collect_result.
1541 * linux-low.c (handle_tracepoints): Adjust.
1542 (linux_fast_tracepoint_collecting): Change return type to
1543 fast_tpoint_collect_result.
1544 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1545 linux_wait_1, stuck_in_jump_pad_callback,
1546 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1547 proceed_one_lwp): Adjust to type change.
1548
15492017-07-10 Yao Qi <yao.qi@linaro.org>
1550
1551 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1552
15532017-06-29 Yao Qi <yao.qi@linaro.org>
1554
1555 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1556 Remove.
1557 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1558
15592017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1560
1561 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1562
15632017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1564
1565 * linux-low.c (linux_create_inferior): Adjust code to access the
1566 environment information via 'gdb_environ' class.
1567 * lynx-low.c (lynx_create_inferior): Likewise.
1568 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1569 (get_environ): Return a pointer to 'our_environ'.
1570 (captured_main): Initialize 'our_environ'.
1571 * server.h (get_environ): Adjust prototype.
1572 * spu-low.c (spu_create_inferior): Adjust code to access the
1573 environment information via 'gdb_environ' class.
1574
15752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1578 usage of "register" keyword.
1579
15802017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1581
1582 * configure: Re-generate.
1583
15842017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1585
1586 * configure: Re-generate.
1587
15882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * Makefile.in (COMPILE.pre): Add "-x c++".
1591
15922017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1593
1594 * fork-child.c: Conditionally include <signal.h>.
1595
15962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1597
1598 * server.c (handle_general_set): Handle new packet
1599 "QStartupWithShell".
1600 (handle_query): Add "QStartupWithShell" to the list of supported
1601 packets.
1602 (gdbserver_usage): Add help text explaining the
1603 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1604 options.
1605 (captured_main): Recognize and act upon the presence of the new
1606 CLI options.
1607
16082017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1609 Pedro Alves <palves@redhat.com>
1610
1611 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1612 * configure: Regenerate.
1613 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1614 "fork-inferior.o".
1615 (i[34567]86-*-lynxos*): Likewise.
1616 (spu*-*-*): Likewise.
1617 * fork-child.c: New file.
1618 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1619 and "environ.h".
1620 (linux_ptrace_fun): New function.
1621 (linux_create_inferior): Adjust function prototype to reflect
1622 change on "target.h". Adjust function code to use
1623 "fork_inferior".
1624 (linux_request_interrupt): Delete "signal_pid".
1625 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1626 (lynx_ptrace_fun): New function.
1627 (lynx_create_inferior): Adjust function prototype to reflect
1628 change on "target.h". Adjust function code to use
1629 "fork_inferior".
1630 * nto-low.c (nto_create_inferior): Adjust function prototype and
1631 code to reflect change on "target.h". Update comments.
1632 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1633 "common-terminal.h" and "environ.h".
1634 (terminal_fd): Moved to fork-child.c.
1635 (old_foreground_pgrp): Likewise.
1636 (restore_old_foreground_pgrp): Likewise.
1637 (last_status): Make it global.
1638 (last_ptid): Likewise.
1639 (our_environ): New variable.
1640 (startup_with_shell): Likewise.
1641 (program_name): Likewise.
1642 (program_argv): Rename to...
1643 (program_args): ...this.
1644 (wrapper_argv): New variable.
1645 (start_inferior): Delete function.
1646 (get_exec_wrapper): New function.
1647 (get_exec_file): Likewise.
1648 (get_environ): Likewise.
1649 (prefork_hook): Likewise.
1650 (post_fork_inferior): Likewise.
1651 (postfork_hook): Likewise.
1652 (postfork_child_hook): Likewise.
1653 (handle_v_run): Update code to deal with arguments coming from the
1654 remote host. Update calls from "start_inferior" to
1655 "create_inferior".
1656 (captured_main): Likewise. Initialize environment variable. Call
1657 "have_job_control".
1658 * server.h (post_fork_inferior): New prototype.
1659 (get_environ): Likewise.
1660 (last_status): Declare.
1661 (last_ptid): Likewise.
1662 (signal_pid): Likewise.
1663 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1664 (spu_ptrace_fun): New function.
1665 (spu_create_inferior): Adjust function prototype to reflect change
1666 on "target.h". Adjust function code to use "fork_inferior".
1667 * target.c (target_terminal_init): New function.
1668 (target_terminal_inferior): Likewise.
1669 (target_terminal_ours): Likewise.
1670 * target.h: Include <vector>.
1671 (struct target_ops) <create_inferior>: Update prototype.
1672 (create_inferior): Update macro.
1673 * utils.c (gdb_flush_out_err): New function.
1674 * win32-low.c (win32_create_inferior): Adjust function prototype
1675 and code to reflect change on "target.h".
1676
16772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1678
1679 * inferiors.c (switch_to_thread): New function.
1680
16812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1682
1683 * Makefile.in (SFILE): Add "common/job-control.c".
1684 (OBS): Add "job-control.o".
1685
16862017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1687
1688 * Makefile: Remove "@host_makefile_frag@".
1689
16902017-05-05 Pedro Alves <palves@redhat.com>
1691
1692 * configure: Regenerate.
1693
16942017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1695
1696 * configure: Regenerate.
1697
16982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1701 software_single_step change of return type to
1702 std::vector<CORE_ADDR>.
1703 * linux-low.c (install_software_single_step_breakpoints):
1704 Likewise.
1705 * linux-low.h (install_software_single_step_breakpoints):
1706 Likewise.
1707
17082017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * remote-utils.c: Include "gdb_termios.h" instead of
1711 "terminal.h".
1712 * terminal.h: Delete file.
1713
17142017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1715
1716 * server.c: Include <vector>.
1717 <program_argv, wrapper_argv>: Convert to std::vector.
1718 (start_inferior): Rewrite function to use C++.
1719 (handle_v_run): Likewise. Update code that calculates the argv
1720 based on the vRun packet; use C++.
1721 (captured_main): Likewise.
1722
17232017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * server.c (handle_v_cont): Initialize thread_resume::thread
1726 with null_ptid.
1727
17282017-04-05 Pedro Alves <palves@redhat.com>
1729
1730 * configure: Regenerate.
1731
17322017-04-05 Pedro Alves <palves@redhat.com>
1733
1734 * gdbreplay.c (sync_error): Constify.
1735 * linux-x86-low.c (push_opcode): Constify.
1736
17372017-04-05 Pedro Alves <palves@redhat.com>
1738
1739 * win32-low.c (get_child_debug_event)
1740 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1741 Report TARGET_WAITKIND_SPURIOUS instead.
1742
17432017-04-05 Pedro Alves <palves@redhat.com>
1744
1745 * remote-utils.c (remote_prepare, remote_open): Constify.
1746 * remote-utils.h (remote_prepare, remote_open): Constify.
1747 * server.c (captured_main): Constify 'port' handling.
1748
17492017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * Makefile.in (clean): Clear .deps.
1752
17532017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * .gitignore: Remove generated files, replace with wildcard.
1756 * (clean): Replace removal of generated files with wildcard.
1757 (version.c): Replace with...
1758 (version-generated.c): ...this.
1759 (xml-builtin.c): Replace with...
1760 (xml-builtin-generated.c): ...this.
1761 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1762 (%.c: *regformats*): Replace with...
1763 (%-generated.c: *regformats*): ...this.
1764
17652017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1766
1767 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1768 (xtensa_fill_gregset): Call collect_register_by_name for
1769 threadptr register.
1770 (xtensa_store_gregset): Call supply_register_by_name for
1771 threadptr register.
1772
17732017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1774
1775 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1776 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1777 (xtensa_store_gregset): Call supply_register for all registers in
1778 a0_regnum..a0_regnum + C0_NREGS range.
1779
17802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1781
1782 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1783 (ax-ipa.o: ax.c): Remove.
1784 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1785 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1786 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1787 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1788 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1789
17902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1793 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1794 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1795 (errors-ipa.o: ../common/errors.c): Remove.
1796 (format-ipa.o: ../common/format.c): Remove.
1797 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1798
17992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1800
1801 * Makefile.in (%-ipa.o: %.c): New rule.
1802 (tracepoint-ipa.o: tracepoint.c): Remove.
1803 (utils-ipa.o: utils.c): Remove.
1804 (remote-utils-ipa.o: remote-utils.c): Remove.
1805 (regcache-ipa.o: regcache.c): Remove.
1806 (i386-linux-ipa.o: i386-linux.c): Remove.
1807 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1808 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1809 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1810 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1811 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1812 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1813 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1814 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1815 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1816 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1817 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1818 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1819 (aarch64-ipa.o: aarch64.c): Remove.
1820 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1821 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1822 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1823 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1824 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1825 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1826 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1827 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1828 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1829 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1830 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1831 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1832 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1833 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1834 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1835 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1836 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1837 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1838 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1839 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1840 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1841 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1842 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1843 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1844 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1845 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1846 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1847 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1848 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1849 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1850 (tdesc-ipa.o: tdesc.c): Remove.
1851 (x32-linux-ipa.o: x32-linux.c): Remove.
1852 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1853 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1854
18552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1856
1857 * Makefile.in (%.o: ../arch/%.c): New rule.
1858 (arm.o: ../arch/arm.c): Remove.
1859 (arm-linux.o: ../arch/arm-linux.c): Remove.
1860 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1861 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1862
18632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1864
1865 * Makefile.in (%.o: ../nat/%.c): New rule.
1866 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1867 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1868 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1869 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1870 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1871 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1872 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1873 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1874 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1875 (linux-personality.o: ../nat/linux-personality.c): Remove.
1876 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1877 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1878 (x86-linux.o: ../nat/x86-linux.c): Remove.
1879 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1880 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1881
18822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * Makefile.in (%.o: ../common/%.c): New rule.
1885 (signals.o: ../common/signals.c): Remove.
1886 (print-utils.o: ../common/print-utils.c): Remove.
1887 (rsp-low.o: ../common/rsp-low.c): Remove.
1888 (common-utils.o: ../common/common-utils.c): Remove.
1889 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1890 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1891 (vec.o: ../common/vec.c): Remove.
1892 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1893 (xml-utils.o: ../common/xml-utils.c): Remove.
1894 (ptid.o: ../common/ptid.c): Remove.
1895 (buffer.o: ../common/buffer.c): Remove.
1896 (format.o: ../common/format.c): Remove.
1897 (filestuff.o: ../common/filestuff.c): Remove.
1898 (agent.o: ../common/agent.c): Remove.
1899 (errors.o: ../common/errors.c): Remove.
1900 (environ.o: ../common/environ.c): Remove.
1901 (common-debug.o: ../common/common-debug.c): Remove.
1902 (cleanups.o: ../common/cleanups.c): Remove.
1903 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1904 (fileio.o: ../common/fileio.c): Remove.
1905 (common-regcache.o: ../common/common-regcache.c): Remove.
1906 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1907 (new-op.o: ../common/new-op.c): Remove.
1908 (btrace-common.o: ../common/btrace-common.c): Remove.
1909
19102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * Makefile.in (%.o: ../target/%.c): New rule.
1913 (waitstatus.o: ../target/waitstatus.c): Remove.
1914
19152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1916
1917 * Makefile.in
1918 (%.c: ../regformats/%.dat,
1919 (%.c: ../regformats/arm/%.dat,
1920 (%.c: ../regformats/i386/%.dat,
1921 (%.c: ../regformats/rs6000/%.dat): New rules.
1922 (aarch64.c): Remove.
1923 (reg-arm.c): Remove.
1924 (arm-with-iwmmxt.c): Remove.
1925 (arm-with-vfpv2.c): Remove.
1926 (arm-with-vfpv3.c): Remove.
1927 (arm-with-neon.c): Remove.
1928 (reg-bfin.c): Remove.
1929 (reg-cris.c): Remove.
1930 (reg-crisv32.c): Remove.
1931 (i386.c): Remove.
1932 (i386-linux.c): Remove.
1933 (i386-avx.c): Remove.
1934 (i386-avx-linux.c): Remove.
1935 (i386-avx-avx512.c): Remove.
1936 (i386-avx-avx512-linux.c): Remove.
1937 (i386-mpx.c): Remove.
1938 (i386-mpx-linux.c): Remove.
1939 (i386-avx-mpx-avx512-pku.c): Remove.
1940 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1941 (i386-avx-mpx.c): Remove.
1942 (i386-avx-mpx-linux.c): Remove.
1943 (i386-mmx.c): Remove.
1944 (i386-mmx-linux.c): Remove.
1945 (reg-ia64.c): Remove.
1946 (reg-m32r.c): Remove.
1947 (reg-m68k.c): Remove.
1948 (reg-cf.c): Remove.
1949 (mips-linux.c): Remove.
1950 (mips-dsp-linux.c): Remove.
1951 (mips64-linux.c): Remove.
1952 (mips64-dsp-linux.c): Remove.
1953 (nios2-linux.c): Remove.
1954 (powerpc-32.c): Remove.
1955 (powerpc-32l.c): Remove.
1956 (powerpc-altivec32l.c): Remove.
1957 (powerpc-cell32l.c): Remove.
1958 (powerpc-vsx32l.c): Remove.
1959 (powerpc-isa205-32l.c): Remove.
1960 (powerpc-isa205-altivec32l.c): Remove.
1961 (powerpc-isa205-vsx32l.c): Remove.
1962 (powerpc-e500l.c): Remove.
1963 (powerpc-64l.c): Remove.
1964 (powerpc-altivec64l.c): Remove.
1965 (powerpc-cell64l.c): Remove.
1966 (powerpc-vsx64l.c): Remove.
1967 (powerpc-isa205-64l.c): Remove.
1968 (powerpc-isa205-altivec64l.c): Remove.
1969 (powerpc-isa205-vsx64l.c): Remove.
1970 (s390-linux32.c): Remove.
1971 (s390-linux32v1.c): Remove.
1972 (s390-linux32v2.c): Remove.
1973 (s390-linux64.c): Remove.
1974 (s390-linux64v1.c): Remove.
1975 (s390-linux64v2.c): Remove.
1976 (s390-te-linux64.c): Remove.
1977 (s390-vx-linux64.c): Remove.
1978 (s390-tevx-linux64.c): Remove.
1979 (s390x-linux64.c): Remove.
1980 (s390x-linux64v1.c): Remove.
1981 (s390x-linux64v2.c): Remove.
1982 (s390x-te-linux64.c): Remove.
1983 (s390x-vx-linux64.c): Remove.
1984 (s390x-tevx-linux64.c): Remove.
1985 (tic6x-c64xp-linux.c): Remove.
1986 (tic6x-c64x-linux.c): Remove.
1987 (tic6x-c62x-linux.c): Remove.
1988 (reg-sh.c): Remove.
1989 (reg-sparc64.c): Remove.
1990 (reg-spu.c): Remove.
1991 (amd64.c): Remove.
1992 (amd64-linux.c): Remove.
1993 (amd64-avx.c): Remove.
1994 (amd64-avx-linux.c): Remove.
1995 (amd64-avx-avx512.c): Remove.
1996 (amd64-avx-avx512-linux.c): Remove.
1997 (amd64-mpx.c): Remove.
1998 (amd64-mpx-linux.c): Remove.
1999 (amd64-avx-mpx-avx512-pku.c): Remove.
2000 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2001 (amd64-avx-mpx.c): Remove.
2002 (amd64-avx-mpx-linux.c): Remove.
2003 (x32.c): Remove.
2004 (x32-linux.c): Remove.
2005 (x32-avx.c): Remove.
2006 (x32-avx-linux.c): Remove.
2007 (x32-avx-avx512.c): Remove.
2008 (x32-avx-avx512-linux.c): Remove.
2009 (reg-xtensa.c): Remove.
2010 (reg-tilegx.c): Remove.
2011 (reg-tilegx32.c): Remove.
2012
20132017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2014
2015 * Makefile.in (SFILES): Add "common/environ.c".
2016 (OBJS): Add "common/environ.h".
2017
20182017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2019
2020 * configure.ac: Check if the fs_base and gs_base members of
2021 `struct user_regs_struct' exist.
2022 * config.in: Regenerated.
2023 * configure: Likewise.
2024
20252017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2026
2027 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2028 target_read_memory.
2029 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2030 (get_next_pcs_syscall_next_pc): Likewise.
2031
20322016-12-23 Luis Machado <lgustavo@codesourcery.com>
2033
2034 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2035 * nto-x86-low.c: Likewise.
2036
20372016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2038
2039 * Makefile.in: Include disable-implicit-rules.mk.
2040
20412016-11-23 Pedro Alves <palves@redhat.com>
2042
2043 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2044 (debug_vprintf): Use std::chrono::steady_clock instead of
2045 gettimeofday. Use '.' instead of ':'.
2046 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2047 (get_timestamp): Use std::chrono::steady_clock instead of
2048 gettimeofday.
2049
20502016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2051
2052 * Makefile.in: Fix whitespace formatting.
2053
20542016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2055
2056 * Makefile.in (SFILES, OBS): Flatten list and order
2057 alphabetically.
2058
20592016-11-23 Pedro Alves <palves@redhat.com>
2060
2061 * event-loop.c (handle_file_event): Use warning.
2062 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2063 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2064 Use warning.
2065
20662016-11-23 Pedro Alves <palves@redhat.com>
2067
2068 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2069 output.
2070 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2071 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2072 debug_printf and debug_flush for debug output.
2073 * server.c (handle_general_set): Likewise.
2074 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2075 output.
2076
20772016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2078
2079 * Makefile.in (.c.o): Replace rule with ...
2080 (%.o: %.c): ... this one.
2081
20822016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2083
2084 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2085 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2086 make.
2087 * configure.ac: Remove checks for the make program.
2088 * configure: Re-generate.
2089
20902016-10-28 Pedro Alves <palves@redhat.com>
2091
2092 * Makefile.in (CXX_DIALECT): Get from configure.
2093 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2094 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2095 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2096 * config.in: Regenerate.
2097 * configure: Regenerate.
2098
20992016-10-27 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-low.c (linux_supports_range_stepping): Return true if
2102 can_software_single_step return true.
2103
21042016-10-27 Yao Qi <yao.qi@linaro.org>
2105
2106 * inferiors.c (find_inferior_in_random): New function.
2107 * inferiors.h (find_inferior_in_random): Declare.
2108 * linux-low.c (linux_wait_for_event_filtered): Call
2109 find_inferior_in_random instead of find_inferior.
2110
21112016-10-27 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-low.c (linux_wait_1): If single-step breakpoints are
2114 inserted, remove them.
2115
21162016-10-26 Pedro Alves <palves@redhat.com>
2117
2118 * linux-low.c (handle_extended_wait): Link parent/child fork
2119 threads.
2120 (linux_wait_1): Unlink them.
2121 (linux_set_resume_request): Ignore resume requests for
2122 already-resumed and unhandled fork child threads.
2123 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2124 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2125 New functions.
2126 (handle_v_requests) <vCont>: Don't call require_running.
2127 * server.h (in_queued_stop_replies): New declaration.
2128
21292016-10-24 Yao Qi <yao.qi@linaro.org>
2130
2131 PR server/20733
2132 * linux-aarch64-low.c (append_insns): Cast the return value to
2133 'uint32_t *'.
2134
21352016-10-10 Yao Qi <yao.qi@linaro.org>
2136
2137 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2138
21392016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2140
2141 * target.c (target_supports_multi_process): New function, moved
2142 from...
2143 * target.h (target_supports_multi_process): ... here. Remove
2144 macro.
2145
21462016-10-05 Tom Tromey <tom@tromey.com>
2147
2148 PR remote/20655:
2149 * tracepoint.c (handle_tracepoint_bkpts): Check
2150 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2151
21522016-10-05 Yao Qi <yao.qi@linaro.org>
2153
2154 * configure.srv: Update the path of arm-*.xml files.
2155
21562016-10-05 Terry Guo <terry.guo@arm.com>
2157 Yao Qi <yao.qi@linaro.org>
2158
2159 * Makefile.in: Adjust the path of rules.
2160 * configure.srv: Update the path of xml files.
2161 * regformats/arm-with-iwmmxt.dat: Regenerated.
2162 * regformats/arm-with-neon.dat: Likewise.
2163 * regformats/arm-with-vfpv2.dat: Likewise.
2164 * regformats/arm-with-vfpv3.dat Likewise.
2165
21662016-09-30 Yao Qi <yao.qi@linaro.org>
2167
2168 PR gdbserver/20627
2169 * target.c (target_stop_and_wait): Don't call
2170 target_continue_no_signal, use resume_stop instead.
2171
21722016-09-26 Yao Qi <yao.qi@linaro.org>
2173
2174 * linux-low.c (linux_wait_1): Call debug_exit.
2175
21762016-09-23 Pedro Alves <palves@redhat.com>
2177
2178 * Makefile.in (SFILES): Add common/new-op.c.
2179 (OBS): Add common/new-op.o.
2180 (new-op.o): New rule.
2181
21822016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * .gitinore: Ignore more files.
2185
21862016-09-21 Yao Qi <yao.qi@linaro.org>
2187
2188 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2189 23.
2190
21912016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2192
2193 * server.c (start_inferior): Call target_mourn_inferior instead of
2194 mourn_inferior; pass ptid_t argument to it.
2195 (resume): Likewise.
2196 (handle_target_event): Likewise.
2197 * target.c (target_mourn_inferior): New function.
2198 * target.h (mourn_inferior): Delete macro.
2199
22002016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2201
2202 * linux-low.c (lwp_is_stepping): New function.
2203
22042016-09-06 Carl Love <cel@us.ibm.com>
2205
2206 * server.c (start_inferior): Fixed comment, requested comment change
2207 didn't get updated correctly. Removed reference to ptrace () call as
2208 it is only true on Linux systems.
2209
22102016-09-06 Carl Love <cel@us.ibm.com>
2211
2212 * server.c (start_inferior): Do not call
2213 function target_post_create_inferior () if the
2214 inferior process has already exited.
2215
22162016-09-05 Pedro Alves <palves@redhat.com>
2217
2218 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2219 (COMPILE.pre, CC_LD): Use CXX directly.
2220 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2221 * acinclude.m4: Don't include build-with-cxx.m4.
2222 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2223 * configure: Regenerate.
2224
22252016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2226
2227 PR gdb/19495
2228 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2229 call writing data to own_buf.
2230
22312016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2232
2233 * target.c (mywait): Call target_wait instead of
2234 the_target->wait.
2235 (target_wait): New function.
2236
22372016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2238
2239 * server.c (start_inferior): New variable 'ptid'. Replace calls
2240 to the_target->resume by target_continue{,_no_signal}, depending
2241 on the case.
2242 * target.c (target_stop_and_wait): Call target_continue_no_signal
2243 instead of the_target->resume.
2244 (target_continue): New function.
2245
22462016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2247
2248 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2249
22502016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2251
2252 PR server/20491
2253 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2254 ps_prochandle.
2255 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2256 * linux-arm-low.c (ps_get_thread_area): Likewise.
2257 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2258 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2259 * linux-mips-low.c (ps_get_thread_area): Likewise.
2260 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2261 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2262 * linux-x86-low.c (ps_get_thread_area): Likewise.
2263 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2264
22652016-08-19 Pedro Alves <palves@redhat.com>
2266
2267 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2268
22692016-08-19 Pedro Alves <palves@redhat.com>
2270
2271 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2272 comment. Use memcpy instead of casting through unsigned long.
2273
22742016-08-19 Pedro Alves <palves@redhat.com>
2275
2276 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2277 allocating around 0x80000000.
2278
22792016-08-19 Pedro Alves <palves@redhat.com>
2280
2281 PR gdb/20415
2282 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2283 (x32-avx512-linux-ipa.o): New rules.
2284 * configure.ac (x86_64-*-linux*): New x32 check.
2285 * configure.srv (ipa_x32_linux_regobj): New.
2286 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2287 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2288 descriptions.
2289 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2290 descriptions.
2291 * configure: Regenerate.
2292
22932016-08-09 Pedro Alves <palves@redhat.com>
2294
2295 PR gdb/18653
2296 * Makefile.in (OBS): Add signals-state-save-restore.o.
2297 (signals-state-save-restore.o): New rule.
2298 * config.in: Regenerate.
2299 * configure: Regenerate.
2300 * linux-low.c: Include "signals-state-save-restore.h".
2301 (linux_create_inferior): Call
2302 restore_original_signals_state.
2303 * server.c: Include "dispositions-save-restore.h".
2304 (captured_main): Call save_original_signals_state.
2305
23062016-08-05 Pedro Alves <palves@redhat.com>
2307
2308 * configure: Regenerate.
2309
23102016-08-04 Yao Qi <yao.qi@linaro.org>
2311
2312 * linux-low.c (regsets_fetch_inferior_registers): Check
2313 errno is ESRCH or not.
2314
23152016-08-02 Yao Qi <yao.qi@linaro.org>
2316
2317 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2318 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2319 (thread_db_load_search): Update.
2320 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2321 td_ta_set_event and td_ta_event_getmsg.
2322
23232016-07-26 Pedro Alves <palves@redhat.com>
2324
2325 PR server/20414
2326 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2327 of unsigned long for 64-bit registers and use uint32_t instead of
2328 unsigned int for 32-bit registers.
2329
23302016-07-26 Pedro Alves <palves@redhat.com>
2331
2332 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2333 to 'ptrace'.
2334
23352016-07-21 Tom Tromey <tom@tromey.com>
2336
2337 * configure: Rebuild.
2338
23392016-07-21 Yao Qi <yao.qi@linaro.org>
2340
2341 * mem-break.c (find_gdb_breakpoint): Cast bp to
2342 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2343
23442016-07-21 Yao Qi <yao.qi@linaro.org>
2345
2346 * server.c (handle_v_requests): Support s and S actions
2347 if target_supports_software_single_step return true.
2348
23492016-07-21 Yao Qi <yao.qi@linaro.org>
2350
2351 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2352 is resume_step, call maybe_hw_step.
2353 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2354 and unstop them.
2355 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2356 breakpoints or not.
2357 (proceed_one_lwp): If resume request is resume_step, install
2358 reinsert breakpoints and call maybe_hw_step.
2359
23602016-07-21 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-low.c (proceed_one_lwp): Declare.
2363 (linux_resume_one_thread): Remove local variable 'step'.
2364 Lift code enqueue signal. Call proceed_one_lwp instead of
2365 linux_resume_one_lwp.
2366
23672016-07-21 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-low.c (linux_resume_one_thread): Call
2370 enqueue_pending_signal.
2371
23722016-07-21 Yao Qi <yao.qi@linaro.org>
2373
2374 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2375 * inferiors.c (do_restore_current_thread_cleanup): New function.
2376 (make_cleanup_restore_current_thread): Likewise.
2377 * linux-low.c (install_software_single_step_breakpoints): Call
2378 make_cleanup_restore_current_thread. Switch current_thread to
2379 thread.
2380
23812016-07-21 Yao Qi <yao.qi@linaro.org>
2382
2383 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2384 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2385 (clone_one_breakpoint): Likewise.
2386 (delete_reinsert_breakpoints): Change parameter to thread.
2387 Callers updated.
2388 (has_reinsert_breakpoints): Likewise.
2389 (uninsert_reinsert_breakpoints): Likewise.
2390 (reinsert_reinsert_breakpoints): Likewise.
2391 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2392 (delete_reinsert_breakpoints): Likewise.
2393 (reinsert_reinsert_breakpoints): Likewise.
2394 (uninsert_reinsert_breakpoints): Likewise.
2395 (has_reinsert_breakpoints): Likewise.
2396
23972016-07-21 Yao Qi <yao.qi@linaro.org>
2398
2399 * inferiors.c (get_thread_process): Make parameter const.
2400 * inferiors.h (get_thread_process): Update declaration.
2401 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2402 Add new parameters child_thread and parent_thread. Callers
2403 updated.
2404 * mem-break.h (clone_all_breakpoints): Update declaration.
2405
24062016-07-21 Yao Qi <yao.qi@linaro.org>
2407
2408 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2409 <command_list, handler>: Remove.
2410 (struct gdb_breakpoint): New.
2411 (struct other_breakpoint): New.
2412 (struct reinsert_breakpoint): New.
2413 (is_gdb_breakpoint): New function.
2414 (any_persistent_commands): Update command_list if
2415 is_gdb_breakpoint returns true.
2416 (set_breakpoint): Create breakpoints according to their types.
2417 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2418 (set_gdb_breakpoint_1): Likewise.
2419 (set_gdb_breakpoint): Likewise.
2420 (clear_breakpoint_conditions): Change parameter type to
2421 'struct gdb_breakpoint *'.
2422 (clear_breakpoint_commands): Likewise.
2423 (clear_breakpoint_conditions_and_commands): Likewise.
2424 (add_condition_to_breakpoint): Likewise.
2425 (add_breakpoint_condition): Likewise.
2426 (add_commands_to_breakpoint): Likewise.
2427 (check_breakpoints): Check other_breakpoint.
2428 (clone_one_breakpoint): Clone breakpopint according to its type.
2429 * mem-break.h (struct gdb_breakpoint): Declare.
2430 (set_gdb_breakpoint): Update declaration.
2431 (clear_breakpoint_conditions_and_commands): Likewise.
2432 (add_breakpoint_condition): Likewise.
2433 (add_breakpoint_commands): Likewise.
2434 * server.c (process_point_options): Change parameter type to
2435 'struct gdb_breakpoint *'.
2436
24372016-07-21 Yao Qi <yao.qi@linaro.org>
2438
2439 * mem-break.c (set_breakpoint_at): Rename it to ...
2440 (set_breakpoint_type_at): ... it.
2441 (set_breakpoint_at): Call set_breakpoint_type_at.
2442 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2443 * mem-break.h (set_breakpoint_at): Update comments.
2444
24452016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2446
2447 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2448 to buf parameter.
2449 (nios2_store_gregset): Likewise.
2450
24512016-07-01 Pedro Alves <palves@redhat.com>
2452 Antoine Tremblay <antoine.tremblay@ericsson.com>
2453
2454 * linux-low.c: Change interface to take the target lwp_info
2455 pointer directly and return void. Handle detaching from a zombie
2456 thread.
2457 (linux_detach_lwp_callback): New function.
2458 (linux_detach): Detach from the leader thread after detaching from
2459 the clone threads.
2460
24612016-06-28 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2464 for variable new_offset.
2465 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2466 (aarch64_ftrace_insn_reloc_cb): Likewise.
2467 (aarch64_ftrace_insn_reloc_tb): Likewise.
2468 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2469 PRIx64 instead of PRIx32.
2470
24712016-06-28 Yao Qi <yao.qi@linaro.org>
2472
2473 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2474 (the_low_target): Install arm_get_syscall_trapinfo.
2475
24762016-06-28 Yao Qi <yao.qi@linaro.org>
2477
2478 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2479 function.
2480 (the_low_target): Install aarch64_get_syscall_trapinfo.
2481
24822016-06-28 Yao Qi <yao.qi@linaro.org>
2483
2484 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2485 Callers updated.
2486 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2487 Remove parameter sysno.
2488 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2489 sysret.
2490
24912016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2492
2493 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2494 (s390_emit_ne_goto): Likewise.
2495 (s390_emit_lt_goto): Likewise.
2496 (s390_emit_le_goto): Likewise.
2497 (s390_emit_gt_goto): Likewise.
2498 (s390_emit_ge_goto): Likewise.
2499 (s390x_emit_eq_goto): Likewise.
2500 (s390x_emit_ne_goto): Likewise.
2501 (s390x_emit_lt_goto): Likewise.
2502 (s390x_emit_le_goto): Likewise.
2503 (s390x_emit_gt_goto): Likewise.
2504 (s390x_emit_ge_goto): Likewise.
2505 (s390_emit_ops_impl): Mark variable static.
2506 (s390x_emit_ops): Likewise.
2507
25082016-06-17 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-low.c (handle_extended_wait): Call
2511 uninsert_reinsert_breakpoints for the parent process. Remove
2512 reinsert breakpoints from the child process. Reinsert them to
2513 the parent process when vfork is done.
2514 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2515 (reinsert_reinsert_breakpoints): New function.
2516 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2517 (reinsert_reinsert_breakpoints): Declare.
2518
25192016-06-17 Yao Qi <yao.qi@linaro.org>
2520
2521 * linux-low.c (handle_extended_wait): If the parent is doing
2522 step-over, remove the reinsert breakpoints from the forked child.
2523
25242016-06-17 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-low.c (unsuspend_all_lwps): Declare.
2527 (linux_low_filter_event): If thread exited, call finish_step_over.
2528 If step-over is finished, unsuspend other threads.
2529
25302016-06-17 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-low.c (linux_resume_one_lwp_throw): Assert
2533 has_reinsert_breakpoints returns false.
2534 * mem-break.c (delete_disabled_breakpoints): Assert
2535 bp type isn't reinsert_breakpoint.
2536
25372016-06-17 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-low.c (maybe_hw_step): New function.
2540 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2541 (finish_step_over): Switch current_thread to lwp temporarily,
2542 and assert has_reinsert_breakpoints returns true.
2543 (proceed_one_lwp): Call maybe_hw_step.
2544 * mem-break.c (has_reinsert_breakpoints): New function.
2545 * mem-break.h (has_reinsert_breakpoints): Declare.
2546
25472016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2548
2549 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2550
25512016-05-17 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2554 instead of find_inferior.
2555
25562016-05-05 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2559 Initialize res to zero.
2560
25612016-05-05 Yao Qi <yao.qi@linaro.org>
2562
2563 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2564 to uint32_t.
2565
25662016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2567
2568 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2569 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2570 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2571
25722016-04-28 Par Olsson <par.olsson@windriver.com>
2573 Simon Marchi <simon.marchi@ericsson.com>
2574
2575 * tracepoint.c (write_inferior_int8): New function.
2576 (cmd_qtenable_disable): Write enable flag using
2577 write_inferior_int8.
2578
25792016-04-25 Yao Qi <yao.qi@linaro.org>
2580
2581 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2582 (need_step_over_p): Return zero if the LWP has pending signals
2583 can be delivered on software single step target.
2584
25852016-04-25 Yao Qi <yao.qi@linaro.org>
2586
2587 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2588 return instead of error.
2589
25902016-04-22 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2593 to 23.
2594
25952016-04-22 Yao Qi <yao.qi@linaro.org>
2596
2597 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2598 signal when stepping over breakpoint with software single
2599 step.
2600
26012016-04-21 Pedro Alves <palves@redhat.com>
2602
2603 * linux-s390-low.c (s390_collect_ptrace_register)
2604 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2605 add casts.
2606 (s390_check_regset): Use void * instead of gdb_byte *.
2607
26082016-04-20 Pedro Alves <palves@redhat.com>
2609
2610 * configure: Renegerate.
2611
26122016-04-20 Yao Qi <yao.qi@linaro.org>
2613
2614 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2615 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2616 number 16.
2617 (arm_store_gregset): Likewise.
2618
26192016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2620
2621 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2622 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2623 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2624 (amd64-avx-mpx-linux.c): New rules.
2625 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2626 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2627 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2628 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2629 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2630 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2631 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2632 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2633 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2634 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2635 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2636 * linux-x86-low.c (x86_linux_read_description): Add case for
2637 X86_XSTATE_AVX_MPX_MASK.
2638 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2639 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2640 init_registers_i386_avx_mpx_linux.
2641 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2642 (initialize_low_tracepoint): Call
2643 init_registers_i386_avx_mpx_linux.
2644 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2645 (initialize_low_tracepoint): Call
2646 init_registers_amd64_avx_mpx_linux.
2647 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2648 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2649 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2650 declarations.
2651
26522016-04-18 Pedro Alves <palves@redhat.com>
2653
2654 * configure: Regenerate.
2655
26562016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2657
2658 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2659 (aarch64_emit_sub): Likewise.
2660
26612016-04-12 Pedro Alves <palves@redhat.com>
2662
2663 * utils.c (prepare_to_throw_exception): Delete.
2664
26652016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2666
2667 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2668
26692016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2670
2671 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2672
26732016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2674
2675 * linux-aarch64-ipa.c: Add <elf.h> include.
2676 * linux-ppc-ipa.c: Add <elf.h> include.
2677 * linux-s390-ipa.c: Add <elf.h> include.
2678
26792016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2680
2681 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2682 (get_raw_reg_ptr): Likewise.
2683 (get_trace_state_variable_value_ptr): Likewise.
2684 (set_trace_state_variable_value_ptr): Likewise.
2685 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2686 char *.
2687
26882016-03-31 Wei-cheng Wang <cole945@gmail.com>
2689 Marcin Kościelnicki <koriakin@0x04.net>
2690
2691 PR/17221
2692 * linux-ppc-low.c (emit_insns): New function.
2693 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2694 (ppc_emit_prologue): New function.
2695 (ppc_emit_epilogue): New function.
2696 (ppc_emit_add): New function.
2697 (ppc_emit_sub): New function.
2698 (ppc_emit_mul): New function.
2699 (ppc_emit_lsh): New function.
2700 (ppc_emit_rsh_signed): New function.
2701 (ppc_emit_rsh_unsigned): New function.
2702 (ppc_emit_ext): New function.
2703 (ppc_emit_zero_ext): New function.
2704 (ppc_emit_log_not): New function.
2705 (ppc_emit_bit_and): New function.
2706 (ppc_emit_bit_or): New function.
2707 (ppc_emit_bit_xor): New function.
2708 (ppc_emit_bit_not): New function.
2709 (ppc_emit_equal): New function.
2710 (ppc_emit_less_signed): New function.
2711 (ppc_emit_less_unsigned): New function.
2712 (ppc_emit_ref): New function.
2713 (ppc_emit_const): New function.
2714 (ppc_emit_reg): New function.
2715 (ppc_emit_pop): New function.
2716 (ppc_emit_stack_flush): New function.
2717 (ppc_emit_swap): New function.
2718 (ppc_emit_stack_adjust): New function.
2719 (ppc_emit_call): New function.
2720 (ppc_emit_int_call_1): New function.
2721 (ppc_emit_void_call_2): New function.
2722 (ppc_emit_if_goto): New function.
2723 (ppc_emit_goto): New function.
2724 (ppc_emit_eq_goto): New function.
2725 (ppc_emit_ne_goto): New function.
2726 (ppc_emit_lt_goto): New function.
2727 (ppc_emit_le_goto): New function.
2728 (ppc_emit_gt_goto): New function.
2729 (ppc_emit_ge_goto): New function.
2730 (ppc_write_goto_address): New function.
2731 (ppc_emit_ops_impl): New static variable.
2732 (ppc64v1_emit_prologue): New function.
2733 (ppc64v2_emit_prologue): New function.
2734 (ppc64_emit_epilogue): New function.
2735 (ppc64_emit_add): New function.
2736 (ppc64_emit_sub): New function.
2737 (ppc64_emit_mul): New function.
2738 (ppc64_emit_lsh): New function.
2739 (ppc64_emit_rsh_signed): New function.
2740 (ppc64_emit_rsh_unsigned): New function.
2741 (ppc64_emit_ext): New function.
2742 (ppc64_emit_zero_ext): New function.
2743 (ppc64_emit_log_not): New function.
2744 (ppc64_emit_bit_and): New function.
2745 (ppc64_emit_bit_or): New function.
2746 (ppc64_emit_bit_xor): New function.
2747 (ppc64_emit_bit_not): New function.
2748 (ppc64_emit_equal): New function.
2749 (ppc64_emit_less_signed): New function.
2750 (ppc64_emit_less_unsigned): New function.
2751 (ppc64_emit_ref): New function.
2752 (ppc64_emit_const): New function.
2753 (ppc64v1_emit_reg): New function.
2754 (ppc64v2_emit_reg): New function.
2755 (ppc64_emit_pop): New function.
2756 (ppc64_emit_stack_flush): New function.
2757 (ppc64_emit_swap): New function.
2758 (ppc64v1_emit_call): New function.
2759 (ppc64v2_emit_call): New function.
2760 (ppc64v1_emit_int_call_1): New function.
2761 (ppc64v2_emit_int_call_1): New function.
2762 (ppc64v1_emit_void_call_2): New function.
2763 (ppc64v2_emit_void_call_2): New function.
2764 (ppc64_emit_if_goto): New function.
2765 (ppc64_emit_eq_goto): New function.
2766 (ppc64_emit_ne_goto): New function.
2767 (ppc64_emit_lt_goto): New function.
2768 (ppc64_emit_le_goto): New function.
2769 (ppc64_emit_gt_goto): New function.
2770 (ppc64_emit_ge_goto): New function.
2771 (ppc64v1_emit_ops_impl): New static variable.
2772 (ppc64v2_emit_ops_impl): New static variable.
2773 (ppc_emit_ops): New function.
2774 (linux_low_target): Wire in ppc_emit_ops.
2775
27762016-03-31 Wei-cheng Wang <cole945@gmail.com>
2777 Marcin Kościelnicki <koriakin@0x04.net>
2778
2779 PR/17221
2780 * Makefile.in: Add powerpc-*-ipa.o
2781 * configure.srv: Add ipa_obj for powerpc*-linux.
2782 * linux-ppc-ipa.c: New file.
2783 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2784 includes.
2785 (PPC_FIELD): New macro.
2786 (PPC_SEXT): New macro.
2787 (PPC_OP6): New macro.
2788 (PPC_BO): New macro.
2789 (PPC_LI): New macro.
2790 (PPC_BD): New macro.
2791 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2792 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2793 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2794 (ppc_get_thread_area): New function.
2795 (is_elfv2_inferior): New function.
2796 (gen_ds_form): New function.
2797 (GEN_STD): New macro.
2798 (GEN_STDU): New macro.
2799 (GEN_LD): New macro.
2800 (GEN_LDU): New macro.
2801 (gen_d_form): New function.
2802 (GEN_ADDI): New macro.
2803 (GEN_ADDIS): New macro.
2804 (GEN_LI): New macro.
2805 (GEN_LIS): New macro.
2806 (GEN_ORI): New macro.
2807 (GEN_ORIS): New macro.
2808 (GEN_LWZ): New macro.
2809 (GEN_STW): New macro.
2810 (GEN_STWU): New macro.
2811 (gen_xfx_form): New function.
2812 (GEN_MFSPR): New macro.
2813 (GEN_MTSPR): New macro.
2814 (GEN_MFCR): New macro.
2815 (GEN_MTCR): New macro.
2816 (GEN_SYNC): New macro.
2817 (GEN_LWSYNC): New macro.
2818 (gen_x_form): New function.
2819 (GEN_OR): New macro.
2820 (GEN_MR): New macro.
2821 (GEN_LWARX): New macro.
2822 (GEN_STWCX): New macro.
2823 (GEN_CMPW): New macro.
2824 (gen_md_form): New function.
2825 (GEN_RLDICL): New macro.
2826 (GEN_RLDICR): New macro.
2827 (gen_i_form): New function.
2828 (GEN_B): New macro.
2829 (GEN_BL): New macro.
2830 (gen_b_form): New function.
2831 (GEN_BNE): New macro.
2832 (GEN_LOAD): New macro.
2833 (GEN_STORE): New macro.
2834 (gen_limm): New function.
2835 (gen_atomic_xchg): New function.
2836 (gen_call): New function.
2837 (ppc_relocate_instruction): New function.
2838 (ppc_install_fast_tracepoint_jump_pad): New function.
2839 (ppc_get_min_fast_tracepoint_insn_len): New function.
2840 (ppc_get_ipa_tdesc_idx): New function.
2841 (the_low_target): Wire in the new functions.
2842 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2843 tdescs.
2844 * linux-ppc-tdesc.h: New file.
2845
28462016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2847
2848 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2849 (alloc_jump_pad_buffer): New function.
2850 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2851 (alloc_jump_pad_buffer): New function.
2852 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2853 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2854 (alloc_jump_pad_buffer): New function.
2855 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2856 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2857 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2858 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2859
28602016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2861
2862 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2863 * linux-amd64-ipa.c: Likewise.
2864 * linux-i386-ipa.c: Likewise.
2865 * linux-s390-ipa.c: Likewise.
2866 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2867 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2868 set_trace_state_variable_value_ptr.
2869 (struct ipa_sym_addresses): Likewise.
2870 (symbol_list): Likewise.
2871 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2872 accessing gdb_collect directly.
2873 (gdb_collect_ptr_type): New typedef.
2874 (get_raw_reg_ptr_type): New typedef.
2875 (get_trace_state_variable_value_ptr_type): New typedef.
2876 (set_trace_state_variable_value_ptr_type): New typedef.
2877 (gdb_collect_ptr): New global.
2878 (get_raw_reg_ptr): New global.
2879 (get_trace_state_variable_value_ptr): New global.
2880 (set_trace_state_variable_value_ptr): New global.
2881 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2882 accessing get_raw_reg directly.
2883 (get_get_tsv_func_addr): Likewise for
2884 get_trace_state_variable_value_ptr.
2885 (get_set_tsv_func_addr): Likewise for
2886 set_trace_state_variable_value_ptr.
2887 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2888
28892016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2890
2891 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2892
28932016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2894
2895 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2896 packets.
2897 (relocate_instruction): Remove own_buf.
2898 * server.c (own_buf): Make global.
2899 (handle_v_requests): Make global.
2900 * server.h (own_buf): New declaration.
2901 (handle_v_requests): New prototype.
2902
29032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2904
2905 PR 18377
2906 * linux-s390-low.c (add_insns): New function.
2907 (s390_emit_prologue): New function.
2908 (s390_emit_epilogue): New function.
2909 (s390_emit_add): New function.
2910 (s390_emit_sub): New function.
2911 (s390_emit_mul): New function.
2912 (s390_emit_lsh): New function.
2913 (s390_emit_rsh_signed): New function.
2914 (s390_emit_rsh_unsigned): New function.
2915 (s390_emit_ext): New function.
2916 (s390_emit_log_not): New function.
2917 (s390_emit_bit_and): New function.
2918 (s390_emit_bit_or): New function.
2919 (s390_emit_bit_xor): New function.
2920 (s390_emit_bit_not): New function.
2921 (s390_emit_equal): New function.
2922 (s390_emit_less_signed): New function.
2923 (s390_emit_less_unsigned): New function.
2924 (s390_emit_ref): New function.
2925 (s390_emit_if_goto): New function.
2926 (s390_emit_goto): New function.
2927 (s390_write_goto_address): New function.
2928 (s390_emit_litpool): New function.
2929 (s390_emit_const): New function.
2930 (s390_emit_call): New function.
2931 (s390_emit_reg): New function.
2932 (s390_emit_pop): New function.
2933 (s390_emit_stack_flush): New function.
2934 (s390_emit_zero_ext): New function.
2935 (s390_emit_swap): New function.
2936 (s390_emit_stack_adjust): New function.
2937 (s390_emit_set_r2): New function.
2938 (s390_emit_int_call_1): New function.
2939 (s390_emit_void_call_2): New function.
2940 (s390_emit_eq_goto): New function.
2941 (s390_emit_ne_goto): New function.
2942 (s390_emit_lt_goto): New function.
2943 (s390_emit_le_goto): New function.
2944 (s390_emit_gt_goto): New function.
2945 (s390_emit_ge_goto): New function.
2946 (s390x_emit_prologue): New function.
2947 (s390x_emit_epilogue): New function.
2948 (s390x_emit_add): New function.
2949 (s390x_emit_sub): New function.
2950 (s390x_emit_mul): New function.
2951 (s390x_emit_lsh): New function.
2952 (s390x_emit_rsh_signed): New function.
2953 (s390x_emit_rsh_unsigned): New function.
2954 (s390x_emit_ext): New function.
2955 (s390x_emit_log_not): New function.
2956 (s390x_emit_bit_and): New function.
2957 (s390x_emit_bit_or): New function.
2958 (s390x_emit_bit_xor): New function.
2959 (s390x_emit_bit_not): New function.
2960 (s390x_emit_equal): New function.
2961 (s390x_emit_less_signed): New function.
2962 (s390x_emit_less_unsigned): New function.
2963 (s390x_emit_ref): New function.
2964 (s390x_emit_if_goto): New function.
2965 (s390x_emit_const): New function.
2966 (s390x_emit_call): New function.
2967 (s390x_emit_reg): New function.
2968 (s390x_emit_pop): New function.
2969 (s390x_emit_stack_flush): New function.
2970 (s390x_emit_zero_ext): New function.
2971 (s390x_emit_swap): New function.
2972 (s390x_emit_stack_adjust): New function.
2973 (s390x_emit_int_call_1): New function.
2974 (s390x_emit_void_call_2): New function.
2975 (s390x_emit_eq_goto): New function.
2976 (s390x_emit_ne_goto): New function.
2977 (s390x_emit_lt_goto): New function.
2978 (s390x_emit_le_goto): New function.
2979 (s390x_emit_gt_goto): New function.
2980 (s390x_emit_ge_goto): New function.
2981 (s390_emit_ops): New function.
2982 (struct linux_target_ops): Fill in emit_ops hook.
2983
29842016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2985
2986 PR 18377
2987 * Makefile.in: Add s390 IPA files.
2988 * configure.srv: Build IPA for s390.
2989 * linux-s390-ipa.c: New file.
2990 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2991 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2992 (tdesc_s390_linux32): Likewise.
2993 (init_registers_s390_linux32v1): Likewise.
2994 (tdesc_s390_linux32v1): Likewise.
2995 (init_registers_s390_linux32v2): Likewise.
2996 (tdesc_s390_linux32v2): Likewise.
2997 (init_registers_s390_linux64): Likewise.
2998 (tdesc_s390_linux64): Likewise.
2999 (init_registers_s390_linux64v1): Likewise.
3000 (tdesc_s390_linux64v1): Likewise.
3001 (init_registers_s390_linux64v2): Likewise.
3002 (tdesc_s390_linux64v2): Likewise.
3003 (init_registers_s390_te_linux64): Likewise.
3004 (tdesc_s390_te_linux64): Likewise.
3005 (init_registers_s390_vx_linux64): Likewise.
3006 (tdesc_s390_vx_linux64): Likewise.
3007 (init_registers_s390_tevx_linux64): Likewise.
3008 (tdesc_s390_tevx_linux64): Likewise.
3009 (init_registers_s390x_linux64): Likewise.
3010 (tdesc_s390x_linux64): Likewise.
3011 (init_registers_s390x_linux64v1): Likewise.
3012 (tdesc_s390x_linux64v1): Likewise.
3013 (init_registers_s390x_linux64v2): Likewise.
3014 (tdesc_s390x_linux64v2): Likewise.
3015 (init_registers_s390x_te_linux64): Likewise.
3016 (tdesc_s390x_te_linux64): Likewise.
3017 (init_registers_s390x_vx_linux64): Likewise.
3018 (tdesc_s390x_vx_linux64): Likewise.
3019 (init_registers_s390x_tevx_linux64): Likewise.
3020 (tdesc_s390x_tevx_linux64): Likewise.
3021 (have_hwcap_s390_vx): New static variable.
3022 (s390_arch_setup): Fill have_hwcap_s390_vx.
3023 (s390_get_thread_area): New function.
3024 (s390_ft_entry_gpr_esa): New const.
3025 (s390_ft_entry_gpr_zarch): New const.
3026 (s390_ft_entry_misc): New const.
3027 (s390_ft_entry_fr): New const.
3028 (s390_ft_entry_vr): New const.
3029 (s390_ft_main_31): New const.
3030 (s390_ft_main_64): New const.
3031 (s390_ft_exit_fr): New const.
3032 (s390_ft_exit_vr): New const.
3033 (s390_ft_exit_misc): New const.
3034 (s390_ft_exit_gpr_esa): New const.
3035 (s390_ft_exit_gpr_zarch): New const.
3036 (append_insns): New function.
3037 (s390_relocate_instruction): New function.
3038 (s390_install_fast_tracepoint_jump_pad): New function.
3039 (s390_get_min_fast_tracepoint_insn_len): New function.
3040 (s390_get_ipa_tdesc_idx): New function.
3041 (struct linux_target_ops): Wire in the above functions.
3042 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3043 * linux-s390-tdesc.h: New file.
3044
30452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3046
3047 * linux-s390-low.c (s390_supports_tracepoints): New function.
3048 (struct linux_target_ops): Fill supports_tracepoints hook.
3049
30502016-03-18 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-low.c (lwp_signal_can_be_delivered): New function.
3053 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3054
30552016-03-18 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3058 0 if signal is enqueued. Remove 'signal' from one debugging
3059 message. Move one debugging message to some lines below.
3060 Remove code setting 'signal' to 0.
3061
30622016-03-18 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-low.c (linux_low_filter_event): Remove redundant
3065 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3066
30672016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3068
3069 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3070 (struct linux_target_ops): Wire in the above.
3071
30722016-03-03 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-low.c: Update comments to start_step_over.
3075
30762016-03-03 Yao Qi <yao.qi@linaro.org>
3077
3078 PR server/19736
3079 * linux-low.c (handle_extended_wait): Set child suspended
3080 if event_lwp->bp_reinsert isn't zero.
3081
30822016-03-02 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3085 enqueue_pending_signal.
3086
30872016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3088
3089 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3090 is actually loaded.
3091
30922016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3093
3094 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3095 (s390_regmap_3264) [!__s390x__]: New global.
3096 (s390_collect_ptrace_register): Skip map entries containing -1.
3097 (s390_supply_ptrace_register): Ditto.
3098 (s390_fill_gprs_high): New function.
3099 (s390_store_gprs_high): New function.
3100 (s390_regsets): Add NT_S390_HIGH_GPRS.
3101 (s390_get_hwcap): Enable on 31-bit.
3102 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3103 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3104 Detect NT_S390_HIGH_GPRS.
3105 (s390_usrregs_info_3264): Enable on 31-bit.
3106 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3107 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3108
31092016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3110
3111 PR gdb/13808
3112 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3113 * configure.srv: Ditto.
3114 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3115 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3116 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3117 (init_registers_amd64_linux): Remove prototype.
3118 (tdesc_amd64_linux): Remove declaration.
3119 (get_ipa_tdesc): New function.
3120 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3121 initialize remaining tdescs.
3122 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3123 (init_registers_i386_linux): Remove prototype.
3124 (tdesc_i386_linux): Remove declaration.
3125 (get_ipa_tdesc): New function.
3126 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3127 initialize remaining tdescs.
3128 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3129 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3130 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3131 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3132 (x86_get_ipa_tdesc_idx): New function.
3133 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3134 * linux-x86-tdesc.h: New file.
3135 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3136 (target_get_ipa_tdesc_idx): New macro.
3137 * tracepoint.c (ipa_tdesc_idx): New macro.
3138 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3139 (symbol_list): Add ipa_tdesc_idx.
3140 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3141 (ipa_tdesc): Remove.
3142 (ipa_tdesc_idx): New variable.
3143 (get_context_regcache): Use get_ipa_tdesc.
3144 (gdb_collect): Ditto.
3145 (gdb_probe): Ditto.
3146 * tracepoint.h (get_ipa_tdesc): New prototype.
3147 (ipa_tdesc): Remove.
3148
31492016-02-24 Pedro Alves <palves@redhat.com>
3150
3151 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3152 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3153 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3154 Factor out common code between the USE_SIGTRAP_SIGINFO and
3155 !USE_SIGTRAP_SIGINFO blocks.
3156 (linux_low_filter_event): Call save_stop_reason instead of
3157 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3158 Update comments.
3159 (linux_wait_1): Update comments.
3160
31612016-02-24 Wei-cheng Wang <cole945@gmail.com>
3162
3163 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3164 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3165 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3166 ppc_insert_point, ppc_remove_point.
3167
31682016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3169
3170 * linux-s390-low.c (s390_supports_z_point_type): New function.
3171 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3172
31732016-02-16 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3176 PC. Get pc from regcache_read_pc.
3177
31782016-02-12 Yao Qi <yao.qi@linaro.org>
3179
3180 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3181 or linux_get_pc_32bit.
3182 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3183
31842016-02-12 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3187 arm_linux_get_next_pcs_fixup.
3188
31892016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3190
3191 * tracepoint.c (x_tracepoint_action_download): Change
3192 write_inferior_data_ptr to write_inferior_data_pointer.
3193 (cmd_qtstart): Likewise.
3194 (write_inferior_data_ptr): Remove.
3195 (download_agent_expr): Change write_inferior_data_ptr to
3196 write_inferior_data_pointer.
3197 (download_tracepoint_1): Likewise.
3198 (download_tracepoint): Likewise.
3199 (download_trace_state_variables): Likewise.
3200
32012016-02-11 Wei-cheng Wang <cole945@gmail.com>
3202 Marcin Kościelnicki <koriakin@0x04.net>
3203
3204 * tracepoint.c (struct tracepoint_action_ops): Remove.
3205 (struct tracepoint_action): Remove ops.
3206 (m_tracepoint_action_download, r_tracepoint_action_download)
3207 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3208 size and offset accordingly.
3209 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3210 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3211 (tracepoint_action_send, tracepoint_action_download): New functions.
3212 Helpers for trace action handlers.
3213 (add_tracepoint_action): Remove setup actions ops.
3214 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3215
32162016-02-10 Yao Qi <yao.qi@linaro.org>
3217
3218 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3219
32202016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3221
3222 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3223 to AC_OUTPUT.
3224 * configure: Regenerate.
3225
32262016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3227
3228 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3229 void * to gdb_byte *.
3230 * linux-low.c (siginfo_fixup): Likewise.
3231 (linux_xfer_siginfo): Likewise.
3232 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3233 Likewise.
3234 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3235
32362016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3237
3238 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3239 to srv_tgtobj.
3240 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3241 to srv_tgtobj.
3242 * linux-x86-low.c [__x86_64__]: Include
3243 "nat/amd64-linux-siginfo.h".
3244 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3245 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3246 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3247 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3248 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3249 (cpt_si_fd, si_timerid, si_overrun): Move from
3250 nat/amd64-linux-siginfo.c.
3251 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3252
32532016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3254
3255 * server.c (skip_to_semicolon): Remove.
3256 (process_point_options): Use strchrnul instead of
3257 skip_to_semicolon.
3258
32592016-01-26 Yao Qi <yao.qi@linaro.org>
3260
3261 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3262 * linux-low.c (install_software_single_step_breakpoints): Don't
3263 call regcache_read_pc.
3264 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3265 argument pc.
3266
32672016-01-26 Yao Qi <yao.qi@linaro.org>
3268
3269 * linux-low.c (install_software_single_step_breakpoints): Call
3270 regcache_read_pc instead of get_pc.
3271
32722016-01-26 Yao Qi <yao.qi@linaro.org>
3273
3274 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3275 (unblock_async_io): Rename to ...
3276 (block_unblock_async_io): ... it. New function.
3277 (enable_async_io): Don't install SIGIO handler. Unblock it
3278 instead.
3279 (disable_async_io): Don't ignore SIGIO. Block it instead.
3280 (initialize_async_io): Install SIGIO handler. Don't call
3281 unblock_async_io.
3282
32832016-01-26 Yao Qi <yao.qi@linaro.org>
3284
3285 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3286 first character is '\003', call *the_target->request_interrupt.
3287
32882016-01-25 Yao Qi <yao.qi@linaro.org>
3289
3290 * remote-utils.c (new_thread_notify): Remove.
3291 (dead_thread_notify): Likewise.
3292 * remote-utils.h (new_thread_notify): Remove declaration.
3293 (dead_thread_notify): Likewise.
3294
32952016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3296
3297 * gdb.trace/pending.exp: Fix expected message on continue.
3298
32992016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3300
3301 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3302 it works properly on big-endian machines where sizeof (CORE_ADDR)
3303 != sizeof (void *).
3304
33052016-01-21 Pedro Alves <palves@redhat.com>
3306
3307 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3308 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3309 * configure: Regenerate.
3310
33112016-01-21 Yao Qi <yao.qi@linaro.org>
3312
3313 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3314 is_thumb and set it according to CPSR saved on the stack.
3315 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3316 arm_sigreturn_next_pc.
3317
33182016-01-18 Yao Qi <yao.qi@linaro.org>
3319
3320 * linux-low.c (linux_set_pc_64bit): New function.
3321 (linux_get_pc_64bit): New function.
3322 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3323 Declare.
3324 * linux-sparc-low.c (debug_threads): Remove declaration.
3325 (sparc_get_pc): Remove.
3326 (the_low_target): Use linux_get_pc_64bit instead of
3327 sparc_get_pc.
3328 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3329 (the_low_target): Use linux_get_pc_64bit and
3330 linux_set_pc_64bit.
3331
33322016-01-18 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-arm-low.c (debug_threads): Remove declaration.
3335 (arm_get_pc, arm_set_pc): Remove.
3336 (the_low_target): Use linux_get_pc_32bit and
3337 linux_set_pc_32bit.
3338 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3339 (the_low_target): Use linux_get_pc_32bit and
3340 linux_set_pc_32bit.
3341 * linux-cris-low.c (debug_threads): Remove declaration.
3342 (cris_get_pc, cris_set_pc,): Remove.
3343 (the_low_target): Use linux_get_pc_32bit and
3344 linux_set_pc_32bit.
3345 * linux-crisv32-low.c (debug_threads): Remove declaration.
3346 (cris_get_pc, cris_set_pc): Remove.
3347 (the_low_target): Use linux_get_pc_32bit and
3348 linux_set_pc_32bit.
3349 * linux-low.c: Include inttypes.h.
3350 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3351 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3352 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3353 (the_low_target): Use linux_get_pc_32bit and
3354 linux_set_pc_32bit.
3355 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3356 (the_low_target): Use linux_get_pc_32bit and
3357 linux_set_pc_32bit.
3358 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3359 (the_low_target): Use linux_get_pc_32bit and
3360 linux_set_pc_32bit.
3361 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3362 (the_low_target): Use linux_get_pc_32bit and
3363 linux_set_pc_32bit.
3364 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3365 (the_low_target): Use linux_get_pc_32bit and
3366 linux_set_pc_32bit.
3367
33682016-01-18 Gary Benson <gbenson@redhat.com>
3369
3370 * configure.ac (AC_FUNC_FORK): New check.
3371 * config.in: Regenerate.
3372 * configure: Likewise.
3373
33742016-01-14 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3377 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3378 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3379 arm_get_next_pcs_ctor.
3380
33812016-01-12 Josh Stone <jistone@redhat.com>
3382 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3383
3384 * inferiors.h: Include "gdb_vecs.h".
3385 (struct process_info): Add syscalls_to_catch.
3386 * inferiors.c (remove_process): Free syscalls_to_catch.
3387 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3388 syscall_return stops.
3389 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3390 * server.c (handle_general_set): Handle QCatchSyscalls.
3391 (handle_query): Report support for QCatchSyscalls.
3392 * target.h (struct target_ops): Add supports_catch_syscall.
3393 (target_supports_catch_syscall): New macro.
3394 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3395 (struct lwp_info): Add syscall_state.
3396 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3397 Maintain syscall_state and syscalls_to_catch across exec.
3398 (get_syscall_trapinfo): New function, proxy to the_low_target.
3399 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3400 (linux_low_filter_event): Toggle syscall_state entry/return for
3401 syscall traps, and set it ignored for all others.
3402 (gdb_catching_syscalls_p): New function.
3403 (gdb_catch_this_syscall_p): New function.
3404 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3405 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3406 (linux_supports_catch_syscall): New function.
3407 (linux_target_ops): Install it.
3408 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3409 (the_low_target): Install it.
3410
34112016-01-12 Mike Frysinger <vapier@gentoo.org>
3412
3413 * acinclude.m4: Include new ../warning.m4 file.
3414 * configure: Regenerated.
3415 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3416
34172016-01-12 Mike Frysinger <vapier@gentoo.org>
3418
3419 * ax.c (is_goto_target): Mark static.
3420 * linux-low.c (register_addr): Likewise.
3421 (linux_fetch_registers, linux_store_registers): Likewise.
3422 * mem-break.c (any_persistent_commands): Fix old prototype.
3423 (add_commands_to_breakpoint): Mark static.
3424 * regcache.c (find_register_by_name): Delete unused func.
3425 * remote-utils.c (hex_or_minus_one): Mark static.
3426 * server.c (monitor_show_help): Mark static.
3427 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3428 handle_v_requests): Likewise.
3429
34302016-01-12 Pedro Alves <palves@redhat.com>
3431
3432 Remove use of the registered trademark symbol throughout.
3433
34342016-01-08 Yao Qi <yao.qi@linaro.org>
3435
3436 * remote-utils.c (getpkt): If c is '\003', call target hook
3437 request_interrupt.
3438
34392016-01-06 Yao Qi <yao.qi@linaro.org>
3440
3441 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3442 linux-aarch32-low.c.
3443 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3444 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3445 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3446 (thumb2_breakpoint): Declare.
3447 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3448 linux-aarch32-low.h.
3449 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3450 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3451 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3452
34532016-01-01 Joel Brobecker <brobecker@adacore.com>
3454
3455 * gdbreplay.c (gdbreplay_version): Change copyright year in
3456 version message.
3457 * server.c (gdbserver_version): Likewise.
3458
34592015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3460
3461 * server.c (crc32_table): Delete.
3462 (crc32): Use libiberty's xcrc32 function.
3463
34642015-12-22 Joel Brobecker <brobecker@adacore.com>
3465
3466 * lynx-low.c (lynx_delete_thread_callback): New function.
3467 (lynx_mourn): Properly delete our process and all of its
3468 threads. Remove call to clear_inferiors.
3469
34702015-12-22 Joel Brobecker <brobecker@adacore.com>
3471
3472 * target.c (thread_search_callback): Add check that
3473 the thread_stopped target callback is not NULL before
3474 calling it.
3475
34762015-12-21 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3479 arm breakpoint.
3480
34812015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3482
3483 * server.c (handle_query): Call target_supports_software_single_step.
3484
34852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3486
3487 * linux-low.c (single_step): New function.
3488 (linux_resume_one_lwp_throw): Call single_step.
3489 (start_step_over): Likewise.
3490
34912015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3492
3493 * Makefile.in (SFILES): Append arch/arm-linux.c,
3494 arch/arm-get-next-pcs.c.
3495 (arm-linux.o): New rule.
3496 (arm-get-next-pcs.o): New rule.
3497 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3498 arm-linux.o.
3499 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3500 to linux-aarch32-low.c.
3501 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3502 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3503 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3504 (thumb2_breakpoint_len): Likewise.
3505 (arm_is_thumb_mode): Make non-static.
3506 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3507 from linux-aarch32-low.c.
3508 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3509 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3510 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3511 (thumb2_breakpoint_len): Likewise.
3512 (arm_is_thumb_mode): New declaration.
3513 * linux-arm-low.c: Include arch/arm-linux.h
3514 aarch/arm-get-next-pcs.h, sys/syscall.h.
3515 (get_next_pcs_ops): New struct.
3516 (get_next_pcs_addr_bits_remove): New function.
3517 (get_next_pcs_is_thumb): New function.
3518 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3519 (arm_sigreturn_next_pc): Likewise.
3520 (get_next_pcs_syscall_next_pc): Likewise.
3521 (arm_gdbserver_get_next_pcs): Likewise.
3522 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3523 Initialize.
3524 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3525 * server.h: Include gdb_vecs.h.
3526
35272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3528
3529 * Makefile.in (SFILES): Append common/common-regcache.c.
3530 (OBS): Append common-regcache.o.
3531 (common-regcache.o): New rule.
3532 * regcache.c (init_register_cache): Initialize cache to
3533 REG_UNAVAILABLE.
3534 (regcache_raw_read_unsigned): New function.
3535 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3536 register_status enum.
3537
35382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3539
3540 * linux-aarch64-low.c (the_low_targets): Rename
3541 breakpoint_reinsert_addr to get_next_pcs.
3542 * linux-arm-low.c (the_low_targets): Likewise.
3543 * linux-bfin-low.c (the_low_targets): Likewise.
3544 * linux-cris-low.c (the_low_targets): Likewise.
3545 * linux-crisv32-low.c (the_low_targets): Likewise.
3546 * linux-low.c (can_software_single_step): Likewise.
3547 (install_software_single_step_breakpoints): New function.
3548 (start_step_over): Use install_software_single_step_breakpoints.
3549 * linux-low.h: New CORE_ADDR vector.
3550 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3551 get_next_pcs.
3552 * linux-mips-low.c (the_low_targets): Likewise.
3553 * linux-nios2-low.c (the_low_targets): Likewise.
3554 * linux-sparc-low.c (the_low_targets): Likewise.
3555
35562015-12-17 Pedro Alves <palves@redhat.com>
3557
3558 * linux-low.c (linux_kill_one_lwp): Remove references to
3559 LinuxThreads.
3560 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3561 to 'kill'.
3562 (linux_init_signals): Delete.
3563 (initialize_low): Adjust.
3564 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3565
35662015-12-16 Pedro Alves <palves@redhat.com>
3567
3568 * configure.ac (compiler warning flags): When testing a
3569 -Wno-foo option, check whether -Wfoo works instead.
3570 * configure: Regenerate.
3571
35722015-12-11 Don Breazeal <donb@codesourcery.com>
3573
3574 * server.c (process_serial_event): Don't exit from gdbserver
3575 in remote mode if there are still active inferiors.
3576
35772015-12-11 Yao Qi <yao.qi@linaro.org>
3578
3579 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3580 arm_breakpoint_at if the process is 32-bit.
3581
35822015-12-11 Yao Qi <yao.qi@linaro.org>
3583
3584 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3585 arm breakpoint.
3586
35872015-12-07 Yao Qi <yao.qi@linaro.org>
3588
3589 * configure.srv: Append arm.o to srv_tgtobj for
3590 aarch64*-*-linux* target.
3591 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3592 from linux-arm-low.c.
3593 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3594 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3595 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3596 (thumb2_breakpoint_len): Likewise.
3597 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3598 (arm_breakpoint_kinds): Likewise.
3599 (arm_breakpoint_kind_from_pc): Likewise.
3600 (arm_sw_breakpoint_from_kind): Likewise.
3601 (arm_breakpoint_kind_from_current_state): Likewise.
3602 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3603 (arm_sw_breakpoint_from_kind): Declare.
3604 (arm_breakpoint_kind_from_current_state): Declare.
3605 (arm_breakpoint_at): Declare.
3606 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3607 arm_sw_breakpoint_from_kind if process is 32-bit.
3608 (aarch64_breakpoint_kind_from_pc): New function.
3609 (aarch64_breakpoint_kind_from_current_state): New function.
3610 (the_low_target): Initialize fields breakpoint_kind_from_pc
3611 and breakpoint_kind_from_current_state.
3612 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3613 linux-aarch32-low.c.
3614 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3615 (arm_breakpoint, arm_breakpoint_len): Likewise.
3616 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3617 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3618 (arm_is_thumb_mode): Likewise.
3619 (arm_breakpoint_at): Likewise.
3620 (arm_breakpoint_kind_from_pc): Likewise.
3621 (arm_sw_breakpoint_from_kind): Likewise.
3622 (arm_breakpoint_kind_from_current_state): Likewise.
3623
3624 Revert:
3625 2015-08-04 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3628 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3629 * server.c (extended_protocol): Remove "static".
3630 * server.h (extended_protocol): Declare it.
3631
36322015-12-04 Josh Stone <jistone@redhat.com>
3633
3634 * target.h (struct target_ops) <arch_setup>: Rename to ...
3635 (struct target_ops) <post_create_inferior>: ... this.
3636 (target_arch_setup): Rename to ...
3637 (target_post_create_inferior): ... this, calling post_create_inferior.
3638 * server.c (start_inferior): Update target_arch_setup calls to
3639 target_post_create_inferior.
3640 * linux-low.c (linux_low_ptrace_options): Forward declare.
3641 (linux_arch_setup): Update its comment for general use.
3642 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3643 (struct linux_target_ops): Use linux_post_create_inferior.
3644 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3645 to post_create_inferior.
3646 * nto-low.c (struct nto_target_ops): Likewise.
3647 * spu-low.c (struct spu_target_ops): Likewise.
3648 * win32-low.c (struct win32_target_ops): Likewise.
3649
36502015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651
3652 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3653
36542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3655
3656 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3657 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3658 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3659 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3660 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3661 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3662 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3663 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3664 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3665 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3666 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3667 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3668
36692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3670
3671 * linux-low.c (linux_look_up_symbols): Don't call
3672 linux_supports_traceclone.
3673 * linux-low.h (thread_db_init): Remove use_events argument.
3674 * thread-db.c (thread_db_use_event): Remove global variable.
3675 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3676 (struct thread_db) <td_create_bp>: Remove field.
3677 (thread_db_create_event): Remove function.
3678 (thread_db_enable_reporting): Likewise.
3679 (find_one_thread): Don't check for thread_db_use_events.
3680 (attach_thread): Likewise.
3681 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3682 (try_thread_db_load_1): Don't check for thread_db_use_events.
3683 (thread_db_init): Remove use_events argument and thread events
3684 handling.
3685 (remove_thread_event_breakpoints): Remove function.
3686 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3687
36882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3689
3690 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3691 New function.
3692 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3693 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3694 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3695 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3696 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3697 Initialize.
3698 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3699 New function.
3700 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3701 * linux-low.c (can_hardware_single_step): Use
3702 supports_hardware_single_step.
3703 (can_software_single_step): New function.
3704 (start_step_over): Call can_software_single_step.
3705 (linux_supports_hardware_single_step): New function.
3706 (struct target_ops) <supports_software_single_step>: Initialize.
3707 * linux-low.h (struct linux_target_ops)
3708 <supports_hardware_single_step>: Initialize.
3709 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3710 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3711 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3712 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3713 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3714 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3715 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3716 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3717 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3718 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3719 Initialize.
3720 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3721 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3722 Initialize.
3723 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3724 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3725 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3726 New function.
3727 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3728 * target.h (struct target_ops): <supports_software_single_step>:
3729 New field.
3730 (target_supports_software_single_step): New macro.
3731
37322015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3733
3734 * linux-low.c (linux_wait_1): Fix pc advance condition.
3735 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3736 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3737
37382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3739
3740 * linux-arm-low.c (arm_is_thumb_mode): New function.
3741 (arm_breakpoint_at): Use arm_is_thumb_mode.
3742 (arm_breakpoint_kind_from_current_state): New function.
3743 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3744 Initialize.
3745 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3746 (linux_breakpoint_kind_from_current_state): New function.
3747 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3748 * linux-low.h (struct linux_target_ops)
3749 <breakpoint_kind_from_current_state>: New field.
3750 * target.h (struct target_ops): Likewise.
3751 (target_breakpoint_kind_from_current_state): New macro.
3752
37532015-11-30 Pedro Alves <palves@redhat.com>
3754
3755 * linux-low.c (linux_resume): Wake up the event loop before
3756 returning.
3757
37582015-11-30 Pedro Alves <palves@redhat.com>
3759
3760 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3761 check.
3762 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3763 to -1.
3764 * target.c (struct thread_search): New structure.
3765 (thread_search_callback): New function.
3766 (prev_general_thread): New global.
3767 (prepare_to_access_memory, done_accessing_memory): New functions.
3768 * target.h (prepare_to_access_memory, done_accessing_memory):
3769 Replace macros with function declarations.
3770
37712015-11-30 Pedro Alves <palves@redhat.com>
3772
3773 PR 14618
3774 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3775 report TARGET_WAITKIND_NO_RESUMED.
3776 * remote-utils.c (prepare_resume_reply): Handle
3777 TARGET_WAITKIND_NO_RESUMED.
3778 * server.c (report_no_resumed): New global.
3779 (handle_query) <qSupported>: Handle "no-resumed+". Report
3780 "no-resumed+" support.
3781 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3782 return error if the client doesn't support no-resumed events.
3783 (push_stop_notification): New function.
3784 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3785 events if the client supports them.
3786
37872015-11-30 Pedro Alves <palves@redhat.com>
3788
3789 * linux-low.c (thread_still_has_status_pending_p): Don't check
3790 vCont;t here.
3791 (lwp_resumed): New function.
3792 (status_pending_p_callback): Return early if the LWP is not
3793 supposed to be resumed.
3794
37952015-11-30 Pedro Alves <palves@redhat.com>
3796
3797 * linux-low.c (handle_extended_wait): Assert that the LWP's
3798 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3799 thread create events, leave the new child's status pending.
3800 (linux_low_filter_event): If GDB wants to hear about thread exit
3801 events, leave the LWP marked dead and don't delete it.
3802 (linux_wait_for_event_filtered): Don't check for thread exit.
3803 (filter_exit_event): New function.
3804 (linux_wait_1): Use it, when returning an exit event.
3805 (linux_resume_one_lwp_throw): Assert that the LWP's
3806 waitstatus is TARGET_WAITKIND_IGNORE.
3807 * remote-utils.c (prepare_resume_reply): Handle
3808 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3809 * server.c (report_thread_events): New global.
3810 (handle_general_set): Handle QThreadEvents.
3811 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3812 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3813 TARGET_WAITKIND_THREAD_EXITED.
3814 * server.h (report_thread_events): Declare.
3815
38162015-11-30 Pedro Alves <palves@redhat.com>
3817
3818 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3819 the thread's last_resume_kind was resume_stop.
3820
38212015-11-30 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3824 before returning.
3825
38262015-11-30 Pedro Alves <palves@redhat.com>
3827
3828 * server.c (handle_v_requests): Handle vCtrlC.
3829
38302015-11-30 Pedro Alves <palves@redhat.com>
3831
3832 * gdbthread.h (find_any_thread_of_pid): Declare.
3833 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3834 functions.
3835 * server.c (handle_query): If current_thread is NULL, look for
3836 another thread of the selected process.
3837
38382015-11-26 Daniel Colascione <dancol@dancol.org>
3839 Simon Marchi <simon.marchi@ericsson.com>
3840
3841 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3842 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3843 name in reply.
3844 * target.h (struct target_ops) <thread_name>: New field.
3845 (target_thread_name): New macro.
3846
38472015-11-23 Joel Brobecker <brobecker@adacore.com>
3848
3849 * regcache.h (regcache_invalidate_pid): Add declaration.
3850 * regcache.c (regcache_invalidate_pid): New function, extracted
3851 from regcache_invalidate.
3852 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3853 Add trivial documentation comment.
3854 * lynx-low.c: Use regcache_invalidate_pid instead of
3855 regcache_invalidate.
3856
38572015-11-23 Joel Brobecker <brobecker@adacore.com>
3858
3859 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3860 and Elf64_auxv_t if the target is Android.
3861
38622015-11-22 Doug Evans <xdje42@gmail.com>
3863
3864 * target.h: #include <sys/types.h>.
3865
38662015-11-19 Pedro Alves <palves@redhat.com>
3867
3868 * linux-low.c (linux_process_qsupported): Change prototype.
3869 Adjust.
3870 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3871 Change prototype.
3872 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3873 and adjust to loop over all features.
3874 * server.c (handle_query) <qSupported>: Adjust to call
3875 target_process_qsupported once, passing it a vector of unprocessed
3876 features.
3877 * target.h (struct target_ops) <process_qsupported>: Change
3878 prototype.
3879 (target_process_qsupported): Adjust.
3880
38812015-11-19 Pedro Alves <palves@redhat.com>
3882
3883 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3884 mode.
3885 * configure: Regenerate.
3886
38872015-11-19 Pedro Alves <palves@redhat.com>
3888
3889 * configure: Regenerate.
3890
38912015-11-19 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3894 type to uint32_t.
3895
38962015-11-19 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3899 (struct aarch64_operand): Move enum out.
3900
39012015-11-19 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3904 struct user_fpsimd_state *.
3905 (aarch64_store_fpregset): Likewise.
3906
39072015-11-19 Yao Qi <yao.qi@linaro.org>
3908
3909 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3910 struct user_pt_regs *.
3911 (aarch64_store_gregset): Likewise.
3912
39132015-11-18 Pedro Alves <palves@redhat.com>
3914
3915 * Makefile.in (all_object_files): Add $IPA_OBJS.
3916
39172015-11-17 Pedro Alves <palves@redhat.com>
3918
3919 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3920 GDB_SIGNAL_0 and gdb_signal_to_string.
3921
39222015-11-17 Pedro Alves <palves@redhat.com>
3923
3924 * win32-low.c (handle_output_debug_string): Remove parameter.
3925 (win32_kill): Remove our_status local and adjust call to
3926 handle_output_debug_string.
3927 (get_child_debug_event): Adjust call to
3928 handle_output_debug_string.
3929
39302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3931
3932 * linux-mips-low.c (mips_fill_gregset): Add cast.
3933 (mips_store_gregset): Likewise.
3934 (mips_fill_fpregset): Likewise.
3935 (mips_store_fpregset): Likewise.
3936
39372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3938
3939 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3940 priv.
3941
39422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3943
3944 * linux-mips-low.c (mips_linux_new_thread): Change type of
3945 watch_type to enum target_hw_bp_type.
3946
39472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3948
3949 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3950 Change return type to arm_hwbp_type.
3951
39522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3953
3954 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3955 (arm_store_gregset): Likewise.
3956 * linux-arm-low.c (arm_get_hwcap): Likewise.
3957 (arm_read_description): Likewise.
3958
39592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3960
3961 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3962
39632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3964
3965 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3966 (ppc_fill_vsxregset): Likewise.
3967 (ppc_store_vsxregset): Likewise.
3968 (ppc_fill_vrregset): Likewise.
3969 (ppc_store_vrregset): Likewise.
3970 (ppc_fill_evrregset): Likewise.
3971 (ppc_store_evrregset): Likewise.
3972
39732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3974
3975 * linux-ppc-low.c (ppc_usrregs_info): Remove
3976 forward-declaration.
3977 (ppc_arch_setup): Move lower in file.
3978
39792015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3982 (ps_pdwrite): Likewise.
3983
39842015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3985
3986 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3987 to after assert checks.
3988
39892015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * proc-service.c (ps_pdread): Add/adjust casts.
3992 (ps_pdwrite): Add/adjust casts.
3993
39942015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3995
3996 * server.c (handle_search_memory_1): Cast return value of
3997 memmem.
3998
39992015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4000
4001 * server.c (write_qxfer_response): Change type of data to
4002 gdb_byte *.
4003
40042015-10-29 Pedro Alves <palves@redhat.com>
4005
4006 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4007
40082015-10-29 Pedro Alves <palves@redhat.com>
4009
4010 * tracepoint.c (clear_installed_tracepoints): Add casts.
4011
40122015-10-29 Pedro Alves <palves@redhat.com>
4013
4014 * server.c (handle_v_cont, process_serial_event): Add enum
4015 gdb_signal casts to signal parsing code.
4016
40172015-10-29 Pedro Alves <palves@redhat.com>
4018
4019 * linux-low.h (NULL_REGSET): Define.
4020 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4021 * linux-arm-low.c (arm_regsets): Likewise.
4022 * linux-crisv32-low.c (cris_regsets): Likewise.
4023 * linux-m68k-low.c (m68k_regsets): Likewise.
4024 * linux-mips-low.c (mips_regsets): Likewise.
4025 * linux-nios2-low.c (nios2_regsets): Likewise.
4026 * linux-ppc-low.c (ppc_regsets): Likewise.
4027 * linux-s390-low.c (s390_regsets): Likewise.
4028 * linux-sh-low.c (sh_regsets): Likewise.
4029 * linux-sparc-low.c (sparc_regsets): Likewise.
4030 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4031 * linux-tile-low.c (tile_regsets): Likewise.
4032 * linux-x86-low.c (x86_regsets): Likewise.
4033 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4034
40352015-10-29 Pedro Alves <palves@redhat.com>
4036
4037 * linux-low.h (NULL_REGSET): Define.
4038 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4039 * linux-arm-low.c (arm_regsets): Likewise.
4040 * linux-crisv32-low.c (cris_regsets): Likewise.
4041 * linux-m68k-low.c (m68k_regsets): Likewise.
4042 * linux-mips-low.c (mips_regsets): Likewise.
4043 * linux-nios2-low.c (nios2_regsets): Likewise.
4044 * linux-ppc-low.c (ppc_regsets): Likewise.
4045 * linux-s390-low.c (s390_regsets): Likewise.
4046 * linux-sh-low.c (sh_regsets): Likewise.
4047 * linux-sparc-low.c (sparc_regsets): Likewise.
4048 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4049 * linux-tile-low.c (tile_regsets): Likewise.
4050 * linux-x86-low.c (x86_regsets): Likewise.
4051 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4052
40532015-10-26 Doug Evans <dje@google.com>
4054
4055 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4056
40572015-10-26 Doug Evans <dje@google.com>
4058
4059 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4060
40612015-10-26 Doug Evans <dje@google.com>
4062
4063 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4064 for debug_printf.
4065 (attach_thread, find_new_threads_callback): Ditto.
4066
40672015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4068
4069 * mem-break.h (set_breakpoint_data): Remove.
4070
40712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4072
4073 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4074 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4075 (initialize_low): Remove set_breakpoint_data call.
4076 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4077 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4078 (initialize_low): Remove set_breakpoint_data call.
4079 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4080 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4081 (initialize_low): Remove set_breakpoint_data call.
4082
40832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4084
4085 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4086 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4087 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4088 * target.h (target_breakpoint_kind_from_pc): New macro.
4089
40902015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4091
4092 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4093 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4094 the default breakpoint kind.
4095
40962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4097
4098 * linux-arm-low.c (arm_supports_z_point_type): Add software
4099 breakpoint support.
4100
41012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4102
4103 * linux-arm-low.c: Refactor breakpoint definitions.
4104 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4105 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4106
41072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4108
4109 * Makefile.in: Add arm.c/o.
4110 * configure.srv: Likewise.
4111 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4112 (arm_breakpoint_kind_from_pc): New function.
4113 (arm_sw_breakpoint_from_kind): Return proper kind.
4114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4115
41162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4117
4118 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4119 removal.
4120 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4121 (struct raw_breakpoint) <size>: Remove.
4122 (struct raw_breakpoint) <kind>: Add.
4123 (bp_size): New function.
4124 (bp_opcode): Likewise.
4125 (find_raw_breakpoint_at): Adjust for kind.
4126 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4127 (remove_memory_breakpoint): Adjust for kind call bp_size.
4128 (set_raw_breakpoint_at): Adjust for kind.
4129 (set_breakpoint): Likewise.
4130 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4131 (delete_raw_breakpoint): Adjust for kind.
4132 (delete_breakpoint): Likewise.
4133 (find_gdb_breakpoint): Likewise.
4134 (set_gdb_breakpoint_1): Likewise.
4135 (set_gdb_breakpoint): Likewise.
4136 (delete_gdb_breakpoint_1): Likewise.
4137 (delete_gdb_breakpoint): Likewise.
4138 (uninsert_raw_breakpoint): Likewise.
4139 (reinsert_raw_breakpoint): Likewise.
4140 (set_breakpoint_data): Remove.
4141 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4142 (check_mem_read): Adjust for kind call bp_size.
4143 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4144 (clone_one_breakpoint): Adjust for kind.
4145 * mem-break.h (set_gdb_breakpoint): Likewise.
4146 (delete_gdb_breakpoint): Likewise.
4147 * server.c (process_serial_event): Likewise.
4148
41492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4150
4151 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4152 (struct linux_target_ops) <breakpoint>: Remove.
4153 (struct linux_target_ops) <breakpoint_len>: Remove.
4154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4156 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4157 (arm_sw_breakpoint_from_kind): New function.
4158 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4159 (struct linux_target_ops) <breakpoint>: Remove.
4160 (struct linux_target_ops) <breakpoint_len>: Remove.
4161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4163 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4164 (struct linux_target_ops) <breakpoint>: Remove.
4165 (struct linux_target_ops) <breakpoint_len>: Remove.
4166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4168 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4169 (struct linux_target_ops) <breakpoint>: Remove.
4170 (struct linux_target_ops) <breakpoint_len>: Remove.
4171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4173 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4174 and sw_breakpoint_from_kind to increment the pc.
4175 (linux_breakpoint_kind_from_pc): New function.
4176 (linux_sw_breakpoint_from_kind): New function.
4177 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4178 (initialize_low): Call breakpoint_kind_from_pc and
4179 sw_breakpoint_from_kind to replace breakpoint_data/len.
4180 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4181 New field.
4182 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4183 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4184 (struct linux_target_ops) <breakpoint>: Remove.
4185 (struct linux_target_ops) <breakpoint_len>: Remove.
4186 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4187 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4188 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4189 (struct linux_target_ops) <breakpoint>: Remove.
4190 (struct linux_target_ops) <breakpoint_len>: Remove.
4191 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4192 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4193 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4194 (struct linux_target_ops) <breakpoint>: Remove.
4195 (struct linux_target_ops) <breakpoint_len>: Remove.
4196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4198 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4199 (struct linux_target_ops) <breakpoint>: Remove.
4200 (struct linux_target_ops) <breakpoint_len>: Remove.
4201 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4202 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4203 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4204 (struct linux_target_ops) <breakpoint>: Remove.
4205 (struct linux_target_ops) <breakpoint_len>: Remove.
4206 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4207 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4208 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4209 (struct linux_target_ops) <breakpoint>: Remove.
4210 (struct linux_target_ops) <breakpoint_len>: Remove.
4211 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4212 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4213 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4214 (struct linux_target_ops) <breakpoint>: Remove.
4215 (struct linux_target_ops) <breakpoint_len>: Remove.
4216 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4217 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4218 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4219 (struct linux_target_ops) <breakpoint>: Remove.
4220 (struct linux_target_ops) <breakpoint_len>: Remove.
4221 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4222 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4223 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4224 (struct linux_target_ops) <breakpoint>: Remove.
4225 (struct linux_target_ops) <breakpoint_len>: Remove.
4226 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4227 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4228 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4229 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4230 (struct linux_target_ops) <breakpoint>: Remove.
4231 (struct linux_target_ops) <breakpoint_len>: Remove.
4232 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4233 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4234 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4235 (struct linux_target_ops) <breakpoint>: Remove.
4236 (struct linux_target_ops) <breakpoint_len>: Remove.
4237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4239
42402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4241
4242 * linux-cris-low.c (cris_get_pc): Remove void arg.
4243
42442015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4245
4246 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4247 variable name.
4248
42492015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4250
4251 * inferiors.c (thread_pid_matches_callback): New function.
4252 (find_thread_process): New function.
4253 (remove_thread): Reset current_thread.
4254 (remove_process): Assert threads have been removed first.
4255
42562015-10-15 Yao Qi <yao.qi@linaro.org>
4257
4258 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4259 if it is 3.
4260 (aarch64_remove_point): Likewise.
4261 * regcache.c (regcache_register_size): New function.
4262
42632015-10-12 Yao Qi <yao.qi@linaro.org>
4264
4265 * linux-aarch64-low.c: Update all callers as emit_load_store
4266 is renamed to aarch64_emit_load_store.
4267
42682015-10-12 Yao Qi <yao.qi@linaro.org>
4269
4270 * linux-aarch64-low.c: Update all callers of function renaming
4271 from emit_insn to aarch64_emit_insn.
4272
42732015-10-12 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4276 arch/aarch64-insn.h.
4277 (struct aarch64_memory_operand): Likewise.
4278 (ENCODE): Likewise.
4279 (emit_insn): Move to arch/aarch64-insn.c.
4280 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4281 (emit_load_store): Move to arch/aarch64-insn.c.
4282 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4283 (can_encode_int32): Remove.
4284
42852015-10-12 Yao Qi <yao.qi@linaro.org>
4286
4287 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4288 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4289 (aarch64_relocate_instruction): Likewise.
4290 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4291 (struct aarch64_insn_visitor): Likewise.
4292
42932015-10-12 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4296 (struct aarch64_insn_visitor): New.
4297 (struct aarch64_insn_relocation_data): New.
4298 (aarch64_ftrace_insn_reloc_b): New function.
4299 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4300 (aarch64_ftrace_insn_reloc_cb): Likewise.
4301 (aarch64_ftrace_insn_reloc_tb): Likewise.
4302 (aarch64_ftrace_insn_reloc_adr): Likewise.
4303 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4304 (aarch64_ftrace_insn_reloc_others): Likewise.
4305 (visitor): New.
4306 (aarch64_relocate_instruction): Use visitor.
4307
43082015-10-12 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4311 int. Add argument buf.
4312 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4313 aarch64_relocate_instruction.
4314
43152015-10-12 Yao Qi <yao.qi@linaro.org>
4316
4317 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4318 argument insn. Remove local variable insn. Don't call
4319 target_read_uint32.
4320 (aarch64_install_fast_tracepoint_jump_pad): Call
4321 target_read_uint32.
4322
43232015-09-30 Yao Qi <yao.qi@linaro.org>
4324
4325 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4326 (emit_load_store_pair): Likewise.
4327
43282015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * dll.c (match_dll): Add cast(s).
4331 (unloaded_dll): Likewise.
4332 * linux-low.c (second_thread_of_pid_p): Likewise.
4333 (delete_lwp_callback): Likewise.
4334 (count_events_callback): Likewise.
4335 (select_event_lwp_callback): Likewise.
4336 (linux_set_resume_request): Likewise.
4337 * server.c (accumulate_file_name_length): Likewise.
4338 (emit_dll_description): Likewise.
4339 (handle_qxfer_threads_worker): Likewise.
4340 (visit_actioned_threads): Likewise.
4341 * thread-db.c (any_thread_of): Likewise.
4342 * tracepoint.c (same_process_p): Likewise.
4343 (match_blocktype): Likewise.
4344 (build_traceframe_info_xml): Likewise.
4345
43462015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4347
4348 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4349 assignment.
4350 (gdb_unparse_agent_expr): Likewise.
4351 * hostio.c (require_data): Likewise.
4352 (handle_pread): Likewise.
4353 * linux-low.c (disable_regset): Likewise.
4354 (fetch_register): Likewise.
4355 (store_register): Likewise.
4356 (get_dynamic): Likewise.
4357 (linux_qxfer_libraries_svr4): Likewise.
4358 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4359 (set_fast_tracepoint_jump): Likewise.
4360 (uninsert_fast_tracepoint_jumps_at): Likewise.
4361 (reinsert_fast_tracepoint_jumps_at): Likewise.
4362 (validate_inserted_breakpoint): Likewise.
4363 (clone_agent_expr): Likewise.
4364 * regcache.c (init_register_cache): Likewise.
4365 * remote-utils.c (putpkt_binary_1): Likewise.
4366 (decode_M_packet): Likewise.
4367 (decode_X_packet): Likewise.
4368 (look_up_one_symbol): Likewise.
4369 (relocate_instruction): Likewise.
4370 (monitor_output): Likewise.
4371 * server.c (handle_search_memory): Likewise.
4372 (handle_qxfer_exec_file): Likewise.
4373 (handle_qxfer_libraries): Likewise.
4374 (handle_qxfer): Likewise.
4375 (handle_query): Likewise.
4376 (handle_v_cont): Likewise.
4377 (handle_v_run): Likewise.
4378 (captured_main): Likewise.
4379 * target.c (write_inferior_memory): Likewise.
4380 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4381 * tracepoint.c (init_trace_buffer): Likewise.
4382 (add_tracepoint_action): Likewise.
4383 (add_traceframe): Likewise.
4384 (add_traceframe_block): Likewise.
4385 (cmd_qtdpsrc): Likewise.
4386 (cmd_qtdv): Likewise.
4387 (cmd_qtstatus): Likewise.
4388 (response_source): Likewise.
4389 (response_tsv): Likewise.
4390 (cmd_qtnotes): Likewise.
4391 (gdb_collect): Likewise.
4392 (initialize_tracepoint): Likewise.
4393
43942015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4395
4396 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4397 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4398 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4399 <NOP>: New.
4400 (enum aarch64_condition_codes): New enum.
4401 (w0): New static global.
4402 (fp): Likewise.
4403 (lr): Likewise.
4404 (struct aarch64_memory_operand) <type>: New
4405 MEMORY_OPERAND_POSTINDEX type.
4406 (postindex_memory_operand): New helper function.
4407 (emit_ret): New function.
4408 (emit_load_store_pair): New function, factored out of emit_stp
4409 with support for MEMORY_OPERAND_POSTINDEX.
4410 (emit_stp): Rewrite using emit_load_store_pair.
4411 (emit_ldp): New function.
4412 (emit_load_store): Likewise.
4413 (emit_ldr): Mention post-index instruction in comment.
4414 (emit_ldrh): New function.
4415 (emit_ldrb): New function.
4416 (emit_ldrsw): Mention post-index instruction in comment.
4417 (emit_str): Likewise.
4418 (emit_subs): New function.
4419 (emit_cmp): Likewise.
4420 (emit_and): Likewise.
4421 (emit_orr): Likewise.
4422 (emit_orn): Likewise.
4423 (emit_eor): Likewise.
4424 (emit_mvn): Likewise.
4425 (emit_lslv): Likewise.
4426 (emit_lsrv): Likewise.
4427 (emit_asrv): Likewise.
4428 (emit_mul): Likewise.
4429 (emit_sbfm): Likewise.
4430 (emit_sbfx): Likewise.
4431 (emit_ubfm): Likewise.
4432 (emit_ubfx): Likewise.
4433 (emit_csinc): Likewise.
4434 (emit_cset): Likewise.
4435 (emit_nop): Likewise.
4436 (emit_ops_insns): New helper function.
4437 (emit_pop): Likewise.
4438 (emit_push): Likewise.
4439 (aarch64_emit_prologue): New function.
4440 (aarch64_emit_epilogue): Likewise.
4441 (aarch64_emit_add): Likewise.
4442 (aarch64_emit_sub): Likewise.
4443 (aarch64_emit_mul): Likewise.
4444 (aarch64_emit_lsh): Likewise.
4445 (aarch64_emit_rsh_signed): Likewise.
4446 (aarch64_emit_rsh_unsigned): Likewise.
4447 (aarch64_emit_ext): Likewise.
4448 (aarch64_emit_log_not): Likewise.
4449 (aarch64_emit_bit_and): Likewise.
4450 (aarch64_emit_bit_or): Likewise.
4451 (aarch64_emit_bit_xor): Likewise.
4452 (aarch64_emit_bit_not): Likewise.
4453 (aarch64_emit_equal): Likewise.
4454 (aarch64_emit_less_signed): Likewise.
4455 (aarch64_emit_less_unsigned): Likewise.
4456 (aarch64_emit_ref): Likewise.
4457 (aarch64_emit_if_goto): Likewise.
4458 (aarch64_emit_goto): Likewise.
4459 (aarch64_write_goto_address): Likewise.
4460 (aarch64_emit_const): Likewise.
4461 (aarch64_emit_call): Likewise.
4462 (aarch64_emit_reg): Likewise.
4463 (aarch64_emit_pop): Likewise.
4464 (aarch64_emit_stack_flush): Likewise.
4465 (aarch64_emit_zero_ext): Likewise.
4466 (aarch64_emit_swap): Likewise.
4467 (aarch64_emit_stack_adjust): Likewise.
4468 (aarch64_emit_int_call_1): Likewise.
4469 (aarch64_emit_void_call_2): Likewise.
4470 (aarch64_emit_eq_goto): Likewise.
4471 (aarch64_emit_ne_goto): Likewise.
4472 (aarch64_emit_lt_goto): Likewise.
4473 (aarch64_emit_le_goto): Likewise.
4474 (aarch64_emit_gt_goto): Likewise.
4475 (aarch64_emit_ge_got): Likewise.
4476 (aarch64_emit_ops_impl): New static global variable.
4477 (aarch64_emit_ops): New target function, return
4478 &aarch64_emit_ops_impl.
4479 (struct linux_target_ops): Install it.
4480
44812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4482
4483 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4484 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4485 aarch64-ipa.o.
4486 * linux-aarch64-ipa.c: New file.
4487 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4488 and endian.h.
4489 (aarch64_get_thread_area): New target method.
4490 (extract_signed_bitfield): New helper function.
4491 (aarch64_decode_ldr_literal): New function.
4492 (enum aarch64_opcodes): New enum.
4493 (struct aarch64_register): New struct.
4494 (struct aarch64_operand): New struct.
4495 (x0): New static global.
4496 (x1): Likewise.
4497 (x2): Likewise.
4498 (x3): Likewise.
4499 (x4): Likewise.
4500 (w2): Likewise.
4501 (ip0): Likewise.
4502 (sp): Likewise.
4503 (xzr): Likewise.
4504 (aarch64_register): New helper function.
4505 (register_operand): Likewise.
4506 (immediate_operand): Likewise.
4507 (struct aarch64_memory_operand): New struct.
4508 (offset_memory_operand): New helper function.
4509 (preindex_memory_operand): Likewise.
4510 (enum aarch64_system_control_registers): New enum.
4511 (ENCODE): New macro.
4512 (emit_insn): New helper function.
4513 (emit_b): New function.
4514 (emit_bcond): Likewise.
4515 (emit_cb): Likewise.
4516 (emit_tb): Likewise.
4517 (emit_blr): Likewise.
4518 (emit_stp): Likewise.
4519 (emit_ldp_q_offset): Likewise.
4520 (emit_stp_q_offset): Likewise.
4521 (emit_load_store): Likewise.
4522 (emit_ldr): Likewise.
4523 (emit_ldrsw): Likewise.
4524 (emit_str): Likewise.
4525 (emit_ldaxr): Likewise.
4526 (emit_stxr): Likewise.
4527 (emit_stlr): Likewise.
4528 (emit_data_processing_reg): Likewise.
4529 (emit_data_processing): Likewise.
4530 (emit_add): Likewise.
4531 (emit_sub): Likewise.
4532 (emit_mov): Likewise.
4533 (emit_movk): Likewise.
4534 (emit_mov_addr): Likewise.
4535 (emit_mrs): Likewise.
4536 (emit_msr): Likewise.
4537 (emit_sevl): Likewise.
4538 (emit_wfe): Likewise.
4539 (append_insns): Likewise.
4540 (can_encode_int32_in): New helper function.
4541 (aarch64_relocate_instruction): New function.
4542 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4543 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4544 (struct linux_target_ops): Install aarch64_get_thread_area,
4545 aarch64_install_fast_tracepoint_jump_pad and
4546 aarch64_get_min_fast_tracepoint_insn_len.
4547
45482015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4549
4550 * Makefile.in (aarch64-insn.o): New rule.
4551 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4552
45532015-09-21 Yao Qi <yao.qi@linaro.org>
4554
4555 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4556
45572015-09-21 Yao Qi <yao.qi@linaro.org>
4558
4559 * tracepoint.c (max_jump_pad_size): Remove.
4560
45612015-09-18 Yao Qi <yao.qi@linaro.org>
4562
4563 * linux-aarch64-low.c: Don't include sys/uio.h.
4564 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4565
45662015-09-16 Wei-cheng Wang <cole945@gmail.com>
4567
4568 * tracepoint.c (eval_result_type): Change prototype.
4569 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4570
45712015-09-15 Pedro Alves <palves@redhat.com>
4572
4573 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4574 Check whether to report exec events instead of checking whether
4575 multiprocess is enabled.
4576
45772015-09-15 Pedro Alves <palves@redhat.com>
4578
4579 PR remote/18965
4580 * remote-utils.c (prepare_resume_reply): Merge
4581 TARGET_WAITKIND_VFORK_DONE switch case with the
4582 TARGET_WAITKIND_FORKED case.
4583
45842015-09-15 Yao Qi <yao.qi@linaro.org>
4585
4586 * server.c (handle_query): Check string comparison using
4587 "else if" instead of "if".
4588
45892015-09-15 Yao Qi <yao.qi@linaro.org>
4590
4591 * server.c (vCont_supported): New global variable.
4592 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4593 matches. Append ";vContSupported+" to own_buf.
4594 (handle_v_requests): Append ";s;S" to own_buf if target supports
4595 hardware single step or vCont_supported is false.
4596 (capture_main): Set vCont_supported to zero.
4597
45982015-09-15 Yao Qi <yao.qi@linaro.org>
4599
4600 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4601 it to ...
4602 (linux_supports_hardware_single_step): ... New function.
4603 (linux_target_ops): Update.
4604 * lynx-low.c (lynx_target_ops): Set field
4605 supports_hardware_single_step to target_can_do_hardware_single_step.
4606 * nto-low.c (nto_target_ops): Likewise.
4607 * spu-low.c (spu_target_ops): Likewise.
4608 * win32-low.c (win32_target_ops): Likewise.
4609 * target.c (target_can_do_hardware_single_step): New function.
4610 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4611 Remove. <supports_hardware_single_step>: New field.
4612 (target_supports_conditional_breakpoints): Remove.
4613 (target_supports_hardware_single_step): New macro.
4614 (target_can_do_hardware_single_step): Declare.
4615 * server.c (handle_query): Use target_supports_hardware_single_step
4616 instead of target_supports_conditional_breakpoints.
4617
46182015-09-15 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4621 function.
4622 (struct linux_target_ops the_low_target): Install
4623 aarch64_linux_siginfo_fixup.
4624
46252015-09-11 Don Breazeal <donb@codesourcery.com>
4626 Luis Machado <lgustavo@codesourcery.com>
4627
4628 * linux-low.c (linux_mourn): Static declaration.
4629 (linux_arch_setup): Move in front of
4630 handle_extended_wait.
4631 (linux_arch_setup_thread): New function.
4632 (handle_extended_wait): Handle exec events. Call
4633 linux_arch_setup_thread. Make event_lwp argument a
4634 pointer-to-a-pointer.
4635 (check_zombie_leaders): Do not check stopped threads.
4636 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4637 (linux_low_filter_event): Add lwp and thread for exec'ing
4638 non-leader thread if leader thread has been deleted.
4639 Refactor code into linux_arch_setup_thread and call it.
4640 Pass child lwp pointer by reference to handle_extended_wait.
4641 (linux_wait_for_event_filtered): Update comment.
4642 (linux_wait_1): Prevent clobbering exec event status.
4643 (linux_supports_exec_events): New function.
4644 (linux_target_ops) <supports_exec_events>: Initialize new member.
4645 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4646 new member.
4647 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4648 * server.c (report_exec_events): New global variable.
4649 (handle_query): Handle qSupported query for exec-events feature.
4650 (captured_main): Initialize report_exec_events.
4651 * server.h (report_exec_events): Declare new global variable.
4652 * target.h (struct target_ops) <supports_exec_events>: New
4653 member.
4654 (target_supports_exec_events): New macro.
4655 * win32-low.c (win32_target_ops) <supports_exec_events>:
4656 Initialize new member.
4657
46582015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4659
4660 * linux-low.c (linux_low_enable_btrace): Remove.
4661 (linux_target_ops): Replace linux_low_enable_btrace with
4662 linux_enable_btrace.
4663
46642015-09-03 Yao Qi <yao.qi@linaro.org>
4665
4666 * linux-aarch64-low.c (aarch64_insert_point): Call
4667 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4668 returns true.
4669
46702015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4671
4672 * linux-low.c (check_stopped_by_breakpoint): Use
4673 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4674
46752015-08-27 Pedro Alves <palves@redhat.com>
4676
4677 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4678
46792015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4680
4681 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4682 the XNEW-family equivalent.
4683 (compile_bytecodes): Likewise.
4684 * dll.c (loaded_dll): Likewise.
4685 * event-loop.c (append_callback_event): Likewise.
4686 (create_file_handler): Likewise.
4687 (create_file_event): Likewise.
4688 * hostio.c (handle_open): Likewise.
4689 * inferiors.c (add_thread): Likewise.
4690 (add_process): Likewise.
4691 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4692 * linux-arm-low.c (arm_new_process): Likewise.
4693 (arm_new_thread): Likewise.
4694 * linux-low.c (add_to_pid_list): Likewise.
4695 (linux_add_process): Likewise.
4696 (handle_extended_wait): Likewise.
4697 (add_lwp): Likewise.
4698 (enqueue_one_deferred_signal): Likewise.
4699 (enqueue_pending_signal): Likewise.
4700 (linux_resume_one_lwp_throw): Likewise.
4701 (linux_resume_one_thread): Likewise.
4702 (linux_read_memory): Likewise.
4703 (linux_write_memory): Likewise.
4704 * linux-mips-low.c (mips_linux_new_process): Likewise.
4705 (mips_linux_new_thread): Likewise.
4706 (mips_add_watchpoint): Likewise.
4707 * linux-x86-low.c (initialize_low_arch): Likewise.
4708 * lynx-low.c (lynx_add_process): Likewise.
4709 * mem-break.c (set_raw_breakpoint_at): Likewise.
4710 (set_breakpoint): Likewise.
4711 (add_condition_to_breakpoint): Likewise.
4712 (add_commands_to_breakpoint): Likewise.
4713 (clone_agent_expr): Likewise.
4714 (clone_one_breakpoint): Likewise.
4715 * regcache.c (new_register_cache): Likewise.
4716 * remote-utils.c (look_up_one_symbol): Likewise.
4717 * server.c (queue_stop_reply): Likewise.
4718 (start_inferior): Likewise.
4719 (queue_stop_reply_callback): Likewise.
4720 (handle_target_event): Likewise.
4721 * spu-low.c (fetch_ppc_memory): Likewise.
4722 (store_ppc_memory): Likewise.
4723 * target.c (set_target_ops): Likewise.
4724 * thread-db.c (thread_db_load_search): Likewise.
4725 (try_thread_db_load_1): Likewise.
4726 * tracepoint.c (add_tracepoint): Likewise.
4727 (add_tracepoint_action): Likewise.
4728 (create_trace_state_variable): Likewise.
4729 (cmd_qtdpsrc): Likewise.
4730 (cmd_qtro): Likewise.
4731 (add_while_stepping_state): Likewise.
4732 * win32-low.c (child_add_thread): Likewise.
4733 (get_image_name): Likewise.
4734
47352015-08-25 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4738
47392015-08-25 Yao Qi <yao.qi@linaro.org>
4740
4741 * Makefile.in (aarch64-linux.o): New rule.
4742 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4743 srv_tgtobj.
4744 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4745 (aarch64_init_debug_reg_state): Make it extern.
4746 (aarch64_linux_prepare_to_resume): Remove.
4747
47482015-08-25 Yao Qi <yao.qi@linaro.org>
4749
4750 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4751 lwp_arch_private_info and ptid_of_lwp.
4752
47532015-08-25 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4756 Find proc_info by find_process_pid. All callers updated.
4757
47582015-08-25 Yao Qi <yao.qi@linaro.org>
4759
4760 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4761 Remove.
4762 (debug_reg_change_callback): Remove.
4763 (aarch64_notify_debug_reg_change): Remove.
4764
47652015-08-25 Yao Qi <yao.qi@linaro.org>
4766
4767 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4768 Call current_lwp_ptid.
4769
47702015-08-25 Yao Qi <yao.qi@linaro.org>
4771
4772 * linux-aarch64-low.c (debug_reg_change_callback): Use
4773 debug_printf.
4774
47752015-08-25 Yao Qi <yao.qi@linaro.org>
4776
4777 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4778
47792015-08-25 Yao Qi <yao.qi@linaro.org>
4780
4781 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4782
47832015-08-25 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4786 the code.
4787
47882015-08-25 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4791 Remove.
4792 (debug_reg_change_callback): Remove argument entry and add argument
4793 lwp. Remove local variable thread. Don't print thread id in the
4794 debugging output. Don't check whether pid of thread equals to pid.
4795 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4796 iterate_over_lwps instead find_inferior.
4797
47982015-08-24 Pedro Alves <palves@redhat.com>
4799
4800 * inferiors.c (get_first_process): New function.
4801 * inferiors.h (get_first_process): New declaration.
4802 * remote-utils.c (read_ptid): Default to the first process in the
4803 list, instead of to the current thread's process.
4804
48052015-08-24 Pedro Alves <palves@redhat.com>
4806
4807 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4808 * event-loop.c: Likewise.
4809 * remote-utils.c: Likewise.
4810 * tracepoint.c: Likewise.
4811
48122015-08-24 Pedro Alves <palves@redhat.com>
4813
4814 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4815 ptid_get_lwp.
4816
48172015-08-21 Pedro Alves <palves@redhat.com>
4818
4819 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4820 instead of literal 1.
4821
48222015-08-21 Pedro Alves <palves@redhat.com>
4823
4824 * tdesc.c (default_description): Explicitly zero-initialize.
4825
48262015-08-21 Pedro Alves <palves@redhat.com>
4827
4828 PR gdb/18749
4829 * inferiors.c (remove_thread): Discard any pending stop reply for
4830 this thread.
4831 * server.c (remove_all_on_match_pid): Rename to ...
4832 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4833 instead of a pid.
4834 (discard_queued_stop_replies): Change parameter to a ptid. Now
4835 extern.
4836 (handle_v_kill, kill_inferior_callback, captured_main)
4837 (process_serial_event): Adjust.
4838 * server.h (discard_queued_stop_replies): Declare.
4839
48402015-08-21 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (wait_for_sigstop): Always switch to no thread
4843 selected if the previously current thread dies.
4844 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4845 process instead of the current thread's.
4846 * remote-utils.c (input_interrupt): Don't check if there's no
4847 current thread.
4848 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4849 current thread to the general thread fails, error out.
4850 (handle_qxfer_auxv, handle_qxfer_libraries)
4851 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4852 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4853 (handle_query): Check if there's a thread selected instead of
4854 checking whether there's any thread in the thread list.
4855 (handle_qxfer_threads, handle_qxfer_btrace)
4856 (handle_qxfer_btrace_conf): Don't error out early if there's no
4857 thread in the thread list.
4858 (handle_v_cont, myresume): Don't set the current thread to the
4859 continue thread.
4860 (process_serial_event) <Hg handling>: Also set thread_id if the
4861 previous general thread is still alive.
4862 (process_serial_event) <g/G handling>: If setting the current
4863 thread to the general thread fails, error out.
4864 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4865 thread's lwp instead of the current thread's.
4866 * target.c (set_desired_thread): If the desired thread was not
4867 found, leave the current thread pointing to NULL. Return an int
4868 (boolean) indicating success.
4869 * target.h (set_desired_thread): Change return type to int.
4870
48712015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4872
4873 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4874 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4875 #includes.
4876 (ps_get_thread_area): New function.
4877
48782015-08-19 Gary Benson <gbenson@redhat.com>
4879
4880 * hostio.c (handle_pread): Do not attempt to read more data
4881 than hostio_reply_with_data can fit in a packet.
4882
48832015-08-18 Joel Brobecker <brobecker@adacore.com>
4884
4885 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4886
48872015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4888
4889 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4890
48912015-08-06 Pedro Alves <palves@redhat.com>
4892
4893 * tracepoint.c (expr_eval_result): Now an int.
4894
48952015-08-06 Pedro Alves <palves@redhat.com>
4896
4897 * gdbthread.h (struct regcache): Forward declare.
4898 (struct thread_info) <regcache_data>: Now a struct regcache
4899 pointer.
4900 * inferiors.c (inferior_regcache_data)
4901 (set_inferior_regcache_data): Now work with struct regcache
4902 pointers.
4903 * inferiors.h (struct regcache): Forward declare.
4904 (inferior_regcache_data, set_inferior_regcache_data): Now work
4905 with struct regcache pointers.
4906 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4907 (free_register_cache_thread): Remove struct regcache pointer
4908 casts.
4909
49102015-08-06 Pedro Alves <palves@redhat.com>
4911
4912 * server.c (captured_main): On error, print the exception message
4913 to stderr, and if run_once is set, throw a quit.
4914
49152015-08-06 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4918 the current thread.
4919
49202015-08-06 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4923 reading beyond the passed in buffer length.
4924
49252015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4926
4927 * tracepoint.c (symbol_list) <required>: Remove.
4928
49292015-08-06 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4932 count if stopping and suspending threads.
4933 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4934 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4935 (linux_detach): Complete an ongoing step-over.
4936 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4937 throughout.
4938 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4939 (linux_wait_1): If passing a signal to the inferior after
4940 finishing a step-over, unsuspend and re-resume all lwps. If we
4941 see a single-step event but the thread should be continuing, don't
4942 pass the trap to gdb.
4943 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4944 internal_error instead of gdb_assert.
4945 (enqueue_pending_signal): New function.
4946 (check_ptrace_stopped_lwp_gone): Add debug output.
4947 (start_step_over): Use internal_error instead of gdb_assert.
4948 (complete_ongoing_step_over): New function.
4949 (linux_resume_one_thread): Don't resume a suspended thread.
4950 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4951 it stepping.
4952
49532015-08-06 Pedro Alves <palves@redhat.com>
4954
4955 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4956 (linux_thread_alive): Use lwp_is_marked_dead.
4957 (extended_event_reported): Delete.
4958 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4959 instead of extended_event_reported.
4960 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4961 as well.
4962 (lwp_is_marked_dead): New function.
4963 (lwp_running): Use lwp_is_marked_dead.
4964 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4965 comment.
4966
49672015-08-06 Pedro Alves <palves@redhat.com>
4968
4969 * linux-low.c (linux_wait_1): Move fork event output out of the
4970 !report_to_gdb check. Pass event_child->waitstatus to
4971 target_waitstatus_to_string instead of ourstatus.
4972
49732015-08-04 Yao Qi <yao.qi@linaro.org>
4974
4975 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4976 if current_thread is 32 bit.
4977
49782015-08-04 Yao Qi <yao.qi@linaro.org>
4979
4980 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4981 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4982 * server.c (extended_protocol): Remove "static".
4983 * server.h (extended_protocol): Declare it.
4984
49852015-08-04 Yao Qi <yao.qi@linaro.org>
4986
4987 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4988 both aarch64 and aarch32.
4989 (aarch64_set_pc): Likewise.
4990
49912015-08-04 Yao Qi <yao.qi@linaro.org>
4992
4993 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4994 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4995 arm-with-neon.xml to srv_xmlfiles.
4996 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4997 (is_64bit_tdesc): New function.
4998 (aarch64_linux_read_description): New function.
4999 (aarch64_arch_setup): Call aarch64_linux_read_description.
5000 (regs_info): Rename to regs_info_aarch64.
5001 (aarch64_regs_info): Return right regs_info.
5002 (initialize_low_arch): Call initialize_low_arch_aarch32.
5003
50042015-08-04 Yao Qi <yao.qi@linaro.org>
5005
5006 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5007 * linux-aarch32-low.c: New file.
5008 * linux-aarch32-low.h: New file.
5009 * linux-arm-low.c (arm_fill_gregset): Move it to
5010 linux-aarch32-low.c.
5011 (arm_store_gregset): Likewise.
5012 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5013 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5014 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5015 (regs_info): Rename to regs_info_arm.
5016 (arm_regs_info): Return regs_info_aarch32 if
5017 have_ptrace_getregset is 1 and target description is
5018 arm_with_neon or arm_with_vfpv3.
5019 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5020 Call initialize_low_arch_aarch32 instead.
5021
50222015-08-04 Yao Qi <yao.qi@linaro.org>
5023
5024 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5025 * linux-low.c: ... here.
5026 * linux-low.h (have_ptrace_getregset): Declare it.
5027
50282015-08-04 Pedro Alves <palves@redhat.com>
5029
5030 * thread-db.c (struct thread_db): Use new typedefs.
5031 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5032 CHK calls.
5033 (disable_thread_event_reporting): Cast result of dlsym to
5034 destination function pointer type.
5035 (thread_db_mourn): Use td_ta_delete_ftype.
5036
50372015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5038
5039 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5040 arch variant.
5041 (CDX_BREAKPOINT): Define for R2.
5042 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5043 (the_low_target): Add comments.
5044
50452015-07-30 Yao Qi <yao.qi@linaro.org>
5046
5047 * linux-arm-low.c (arm_hwcap): Remove it.
5048 (arm_read_description): New local variable arm_hwcap. Don't
5049 set arm_hwcap to zero.
5050
50512015-07-30 Yao Qi <yao.qi@linaro.org>
5052
5053 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5054 Use regcache->tdesc instead.
5055 (arm_store_wmmxregset): Likewise.
5056 (arm_fill_vfpregset): Likewise.
5057 (arm_store_vfpregset): Likewise.
5058
50592015-07-30 Yao Qi <yao.qi@linaro.org>
5060
5061 * linux-arm-low.c: Include arch/arm.h.
5062 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5063 (arm_store_gregset): Likewise.
5064
50652015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5066
5067 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5068 ptrace's 4th parameter.
5069
50702015-07-27 Yao Qi <yao.qi@linaro.org>
5071
5072 * configure.srv (case aarch64*-*-linux*): Don't set
5073 srv_linux_usrregs.
5074
50752015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5076
5077 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5078 sys/ptrace.h.
5079 * linux-arm-low.c: Likewise.
5080 * linux-cris-low.c: Likewise.
5081 * linux-crisv32-low.c: Likewise.
5082 * linux-low.c: Likewise.
5083 * linux-m68k-low.c: Likewise.
5084 * linux-mips-low.c: Likewise.
5085 * linux-nios2-low.c: Likewise.
5086 * linux-s390-low.c: Likewise.
5087 * linux-sparc-low.c: Likewise.
5088 * linux-tic6x-low.c: Likewise.
5089 * linux-tile-low.c: Likewise.
5090 * linux-x86-low.c: Likewise.
5091
50922015-07-24 Pedro Alves <palves@redhat.com>
5093
5094 * config.in: Regenerate.
5095 * configure: Regenerate.
5096
50972015-07-24 Pedro Alves <palves@redhat.com>
5098
5099 * acinclude.m4: Include ../ptrace.m4.
5100 * configure.ac: Call GDB_AC_PTRACE.
5101 * config.in, configure: Regenerate.
5102
51032015-07-24 Yao Qi <yao.qi@linaro.org>
5104
5105 * linux-low.c (linux_create_inferior): Remove setting to
5106 proc->priv->new_inferior.
5107 (linux_attach): Likewise.
5108 (linux_low_filter_event): Likewise.
5109 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5110
51112015-07-24 Yao Qi <yao.qi@linaro.org>
5112
5113 * linux-low.c (linux_arch_setup): New function.
5114 (linux_low_filter_event): If proc->tdesc is NULL and
5115 proc->attached is true, call the_low_target.arch_setup.
5116 Otherwise, keep status pending, and return.
5117 (linux_resume_one_lwp_throw): Don't call get_pc if
5118 thread->while_stepping isn't NULL. Don't call
5119 get_thread_regcache if proc->tdesc is NULL.
5120 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5121 (linux_target_ops): Install arch_setup.
5122 * server.c (start_inferior): Call the_target->arch_setup.
5123 * target.h (struct target_ops) <arch_setup>: New field.
5124 (target_arch_setup): New marco.
5125 * lynx-low.c (lynx_target_ops): Update.
5126 * nto-low.c (nto_target_ops): Update.
5127 * spu-low.c (spu_target_ops): Update.
5128 * win32-low.c (win32_target_ops): Update.
5129
51302015-07-24 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-low.c (linux_add_process): Don't set
5133 proc->priv->new_inferior.
5134 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5135 (linux_attach): Likewise.
5136
51372015-07-24 Yao Qi <yao.qi@linaro.org>
5138
5139 * server.c (start_inferior): Code refactor.
5140
51412015-07-24 Yao Qi <yao.qi@linaro.org>
5142
5143 * server.c (process_serial_event): Set general_thread.
5144
51452015-07-21 Yao Qi <yao.qi@linaro.org>
5146
5147 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5148 aarch64_linux_get_debug_reg_capacity.
5149
51502015-07-17 Yao Qi <yao.qi@linaro.org>
5151
5152 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5153 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5154 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5155 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5156 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5157 (AARCH64_HWP_ALIGNMENT): Likewise.
5158 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5159 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5160 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5161 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5162 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5163 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5164 (struct aarch64_debug_reg_state): Likewise.
5165 (struct arch_lwp_info): Likewise.
5166 (aarch64_align_watchpoint): Likewise.
5167 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5168 (aarch64_watchpoint_length): Likewise.
5169 (aarch64_point_encode_ctrl_reg): Likewise
5170 (aarch64_point_is_aligned): Likewise.
5171 (aarch64_align_watchpoint): Likewise.
5172 (aarch64_linux_set_debug_regs):
5173 (aarch64_dr_state_insert_one_point): Likewise.
5174 (aarch64_dr_state_remove_one_point): Likewise.
5175 (aarch64_handle_breakpoint): Likewise.
5176 (aarch64_handle_aligned_watchpoint): Likewise.
5177 (aarch64_handle_unaligned_watchpoint): Likewise.
5178 (aarch64_handle_watchpoint): Likewise.
5179
51802015-07-17 Yao Qi <yao.qi@linaro.org>
5181
5182 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5183 and don't aarch64_get_debug_reg_state. All callers update.
5184 (aarch64_handle_aligned_watchpoint): Likewise.
5185 (aarch64_handle_unaligned_watchpoint): Likewise.
5186 (aarch64_handle_watchpoint): Likewise.
5187 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5188 (aarch64_remove_point): Likewise.
5189
51902015-07-17 Yao Qi <yao.qi@linaro.org>
5191
5192 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5193 debug_printf.
5194 (aarch64_handle_unaligned_watchpoint): Likewise.
5195
51962015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5197
5198 Revert the previous 3 commits:
5199 Move gdb_regex* to common/
5200 Move linux_find_memory_regions_full & co.
5201 gdbserver build-id attribute generator
5202
52032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5204 Jan Kratochvil <jan.kratochvil@redhat.com>
5205
5206 gdbserver build-id attribute generator.
5207 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5208 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5209 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5210 (find_phdr): New.
5211 (get_dynamic): Use find_pdhr to traverse program headers.
5212 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5213 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5214 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5215 (get_hex_build_id): New.
5216 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5217 to reply XML document.
5218
52192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5220 Jan Kratochvil <jan.kratochvil@redhat.com>
5221
5222 * target.c: Include target/target-utils.h and fcntl.h.
5223 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5224 (target_fileio_read_stralloc): New functions.
5225
52262015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5227
5228 * Makefile.in (OBS): Add gdb_regex.o.
5229 (gdb_regex.o): New.
5230 * config.in: Rebuilt.
5231 * configure: Rebuilt.
5232
52332015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5234 Jan Kratochvil <jan.kratochvil@redhat.com>
5235
5236 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5237 * Makefile.in (OBS): Add target-utils.o.
5238 (linux-maps.o, target-utils.o): New.
5239 * configure.srv (srv_linux_obj): Add linux-maps.o.
5240
52412015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5242
5243 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5244 function, return 1.
5245 (the_low_target): Install it.
5246
52472015-07-14 Pedro Alves <palves@redhat.com>
5248
5249 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5250 Instead, ignore ECHILD, and throw an error for other errnos.
5251
52522015-07-10 Pedro Alves <palves@redhat.com>
5253
5254 * event-loop.c (struct callback_event) <data>: Change type to
5255 gdb_client_data instance instead of gdb_client_data pointer.
5256 (append_callback_event): Adjust.
5257
52582015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5259
5260 * linux-aarch64-low.c: Add comments for each linux_target_ops
5261 method. Remove comments already covered in target_ops and
5262 linux_target_ops definitions.
5263 (the_low_target): Add comments for each unimplemented method.
5264
52652015-07-09 Yao Qi <yao.qi@linaro.org>
5266
5267 * linux-aarch64-low.c (aarch64_regmap): Remove.
5268 (aarch64_usrregs_info): Remove.
5269 (regs_info): Set field usrregs to NULL.
5270
52712015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5272
5273 * linux-low.c: Include "rsp-low.h"
5274 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5275 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5276 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5277 (handle_btrace_enable_pt): New.
5278 (handle_btrace_general_set): Support "pt".
5279 (handle_btrace_conf_general_set): Support "pt:size".
5280
52812015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5282
5283 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5284 Z_PACKET_SW_BP.
5285
52862015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5287
5288 * linux-aarch64-low.c: Remove comment about endianness.
5289 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5290 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5291 memcmp.
5292
52932015-06-24 Gary Benson <gbenson@redhat.com>
5294
5295 * linux-i386-ipa.c (stdint.h): Do not include.
5296 * lynx-i386-low.c (stdint.h): Likewise.
5297 * lynx-ppc-low.c (stdint.h): Likewise.
5298 * mem-break.c (stdint.h): Likewise.
5299 * thread-db.c (stdint.h): Likewise.
5300 * tracepoint.c (stdint.h): Likewise.
5301 * win32-low.c (stdint.h): Likewise.
5302
53032015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5304
5305 * server.c (write_qxfer_response): Update call to
5306 remote_escape_output.
5307
53082015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5309 Jan Kratochvil <jan.kratochvil@redhat.com>
5310
5311 Merge multiple hex conversions.
5312 * gdbreplay.c (tohex): Rename to 'fromhex'.
5313 (logchar): Use fromhex.
5314
53152015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5316
5317 * server.c (handle_qxfer_libraries): Set `version' attribute for
5318 <library-list>.
5319
53202015-06-10 Gary Benson <gbenson@redhat.com>
5321
5322 * target.h (struct target_ops) <multifs_open>: New field.
5323 <multifs_unlink>: Likewise.
5324 <multifs_readlink>: Likewise.
5325 * linux-low.c (nat/linux-namespaces.h): New include.
5326 (linux_target_ops): Initialize the_target->multifs_open,
5327 the_target->multifs_unlink and the_target->multifs_readlink.
5328 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5329 * hostio.c (hostio_fs_pid): New static variable.
5330 (hostio_handle_new_gdb_connection): New function.
5331 (handle_setfs): Likewise.
5332 (handle_open): Use the_target->multifs_open as appropriate.
5333 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5334 (handle_readlink): Use the_target->multifs_readlink as
5335 appropriate.
5336 (handle_vFile): Handle vFile:setfs packets.
5337 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5338 after target_handle_new_gdb_connection.
5339
53402015-06-10 Gary Benson <gbenson@redhat.com>
5341
5342 * configure.ac (AC_CHECK_FUNCS): Add setns.
5343 * config.in: Regenerate.
5344 * configure: Likewise.
5345 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5346 (linux-namespaces.o): New rule.
5347 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5348
53492015-06-09 Gary Benson <gbenson@redhat.com>
5350
5351 * hostio.c (handle_open): Process mode argument with
5352 fileio_to_host_mode.
5353
53542015-06-01 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5357 * linux-x86-low.c: Likewise.
5358
53592015-05-28 Don Breazeal <donb@codesourcery.com>
5360
5361 * linux-low.c (handle_extended_wait): Initialize
5362 thread_info.last_resume_kind for new fork children.
5363
53642015-05-15 Pedro Alves <palves@redhat.com>
5365
5366 * target.h (target_handle_new_gdb_connection): Rewrite using if
5367 wrapped in do/while.
5368
53692015-05-14 Joel Brobecker <brobecker@adacore.com>
5370
5371 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5372 * configure, config.in: Regenerate.
5373 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5374 Declare typedef.
5375
53762015-05-12 Don Breazeal <donb@codesourcery.com>
5377
5378 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5379 PTRACE_EVENT_VFORK_DONE.
5380 (linux_low_ptrace_options, extended_event_reported): Add vfork
5381 events.
5382 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5383 and "vforkdone" for RSP 'T' Stop Reply Packet.
5384 * server.h (report_vfork_events): Declare
5385 global variable.
5386
53872015-05-12 Don Breazeal <donb@codesourcery.com>
5388
5389 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5390 (the_low_target) <new_fork>: Initialize new member.
5391 * linux-arm-low.c (arm_new_fork): New function.
5392 (the_low_target) <new_fork>: Initialize new member.
5393 * linux-low.c (handle_extended_wait): Call new target function
5394 new_fork.
5395 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5396 * linux-mips-low.c (mips_add_watchpoint): New function
5397 extracted from mips_insert_point.
5398 (the_low_target) <new_fork>: Initialize new member.
5399 (mips_linux_new_fork): New function.
5400 (mips_insert_point): Call mips_add_watchpoint.
5401 * linux-x86-low.c (x86_linux_new_fork): New function.
5402 (the_low_target) <new_fork>: Initialize new member.
5403
54042015-05-12 Don Breazeal <donb@codesourcery.com>
5405
5406 * linux-low.c (handle_extended_wait): Implement return value,
5407 rename argument 'event_child' to 'event_lwp', handle
5408 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5409 (linux_low_ptrace_options): New function.
5410 (linux_low_filter_event): Call linux_low_ptrace_options,
5411 use different argument fo linux_enable_event_reporting,
5412 use return value from handle_extended_wait.
5413 (extended_event_reported): New function.
5414 (linux_wait_1): Call extended_event_reported and set
5415 status to report fork events.
5416 (linux_write_memory): Add pid to debug message.
5417 (reset_lwp_ptrace_options_callback): New function.
5418 (linux_handle_new_gdb_connection): New function.
5419 (linux_target_ops): Initialize new structure member.
5420 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5421 * lynx-low.c: Initialize new structure member.
5422 * remote-utils.c (prepare_resume_reply): Implement stop reason
5423 "fork" for "T" stop message.
5424 * server.c (handle_query): Call handle_new_gdb_connection.
5425 * server.h (report_fork_events): Declare global flag.
5426 * target.h (struct target_ops) <handle_new_gdb_connection>:
5427 New member.
5428 (target_handle_new_gdb_connection): New macro.
5429 * win32-low.c: Initialize new structure member.
5430
54312015-05-12 Don Breazeal <donb@codesourcery.com>
5432
5433 * mem-break.c (APPEND_TO_LIST): Define macro.
5434 (clone_agent_expr): New function.
5435 (clone_one_breakpoint): New function.
5436 (clone_all_breakpoints): New function.
5437 * mem-break.h: Declare new functions.
5438
54392015-05-12 Don Breazeal <donb@codesourcery.com>
5440
5441 * linux-low.c (linux_supports_fork_events): New function.
5442 (linux_supports_vfork_events): New function.
5443 (linux_target_ops): Initialize new structure members.
5444 (initialize_low): Call linux_check_ptrace_features.
5445 * lynx-low.c (lynx_target_ops): Initialize new structure
5446 members.
5447 * server.c (report_fork_events, report_vfork_events):
5448 New global flags.
5449 (handle_query): Add new features to qSupported packet and
5450 response.
5451 (captured_main): Initialize new global variables.
5452 * target.h (struct target_ops) <supports_fork_events>:
5453 New member.
5454 <supports_vfork_events>: New member.
5455 (target_supports_fork_events): New macro.
5456 (target_supports_vfork_events): New macro.
5457 * win32-low.c (win32_target_ops): Initialize new structure
5458 members.
5459
54602015-05-12 Gary Benson <gbenson@redhat.com>
5461
5462 * server.c (handle_qxfer_exec_file): Use current process
5463 if annex is empty.
5464
54652015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5466
5467 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5468 Remove HAVE_PTRACE_GETREGS conditionals.
5469 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5470 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5471
54722015-05-08 Yao Qi <yao.qi@linaro.org>
5473
5474 * linux-low.c (linux_supports_conditional_breakpoints): New
5475 function.
5476 (linux_target_ops): Install new target method.
5477 * lynx-low.c (lynx_target_ops): Install NULL hook for
5478 supports_conditional_breakpoints.
5479 * nto-low.c (nto_target_ops): Likewise.
5480 * spu-low.c (spu_target_ops): Likewise.
5481 * win32-low.c (win32_target_ops): Likewise.
5482 * server.c (handle_query): Check
5483 target_supports_conditional_breakpoints.
5484 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5485 New field.
5486 (target_supports_conditional_breakpoints): New macro.
5487
54882015-05-06 Pedro Alves <palves@redhat.com>
5489
5490 PR server/18081
5491 * server.c (start_inferior): If the process exits, mourn it.
5492
54932015-04-21 Gary Benson <gbenson@redhat.com>
5494
5495 * hostio.c (fileio_open_flags_to_host): Factored out to
5496 fileio_to_host_openflags in common/fileio.c. Single use
5497 updated.
5498
54992015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5500
5501 * linux-xtensa-low.c (xtensa_fill_gregset)
5502 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5503 XCHAL_HAVE_LOOP.
5504
55052015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5506
5507 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5508 (regs_info): Replace usrregs pointer with NULL.
5509
55102015-04-17 Gary Benson <gbenson@redhat.com>
5511
5512 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5513 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5514 * server.c (handle_qxfer_exec_file): New function.
5515 (qxfer_packets): Add exec-file entry.
5516 (handle_query): Report qXfer:exec-file:read as supported packet.
5517
55182015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5519
5520 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5521
55222015-04-09 Gary Benson <gbenson@redhat.com>
5523
5524 * hostio-errno.c (errno_to_fileio_error): Remove function.
5525 Update caller to use remote_fileio_to_fio_error.
5526
55272015-04-09 Yao Qi <yao.qi@linaro.org>
5528
5529 * linux-low.c (linux_insert_point): Call
5530 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5531 (linux_remove_point): Call remove_memory_breakpoint if type is
5532 raw_bkpt_type_sw.
5533 * linux-x86-low.c (x86_insert_point): Don't call
5534 insert_memory_breakpoint.
5535 (x86_remove_point): Don't call remove_memory_breakpoint.
5536
55372015-04-01 Pedro Alves <palves@redhat.com>
5538 Cleber Rosa <crosa@redhat.com>
5539
5540 * server.c (gdbserver_usage): Reorganize and extend the usage
5541 message.
5542
55432015-03-24 Pedro Alves <palves@redhat.com>
5544
5545 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5546 output. Also dump TRAP_TRACE.
5547 (linux_low_filter_event): In debug output, distinguish a
5548 resume_stop SIGSTOP from a delayed SIGSTOP.
5549
55502015-03-24 Gary Benson <gbenson@redhat.com>
5551
5552 * linux-x86-low.c (x86_linux_new_thread): Moved to
5553 nat/x86-linux.c.
5554 (x86_linux_prepare_to_resume): Likewise.
5555
55562015-03-24 Gary Benson <gbenson@redhat.com>
5557
5558 * Makefile.in (x86-linux-dregs.o): New rule.
5559 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5560 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5561 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5562 (x86_linux_dr_get): Likewise.
5563 (x86_linux_dr_set): Likewise.
5564 (update_debug_registers_callback): Likewise.
5565 (x86_linux_dr_set_addr): Likewise.
5566 (x86_linux_dr_get_addr): Likewise.
5567 (x86_linux_dr_set_control): Likewise.
5568 (x86_linux_dr_get_control): Likewise.
5569 (x86_linux_dr_get_status): Likewise.
5570 (x86_linux_update_debug_registers): Likewise.
5571
55722015-03-24 Gary Benson <gbenson@redhat.com>
5573
5574 * linux-x86-low.c (x86_linux_update_debug_registers):
5575 New function, factored out from...
5576 (x86_linux_prepare_to_resume): ...this.
5577
55782015-03-24 Gary Benson <gbenson@redhat.com>
5579
5580 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5581 (x86_linux_dr_set): Likewise.
5582 (update_debug_registers_callback): Likewise.
5583 (x86_linux_dr_set_addr): Likewise.
5584 (x86_linux_dr_get_addr): Likewise.
5585 (x86_linux_dr_set_control): Likewise.
5586 (x86_linux_dr_get_control): Likewise.
5587 (x86_linux_dr_get_status): Likewise.
5588 (x86_linux_prepare_to_resume): Likewise.
5589
55902015-03-24 Gary Benson <gbenson@redhat.com>
5591
5592 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5593 Use perror_with_name. Pass string through gettext.
5594 (x86_linux_dr_set): Likewise.
5595
55962015-03-24 Gary Benson <gbenson@redhat.com>
5597
5598 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5599 (x86_linux_dr_set_addr): ...this.
5600 (x86_dr_low_get_addr): Rename to...
5601 (x86_linux_dr_get_addr): ...this.
5602 (x86_dr_low_set_control): Rename to...
5603 (x86_linux_dr_set_control): ...this.
5604 (x86_dr_low_get_control): Rename to...
5605 (x86_linux_dr_get_control): ...this.
5606 (x86_dr_low_get_status): Rename to...
5607 (x86_linux_dr_get_status): ...this.
5608 (x86_dr_low): Update with new function names.
5609
56102015-03-24 Gary Benson <gbenson@redhat.com>
5611
5612 * Makefile.in (x86-linux.o): New rule.
5613 * configure.srv: Add x86-linux.o to relevant targets.
5614 * linux-low.c (lwp_set_arch_private_info): New function.
5615 (lwp_arch_private_info): Likewise.
5616 * linux-x86-low.c: Include nat/x86-linux.h.
5617 (arch_lwp_info): Removed structure.
5618 (update_debug_registers_callback):
5619 Use lwp_set_debug_registers_changed.
5620 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5621 and lwp_set_debug_registers_changed.
5622 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5623
56242015-03-24 Gary Benson <gbenson@redhat.com>
5625
5626 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5627 * linux-arm-low.c (arm_new_thread): Likewise.
5628 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5629 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5630 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5631 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5632
56332015-03-24 Gary Benson <gbenson@redhat.com>
5634
5635 * linux-low.c (ptid_of_lwp): New function.
5636 (lwp_is_stopped): Likewise.
5637 (lwp_stop_reason): Likewise.
5638 * linux-x86-low.c (update_debug_registers_callback):
5639 Use lwp_is_stopped.
5640 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5641 lwp_stop_reason.
5642
56432015-03-24 Gary Benson <gbenson@redhat.com>
5644
5645 * linux-low.h (linux_stop_lwp): Remove declaration.
5646
56472015-03-24 Gary Benson <gbenson@redhat.com>
5648
5649 * linux-low.h: Include nat/linux-nat.h.
5650 * linux-low.c (iterate_over_lwps_args): New structure.
5651 (iterate_over_lwps_filter): New function.
5652 (iterate_over_lwps): Likewise.
5653 * linux-x86-low.c (update_debug_registers_callback):
5654 Update signature to what iterate_over_lwps expects.
5655 Remove PID check that iterate_over_lwps now performs.
5656 (x86_dr_low_set_addr): Use iterate_over_lwps.
5657 (x86_dr_low_set_control): Likewise.
5658
56592015-03-24 Gary Benson <gbenson@redhat.com>
5660
5661 * linux-x86-low.c (x86_debug_reg_state): New function.
5662 (x86_linux_prepare_to_resume): Use the above.
5663
56642015-03-24 Gary Benson <gbenson@redhat.com>
5665
5666 * linux-low.c (current_lwp_ptid): New function.
5667 * linux-x86-low.c: Include nat/linux-nat.h.
5668 (x86_dr_low_get_addr): Use current_lwp_ptid.
5669 (x86_dr_low_get_control): Likewise.
5670 (x86_dr_low_get_status): Likewise.
5671
56722015-03-20 Pedro Alves <palves@redhat.com>
5673
5674 * tracepoint.c (cmd_qtstatus): Make "str" const.
5675
56762015-03-20 Pedro Alves <palves@redhat.com>
5677
5678 * server.c (handle_general_set): Make "req_str" const.
5679
56802015-03-19 Pedro Alves <palves@redhat.com>
5681
5682 * linux-low.c (linux_resume_one_lwp): Rename to ...
5683 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5684 instead call perror_with_name.
5685 (check_ptrace_stopped_lwp_gone): New function.
5686 (linux_resume_one_lwp): Reimplement as wrapper around
5687 linux_resume_one_lwp_throw that swallows errors if the LWP is
5688 gone.
5689
56902015-03-19 Pedro Alves <palves@redhat.com>
5691
5692 * linux-low.c (count_events_callback, select_event_lwp_callback):
5693 No longer check whether the thread has resume_stop as last resume
5694 kind.
5695
56962015-03-19 Pedro Alves <palves@redhat.com>
5697
5698 * linux-low.c (count_events_callback, select_event_lwp_callback):
5699 Use the lwp's status_pending_p field, not the thread's.
5700
57012015-03-19 Pedro Alves <palves@redhat.com>
5702
5703 * linux-low.c (select_event_lwp_callback): Update comments to
5704 no longer mention SIGTRAP.
5705
57062015-03-18 Gary Benson <gbenson@redhat.com>
5707
5708 * server.c (handle_query): Do not report vFile:fstat as supported.
5709
57102015-03-11 Gary Benson <gbenson@redhat.com>
5711
5712 * hostio.c (sys/types.h): New include.
5713 (sys/stat.h): Likewise.
5714 (common-remote-fileio.h): Likewise.
5715 (handle_fstat): New function.
5716 (handle_vFile): Handle vFile:fstat packets.
5717
57182015-03-11 Gary Benson <gbenson@redhat.com>
5719
5720 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5721 struct stat.st_blocks and struct stat.st_blksize.
5722 * configure: Regenerate.
5723 * config.in: Likewise.
5724 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5725 (OBS): Add common-remote-fileio.o.
5726 (common-remote-fileio.o): New rule.
5727
57282015-03-09 Pedro Alves <palves@redhat.com>
5729
5730 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5731 'struct sockaddr' pointer in 'accept' call.
5732
57332015-03-09 Pedro Alves <palves@redhat.com>
5734
5735 Revert:
5736 2015-03-07 Pedro Alves <palves@redhat.com>
5737 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5738 or <winsock2.h> here. Instead include "gdb_socket.h".
5739 (remote_open): Use union gdb_sockaddr_u.
5740 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5741 or <winsock2.h> here. Instead include "gdb_socket.h".
5742 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5743 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5744 or <sys/un.h>.
5745 (init_named_socket, gdb_agent_helper_thread): Use union
5746 gdb_sockaddr_u.
5747
57482015-03-07 Pedro Alves <palves@redhat.com>
5749
5750 * configure.ac (build_warnings): Move
5751 -Wdeclaration-after-statement to the C-specific set.
5752 * configure: Regenerate.
5753
57542015-03-07 Pedro Alves <palves@redhat.com>
5755
5756 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5757 or <winsock2.h> here. Instead include "gdb_socket.h".
5758 (remote_open): Use union gdb_sockaddr_u.
5759 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5760 or <winsock2.h> here. Instead include "gdb_socket.h".
5761 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5762 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5763 or <sys/un.h>.
5764 (init_named_socket, gdb_agent_helper_thread): Use union
5765 gdb_sockaddr_u.
5766
57672015-03-07 Pedro Alves <palves@redhat.com>
5768
5769 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5770 instead.
5771
57722015-03-06 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-aarch64-low.c (aarch64_insert_point): Use
5775 show_debug_regs as a boolean.
5776 (aarch64_remove_point): Likewise.
5777
57782015-03-05 Pedro Alves <palves@redhat.com>
5779
5780 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5781 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5782 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5783 * nto-low.c (nto_target_ops): Likewise.
5784 * spu-low.c (spu_target_ops): Likewise.
5785 * win32-low.c (win32_target_ops): Likewise.
5786
57872015-03-04 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5790 Decide whether a breakpoint triggered based on the SIGTRAP's
5791 siginfo.si_code.
5792 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5793 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5794 (linux_low_filter_event): Check for breakpoints before checking
5795 watchpoints.
5796 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5797 siginfo.si_code.
5798 (linux_stopped_by_sw_breakpoint)
5799 (linux_supports_stopped_by_sw_breakpoint)
5800 (linux_stopped_by_hw_breakpoint)
5801 (linux_supports_stopped_by_hw_breakpoint): New functions.
5802 (linux_target_ops): Install new target methods.
5803
58042015-03-04 Pedro Alves <palves@redhat.com>
5805
5806 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5807 * server.c (swbreak_feature, hwbreak_feature): New globals.
5808 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5809 (captured_main): Clear swbreak_feature and hwbreak_feature.
5810 * server.h (swbreak_feature, hwbreak_feature): Declare.
5811 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5812 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5813 supports_stopped_by_hw_breakpoint>: New fields.
5814 (target_supports_stopped_by_sw_breakpoint)
5815 (target_stopped_by_sw_breakpoint)
5816 (target_supports_stopped_by_hw_breakpoint)
5817 (target_stopped_by_hw_breakpoint): Declare.
5818
58192015-03-04 Pedro Alves <palves@redhat.com>
5820
5821 enum lwp_stop_reason -> enum target_stop_reason
5822 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5823 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5824 (linux_wait_1, stuck_in_jump_pad_callback)
5825 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5826 (linux_stopped_by_watchpoint):
5827 * linux-low.h (enum lwp_stop_reason): Delete.
5828 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5829 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5830
58312015-03-04 Yao Qi <yao.qi@linaro.org>
5832
5833 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5834
58352015-03-03 Gary Benson <gbenson@redhat.com>
5836
5837 * hostio.c (handle_vFile): Fix prefix lengths.
5838
58392015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5840
5841 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5842 ptr_bits.
5843
58442015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5845
5846 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5847 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5848 (clean): Add "rm -f" for above C files.
5849 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5850 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5851 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5852 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5853 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5854 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5855 (init_registers_s390x_vx_linux64)
5856 (init_registers_s390x_tevx_linux64)
5857 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5858 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5859 declarations.
5860 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5861 (s390_store_vxrs_high): New functions.
5862 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5863 NT_S390_VXRS_HIGH.
5864 (s390_arch_setup): Add logic for selecting one of the new target
5865 descriptions. Activate the new vector regsets if applicable.
5866 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5867 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5868 and init_registers_s390x_tevx_linux64.
5869
58702015-03-01 Pedro Alves <palves@redhat.com>
5871
5872 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5873 parameter.
5874
58752015-02-27 Pedro Alves <palves@redhat.com>
5876
5877 * linux-x86-low.c (u_debugreg_offset): New function.
5878 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5879
58802015-02-27 Pedro Alves <palves@redhat.com>
5881
5882 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5883 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5884 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5885 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5886 (ps_lsetfpregs, ps_getpid)
5887 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5888 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5889 (ps_lsetxregs, ps_plog): Declare.
5890
58912015-02-27 Pedro Alves <palves@redhat.com>
5892
5893 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5894 IP_AGENT_EXPORT_FUNC.
5895 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5896 IP_AGENT_EXPORT_FUNC.
5897 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5898 (IP_AGENT_EXPORT): Delete.
5899 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5900 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5901 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5902 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5903 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5904 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5905 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5906 (traceframe_read_count, traceframe_write_count)
5907 (traceframes_created, trace_state_variables, get_raw_reg)
5908 (get_trace_state_variable_value, set_trace_state_variable_value)
5909 (ust_loaded, helper_thread_id, cmd_buf): Use
5910 IPA_SYM_EXPORTED_NAME.
5911 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5912 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5913 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5914 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5915 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5916 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5917 EXTERN_C_PUSH/EXTERN_C_POP.
5918 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5919 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5920 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5921 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5922 (traceframe_write_count, traceframe_read_count)
5923 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5924 (about_to_request_buffer_space, get_trace_state_variable_value)
5925 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5926 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5927 EXTERN_C_PUSH/EXTERN_C_POP.
5928 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5929 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5930 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5931 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5932 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5933 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5934 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5935 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5936 Define.
5937 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5938 (IP_AGENT_EXPORT_VAR_DECL): Define.
5939 (tracing): Declare.
5940 (gdb_agent_get_raw_reg): Declare.
5941
59422015-02-27 Tom Tromey <tromey@redhat.com>
5943 Pedro Alves <palves@redhat.com>
5944
5945 Rename symbols whose names are reserved C++ keywords throughout.
5946
59472015-02-27 Pedro Alves <palves@redhat.com>
5948
5949 * Makefile.in (COMPILER): New, get it from autoconf.
5950 (CXX): Get from autoconf instead.
5951 (COMPILE.pre): Use COMPILER.
5952 (CC-LD): Rename to ...
5953 (CC_LD): ... this. Use COMPILER.
5954 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5955 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5956 * acinclude.m4: Include build-with-cxx.m4.
5957 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5958 Disable -Werror by default if building in C++ mode.
5959 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5960 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5961 the C++ compiler. Save/restore CXXFLAGS too.
5962 * configure: Regenerate.
5963
59642015-02-27 Pedro Alves <palves@redhat.com>
5965
5966 * acinclude.m4: Include libiberty.m4.
5967 * configure.ac: Call libiberty_INIT.
5968 * config.in, configure: Regenerate.
5969
59702015-02-26 Pedro Alves <palves@redhat.com>
5971
5972 * linux-low.c (linux_wait_1): When incrementing the PC past a
5973 program breakpoint always use the_low_target.breakpoint_len as
5974 increment, rather than the maximum between that and
5975 the_low_target.decr_pc_after_break.
5976
59772015-02-23 Pedro Alves <palves@redhat.com>
5978
5979 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5980 thread was doing a step-over; always adjust the PC if
5981 we stepped over a permanent breakpoint.
5982 (linux_wait_1): If we stepped over breakpoint that was on top of a
5983 permanent breakpoint, manually advance the PC past it.
5984
59852015-02-23 Pedro Alves <palves@redhat.com>
5986
5987 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5988 modes.
5989 (x86_fill_gregset, x86_store_gregset): Use it when handling
5990 $orig_eax.
5991
59922015-02-20 Pedro Alves <palves@redhat.com>
5993
5994 * thread-db.c: Include "nat/linux-procfs.h".
5995 (thread_db_init): Skip listing new threads if the kernel supports
5996 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5997
59982015-02-20 Pedro Alves <palves@redhat.com>
5999
6000 * linux-low.c (status_pending_p_callback): Use ptid_match.
6001
60022015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6003
6004 PR breakpoints/16812
6005 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6006 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6007 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6008
60092015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6010
6011 PR breakpoints/15956
6012 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6013
60142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6015
6016 * linux-low.c (linux_low_btrace_conf): Print size.
6017 * server.c (handle_btrace_conf_general_set): New.
6018 (hanle_general_set): Call handle_btrace_conf_general_set.
6019 (handle_query): Report Qbtrace-conf:bts:size as supported.
6020
60212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6022
6023 * linux-low.c (linux_low_enable_btrace): Update parameters.
6024 (linux_low_btrace_conf): New.
6025 (linux_target_ops)<to_btrace_conf>: Initialize.
6026 * server.c (current_btrace_conf): New.
6027 (handle_btrace_enable): Rename to ...
6028 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6029 to target_enable_btrace. Update comment. Update users.
6030 (handle_qxfer_btrace_conf): New.
6031 (qxfer_packets): Add btrace-conf entry.
6032 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6033 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6034 (target_ops)<read_btrace_conf>: New.
6035 (target_enable_btrace): Update parameters.
6036 (target_read_btrace_conf): New.
6037
60382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6039
6040 * server.c (handle_btrace_general_set): Remove call to
6041 target_supports_btrace.
6042 (supported_btrace_packets): New.
6043 (handle_query): Call supported_btrace_packets.
6044 * target.h: include btrace-common.h.
6045 (btrace_target_info): Removed.
6046 (supports_btrace, target_supports_btrace): Update parameters.
6047
60482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6049
6050 * Makefile.in (SFILES): Add common/btrace-common.c.
6051 (OBS): Add common/btrace-common.o.
6052 (btrace-common.o): Add build rules.
6053 * linux-low: Include btrace-common.h.
6054 (linux_low_read_btrace): Use struct btrace_data. Call
6055 btrace_data_init and btrace_data_fini.
6056
60572015-02-06 Pedro Alves <palves@redhat.com>
6058
6059 * thread-db.c (find_new_threads_callback): Add debug output.
6060
60612015-02-04 Pedro Alves <palves@redhat.com>
6062
6063 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6064 (resume_stopped_resumed_lwps): New function.
6065 (linux_wait_for_event_filtered): Use it.
6066
60672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6068
6069 * Makefile.in (SFILES): Add linux-personality.c.
6070 (linux-personality.o): New rule.
6071 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6072 list of objects to be built.
6073 * linux-low.c: Include nat/linux-personality.h.
6074 (linux_create_inferior): Remove code to disable address space
6075 randomization (moved to ../nat/linux-personality.c). Create
6076 cleanup to disable address space randomization.
6077
60782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6079
6080 * Makefile.in (posix-strerror.o): New rule.
6081 (mingw-strerror.o): Likewise.
6082 * configure: Regenerated.
6083 * configure.ac: Source file ../common/common.host. Initialize new
6084 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6085
60862015-01-14 Yao Qi <yao@codesourcery.com>
6087
6088 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6089 (ppc-linux.o): New rule.
6090 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6091 * configure.ac: AC_CHECK_FUNCS(getauxval).
6092 * config.in: Re-generated.
6093 * configure: Re-generated.
6094 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6095 ppc64_64bit_inferior_p
6096
60972015-01-14 Yao Qi <yao@codesourcery.com>
6098
6099 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6100 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6101 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6102 (PT_ORIG_R3, PT_TRAP): Likewise.
6103 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6104 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6105 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6106
61072015-01-10 Joel Brobecker <brobecker@adacore.com>
6108
6109 * i387-fp.c (i387_cache_to_xsave): In look over
6110 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6111 zmmh_low_space field by use of zmmh_high_space.
6112
61132015-01-09 Pedro Alves <palves@redhat.com>
6114
6115 * linux-low.c (step_over_bkpt): Move higher up in the file.
6116 (handle_extended_wait): Don't store the stop_pc here.
6117 (get_stop_pc): Adjust comments and rename to ...
6118 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6119 stopped for a software breakpoint or hardware breakpoint.
6120 (thread_still_has_status_pending_p): New function.
6121 (status_pending_p_callback): Use
6122 thread_still_has_status_pending_p. If the event is no longer
6123 interesting, resume the LWP.
6124 (handle_tracepoints): Add assert.
6125 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6126 (wstatus_maybe_breakpoint): New function.
6127 (cancel_breakpoint): Delete function.
6128 (check_stopped_by_watchpoint): New function, factored out from
6129 linux_low_filter_event.
6130 (lp_status_maybe_breakpoint): Delete function.
6131 (linux_low_filter_event): Remove filter_ptid argument.
6132 Leave thread group exits pending here. Store the LWP's stop PC.
6133 Always leave events pending.
6134 (linux_wait_for_event_filtered): Pull all events out of the
6135 kernel, and leave them all pending.
6136 (count_events_callback, select_event_lwp_callback): Consider all
6137 events.
6138 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6139 (select_event_lwp): Only give preference to the stepping LWP in
6140 all-stop mode. Adjust comments.
6141 (ignore_event): New function.
6142 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6143 references to cancel_breakpoints. Adjust to renames. Also give
6144 equal priority to all LWPs that have had events in non-stop mode.
6145 If reporting a software breakpoint event, unadjust the LWP's PC.
6146 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6147 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6148 Adjust.
6149 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6150 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6151 (linux_stopped_by_watchpoint): Adjust.
6152 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6153 * linux-low.h (enum lwp_stop_reason): New.
6154 (struct lwp_info) <stop_pc>: Adjust comment.
6155 <stopped_by_watchpoint>: Delete field.
6156 <stop_reason>: New field.
6157 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6158 * mem-break.c (software_breakpoint_inserted_here)
6159 (hardware_breakpoint_inserted_here): New function.
6160 * mem-break.h (software_breakpoint_inserted_here)
6161 (hardware_breakpoint_inserted_here): Declare.
6162 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6163 (cancel_breakpoints): Delete.
6164 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6165 (upload_fast_traceframes): Remove references to
6166 cancel_breakpoints.
6167
61682015-01-09 Pedro Alves <palves@redhat.com>
6169
6170 * thread-db.c (find_new_threads_callback): Ignore thread if the
6171 kernel thread ID is -1.
6172
61732015-01-09 Pedro Alves <palves@redhat.com>
6174
6175 * linux-low.c (linux_attach_fail_reason_string): Move to
6176 nat/linux-ptrace.c, and rename.
6177 (linux_attach_lwp): Update comment.
6178 (attach_proc_task_lwp_callback): New function.
6179 (linux_attach): Adjust to rename and use
6180 linux_proc_attach_tgid_threads.
6181 (linux_attach_fail_reason_string): Delete declaration.
6182
61832015-01-01 Joel Brobecker <brobecker@adacore.com>
6184
6185 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6186 * server.c (gdbserver_version): Likewise.
6187
61882014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6189
6190 * remote-utils.c: Include ctype.h.
6191 (input_interrupt): Explicitly handle the case when the char
6192 received is the NUL byte. Improve the printing of non-ASCII
6193 characters.
6194
61952014-12-16 Joel Brobecker <brobecker@adacore.com>
6196
6197 * linux-low.c (linux_low_filter_event): Update call to
6198 linux_enable_event_reporting following the addition of
6199 a new parameter to that function.
6200
62012014-12-16 Catalin Udma <catalin.udma@freescale.com>
6202
6203 PR server/17457
6204 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6205 (AARCH64_FPCR_REGNO): Likewise.
6206 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6207 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6208 (aarch64_store_fpregset): Likewise.
6209
62102014-12-15 Joel Brobecker <brobecker@adacore.com>
6211
6212 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6213 Remove FIXME comment about assumption about N.
6214
62152014-12-13 Joel Brobecker <brobecker@adacore.com>
6216
6217 * configure.ac: If large-file support is disabled in GDBserver,
6218 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6219 * configure: Regenerate.
6220
62212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6222
6223 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6224 warning upon ENODATA from ptrace.
6225 * linux-s390-low.c (s390_store_tdb): New.
6226 (s390_regsets): Add regset for NT_S390_TDB.
6227
62282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6229
6230 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6231 without a fill_function.
6232 * linux-s390-low.c (s390_fill_last_break): Remove.
6233 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6234 (s390_arch_setup): Use regset's size instead of fill_function for
6235 loop end condition.
6236
62372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6238
6239 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6240 the regset's store function when ptrace returned an error.
6241 * regcache.c (get_thread_regcache): Invalidate register cache
6242 before fetching inferior's registers.
6243
62442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6245
6246 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6247 while-loop as for-loop.
6248 (regsets_store_inferior_registers): Likewise.
6249
62502014-11-28 Yao Qi <yao@codesourcery.com>
6251
6252 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6253 * config.in, configure: Re-generate.
6254 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6255 is defined.
6256
62572014-11-21 Yao Qi <yao@codesourcery.com>
6258
6259 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6260 (AC_CHECK_HEADERS): Remove malloc.h.
6261 * configure: Re-generated.
6262 * config.in: Re-generated.
6263 * server.h: Don't include alloca.h and malloc.h.
6264 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6265 Don't include malloc.h.
6266
62672014-11-17 Joel Brobecker <brobecker@adacore.com>
6268
6269 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6270 corresponding ERRNO check in same block.
6271
62722014-11-12 Pedro Alves <palves@redhat.com>
6273
6274 * server.c (cont_thread): Update comment.
6275 (start_inferior, attach_inferior): No longer clear cont_thread.
6276 (handle_v_cont): No longer set cont_thread.
6277 (captured_main): Clear cont_thread each time a GDB connects.
6278
62792014-11-12 Pedro Alves <palves@redhat.com>
6280
6281 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6282 thread, and don't resume all threads if the Hc thread has exited.
6283
62842014-11-12 Pedro Alves <palves@redhat.com>
6285
6286 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6287 the process group instead of to a specific LWP.
6288
62892014-10-15 Pedro Alves <palves@redhat.com>
6290
6291 PR server/17487
6292 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6293 parameter.
6294 (arm_set_thread_context): Delete.
6295 (the_low_target): Adjust.
6296 * win32-i386-low.c (debug_registers_changed)
6297 (debug_registers_used): Delete.
6298 (update_debug_registers_callback): New function.
6299 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6300 needing to update their debug registers.
6301 (win32_get_current_dr): New function.
6302 (x86_dr_low_get_addr, x86_dr_low_get_control)
6303 (x86_dr_low_get_status): Fetch the debug register from the thread
6304 record's context.
6305 (i386_initial_stuff): Adjust.
6306 (i386_get_thread_context): Remove current_event parameter. Don't
6307 clear debug_registers_changed nor copy DR values to
6308 debug_reg_state.
6309 (i386_set_thread_context): Delete.
6310 (i386_prepare_to_resume): New function.
6311 (i386_thread_added): Mark the thread as needing to update irs
6312 debug registers.
6313 (the_low_target): Remove i386_set_thread_context and install
6314 i386_prepare_to_resume.
6315 * win32-low.c (win32_get_thread_context): Adjust.
6316 (win32_set_thread_context): Use SetThreadContext
6317 directly.
6318 (win32_prepare_to_resume): New function.
6319 (win32_require_context): New function, factored out from ...
6320 (thread_rec): ... this.
6321 (continue_one_thread): Call win32_prepare_to_resume on each thread
6322 we're about to continue.
6323 (win32_resume): Call win32_prepare_to_resume on the event thread.
6324 * win32-low.h (struct win32_thread_info)
6325 <debug_registers_changed>: New field.
6326 (struct win32_target_ops): Change prototype of set_thread_context,
6327 delete set_thread_context and add prepare_to_resume.
6328 (win32_require_context): New declaration.
6329
63302014-10-08 Gary Benson <gbenson@redhat.com>
6331
6332 * server.h: Do not include common-exceptions.h.
6333
63342014-10-08 Gary Benson <gbenson@redhat.com>
6335
6336 * server.h: Do not include cleanups.h.
6337
63382014-09-30 James Hogan <james.hogan@imgtec.com>
6339
6340 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6341 mips64-dsp-linux.c.
6342
63432014-09-23 Yao Qi <yao@codesourcery.com>
6344
6345 * linux-low.c (lp_status_maybe_breakpoint): New function.
6346 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6347 (count_events_callback): Likewise.
6348 (select_event_lwp_callback): Likewise.
6349 (cancel_breakpoints_callback): Likewise.
6350
63512014-09-19 Don Breazeal <donb@codesourcery.com>
6352
6353 * linux-low.c (handle_extended_wait): Call
6354 linux_ptrace_get_extended_event.
6355 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6356 linux_is_extended_waitstatus.
6357
63582014-09-16 Joel Brobecker <brobecker@adacore.com>
6359
6360 * Makefile.in (CPPFLAGS): Define.
6361 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6362 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6363
63642014-09-16 Gary Benson <gbenson@redhat.com>
6365
6366 * inferiors.h (current_inferior): Renamed as...
6367 (current_thread): New variable. All uses updated.
6368 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6369 (maybe_move_out_of_jump_pad): Likewise.
6370 (cancel_breakpoint): Likewise.
6371 (linux_low_filter_event): Likewise.
6372 (wait_for_sigstop): Likewise.
6373 (linux_resume_one_lwp): Likewise.
6374 (need_step_over_p): Likewise.
6375 (start_step_over): Likewise.
6376 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6377 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6378 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6379 and save_inferior as saved_thread.
6380 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6381 saved_thread.
6382 (regcache_invalidate_thread): Likewise.
6383 * remote-utils.c (prepare_resume_reply): Likewise.
6384 * thread-db.c (thread_db_get_tls_address): Likewise.
6385 (disable_thread_event_reporting): Likewise.
6386 (remove_thread_event_breakpoints): Likewise.
6387 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6388 as saved_thread.
6389 * target.h (set_desired_inferior): Renamed as...
6390 (set_desired_thread): New declaration. All uses updated.
6391 * server.c (myresume): Updated comment to reference thread instead
6392 of inferior.
6393 (handle_serial_event): Likewise.
6394 (handle_target_event): Likewise.
6395
63962014-09-12 Tom Tromey <tromey@redhat.com>
6397 Gary Benson <gbenson@redhat.com>
6398
6399 * regcache.h: Include common-regcache.h.
6400 (regcache_read_pc): Don't declare.
6401 * regcache.c (get_thread_regcache_for_ptid): New function.
6402
64032014-09-11 Tom Tromey <tromey@redhat.com>
6404 Gary Benson <gbenson@redhat.com>
6405
6406 * symbol.c: New file.
6407 * Makefile.in (SFILES): Add symbol.c.
6408 (OBS): Add symbol.o.
6409
64102014-09-11 Gary Benson <gbenson@redhat.com>
6411
6412 * target.c (target_stop_ptid, target_continue_ptid): New
6413 functions.
6414
64152014-09-11 Tom Tromey <tromey@redhat.com>
6416 Gary Benson <gbenson@redhat.com>
6417
6418 * target.h: Include target/target.h.
6419 * target.c (target_read_memory, target_read_uint32)
6420 (target_write_memory): New functions.
6421
64222014-09-11 Gary Benson <gbenson@redhat.com>
6423
6424 * server.h (debug_hw_points): Don't declare.
6425 * server.c (debug_hw_points): Don't define. Replace all uses
6426 with show_debug_regs.
6427 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6428 all uses with show_debug_regs.
6429
64302014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6431
6432 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6433 endianness into account.
6434 (ppc_supply_ptrace_register): Likewise.
6435
64362014-09-03 James Hogan <james.hogan@imgtec.com>
6437
6438 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6439 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6440
64412014-09-03 Gary Benson <gbenson@redhat.com>
6442
6443 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6444 ALL_DEBUG_ADDRESS_REGISTERS.
6445
64462014-09-02 Gary Benson <gbenson@redhat.com>
6447
6448 * i386-low.h: Renamed as...
6449 * x86-low.h: New file. All type, function and variable name
6450 prefixes changed from "i386_" to "x86_". All references updated.
6451 * i386-low.c: Renamed as...
6452 * x86-low.c: New file. All type, function and variable name
6453 prefixes changed from "i386_" to "x86_". All references updated.
6454
64552014-09-02 Gary Benson <gbenson@redhat.com>
6456
6457 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6458 (x86_linux_new_thread): Likewise.
6459
64602014-08-29 Gary Benson <gbenson@redhat.com>
6461
6462 * server.h (setjmp.h): Do not include.
6463 (toplevel): Do not declare.
6464 (common-exceptions.h): Include.
6465 (cleanups.h): Likewise.
6466 * server.c (toplevel): Do not define.
6467 (exit_code): New static global.
6468 (detach_or_kill_for_exit_cleanup): New function.
6469 (main): New function. Original main renamed to...
6470 (captured_main): New function.
6471 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6472
64732014-08-29 Gary Benson <gbenson@redhat.com>
6474
6475 * Makefile.in (SFILES): Add common/common-exceptions.c.
6476 (OBS): Add common-exceptions.o.
6477 (common-exceptions.o): New rule.
6478 * utils.c (prepare_to_throw_exception): New function.
6479
64802014-08-29 Gary Benson <gbenson@redhat.com>
6481
6482 * config.in: Regenerate.
6483 * configure: Likewise.
6484
64852014-08-29 Gary Benson <gbenson@redhat.com>
6486
6487 * Makefile.in (SFILES): Add common/cleanups.c.
6488 (OBS): cleanups.o.
6489 (cleanups.o): New rule.
6490
64912014-08-29 Gary Benson <gbenson@redhat.com>
6492
6493 * utils.c (internal_vwarning): New function.
6494
64952014-08-28 Gary Benson <gbenson@redhat.com>
6496
6497 * utils.h (fatal): Remove declaration.
6498 * utils.c (fatal): Remove function.
6499
65002014-08-28 Gary Benson <gbenson@redhat.com>
6501
6502 * tracepoint.c (gdb_agent_init): Replace fatal with
6503 perror_with_name.
6504 (initialize_tracepoint): Likewise.
6505
65062014-08-28 Gary Benson <gbenson@redhat.com>
6507
6508 * remote-utils.c (remote_prepare): Replace fatal with error.
6509
65102014-08-28 Gary Benson <gbenson@redhat.com>
6511
6512 * linux-low.c (linux_async): Replace fatal with warning.
6513 Tidy up and return.
6514 (linux_start_non_stop): Return -1 if linux_async failed.
6515
65162014-08-28 Gary Benson <gbenson@redhat.com>
6517
6518 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6519 gdb_assert.
6520 (i386_dr_low_get_addr): Remove vague comment.
6521 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6522 gdb_assert.
6523
65242014-08-28 Gary Benson <gbenson@redhat.com>
6525
6526 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6527 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6528 internal_error.
6529 (linux_resume_one_lwp): Likewise.
6530 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6531 gdb_assert.
6532 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6533 with internal_error.
6534 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6535 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6536 (find_register_by_name): Replace fatal with internal_error.
6537 (find_regno): Likewise.
6538 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6539 * thread-db.c (thread_db_create_event): Likewise.
6540 (thread_db_load_search): Likewise.
6541 (try_thread_db_load_1): Likewise.
6542 * tracepoint.c (get_jump_space_head): Replace fatal with
6543 internal_error.
6544 (claim_trampoline_space): Likewise.
6545 (have_fast_tracepoint_trampoline_buffer): Likewise.
6546 (cmd_qtstart): Likewise.
6547 (stop_tracing): Likewise.
6548 (fast_tracepoint_collecting): Likewise.
6549 (target_malloc): Likewise.
6550 (download_tracepoint): Likewise.
6551 (download_trace_state_variables): Replace check with gdb_assert.
6552 (upload_fast_traceframes): Replace fatal with internal_error.
6553
65542014-08-19 Tom Tromey <tromey@redhat.com>
6555 Gary Benson <gbenson@redhat.com>
6556
6557 * Makefile.in (SFILES): Add common/common-debug.c.
6558 (OBS): Add common-debug.o.
6559 (common-debug.o): New rule.
6560 * debug.h (debug_printf): Don't declare.
6561 * debug.c (debug_printf): Renamed and rewritten as...
6562 (debug_vprintf): New function.
6563
65642014-08-19 Gary Benson <gbenson@redhat.com>
6565
6566 * utils.h: Do not include print-utils.h.
6567
65682014-08-19 Tom Tromey <tromey@redhat.com>
6569 Gary Benson <gbenson@redhat.com>
6570
6571 * server.h: Add static assertion.
6572 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6573
65742014-08-19 Tom Tromey <tromey@redhat.com>
6575 Gary Benson <gbenson@redhat.com>
6576
6577 * Makefile.in (SFILES): Add common/errors.c.
6578 (OBS): Add errors.o.
6579 (IPA_OBS): Add errors-ipa.o.
6580 (errors.o): New rule.
6581 (errors-ipa.o): Likewise.
6582 * utils.h (perror_with_name, error, warning): Don't declare.
6583 * utils.c (warning): Renamed and rewritten as...
6584 (vwarning): New function.
6585 (error): Renamed and rewritten as...
6586 (verror): New function.
6587 (internal_error): Renamed and rewritten as...
6588 (internal_verror): New function.
6589
65902014-08-07 Gary Benson <gbenson@redhat.com>
6591
6592 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6593 * configure: Regenerate.
6594 * config.in: Likewise.
6595 * server.h: Do not include errno.h.
6596 * event-loop.c: Likewise.
6597 * hostio-errno.c: Likewise.
6598 * linux-low.c: Likewise.
6599 * remote-utils.c: Likewise.
6600 * spu-low.c: Likewise.
6601 * utils.c: Likewise.
6602 * gdbreplay.c: Unconditionally include errno.h.
6603
66042014-08-07 Gary Benson <gbenson@redhat.com>
6605
6606 * server.h: Do not include string.h.
6607 * event-loop.c: Likewise.
6608 * linux-low.c: Likewise.
6609 * regcache.c: Likewise.
6610 * remote-utils.c: Likewise.
6611 * spu-low.c: Likewise.
6612 * utils.c: Likewise.
6613
66142014-08-07 Gary Benson <gbenson@redhat.com>
6615
6616 * server.h: Do not include gdb_assert.h.
6617
66182014-08-07 Gary Benson <gbenson@redhat.com>
6619
6620 * server.h: Do not include common-utils.h.
6621
66222014-08-07 Gary Benson <gbenson@redhat.com>
6623
6624 * server.h: Do not include ptid.h.
6625 * notif.h: Likewise.
6626
66272014-08-07 Gary Benson <gbenson@redhat.com>
6628
6629 * server.h: Do not include gdb_locale.h.
6630
66312014-08-07 Gary Benson <gbenson@redhat.com>
6632
6633 * server.h: Do not include gdb/signals.h.
6634 * win32-low.c: Likewise.
6635
66362014-08-07 Gary Benson <gbenson@redhat.com>
6637
6638 * server.h: Do not include pathmax.h.
6639
66402014-08-07 Gary Benson <gbenson@redhat.com>
6641
6642 * server.h: Do not include libiberty.h.
6643 * linux-bfin-low.c: Likewise.
6644
66452014-08-07 Gary Benson <gbenson@redhat.com>
6646
6647 * server.h: Do not include ansidecl.h.
6648
66492014-08-07 Gary Benson <gbenson@redhat.com>
6650
6651 * linux-x86-low.c: Do not include stddef.h.
6652 * lynx-ppc-low.c: Likewise.
6653 * tracepoint.c: Likewise.
6654
66552014-08-07 Gary Benson <gbenson@redhat.com>
6656
6657 * server.h: Do not include stdarg.h.
6658 * nto-low.c: Likewise.
6659
66602014-08-07 Gary Benson <gbenson@redhat.com>
6661
6662 * server.h: Do not include stdlib.h.
6663 * inferiors.c: Likewise.
6664 * linux-low.c: Likewise.
6665 * regcache.c: Likewise.
6666 * spu-low.c: Likewise.
6667 * tracepoint.c: Likewise.
6668 * utils.c: Likewise.
6669
66702014-08-07 Gary Benson <gbenson@redhat.com>
6671
6672 * server.h: Do not include stdio.h.
6673 * linux-low.c: Likewise.
6674 * remote-utils.c: Likewise.
6675 * spu-low.c: Likewise.
6676 * utils.c: Likewise.
6677 * wincecompat.c: Likewise.
6678
66792014-08-06 Gary Benson <gbenson@redhat.com>
6680
6681 * regcache.c (init_register_cache): Move conditionals inside if.
6682
66832014-08-06 Gary Benson <gbenson@redhat.com>
6684
6685 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6686
66872014-07-31 Gary Benson <gbenson@redhat.com>
6688
6689 * ax.h: Do not include server.h.
6690 * gdbthread.h: Likewise.
6691 * lynx-low.h: Likewise.
6692 * notif.h: Likewise.
6693
66942014-07-30 Gary Benson <gbenson@redhat.com>
6695
6696 * server.h: Include common-defs.h.
6697 Do not include config.h or build-gnulib-gdbserver/config.h.
6698
66992014-07-30 Gary Benson <gbenson@redhat.com>
6700
6701 * hostio-errno.c: Move server.h to top of includes list.
6702 * inferiors.c: Likewise.
6703 * linux-x86-low.c: Likewise.
6704 * notif.c: Include server.h.
6705
67062014-07-24 Tom Tromey <tromey@redhat.com>
6707 Gary Benson <gbenson@redhat.com>
6708
6709 * server.h (CORE_ADDR): Now unsigned.
6710
67112014-07-16 Pedro Alves <palves@redhat.com>
6712
6713 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6714
67152014-07-15 Pedro Alves <palves@redhat.com>
6716
6717 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6718 copy.
6719
67202014-07-11 Pedro Alves <palves@redhat.com>
6721
6722 * linux-low.c (kill_wait_lwp): New function, based on
6723 kill_one_lwp_callback, but use my_waitpid directly.
6724 (kill_one_lwp_callback, linux_kill): Use it.
6725
67262014-06-23 Pedro Alves <palves@redhat.com>
6727
6728 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6729 before setting DR0..DR3.
6730
67312014-06-20 Gary Benson <gbenson@redhat.com>
6732
6733 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6734 * configure: Regenerated.
6735 * config.in: Likewise.
6736
67372014-06-20 Gary Benson <gbenson@redhat.com>
6738
6739 * Makefile.in (SFILES): Update locations for files moved
6740 from common to nat.
6741 (object file files): Reordered.
6742
67432014-06-20 Gary Benson <gbenson@redhat.com>
6744
6745 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6746 (i386_dr_low_set_addr): Likewise.
6747 (i386_dr_low_get_addr): Likewise.
6748 (i386_dr_low_can_set_control): Likewise.
6749 (i386_dr_low_set_control): Likewise.
6750 (i386_dr_low_get_control): Likewise.
6751 (i386_dr_low_get_status): Likewise.
6752 (i386_get_debug_register_length): Likewise.
6753 * linux-x86-low.c (i386_dr_low_set_addr):
6754 Changed signature. Made static.
6755 (i386_dr_low_get_addr): Likewise.
6756 (i386_dr_low_set_control): Likewise.
6757 (i386_dr_low_get_control): Likewise.
6758 (i386_dr_low_get_status): Likewise.
6759 (i386_dr_low): New global variable.
6760 * win32-i386-low.c (i386_dr_low_set_addr):
6761 Changed signature. Made static.
6762 (i386_dr_low_get_addr): Likewise.
6763 (i386_dr_low_set_control): Likewise.
6764 (i386_dr_low_get_control): Likewise.
6765 (i386_dr_low_get_status): Likewise.
6766 (i386_dr_low): New global variable.
6767
67682014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6769
6770 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6771 * Makefile.in (AR, AR_FLAGS): Define.
6772 * configure: Regenerate.
6773
67742014-06-19 Gary Benson <gbenson@redhat.com>
6775
6776 * Makefile.in (i386-dregs.o): New rule.
6777 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6778 * i386-low.c (target.h): Remove include.
6779 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6780 (DR_CONTROL_SHIFT): Likewise.
6781 (DR_CONTROL_SIZE): Likewise.
6782 (DR_RW_EXECUTE): Likewise.
6783 (DR_RW_WRITE): Likewise.
6784 (DR_RW_READ): Likewise.
6785 (DR_RW_IORW): Likewise.
6786 (DR_LEN_1): Likewise.
6787 (DR_LEN_2): Likewise.
6788 (DR_LEN_4): Likewise.
6789 (DR_LEN_8): Likewise.
6790 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6791 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6792 (DR_ENABLE_SIZE): Likewise.
6793 (DR_LOCAL_SLOWDOWN): Likewise.
6794 (DR_GLOBAL_SLOWDOWN): Likewise.
6795 (DR_CONTROL_RESERVED): Likewise.
6796 (I386_DR_CONTROL_MASK): Likewise.
6797 (I386_DR_VACANT): Likewise.
6798 (I386_DR_LOCAL_ENABLE): Likewise.
6799 (I386_DR_GLOBAL_ENABLE): Likewise.
6800 (I386_DR_DISABLE): Likewise.
6801 (I386_DR_SET_RW_LEN): Likewise.
6802 (I386_DR_GET_RW_LEN): Likewise.
6803 (I386_DR_WATCH_HIT): Likewise.
6804 (i386_wp_op_t): Likewise.
6805 (i386_show_dr): Likewise.
6806 (i386_length_and_rw_bits): Likewise.
6807 (i386_insert_aligned_watchpoint): Likewise.
6808 (i386_remove_aligned_watchpoint): Likewise.
6809 (i386_handle_nonaligned_watchpoint): Likewise.
6810 i386_update_inferior_debug_regs(): Likewise.
6811 (i386_dr_insert_watchpoint): Likewise.
6812 (i386_dr_remove_watchpoint): Likewise.
6813 (i386_dr_region_ok_for_watchpoint): Likewise.
6814 (i386_dr_stopped_data_address): Likewise.
6815 (i386_dr_stopped_by_watchpoint): Likewise.
6816
68172014-06-19 Gary Benson <gbenson@redhat.com>
6818
6819 * i386-low.c (i386_dr_show): Renamed to
6820 i386_show_dr and made static. All uses updated.
6821 (i386_dr_length_and_rw_bits): Renamed to
6822 i386_length_and_rw_bits and made static.
6823 All uses updated.
6824 (i386_dr_insert_aligned_watchpoint): Renamed to
6825 i386_insert_aligned_watchpoint and made static.
6826 All uses updated.
6827 (i386_dr_remove_aligned_watchpoint): Renamed to
6828 i386_remove_aligned_watchpoint and made static.
6829 All uses updated.
6830 (i386_dr_update_inferior_debug_regs): Renamed to
6831 i386_update_inferior_debug_regs and made static.
6832 All uses updated.
6833
68342014-06-18 Gary Benson <gbenson@redhat.com>
6835
6836 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6837 (i386_dr_low_can_set_control): Likewise.
6838 (i386_get_debug_register_length): Likewise.
6839 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6840 (i386_dr_low_can_set_control): Likewise.
6841 (i386_get_debug_register_length): Likewise.
6842
68432014-06-17 Gary Benson <gbenson@redhat.com>
6844
6845 * i386-low.h (i386-dregs.h): New include.
6846 (DR_FIRSTADDR): Now in i386-dregs.h.
6847 (DR_LASTADDR): Likewise.
6848 (DR_NADDR): Likewise.
6849 (DR_STATUS): Likewise.
6850 (DR_CONTROL): Likewise.
6851 (i386_debug_reg_state): Likewise.
6852 (i386_dr_insert_watchpoint): Likewise.
6853 (i386_dr_remove_watchpoint): Likewise.
6854 (i386_dr_region_ok_for_watchpoint): Likewise.
6855 (i386_dr_stopped_data_address): Likewise.
6856 (i386_dr_stopped_by_watchpoint): Likewise.
6857 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6858
68592014-06-18 Gary Benson <gbenson@redhat.com>
6860
6861 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6862 i386_dr_insert_watchpoint.
6863 (i386_low_remove_watchpoint): Renamed to
6864 i386_dr_remove_watchpoint.
6865 (i386_low_region_ok_for_watchpoint): Renamed to
6866 i386_dr_region_ok_for_watchpoint.
6867 (i386_low_stopped_data_address): Renamed to
6868 i386_dr_stopped_data_address.
6869 (i386_low_stopped_by_watchpoint): Renamed to
6870 i386_dr_stopped_by_watchpoint.
6871 * i386-low.c (i386_show_dr): Renamed to
6872 i386_dr_show and made nonstatic. All uses updated.
6873 (i386_length_and_rw_bits): Renamed to
6874 i386_dr_length_and_rw_bits and made nonstatic.
6875 All uses updated.
6876 (i386_insert_aligned_watchpoint): Renamed to
6877 i386_dr_insert_aligned_watchpoint and made nonstatic.
6878 All uses updated.
6879 (i386_remove_aligned_watchpoint): Renamed to
6880 i386_dr_remove_aligned_watchpoint and made nonstatic.
6881 All uses updated.
6882 (i386_update_inferior_debug_regs): Renamed to
6883 i386_dr_update_inferior_debug_regs and made nonstatic.
6884 All uses updated.
6885 (i386_low_insert_watchpoint): Renamed to
6886 i386_dr_insert_watchpoint. All uses updated.
6887 (i386_low_remove_watchpoint): Renamed to
6888 i386_dr_remove_watchpoint. All uses updated.
6889 (i386_low_region_ok_for_watchpoint): Renamed to
6890 i386_dr_region_ok_for_watchpoint. All uses updated.
6891 (i386_low_stopped_data_address): Renamed to
6892 i386_dr_stopped_data_address. All uses updated.
6893 (i386_low_stopped_by_watchpoint): Renamed to
6894 i386_dr_stopped_by_watchpoint. All uses updated.
6895
68962014-06-18 Gary Benson <gbenson@redhat.com>
6897
6898 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6899 (i386_dr_low_can_set_control): Likewise.
6900 (i386_insert_aligned_watchpoint): New check.
6901
69022014-06-18 Gary Benson <gbenson@redhat.com>
6903
6904 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6905 Renamed to state.
6906
69072014-06-18 Gary Benson <gbenson@redhat.com>
6908
6909 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6910 instead of fatal and error.
6911 (i386_handle_nonaligned_watchpoint): Likewise.
6912
69132014-06-18 Gary Benson <gbenson@redhat.com>
6914
6915 * i386-low.c (i386_get_debug_register_length): New macro.
6916 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6917 (i386_show_dr): Use debug_printf instead of fprintf. Use
6918 phex to format values.
6919
69202014-06-18 Gary Benson <gbenson@redhat.com>
6921
6922 * i386-low.h: Comment changes.
6923 * i386-low.c: Likewise.
6924
69252014-06-18 Gary Benson <gbenson@redhat.com>
6926
6927 * i386-low.c: Whitespace changes.
6928
69292014-06-12 Tom Tromey <tromey@redhat.com>
6930
6931 * utils.c (freeargv): Remove.
6932
69332014-06-12 Tom Tromey <tromey@redhat.com>
6934
6935 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6936 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6937 (parse_debug_format_options): Likewise.
6938 (gdbserver_usage): Likewise.
6939 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6940 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6941 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6942 against libiberty.
6943 ($(LIBGNU)): Depend on libiberty.
6944 (all-lib): Recurse into all subdirs.
6945 (install-only): Invoke "install" target in subdirs.
6946 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6947 targets.
6948 * configure: Rebuild.
6949 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6950 for vasprintf, vsnprintf, or gettimeofday.
6951 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6952 srv_tgtobj.
6953
69542014-06-05 Joel Brobecker <brobecker@adacore.com>
6955
6956 * development.sh: Delete.
6957 * Makefile.in (config.status): Adjust dependency on development.sh.
6958 * configure.ac: Adjust development.sh source call.
6959 * configure: Regenerate.
6960
69612014-06-02 Pedro Alves <palves@redhat.com>
6962
6963 * ax.c (gdb_free_agent_expr): New function.
6964 * ax.h (gdb_free_agent_expr): New declaration.
6965 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6966 list.
6967 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6968 static.
6969 (clear_breakpoint_conditions_and_commands): New function.
6970 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6971 (clear_breakpoint_conditions_and_commands): New declaration.
6972
69732014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6974
6975 * linux-aarch64-low.c (asm/ptrace.h): Include.
6976
69772014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6978
6979 Fix TLS access for -static -pthread.
6980 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6981 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6982 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6983
69842014-05-20 Pedro Alves <palves@redhat.com>
6985
6986 * linux-aarch64-low.c (aarch64_insert_point)
6987 (aarch64_remove_point): No longer check whether the type is
6988 supported here. Adjust to new interface.
6989 (the_low_target): Install aarch64_supports_z_point_type as
6990 supports_z_point_type method.
6991 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6992 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6993 instead of a Z packet char. Adjust.
6994 (arm_supports_z_point_type): New function.
6995 (arm_insert_point, arm_remove_point): Adjust to new interface.
6996 (the_low_target): Install arm_supports_z_point_type.
6997 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6998 (cris_insert_point, cris_remove_point): Adjust to new interface.
6999 Don't check whether the type is supported here.
7000 (the_low_target): Install cris_supports_z_point_type.
7001 * linux-low.c (linux_supports_z_point_type): New function.
7002 (linux_insert_point, linux_remove_point): Adjust to new interface.
7003 * linux-low.h (struct linux_target_ops) <insert_point,
7004 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7005 raw_breakpoint pointer parameter.
7006 <supports_z_point_type>: New method.
7007 * linux-mips-low.c (mips_supports_z_point_type): New function.
7008 (mips_insert_point, mips_remove_point): Adjust to new interface.
7009 Use mips_supports_z_point_type.
7010 (the_low_target): Install mips_supports_z_point_type.
7011 * linux-ppc-low.c (the_low_target): Install NULL as
7012 supports_z_point_type method.
7013 * linux-s390-low.c (the_low_target): Install NULL as
7014 supports_z_point_type method.
7015 * linux-sparc-low.c (the_low_target): Install NULL as
7016 supports_z_point_type method.
7017 * linux-x86-low.c (x86_supports_z_point_type): New function.
7018 (x86_insert_point): Adjust to new insert_point interface. Use
7019 insert_memory_breakpoint. Adjust to new
7020 i386_low_insert_watchpoint interface.
7021 (x86_remove_point): Adjust to remove_point interface. Use
7022 remove_memory_breakpoint. Adjust to new
7023 i386_low_remove_watchpoint interface.
7024 (the_low_target): Install x86_supports_z_point_type.
7025 * lynx-low.c (lynx_target_ops): Install NULL as
7026 supports_z_point_type callback.
7027 * nto-low.c (nto_supports_z_point_type): New.
7028 (nto_insert_point, nto_remove_point): Adjust to new interface.
7029 (nto_target_ops): Install nto_supports_z_point_type.
7030 * mem-break.c: Adjust intro comment.
7031 (struct raw_breakpoint) <raw_type, size>: New fields.
7032 <inserted>: Update comment.
7033 <shlib_disabled>: Delete field.
7034 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7035 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7036 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7037 (raw_bkpt_type_to_target_hw_bp_type): New function.
7038 (find_enabled_raw_code_breakpoint_at): New function.
7039 (find_raw_breakpoint_at): New type and size parameters. Use them.
7040 (insert_memory_breakpoint): New function, based off
7041 set_raw_breakpoint_at.
7042 (remove_memory_breakpoint): New function.
7043 (set_raw_breakpoint_at): Reimplement.
7044 (set_breakpoint): New, based on set_breakpoint_at.
7045 (set_breakpoint_at): Reimplement.
7046 (delete_raw_breakpoint): Go through the_target->remove_point
7047 instead of assuming memory breakpoints.
7048 (find_gdb_breakpoint_at): Delete.
7049 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7050 (find_gdb_breakpoint): New function.
7051 (set_gdb_breakpoint_at): Delete.
7052 (z_type_supported): New function.
7053 (set_gdb_breakpoint_1): New function, loosely based off
7054 set_gdb_breakpoint_at.
7055 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7056 (delete_gdb_breakpoint_at): Delete.
7057 (delete_gdb_breakpoint_1): New function, loosely based off
7058 delete_gdb_breakpoint_at.
7059 (delete_gdb_breakpoint): New function.
7060 (clear_gdb_breakpoint_conditions): Rename to ...
7061 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7062 breakpoint.
7063 (add_condition_to_breakpoint): Make static.
7064 (add_breakpoint_condition): Take a struct breakpoint pointer
7065 instead of an address. Adjust.
7066 (gdb_condition_true_at_breakpoint): Rename to ...
7067 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7068 z_type parameter.
7069 (gdb_condition_true_at_breakpoint): Reimplement.
7070 (add_breakpoint_commands): Take a struct breakpoint pointer
7071 instead of an address. Adjust.
7072 (gdb_no_commands_at_breakpoint): Rename to ...
7073 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7074 parameter. Return true if no breakpoint was found. Change debug
7075 output.
7076 (gdb_no_commands_at_breakpoint): Reimplement.
7077 (run_breakpoint_commands): Rename to ...
7078 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7079 and change return type to boolean.
7080 (run_breakpoint_commands): New function.
7081 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7082 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7083 breakpoint. Go through the_target->remove_point instead of
7084 assuming memory breakpoint.
7085 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7086 software and hardware breakpoints.
7087 (reinsert_raw_breakpoint): Go through the_target->insert_point
7088 instead of assuming memory breakpoint.
7089 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7090 software and hardware breakpoints.
7091 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7092 Check both software and hardware breakpoints.
7093 (validate_inserted_breakpoint): Assert the breakpoint is a
7094 software breakpoint. Set the inserted flag to -1 instead of
7095 setting shlib_disabled.
7096 (delete_disabled_breakpoints): Adjust.
7097 (validate_breakpoints): Only validate software breakpoints.
7098 Adjust to inserted flag change.
7099 (check_mem_read, check_mem_write): Skip breakpoint types other
7100 than software breakpoints. Adjust to inserted flag change.
7101 * mem-break.h (enum raw_bkpt_type): New enum.
7102 (raw_breakpoint, struct process_info): Forward declare.
7103 (Z_packet_to_target_hw_bp_type): Delete declaration.
7104 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7105 (set_gdb_breakpoint, delete_gdb_breakpoint)
7106 (clear_breakpoint_conditions): New declarations.
7107 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7108 (breakpoint_inserted_here): Update comment.
7109 (add_breakpoint_condition, add_breakpoint_commands): Replace
7110 address parameter with a breakpoint pointer parameter.
7111 (gdb_breakpoint_here): Update comment.
7112 (delete_gdb_breakpoint_at): Delete.
7113 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7114 * server.c (process_point_options): Take a struct breakpoint
7115 pointer instead of an address. Adjust.
7116 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7117 delete_gdb_breakpoint.
7118 * spu-low.c (spu_target_ops): Install NULL as
7119 supports_z_point_type method.
7120 * target.h: Include mem-break.h.
7121 (struct target_ops) <prepare_to_access_memory>: Update comment.
7122 <supports_z_point_type>: New field.
7123 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7124 instead of a char. Also take a raw breakpoint pointer.
7125 * win32-arm-low.c (the_low_target): Install NULL as
7126 supports_z_point_type.
7127 * win32-i386-low.c (i386_supports_z_point_type): New function.
7128 (i386_insert_point, i386_remove_point): Adjust to new interface.
7129 (the_low_target): Install i386_supports_z_point_type.
7130 * win32-low.c (win32_supports_z_point_type): New function.
7131 (win32_insert_point, win32_remove_point): Adjust to new interface.
7132 (win32_target_ops): Install win32_supports_z_point_type.
7133 * win32-low.h (struct win32_target_ops):
7134 <supports_z_point_type>: New method.
7135 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7136 instead of a char. Also take a raw breakpoint pointer.
7137
71382014-05-20 Pedro Alves <palves@redhat.com>
7139
7140 * mem-break.h: Include break-common.h.
7141 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7142 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7143 (Z_packet_to_target_hw_bp_type): New declaration.
7144 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7145 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7146 (Z_PACKET_ACCESS_WP): Delete macros.
7147 (Z_packet_to_hw_type): Delete function.
7148 * i386-low.h: Don't include break-common.h here.
7149 (Z_packet_to_hw_type): Delete declaration.
7150 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7151 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7152 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7153 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7154 * linux-aarch64-low.c: Don't include break-common.h here.
7155 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7156 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7157 (Z_packet_to_target_hw_bp_type): Delete function.
7158 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7159 function.
7160 (mips_insert_point, mips_remove_point): Use
7161 Z_packet_to_target_hw_bp_type.
7162
71632014-05-20 Pedro Alves <palves@redhat.com>
7164
7165 * linux-aarch64-low.c: Include break-common.h.
7166 (enum target_point_type): Delete.
7167 (Z_packet_to_point_type): Rename to ...
7168 (Z_packet_to_target_hw_bp_type): ... this, and return a
7169 target_hw_bp_type instead.
7170 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7171 instead of an enum target_point_type.
7172 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7173 breakpoint type.
7174 (aarch64_dr_state_insert_one_point)
7175 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7176 (aarch64_handle_aligned_watchpoint)
7177 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7178 Take an enum target_hw_bp_type instead of an enum
7179 target_point_type.
7180 (aarch64_supports_z_point_type): New function.
7181 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7182 use Z_packet_to_target_hw_bp_type.
7183
71842014-05-20 Joel Brobecker <brobecker@adacore.com>
7185
7186 * configure.ac: Only use -Werror by default when DEVELOPMENT
7187 is true.
7188 * configure: Regenerate.
7189
71902014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7191
7192 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7193 * linux-x86-low.c (X86_64_USER_REGS): New.
7194 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7195
71962014-04-28 Yao Qi <yao@codesourcery.com>
7197
7198 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7199 name.
7200
72012014-04-25 Pedro Alves <palves@redhat.com>
7202
7203 PR server/16255
7204 * linux-low.c (linux_attach_fail_reason_string): New function.
7205 (linux_attach_lwp): Delete.
7206 (linux_attach_lwp_1): Rename to ...
7207 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7208 argument. Remove "initial" parameter. Return int instead of
7209 void. Don't error or warn here.
7210 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7211 failure to attach to the tgid. Call warning when failing to
7212 attach to an lwp.
7213 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7214 argument. Remove "initial" parameter. Return int instead of
7215 void. Don't error or warn here.
7216 (linux_attach_fail_reason_string): New declaration.
7217 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7218 interface change. Use linux_attach_fail_reason_string.
7219
72202014-04-24 Michael Sturm <michael.sturm@mintel.com>
7221 Walfred Tedeschi <walfred.tedeschi@intel.com>
7222
7223 * Makefile.in: Added rules to handle new files
7224 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7225 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7226 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7227 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7228 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7229 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7230 x32-avx512-linux.o.
7231 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7232 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7233 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7234 i386/x32-avx512.xml.
7235 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7236 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7237 i386/x32-avx512-linux.xml.
7238 * i387-fp.c (num_avx512_k_registers): New constant for number
7239 of K registers.
7240 (num_avx512_zmmh_low_registers): New constant for number of
7241 lower ZMM registers (0-15).
7242 (num_avx512_zmmh_high_registers): New constant for number of
7243 higher ZMM registers (16-31).
7244 (num_avx512_ymmh_registers): New contant for number of higher
7245 YMM registers (ymm16-31 added by avx521 on x86_64).
7246 (num_avx512_xmm_registers): New constant for number of higher
7247 XMM registers (xmm16-31 added by AVX512 on x86_64).
7248 (struct i387_xsave): Add space for AVX512 registers.
7249 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7250 Add code to handle AVX512 registers.
7251 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7252 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7253 prototypei from generated file.
7254 (tdesc_amd64_avx512_linux): Likewise.
7255 (init_registers_x32_avx512_linux): Likewise.
7256 (tdesc_x32_avx512_linux): Likewise.
7257 (init_registers_i386_avx512_linux): Likewise.
7258 (tdesc_i386_avx512_linux): Likewise.
7259 (x86_64_regmap): Add AVX512 registers.
7260 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7261 mask.
7262 (initialize_low_arch): Add code to initialize AVX512 registers.
7263
72642014-04-23 Pedro Alves <palves@redhat.com>
7265
7266 * mem-break.c (find_gdb_breakpoint_at): Make static.
7267 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7268
72692014-04-23 Pedro Alves <palves@redhat.com>
7270
7271 * i386-low.c: Don't include break-common.h here.
7272 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7273 prototype to take target_hw_bp_type as argument instead of a Z
7274 packet char.
7275 * i386-low.h: Include break-common.h here.
7276 (Z_packet_to_hw_type): Declare.
7277 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7278 prototypes.
7279 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7280 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7281 (x86_remove_point): Convert the packet number to a
7282 target_hw_bp_type before calling i386_low_remove_watchpoint.
7283 * win32-i386-low.c (i386_insert_point): Convert the packet number
7284 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7285 (i386_remove_point): Convert the packet number to a
7286 target_hw_bp_type before calling i386_low_remove_watchpoint.
7287
72882014-04-23 Pedro Alves <palves@redhat.com>
7289
7290 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7291
72922014-04-10 Pedro Alves <palves@redhat.com>
7293
7294 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7295 Check if the condition or command is NULL before checking if the
7296 breakpoint is known. On success, return true.
7297 * mem-break.h (add_breakpoint_condition): Document return.
7298 (add_breakpoint_commands): Add describing comment.
7299 * server.c (skip_to_semicolon): New function.
7300 (process_point_options): Use it.
7301
73022014-04-09 Pedro Alves <palves@redhat.com>
7303
7304 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7305 to lwpid_of.
7306
73072014-02-27 Pedro Alves <palves@redhat.com>
7308
7309 PR 12702
7310 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7311 macros.
7312 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7313 output.
7314 (last_thread_of_process_p): Take a PID argument instead of a
7315 thread pointer.
7316 (linux_wait_for_lwp): Delete.
7317 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7318 functions.
7319 (linux_low_filter_event): New function, party factored out from
7320 linux_wait_for_event.
7321 (linux_wait_for_event): Rename to ...
7322 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7323 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7324 sigsuspend. Check for zombie leaders.
7325 (linux_wait_for_event): Reimplement as wrapper around
7326 linux_wait_for_event_filtered.
7327 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7328 a normal or signal exit is seen, it's the whole process exiting.
7329 (wait_for_sigstop): No longer a for_each_inferior callback.
7330 Rewrite on top of linux_wait_for_event_filtered.
7331 (stop_all_lwps): Call wait_for_sigstop directly.
7332 * server.c (resume, handle_target_event): Handle
7333 TARGET_WAITKIND_NO_RESUMED.
7334
73352014-02-26 Joel Brobecker <brobecker@adacore.com>
7336
7337 * win32-low.c (psapi_get_dll_name,
7338 * win32_CreateToolhelp32Snapshot): Delete.
7339 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7340 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7341 Delete.
7342 (handle_load_dll): Add function description.
7343 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7344
73452014-02-26 Joel Brobecker <brobecker@adacore.com>
7346
7347 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7348 Add comment.
7349 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7350 base address when calling win32_add_one_solib.
7351 (handle_load_dll): Delete local variable load_addr.
7352 Remove 0x1000 offset applied to DLL base address when calling
7353 win32_add_one_solib.
7354 (handle_unload_dll): Add comment.
7355
73562014-02-26 Joel Brobecker <brobecker@adacore.com>
7357
7358 * win32-low.c (win32_add_all_dlls): Renames
7359 win32_ensure_ntdll_loaded. Rewrite function documentation.
7360 Adjust implementation to always load all DLLs.
7361 Add 0x1000 offset to DLL base address when calling
7362 win32_add_one_solib.
7363 (child_initialization_done): New static global.
7364 (do_initial_child_stuff): Set child_initialization_done to
7365 zero during child initialization, and 1 after. Replace call
7366 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7367 Add comment.
7368 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7369 (handle_unload_dll): Add function documentation.
7370 (get_child_debug_event): Ignore load and unload DLL events
7371 during child initialization.
7372
73732014-02-20 Doug Evans <dje@google.com>
7374
7375 Remove global all_lwps.
7376 * inferiors.h (ptid_of): Move here from linux-low.h.
7377 (pid_of, lwpid_of): Ditto.
7378 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7379 parameter is a struct thread_info * now.
7380 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7381 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7382 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7383 directly.
7384 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7385 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7386 * linux-arm-low.c (update_registers_callback): Update, "entry"
7387 parameter is a struct thread_info * now.
7388 Fetch lwpid from current_inferior directly.
7389 (arm_insert_point): Pass &all_threads to find_inferior instead of
7390 &all_lwps.
7391 (arm_remove_point): Ditto.
7392 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7393 (arm_prepare_to_resume): Fetch pid from thread.
7394 (arm_read_description): Fetch lwpid from current_inferior directly.
7395 * linux-low.c (all_lwps): Delete.
7396 (delete_lwp): Delete call to remove_inferior.
7397 (handle_extended_wait): Fetch lwpid from thread.
7398 (add_lwp): Don't set lwp->entry.id. Remove call to
7399 add_inferior_to_list.
7400 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7401 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7402 (kill_one_lwp_callback): Ditto.
7403 (linux_kill): Don't dereference NULL pointer.
7404 Fetch ptid,lwpid from thread.
7405 (get_detach_signal): Fetch ptid from thread.
7406 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7407 Simplify call to regcache_invalidate_thread.
7408 (delete_lwp_callback): Update, "entry" parameter is a
7409 struct thread_info * now. Fetch pid from thread.
7410 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7411 (status_pending_p_callback): Update, "entry" parameter is a
7412 struct thread_info * now. Fetch ptid from thread.
7413 (find_lwp_pid): Update, "entry" parameter is a
7414 struct thread_info * now.
7415 (linux_wait_for_lwp): Fetch pid from thread.
7416 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7417 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7418 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7419 (dequeue_one_deferred_signal): Ditto.
7420 (cancel_breakpoint): Fetch ptid from current_inferior.
7421 (linux_wait_for_event): Pass &all_threads to find_inferior,
7422 not &all_lwps. Fetch ptid, lwpid from thread.
7423 (count_events_callback): Update, "entry" parameter is a
7424 struct thread_info * now.
7425 (select_singlestep_lwp_callback): Ditto.
7426 (select_event_lwp_callback): Ditto.
7427 (cancel_breakpoints_callback): Ditto.
7428 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7429 not &all_lwps.
7430 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7431 (unsuspend_one_lwp): Update, "entry" parameter is a
7432 struct thread_info * now.
7433 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7434 not &all_lwps.
7435 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7436 Fetch lwpid from thread, not lwp.
7437 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7438 Pass &all_threads to find_inferior, not &all_lwps.
7439 (send_sigstop): Fetch lwpid from thread, not lwp.
7440 (send_sigstop_callback): Update, "entry" parameter is a
7441 struct thread_info * now.
7442 (suspend_and_send_sigstop_callback): Ditto.
7443 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7444 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7445 struct thread_info * now.
7446 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7447 from thread, lwp.
7448 (lwp_running): Update, "entry" parameter is a
7449 struct thread_info * now.
7450 (stop_all_lwps): Fetch ptid from thread.
7451 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7452 (linux_resume_one_lwp): Fetch lwpid from thread.
7453 (linux_set_resume_request): Update, "entry" parameter is a
7454 struct thread_info * now. Fetch pid, lwpid from thread.
7455 (resume_status_pending_p): Update, "entry" parameter is a
7456 struct thread_info * now.
7457 (need_step_over_p): Ditto. Fetch lwpid from thread.
7458 (start_step_over): Fetch lwpid from thread.
7459 (linux_resume_one_thread): Update, "entry" parameter is a
7460 struct thread_info * now. Fetch lwpid from thread.
7461 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7462 (proceed_one_lwp): Update, "entry" parameter is a
7463 struct thread_info * now. Fetch lwpid from thread.
7464 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7465 struct thread_info * now.
7466 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7467 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7468 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7469 directly.
7470 (regsets_store_inferior_registers): Ditto.
7471 (fetch_register, store_register): Ditto.
7472 (linux_read_memory, linux_write_memory): Ditto.
7473 (linux_request_interrupt): Ditto.
7474 (linux_read_auxv): Ditto.
7475 (linux_xfer_siginfo): Ditto.
7476 (linux_qxfer_spu): Ditto.
7477 (linux_qxfer_libraries_svr4): Ditto.
7478 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7479 moved to inferiors.h.
7480 (get_lwp): Delete.
7481 (get_thread_lwp): Update.
7482 (struct lwp_info): Delete member "entry". Simplify comment for
7483 member "thread".
7484 (all_lwps): Delete.
7485 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7486 current_inferior directly.
7487 (update_watch_registers_callback): Update, "entry" parameter is a
7488 struct thread_info * now. Fetch pid from thread.
7489 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7490 (mips_insert_point): Fetch lwpid from current_inferior.
7491 Pass &all_threads to find_inferior, not &all_lwps.
7492 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7493 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7494 directly.
7495 (mips_stopped_data_address): Ditto.
7496 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7497 directly.
7498 * linux-tile-low.c (tile_arch_setup): Ditto.
7499 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7500 (update_debug_registers_callback): Update, "entry" parameter is a
7501 struct thread_info * now. Fetch pid from thread.
7502 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7503 Pass &all_threads to find_inferior, not &all_lwps.
7504 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7505 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7506 Pass &all_threads to find_inferior, not &all_lwps.
7507 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7508 (i386_dr_low_get_status): Ditto.
7509 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7510 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7511 (x86_linux_read_description): Ditto.
7512 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7513
75142014-02-20 Doug Evans <dje@google.com>
7515
7516 * inferiors.c (get_first_inferior): Fix buglet.
7517
75182014-02-19 Doug Evans <dje@google.com>
7519
7520 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7521 * inferiors.c (add_thread): Change result type to struct thread_info *.
7522 All callers updated.
7523 (add_lwp): Call add_thread here instead of in callers.
7524 All callers updated.
7525 * linux-low.h (get_lwp_thread): Rewrite.
7526 (struct lwp_info): New member "thread".
7527
75282014-02-19 Doug Evans <dje@google.com>
7529
7530 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7531 All callers updated.
7532
75332014-02-19 Doug Evans <dje@google.com>
7534
7535 * inferiors.c (add_thread): Fix whitespace.
7536
75372014-02-19 Doug Evans <dje@google.com>
7538
7539 * dll.c (clear_dlls): Replace accessing list implemention details
7540 with API function.
7541 * gdbthread.h (get_first_thread): Declare.
7542 * inferiors.c (for_each_inferior_with_data): New function.
7543 (get_first_thread): New function.
7544 (find_thread_ptid): Simplify.
7545 (get_first_inferior): New function.
7546 (clear_list): Delete.
7547 (one_inferior_p): New function.
7548 (clear_inferior_list): New function.
7549 (clear_inferiors): Update.
7550 * inferiors.h (for_each_inferior_with_data): Declare.
7551 (clear_inferior_list): Declare.
7552 (one_inferior_p): Declare.
7553 (get_first_inferior): Declare.
7554 * linux-low.c (linux_wait_for_event): Replace accessing list
7555 implemention details with API function.
7556 * server.c (target_running): Ditto.
7557 (accumulate_file_name_length): New function.
7558 (emit_dll_description): New function.
7559 (handle_qxfer_libraries): Replace accessing list implemention
7560 details with API function.
7561 (handle_qxfer_threads_worker): New function.
7562 (handle_qxfer_threads_proper): Replace accessing list implemention
7563 details with API function.
7564 (handle_query): Ditto.
7565 (visit_actioned_threads_callback_ftype): New typedef.
7566 (visit_actioned_threads_data): New struct.
7567 (visit_actioned_threads): Rewrite to be find_inferior callback.
7568 (resume): Call find_inferior.
7569 (handle_status): Replace accessing list implemention
7570 details with API function.
7571 (process_serial_event): Replace accessing list implemention details
7572 with API function.
7573 * target.c (set_desired_inferior): Replace accessing list implemention
7574 details with API function.
7575 * tracepoint.c (same_process_p): New function.
7576 (gdb_agent_about_to_close): Replace accessing list implemention
7577 details with API function.
7578 * win32-low.c (child_delete_thread): Replace accessing list
7579 implemention details with API function.
7580 (match_dll_by_basename): New function.
7581 (dll_is_loaded_by_basename): New function.
7582 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7583 details call to dll_is_loaded_by_basename.
7584
75852014-02-19 Doug Evans <dje@google.com>
7586
7587 * dll.h (struct dll_info): Add comment.
7588 * gdbthread.h (struct thread_info): Add comment.
7589 (current_ptid): Simplify.
7590 * inferiors.c (add_process): Update.
7591 (remove_process): Update.
7592 * inferiors.h (struct process_info): Rename member "head" to "entry".
7593 * linux-low.c (delete_lwp): Update.
7594 (add_lwp): Update.
7595 (last_thread_of_process_p): Update.
7596 (kill_one_lwp_callback, linux_kill): Update.
7597 (status_pending_p_callback): Update.
7598 (wait_for_sigstop): Update. Simplify read of ptid.
7599 (start_step_over): Update.
7600 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7601 (get_lwp_thread): Update.
7602 (struct lwp_info): Rename member "head" to "entry".
7603 * regcache.h (inferior_list_entry): Delete.
7604 * server.c (kill_inferior_callback): Update.
7605 (detach_or_kill_inferior_callback): Update.
7606 (print_started_pid): Update.
7607 (print_attached_pid): Update.
7608 (process_serial_event): Simplify read of ptid.
7609 * thread-db.c (thread_db_create_event): Update.
7610 (thread_db_get_tls_address): Update.
7611 * win32-low.c (current_inferior_ptid): Simplify.
7612
76132014-02-19 Tom Tromey <tromey@redhat.com>
7614
7615 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7616 argument.
7617 (target_supports_btrace): Update.
7618
76192014-02-14 Yao Qi <yao@codesourcery.com>
7620
7621 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7622 (rsp-low-ipa.o): New target.
7623
76242014-02-12 Tom Tromey <tromey@redhat.com>
7625
7626 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7627 convert_ascii_to_int.
7628 * regcache.c (registers_to_string): Likewise.
7629 * remote-utils.c (decode_M_packet): Likewise.
7630 * server.c (process_serial_event): Likewise.
7631
76322014-02-12 Tom Tromey <tromey@redhat.com>
7633
7634 * server.c (handle_query, handle_v_run): Use hex2bin, not
7635 unhexify.
7636 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7637
76382014-02-12 Tom Tromey <tromey@redhat.com>
7639
7640 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7641 convert_int_to_ascii.
7642 * regcache.c (registers_to_string, collect_register_as_string):
7643 Likewise.
7644 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7645 Likewise.
7646 * server.c (process_serial_event): Likewise.
7647 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7648 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7649
76502014-02-12 Tom Tromey <tromey@redhat.com>
7651
7652 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7653 bin2hex, not hexify.
7654 * tracepoint.c (cmd_qtstatus): Likewise.
7655
76562014-02-12 Tom Tromey <tromey@redhat.com>
7657
7658 * remote-utils.c (monitor_output): Pass explicit length to
7659 hexify.
7660
76612014-02-12 Tom Tromey <tromey@redhat.com>
7662
7663 * tracepoint.c: Include rsp-low.h.
7664 * server.c: Include rsp-low.h.
7665 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7666 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7667 declare.
7668 * remote-utils.c: Include rsp-low.h.
7669 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7670 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7671 (convert_int_to_ascii, convert_ascii_to_int): Move to
7672 common/rsp-low.c.
7673 * regcache.c: Include rsp-low.h.
7674 * ax.c: Include rsp-low.h.
7675 * Makefile.in (SFILES): Add common/rsp-low.c.
7676 (OBS): Add rsp-low.o.
7677 (rsp-low.o): New target.
7678
76792014-02-12 Tom Tromey <tromey@redhat.com>
7680
7681 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7682 Include print-utils.h.
7683 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7684 (plongest, thirty_two, phex_nz): Remove.
7685 * Makefile.in (SFILES): Add common/print-utils.c.
7686 (OBS): Add print-utils.o.
7687 (print-utils-ipa.o): New target.
7688 (print-utils.o): New target.
7689 (IPA_OBJS): Add print-utils-ipa.o.
7690
76912014-02-06 Tom Tromey <tromey@redhat.com>
7692
7693 * Makefile.in (SFILES): Fix indentation.
7694
76952014-02-05 Doug Evans <dje@google.com>
7696
7697 * linux-low.c (linux_wait_for_event): Improve comment.
7698 (linux_wait_1): Keep current_inferior in sync with event_child.
7699
77002014-01-22 Doug Evans <dje@google.com>
7701
7702 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7703
77042014-01-22 Doug Evans <dje@google.com>
7705
7706 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7707 * configure: Regenerate.
7708 * config.in: Regenerate.
7709 * Makefile.in (SFILES): Add debug.c.
7710 (OBS): Add debug.o.
7711 * debug.c: New file.
7712 * debug.h: New file.
7713 * linux-aarch64-low.c (*): Update all debugging printfs to use
7714 debug_printf instead of fprintf.
7715 * linux-arm-low.c (*): Ditto.
7716 * linux-cris-low.c (*): Ditto.
7717 * linux-crisv32-low.c (*): Ditto.
7718 * linux-m32r-low.c (*): Ditto.
7719 * linux-sparc-low.c (*): Ditto.
7720 * linux-x86.c (*): Ditto.
7721 * linux-low.c (*): Ditto.
7722 (linux_wait_1): Add calls to debug_enter, debug_exit.
7723 (linux_wait): Remove redundant debugging printf.
7724 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7725 (linux_resume, unstop_all_lwps): Ditto.
7726 * mem-break.c (*): Update all debugging printfs to use
7727 debug_printf instead of fprintf.
7728 * remote-utils.c (*): Ditto.
7729 * thread-db.c (*): Ditto.
7730 * server.c #include <ctype.h>, "gdb_vecs.h".
7731 (debug_threads): Moved to debug.c.
7732 (*): Update all debugging printfs to use debug_printf instead of
7733 fprintf.
7734 (start_inferior): Replace call to fflush with call to debug_flush.
7735 (monitor_show_help): Mention set debug-format.
7736 (parse_debug_format_options): New function.
7737 (handle_monitor_command): Handle "monitor set debug-format".
7738 (gdbserver_usage): Mention --debug-format.
7739 (main): Parse --debug-format.
7740 * server.h (debug_threads): Declaration moved to debug.h.
7741 #include "debug.h".
7742 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7743 trace_debug_1 that uses debug_printf.
7744 (tracepoint_look_up_symbols): Update all debugging printfs to use
7745 debug_printf instead of fprintf.
7746
77472014-01-20 Baruch Siach <baruch@tkos.co.il>
7748
7749 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7750 sys/ptrace.h.
7751
77522014-01-17 Pedro Alves <palves@redhat.com>
7753
7754 PR build/16445
7755 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7756 defined after including gdb_proc_service.h.
7757
77582014-01-16 Doug Evans <dje@google.com>
7759
7760 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7761 (match_dll): Use it.
7762
77632014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7764
7765 * target.h (target_ops) <read_btrace>: Change parameters and
7766 return type to allow error reporting.
7767 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7768 trace reading errors on.
7769 * linux-low.c (linux_low_read_btrace): Pass trace reading
7770 errors on.
7771 (linux_low_disable_btrace): New.
7772
77732014-01-15 Doug Evans <dje@google.com>
7774
7775 * inferiors.c (thread_id_to_gdb_id): Delete.
7776 * inferiors.h (thread_id_to_gdb_id): Delete.
7777
77782014-01-13 Eli Zaretskii <eliz@gnu.org>
7779
7780 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7781 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7782 versions.
7783
77842014-01-08 Pedro Alves <palves@redhat.com>
7785
7786 * server.c (handle_status): Don't discard previous queued stop
7787 replies or thread's pending status here.
7788 (main) <disconnection>: Do it here instead.
7789
77902014-01-08 Pedro Alves <palves@redhat.com>
7791
7792 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7793 * server.c (visit_actioned_threads, handle_pending_status): New
7794 function.
7795 (handle_v_cont): Factor out parts to ...
7796 (resume): ... this new function. If in all-stop, and a thread
7797 being resumed has a pending status, report it without actually
7798 resuming.
7799 (myresume): Adjust to use the new 'resume' function.
7800 (clear_pending_status_callback, set_pending_status_callback)
7801 (find_status_pending_thread_callback): New functions.
7802 (handle_status): Handle the case of multiple threads having
7803 interesting statuses to report. Report threads' real last signal
7804 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7805 with an interesting thread to report the status for, instead of
7806 always reporting the status of the first thread.
7807
78082014-01-01 Joel Brobecker <brobecker@adacore.com>
7809
7810 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7811 * gdbreplay.c (gdbreplay_version): Likewise.
7812
78132013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7814
7815 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7816 iov.iov_len with the real length in use.
7817
78182013-12-13 Joel Brobecker <brobecker@adacore.com>
7819
7820 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7821 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7822 for all targets that use win32-low.c.
7823 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7824 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7825
78262013-12-13 Pedro Alves <palves@redhat.com>
7827
7828 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7829 if equal to TARGET_WAITKIND_LOADED.
7830 * win32-low.c (cached_status): New static global.
7831 (win32_wait): Add declaration.
7832 (do_initial_child_stuff): Flush all initial pending debug events
7833 up to the initial breakpoint.
7834 (win32_wait): If CACHED_STATUS was set, return that instead
7835 of doing a real wait. Remove the code resuming the execution
7836 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7837 during the initial phase. Also remove the code changing
7838 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7839 TARGET_WAITKIND_STOPPED.
7840
78412013-12-11 Yao Qi <yao@codesourcery.com>
7842
7843 * notif.c (handle_notif_ack): Return 0 if no notification
7844 matches.
7845
78462013-11-20 Doug Evans <dje@google.com>
7847
7848 * linux-low.c (linux_set_resume_request): Fix comment.
7849
78502013-11-20 Doug Evans <dje@google.com>
7851
7852 * linux-low.c (resume_status_pending_p): Tweak comment.
7853
78542013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7855
7856 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7857 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7858 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7859 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7860 (srv_amd64_regobj): Add amd64-mpx.o.
7861 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7862 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7863 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7864 * i387-fp.c (num_pl_bnd_register) Added constant.
7865 (num_pl_bnd_cfg_registers) Added constant.
7866 (struct i387_xsave) Added reserved area and MPX fields.
7867 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7868 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7869 function.
7870 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7871 (init_registers_amd64_mpx_linux): Declare new function.
7872 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7873 (x86_64_regmap): Add MPX registers.
7874 (x86_linux_read_description): Add MPX case.
7875 (initialize_low_arch): Initialize MPX targets.
7876
78772013-11-18 Tom Tromey <tromey@redhat.com>
7878
7879 * configure: Rebuild.
7880 * configure.ac: Don't check for stdlib.h.
7881 * gdbreplay.c: Unconditionally include stdlib.h.
7882
78832013-11-18 Tom Tromey <tromey@redhat.com>
7884
7885 * config.in: Rebuild.
7886 * configure: Rebuild.
7887 * configure.ac: Don't use AC_HEADER_DIRENT.
7888
78892013-11-18 Tom Tromey <tromey@redhat.com>
7890
7891 * server.h: Don't check HAVE_STRING_H.
7892 * gdbreplay.c: Don't check HAVE_STRING_H.
7893 * configure: Rebuild.
7894
78952013-11-18 Tom Tromey <tromey@redhat.com>
7896
7897 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7898 LIBGNU.
7899
79002013-11-08 Tom Tromey <tromey@redhat.com>
7901
7902 * configure, config.in: Rebuild.
7903 * configure.ac: Remove unused configury.
7904
79052013-11-08 Tom Tromey <tromey@redhat.com>
7906
7907 * acinclude.m4: Include common.m4, codeset.m4.
7908 * configure, config.in: Rebuild.
7909 * configure.ac: Use GDB_AC_COMMON.
7910
79112013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7912
7913 * linux-s390-low.c (HWCAP_S390_TE): New define.
7914 (s390_arch_setup): Consider the TE field in the HWCAP for
7915 determining 'have_regset_tdb'.
7916
79172013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7918
7919 PR gdb/16014
7920 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7921 call to sizeof.
7922
79232013-10-02 Pedro Alves <palves@redhat.com>
7924
7925 * server.c (process_serial_event): Don't output "GDBserver
7926 exiting" if GDB is connected through stdio.
7927 * target.c (mywait): Likewise, be silent if GDB is connected
7928 through stdio.
7929
79302013-10-01 Joel Brobecker <brobecker@adacore.com>
7931
7932 * lynx-low.c (lynx_add_threads_after_attach): New function.
7933 (lynx_attach): Remove call to add_thread. Add call to
7934 lynx_add_threads_after_attach instead.
7935
79362013-09-28 Mike Frysinger <vapier@gentoo.org>
7937
7938 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7939 * config.in, configure: Regenerated.
7940
79412013-09-18 Yao Qi <yao@codesourcery.com>
7942
7943 PR server/15959
7944 * server.c (start_inferior): Clear 'resume_info'.
7945
79462013-09-16 Jiong Wang <jiwang@tilera.com>
7947
7948 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7949 for each register.
7950
79512013-09-16 Jiong Wang <jiwang@tilera.com>
7952
7953 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7954 linux-tile-low.o to srv_tgtobj.
7955
79562013-09-16 Will Newton <will.newton@linaro.org>
7957
7958 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7959 out regs.
7960
79612013-09-06 Pedro Alves <palves@redhat.com>
7962
7963 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7964 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7965 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7966 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7967 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7968 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7969
79702013-09-06 Pedro Alves <palves@redhat.com>
7971
7972 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7973 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7974
79752013-09-06 Pedro Alves <palves@redhat.com>
7976
7977 * linux-amd64-ipa.c: Include tracepoint.h.
7978 * linux-i386-ipa.c: Include tracepoint.h.
7979
79802013-09-06 Ricard Wanderlof <ricardw@axis.com>
7981
7982 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7983 (ps_get_thread_area): New function.
7984
79852013-09-06 Ricard Wanderlof <ricardw@axis.com>
7986
7987 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7988 (initialize_low_arch): Call init_registers_crisv32 rather than
7989 init_register_crisv32.
7990
79912013-09-05 Pedro Alves <palves@redhat.com>
7992
7993 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7994 to ...
7995 * hostio.h: ... this new file.
7996 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7997 win32-low.c: Include hostio.h.
7998
79992013-09-05 Pedro Alves <palves@redhat.com>
8000
8001 * server.h (gdb_client_data, handler_func, callback_handler_func)
8002 (delete_file_handler, add_file_handler, append_callback_event)
8003 (delete_callback_event, start_event_loop, initialize_event_loop):
8004 Move to event-loop.h and include it.
8005 * event-loop.h: New file.
8006
80072013-09-05 Pedro Alves <palves@redhat.com>
8008
8009 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8010 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8011 (loaded_dll, unloaded_dll): Move to ...
8012 * dll.h: ... this new file.
8013 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8014
80152013-09-05 Pedro Alves <palves@redhat.com>
8016
8017 * server.h (current_process, get_thread_process, all_processes)
8018 (add_inferior_to_list, for_each_inferior, current_inferior)
8019 (remove_inferior, add_process, remove_process, find_process_pid)
8020 (have_started_inferiors_p, have_attached_inferiors_p)
8021 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8022 (clear_inferiors, find_inferior, find_inferior_id)
8023 (inferior_target_data, set_inferior_target_data)
8024 (inferior_regcache_data, set_inferior_regcache_data): Move to
8025 inferiors.h, and include it.
8026 * inferiors.h: New file.
8027
80282013-09-05 Pedro Alves <palves@redhat.com>
8029
8030 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8031 Move ...
8032 * ax.h: ... here.
8033
80342013-09-05 Pedro Alves <palves@redhat.com>
8035
8036 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8037 tracepoint.h.
8038 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8039 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8040 (handle_tracepoint_general_set, handle_tracepoint_query)
8041 (tracepoint_finished_step, tracepoint_was_hit)
8042 (release_while_stepping_state_list, current_traceframe)
8043 (in_readonly_region, traceframe_read_mem)
8044 (fetch_traceframe_registers, traceframe_read_sdata)
8045 (traceframe_read_info, struct fast_tpoint_collect_status)
8046 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8047 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8048 (supply_fast_tracepoint_registers)
8049 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8050 (ipa_tdesc, claim_trampoline_space)
8051 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8052 (agent_mem_read, agent_get_trace_state_variable_value)
8053 (agent_set_trace_state_variable_value, agent_tsv_read)
8054 (agent_mem_read_string, get_raw_reg_func_addr)
8055 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8056 * tracepoint.h: ... this new file.
8057
80582013-09-05 Pedro Alves <palves@redhat.com>
8059
8060 * server.h (perror_with_name, error, fatal, warning, paddress)
8061 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8062 include it.
8063 * utils.h: New file.
8064
80652013-09-05 Pedro Alves <palves@redhat.com>
8066
8067 * server.h (remote_debug, noack_mode, transport_is_reliable)
8068 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8069 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8070 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8071 (write_enn, initialize_async_io, enable_async_io)
8072 (disable_async_io, check_remote_input_interrupt_request)
8073 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8074 (dead_thread_notify, prepare_resume_reply)
8075 (decode_address_to_semicolon, decode_address, decode_m_packet)
8076 (decode_M_packet, decode_X_packet, decode_xfer_write)
8077 (decode_search_memory_packet, unhexify, hexify)
8078 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8079 (look_up_one_symbol, relocate_instruction)
8080 (monitor_output): Move to remote-utils.h, and include it.
8081 * remote-utils.h: New file.
8082
80832013-09-05 Pedro Alves <palves@redhat.com>
8084
8085 * server.h (_): Delete.
8086
80872013-09-02 Pedro Alves <palves@redhat.com>
8088
8089 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8090 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8091 allocated.
8092 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8093
80942013-09-02 Pierre Muller <muller@sourceware.org>
8095
8096 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8097 or WriteProcessMemory complete successfully and handle
8098 ERROR_PARTIAL_COPY error.
8099
81002013-09-02 Pedro Alves <palves@redhat.com>
8101
8102 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8103 error instead of EIO.
8104
81052013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8106
8107 PR server/15604
8108 * linux-low.c: Include filestuff.h.
8109 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8110 * lynx-low.c: Include filestuff.h.
8111 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8112 * server.c: Include filestuff.h.
8113 (main): Call notice_open_fds.
8114 * spu-low.c: Include filestuff.h.
8115 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8116
81172013-08-22 Luis Machado <lgustavo@codesourcery.com>
8118
8119 * Makefile.in: Explain why ../target and ../nat are not
8120 listed as include file search paths.
8121 (linux-waitpid.o): New object file rule.
8122 * configure.srv (srv_native_linux_obj): New variable.
8123 Replace all occurrences of linux native object files with
8124 $srv_native_linux_obj.
8125 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8126 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8127 (linux_enable_event_reporting): Remove declaration.
8128 (my_waitpid): Moved to common/linux-waitpid.c.
8129 (linux_wait_for_event): Pass ptid when calling
8130 linux_enable_event_reporting.
8131 (linux_supports_tracefork_flag): Remove.
8132 (linux_enable_event_reporting): Likewise.
8133 (linux_tracefork_grandchild): Remove.
8134 (STACK_SIZE): Moved to common/linux-ptrace.c.
8135 (linux_tracefork_child): Remove.
8136 (linux_test_for_tracefork): Remove.
8137 (linux_look_up_symbols): Call linux_supports_traceclone.
8138 (initialize_low): Remove call to linux_test_for_tracefork.
8139 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8140 common/linux-ptrace.h.
8141 (PTRACE_TYPE_ARG4): Likewise.
8142 Include linux-ptrace.h.
8143
81442013-08-21 Pedro Alves <palves@redhat.com>
8145
8146 * config.in: Renegerate.
8147
81482013-08-19 Luis Machado <lgustavo@codesourcery.com>
8149
8150 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8151 (SFILES): Remove $(srcdir)/common/target-common.c and
8152 add $(srcdir)/target/waitstatus.c.
8153 (OBS): Remove target-common.o and add waitstatus.o.
8154 (server_h): Remove $(srcdir)/../common/target-common.h and
8155 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8156 and $(srcdir)/../target/waitstatus.h.
8157 (target-common.o): Remove.
8158 (waitstatus.o): New target object file.
8159 * target.h: Do not include target-common.h and
8160 include target/resume.h, target/wait.h and
8161 target/waitstatus.h.
8162
81632013-08-13 Luis Machado <lgustavo@codesourcery.com>
8164
8165 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8166 to PTRACE_TYPE_ARG3.
8167 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8168 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8169 PTRACE_TYPE_ARG4.
8170 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8171 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8172
81732013-07-27 Jie Zhang <jie@codesourcery.com>
8174 Daniel Jacobowitz <dan@codesourcery.com>
8175 Yao Qi <yao@codesourcery.com>
8176
8177 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8178 (mips-linux-watch.o): New rule.
8179 (mips_linux_watch_h): New variable.
8180 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8181 srv_tgtobj.
8182 * linux-mips-low.c: Include mips-linux-watch.h.
8183 (struct arch_process_info, struct arch_lwp_info): New.
8184 (update_watch_registers_callback): New function.
8185 (mips_linux_new_process, mips_linux_new_thread) New functions.
8186 (mips_linux_prepare_to_resume, mips_insert_point): New
8187 functions.
8188 (mips_remove_point, mips_stopped_by_watchpoint): New
8189 functions.
8190 (rsp_bp_type_to_target_hw_bp_type): New function.
8191 (mips_stopped_data_address): New function.
8192 (the_low_target): Add watchpoint support functions.
8193
81942013-07-27 Yao Qi <yao@codesourcery.com>
8195
8196 * i386-low.c: Include break-common.h.
8197 (enum target_hw_bp_type): Remove.
8198
81992013-07-24 Luis Machado <lgustavo@codesourcery.com>
8200
8201 * Makefile.in (SFILES): /common/target-common.c.
8202 (OBS): Add target-common.o.
8203 (server_h): Add $(srcdir)/../common/target-common.h.
8204 (target-common.o): New target.
8205 * server.c (queue_stop_reply_callback): Free
8206 status string after use.
8207 * target.c (target_waitstatus_to_string): Remove.
8208 * target.h: Include target-common.h.
8209 (resume_kind): Likewise.
8210 (target_waitkind): Likewise.
8211 (target_waitstatus): Likewise.
8212 (TARGET_WNOHANG): Likewise.
8213
82142013-07-04 Yao Qi <yao@codesourcery.com>
8215
8216 * Makefile.in (host_alias): Use @host_noncanonical@.
8217 (target_alias): Use @target_noncanonical@.
8218 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8219 ACX_NONCANONICAL_HOST.
8220 * configure: Regenerated.
8221
8222 Revert:
8223 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8224
8225 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8226 * configure: Rebuild.
8227 * Makefile.in (version_host, version_target): Get from configure.
8228 (version.c): Use $(version_host) and $(version_target).
8229
82302013-07-03 Pedro Alves <palves@redhat.com>
8231
8232 * Makefile.in (config.status): Depend on development.sh.
8233 * acinclude.m4: Include libmcheck.m4.
8234 * configure: Regenerate.
8235
82362013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8237
8238 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8239 attribute inside the parentheses.
8240 (winapi_DebugSetProcessKillOnExit): Ditto.
8241 (winapi_DebugBreakProcess): Ditto.
8242 (winapi_GenerateConsoleCtrlEvent): Ditto.
8243
82442013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8245
8246 * notif.h (notif_event): Add a dummy member to avoid compiler
8247 errors.
8248
82492013-07-01 Pedro Alves <palves@redhat.com>
8250
8251 * hostio.c (HOSTIO_PATH_MAX): Define.
8252 (require_filename, handle_open, handle_unlink, handle_readlink):
8253 Use it.
8254
82552013-07-01 Pedro Alves <palves@redhat.com>
8256
8257 * server.h: Include "pathmax.h".
8258 * linux-low.c: Don't include sys/param.h.
8259 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8260 MAXPATHLEN.
8261 * win32-low.c: Don't include sys/param.h.
8262 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8263
82642013-07-01 Pedro Alves <palves@redhat.com>
8265
8266 * event-loop.c: Don't check HAVE_UNISTD_H before including
8267 <unistd.h>.
8268 * gdbreplay.c: Likewise.
8269 * remote-utils.c: Likewise.
8270 * server.c: Likewise.
8271 * configure.ac: Don't check for unistd.h.
8272 * configure: Regenerate.
8273
82742013-06-28 Tom Tromey <tromey@redhat.com>
8275
8276 * Makefile.in (version.c): Use version.in, not
8277 common/version.in.
8278
82792013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8280
8281 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8282 * configure: Rebuild.
8283 * Makefile.in (version_host, version_target): Get from configure.
8284 (version.c): Use $(version_host) and $(version_target).
8285
82862013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8287
8288 Fix trace-status to output user name without trailing colon.
8289 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8290
82912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8292
8293 Fix trace-status to output proper start-time and stop-time.
8294 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8295 output start time and stop time in hex as gdb expects.
8296
82972013-06-26 Pedro Alves <pedro@codesourcery.com>
8298
8299 * tracepoint.c (build_traceframe_info_xml): Output trace state
8300 variables present in the trace buffer.
8301
83022013-06-24 Tom Tromey <tromey@redhat.com>
8303
8304 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8305 create-version.sh.
8306 (version.o): Remove.
8307 * gdbreplay.c: Include version.h.
8308 (version, host_name): Don't declare.
8309 * server.h: Include version.h.
8310 (version, host_name): Don't declare.
8311
83122013-06-12 Pedro Alves <palves@redhat.com>
8313
8314 * linux-x86-low.c (linux_is_elf64): Delete global.
8315 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8316 with local linux_pid_exe_is_elf_64_file use.
8317
83182013-06-11 Pedro Alves <palves@redhat.com>
8319
8320 * linux-low.c (regset_disabled, disable_regset): New functions.
8321 (regsets_fetch_inferior_registers)
8322 (regsets_store_inferior_registers): Use them.
8323 (initialize_regsets_info); Don't allocate the disabled_regsets
8324 array here.
8325 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8326 comment.
8327
83282013-06-11 Pedro Alves <palves@redhat.com>
8329
8330 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8331 xmalloc.
8332
83332013-06-11 Pedro Alves <palves@redhat.com>
8334
8335 * linux-x86-low.c (initialize_low_arch): Call
8336 init_registers_x32_avx_linux.
8337
83382013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8339
8340 Fix compatibility with Android Bionic.
8341 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8342 it is not empty.
8343
83442013-06-07 Pedro Alves <palves@redhat.com>
8345
8346 PR server/14823
8347 * Makefile.in (OBS): Add tdesc.o.
8348 (IPA_OBJS): Add tdesc-ipa.o.
8349 (tdesc-ipa.o): New rule.
8350 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8351 interface.
8352 * linux-low.c (new_inferior): Delete.
8353 (disabled_regsets, num_regsets): Delete.
8354 (linux_add_process): Adjust to set the new per-process
8355 new_inferior flag.
8356 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8357 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8358 was a stop. When calling arch_setup, switch the current inferior
8359 to the thread that got an event.
8360 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8361 (regsets_fetch_inferior_registers)
8362 (regsets_store_inferior_registers): New regsets_info parameter.
8363 Adjust to use it.
8364 (linux_register_in_regsets): New regs_info parameter. Adjust to
8365 use it.
8366 (register_addr, fetch_register, store_register): New usrregs_info
8367 parameter. Adjust to use it.
8368 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8369 parameter regs_info. Adjust to use it.
8370 (linux_fetch_registers): Get the current inferior's regs_info, and
8371 adjust to use it.
8372 (linux_store_registers): Ditto.
8373 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8374 (initialize_low): Don't initialize the target_regsets here. Call
8375 initialize_low_arch.
8376 * linux-low.h (target_regsets): Delete declaration.
8377 (struct regsets_info): New.
8378 (struct usrregs_info): New.
8379 (struct regs_info): New.
8380 (struct process_info_private) <new_inferior>: New field.
8381 (struct linux_target_ops): Delete the num_regs, regmap, and
8382 regset_bitmap fields. New field regs_info.
8383 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8384 * i387-fp.c (num_xmm_registers): Delete.
8385 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8386 calls to new interface.
8387 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8388 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8389 Infer the number of xmm registers from the regcache's target
8390 description.
8391 * i387-fp.h (num_xmm_registers): Delete.
8392 * inferiors.c (add_thread): Don't install the thread's regcache
8393 here.
8394 * proc-service.c (gregset_info): Fetch the current inferior's
8395 regs_info. Adjust to use it.
8396 * regcache.c: Include tdesc.h.
8397 (register_bytes, reg_defs, num_registers)
8398 (gdbserver_expedite_regs): Delete.
8399 (get_thread_regcache): If the thread doesn't have a regcache yet,
8400 create one, instead of aborting gdbserver.
8401 (regcache_invalidate_one): Rename to ...
8402 (regcache_invalidate_thread): ... this.
8403 (regcache_invalidate_one): New.
8404 (regcache_invalidate): Only invalidate registers of the current
8405 process.
8406 (init_register_cache): Add target_desc parameter, and use it.
8407 (new_register_cache): Ditto. Assert the target description has a
8408 non zero registers_size.
8409 (regcache_cpy): Add assertions. Adjust.
8410 (realloc_register_cache, set_register_cache): Delete.
8411 (registers_to_string, registers_from_string): Adjust.
8412 (find_register_by_name, find_regno, find_register_by_number)
8413 (register_cache_size): Add target_desc parameter, and use it.
8414 (free_register_cache_thread, free_register_cache_thread_one)
8415 (regcache_release, register_cache_size): New.
8416 (register_size): Add target_desc parameter, and use it.
8417 (register_data, supply_register, supply_register_zeroed)
8418 (supply_regblock, supply_register_by_name, collect_register)
8419 (collect_register_as_string, collect_register_by_name): Adjust.
8420 * regcache.h (struct target_desc): Forward declare.
8421 (struct regcache) <tdesc>: New field.
8422 (init_register_cache, new_register_cache): Add target_desc
8423 parameter.
8424 (regcache_invalidate_thread): Declare.
8425 (regcache_invalidate_one): Delete declaration.
8426 (regcache_release): Declare.
8427 (find_register_by_number, register_cache_size, register_size)
8428 (find_regno): Add target_desc parameter.
8429 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8430 declarations.
8431 * remote-utils.c: Include tdesc.h.
8432 (outreg, prepare_resume_reply): Adjust.
8433 * server.c: Include tdesc.h.
8434 (gdbserver_xmltarget): Delete declaration.
8435 (get_features_xml, process_serial_event): Adjust.
8436 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8437 declare.
8438 (struct process_info) <tdesc>: New field.
8439 (ipa_tdesc): Declare.
8440 * tdesc.c: New file.
8441 * tdesc.h: New file.
8442 * tracepoint.c: Include tdesc.h.
8443 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8444 (get_context_regcache): Adjust to pass ipa_tdesc down.
8445 (do_action_at_tracepoint): Adjust to get the register cache size
8446 from the context regcache's description.
8447 (traceframe_walk_blocks): Adjust to get the register cache size
8448 from the current trace frame's description.
8449 (traceframe_get_pc): Adjust to get current trace frame's
8450 description and pass it down.
8451 (gdb_collect): Adjust to get the register cache size from the
8452 IPA's description.
8453 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8454 (gdbserver_xmltarget): Delete.
8455 (initialize_low_tracepoint): Set the ipa's target description.
8456 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8457 (initialize_low_tracepoint): Set the ipa's target description.
8458 * linux-x86-low.c: Include tdesc.h.
8459 [__x86_64__] (is_64bit_tdesc): New.
8460 (ps_get_thread_area, x86_get_thread_area): Use it.
8461 (i386_cannot_store_register): Rename to ...
8462 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8463 (i386_cannot_fetch_register): Rename to ...
8464 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8465 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8466 to new interface.
8467 (target_regsets): Rename to ...
8468 (x86_regsets): ... this.
8469 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8470 interface.
8471 (x86_siginfo_fixup): Use is_64bit_tdesc.
8472 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8473 (tdesc_x32_avx_linux, tdesc_x32_linux)
8474 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8475 Declare.
8476 (x86_linux_update_xmltarget): Delete.
8477 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8478 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8479 (AMD64_LINUX_USER64_CS): New.
8480 (x86_linux_read_description): New, based on
8481 x86_linux_update_xmltarget.
8482 (same_process_callback): New.
8483 (x86_arch_setup_process_callback): New.
8484 (x86_linux_update_xmltarget): New.
8485 (x86_regsets_info): New.
8486 (amd64_linux_regs_info): New.
8487 (i386_linux_usrregs_info): New.
8488 (i386_linux_regs_info): New.
8489 (x86_linux_regs_info): New.
8490 (x86_arch_setup): Reimplement.
8491 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8492 (x86_emit_ops): Ditto.
8493 (the_low_target): Adjust. Install x86_linux_regs_info,
8494 x86_cannot_fetch_register, and x86_cannot_store_register.
8495 (initialize_low_arch): New.
8496 * linux-ia64-low.c (tdesc_ia64): Declare.
8497 (ia64_fetch_register): Adjust.
8498 (ia64_usrregs_info, regs_info): New globals.
8499 (ia64_regs_info): New function.
8500 (the_low_target): Adjust.
8501 (initialize_low_arch): New function.
8502 * linux-sparc-low.c (tdesc_sparc64): Declare.
8503 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8504 Adjust.
8505 (sparc_arch_setup): New function.
8506 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8507 (the_low_target): Adjust.
8508 (initialize_low_arch): New function.
8509 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8510 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8511 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8512 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8513 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8514 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8515 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8516 (tdesc_powerpc_isa205_vsx64l): Declare.
8517 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8518 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8519 (ppc_set_pc, ppc_get_hwcap): Adjust.
8520 (ppc_usrregs_info): Forward declare.
8521 (!__powerpc64__) ppc_regmap_adjusted: New global.
8522 (ppc_arch_setup): Adjust to the current process'es target
8523 description.
8524 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8525 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8526 (ppc_store_evrregset): Adjust.
8527 (target_regsets): Rename to ...
8528 (ppc_regsets): ... this, and make static.
8529 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8530 (ppc_regs_info): New function.
8531 (the_low_target): Adjust.
8532 (initialize_low_arch): New function.
8533 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8534 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8535 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8536 (tdesc_s390x_linux64v2): Declare.
8537 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8538 (s390_fill_gregset, s390_store_last_break): Adjust.
8539 (target_regsets): Rename to ...
8540 (s390_regsets): ... this, and make static.
8541 (s390_get_pc, s390_set_pc): Adjust.
8542 (s390_get_hwcap): New target_desc parameter, and use it.
8543 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8544 (s390_arch_setup): Adjust to set the current process'es target
8545 description. Don't adjust the regmap.
8546 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8547 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8548 (regs_info_3264): New globals.
8549 (s390_regs_info): New function.
8550 (the_low_target): Adjust.
8551 (initialize_low_arch): New function.
8552 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8553 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8554 [__mips64] (init_registers_mips_linux)
8555 (init_registers_mips_dsp_linux): Delete defines.
8556 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8557 (have_dsp): New global.
8558 (mips_read_description): New, based on mips_arch_setup.
8559 (mips_arch_setup): Reimplement.
8560 (get_usrregs_info): New function.
8561 (mips_cannot_fetch_register, mips_cannot_store_register)
8562 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8563 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8564 (target_regsets): Rename to ...
8565 (mips_regsets): ... this, and make static.
8566 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8567 (dsp_regs_info, regs_info): New globals.
8568 (mips_regs_info): New function.
8569 (the_low_target): Adjust.
8570 (initialize_low_arch): New function.
8571 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8572 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8573 Declare.
8574 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8575 (arm_read_description): New, with bits factored from
8576 arm_arch_setup.
8577 (arm_arch_setup): Reimplement.
8578 (target_regsets): Rename to ...
8579 (arm_regsets): ... this, and make static.
8580 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8581 (arm_regs_info): New function.
8582 (the_low_target): Adjust.
8583 (initialize_low_arch): New function.
8584 * linux-m68k-low.c (tdesc_m68k): Declare.
8585 (target_regsets): Rename to ...
8586 (m68k_regsets): ... this, and make static.
8587 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8588 (m68k_regs_info): New function.
8589 (m68k_arch_setup): New function.
8590 (the_low_target): Adjust.
8591 (initialize_low_arch): New function.
8592 * linux-sh-low.c (tdesc_sharch): Declare.
8593 (target_regsets): Rename to ...
8594 (sh_regsets): ... this, and make static.
8595 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8596 (sh_regs_info, sh_arch_setup): New functions.
8597 (the_low_target): Adjust.
8598 (initialize_low_arch): New function.
8599 * linux-bfin-low.c (tdesc_bfin): Declare.
8600 (bfin_arch_setup): New function.
8601 (bfin_usrregs_info, regs_info): New globals.
8602 (bfin_regs_info): New function.
8603 (the_low_target): Adjust.
8604 (initialize_low_arch): New function.
8605 * linux-cris-low.c (tdesc_cris): Declare.
8606 (cris_arch_setup): New function.
8607 (cris_usrregs_info, regs_info): New globals.
8608 (cris_regs_info): New function.
8609 (the_low_target): Adjust.
8610 (initialize_low_arch): New function.
8611 * linux-cris-low.c (tdesc_crisv32): Declare.
8612 (cris_arch_setup): New function.
8613 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8614 (cris_regs_info): New function.
8615 (the_low_target): Adjust.
8616 (initialize_low_arch): New function.
8617 * linux-m32r-low.c (tdesc_m32r): Declare.
8618 (m32r_arch_setup): New function.
8619 (m32r_usrregs_info, regs_info): New globals.
8620 (m32r_regs_info): Adjust.
8621 (initialize_low_arch): New function.
8622 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8623 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8624 (tic6x_usrregs_info): Forward declare.
8625 (tic6x_read_description): New function, based on ...
8626 (tic6x_arch_setup): ... this. Reimplement.
8627 (target_regsets): Rename to ...
8628 (tic6x_regsets): ... this, and make static.
8629 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8630 (tic6x_regs_info): New function.
8631 (the_low_target): Adjust.
8632 (initialize_low_arch): New function.
8633 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8634 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8635 (target_regsets): Rename to ...
8636 (xtensa_regsets): ... this, and make static.
8637 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8638 globals.
8639 (xtensa_arch_setup, xtensa_regs_info): New functions.
8640 (the_low_target): Adjust.
8641 (initialize_low_arch): New function.
8642 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8643 (nios2_arch_setup): Set the current process'es tdesc.
8644 (target_regsets): Rename to ...
8645 (nios2_regsets): ... this.
8646 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8647 (nios2_regs_info): New function.
8648 (the_low_target): Adjust.
8649 (initialize_low_arch): New function.
8650 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8651 (aarch64_arch_setup): Set the current process'es tdesc.
8652 (target_regsets): Rename to ...
8653 (aarch64_regsets): ... this.
8654 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8655 (aarch64_regs_info): New function.
8656 (the_low_target): Adjust.
8657 (initialize_low_arch): New function.
8658 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8659 globals.
8660 (target_regsets): Rename to ...
8661 (tile_regsets): ... this.
8662 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8663 (tile_regs_info): New function.
8664 (tile_arch_setup): Set the current process'es tdesc.
8665 (the_low_target): Adjust.
8666 (initialize_low_arch): New function.
8667 * spu-low.c (tdesc_spu): Declare.
8668 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8669 * win32-arm-low.c (tdesc_arm): Declare.
8670 (arm_arch_setup): New function.
8671 (the_low_target): Install arm_arch_setup instead of
8672 init_registers_arm.
8673 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8674 (init_windows_x86): Rename to ...
8675 (i386_arch_setup): ... this. Set `win32_tdesc'.
8676 (the_low_target): Adjust.
8677 * win32-low.c (win32_tdesc): New global.
8678 (child_add_thread): Don't create the thread cache here.
8679 (do_initial_child_stuff): Set the new process'es tdesc.
8680 * win32-low.h (struct target_desc): Forward declare.
8681 (win32_tdesc): Declare.
8682 * lynx-i386-low.c (tdesc_i386): Declare global.
8683 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8684 * lynx-low.c (lynx_tdesc): New global.
8685 (lynx_add_process): Set the new process'es tdesc.
8686 * lynx-low.h (struct target_desc): Forward declare.
8687 (lynx_tdesc): Declare global.
8688 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8689 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8690 * nto-low.c (nto_tdesc): New global.
8691 (do_attach): Set the new process'es tdesc.
8692 * nto-low.h (struct target_desc): Forward declare.
8693 (nto_tdesc): Declare.
8694 * nto-x86-low.c (tdesc_i386): Declare.
8695 (nto_x86_arch_setup): Set `nto_tdesc'.
8696
86972013-06-04 Gary Benson <gbenson@redhat.com>
8698
8699 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8700 to qSupported response when appropriate.
8701 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8702 with nonzero-length annex.
8703 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8704 arguments supplied in annex.
8705
87062013-05-31 Doug Evans <dje@google.com>
8707
8708 PR server/15594
8709 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8710 64 bits in 64-cross-32 environment.
8711
87122013-05-28 Pedro Alves <palves@redhat.com>
8713
8714 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8715 (aarch64-without-fpu.c): Delete rule.
8716 * configure.srv (aarch64*-*-linux*): Remove references to
8717 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8718 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8719 declaration.
8720
87212013-05-24 Pedro Alves <palves@redhat.com>
8722
8723 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8724 instead of strchr/decode_address. Error if the range isn't split
8725 with a ','. Don't assume there's be a ':' in the action.
8726
87272013-05-23 Yao Qi <yao@codesourcery.com>
8728 Pedro Alves <palves@redhat.com>
8729
8730 * linux-low.c (lwp_in_step_range): New function.
8731 (linux_wait_1): If the thread was range stepping and stopped
8732 outside the stepping range, report the stop to GDB. Otherwise,
8733 continue stepping. Add range stepping debug output.
8734 (linux_set_resume_request): Copy the step range from the resume
8735 request to the lwp.
8736 (linux_supports_range_stepping): New.
8737 (linux_target_ops) <supports_range_stepping>: Set to
8738 linux_supports_range_stepping.
8739 * linux-low.h (struct linux_target_ops)
8740 <supports_range_stepping>: New field.
8741 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8742 * linux-x86-low.c (x86_supports_range_stepping): New.
8743 (the_low_target) <supports_range_stepping>: Set to
8744 x86_supports_range_stepping.
8745 * server.c (handle_v_cont): Handle 'r' action.
8746 (handle_v_requests): Append ";r" if the target supports range
8747 stepping.
8748 * target.h (struct thread_resume) <step_range_start,
8749 step_range_end>: New fields.
8750 (struct target_ops) <supports_range_stepping>:
8751 New field.
8752 (target_supports_range_stepping): New macro.
8753
87542013-05-17 Joel Brobecker <brobecker@adacore.com>
8755
8756 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8757 confusion in comment.
8758
87592013-05-17 Joel Brobecker <brobecker@adacore.com>
8760
8761 * lynx-low.c (struct process_info_private): New type.
8762 (lynx_add_process): New function.
8763 (lynx_create_inferior, lynx_attach): Replace calls to
8764 add_process by calls to lynx_add_process.
8765 (lynx_resume): If PTID is null, then try using
8766 current_process()->private->last_wait_event_ptid.
8767 Add comments.
8768 (lynx_clear_inferiors): Delete. The contents of that function
8769 has been inlined in lynx_mourn;
8770 (lynx_wait_1): Save the ptid in the process's private data.
8771 (lynx_mourn): Free the process' private data. Replace call
8772 to lynx_clear_inferiors by call to clear_inferiors.
8773
87742013-05-17 Yao Qi <yao@codesourcery.com>
8775
8776 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8777 the right place.
8778
87792013-05-16 Luis Machado <lgustavo@codesourcery.com>
8780
8781 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8782 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8783 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8784 PT_TEXT_END_ADDR guards. Update comments.
8785 (linux_target_op) <read_offsets>: Conditionally define to
8786 linux_read_offsets if the target is UCLIBC and if it defines
8787 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8788
87892013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8790 Andrew Jenner <andrew@codesourcery.com>
8791
8792 * Makefile.in (SFILES): Add linux-nios2-low.c.
8793 (clean): Add action to delete nios2-linux.c.
8794 (nios2-linux.c): New rule.
8795 * configure.srv: Add nios2*-*-linux*.
8796 * linux-nios2-low.c: New.
8797
87982013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8799
8800 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8801
88022013-04-25 Hui Zhu <hui@codesourcery.com>
8803
8804 PR gdb/15186
8805 * ax.c (ax_printf): Add fflush.
8806
88072013-04-22 Tom Tromey <tromey@redhat.com>
8808
8809 * Makefile.in (SFILES): Add filestuff.c.
8810 (OBS): Add filestuff.o.
8811 (filestuff.o): New target.
8812 * config.in, configure: Rebuild.
8813 * configure.ac: Check for fdwalk, pipe2.
8814
88152013-04-17 Pedro Alves <palves@redhat.com>
8816
8817 * configure.ac (USE_THREAD_DB): Delete variable.
8818 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8819 Don't AC_SUBST USE_THREAD_DB.
8820 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8821 * config.in, configure: Regenerate.
8822
88232013-04-16 Pedro Alves <palves@redhat.com>
8824
8825 * linux-low.h (struct lwp_info) <thread_known>: Move under
8826 the USE_THREAD_DB #ifdef.
8827
88282013-04-16 Pedro Alves <palves@redhat.com>
8829
8830 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8831 (linux-low.o): Delete rule.
8832 * linux-low.h: Always include "gdb_thread_db.h" instead of
8833 conditionally including thread_db.h.
8834 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8835 HAVE_THREAD_DB_H.
8836
88372013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8838
8839 * Makefile.in (install-only): Fix make install regression.
8840
88412013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8842
8843 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8844 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8845 installation.
8846 * gdbserver.1: Remove.
8847
88482013-03-22 Pedro Alves <palves@redhat.com>
8849
8850 * linux-low.c (handle_extended_wait): Don't call
8851 linux_enable_event_reporting.
8852
88532013-03-15 Tony Theodore <tonyt@logyst.com>
8854
8855 PR build/9098:
8856 * Makefile.in (SHELL): Use @SHELL@.
8857
88582013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8859
8860 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8861 compiler warning.
8862
88632013-03-13 Joel Brobecker <brobecker@adacore.com>
8864
8865 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8866 Remove extraneous NULL element.
8867
88682013-03-13 Yao Qi <yao@codesourcery.com>
8869
8870 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8871 'V' block in trace frame.
8872
88732013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8874
8875 * target.h (struct target_ops): Add btrace ops.
8876 (target_supports_btrace): New macro.
8877 (target_enable_btrace): New macro.
8878 (target_disable_btrace): New macro.
8879 (target_read_btrace): New macro.
8880 * gdbthread.h (struct thread_info): Add btrace field.
8881 * server.c: Include btrace-common.h.
8882 (handle_btrace_general_set): New function.
8883 (handle_btrace_enable): New function.
8884 (handle_btrace_disable): New function.
8885 (handle_general_set): Call handle_btrace_general_set.
8886 (handle_qxfer_btrace): New function.
8887 (struct qxfer qxfer_packets[]): Add btrace entry.
8888 * inferiors.c (remove_thread): Disable btrace.
8889 * linux-low: Include linux-btrace.h.
8890 (linux_low_enable_btrace): New function.
8891 (linux_low_read_btrace): New function.
8892 (linux_target_ops): Add btrace ops.
8893 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8894 Add srv_linux_btrace=yes.
8895 (x86_64-*-linux*): Add linux-btrace.o.
8896 Add srv_linux_btrace=yes.
8897 * configure.ac: Define HAVE_LINUX_BTRACE.
8898 * config.in: Regenerated.
8899 * configure: Regenerated.
8900
89012013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8902
8903 * server.c (handle_qxfer): Preserve error message if -3 is
8904 returned.
8905 (qxfer): Document the -3 return value.
8906
89072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8908
8909 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8910 (linux_btrace_h): New variable.
8911 (linux-btrace.o): New rule.
8912
89132013-03-08 Stan Shebs <stan@codesourcery.com>
8914 Hafiz Abid Qadeer <abidh@codesourcery.com>
8915
8916 * tracepoint.c (trace_buffer_size): New global.
8917 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8918 (init_trace_buffer): Change to one-argument function. Allocate
8919 trace buffer memory.
8920 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8921 handle QTBuffer:size packet.
8922 (cmd_bigqtbuffer_size): New function.
8923 (initialize_tracepoint): Call init_trace_buffer with
8924 DEFAULT_TRACE_BUFFER_SIZE.
8925 * server.c (handle_query): Add QTBuffer:size in the
8926 supported packets.
8927
89282013-03-07 Yao Qi <yao@codesourcery.com>
8929
8930 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8931 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8932 of -1.
8933 (cmd_qtsp): Adjust condition. Do post increment.
8934 Set cur_action and cur_step_action back to 0.
8935
89362013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8937
8938 PR server/15236
8939 * linux-low.c (linux_write_memory): Return early success if LEN is
8940 zero.
8941
89422013-03-05 Corinna Vinschen <vinschen@redhat.de>
8943
8944 * configure.srv: Add x86_64-*-cygwin* as target.
8945
89462013-02-28 Tom Tromey <tromey@redhat.com>
8947
8948 * configure.ac: Invoke AC_SYS_LARGEFILE.
8949 * configure, config.in: Rebuild.
8950
89512013-02-28 Corinna Vinschen <vinschen@redhat.com>
8952
8953 * win32-low.c: Throughout, fix format strings and casts of
8954 printf-like functions to avoid type related warnings on all
8955 platforms.
8956 (get_child_debug_event): Print dwDebugEventCode as hex since
8957 that's how it's usually documented.
8958
89592013-02-28 Yao Qi <yao@codesourcery.com>
8960
8961 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8962 pulongest.
8963
89642013-02-27 Jiong Wang <jiwang@tilera.com>
8965
8966 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8967 (reg-tilegx32.c): New rule.
8968 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8969 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8970 different register info initializer according to elf class.
8971 (init_registers_tilgx32): New function. The tilegx32 register info
8972 initializer.
8973 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8974 (tile_store_gregset): Likewise.
8975
89762013-02-27 Yao Qi <yao@codesourcery.com>
8977
8978 * server.c (process_point_options): Print debug message when
8979 debug_threads is true.
8980
89812013-02-26 Yao Qi <yao@codesourcery.com>
8982
8983 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8984
89852013-02-19 Pedro Alves <palves@redhat.com>
8986 Kai Tietz <ktietz@redhat.com>
8987
8988 PR gdb/15161
8989
8990 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8991 instead of strtoul to extract address from packet.
8992 (process_serial_event) <'z'>: Likewise.
8993
89942013-02-18 Yao Qi <yao@codesourcery.com>
8995
8996 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8997
89982013-02-14 Pedro Alves <palves@redhat.com>
8999
9000 Plug memory leak.
9001
9002 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9003 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9004
90052013-02-14 Pedro Alves <palves@redhat.com>
9006
9007 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9008
90092013-02-14 Pedro Alves <palves@redhat.com>
9010
9011 * tracepoint.c (save_string): Delete.
9012 (add_tracepoint_action): Use savestring instead of save_string.
9013
90142013-02-12 Pedro Alves <palves@redhat.com>
9015
9016 * linux-xtensa-low.c: Ditto.
9017 * xtensa-xtregs.c: Ditto.
9018
90192013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9020
9021 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9022 thread_db.
9023
90242013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9025
9026 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9027 aarch64_num_wp_regs and aarch64_num_bp_regs to
9028 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9029
90302013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9031
9032 * linux-aarch64-low.c (ps_get_thread_area): Replace
9033 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9034
90352013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9036 Marcus Shawcroft <marcus.shawcroft@arm.com>
9037 Nigel Stephens <nigel.stephens@arm.com>
9038 Yufeng Zhang <yufeng.zhang@arm.com>
9039
9040 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9041 (aarch64.c, aarch64-without-fpu.c): New targets.
9042 * configure.srv (aarch64*-*-linux*): New.
9043 * linux-aarch64-low.c: New file.
9044
90452013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9046
9047 * linux-low.c (handle_extended_wait, linux_create_inferior)
9048 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9049 (dequeue_one_deferred_signal, linux_resume_one_thread)
9050 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9051 (linux_tracefork_grandchild, linux_test_for_tracefork)
9052 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9053 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9054 where the argument is 0.
9055
90562013-01-25 Yao Qi <yao@codesourcery.com>
9057
9058 * event-loop.c: Include "queue.h".
9059 (gdb_event_p): New typedef.
9060 (struct gdb_event) <next_event>: Remove.
9061 (event_queue): Change to QUEUE(gdb_event_p).
9062 (async_queue_event): Remove.
9063 (gdb_event_xfree): New.
9064 (initialize_event_loop): New.
9065 (process_event): Use API from QUEUE.
9066 (wait_for_event): Likewise.
9067 * server.c (main): Call initialize_event_loop.
9068 * server.h (initialize_event_loop): Declare.
9069
90702013-01-18 Yao Qi <yao@codesourcery.com>
9071
9072 * ax.h (struct eval_agent_expr_context): New.
9073 (gdb_eval_agent_expr): Update declaration.
9074 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9075 TFRAME. Add new argument CTX.
9076 * server.h (struct eval_agent_expr_context): Declare.
9077 (agent_mem_read, agent_tsv_read): Update declaration.
9078 (agent_mem_read_string): Likewise.
9079 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9080 (add_traceframe_block): Add new argument TPOINT.
9081 Increase TPOINT->traceframe_usage.
9082 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9083 eval_tracepoint_agent_expr.
9084 (condition_true_at_tracepoint): Likewise.
9085 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9086 (agent_mem_read_string, agent_tsv_read): Likewise.
9087
90882013-01-16 Yao Qi <yao@codesourcery.com>
9089
9090 * linux-low.c (linux_resume_one_lwp): Don't check
9091 'lwp->bp_reinsert != 0'.
9092
90932013-01-07 Joel Brobecker <brobecker@adacore.com>
9094 Pedro Alves <palves@redhat.com>
9095
9096 * lynx-low.c (ptrace_request_to_str): Define a temporary
9097 macro and use it to simplify this function's implementation.
9098
90992013-01-07 Joel Brobecker <brobecker@adacore.com>
9100
9101 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9102 sets errno.
9103
91042013-01-07 Joel Brobecker <brobecker@adacore.com>
9105
9106 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9107
91082013-01-07 Joel Brobecker <brobecker@adacore.com>
9109
9110 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9111
91122013-01-07 Joel Brobecker <brobecker@adacore.com>
9113
9114 * lynx-low.c (lynx_resume): Use the resume_info parameter
9115 to determine the ptid for the lynx_ptrace call, unless
9116 it is equal to minus_one_ptid, in which case we use the
9117 ptid of the current_inferior.
9118 (lynx_wait_1): After having received a thread create/exit
9119 event, resume the inferior's execution using the signaling
9120 thread's ptid, rather than the old ptid.
9121
91222013-01-07 Joel Brobecker <brobecker@adacore.com>
9123
9124 * lynx-low.c (lynx_resume): Delete variable ret.
9125
91262013-01-01 Joel Brobecker <brobecker@adacore.com>
9127
9128 * gdbreplay.c (gdbreplay_version): Update copyright year.
9129 * server.c (gdbserver_version): Likewise.
9130
91312012-12-17 Joel Brobecker <brobecker@adacore.com>
9132
9133 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9134 new thread.
9135
91362012-12-17 Joel Brobecker <brobecker@adacore.com>
9137
9138 * lynx-low.c (ptrace_request_to_str): Add handling for
9139 PTRACE_GETTRACESIG.
9140
91412012-12-17 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c (lynx_attach): Delete variable new_process.
9144
91452012-12-17 Joel Brobecker <brobecker@adacore.com>
9146
9147 * lynx-low.c (lynx_create_inferior): Delete variable
9148 new_process.
9149
91502012-12-17 Joel Brobecker <brobecker@adacore.com>
9151
9152 * lynx-low.c (ptrace_request_to_str): Do not handle
9153 PTRACE_GETTHREADLIST if this macro does not exist.
9154
91552012-12-15 Yao Qi <yao@codesourcery.com>
9156
9157 * Makefile.in (OBS): Add notif.o.
9158 * notif.c, notif.h: New.
9159 * server.c: Include "notif.h".
9160 (struct vstop_notif) <next>: Remove.
9161 <base>: New field.
9162 (queue_stop_reply): Update.
9163 (push_event, send_next_stop_reply): Remove.
9164 (discard_queued_stop_replies): Update.
9165 (notif_stop): New variable.
9166 (handle_v_stopped): Remove.
9167 (handle_v_requests): Don't call handle_v_stopped. Call
9168 handle_ack_notif instead.
9169 (queue_stop_reply_callback): Call notif_event_enque instead
9170 of queue_stop_reply.
9171 (handle_status): Don't call send_next_stop_reply, call
9172 notif_write_event instead.
9173 (kill_inferior_callback): Likewise.
9174 (detach_or_kill_inferior_callback): Likewise.
9175 (main): Call initialize_notif.
9176 (process_serial_event): Call QUEUE_is_empty.
9177 (handle_target_event): Call notif_push instead of push event.
9178 * server.h (push_event): Remove declaration.
9179
91802012-12-10 Tom Tromey <tromey@redhat.com>
9181
9182 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9183 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9184 macros.
9185 (.c.o): Rewrite.
9186 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9187 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9188 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9189 (amd64-linux-ipa.o, ax.o): Rewrite.
9190 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9191 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9192 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9193 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9194 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9195 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9196 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9197 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9198 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9199 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9200 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9201 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9202 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9203 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9204 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9205 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9206 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9207 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9208 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9209 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9210 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9211 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9212 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9213 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9214 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9215 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9216 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9217 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9218 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9219 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9220 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9221 (reg-tilegx.o): Remove.
9222 (all_object_files): New macro.
9223 Include .deps files.
9224 * aclocal.m4, configure: Rebuild.
9225 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9226 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9227 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9228
92292012-12-05 Tom Tromey <tromey@redhat.com>
9230
9231 PR gdb/14917:
9232 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9233
92342012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9235
9236 * configure.ac: Check for linux/perf_event.h.
9237 * config.in: Regenerated.
9238 * configure: Regenerated.
9239
92402012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9241
9242 * hostio.c (handle_readlink): Decrease buffer size
9243 parameter passed to readlink by one byte.
9244
92452012-11-26 Yao Qi <yao@codesourcery.com>
9246
9247 * configure.ac (build_warnings): Append '-Wempty-body'.
9248 * configure: Regenerated.
9249 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9250 body.
9251
92522012-11-15 Pierre Muller <muller@sourceware.org>
9253
9254 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9255 * config.in: Regenerate.
9256 * configure: Regenerate.
9257 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9258 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9259 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9260 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9261 header.
9262 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9263 instead of <sys/wait.h> header.
9264 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9265
92662012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9267
9268 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9269 (various make rules): Remove -DGDBSERVER
9270
92712012-11-09 Yao Qi <yao@codesourcery.com>
9272
9273 * spu-low.c (current_ptid): Move it to ..
9274 * gdbthread.h: ... here. New.
9275 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9276 * server.c (myresume, process_serial_event): Likewise.
9277 * thread-db.c (thread_db_find_new_threads): Likewise.
9278 * tracepoint.c (run_inferior_command): Likewise.
9279
92802012-10-01 Andrew Burgess <aburgess@broadcom.com>
9281
9282 * server.c (handle_search_memory_1): Include access length in
9283 warning message.
9284
92852012-09-05 Michael Brandt <michael.brandt@axis.com>
9286
9287 * linux-crisv32-low.c: Fix compile errors.
9288
92892012-09-04 Yao Qi <yao@codesourcery.com>
9290
9291 * tracepoint.c (cmd_qtsv): Adjust debug message.
9292 Don't check CUR_TPOINT.
9293
92942012-08-28 Yao Qi <yao@codesourcery.com>
9295
9296 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9297 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9298 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9299 Remove declarations of xmalloc, xreallloc, xstrdup and
9300 freeargv.
9301 * Makefile.in (libiberty_h): New.
9302 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9303 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9304
93052012-08-23 Yao Qi <yao@codesourcery.com>
9306
9307 * server.h: Remove declaration of 'xsnprintf'.
9308
93092012-08-22 Keith Seitz <keiths@redhat.com>
9310
9311 * server.h: Include build-gnulib-gbserver/config.h.
9312 * gdbreplay.c: Likewise.
9313
93142012-08-08 Doug Evans <dje@google.com>
9315
9316 * Makefile.in (SFILES): Add gdb_vecs.c.
9317 (OBS): Add gdb_vecs.o.
9318 (gdb_vecs_h, host_defs_h): New variables.
9319 (thread-db.o): Add $(gdb_vecs_h) dependency.
9320 (gdb_vecs.o): New rule.
9321 * thread-db.c: #include "gdb_vecs.h".
9322 (thread_db_load_search): Use a vector to iterate over path elements.
9323 Handle text appearing after "$pdir".
9324
9325 * configure.ac: Add check for strstr.
9326 * config.in: Regenerate.
9327 * configure: Regenerate.
9328
93292012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9330
9331 * hostio.c (handle_pread): If pread fails, fall back to attempting
9332 lseek/read.
9333 (handle_pwrite): Likewise for pwrite.
9334
93352012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9336
9337 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9338 between unsupported TYPE and unimplementable ADDR/LEN combination.
9339 (arm_insert_point): Act on new return value.
9340
93412012-07-31 Pedro Alves <palves@redhat.com>
9342
9343 * server.c (process_point_options): Only skip tokens if we find
9344 one that is unrecognized. Don't treat 'X' specially while
9345 skipping unrecognized tokens.
9346
93472012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9348
9349 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9350 to 4-byte-align HW breakpoint addresses for Thumb.
9351
93522012-07-27 Yao Qi <yao@codesourcery.com>
9353
9354 PR remote/14161.
9355
9356 * server.h: Declare gdb_agent_about_to_close.
9357 * target.c (kill_inferior): Include "agent.h".
9358 New. Send command 'kill'.
9359 * target.h (kill_inferior): Removed macro.
9360 * tracepoint.c (gdb_agent_about_to_close): New.
9361 (gdb_agent_helper_thread): Handle command 'close'.
9362 Wait endlessly until the inferior stops.
9363 Install gdb_agent_remove_socket to atexit hook.
9364 (agent_socket_name): New static variable.
9365 (gdb_agent_socket_init): Replace local variable 'name' with
9366 'agent_socket_name'.
9367 (gdb_agent_remove_socket): New.
9368
93692012-07-27 Yao Qi <yao@codesourcery.com>
9370
9371 * server.c (process_point_options): Stop at 'X' when parsing.
9372
93732012-07-19 Michael Eager <eager@eagercon.com>
9374
9375 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9376 to hw_execute.
9377 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9378 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9379 hardware breakpoint.
9380
93812012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9382
9383 * gdbserver/linux-low.c (initialize_low): Call
9384 linux_ptrace_init_warnings.
9385
93862012-07-02 Doug Evans <dje@google.com>
9387
9388 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9389 pointer to int.
9390
93912012-07-02 Stan Shebs <stan@codesourcery.com>
9392
9393 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9394 (ax.o): Add it to build rule.
9395 (ax-ipa.o): Ditto.
9396 (OBS): Add format.o.
9397 (IPA_OBS): Add format.o.
9398 * server.c (handle_query): Claim support for breakpoint commands.
9399 (process_point_options): Add command case.
9400 (process_serial_event): Leave running if there are printfs in
9401 effect.
9402 * mem-break.h (any_persistent_commands): Declare.
9403 (add_breakpoint_commands): Declare.
9404 (gdb_no_commands_at_breakpoint): Declare.
9405 (run_breakpoint_commands): Declare.
9406 * mem-break.c (struct point_command_list): New struct.
9407 (struct breakpoint): New field command_list.
9408 (any_persistent_commands): New function.
9409 (add_commands_to_breakpoint): New function.
9410 (add_breakpoint_commands): New function.
9411 (gdb_no_commands_at_breakpoint): New function.
9412 (run_breakpoint_commands): New function.
9413 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9414 locally.
9415 * ax.c: Include format.h.
9416 (ax_printf): New function.
9417 (gdb_eval_agent_expr): Add printf opcode.
9418
94192012-06-13 Yao Qi <yao@codesourcery.com>
9420
9421 * server.c (start_inferior): Remove duplicated writes to fields
9422 'last_resume_kind' and 'last_status' of 'current_inferior'.
9423
94242012-06-12 Yao Qi <yao@codesourcery.com>
9425 Pedro Alves <palves@redhat.com>
9426
9427 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9428 comment.
9429 * server.c (handle_v_cont): Extend comment.
9430
94312012-06-11 Yao Qi <yao@codesourcery.com>
9432
9433 * linux-low.c (linux_attach): Add 'static'.
9434
94352012-06-06 Yao Qi <yao@codesourcery.com>
9436
9437 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9438
94392012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9440
9441 Fix gcc -flto compilation warning.
9442 * server.c (main): Make variable multi_mode and attach volatile.
9443
94442012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9445
9446 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9447 if the platform doesn't know about it.
9448
94492012-05-30 Jeff Kenton <jkenton@tilera.com>
9450
9451 * Makefile.in (SFILES): Add linux-tile-low.c.
9452 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9453 * configure.srv: Handle tilegx-*-linux*.
9454 * linux-tile-low.c: New file.
9455
94562012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9457
9458 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9459
94602012-05-24 Pedro Alves <palves@redhat.com>
9461
9462 PR gdb/7205
9463
9464 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9465
94662012-05-24 Pedro Alves <palves@redhat.com>
9467
9468 PR gdb/7205
9469
9470 Replace target_signal with gdb_signal throughout.
9471
94722012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9473
9474 * linux-low.c (linux_store_registers): Avoid the copying sequence
9475 when no data has been retrieved by ptrace.
9476
94772012-05-22 Will Deacon <will.deacon@arm.com>
9478
9479 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9480 Include asm/ptrace.h.
9481 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9482 already defined.
9483
94842012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9485
9486 * linux-low.c (linux_store_registers): Don't re-retrieve data
9487 with ptrace that has already been obtained from /proc. Always
9488 copy any data retrieved with ptrace to the buffer supplied.
9489
94902012-05-11 Yao Qi <yao@codesourcery.com>
9491 Pedro Alves <palves@redhat.com>
9492
9493 * linux-low.c (enum stopping_threads_kind): New.
9494 (stopping_threads): Change type to `enum stopping_threads_kind'.
9495 (handle_extended_wait): If stopping and suspending threads, leave
9496 the new_lwp suspended too.
9497 (linux_wait_for_event): Adjust.
9498 (stop_all_lwps): Set `stopping_threads' to
9499 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9500 whether we're suspending threads or just stopping them. Assert no
9501 recursion happens.
9502
95032012-04-29 Yao Qi <yao@codesourcery.com>
9504
9505 * server.h: Move some code to ...
9506 * gdbthread.h: ... here. New.
9507 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9508 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9509 (nto-low.o, win32-low.o): Likewise.
9510 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9511 * regcache.c, remote-utils.c, server.c: Likewise.
9512 * target.c, tracepoint.c, win32-low.c: Likewise.
9513
95142012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9515
9516 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9517 (PTRACE_ARG4_TYPE): Likewise.
9518 (PTRACE_XFER_TYPE): Likewise.
9519 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9520 ptrace to PTRACE_ARG3_TYPE.
9521 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9522 (PTRACE_ARG4_TYPE): Likewise.
9523 (PTRACE_XFER_TYPE): Likewise.
9524 (linux_detach_one_lwp): Cast fourth argument of
9525 ptrace to long then PTRACE_ARG4_TYPE.
9526 (regsets_fetch_inferior_registers): Cast third argument of
9527 ptrace to long then PTRACE_ARG3_TYPE.
9528 (regsets_store_inferior_registers): Likewise.
9529
95302012-04-20 Pedro Alves <palves@redhat.com>
9531
9532 * configure: Regenerate.
9533
95342012-04-19 Pedro Alves <palves@redhat.com>
9535
9536 * Makefile.in (GNULIB_BUILDDIR): New.
9537 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9538 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9539 (all, install-only, uninstall, clean-info, all-lib, clean): No
9540 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9541 (maintainer-clean realclean distclean): Use subdir_do.
9542 (subdir_do): New.
9543 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9544 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9545 * acinclude.m4: Include acx_configure_dir.m4.
9546 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9547 calls. Call AC_PROG_RANLIB. Configure gnulib using
9548 ACX_CONFIGURE_DIR.
9549 (GNULIB): New.
9550 (GNULIB_STDINT_H): Adjust.
9551 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9552 * gdbreplay.c: Include build-gnulib/config.h.
9553 * server.h: Likewise.
9554 * aclocal.m4: Regenerate.
9555 * config.in: Regenerate.
9556 * configure: Regenerate.
9557
95582012-04-19 Pedro Alves <palves@redhat.com>
9559
9560 * Makefile.in (LIBGNU, INCGNU): Adjust.
9561 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9562 (all, install-only, uninstall, clean-info, all-lib, clean)
9563 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9564 * configure.ac: Adjust AC_OUTPUT output.
9565 * aclocal.m4: Regenerate.
9566 * configure: Regenerate.
9567
95682012-04-19 Pedro Alves <palves@redhat.com>
9569
9570 * Makefile.in (generated_files): New.
9571 (server_h): Remove the explicit dependency on config.h, and depend
9572 on $generated_files.
9573
95742012-04-19 Pedro Alves <palves@redhat.com>
9575
9576 * Makefile.in (INCGNU): Add -Ignulib.
9577
95782012-04-19 Pedro Alves <palves@redhat.com>
9579
9580 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9581 (INCGNU): ... this, and spell out -I here.
9582 (GNULIB_LIB): Rename to ...
9583 (LIBGNU): ... this.
9584 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9585
95862012-04-19 Pedro Alves <palves@redhat.com>
9587
9588 * config.in: Regenerate.
9589
95902012-04-19 Pedro Alves <palves@redhat.com>
9591
9592 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9593 * server.h (memmem): Remove declaration.
9594 * config.in: Regenerate.
9595 * configure: Regenerate.
9596
95972012-04-19 Yao Qi <yao@codesourcery.com>
9598
9599 * Makefile.in (SFILES): Add common/vec.c.
9600 (OBS): Add vec.o.
9601 (vec.o): New rule.
9602
96032012-04-19 Yao Qi <yao@codesourcery.com>
9604
9605 * remote-utils.c (prepare_resume_reply): Replace with macro
9606 target_core_of_thread.
9607 * server.c (handle_qxfer_threads_proper): Likewise.
9608 * target.h (traget_core_of_thread): New macro.
9609
96102012-04-18 Pedro Alves <palves@redhat.com>
9611
9612 * aclocal.m4: Regenerate.
9613 * configure: Regenerate.
9614
96152012-04-16 Yao Qi <yao@codesourcery.com>
9616
9617 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9618 duplicated on address.
9619
96202012-04-16 Yao Qi <yao@codesourcery.com>
9621
9622 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9623 (struct tracepoint_action_ops) <send>: New field.
9624 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9625 (agent_expr_send, x_tracepoint_action_send): New.
9626 (l_tracepoint_action_send): New.
9627 (cmd_qtdp): Download and install tracepoint
9628 according to `use_agent'.
9629 (run_inferior_command): Add one more parameter `len'.
9630 Update callers.
9631 (tracepoint_send_agent): New.
9632 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9633
96342012-04-16 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (download_tracepoints): Moved to ...
9637 (cmd_qtstart): ... here.
9638
96392012-04-14 Yao Qi <yao@codesourcery.com>
9640
9641 * tracepoint.c: Include inttypes.h.
9642 (struct collect_memory_action): Use sized types.
9643 (struct tracepoint): Likewise.
9644 (cmd_qtdp, stop_tracing): Update print specifiers.
9645 (cmd_qtp, response_tracepoint): Likewise.
9646 (collect_data_at_tracepoint): Likewise.
9647 (collect_data_at_step): Likewise.
9648
96492012-04-14 Yao Qi <yao@codesourcery.com>
9650
9651 Import gnulib module inttypes.
9652 * aclocal.m4, config.in, configure: Regenerated.
9653
96542012-04-14 Yao Qi <yao@codesourcery.com>
9655
9656 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9657 Makefile and config.status at last.
9658
96592012-04-13 Yao Qi <yao@codesourcery.com>
9660
9661 * tracepoint.c: Include stdint.h unconditionally.
9662
96632012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9664
9665 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9666 on BFD_HAVE_SYS_PROCFS_TYPE.
9667 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9668 * configure: Regenerate.
9669 * config.in: Likewise.
9670
96712012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9672
9673 * Makefile.in (clean): Also remove x32.c x32-linux.c
9674 x32-avx.c x32-avx-linux.c.
9675 (x32.o): New target.
9676 (x32.c): Likewise.
9677 (x32-linux.o): Likewise.
9678 (x32-linux.c): Likewise.
9679 (x32-avx.o): Likewise.
9680 (x32-avx.c): Likewise.
9681 (x32-avx-linux.o): Likewise.
9682 (x32-avx-linux.c): Likewise.
9683
9684 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9685 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9686 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9687 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9688 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9689 i386/x32-avx-linux.xml.
9690
9691 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9692 (init_registers_x32_avx_linux): Likwise.
9693 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9694 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9695
96962012-04-13 Pedro Alves <palves@redhat.com>
9697
9698 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9699 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9700 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9701 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9702 the sub-make.
9703
97042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9705
9706 * linux-x86-low.c (compat_x32_clock_t): New.
9707 (compat_x32_siginfo_t): Likewise.
9708 (compat_x32_siginfo_from_siginfo): Likewise.
9709 (siginfo_from_compat_x32_siginfo): Likewise.
9710 (linux_is_elf64): Likewise.
9711 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9712 and siginfo_from_compat_x32_siginfo for x32.
9713 (x86_arch_setup): Set linux_is_elf64.
9714
97152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9716
9717 PR gdb/13969
9718 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9719 e_machine field.
9720 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9721 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9722 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9723 compatible with process.
9724
97252012-04-12 Yao Qi <yao@codesourcery.com>
9726
9727 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9728 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9729 (install-only, install-info, clean): Handle sub dir gnulib.
9730 (all-lib, am--refresh): New targets.
9731 (memmem.o): Remove target.
9732 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9733 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9734 (AC_REPLACE_FUNCS): Remove memmem.
9735 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9736 (AC_OUTPUT): Generate Makefile in gnulib/.
9737 * aclocal.m4, config.in, configure: Regenerated.
9738
97392012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9740
9741 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9742
97432012-04-05 Pedro Alves <palves@redhat.com>
9744
9745 -Werror=strict-aliasing
9746
9747 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9748 pointer.
9749
97502012-04-04 Pedro Alves <palves@redhat.com>
9751
9752 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9753 (sparc_store_gregset_from_stack, sparc_store_gregset)
9754 (sparc_breakpoint_at): Fix formatting.
9755
97562012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9757
9758 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9759 are available.
9760 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9761 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9762 * config.in: Regenerate.
9763 * configure: Likewise.
9764
97652012-03-29 Pedro Alves <palves@redhat.com>
9766
9767 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9768 Correct ptrace arguments.
9769
97702012-03-28 Pedro Alves <palves@redhat.com>
9771
9772 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9773 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9774 (IA64_FR1_REGNUM): New defines.
9775 (ia64_fetch_register): New.
9776 (the_low_target): Install it.
9777 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9778 field.
9779 * linux-low.c (linux_fetch_registers): Try the
9780 the_low_target.fetch_register hook first.
9781
9782 * linux-arm-low.c (the_low_target): Adjust.
9783 * linux-bfin-low.c (the_low_target): Adjust.
9784 * linux-cris-low.c (the_low_target): Adjust.
9785 * linux-crisv32-low.c (the_low_target): Adjust.
9786 * linux-m32r-low.c (the_low_target): Adjust.
9787 * linux-m68k-low.c (the_low_target): Adjust.
9788 * linux-mips-low.c (the_low_target): Adjust.
9789 * linux-ppc-low.c (the_low_target): Adjust.
9790 * linux-s390-low.c (the_low_target): Adjust.
9791 * linux-sh-low.c (the_low_target): Adjust.
9792 * linux-sparc-low.c (the_low_target): Adjust.
9793 * linux-tic6x-low.c (the_low_target): Adjust.
9794 * linux-x86-low.c (the_low_target): Adjust.
9795 * linux-xtensa-low.c (the_low_target): Adjust.
9796
97972012-03-26 Pedro Alves <palves@redhat.com>
9798
9799 * server.c (handle_qxfer_libraries): Don't bail early if
9800 the_target->qxfer_libraries_svr4 is not NULL.
9801
98022012-03-26 Pedro Alves <palves@redhat.com>
9803
9804 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9805
98062012-03-23 Pedro Alves <palves@redhat.com>
9807
9808 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9809 "library-list-svr4" element's start tag when the the DSO list is
9810 empty.
9811
98122012-03-23 Pedro Alves <palves@redhat.com>
9813
9814 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9815 a variable whose type size is the same as the inferior's pointer
9816 size.
9817
98182012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9819
9820 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9821 struct siginfo.
9822 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9823 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9824 * linux-low.h: Include <signal.h>.
9825 (struct siginfo): Remove forward declaration.
9826 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9827 struct siginfo.
9828
98292012-03-21 Mike Frysinger <vapier@gentoo.org>
9830
9831 * .gitignore: Ignore more files.
9832
98332012-03-19 Pedro Alves <palves@redhat.com>
9834 Jan Kratochvil <jan.kratochvil@redhat.com>
9835
9836 * server.c (cont_thread, general_thread): Add describing comments.
9837 (start_inferior): Clear `cont_thread'.
9838 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9839 of a process.
9840
98412012-03-15 Yao Qi <yao@codesourcery.com>
9842
9843 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9844 handling to ...
9845 (cmd_qtdp): ... here.
9846
98472012-03-15 Yao Qi <yao@codesourcery.com>
9848
9849 * tracepoint.c (struct tracepoint_action_ops): New.
9850 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9851 (m_tracepoint_action_download): New.
9852 (r_tracepoint_action_download): New.
9853 (x_tracepoint_action_download): New.
9854 (l_tracepoint_action_download): New.
9855 (add_tracepoint_action): Install `action->ops' according type.
9856 (download_tracepoint_1): Move code `download' function pointer
9857 of various tracepoint_action_ops.
9858
98592012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9860
9861 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9862 linux_ptrace_attach_warnings.
9863
98642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9865
9866 * Makefile.in (linux-ptrace.o): New.
9867 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9868 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9869 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9870 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9871 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9872 of these targets.
9873 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9874
98752012-03-08 Yao Qi <yao@codesourcery.com>
9876 Pedro Alves <palves@redhat.com>
9877
9878 Fix PR server/13392.
9879 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9880 offset of JMP insn.
9881 * tracepoint.c (remove_tracepoint): New.
9882 (cmd_qtdp): Call remove_tracepoint when failed to install.
9883
98842012-03-07 Pedro Alves <palves@redhat.com>
9885
9886 * linux-low.c (get_detach_signal): New.
9887 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9888 Pass on pending signals to PTRACE_DETACH. Check the result of the
9889 ptrace call.
9890 * server.c (program_signals, program_signals_p): New.
9891 (handle_general_set): Handle QProgramSignals.
9892 * server.h (program_signals, program_signals_p): Declare.
9893
98942012-03-05 Pedro Alves <palves@redhat.com>
9895 Jan Kratochvil <jan.kratochvil@redhat.com>
9896
9897 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9898 New comment why.
9899
99002012-03-03 Yao Qi <yao@codesourcery.com>
9901
9902 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9903 agent_look_up_symbols.
9904
99052012-03-03 Yao Qi <yao@codesourcery.com>
9906
9907 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9908 (linux-x86-low.o): Likewise.
9909 * server.h: Remove in_process_agent_loaded.
9910 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9911 common/agent.c.
9912 Update callers.
9913
99142012-03-03 Yao Qi <yao@codesourcery.com>
9915
9916 * tracepoint.c (gdb_agent_capability): New global.
9917 (in_process_agent_loaded_ust): Renamed to
9918 `in_process_agent_supports_ust'.
9919 Update callers.
9920 (in_process_agent_supports_ust): Call agent_capability_check.
9921 (clear_installed_tracepoints): Assert that agent supports
9922 agent.
9923
99242012-03-03 Yao Qi <yao@codesourcery.com>
9925
9926 * linux-low.c (linux_supports_agent): New.
9927 (linux_target_ops): Initialize field `supports_agent' with
9928 linux_supports_agent.
9929 * target.h (struct target_ops) <supports_agent>: New.
9930 (target_supports_agent): New macro.
9931 * server.c (handle_general_set): Handle packet 'QAgent'.
9932 (handle_query): Send `QAgent+'.
9933 * Makefile.in (server.o): Depends on agent.h.
9934
99352012-03-03 Yao Qi <yao@codesourcery.com>
9936
9937 * Makefile.in (OBS): Add agent.o.
9938 Add new rule for agent.o.
9939 Track dependence of tracepoint.c on agent.h.
9940 * tracepoint.c (run_inferior_command_1):
9941 (run_inferior_command): Call agent_run_command.
9942 (gdb_ust_connect_sync_socket): Deleted. Move it to
9943 common/agent.c.
9944 (resume_thread, stop_thread): Likewise.
9945 (gdb_ust_socket_init): Renamed to ...
9946 (gdb_agent_socket_init): ... New.
9947 (gdb_ust_thread): Renamed to ...
9948 (gdb_agent_helper_thread): ... New.
9949 (gdb_ust_init): Move some code to ...
9950 (gdb_agent_init): ... here. New.
9951 [HAVE_UST]: Call gdb_ust_init.
9952 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9953 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9954 * config.in, configure: Regenerated.
9955
99562012-03-02 Pedro Alves <palves@redhat.com>
9957
9958 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9959 * linux-low.c (struct simple_pid_list): New.
9960 (stopped_pids): New a struct simple_pid_list pointer.
9961 (add_to_pid_list, pull_pid_from_list): New.
9962 (handle_extended_wait): Don't assume the first signal new children
9963 report is SIGSTOP. Adjust call to pull_pid_from_list.
9964 (linux_wait_for_lwp): Adjust.
9965
99662012-03-02 Yao Qi <yao@codesourcery.com>
9967
9968 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9969 debug log.
9970
99712012-03-02 Yao Qi <yao@codesourcery.com>
9972
9973 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9974 `stop_pc' and `tpoint'. Update caller.
9975
99762012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9977
9978 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9979 * linux-low.c (use_linux_regsets): New macro.
9980 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9981 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9982 (linux_register_in_regsets): New function.
9983 (usr_fetch_inferior_registers): Skip registers covered by
9984 regsets.
9985 (usr_store_inferior_registers): Likewise.
9986 (usr_fetch_inferior_registers): New macro.
9987 (usr_store_inferior_registers): Likewise.
9988 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9989 (linux_store_registers): Likewise.
9990 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9991 prototype.
9992 (init_registers_mips64_dsp_linux): Likewise.
9993 (init_registers_mips_linux): New macro.
9994 (init_registers_mips_dsp_linux): Likewise.
9995 (mips_dsp_num_regs): Likewise.
9996 (DSP_BASE, DSP_CONTROL): New fallback macros.
9997 (mips_base_regs): New macro.
9998 (mips_regmap): Use it. Fix the size.
9999 (mips_dsp_regmap): New variable.
10000 (mips_dsp_regset_bitmap): Likewise.
10001 (mips_arch_setup): New function.
10002 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10003 than mips_regmap.
10004 (mips_cannot_store_register): Likewise.
10005 (the_low_target): Update .arch_setup, .num_regs and .regmap
10006 initializers. Add .regset_bitmap initializer.
10007 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10008 initializer.
10009 * linux-bfin-low.c (the_low_target): Likewise.
10010 * linux-cris-low.c (the_low_target): Likewise.
10011 * linux-crisv32-low.c (the_low_target): Likewise.
10012 * linux-ia64-low.c (the_low_target): Likewise.
10013 * linux-m32r-low.c (the_low_target): Likewise.
10014 * linux-m68k-low.c (the_low_target): Likewise.
10015 * linux-ppc-low.c (the_low_target): Likewise.
10016 * linux-s390-low.c (the_low_target): Likewise.
10017 * linux-sh-low.c (the_low_target): Likewise.
10018 * linux-sparc-low.c (the_low_target): Likewise.
10019 * linux-tic6x-low.c (the_low_target): Likewise.
10020 * linux-x86-low.c (the_low_target): Likewise.
10021 * linux-xtensa-low.c (the_low_target): Likewise.
10022 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10023 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10024 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10025 srv_xmlfiles.
10026 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10027 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10028
100292012-02-29 Yao Qi <yao@codesourcery.com>
10030 Pedro Alves <palves@redhat.com>
10031
10032 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10033 `step_over_finished' is true.
10034
100352012-02-27 Pedro Alves <palves@redhat.com>
10036
10037 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10038 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10039
100402012-02-27 Pedro Alves <palves@redhat.com>
10041
10042 PR server/9684
10043 * linux-low.c (pid_is_stopped): New.
10044 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10045
100462012-02-25 Luis Machado <lgustavo@codesourcery.com>
10047
10048 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10049 of conditions.
10050
100512012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10052
10053 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10054
100552012-02-24 Luis Machado <lgustavo@codesourcery>
10056
10057 * server.c (handle_query): Advertise support for target-side
10058 breakpoint condition evaluation.
10059 (process_point_options): New function.
10060 (process_serial_event): When inserting a breakpoint, check for
10061 a target-side condition that should be evaluated.
10062
10063 * mem-break.c: Include regcache.h and ax.h.
10064 (point_cond_list_t): New data structure.
10065 (breakpoint) <cond_list>: New field.
10066 (find_gdb_breakpoint_at): Make non-static.
10067 (delete_gdb_breakpoint_at): Clear any target-side
10068 conditions.
10069 (clear_gdb_breakpoint_conditions): New function.
10070 (add_condition_to_breakpoint): Likewise.
10071 (add_breakpoint_condition): Likewise.
10072 (gdb_condition_true_at_breakpoint): Likewise.
10073 (gdb_breakpoint_here): Return result directly instead
10074 of going through a local variable.
10075
10076 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10077 (clear_gdb_breakpoint_conditions): Likewise.
10078 (add_breakpoint_condition): Likewise.
10079 (gdb_condition_true_at_breakpoint): Likewise.
10080
10081 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10082 (need_step_over_p): Take target-side breakpoint condition into
10083 consideration.
10084
100852012-02-24 Luis Machado <lgustavo@codesourcery>
10086
10087 * server.h: Include tracepoint.h.
10088 (agent_mem_read, agent_get_trace_state_variable_value,
10089 agent_set_trace_state_variable_value,
10090 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10091 get_set_tsv_func_addr): New prototypes.
10092
10093 * ax.h: New include file.
10094 * ax.c: New source file.
10095
10096 * tracepoint.c: Include ax.h.
10097 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10098 agent_expr, eval_result_type): Move to ax.h.
10099 (parse_agent_expr): Rename to ...
10100 (gdb_parse_agent_expr): ... this, make it non-static and move
10101 to ax.h.
10102 (unparse_agent_expr) Rename to ...
10103 (gdb_unparse_agent_expr): ... this, make it non-static and move
10104 to ax.h.
10105 (eval_agent_expr): Rename to ...
10106 (eval_tracepoint_agent_expr): ... this.
10107 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10108 forward declarations.
10109 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10110 (agent_get_trace_state_variable_value): New function.
10111 (agent_set_trace_state_variable_value): New function.
10112 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10113 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10114 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10115 (condition_true_at_tracepoint): Likewise.
10116 (parse_agent_expr): Rename to ...
10117 (gdb_parse_agent_expr): ... this and move to ax.c.
10118 (unparse_agent_expr): Rename to ...
10119 (gdb_unparse_agent_expr): ... this and move to ax.c.
10120 (gdb_agent_op_name): Move to ax.c.
10121 (eval_agent_expr): Rename to ...
10122 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10123 and move to ax.c.
10124 (eval_tracepoint_agent_expr): New function.
10125 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10126 non-static.
10127 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10128 ax.c.
10129 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10130 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10131 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10132 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10133 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10134 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10135 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10136 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10137 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10138 (compile_bytecodes): Remove forward declaration.
10139 (is_goto_target): Move to ax.c.
10140 (compile_bytecodes): Move to ax.c and call
10141 agent_get_trace_state_variable_value (...) and
10142 agent_set_trace_state_variable_value (...).
10143
10144 * Makefile.in: Update ax.c and IPA dependencies.
10145
101462012-02-24 Pedro Alves <palves@redhat.com>
10147
10148 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10149 (cmd_bigqtbuffer_circular): ... this. Only handle
10150 'QTBuffer:circular:'.
10151 (handle_tracepoint_general_set): Adjust.
10152
101532012-02-16 Yao Qi <yao@codesourcery.com>
10154
10155 * inferiors.c: Move code to ...
10156 * dll.c: .... here. New.
10157 * server.h: Declare clear_dlls.
10158 * Makefile.in (SFILES): Add dll.c.
10159 (OBS): Add dll.o
10160 (dll.o): New rule.
10161
101622012-02-11 Yao Qi <yao@codesourcery.com>
10163
10164 * server.c: (handle_monitor_command): Add a new parameter
10165 `own_buf'.
10166 (handle_query): Update caller.
10167
101682012-02-09 Joel Brobecker <brobecker@adacore.com>
10169
10170 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10171 * configure, config.in: Regenerate.
10172 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10173 is not defined.
10174
101752012-02-02 Pedro Alves <palves@redhat.com>
10176
10177 Try SIGKILL first, then PTRACE_KILL.
10178 * linux-low.c (linux_kill_one_lwp): New.
10179 (linux_kill_one_lwp): Rename to ...
10180 (kill_one_lwp_callback): ... this. Use the new
10181 linux_kill_one_lwp.
10182
101832012-02-02 Pedro Alves <palves@redhat.com>
10184
10185 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10186 inferior.
10187
101882012-01-27 Pedro Alves <palves@redhat.com>
10189
10190 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10191 (elf_64_file_p): Make static.
10192 (linux_pid_exe_is_elf_64_file): New.
10193 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10194 Delete declarations.
10195 (linux_pid_exe_is_elf_64_file): Declare.
10196 * linux-x86-low.c (x86_arch_setup): Use
10197 linux_pid_exe_is_elf_64_file.
10198
101992012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10200
10201 * linux-low.c (linux_wait_for_event_1): Rename to ...
10202 (linux_wait_for_event): ... here and merge it with former
10203 linux_wait_for_event - new variable wait_ptid, use it.
10204 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10205
102062012-01-23 Pedro Alves <palves@redhat.com>
10207
10208 * server.c (main): Avoid yet another case of infinite loop while
10209 detaching/killing after a longjmp.
10210
102112012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10212
10213 Code cleanup.
10214 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10215
102162012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10217
10218 * hostio.c (handle_readlink): New function.
10219 (handle_vFile): Call it to handle "vFile:readlink" packets.
10220
102212012-01-20 Pedro Alves <palves@redhat.com>
10222 Ulrich Weigand <ulrich.weigand@linaro.org>
10223
10224 * server.c (handle_v_requests): Only support vAttach and vRun to
10225 start multiple processes when in extended protocol mode.
10226
102272012-01-17 Pedro Alves <palves@redhat.com>
10228
10229 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10230 memalign plus mprotect to allocate the scratch buffer.
10231
102322012-01-13 Pedro Alves <palves@redhat.com>
10233
10234 * server.c (attach_inferior): Clear `cont_thread'.
10235
102362012-01-13 Pedro Alves <palves@redhat.com>
10237
10238 * server.c (main): Avoid infinite loop while detaching/killing
10239 after a longjmp.
10240
102412012-01-09 Doug Evans <dje@google.com>
10242
10243 * server.c (start_inferior): Set last_ptid in --wrapper case.
10244
102452012-01-06 Yao Qi <yao@codesourcery.com>
10246
10247 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10248 defined.
10249 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10250
102512012-01-04 Yao Qi <yao@codesourcery.com>
10252
10253 * tracepoint.c (cmd_qtdp): Print debug message
10254 for static tracepoint.
10255
102562012-01-04 Yao Qi <yao@codesourcery.com>
10257
10258 * tracepoint.c (trace_vdebug): Differentiate debug message
10259 between gdbserver and IPA.
10260
102612012-01-03 Yao Qi <yao@codesourcery.com>
10262
10263 * tracepoint.c (tracepoint_was_hit): Don't collect for
10264 static tracepoint.
10265
102662012-01-02 Joel Brobecker <brobecker@adacore.com>
10267
10268 * terminal.h: Reformat copyright header.
10269
102702012-01-02 Joel Brobecker <brobecker@adacore.com>
10271
10272 * server.c (gdbserver_version): Update copyright year.
10273 * gdbreplay.c (gdbreplay_version): Likewise.
10274
102752011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10276
10277 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10278
10279 Revert:
10280 2011-12-18 Hui Zhu <teawater@gmail.com>
10281 * linux-low.c (linux_create_inferior): Save return value to ret.
10282
102832011-12-18 Hui Zhu <teawater@gmail.com>
10284
10285 * linux-low.c (linux_create_inferior): Save return value to ret.
10286
102872011-12-16 Doug Evans <dje@google.com>
10288
10289 * linux-low.c (linux_create_inferior): If stdio connection,
10290 redirect stdin from /dev/null, stdout to stderr.
10291 * remote-utils.c (remote_is_stdio): New static global.
10292 (remote_connection_is_stdio): New function.
10293 (remote_prepare): Handle stdio connection.
10294 (remote_open): Ditto.
10295 (remote_close): Don't close stdin for stdio connections.
10296 (read_prim,write_prim): New functions. Replace all calls to
10297 read/write to these.
10298 * server.c (main): Watch for "-" argument. Move call to
10299 remote_prepare before start_inferior.
10300 * server.h (STDIO_CONNECTION_NAME): New macro.
10301 (remote_connection_is_stdio): Declare.
10302
10303 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10304 in debugging output.
10305
103062011-12-15 Yao Qi <yao@codesourcery.com>
10307
10308 * tracepoint.c: Include sys/syscall.h.
10309 (gdb_ust_thread): Remove preprocessor conditional.
10310
103112011-12-14 Pedro Alves <pedro@codesourcery.com>
10312
10313 * linux-low.c (linux_detach_one_lwp): Call
10314 the_low_target.prepare_to_resume before detaching.
10315
103162011-12-14 Yao Qi <yao@codesourcery.com>
10317
10318 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10319 of write.
10320
103212011-12-14 Yao Qi <yao@codesourcery.com>
10322
10323 * i386-low.c (i386_low_stopped_data_address): Initialize local
10324 variable `control'.
10325
103262011-12-13 Pedro Alves <pedro@codesourcery.com>
10327
10328 PR remote/13492
10329
10330 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10331 DR_CONTROL unless necessary. Extend comments.
10332 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10333 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10334
103352011-12-13 Yao Qi <yao@codesourcery.com>
10336
10337 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10338 macros.
10339 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10340
103412011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10342
10343 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10344 Print new debug message for such case.
10345
103462011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10347
10348 Fix overlapping memcpy.
10349 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10350 the read_inferior_memory transfer.
10351 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10352 write_inferior_memory transfer.
10353 (set_fast_tracepoint_jump): New variable buf. Use it for the
10354 read_inferior_memory and write_inferior_memory transfers.
10355 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10356 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10357 Use it for the write_inferior_memory transfer.
10358 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10359 buffers.
10360
103612011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10362
10363 * linux-low.c (fetch_register, store_register): Make code
10364 consistent, fix formatting.
10365
103662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10367
10368 * linux-low.c (usr_store_inferior_registers): Factor out code
10369 to handle individual registers into...
10370 (store_register): ... this new function.
10371
103722011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10373
10374 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10375 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10376 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10377 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10378 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10379 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10380 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10381 (srv_xmlfiles): Add new XML files.
10382
10383 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10384 and <sys/uio.h>.
10385 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10386 (init_registers_s390_linux32v1): Add prototype.
10387 (init_registers_s390_linux32v2): Likewise.
10388 (init_registers_s390_linux64v1): Likewise.
10389 (init_registers_s390_linux64v2): Likewise.
10390 (init_registers_s390x_linux64v1): Likewise.
10391 (init_registers_s390x_linux64v2): Likewise.
10392 (s390_num_regs): Increment to 52.
10393 (s390_regmap): Add orig_r2 register.
10394 (s390_num_regs_3264): Increment to 68.
10395 (s390_regmap_3264): Add orig_r2 register.
10396 (s390_collect_ptrace_register): Handle orig_r2 register.
10397 (s390_supply_ptrace_register): Likewise.
10398 (s390_fill_last_break): New function.
10399 (s390_store_last_break): Likewise.
10400 (s390_fill_system_call): New function.
10401 (s390_store_system_call): Likewise.
10402 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10403 register sets.
10404 (s390_check_regset): New function.
10405 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10406 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10407 Update target_regsets for available register sets.
10408
104092011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10410 Jan Kratochvil <jan.kratochvil@redhat.com>
10411
10412 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10413 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10414 New.
10415 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10416 * linux-low.h (struct process_info_private): New member r_debug.
10417 * server.c (handle_qxfer_libraries): Call
10418 the_target->qxfer_libraries_svr4.
10419 (handle_qxfer_libraries_svr4): New function.
10420 (qxfer_packets): New entry "libraries-svr4".
10421 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10422 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10423 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10424 PACKET_qXfer_libraries_svr4.
10425
104262011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10427
10428 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10429 PSW address/mask between 8-byte and 16-byte formats.
10430 (s390_supply_ptrace_register): Likewise.
10431 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10432 basic addressing mode bit.
10433
104342011-11-24 Stan Shebs <stan@codesourcery.com>
10435
10436 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10437
104382011-11-17 Stan Shebs <stan@codesourcery.com>
10439
10440 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10441 (tracing_start_time): New global.
10442 (tracing_stop_time): New global.
10443 (tracing_user_name): New global.
10444 (tracing_notes): New global.
10445 (tracing_stop_note): New global.
10446 (cmd_qtstart): Set traceframe_usage, start_time.
10447 (stop_tracing): Set stop_time.
10448 (cmd_qtstatus): Report additional status.
10449 (cmd_qtp): New function.
10450 (handle_tracepoint_query): Call it.
10451 (cmd_qtnotes): New function.
10452 (handle_tracepoint_general_set): Call it.
10453 (get_timestamp): Rename from tsv_get_timestamp.
10454
104552011-11-14 Stan Shebs <stan@codesourcery.com>
10456 Kwok Cheung Yeung <kcy@codesourcery.com>
10457
10458 * linux-x86-low.c (small_jump_insn): New.
10459 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10460 trampoline and error message, build a trampoline and issue a small
10461 jump instruction to it.
10462 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10463 trampoline and error message.
10464 (x86_get_min_fast_tracepoint_insn_len): New.
10465 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10466 * linux-low.h (struct linux_target_ops): Add arguments to
10467 install_fast_tracepoint_jump_pad operation, add new operation.
10468 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10469 arguments.
10470 (linux_get_min_fast_tracepoint_insn_len): New function.
10471 (linux_target_op): Add new operation.
10472 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10473 (gdb_trampoline_buffer_end): Ditto.
10474 (gdb_trampoline_buffer_error): Ditto.
10475 (struct ipa_sym_addresses): Add fields for new IPA variables.
10476 (symbol_list): Add entries for new IPA variables.
10477 (struct tracepoint): Add fields to hold the address range of the
10478 trampoline used by the tracepoint.
10479 (trampoline_buffer_head): New static variable.
10480 (trampoline_buffer_tail): Ditto.
10481 (claim_trampoline_space): New function.
10482 (have_fast_tracepoint_trampoline_buffer): New function.
10483 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10484 structure.
10485 (install_fast_tracepoint): Ditto, also add error buffer argument.
10486 (cmd_qtminftpilen): New function.
10487 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10488 (fast_tracepoint_from_trampoline_address): New function.
10489 (fast_tracepoint_collecting): Handle trampoline as part of jump
10490 pad space.
10491 (set_trampoline_buffer_space): New function.
10492 (initialize_tracepoint): Initialize new IPA variables.
10493 * target.h (struct target_ops): Add arguments to
10494 install_fast_tracepoint_jump_pad operation, add new
10495 get_min_fast_tracepoint_insn_len operation.
10496 (target_get_min_fast_tracepoint_insn_len): New.
10497 (install_fast_tracepoint_jump_pad): Add arguments.
10498 * server.h (IPA_BUFSIZ): Define.
10499 * linux-i386-ipa.c: Include extra header files.
10500 (initialize_fast_tracepoint_trampoline_buffer): New function.
10501 (initialize_low_tracepoint): Call it.
10502 * server.h (set_trampoline_buffer_space): Declare.
10503 (claim_trampoline_space): Ditto.
10504 (have_fast_tracepoint_trampoline_buffer): Ditto.
10505
105062011-11-14 Yao Qi <yao@codesourcery.com>
10507
10508 * server.c (handle_query): Handle InstallInTrace for qSupported.
10509 * tracepoint.c (add_tracepoint): Sort list.
10510 (install_tracepoint, download_tracepoint): New.
10511 (cmd_qtdp): Call them to install and download tracepoints.
10512 (sort_tracepoints): Removed.
10513 (cmd_qtstart): Update.
10514
105152011-11-14 Yao Qi <yao@codesourcery.com>
10516
10517 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10518 * mem-break.h: Declare.
10519 * tracepoint.c (cmd_qtstart): Move some code to ...
10520 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10521 New.
10522 (download_tracepoints): Move some code to ...
10523 (download_tracepoint_1): ... here. New.
10524
105252011-11-08 Yao Qi <yao@codesourcery.com>
10526
10527 * remote-utils.c (relocate_instruction): A comment fix.
10528
105292011-11-07 Joel Brobecker <brobecker@adacore.com>
10530
10531 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10532 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10533 dr_status_mirror and dr_control_mirror from debug_reg_state.
10534 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10535 (i386_initial_stuff): Remove use of deleted globals.
10536 (i386_get_thread_context, i386_set_thread_context,
10537 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10538 from debug_reg_state.
10539
105402011-11-05 Yao Qi <yao@codesourcery.com>
10541
10542 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10543 address as TPOINT's.
10544
105452011-11-02 Stan Shebs <stan@codesourcery.com>
10546
10547 * tracepoint.c (agent_mem_read_string): New function.
10548 (eval_agent_expr): Call it for tracenz.
10549 * server.c (handle_query): Report support for tracenz.
10550
105512011-11-02 Yao Qi <yao@codesourcery.com>
10552
10553 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10554
105552011-11-02 Yao Qi <yao@codesourcery.com>
10556
10557 * target.h: Fix a typo in comment.
10558
105592011-10-31 Pedro Alves <pedro@codesourcery.com>
10560
10561 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10562 clobber the breakpoints' shadows with fast tracepoint jumps.
10563 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10564 * target.c (write_inferior_memory): Also pass MYADDR down to
10565 check_mem_write.
10566
105672011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10568
10569 * configure.ac: Check support for personality routine.
10570 * configure: Regenerate.
10571 * config.in: Likewise.
10572 * linux-low.c: Include <sys/personality.h>.
10573 Define ADDR_NO_RANDOMIZE if necessary.
10574 (linux_create_inferior): Disable address space randomization when
10575 forking inferior, if requested.
10576 (linux_supports_disable_randomization): New function.
10577 (linux_target_ops): Install it.
10578 * server.h (disable_randomization): Declare.
10579 * server.c (disable_randomization): New global variable.
10580 (handle_general_set): Handle QDisableRandomization.
10581 (handle_query): Likewise for qSupported.
10582 (main): Support --disable-randomization and --no-disable-randomization
10583 command line arguments.
10584 * target.h (struct target_ops): Add supports_disable_randomization.
10585 (target_supports_disable_randomization): New macro.
10586
105872011-09-29 Mike Frysinger <vapier@gentoo.org>
10588
10589 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10590 ifdef check.
10591 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10592 [!PT_GETDSBT] (target_loadmap): New definition.
10593 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10594 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10595 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10596 and PT_GETDSBT to LINUX_LOADMAP.
10597 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10598 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10599
106002011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10601
10602 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10603 (arm_linux_hwbp_cap): New static variable.
10604 (arm_linux_get_hwbp_cap): Replace by ...
10605 (arm_linux_init_hwbp_cap): ... this new function.
10606 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10607 (arm_linux_get_hw_watchpoint_count): Likewise.
10608 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10609 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10610 (arm_prepare_to_resume): Use perror_with_name instead of error.
10611
106122011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10613
10614 * linux-arm-low.c: Include <signal.h>.
10615 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10616 (struct arm_linux_hwbp_cap): New data type.
10617 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10618 (struct arm_linux_hw_breakpoint): New data type.
10619 (MAX_BPTS, MAX_WPTS): Define.
10620 (struct arch_process_info, struct arch_lwp_info): New data types.
10621 (arm_linux_get_hwbp_cap): New function.
10622 (arm_linux_get_hw_breakpoint_count): Likewise.
10623 (arm_linux_get_hw_watchpoint_count): Likewise.
10624 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10625 (arm_hwbp_control_initialize): Likewise.
10626 (arm_hwbp_control_is_enabled): Likewise.
10627 (arm_hwbp_control_is_initialized): Likewise.
10628 (arm_hwbp_control_disable): Likewise.
10629 (arm_linux_hw_breakpoint_equal): Likewise.
10630 (arm_linux_hw_point_initialize): Likewise.
10631 (struct update_registers_data): New data structure.
10632 (update_registers_callback: New function.
10633 (arm_insert_point): Likewise.
10634 (arm_remove_point): Likewise.
10635 (arm_stopped_by_watchpoint): Likewise.
10636 (arm_stopped_data_address): Likewise.
10637 (arm_new_process): Likewise.
10638 (arm_new_thread): Likewise.
10639 (arm_prepare_to_resume): Likewise.
10640 (the_low_target): Register arm_insert_point, arm_remove_point,
10641 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10642 arm_new_thread, and arm_prepare_to_resume.
10643
106442011-09-15 Stan Shebs <stan@codesourcery.com>
10645
10646 * server.h (struct emit_ops): Add compare-goto fields.
10647 * tracepoint.c (gdb_agent_op_sizes): New table.
10648 (emit_eq_goto): New function.
10649 (emit_ne_goto): New function.
10650 (emit_lt_goto): New function.
10651 (emit_le_goto): New function.
10652 (emit_gt_goto): New function.
10653 (emit_ge_goto): New function.
10654 (is_goto_target): New function.
10655 (compile_bytecodes): Recognize special cases of compare-goto
10656 combinations and call specialized emitters for them.
10657 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10658 (amd64_emit_ne_goto): New function.
10659 (amd64_emit_lt_goto): New function.
10660 (amd64_emit_le_goto): New function.
10661 (amd64_emit_gt_goto): New function.
10662 (amd64_emit_ge_goto): New function.
10663 (amd64_emit_ops): Add the new functions.
10664 (i386_emit_eq_goto): New function.
10665 (i386_emit_ne_goto): New function.
10666 (i386_emit_lt_goto): New function.
10667 (i386_emit_le_goto): New function.
10668 (i386_emit_gt_goto): New function.
10669 (i386_emit_ge_goto): New function.
10670 (i386_emit_ops): Add the new functions.
10671
106722011-09-08 Stan Shebs <stan@codesourcery.com>
10673
10674 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10675 (i386_emit_epilogue): Restore %ebx.
10676
106772011-08-31 Jie Zhang <jzhang918@gmail.com>
10678
10679 * server.c (step_thread): Remove definition.
10680 (process_serial_event): Don't handle Hs.
10681 * server.h (step_thread): Remove declaration.
10682 * target.c (set_desired_inferior): Remove use of step_thread.
10683
106842011-08-24 Luis Machado <lgustavo@codesourcery.com>
10685
10686 * linux-low.c: Include linux-procfs.h.
10687 (linux_attach_lwp_1): Update comments.
10688 (linux_attach): Scan for existing threads when attaching to a
10689 process that is the tgid.
10690 * Makefile.in: Update dependencies.
10691
106922011-08-24 Luis Machado <lgustavo@codesourcery.com>
10693
10694 * configure.srv: Add linux-procfs.o dependencies.
10695
106962011-08-14 Yao Qi <yao@codesourcery.com>
10697
10698 * target.h (struct target_ops): Fix indent.
10699 * win32-low.c (win32_target_ops): Fix comment.
10700
107012011-08-14 Andrew Jenner <andrew@codesourcery.com>
10702 Yao Qi <yao@codesourcery.com>
10703
10704 * Makefile.in (clean): Remove tic6x-*.c files.
10705 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10706 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10707 (tic6x-c64xp-linux.c): Likewise.
10708 * configure.srv: Add support for tic6x-*-uclinux.
10709 * linux-tic6x-low.c: New.
10710 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10711
107122011-08-14 Andrew Stubbs <ams@codesourcery.com>
10713 Yao Qi <yao@codesourcery.com>
10714
10715 * target.h (struct target_ops): Add read_loadmap.
10716 * linux-low.c (struct target_loadseg): New type.
10717 (struct target_loadmap): New type.
10718 (linux_read_loadmap): New function.
10719 (linux_target_ops): Add linux_read_loadmap.
10720 * server.c (handle_query): Support qXfer:fdpic:read packet.
10721 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10722 to NULL.
10723
107242011-08-05 Eli Zaretskii <eliz@gnu.org>
10725
10726 * win32-low.c: Include <stdint.h>.
10727
107282011-07-22 Pedro Alves <pedro@codesourcery.com>
10729
10730 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10731 to the inferior here.
10732 (i386_remove_aligned_watchpoint): Ditto.
10733 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10734 fit part of the watchpoint in the debug registers.
10735 (i386_update_inferior_debug_regs): New.
10736 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10737 registers, and only update the inferior on success.
10738 (i386_low_remove_watchpoint): Ditto.
10739
107402011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10741
10742 * linux-low.c (compare_ints, unique, list_threads, show_process,
10743 linux_core_of_thread): Delete.
10744 (linux_target_ops): Change linux_core_of_thread to
10745 linux_common_core_of_thread.
10746 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10747 * utils.c (malloc_failure): Change type of argument.
10748 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10749 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10750 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10751 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10752 (IPA_OBJS): Add common-utils-ipa.o.
10753 (ptid_h, linux_osdata_h): New macros.
10754 (server_h): Add common/common-utils.h, common/xml-utils.h,
10755 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10756 common/ptid.h.
10757 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10758 ptid.o, buffer.o): New rules.
10759 (linux-low.o): Add common/linux-osdata.h as a dependency.
10760 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10761 * configure.ac: Add AC_HEADER_DIRENT check.
10762 * config.in: Regenerate.
10763 * configure: Regenerate.
10764 * remote-utils.c (xml_escape_text): Delete.
10765 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10766 buffer_xml_printf): Move to common/buffer.c.
10767 * server.c (main): Remove call to initialize_inferiors.
10768 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10769 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10770 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10771 internal_error, gdb_assert, gdb_assert_fail): Delete.
10772 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10773 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10774 common/buffer.h.
10775 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10776 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10777 initialize_inferiors): Delete.
10778
107792011-07-20 Pedro Alves <pedro@codesourcery.com>
10780
10781 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10782 symbol error.
10783
107842011-05-31 Pedro Alves <pedro@codesourcery.com>
10785
10786 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10787 assertion.
10788 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10789
107902011-05-26 Yao Qi <yao@codesourcery.com>
10791
10792 * Makefile.in (thread-db.o): Track dependence to
10793 common/gdb_thread_db.h.
10794 * thread-db.c: include gdb_thread_db.h from right place.
10795
107962011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10797
10798 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10799 __FILE__ and __LINE__ to internal_error.
10800
108012011-05-13 Doug Evans <dje@google.com>
10802
10803 * thread-db.c (try_thread_db_load_from_sdir): New function.
10804 (try_thread_db_load_from_dir): New function.
10805 (thread_db_load_search): Handle $sdir, ignore $pdir.
10806 Remove trying of system directories if search of
10807 libthread-db-search-path fails, that is now done via $sdir.
10808
108092011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10810
10811 * server.c (handle_query): Add EnableDisableTracepoints to the list
10812 of supported features.
10813 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10814 tracepoints.
10815 (cmd_qtenable_disable): New.
10816 (cmd_qtstart): Install tracepoints even if disabled.
10817 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10818 receiving a QTEnable or QTDisable packet.
10819 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10820 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10821 tracepoints.
10822 (gdb_probe): Skip data collection if static tracepoint is disabled.
10823
108242011-05-10 Doug Evans <dje@google.com>
10825
10826 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10827
108282011-05-04 Doug Evans <dje@google.com>
10829
10830 * linux-low.c (linux_join): Skip process lookup.
10831 * spu-low.c (spu_join): Ditto.
10832 * server.c (join_inferiors_callback): Delete.
10833 (process_serial_event): For 'D' packet (detach) call join_inferior
10834 directly.
10835
108362011-05-04 Joseph Myers <joseph@codesourcery.com>
10837
10838 * README: Don't mention xscale*-*-linux*.
10839 * configure.srv (xscale*-*-linux*): Don't handle target.
10840
108412011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10842
10843 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10844 casting pointers.
10845 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10846 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10847 (i386_emit_void_call_2): Likewise.
10848
108492011-04-26 Yao Qi <yao@codesourcery.com>
10850
10851 * linux-low.c: Move common macros to linux-ptrace.h.
10852 Include linux-ptrace.h.
10853 * Makefile.in (linux_ptrace_h): New.
10854 (linux-low.o): Depends on linux-ptrace.h.
10855
108562011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10857
10858 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10859 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10860 (remote_prepare): New function with most of the TCP code from ...
10861 (remote_open): ... here. Detect PORT here unconditionally. Move also
10862 setting transport_is_reliable.
10863 * server.c (run_once): New variable.
10864 (gdbserver_usage): Document it.
10865 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10866 the first run if RUN_ONCE.
10867 * server.h (run_once, remote_prepare): New declarations.
10868
108692011-04-19 Tom Tromey <tromey@redhat.com>
10870
10871 * win32-low.c (handle_load_dll): Remove duplicate "the".
10872
108732011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10874
10875 Remove support for old Cygwin 1.5 versions.
10876 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10877 function to avoid warning.
10878 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10879 warning.
10880
108812011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10882
10883 * gdbserver/server.h (Macro _): Define it if not available.
10884
108852011-03-14 Michael Snyder <msnyder@vmware.com>
10886
10887 * hostio.c (handle_close): Remove unnecessary null test.
10888
108892011-03-10 Joel Brobecker <brobecker@adacore.com>
10890
10891 * Makefile.in (maintainer-clean realclean distclean): Remove
10892 "make ... subdir_do" command.
10893
108942011-03-10 Michael Snyder <msnyder@vmware.com>
10895
10896 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10897
10898 * server.c (handle_v_run): Free alloced buffer on early return.
10899
109002011-03-09 Yao Qi <yao@codesourcery.com>
10901
10902 Revert:
10903 2011-03-04 Yao Qi <yao@codesourcery.com>
10904
10905 * Makefile.in: Remove GNU make feature --directory.
10906
10907 2011-03-05 Yao Qi <yao@codesourcery.com>
10908
10909 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10910 (subdir_do): New make target. Copied from gdb/Makefile.
10911 (maintainer-clean, realclean, distclean, clean): Call corresponding
10912 make targets in common/Makefile.
10913
10914 2011-02-11 Yao Qi <yao@codesourcery.com>
10915
10916 * configure.ac: Call AC_PROG_RANLIB.
10917 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10918 * configure: Regenerate.
10919
109202011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10921
10922 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10923
109242011-03-06 Yao Qi <yao@codesourcery.com>
10925
10926 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10927
109282011-03-05 Yao Qi <yao@codesourcery.com>
10929
10930 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10931 (subdir_do): New make target. Copied from gdb/Makefile.
10932 (maintainer-clean, realclean, distclean, clean): Call corresponding
10933 make targets in common/Makefile.
10934
109352011-03-04 Yao Qi <yao@codesourcery.com>
10936
10937 * Makefile.in: Remove GNU make feature --directory.
10938
109392011-03-04 Michael Snyder <msnyder@vmware.com>
10940
10941 * server.c (queue_stop_reply): Call xmalloc not malloc.
10942
109432011-03-02 Michael Snyder <msnyder@vmware.com>
10944
10945 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10946
109472011-02-28 Michael Snyder <msnyder@vmware.com>
10948
10949 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10950 (cmd_qtframe): Ditto.
10951 (cmd_qtbuffer): Ditto.
10952 (cmd_bigqtbuffer): Ditto.
10953
10954 * utils.c (decimal2str): Initialize 'width' to nine, then
10955 don't mess with it.
10956
109572011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10958
10959 * hostio.c (require_data): Free *data, not data.
10960
109612011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10962
10963 * hostio.c (require_data): Use free, not xfree.
10964
109652011-02-27 Michael Snyder <msnyder@vmware.com>
10966
10967 * server.c (handle_query): Discard unused value.
10968
10969 * hostio.c (require_data): Free malloc memory before returning
10970 error.
10971
109722011-02-26 Michael Snyder <msnyder@vmware.com>
10973
10974 * linux-low.c (list_threads): Call closedir for dirent.
10975
109762011-02-27 Michael Snyder <msnyder@vmware.com>
10977
10978 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10979 a case statement falls through.
10980
10981 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10982
10983 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10984 in comparison.
10985
109862011-02-26 Michael Snyder <msnyder@vmware.com>
10987
10988 * utils.c (decimal2str): Eliminate dead code and dead param.
10989 (pulongest): Drop dead param from call to decimal2str.
10990 (plongest): Ditto.
10991
109922011-02-24 Joel Brobecker <brobecker@adacore.com>
10993
10994 Revert the following patch (not approved yet):
10995 2011-02-21 Hui Zhu <teawater@gmail.com>
10996 * tracepoint.c (tp_printf): New function.
10997 (eval_agent_expr): Handle gdb_agent_op_printf.
10998
109992011-02-21 Hui Zhu <teawater@gmail.com>
11000
11001 * tracepoint.c (tp_printf): New function.
11002 (eval_agent_expr): Handle gdb_agent_op_printf.
11003
110042011-02-18 Tom Tromey <tromey@redhat.com>
11005
11006 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11007 (tracepoint.o): Likewise.
11008 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11009 (gdb_agent_op_names): Likewise.
11010
110112011-02-18 Tom Tromey <tromey@redhat.com>
11012
11013 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11014 gdb_agent_op_rot>: New constants.
11015 (gdb_agent_op_names): Add pick and roll.
11016 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11017 cases.
11018
110192011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11020
11021 * aclocal.m4: Regenerated with aclocal-1.11.1.
11022
110232011-02-14 Pedro Alves <pedro@codesourcery.com>
11024
11025 * server.c (handle_qxfer_traceframe_info): New.
11026 (qxfer_packets): Register "traceframe-info".
11027 (handle_query): Report support for qXfer:traceframe-info:read+.
11028 * tracepoint.c (match_blocktype): New.
11029 (traceframe_find_block_type): Rename to ...
11030 (traceframe_walk_blocks): ... this. Add callback filter argument,
11031 and use it.
11032 (traceframe_find_block_type): New, reimplemented on top of
11033 traceframe_walk_blocks.
11034 (build_traceframe_info_xml): New.
11035 (traceframe_read_info): New.
11036 * server.h (traceframe_read_info): Declare.
11037
110382011-02-11 Yao Qi <yao@codesourcery.com>
11039
11040 * configure.ac: Call AC_PROG_RANLIB.
11041 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11042 * configure: Regenerate.
11043
110442011-02-07 Pedro Alves <pedro@codesourcery.com>
11045
11046 * server.c (gdb_read_memory): Change return semantics to allow
11047 partial transfers.
11048 (handle_search_memory_1): Adjust.
11049 (process_serial_event) <'m' packet>: Handle partial transfers.
11050 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11051
110522011-01-28 Pedro Alves <pedro@codesourcery.com>
11053
11054 * regcache.c (init_register_cache): Initialize
11055 regcache->register_status.
11056 (free_register_cache): Release regcache->register_status.
11057 (regcache_cpy): Copy register_status.
11058 (registers_to_string): Print 'x's for unavailable registers.
11059 (supply_register): Mark the register's status valid or
11060 unavailable, depending on whether a buffer was passed in or not.
11061 (supply_register_zeroed): New.
11062 (supply_regblock): Mark the registers' status valid or
11063 unavailable, depending on whether a buffer was passed in or not.
11064 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11065 (struct regcache): New `register_status' field.
11066 (supply_register_zeroed): Declare.
11067 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11068 supply_register_zeroed, rather than passing a NULL buffer to
11069 supply_register.
11070 * tracepoint.c (fetch_traceframe_registers): Update comment.
11071
110722011-01-28 Pedro Alves <pedro@codesourcery.com>
11073
11074 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11075 buffer explicit.
11076
110772011-01-25 Pedro Alves <pedro@codesourcery.com>
11078
11079 * server.h (decode_xfer_write): Change prototype.
11080 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11081 and don't extract the annex here.
11082 * server.c (decode_xfer_read): Remove `annex' parameter,
11083 and don't extract the annex here.
11084 (decode_xfer): New.
11085 (struct qxfer): New.
11086 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11087 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11088 (handle_qxfer_statictrace): New functions, abstracted out from
11089 handle_query, and made to use the struct qxfer interface.
11090 (handle_threads_qxfer_proper): Rename to ...
11091 (handle_qxfer_threads_proper): ... this.
11092 (handle_threads_qxfer): Rename to ...
11093 (handle_qxfer_threads): ... this. Adjust.
11094 (qxfer_packets): New array.
11095 (handle_qxfer): New function.
11096 (handle_query): Use handle_qxfer.
11097
110982011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11099
11100 * gdbreplay.c: Shorten lines of >= 80 columns.
11101 * linux-low.c: Ditto.
11102 * linux-ppc-low.c: Ditto.
11103 * linux-s390-low.c: Ditto.
11104 * linux-sparc-low.c: Ditto.
11105 * linux-x86-low.c: Ditto.
11106 * linux-xtensa-low.c: Ditto.
11107 * mem-break.c: Ditto.
11108 * nto-low.c: Ditto.
11109 * regcache.h: Ditto.
11110 * remote-utils.c: Ditto.
11111 * server.c: Ditto.
11112 * server.h: Ditto.
11113 * thread-db.c: Ditto.
11114 * tracepoint.c: Ditto.
11115 * utils.c: Ditto.
11116 * win32-low.h: Ditto.
11117
111182011-01-05 Joel Brobecker <brobecker@adacore.com>
11119
11120 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11121 update.
11122
111232011-01-01 Joel Brobecker <brobecker@adacore.com>
11124
11125 * server.c (gdbserver_version): Update copyright year in version
11126 output.
11127 * gdbreplay.c (gdbreplay_version): Ditto.
11128
111292010-12-29 Jie Zhang <jie.zhang@analog.com>
11130
11131 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11132 * linux-bfin-low.c: New file.
11133 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11134 PT_DATA_ADDR for BFIN targets.
11135 * Makefile.in (SFILES): Add linux-bfin-low.c.
11136 (clean): Remove reg-bfin.c.
11137 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11138 * README: Mention supported Blackfin targets.
11139
111402010-12-23 Mike Frysinger <vapier@gentoo.org>
11141
11142 * .gitignore: New file.
11143
111442010-11-16 Mike Frysinger <vapier@gentoo.org>
11145
11146 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11147
111482010-10-22 Jie Zhang <jie@codesourcery.com>
11149
11150 * Makefile.in: Add FLAGS_TO_PASS variable.
11151 (install): Remove dependency of install-only and recursively
11152 invoke make for install-only.
11153
111542010-10-04 Doug Evans <dje@google.com>
11155
11156 * Makefile.in (uninstall): Use $(DESTDIR).
11157
111582010-09-24 Pedro Alves <pedro@codesourcery.com>
11159
11160 PR gdb/11842
11161
11162 * linux-x86-low.c (compat_siginfo_from_siginfo)
11163 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11164 si_code is < 0. Check for si_code == SI_TIMER before checking for
11165 si_code < 0.
11166
111672010-09-13 Joel Brobecker <brobecker@adacore.com>
11168
11169 * lynx-i386-low.c: New file.
11170 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11171
111722010-09-13 Joel Brobecker <brobecker@adacore.com>
11173
11174 * lynx-low.c (ptrace_request_to_str): Remove handling for
11175 request values that have been removed in LynxOS 5.x.
11176
111772010-09-13 Joel Brobecker <brobecker@adacore.com>
11178
11179 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11180 <ptrace.h>
11181
111822010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11183
11184 * configure.ac: Add --enable-inprocess-agent option.
11185 * configure: Rebuilt.
11186
111872010-09-06 Yao Qi <yao@codesourcery.com>
11188
11189 * linux-low.c (linux_kill): Remove unused variable.
11190 (linux_stabilize_threads): Likewise.
11191 * server.c (start_inferior): Likewise.
11192 (queue_stop_reply_callback): Likewise.
11193 * tracepoint.c (do_action_at_tracepoint): Likewise.
11194
111952010-09-06 Yao Qi <yao@codesourcery.com>
11196
11197 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11198 on return.
11199
112002010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11201
11202 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11203
112042010-09-06 Pedro Alves <pedro@codesourcery.com>
11205
11206 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11207 "$(IPA_DEPFILES)".
11208
112092010-09-01 Joel Brobecker <brobecker@adacore.com>
11210
11211 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11212 gdbserver/lynx-ppc-low.c: New files.
11213 * Makefile.in (lynx_low_h): New variable.
11214 (lynx-low.o, lynx-ppc-low.o): New rules.
11215 * configure.ac: On LynxOS, link with -lnetinet.
11216 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11217 * configure: regenerate.
11218
112192010-09-01 Joel Brobecker <brobecker@adacore.com>
11220
11221 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11222 * configure.ac: Add check for vasprintf and vsnprintf.
11223 * configure, config.in: Regenerate.
11224 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11225
112262010-09-01 Joel Brobecker <brobecker@adacore.com>
11227
11228 * gdbreplay.c: Move include of alloca.h up, next to include of
11229 malloc.h.
11230 * server.h: Add include of malloc.h.
11231 * mem-break.c: Remove include of malloc.h.
11232 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11233
112342010-09-01 Joel Brobecker <brobecker@adacore.com>
11235
11236 * Makefile.in (memmem.o): Build with -Wno-error.
11237
112382010-09-01 Joel Brobecker <brobecker@adacore.com>
11239
11240 * utils.c (xsnprintf): Make non-static.
11241 * server.h: Add xsnprintf declaration.
11242 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11243 replace calls to snprintf by calls to xsnprintf throughout.
11244
112452010-09-01 Joel Brobecker <brobecker@adacore.com>
11246
11247 * configure.ac: Add configure check for alloca.
11248 * configure, config.in: Regenerate.
11249 * server.h: Include alloca.h if it exists.
11250 * gdbreplay.c: Include alloca.h if it exists.
11251
112522010-08-28 Pedro Alves <pedro@codesourcery.com>
11253
11254 * linux-low.c (__SIGRTMIN): Define if not already defined.
11255 (linux_create_inferior): Check for __ANDROID__ rather than
11256 __SIGRTMIN.
11257 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11258 are already deferred.
11259 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11260 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11261 stopped and already has a pending signal to report.
11262 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11263 a pending signal to report or is moving out of a jump pad.
11264 (linux_init_signals): Check for __ANDROID__ rather than
11265 __SIGRTMIN.
11266
112672010-08-28 Pedro Alves <pedro@codesourcery.com>
11268
11269 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11270 debug_threads check. Avoid a linear search when not doing debug
11271 output.
11272
112732010-08-27 Pedro Alves <pedro@codesourcery.com>
11274
11275 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11276 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11277 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11278 (process_event): Change local fd's type to gdb_fildes_t.
11279 (create_file_handler): Adjust prototype.
11280 (delete_file_handler): Adjust prototype.
11281 (handle_file_event): Adjust prototype. Use pfildes.
11282 (create_file_event): Adjsut prototype.
11283 * remote-utils.c (remote_desc, listen_desc): Change type to
11284 gdb_fildes_t.
11285 * server.h: New gdb_fildes_t typedef.
11286 [USE_WIN32API]: Include winsock2.h.
11287 (delete_file_handler, add_file_handler): Adjust prototypes.
11288 (pfildes): Declare.
11289 * utils.c (pfildes): New.
11290
112912010-08-27 Pedro Alves <pedro@codesourcery.com>
11292
11293 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11294 * configure: Regenerate.
11295
112962010-08-27 Pedro Alves <pedro@codesourcery.com>
11297
11298 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11299 (linux_done_accessing_memory): ... this.
11300 (linux_target_ops): Adjust.
11301 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11302 * nto-low.c (nto_target_ops): Adjust comment.
11303 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11304 * spu-low.c (spu_target_ops): Adjust comment.
11305 * target.h (target_ops): Rename unprepare_to_access_memory field
11306 to done_accessing_memory.
11307 (unprepare_to_access_memory): Rename to ...
11308 (done_accessing_memory): ... this.
11309
113102010-08-26 Pedro Alves <pedro@codesourcery.com>
11311
11312 * linux-low.c (linux_prepare_to_access_memory): New.
11313 (linux_unprepare_to_access_memory): New.
11314 (linux_target_ops): Install them.
11315 * server.c (read_memory): Rename to ...
11316 (gdb_read_memory): ... this. Use
11317 prepare_to_access_memory/prepare_to_access_memory.
11318 (write_memory): Rename to ...
11319 (gdb_write_memory): ... this. Use
11320 prepare_to_access_memory/prepare_to_access_memory.
11321 (handle_search_memory_1): Adjust.
11322 (process_serial_event): Adjust.
11323 * target.h (struct target_ops): New fields
11324 prepare_to_access_memory and unprepare_to_access_memory.
11325 (prepare_to_access_memory, unprepare_to_access_memory): New.
11326 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11327 prepare_to_access_memory/prepare_to_access_memory.
11328 * nto-low.c (nto_target_ops): Adjust.
11329 * spu-low.c (spu_target_ops): Adjust.
11330 * win32-low.c (win32_target_ops): Adjust.
11331
113322010-08-26 Pedro Alves <pedro@codesourcery.com>
11333
11334 * Makefile.in (WARN_CFLAGS): Get it from configure.
11335 (WERROR_CFLAGS): New.
11336 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11337 * configure.ac: Introduce --enable-werror, which adds -Werror to
11338 the compiler command line. Enabled by default. Disable with
11339 --disable-werror. Add -Wdeclaration-after-statement
11340 Wpointer-arith and -Wformat-nonliteral to warning flags.
11341 * configure: Regenerate.
11342
113432010-08-26 Pedro Alves <pedro@codesourcery.com>
11344
11345 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11346
113472010-08-26 Pedro Alves <pedro@codesourcery.com>
11348
11349 * gdbreplay.c (remote_error): New.
11350 (gdbchar): New.
11351 (expect): Use gdbchar. Check for error reading from GDB.
11352 Clarify sync error output.
11353 (play): Check for errors writing to GDB.
11354 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11355 * remote-utils.c (getpkt): Check for errors writing to the remote
11356 descriptor.
11357
113582010-08-25 Pedro Alves <pedro@codesourcery.com>
11359
11360 * linux-low.c (linux_wait_1): Move non-debugging code out of
11361 `debug_threads' control.
11362
113632010-08-25 Pedro Alves <pedro@codesourcery.com>
11364
11365 * linux-low.c (linux_wait_1): Don't set last_status here.
11366 * server.c (push_event, queue_stop_reply_callback): Assert we're
11367 not pushing a TARGET_WAITKIND_IGNORE event.
11368 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11369 (myresume, handle_target_event): Set the thread's last_resume_kind
11370 and last_status from the target returned status.
11371
113722010-08-25 Pedro Alves <pedro@codesourcery.com>
11373
11374 PR threads/10729
11375
11376 * linux-x86-low.c (update_debug_registers_callback): New.
11377 (i386_dr_low_set_addr): Use it.
11378 (i386_dr_low_get_addr): New.
11379 (i386_dr_low_set_control): Use update_debug_registers_callback.
11380 (i386_dr_low_get_control): New.
11381 (i386_dr_low_get_status): Adjust.
11382 * linux-low.c (linux_stop_lwp): New.
11383 * linux-low.h (linux_stop_lwp): Declare.
11384
11385 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11386 argument instead of a i386_debug_reg_state.
11387 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11388 a i386_debug_reg_state.
11389 (i386_insert_aligned_watchpoint): Adjust.
11390 (i386_remove_aligned_watchpoint): Adjust.
11391 (i386_low_stopped_data_address): Read the debug registers from the
11392 inferior instead of from the mirrors.
11393 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11394 (i386_dr_low_get_addr): Declare.
11395 (i386_dr_low_get_control): Declare.
11396 (i386_dr_low_get_status): Change prototype.
11397
11398 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11399 (i386_dr_low_get_addr): New.
11400 (i386_dr_low_get_control): New.
11401 (i386_dr_low_get_status): Adjust prototype. Return
11402 dr_status_mirror.
11403 (i386_initial_stuff): Clear dr_status_mirror and
11404 dr_control_mirror.
11405 (i386_get_thread_context): Adjust.
11406 (i386_set_thread_context): Adjust.
11407 (i386_thread_added): Adjust.
11408
114092010-08-24 Pedro Alves <pedro@codesourcery.com>
11410
11411 * linux-low.h (linux_thread_area): Delete declaration.
11412
114132010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11414
11415 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11416 after its termination.
11417
114182010-08-09 Pedro Alves <pedro@codesourcery.com>
11419
11420 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11421 (gdb_wants_all_stopped): Delete.
11422 (linux_wait_1): Don't call them.
11423 * server.c (handle_v_cont): Tag all threads as want-stopped.
11424 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11425 stopped as "client-wants-stopped".
11426
114272010-07-31 Pedro Alves <pedro@codesourcery.com>
11428
11429 * Makefile.in (signals_h): New.
11430 (server_h): Depend on it.
11431 (server.o): Don't depend on $(signals_def).
11432 (signals.o): Depend on $(signals_def).
11433
114342010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11435
11436 * Makefile.in (signals_def): New.
11437 (server_h): Append include/gdb/signals.h and signals_def.
11438 (server.o): Append signals_def.
11439
114402010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11441
11442 * server.c (handle_target_event): Use target_signal_to_host for
11443 resume_info.sig initialization.
11444 * target.h (struct thread_resume) <sig>: New comment.
11445
114462010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11447
11448 * server.c (handle_query): strcpy() the returned string from paddress()
11449 instead of sprintf().
11450 * utils.c (paddress): Return phex_nz().
11451
114522010-07-07 Joel Brobecker <brobecker@adacore.com>
11453
11454 * server.c (handle_v_cont): Call mourn_inferior if process
11455 just exited.
11456 (myresume): Likewise.
11457
114582010-07-01 Pedro Alves <pedro@codesourcery.com>
11459
11460 Static tracepoints, and integration with UST.
11461
11462 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11463 * mem-break.c (uninsert_all_breakpoints)
11464 (reinsert_all_breakpoints): New.
11465 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11466 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11467 (gdb_agent_ust_loaded, helper_thread_id)
11468 (gdb_agent_helper_thread_id): New macros.
11469 (struct ipa_sym_addresses): Add addr_ust_loaded,
11470 addr_helper_thread_id, addr_cmd_buf.
11471 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11472 (in_process_agent_loaded_ust): New.
11473 (write_e_ust_not_loaded): New.
11474 (maybe_write_ipa_ust_not_loaded): New.
11475 (struct collect_static_trace_data_action): New.
11476 (enum tracepoint_type) <static_tracepoint>: New.
11477 (struct tracepoint) <handle>: Mention static tracepoints.
11478 (struct static_tracepoint_ctx): New.
11479 (CMD_BUF_SIZE): New.
11480 (add_tracepoint_action): Handle static tracepoint actions.
11481 (unprobe_marker_at): New.
11482 (clear_installed_tracepoints): Handle static tracepoints.
11483 (cmd_qtdp): Handle static tracepoints.
11484 (probe_marker_at): New.
11485 (cmd_qtstart): Handle static tracepoints.
11486 (response_tracepoint): Handle static tracepoints.
11487 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11488 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11489 (get_context_regcache): Handle static tracepoints.
11490 (do_action_at_tracepoint): Handle static tracepoint actions.
11491 (traceframe_find_block_type): Handle static trace data blocks.
11492 (traceframe_read_sdata): New.
11493 (download_tracepoints): Download static tracepoint actions.
11494 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11495 (GDB_PROBE_NAME): New.
11496 (ust_ops): New.
11497 (GET_UST_SYM): New.
11498 (USTF): New.
11499 (dlsym_ust): New.
11500 (ust_marker_to_static_tracepoint): New.
11501 (gdb_probe): New.
11502 (collect_ust_data_at_tracepoint): New.
11503 (gdb_ust_probe): New.
11504 (UNIX_PATH_MAX, SOCK_DIR): New.
11505 (gdb_ust_connect_sync_socket): New.
11506 (resume_thread, stop_thread): New.
11507 (run_inferior_command): New.
11508 (init_named_socket): New.
11509 (gdb_ust_socket_init): New.
11510 (cstr_to_hexstr): New.
11511 (next_st): New.
11512 (first_marker, next_marker): New.
11513 (response_ust_marker): New.
11514 (cmd_qtfstm, cmd_qtsstm): New.
11515 (unprobe_marker_at, probe_marker_at): New.
11516 (cmd_qtstmat, gdb_ust_thread): New.
11517 (gdb_ust_init): New.
11518 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11519 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11520 (ST_REGENTRY): New.
11521 (x86_64_st_collect_regmap): New.
11522 (X86_64_NUM_ST_COLLECT_GREGS): New.
11523 (AMD64_RIP_REGNUM): New.
11524 (supply_static_tracepoint_registers): New.
11525 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11526 (ST_REGENTRY): New.
11527 (i386_st_collect_regmap): New.
11528 (i386_NUM_ST_COLLECT_GREGS): New.
11529 (supply_static_tracepoint_registers): New.
11530 * server.c (handle_query): Handle qXfer:statictrace:read.
11531 <qSupported>: Report support for StaticTracepoints, and
11532 qXfer:statictrace:read features.
11533 * server.h (traceframe_read_sdata)
11534 (supply_static_tracepoint_registers): Declare.
11535 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11536 (unpack_varlen_hex): Include in IPA build.
11537 * Makefile.in (ustlibs, ustinc): New.
11538 (IPA_OBJS): Add remote-utils-ipa.o.
11539 ($(IPA_LIB)): Link -ldl and -lpthread.
11540 (UST_CFLAGS): New.
11541 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11542 * config.in, configure: Regenerate.
11543
115442010-06-20 Ian Lance Taylor <iant@google.com>
11545 Pedro Alves <pedro@codesourcery.com>
11546
11547 * linux-x86-low.c (always_true): Delete.
11548 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11549 trying to fool the compiler with always_true.
11550
115512010-06-20 Pedro Alves <pedro@codesourcery.com>
11552
11553 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11554 conditions in gdbserver.
11555
115562010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11557
11558 * spu-low.c (spu_read_memory): Wrap around local store limit.
11559 (spu_write_memory): Likewise.
11560
115612010-06-15 Pedro Alves <pedro@codesourcery.com>
11562
11563 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11564 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11565 LONGEST uses.
11566 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11567 uses.
11568 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11569 uses with LONGEST uses.
11570
115712010-06-14 Stan Shebs <stan@codesourcery.com>
11572 Pedro Alves <pedro@codesourcery.com>
11573
11574 Bytecode compiler.
11575
11576 * linux-x86-low.c: Include limits.h.
11577 (add_insns): New.
11578 (always_true): New.
11579 (EMIT_ASM): New.
11580 (EMIT_ASM32): New.
11581 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11582 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11583 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11584 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11585 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11586 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11587 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11588 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11589 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11590 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11591 (amd64_emit_void_call_2): New.
11592 (amd64_emit_ops): New.
11593 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11594 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11595 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11596 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11597 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11598 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11599 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11600 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11601 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11602 (i386_emit_stack_adjust, i386_emit_int_call_1)
11603 (i386_emit_void_call_2): New.
11604 (i386_emit_ops): New.
11605 (x86_emit_ops): New.
11606 (the_low_target): Install x86_emit_ops.
11607 * server.h (struct emit_ops): New.
11608 (get_raw_reg_func_addr): Declare.
11609 (current_insn_ptr, emit_error): Declare.
11610 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11611 (set_trace_state_variable_value): New defines.
11612 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11613 addr_get_trace_state_variable_value and
11614 addr_set_trace_state_variable_value.
11615 (symbol_list): New fields for get_raw_reg,
11616 get_trace_state_variable_value and set_trace_state_variable_value.
11617 (condfn): New typedef.
11618 (struct tracepoint): New field `compiled_cond'.
11619 (do_action_at_tracepoint): Clear compiled_cond.
11620 (get_trace_state_variable_value, set_trace_state_variable_value):
11621 Export in the IPA.
11622 (condition_true_at_tracepoint): If there's a compiled condition,
11623 run that.
11624 (current_insn_ptr, emit_error): New globals.
11625 (struct bytecode_address): New.
11626 (get_raw_reg_func_addr): New.
11627 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11628 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11629 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11630 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11631 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11632 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11633 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11634 (compile_tracepoint_condition, compile_bytecodes): New.
11635 * target.h (emit_ops): Forward declare.
11636 (struct target_ops): New field emit_ops.
11637 (target_emit_ops): New.
11638 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11639 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11640 * linux-low.c (linux_emit_ops): New.
11641 (linux_target_ops): Install it.
11642 * linux-low.h (struct linux_target_ops): New field emit_ops.
11643
116442010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11645
11646 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11647 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11648
116492010-06-01 Pedro Alves <pedro@codesourcery.com>
11650 Stan Shebs <stan@codesourcery.com>
11651
11652 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11653 (all): Depend on $(extra_libraries).
11654 (install-only): Install the IPA.
11655 (IPA_OBJS, IPA_LIB): New.
11656 (clean): Remove the IPA lib.
11657 (IPAGENT_CFLAGS): New.
11658 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11659 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11660 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11661 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11662 * configure.ac: Check for atomic builtins support in the compiler.
11663 (IPA_DEPFILES, extra_libraries): Define.
11664 * configure.srv (ipa_obj): Add description.
11665 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11666 (i[34567]86-*-linux*): Set ipa_obj.
11667 (x86_64-*-linux*): Set ipa_obj.
11668 * linux-low.c (stabilizing_threads): New.
11669 (supports_fast_tracepoints): New.
11670 (linux_detach): Stabilize threads before detaching.
11671 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11672 the lwp is either not stabilizing, or is moving out of a jump pad.
11673 (linux_fast_tracepoint_collecting): New.
11674 (maybe_move_out_of_jump_pad): New.
11675 (enqueue_one_deferred_signal): New.
11676 (dequeue_one_deferred_signal): New.
11677 (linux_wait_for_event_1): If moving out of a jump pad, defer
11678 pending signals to later.
11679 (linux_stabilize_threads): New.
11680 (linux_wait_1): Check if threads need moving out of jump pads, and
11681 do it if so.
11682 (stuck_in_jump_pad_callback): New.
11683 (move_out_of_jump_pad_callback): New.
11684 (lwp_running): New.
11685 (linux_resume_one_lwp): Handle moving out of jump pads.
11686 (linux_set_resume_request): Dequeue deferred signals.
11687 (need_step_over_p): Also step over fast tracepoint jumps.
11688 (start_step_over): Also uninsert fast tracepoint jumps.
11689 (finish_step_over): Also reinsert fast tracepoint jumps.
11690 (linux_install_fast_tracepoint_jump): New.
11691 (linux_target_ops): Install linux_stabilize_threads and
11692 linux_install_fast_tracepoint_jump_pad.
11693 * linux-low.h (linux_target_ops) <get_thread_area,
11694 install_fast_tracepoint_jump_pad>: New fields.
11695 (struct lwp_info) <collecting_fast_tracepoint,
11696 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11697 (linux_get_thread_area): Declare.
11698 * linux-x86-low.c (jump_insn): New.
11699 (x86_get_thread_area): New.
11700 (append_insns): New.
11701 (push_opcode): New.
11702 (amd64_install_fast_tracepoint_jump_pad): New.
11703 (i386_install_fast_tracepoint_jump_pad): New.
11704 (x86_install_fast_tracepoint_jump_pad): New.
11705 (the_low_target): Install x86_get_thread_area and
11706 x86_install_fast_tracepoint_jump_pad.
11707 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11708 (struct fast_tracepoint_jump): New.
11709 (fast_tracepoint_jump_insn): New.
11710 (fast_tracepoint_jump_shadow): New.
11711 (find_fast_tracepoint_jump_at): New.
11712 (fast_tracepoint_jump_here): New.
11713 (delete_fast_tracepoint_jump): New.
11714 (set_fast_tracepoint_jump): New.
11715 (uninsert_fast_tracepoint_jumps_at): New.
11716 (reinsert_fast_tracepoint_jumps_at): New.
11717 (set_breakpoint_at): Use write_inferior_memory.
11718 (uninsert_raw_breakpoint): Use write_inferior_memory.
11719 (check_mem_read): Mask out fast tracepoint jumps.
11720 (check_mem_write): Mask out fast tracepoint jumps.
11721 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11722 (set_fast_tracepoint_jump): Declare.
11723 (delete_fast_tracepoint_jump)
11724 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11725 (reinsert_fast_tracepoint_jumps_at): Declare.
11726 * regcache.c: Don't compile many functions when building the
11727 in-process agent library.
11728 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11729 the register buffer in the heap.
11730 (free_register_cache): If the register buffer isn't owned by the
11731 regcache, don't free it.
11732 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11733 pre-existing register caches.
11734 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11735 type.
11736 (convert_ascii_to_int): : Constify `from' parameter type.
11737 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11738 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11739 the needed buffer in-place.
11740 (relocate_instruction): New.
11741 * server.c (handle_query) <qSymbols>: If the target supports
11742 tracepoints, give it a chance of looking up symbols. Report
11743 support for fast tracepoints.
11744 (handle_status): Stabilize threads.
11745 (process_serial_event): Adjust.
11746 * server.h (struct fast_tracepoint_jump): Forward declare.
11747 (struct process_info) <fast_tracepoint_jumps>: New field.
11748 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11749 (decode_X_packet, decode_M_packet): Adjust.
11750 (relocate_instruction): Declare.
11751 (in_process_agent_loaded): Declare.
11752 (tracepoint_look_up_symbols): Declare.
11753 (struct fast_tpoint_collect_status): Declare.
11754 (fast_tracepoint_collecting): Declare.
11755 (force_unlock_trace_buffer): Declare.
11756 (handle_tracepoint_bkpts): Declare.
11757 (initialize_low_tracepoint)
11758 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11759 * target.h (struct target_ops) <stabilize_threads,
11760 install_fast_tracepoint_jump_pad>: New fields.
11761 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11762 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11763 [HAVE_STDINT_H]: Include stdint.h.
11764 (trace_debug_1): Rename to ...
11765 (trace_vdebug): ... this.
11766 (trace_debug): Rename to ...
11767 (trace_debug_1): ... this. Add `level' parameter.
11768 (trace_debug): New.
11769 (ATTR_USED, ATTR_NOINLINE): New.
11770 (IP_AGENT_EXPORT): New.
11771 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11772 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11773 (about_to_request_buffer_space, trace_buffer_is_full)
11774 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11775 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11776 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11777 (traceframe_write_count, traceframes_created)
11778 (trace_state_variables)
11779 New renaming defines.
11780 (struct ipa_sym_addresses): New.
11781 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11782 (symbol_list): New.
11783 (ipa_sym_addrs): New.
11784 (all_tracepoint_symbols_looked_up): New.
11785 (in_process_agent_loaded): New.
11786 (write_e_ipa_not_loaded): New.
11787 (maybe_write_ipa_not_loaded): New.
11788 (tracepoint_look_up_symbols): New.
11789 (debug_threads) [IN_PROCESS_AGENT]: New.
11790 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11791 (UNKNOWN_SIDE_EFFECTS): New.
11792 (stop_tracing): New.
11793 (flush_trace_buffer): New.
11794 (stop_tracing_bkpt): New.
11795 (flush_trace_buffer_bkpt): New.
11796 (read_inferior_integer): New.
11797 (read_inferior_uinteger): New.
11798 (read_inferior_data_pointer): New.
11799 (write_inferior_data_pointer): New.
11800 (write_inferior_integer): New.
11801 (write_inferior_uinteger): New.
11802 (struct collect_static_trace_data_action): Delete.
11803 (enum tracepoint_type): New.
11804 (struct tracepoint) <type>: New field `type'.
11805 <actions_str, step_actions, step_actions_str>: Only include in
11806 GDBserver.
11807 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11808 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11809 (tracepoints): Use IP_AGENT_EXPORT.
11810 (last_tracepoint): Don't include in the IPA.
11811 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11812 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11813 (alloced_trace_state_variables): New.
11814 (trace_state_variables): Use IP_AGENT_EXPORT.
11815 (traceframe_t): Delete unused variable.
11816 (circular_trace_buffer): Don't include in the IPA.
11817 (trace_buffer_start): Delete.
11818 (struct trace_buffer_control): New.
11819 (trace_buffer_free): Delete.
11820 (struct ipa_trace_buffer_control): New.
11821 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11822 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11823 New.
11824 (trace_buffer_ctrl): New.
11825 (TRACE_BUFFER_CTRL_CURR): New.
11826 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11827 Reimplement as macros.
11828 (trace_buffer_wrap): Delete.
11829 (traceframe_write_count, traceframe_read_count)
11830 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11831 (struct tracepoint_hit_ctx) <type>: New field.
11832 (struct fast_tracepoint_ctx): New.
11833 (memory_barrier): New.
11834 (cmpxchg): New.
11835 (record_tracepoint_error): Update atomically in the IPA.
11836 (clear_inferior_trace_buffer): New.
11837 (about_to_request_buffer_space): New.
11838 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11839 updating the same buffer.
11840 (add_tracepoint): Default the tracepoint's type to trap
11841 tracepoint, and orig_size to -1.
11842 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11843 internal variables.
11844 (create_trace_state_variable): New parameter `gdb'. Handle it.
11845 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11846 (cmd_qtdp): Handle fast tracepoints.
11847 (cmd_qtdv): Adjust.
11848 (max_jump_pad_size): New.
11849 (gdb_jump_pad_head): New.
11850 (get_jump_space_head): New.
11851 (claim_jump_space): New.
11852 (sort_tracepoints): New.
11853 (MAX_JUMP_SIZE): New.
11854 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11855 IPA.
11856 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11857 support. Upload fast traceframes, and delete internal IPA
11858 breakpoints.
11859 (stop_tracing_handler): New.
11860 (flush_trace_buffer_handler): New.
11861 (cmd_qtstop): Upload fast tracepoints.
11862 (response_tracepoint): Handle fast tracepoints.
11863 (tracepoint_finished_step): Upload fast traceframes. Set the
11864 tracepoint hit context's tracepoint type.
11865 (handle_tracepoint_bkpts): New.
11866 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11867 type. Add comment about fast tracepoints.
11868 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11869 non-existing action_str field.
11870 (get_context_regcache): Handle fast tracepoints.
11871 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11872 to the regcache.
11873 (fast_tracepoint_from_jump_pad_address): New.
11874 (fast_tracepoint_from_ipa_tpoint_address): New.
11875 (collecting_t): New.
11876 (force_unlock_trace_buffer): New.
11877 (fast_tracepoint_collecting): New.
11878 (collecting): New.
11879 (gdb_collect): New.
11880 (write_inferior_data_ptr): New.
11881 (target_tp_heap): New.
11882 (target_malloc): New.
11883 (download_agent_expr): New.
11884 (UALIGN): New.
11885 (download_tracepoints): New.
11886 (download_trace_state_variables): New.
11887 (upload_fast_traceframes): New.
11888 (IPA_FIRST_TRACEFRAME): New.
11889 (IPA_NEXT_TRACEFRAME_1): New.
11890 (IPA_NEXT_TRACEFRAME): New.
11891 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11892 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11893 (gdb_jump_pad_buffer_end): New.
11894 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11895 (initialize_tracepoint): Adjust.
11896 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11897 buffer. Initialize the low module.
11898 * utils.c (PREFIX, TOOLNAME): New.
11899 (malloc_failure): Use PREFIX.
11900 (error): In the IPA, an error causes an exit.
11901 (fatal, warning): Use PREFIX.
11902 (internal_error): Use TOOLNAME.
11903 (NUMCELLS): Increase to 10.
11904 * configure, config.in: Regenerate.
11905
119062010-06-01 Pedro Alves <pedro@codesourcery.com>
11907
11908 * server.c (handle_query) <qSupported>: Do two passes over the
11909 qSupported string to avoid nesting strtok.
11910
119112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11912
11913 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11914 (CDEPS): New.
11915 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11916 -Wl,--dynamic-list.
11917 * configure: Regenerate.
11918 * proc-service.list: New.
11919
119202010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11921
11922 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11923 New comment.
11924
119252010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11926
11927 * gdbreplay.c (remote_open): Check error return from socket() call by
11928 its equality to -1 not by it being negative.
11929 * remote-utils.c (remote_open): Likewise.
11930
119312010-05-23 Pedro Alves <pedro@codesourcery.com>
11932
11933 * config.h: Regenerate.
11934
119352010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11936
11937 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11938 doesn't provide PTRACE_GET_THREAD_AREA.
11939
119402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11941
11942 * linux-m68k-low.c: Include <asm/ptrace.h>
11943 (ps_get_thread_area): Implement.
11944
119452010-05-03 Doug Evans <dje@google.com>
11946
11947 * event-loop.c (struct callback_event): New struct.
11948 (callback_list): New global.
11949 (append_callback_event, delete_callback_event): New functions.
11950 (process_callback): New function.
11951 (start_event_loop): Call it.
11952 * remote-utils.c (NOT_SCHEDULED): Define.
11953 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11954 moved out of readchar.
11955 (readchar): Rewrite. Call reschedule before returning.
11956 (reset_readchar): New function.
11957 (remote_close): Call it.
11958 (process_remaining, reschedule): New functions.
11959 * server.h (callback_handler_func): New typedef.
11960 (append_callback_event, delete_callback_event): Declare.
11961
119622010-05-03 Pedro Alves <pedro@codesourcery.com>
11963
11964 * proc-service.c (ps_pglobal_lookup): Use
11965 thread_db_look_up_one_symbol.
11966 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11967 parameter. Use it instead of all_symbols_looked_up.
11968 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11969 field.
11970 (all_symbols_looked_up): Don't declare.
11971 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11972 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11973 field.
11974 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11975 Set all_symbols_looked_up here.
11976 (thread_db_look_up_one_symbol): New.
11977 (thread_db_get_tls_address): Adjust.
11978 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11979 thread_db object on the heap, and tentatively set it in the
11980 process structure.
11981 (thread_db_init): Don't set all_symbols_looked_up here.
11982 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11983
119842010-05-03 Pedro Alves <pedro@codesourcery.com>
11985
11986 * linux-low.c (linux_kill, linux_detach): Adjust.
11987 (status_pending_p_callback): Remove redundant statement. Check
11988 for !TARGET_WAITIKIND_IGNORE, instead of
11989 TARGET_WAITKIND_STOPPED.
11990 (handle_tracepoints): Make sure LWP is locked. Adjust.
11991 (linux_wait_for_event_1): Adjust.
11992 (linux_cancel_breakpoints): New.
11993 (unsuspend_one_lwp): New.
11994 (unsuspend_all_lwps): New.
11995 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11996 (send_sigstop_callback): Change return type to int, add new
11997 `except' parameter and handle it.
11998 (suspend_and_send_sigstop_callback): New.
11999 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12000 pass them down. If SUSPEND, also increment the lwp's suspend
12001 count.
12002 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12003 (need_step_over_p): Don't consider suspended LWPs.
12004 (start_step_over): Adjust.
12005 (proceed_one_lwp): Change return type to int, add new `except'
12006 parameter and handle it.
12007 (unsuspend_and_proceed_one_lwp): New.
12008 (proceed_all_lwps): Use find_inferior instead of
12009 for_each_inferior.
12010 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12011 also decrement the suspend count of LWPs. Pass `except' down,
12012 instead of hacking its suspend count.
12013 (linux_pause_all): Add `freeze' parameter. Adjust.
12014 (linux_unpause_all): New.
12015 (linux_target_ops): Install linux_unpause_all.
12016 * server.c (handle_status): Adjust.
12017 * target.h (struct target_ops): New fields `unpause_all' and
12018 `cancel_breakpoints'. Add new parameter to `pause_all'.
12019 (pause_all): Add new `freeze' parameter.
12020 (unpause_all): New.
12021 (cancel_breakpoints): New.
12022 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12023 cancel breakpoints.
12024 (cmd_qtstart): Pause threads.
12025 (stop_tracing): Pause threads, and cancel breakpoints.
12026 * win32-low.c (win32_target_ops): Adjust.
12027
120282010-05-03 Pedro Alves <pedro@codesourcery.com>
12029
12030 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12031 the inferior right away from here...
12032 (linux_wait_1): ... to here, and adjust to check the thread's
12033 last_resume_kind instead of the lwp's step or stop_expected flags.
12034
120352010-05-02 Pedro Alves <pedro@codesourcery.com>
12036
12037 * README: Use consistent `GDB' and `GDBserver' spellings.
12038
120392010-05-02 Pedro Alves <pedro@codesourcery.com>
12040
12041 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12042 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12043 (linux_detach_one_lwp): Assume the lwp is stopped.
12044 (any_thread_of): Delete.
12045 (linux_detach): Stop all lwps here. Don't blindly delete all
12046 breakpoints.
12047 (delete_lwp_callback): New.
12048 (linux_mourn): Delete all lwps of the process that is gone.
12049 (linux_wait_1): Don't delete the last lwp of the process here.
12050 * mem-break.h (mark_breakpoints_out): Declare.
12051 * mem-break.c (mark_breakpoints_out): New.
12052 (free_all_breakpoints): Use it.
12053 * server.c (handle_target_event): If the process is gone, mark
12054 breakpoints out.
12055 * thread-db.c (struct thread_db) <create_bp>: New field.
12056 (thread_db_enable_reporting): Fix prototype. Store a thread event
12057 breakpoint reference in the thread_db struct.
12058 (thread_db_load_search): Clear the thread_db object.
12059 (try_thread_db_load_1): Ditto.
12060 (switch_to_process): New.
12061 (disable_thread_event_reporting): Use it.
12062 (remove_thread_event_breakpoints): New.
12063 (thread_db_detach, thread_db_mourn): Use it.
12064
120652010-05-01 Pedro Alves <pedro@codesourcery.com>
12066
12067 * linux-low.c (linux_enable_event_reporting): New.
12068 (linux_wait_for_event_1, handle_extended_wait): Use it.
12069
120702010-04-30 Pedro Alves <pedro@codesourcery.com>
12071
12072 * linux-low.c (linux_kill_one_lwp, linux_kill)
12073 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12074 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12075 SIGSTOP even if the LWP is stopped.
12076 (send_sigstop_callback): New.
12077 (stop_all_lwps): Use send_sigstop_callback instead.
12078 (linux_resume_one_thread): Adjust.
12079 (proceed_one_lwp): Still proceed an LWP that the client has
12080 requested to stop, if we haven't reported it as stopped yet. Make
12081 sure that LWPs the client want stopped, have a pending SIGSTOP.
12082
120832010-04-26 Doug Evans <dje@google.com>
12084
12085 * server.c (handle_general_set): Make static.
12086
12087 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12088 Print received char after testing for error/eof instead of before.
12089 (input_interrupt): Tweak comment.
12090
120912010-04-23 Doug Evans <dje@google.com>
12092
12093 * server.c (start_inferior): Print inferior argv if --debug.
12094
120952010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12096
12097 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12098 * nto-x86-low.c: Include server.h
12099
121002010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12101
12102 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12103 be consistent with other sources of this directory.
12104 (init_registers_amd64): Correct name of source file of this function
12105 in the comment.
12106
121072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12108
12109 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12110 64-bit executables.
12111
121122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12113
12114 * win32-i386-low.c: Add 64-bit support.
12115 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12116 (init_registers_amd64): Declare.
12117 (mappings): Add 64-bit version of array.
12118 (init_windows_x86): New function.
12119 (the_low_target): Change init_arch field to init_windows_x86.
12120
121212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12122
12123 * win32-low.c: Adapt to support also 64-bit architecture.
12124 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12125 (get_image_name): Use SIZE_T type for local variable `done'.
12126 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12127 (toolhelp_get_dll_name): Idem.
12128 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12129 Use uintptr_t typecast to avoid warning.
12130 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12131 (handle_exception): Use phex_nz to avoid warning.
12132 (win32_wait): Remove unused local variable `process'.
12133
121342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12135
12136 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12137 `amd64-avx.o'.
12138
121392010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12140
12141 * configure.ac: Use `ws2_32' library for srv_mingw.
12142 * configure: Regenerate.
12143 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12144 * remote-utils.c: Likewise.
12145
121462010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12147
12148 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12149 if __x86_64__ is defined.
12150
121512010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12152
12153 * configure: Regenerate.
12154
121552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12156
12157 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12158 * target.h (target_ops): New get_tib_address field.
12159 * win32-low.h (win32_thread_info): Add thread_local_base field.
12160 * win32-low.c (child_add_thread): Add tlb argument.
12161 Set thread_local_base field to TLB.
12162 (get_child_debug_event): Adapt to child_add_thread change.
12163 (win32_get_tib_address): New function.
12164 (win32_target_ops): Set get_tib_address field to
12165 win32_get_tib_address.
12166 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12167
121682010-04-12 Pedro Alves <pedro@codesourcery.com>
12169
12170 * linux-low.c (linux_mourn): Also remove the process.
12171 * server.c (handle_target_event): Don't remove the process here.
12172 * nto-low.c (nto_mourn): New.
12173 (nto_target_ops): Install it.
12174 * spu-low.c (spu_mourn): New.
12175 (spu_target_ops): Install it.
12176 * win32-low.c (win32_mourn): New.
12177 (win32_target_ops): Install it.
12178
121792010-04-12 Pedro Alves <pedro@codesourcery.com>
12180
12181 * server.h (buffer_xml_printf): Remove redundant `;'.
12182
121832010-04-12 Pedro Alves <pedro@codesourcery.com>
12184
12185 * regcache.c (set_register_cache): Invalidate regcaches before
12186 changing the register cache layout.
12187 (regcache_invalidate_one): Allow a NULL regcache.
12188 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12189 regcaches before changing the register cache layout or the target
12190 regsets.
12191
121922010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12193
12194 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12195 variable warning on Linux/x86-64.
12196
121972010-04-11 Pedro Alves <pedro@codesourcery.com>
12198
12199 GDBserver disconnected tracing support.
12200
12201 * linux-low.c (linux_remove_process): Delete.
12202 (add_lwp): Don't set last_resume_kind here.
12203 (linux_kill): Use `mourn'.
12204 (linux_detach): Use `thread_db_detach', and `mourn'.
12205 (linux_mourn): New.
12206 (linux_attach_lwp_1): Adjust comment.
12207 (linux_attach): last_resume_kind moved the thread_info; adjust.
12208 (status_pending_p_callback): Adjust.
12209 (linux_wait_for_event_1): Adjust.
12210 (count_events_callback, select_singlestep_lwp_callback)
12211 (select_event_lwp_callback, cancel_breakpoints_callback)
12212 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12213 (proceed_one_lwp): Adjust.
12214 (linux_async): Add debug output.
12215 (linux_thread_stopped): New.
12216 (linux_pause_all): New.
12217 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12218 linux_pause_all.
12219 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12220 (thread_db_free): Delete declaration.
12221 (thread_db_detach, thread_db_mourn): Declare.
12222 * thread-db.c (thread_db_init): Use thread_db_mourn.
12223 (thread_db_free): Delete, split in two.
12224 (disable_thread_event_reporting): New.
12225 (thread_db_detach): New.
12226 (thread_db_mourn): New.
12227
12228 * server.h (struct thread_info) <last_resume_kind>: New field.
12229 <attached>: Add comment.
12230 <gdb_detached>: New field.
12231 (handler_func): Change return type to int.
12232 (handle_serial_event, handle_target_event): Ditto.
12233 (gdb_connected): Declare.
12234 (tracing): Delete.
12235 (disconnected_tracing): Declare.
12236 (stop_tracing): Declare.
12237
12238 * server.c (handle_query) <qSupported>: Report support for
12239 disconnected tracing.
12240 (queue_stop_reply_callback): Account for running threads.
12241 (gdb_wants_thread_stopped): New.
12242 (gdb_wants_all_threads_stopped): New.
12243 (gdb_reattached_process): New.
12244 (handle_status): Clear the `gdb_detached' flag of all processes.
12245 In all-stop, stop all threads.
12246 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12247 (process_serial_event): If the remote connection breaks, or if an
12248 exit was forced with "monitor exit", force an event loop exit.
12249 Handle disconnected tracing on detach.
12250 (handle_serial_event): Adjust.
12251 (handle_target_event): If GDB isn't connected, forward events back
12252 to the inferior, unless the last process exited, in which case,
12253 exit gdbserver. Adjust interface.
12254
12255 * remote-utils.c (remote_open): Don't block in accept. Instead
12256 register an event loop source on the listen socket file
12257 descriptor. Refactor bits into ...
12258 (listen_desc): ... this new global.
12259 (gdb_connected): ... this new function.
12260 (enable_async_notification): ... this new function.
12261 (handle_accept_event): ... this new function.
12262 (remote_close): Clear remote_desc.
12263
12264 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12265
12266 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12267 New fields.
12268 (mourn_inferior): Define.
12269 (target_process_qsupported): Avoid the dangling else problem.
12270 (thread_stopped): Define.
12271 (pause_all): Define.
12272 (target_waitstatus_to_string): Declare.
12273 * target.c (target_waitstatus_to_string): New.
12274
12275 * tracepoint.c (tracing): Make extern.
12276 (disconnected_tracing): New.
12277 (stop_tracing): Make extern. Handle tracing stops due to GDB
12278 disconnecting.
12279 (cmd_qtdisconnected): New.
12280 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12281 (handle_tracepoint_general_set): Handle QTDisconnected.
12282
12283 * event-loop.c (event_handler_func): Change return type to int.
12284 (process_event): Bail out if the event handler wants the event
12285 loop to stop.
12286 (handle_file_event): Ditto.
12287 (start_event_loop): Bail out if the event handler wants the event
12288 loop to stop.
12289
12290 * nto-low.c (nto_target_ops): Adjust.
12291 * spu-low.c (spu_wait): Don't remove the process here.
12292 (spu_target_ops): Adjust.
12293 * win32-low.c (win32_wait): Don't remove the process here.
12294 (win32_target_ops): Adjust.
12295
122962010-04-11 Pedro Alves <pedro@codesourcery.com>
12297
12298 * regcache.c (realloc_register_cache): Invalidate inferior's
12299 regcache before recreating it.
12300
123012010-04-09 Pedro Alves <pedro@codesourcery.com>
12302
12303 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12304
123052010-04-09 Stan Shebs <stan@codesourcery.com>
12306 Pedro Alves <pedro@codesourcery.com>
12307
12308 * server.h (LONGEST): New.
12309 (struct thread_info) <while_stepping>: New field.
12310 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12311 Declare.
12312 (initialize_tracepoint, handle_tracepoint_general_set)
12313 (handle_tracepoint_query, tracepoint_finished_step)
12314 (tracepoint_was_hit, release_while_stepping_state_list):
12315 (current_traceframe): Declare.
12316 * server.c (handle_general_set): Handle tracepoint packets.
12317 (read_memory): New.
12318 (write_memory): New.
12319 (handle_search_memory_1): Use read_memory.
12320 (handle_query): Report support for conditional tracepoints, trace
12321 state variables, and tracepoint sources. Handle tracepoint
12322 queries.
12323 (main): Initialize the tracepoints module.
12324 (process_serial_event): Handle traceframe reads/writes.
12325
12326 * linux-low.c (handle_tracepoints): New.
12327 (linux_wait_1): Call it.
12328 (linux_resume_one_lwp): Handle while-stepping.
12329 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12330 (linux_target_ops): Install them.
12331 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12332 New field.
12333 * linux-x86-low.c (x86_supports_tracepoints): New.
12334 (the_low_target). Install it.
12335
12336 * mem-break.h (delete_breakpoint): Declare.
12337 * mem-break.c (delete_breakpoint): Make external.
12338
12339 * target.h (struct target_ops): Add `supports_tracepoints',
12340 `read_pc', and `write_pc' fields.
12341 (target_supports_tracepoints): Define.
12342 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12343 (phex_nz): New.
12344
12345 * regcache.h (struct regcache) <registers_owned>: New field.
12346 (init_register_cache, regcache_cpy): Declare.
12347 (regcache_read_pc, regcache_write_pc): Declare.
12348 (register_cache_size): Declare.
12349 (supply_regblock): Declare.
12350 * regcache.c (init_register_cache): New.
12351 (new_register_cache): Use it.
12352 (regcache_cpy): New.
12353 (register_cache_size): New.
12354 (supply_regblock): New.
12355 (regcache_read_pc, regcache_write_pc): New.
12356
12357 * tracepoint.c: New.
12358
12359 * Makefile.in (OBS): Add tracepoint.o.
12360 (tracepoint.o): New rule.
12361
123622010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12363
12364 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12365 (i386-mmx.o): New.
12366 (i386-mmx.c): Likewise.
12367 (i386-mmx-linux.o): Likewise.
12368 (i386-mmx-linux.c): Likewise.
12369
12370 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12371 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12372 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12373 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12374
12375 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12376 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12377 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12378
123792010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12380
12381 * Makefile.in (clean): Updated.
12382 (i386-avx.o): New.
12383 (i386-avx.c): Likewise.
12384 (i386-avx-linux.o): Likewise.
12385 (i386-avx-linux.c): Likewise.
12386 (amd64-avx.o): Likewise.
12387 (amd64-avx.c): Likewise.
12388 (amd64-avx-linux.o): Likewise.
12389 (amd64-avx-linux.c): Likewise.
12390
12391 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12392 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12393 (srv_amd64_regobj): Add amd64-avx.o.
12394 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12395 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12396 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12397 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12398 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12399 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12400 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12401
12402 * i387-fp.c: Include "i386-xstate.h".
12403 (i387_xsave): New.
12404 (i387_cache_to_xsave): Likewise.
12405 (i387_xsave_to_cache): Likewise.
12406 (x86_xcr0): Likewise.
12407
12408 * i387-fp.h (i387_cache_to_xsave): Likewise.
12409 (i387_xsave_to_cache): Likewise.
12410 (x86_xcr0): Likewise.
12411
12412 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12413 * linux-crisv32-low.c (target_regsets): Likewise.
12414 * linux-m68k-low.c (target_regsets): Likewise.
12415 * linux-mips-low.c (target_regsets): Likewise.
12416 * linux-ppc-low.c (target_regsets): Likewise.
12417 * linux-s390-low.c (target_regsets): Likewise.
12418 * linux-sh-low.c (target_regsets): Likewise.
12419 * linux-sparc-low.c (target_regsets): Likewise.
12420 * linux-xtensa-low.c (target_regsets): Likewise.
12421
12422 * linux-low.c: Include <sys/uio.h>.
12423 (regsets_fetch_inferior_registers): Support nt_type.
12424 (regsets_store_inferior_registers): Likewise.
12425 (linux_process_qsupported): New.
12426 (linux_target_ops): Add linux_process_qsupported.
12427
12428 * linux-low.h (regset_info): Add nt_type.
12429 (linux_target_ops): Add process_qsupported.
12430
12431 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12432 and <sys/uio.h>.
12433 (init_registers_i386_avx_linux): New.
12434 (init_registers_amd64_avx_linux): Likewise.
12435 (xmltarget_i386_linux_no_xml): Likewise.
12436 (xmltarget_amd64_linux_no_xml): Likewise.
12437 (PTRACE_GETREGSET): Likewise.
12438 (PTRACE_SETREGSET): Likewise.
12439 (x86_fill_xstateregset): Likewise.
12440 (x86_store_xstateregset): Likewise.
12441 (use_xml): Likewise.
12442 (x86_linux_update_xmltarget): Likewise.
12443 (x86_linux_process_qsupported): Likewise.
12444 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12445 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12446 init_registers_i386_linux here. Call
12447 x86_linux_update_xmltarget.
12448 (the_low_target): Add x86_linux_process_qsupported.
12449
12450 * server.c (handle_query): Call target_process_qsupported.
12451
12452 * target.h (target_ops): Add process_qsupported.
12453 (target_process_qsupported): New.
12454
124552010-04-03 Pedro Alves <pedro@codesourcery.com>
12456
12457 * inferiors.c (add_thread): Set last_status kind to
12458 TARGET_WAITKIND_IGNORE.
12459 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12460 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12461 (linux_wait_1): Move `thread' local definition to block that uses
12462 it. Don't NULL initialize `event_child'.
12463 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12464 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12465 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12466
124672010-04-01 Pedro Alves <pedro@codesourcery.com>
12468
12469 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12470 an extended waitstatus, or by a watchpoint.
12471 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12472 thread was stepping or has been stopped by a watchpoint.
12473
124742010-04-01 Pedro Alves <pedro@codesourcery.com>
12475
12476 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12477 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12478 of another, then delete the previous, and validate all
12479 breakpoints.
12480 (validate_inserted_breakpoint): New.
12481 (delete_disabled_breakpoints): New.
12482 (validate_breakpoints): New.
12483 (check_mem_read): Validate breakpoints before trusting their
12484 shadow. Delete disabled breakpoints.
12485 (check_mem_write): Validate breakpoints before trusting they
12486 should be inserted. Delete disabled breakpoints.
12487 * mem-break.h (validate_breakpoints):
12488 * server.c (handle_query): Validate breakpoints when we see a
12489 qSymbol query.
12490
124912010-04-01 Pedro Alves <pedro@codesourcery.com>
12492
12493 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12494 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12495 if we could tell there's a GDB breakpoint at stop_pc.
12496 (need_step_over_p): Don't do a step over if we find a GDB
12497 breakpoint at the resume PC.
12498
12499 * mem-break.c (struct raw_breakpoint): New.
12500 (enum bkpt_type): New type `gdb_breakpoint'.
12501 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12502 fields. New field `raw'.
12503 (find_raw_breakpoint_at): New.
12504 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12505 breakpoint instead.
12506 (set_breakpoint_at): Adjust.
12507 (delete_raw_breakpoint): New.
12508 (release_breakpoint): New.
12509 (delete_breakpoint): Rename to...
12510 (delete_breakpoint_1): ... this. Add proc parameter. Use
12511 release_breakpoint. Return ENOENT.
12512 (delete_breakpoint): Reimplement.
12513 (find_breakpoint_at): Delete.
12514 (find_gdb_breakpoint_at): New.
12515 (delete_breakpoint_at): Delete.
12516 (set_gdb_breakpoint_at): New.
12517 (delete_gdb_breakpoint_at): New.
12518 (gdb_breakpoint_here): New.
12519 (set_reinsert_breakpoint): Use release_breakpoint.
12520 (uninsert_breakpoint): Rename to ...
12521 (uninsert_raw_breakpoint): ... this.
12522 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12523 (reinsert_raw_breakpoint): Change parameter type to
12524 raw_breakpoint.
12525 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12526 instead.
12527 (check_breakpoints): Adjust. Use release_breakpoint.
12528 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12529 (breakpoint_inserted_here): Ditto.
12530 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12531 Don't trust the breakpoint's shadow if it is not inserted.
12532 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12533 (delete_all_breakpoints): Adjust.
12534 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12535 use delete_breakpoint_1.
12536
12537 * mem-break.h (breakpoints_supported): Delete declaration.
12538 (set_gdb_breakpoint_at): Declare.
12539 (gdb_breakpoint_here): Declare.
12540 (delete_breakpoint_at): Delete.
12541 (delete_gdb_breakpoint_at): Declare.
12542
12543 * server.h (struct raw_breakpoint): Forward declare.
12544 (struct process_info): New field `raw_breakpoints'.
12545
12546 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12547 breakpoints.
12548
125492010-03-24 Pedro Alves <pedro@codesourcery.com>
12550
12551 * linux-low.c (status_pending_p_callback): Fix comment.
12552 (linux_wait_for_event_1): Move most of the internal breakpoint
12553 handling from here...
12554 (linux_wait_1): ... to here.
12555 (count_events_callback): New.
12556 (select_singlestep_lwp_callback): New.
12557 (select_event_lwp_callback): New.
12558 (cancel_breakpoints_callback): New.
12559 (select_event_lwp): New.
12560 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12561 priority to all LWPs that have had events that should be reported
12562 to the client. Cancel breakpoints when about to reporting the
12563 event to the client, not while stopping lwps. No longer cancel
12564 finished single-steps here.
12565 (cancel_finished_single_step): Delete.
12566 (cancel_finished_single_steps): Delete.
12567
125682010-03-24 Pedro Alves <pedro@codesourcery.com>
12569
12570 * mem-break.c (enum bkpt_type): New.
12571 (struct breakpoint): New field `type'.
12572 (set_breakpoint_at): Change return type to struct breakpoint
12573 pointer. Set type to `other_breakpoint' by default.
12574 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12575 in the breakpoint list.
12576 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12577 (reinsert_breakpoint): Rename to ...
12578 (reinsert_raw_breakpoint): ... this.
12579 (reinsert_breakpoints_at): Adjust.
12580 * mem-break.h (struct breakpoint): Declare.
12581 (set_breakpoint_at): Change return type to struct breakpoint
12582 pointer.
12583
125842010-03-24 Pedro Alves <pedro@codesourcery.com>
12585
12586 * server.c (handle_query): Assign, not compare.
12587
125882010-03-24 Pedro Alves <pedro@codesourcery.com>
12589
12590 Teach linux gdbserver to step-over-breakpoints.
12591
12592 * linux-low.c (can_hardware_single_step): New.
12593 (supports_breakpoints): New.
12594 (handle_extended_wait): If stopping threads, read the stop pc of
12595 the new cloned LWP.
12596 (get_pc): New.
12597 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12598 low target doesn't support retrieving the PC.
12599 (add_lwp): Set last_resume_kind to resume_continue.
12600 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12601 (linux_attach): Don't clear stop_expected. Set the lwp's
12602 last_resume_kind to resume_stop.
12603 (linux_detach_one_lwp): Don't check for removed breakpoints.
12604 (check_removed_breakpoint): Delete.
12605 (status_pending_p): Rename to ...
12606 (status_pending_p_callback): ... this. Don't check for removed
12607 breakpoints. Don't consider threads that are stopped from GDB's
12608 perspective.
12609 (linux_wait_for_lwp): Always read the stop_pc here.
12610 (cancel_breakpoint): New.
12611 (step_over_bkpt): New global.
12612 (linux_wait_for_event_1): Implement stepping over breakpoints.
12613 (gdb_wants_lwp_stopped): New.
12614 (gdb_wants_all_stopped): New.
12615 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12616 single-step traps here. Store the thread's last reported target
12617 wait status.
12618 (send_sigstop): Don't clear stop_expected. Always set it,
12619 instead.
12620 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12621 (cancel_finished_single_step): New.
12622 (cancel_finished_single_steps): New.
12623 (wait_for_sigstop): Don't cancel finished single-step traps here.
12624 (linux_resume_one_lwp): Don't check for removed breakpoints.
12625 Don't set `step' on non-hardware step archs.
12626 (linux_set_resume_request): Ignore resume_stop requests if already
12627 stopping or stopped. Set the lwp's last_resume_kind.
12628 (resume_status_pending_p): Don't check for removed breakpoints.
12629 (need_step_over_p): New.
12630 (start_step_over): New.
12631 (finish_step_over): New.
12632 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12633 requests. Clear the thread's last reported target waitstatus.
12634 Don't use the `suspended' flag. Don't consider pending breakpoints.
12635 (linux_resume): Start a step-over if necessary.
12636 (proceed_one_lwp): New.
12637 (proceed_all_lwps): New.
12638 (unstop_all_lwps): New.
12639 * linux-low.h (struct lwp_info): Rewrite comment for the
12640 `suspended' flag. Add the `stop_pc' field. Delete the
12641 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12642 Add `'last_resume_kind' and `need_step_over' fields.
12643 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12644 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12645 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12646 (set_raw_breakpoint_at): New.
12647 (set_breakpoint_at): Rewrite to use it.
12648 (reinsert_breakpoint_handler): Delete.
12649 (set_reinsert_breakpoint): New.
12650 (reinsert_breakpoint_by_bp): Delete.
12651 (delete_reinsert_breakpoints): New.
12652 (uninsert_breakpoint): Rewrite.
12653 (uninsert_breakpoints_at): New.
12654 (reinsert_breakpoint): Rewrite.
12655 (reinsert_breakpoints_at): New.
12656 (check_breakpoints): Rewrite.
12657 (breakpoint_here): New.
12658 (breakpoint_inserted_here): New.
12659 (check_mem_read): Adjust.
12660 * mem-break.h (breakpoints_supported, breakpoint_here)
12661 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12662 (reinsert_breakpoint_by_bp): Delete declaration.
12663 (delete_reinsert_breakpoints): Declare.
12664 (reinsert_breakpoint): Delete declaration.
12665 (reinsert_breakpoints_at): Declare.
12666 (uninsert_breakpoint): Delete declaration.
12667 (uninsert_breakpoints_at): Declare.
12668 (check_breakpoints): Adjust prototype.
12669 * server.h: Adjust include order.
12670 (struct thread_info): Declare here. Add a `last_status' field.
12671
126722010-03-23 Michael Snyder <msnyder@vmware.com>
12673
12674 * server.c (crc32): New function.
12675 (handle_query): Add handling for 'qCRC:' request.
12676
126772010-03-23 Pedro Alves <pedro@codesourcery.com>
12678
12679 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12680 lwp had been stopped by a watchpoint.
12681
126822010-03-16 Pedro Alves <pedro@codesourcery.com>
12683
12684 * server.h (internal_error): Declare.
12685 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12686 * utils.c (internal_error): New function.
12687
126882010-03-15 Andreas Schwab <schwab@redhat.com>
12689
12690 * configure.srv: Fix typo setting srv_regobj.
12691
126922010-03-15 Pedro Alves <pedro@codesourcery.com>
12693
12694 * linux-low.c (fetch_register): Avoid passing a non string literal
12695 format to `error'.
12696 (usr_store_inferior_registers): Ditto.
12697
126982010-03-14 Pedro Alves <pedro@codesourcery.com>
12699
12700 * linux-low.c (linux_write_memory): Bail out early if peeking
12701 memory failed.
12702
127032010-03-14 Pedro Alves <pedro@codesourcery.com>
12704
12705 * linux-low.h (struct lwp_info): New fields
12706 `stopped_by_watchpoint' and `stopped_data_address'.
12707 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12708 here, and cache them in the lwp object.
12709 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12710 directly.
12711 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12712 field.
12713 (linux_stopped_by_watchpoint): Rewrite.
12714 (linux_stopped_data_address): Rewrite.
12715
127162010-03-06 Simo Melenius <simo.melenius@iki.fi>
12717
12718 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12719 switching the current inferior, not before.
12720
127212010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12722
12723 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12724 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12725 i386-linux.c and amd64-linux.c.
12726 (reg-i386.o): Removed.
12727 (reg-i386.c): Likewise.
12728 (reg-i386-linux.o): Likewise.
12729 (reg-i386-linux.c): Likewise.
12730 (reg-x86-64.o): Likewise.
12731 (reg-x86-64.c): Likewise.
12732 (reg-x86-64-linux.o): Likewise.
12733 (reg-x86-64-linux.c): Likewise.
12734 (i386.o): New.
12735 (i386.c): Likewise.
12736 (i386-linux.o): Likewise.
12737 (i386-linux.c): Likewise.
12738 (amd64.o): Likewise.
12739 (amd64.c): Likewise.
12740 (amd64-linux.o): Likewise.
12741 (amd64-linux.c): Likewise.
12742
12743 * configure.srv (srv_i386_regobj): New.
12744 (srv_i386_linux_regobj): Likewise.
12745 (srv_amd64_regobj): Likewise.
12746 (srv_amd64_linux_regobj): Likewise.
12747 (srv_i386_32bit_xmlfiles): Likewise.
12748 (srv_i386_64bit_xmlfiles): Likewise.
12749 (srv_i386_xmlfiles): Likewise.
12750 (srv_amd64_xmlfiles): Likewise.
12751 (srv_i386_linux_xmlfiles): Likewise.
12752 (srv_amd64_linux_xmlfiles): Likewise.
12753 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12754 srv_xmlfiles to $srv_i386_xmlfiles.
12755 (i[34567]86-*-mingw32ce*): Likewise.
12756 (i[34567]86-*-mingw*): Likewise.
12757 (i[34567]86-*-nto*): Likewise.
12758 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12759 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12760 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12761 (x86_64-*-linux*): Likewise.
12762
12763 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12764 (init_registers_amd64_linux): New.
12765 (x86_arch_setup): Replace init_registers_x86_64_linux with
12766 init_registers_amd64_linux.
12767
127682010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12769
12770 * configure.ac: Check for libdl. If it is not available link against
12771 static libthread_db.
12772 * configure: Regenerate.
12773
127742010-02-22 Pedro Alves <pedro@codesourcery.com>
12775
12776 PR9605
12777
12778 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12779 handing a read watchpoint.
12780 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12781
127822010-02-12 Doug Evans <dje@google.com>
12783
12784 * linux-low.c (linux_supports_tracefork_flag): Document.
12785 (linux_look_up_symbols): Add comment.
12786
127872010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12788
12789 * regcache.c (supply_register): Clear regcache if buf is NULL.
12790
127912010-02-02 Nicolas Roche <roche@sourceware.org>
12792 Joel Brobecker <brobecker@adacore.com>
12793
12794 * inferiors.c (find_inferior): Add function documentation.
12795 (unloaded_dll): Handle the case where the unloaded dll has not
12796 been previously registered in the dll list.
12797
127982010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12799
12800 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12801 (thumb2_breakpoint): New.
12802 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12803
128042010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12805
12806 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12807 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12808 breakpoints.
12809
128102010-01-21 Pedro Alves <pedro@codesourcery.com>
12811
12812 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12813
128142010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12815
12816 * linux-s390-low.c (s390_collect_ptrace_register)
12817 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12818
128192010-01-21 Doug Evans <dje@google.com>
12820
12821 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12822 (PTRACE_ARG4_TYPE): New macro.
12823 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12824 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12825 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12826 (usr_store_inferior_registers): Ditto.
12827 (linux_read_memory, linux_write_memory): Ditto.
12828 (linux_test_for_tracefork): Ditto.
12829
12830 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12831 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12832
128332010-01-21 Pedro Alves <pedro@codesourcery.com>
12834
12835 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12836 target.
12837
128382010-01-21 Pedro Alves <pedro@codesourcery.com>
12839
12840 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12841 prototype to take a regcache. Adjust.
12842
128432010-01-20 Pedro Alves <pedro@codesourcery.com>
12844
12845 * regcache.h (struct thread_info): Forward declare.
12846 (struct regcache): New.
12847 (new_register_cache): Adjust prototype.
12848 (get_thread_regcache): Declare.
12849 (free_register_cache): Adjust prototype.
12850 (registers_to_string, registers_from_string): Ditto.
12851 (supply_register, supply_register_by_name, collect_register)
12852 (collect_register_as_string, collect_register_by_name): Ditto.
12853 * regcache.c (struct inferior_regcache_data): Delete.
12854 (get_regcache): Rename to ...
12855 (get_thread_regcache): ... this. Adjust. Switch inferior before
12856 fetching registers.
12857 (regcache_invalidate_one): Adjust.
12858 (regcache_invalidate): Fix prototype.
12859 (new_register_cache): Return the new register cache.
12860 (free_register_cache): Change prototype.
12861 (realloc_register_cache): Adjust.
12862 (registers_to_string): Change prototype to take a regcache. Adjust.
12863 (registers_from_string): Ditto.
12864 (register_data): Ditto.
12865 (supply_register): Ditto.
12866 (supply_register_by_name): Ditto.
12867 (collect_register): Ditto.
12868 (collect_register_as_string): Ditto.
12869 (collect_register_by_name): Ditto.
12870 * server.c (process_serial_event): Adjust.
12871 * linux-low.h (regset_fill_func, regset_store_func): Change
12872 prototype.
12873 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12874 Change prototype.
12875 * linux-low.c (get_stop_pc): Adjust.
12876 (check_removed_breakpoint): Adjust.
12877 (linux_wait_for_event): Adjust.
12878 (linux_resume_one_lwp): Adjust.
12879 (fetch_register): Add regcache parameter. Adjust.
12880 (usr_store_inferior_registers): Ditto.
12881 (regsets_fetch_inferior_registers): Ditto.
12882 (regsets_store_inferior_registers): Ditto.
12883 (linux_fetch_registers, linux_store_registers): Ditto.
12884 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12885 regcache. Adjust.
12886 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12887 Ditto.
12888 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12889 prototype to take a regcache.
12890 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12891 * remote-utils.c (convert_ascii_to_int, outreg)
12892 (prepare_resume_reply): Change prototype to take a regcache.
12893 Adjust.
12894 * target.h (struct target_ops) <fetch_registers, store_registers>:
12895 Change prototype to take a regcache.
12896 (fetch_inferior_registers, store_inferior_registers): Change
12897 prototype to take a regcache. Adjust.
12898 * proc-service.c (ps_lgetregs): Adjust.
12899 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12900 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12901 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12902 take a regcache. Adjust.
12903 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12904 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12905 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12906 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12907 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12908 (cris_cannot_fetch_register):
12909 (cris_breakpoint_at): Change prototype to take a regcache.
12910 Adjust.
12911 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12912 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12913 to take a regcache. Adjust.
12914 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12915 Adjust.
12916 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12917 take a regcache. Adjust.
12918 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12919 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12920 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12921 * linux-mips-low.c (mips_get_pc):
12922 (mips_set_pc): Change prototype to take a regcache. Adjust.
12923 (mips_reinsert_addr): Adjust.
12924 (mips_collect_register): Change prototype to take a regcache.
12925 Adjust.
12926 (mips_supply_register):
12927 (mips_collect_register_32bit, mips_supply_register_32bit)
12928 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12929 (mips_store_fpregset): Ditto.
12930 * linux-ppc-low.c (ppc_supply_ptrace_register)
12931 (ppc_supply_ptrace_register): Ditto.
12932 (parse_spufs_run): Adjust.
12933 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12934 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12935 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12936 take a regcache. Adjust.
12937 * linux-s390-low.c (s390_collect_ptrace_register)
12938 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12939 (s390_set_pc): Change prototype to take a regcache. Adjust.
12940 (s390_arch_setup): Adjust.
12941 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12942 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12943 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12944 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12945 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12946 regcache. Adjust.
12947 (sparc_breakpoint_at): Adjust.
12948 * linux-xtensa-low.c (xtensa_fill_gregset):
12949 (xtensa_store_gregset):
12950 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12951 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12952 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12953 prototype to take a regcache. Adjust.
12954 * win32-arm-low.c (arm_fetch_inferior_register)
12955 (arm_store_inferior_register): Change prototype to take a
12956 regcache. Adjust.
12957 * win32-i386-low.c (i386_fetch_inferior_register)
12958 (i386_store_inferior_register): Change prototype to take a
12959 regcache. Adjust.
12960 * win32-low.c (child_fetch_inferior_registers)
12961 (child_store_inferior_registers): Change prototype to take a
12962 regcache. Adjust.
12963 (win32_wait): Adjust.
12964 (win32_fetch_inferior_registers): Change prototype to take a
12965 regcache. Adjust.
12966 (win32_store_inferior_registers): Adjust.
12967 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12968 store_inferior_register>: Change prototype to take a regcache.
12969
129702010-01-20 Doug Evans <dje@google.com>
12971
12972 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12973 #ifdef.
12974 (linux_wait_for_event1, linux_init_signals): Ditto.
12975 (W_STOPCODE): Provide definition if missing.
12976
129772010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12978
12979 * linux-low.c (linux_core_of_thread): New.
12980 (compare_ints, show_process, list_threads): New.
12981 (linux_qxfer_osdata): Report threads and cores.
12982 (linux_target_op): Register linux_core_of_thread.
12983 * remote-utils.c (prepare_resume_reply): Report the core.
12984 (buffer_xml_printf): Support %d specifier.
12985 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12986 New.
12987 (handle_query): Handle qXfer:threads. Announce availability
12988 thereof.
12989 * target.h (struct target_ops): New field core_of_thread.
12990
129912010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12992
12993 * Makefile.in (clean): Remove new generated files.
12994 (reg-s390.o, reg-s390.c): Remove rules.
12995 (reg-s390x.o, reg-s390x.c): Likewise.
12996 (s390-linux32.o, s390-linux32.c): Add rules.
12997 (s390-linux64.o, s390-linux64.c): Likewise.
12998 (s390x-linux64.o, s390x-linux64.c): Likewise.
12999 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13000 * linux-s390-low.c: Include <elf.h>.
13001 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13002 (init_registers_s390): Remove prototype.
13003 (init_registers_s390x): Likewise.
13004 (init_registers_s390_linux32): Add prototype.
13005 (init_registers_s390_linux64): Likewise.
13006 (init_registers_s390x_linux64): Likewise.
13007 (s390_num_regs_3264): New define.
13008 (s390_regmap_3264): New global variable.
13009 (s390_cannot_fetch_register): Remove obsolete check.
13010 (s390_cannot_store_register): Likewise.
13011 (s390_collect_ptrace_register): Handle upper/lower register halves.
13012 (s390_supply_ptrace_register): Likewise.
13013 (s390_fill_gregset): Update to register number changes.
13014 (s390_get_hwcap): New routine.
13015 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13016 Install appropriate regmap and register set.
13017
130182010-01-01 Joel Brobecker <brobecker@adacore.com>
13019
13020 * server.c (gdbserver_version): Update copyright year to 2010.
13021 * gdbreplay.c (gdbreplay_version): Likewise.
13022
130232009-12-28 Doug Evans <dje@google.com>
13024
13025 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13026 elf/external.h. Include <elf.h> instead but only if necessary.
13027
130282009-12-28 Pedro Alves <pedro@codesourcery.com>
13029
13030 * linux-low.c (linux_remove_process): Remove `detaching'
13031 parameter. Don't release/detach from thread_db here.
13032 (linux_kill): Release/detach from thread_db here, ...
13033 (linux_detach): ... and here, before actually detaching.
13034 (linux_wait_1): ... and here, when a process exits.
13035 * thread-db.c (any_thread_of): New.
13036 (thread_db_free): Switch the current inferior to a thread of the
13037 passed in process.
13038
130392009-12-21 Doug Evans <dje@google.com>
13040
13041 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13042
13043 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13044 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13045 warning ifndef __NR_tkill. Move setting of errno there too.
13046 Delete unnecessary resetting of errno after syscall.
13047 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13048
13049 * configure.ac: Check for dladdr.
13050 * config.in: Regenerate.
13051 * configure: Regenerate.
13052 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13053 (try_thread_db_load): Update.
13054
13055 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13056
130572009-12-18 Doug Evans <dje@google.com>
13058
13059 * event-loop.c: Include unistd.h if it exists.
13060
13061 * linux-low.c (my_waitpid): Move definition away from being in
13062 between linux_tracefork_child/linux_test_for_tracefork.
13063
13064 * gdb_proc_service.h (psaddr_t): Fix type.
13065 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13066 signature to match glibc.
13067
130682009-12-16 Doug Evans <dje@google.com>
13069
13070 * linux-low.c (linux_read_memory): Fix argument to read.
13071
130722009-11-26 Pedro Alves <pedro@codesourcery.com>
13073
13074 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13075 events, don't leave current_inferior pointing at null.
13076
130772009-11-26 Pedro Alves <pedro@codesourcery.com>
13078
13079 * win32-low.c (LOG): Delete.
13080 (OUTMSG): Output to stderr.
13081 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13082 on compile time LOG macro.
13083 (win32_wait): Fix debug output.
13084
130852009-11-26 Pedro Alves <pedro@codesourcery.com>
13086
13087 * win32-low.c (win32_add_one_solib): If the dll name is
13088 "ntdll.dll", prepend the system directory to the dll path.
13089
130902009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13093
130942009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13095 Vladimir Prus <vladimir@codesourcery.com>
13096
13097 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13098 * configure.ac: Check for __mcoldfire__ and set
13099 gdb_cv_m68k_is_coldfire.
13100 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13101 reg-cf.o and reg-m68k.o.
13102 * configure: Regenerated.
13103
131042009-11-16 Pedro Alves <pedro@codesourcery.com>
13105
13106 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13107 Pass it to thread_db_free.
13108 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13109 proper `detaching' argument to linux_remove_process.
13110 * linux-low.h (thread_db_free): Add `detaching' parameter.
13111 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13112 to thread_db_free.
13113 (thread_db_free): Add `detaching' parameter. Only
13114 call td_ta_clear_event if detaching from process.
13115
131162009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13117
13118 * thread-db.c (thread_db_free): Fix typo.
13119
131202009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13121
13122 PR gdb/10838
13123 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13124
131252009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13126
13127 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13128 with an i686 compiler.
13129 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13130 needed.
13131 * configure: Rebuilt.
13132
131332009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13134
13135 PR gdb/10783
13136
13137 * server.c (handle_search_memory_1): Correct read_addr initialization
13138 in loop for searching subsequent chunks.
13139
131402009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13141
13142 * configure.ac: New --with-libthread-db option.
13143 * thread-db.c: Allow direct dependence on libthread_db.
13144 (thread_db_free): Adjust.
13145 * config.in: Regenerate.
13146 * configure: Likewise.
13147
131482009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13149
13150 PR gdb/10757
13151 * thread-db.c (attach_thread): New function.
13152 (maybe_attach_thread): Return success/failure.
13153 (find_new_threads_callback): Adjust.
13154 (thread_db_find_new_threads): Loop until no new threads.
13155
131562009-10-13 Pedro Alves <pedro@codesourcery.com>
13157
13158 * proc-service.c (ps_lgetregs): Formatting.
13159
131602009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13161
13162 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13163 * configure.ac: Adjust.
13164 * linux-low.h (struct process_info_private): Move members to struct
13165 thread_db.
13166 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13167 * linux-low.c (linux_remove_process): Adjust.
13168 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13169 * server.c (handle_query): Move code ...
13170 (handle_monitor_command): ... here. New function.
13171 * target.h (struct target_ops): New member.
13172 * thread-db.c (struct thread_db): New.
13173 (libthread_db_search_path): New variable.
13174 (thread_db_create_event, thread_db_enable_reporting)
13175 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13176 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13177 (try_thread_db_load_1, dladdr_to_soname): New functions.
13178 (try_thread_db_load, thread_db_load_search): New functions.
13179 (thread_db_init): Search for libthread_db.
13180 (thread_db_free): New function.
13181 (thread_db_handle_monitor_command): Likewise.
13182 * config.in: Regenerate.
13183 * configure: Regenerate.
13184
131852009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13186
13187 * spu-low.c (spu_kill): Wait for inferior to terminate.
13188 Call clear_inferiors.
13189 (spu_detach): Call clear_inferiors.
13190
131912009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13192
13193 * aclocal.m4: Regenerate.
13194 * config.in: Likewise.
13195 * configure: Likewise.
13196
131972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13198
13199 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13200 (parse_spufs_run): New function.
13201 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13202 (ppc_breakpoint_at): Handle SPU breakpoints.
13203
132042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13205
13206 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13207 (SPUFS_MAGIC): Define.
13208 (spu_enumerate_spu_ids): New function.
13209 (linux_qxfer_spu): New function.
13210 (linux_target_ops): Install linux_qxfer_spu.
13211
132122009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13213
13214 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13215 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13216 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13217 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13218 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13219 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13220 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13221 (init_registers_powerpc_cell32l): Add prototype.
13222 (init_registers_powerpc_cell64l): Likewise.
13223 (ppc_arch_setup): Detect Cell/B.E. architecture.
13224
132252009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13226
13227 * Makefile.in (datarootdir): New variable.
13228
132292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * linux-low.c (linux_write_memory): Update debugging output.
13232 * Makefile.in (clean): Add new descriptions.
13233 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13234 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13235 * configure.srv: Add new files for arm*-*-linux*.
13236 * linux-arm-low.c: Add new declarations.
13237 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13238 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13239 (HWCAP_VFPv3D16): New.
13240 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13241 instead of __IWMMXT__.
13242 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13243 (arm_arch_setup): New.
13244 (target_regsets): Remove #ifdef. Add VFP regset.
13245 (the_low_target): Use arm_arch_setup.
13246
132472009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13248
13249 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13250 the main thread again.
13251
132522009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13253
13254 Adding Neutrino gdbserver.
13255 * configure: Regenerated.
13256 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13257 * configure.srv (i[34567]86-*-nto*): New target.
13258 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13259 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13260 (nto_comctrl) [__QNX__]: New function.
13261 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13262
132632009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13264
13265 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13266 srv_tgtobj.
13267
132682009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13269 Pedro Alves <pedro@codesourcery.com>
13270
13271 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13272 don't support CONTEXT_EXTENDED_REGISTERS.
13273 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13274 (the_low_target): Install them.
13275 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13276 failing with ERROR_PIPE_NOT_CONNECTED.
13277
132782009-06-30 Doug Evans <dje@google.com>
13279 Pierre Muller <muller@ics.u-strasbg.fr>
13280
13281 Add h/w watchpoint support to x86-linux, win32-i386.
13282 * Makefile.in (SFILES): Add i386-low.c
13283 (i386_low_h): Define.
13284 (i386-low.o): Add dependencies.
13285 (linux-x86-low.o): Add i386-low.h dependency.
13286 (win32-i386-low.o): Ditto.
13287 * i386-low.c: New file.
13288 * i386-low.h: New file.
13289 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13290 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13291 * linux-low.c (linux_add_process): Initialize arch_private.
13292 (linux_remove_process): Free arch_private.
13293 (add_lwp): Initialize arch_private.
13294 (delete_lwp): Free arch_private.
13295 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13296 provided.
13297 * linux-low.h (process_info_private): New member arch_private.
13298 (lwp_info): New member arch_private.
13299 (linux_target_ops): New members new_process, new_thread,
13300 prepare_to_resume.
13301 (ptid_of): New macro.
13302 * linux-x86-low.c: Include stddef.h, i386-low.h.
13303 (arch_process_info): New struct.
13304 (arch_lwp_info): New struct.
13305 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13306 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13307 (i386_dr_low_get_status): New function.
13308 (x86_insert_point, x86_remove_point): New functions.
13309 (x86_stopped_by_watchpoint): New function.
13310 (x86_stopped_data_address): New function.
13311 (x86_linux_new_process, x86_linux_new_thread): New functions.
13312 (x86_linux_prepare_to_resume): New function.
13313 (the_low_target): Add entries for insert_point, remove_point,
13314 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13315 prepare_to_resume.
13316 * server.c (debug_hw_points): New global.
13317 (monitor_show_help): Document set debug-hw-points.
13318 (handle_query): Process "set debug-hw-points".
13319 * server.h (debug_hw_points): Declare.
13320 (paddress): Declare.
13321 * utils.c (NUMCELLS, CELLSIZE): New macros.
13322 (get_sell, xsnprintf, paddress): New functions.
13323 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13324 remove_point, stopped_by_watchpoint, stopped_data_address.
13325 * win32-i386-low.c: Include i386-low.h.
13326 (debug_reg_state): Replaces dr.
13327 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13328 (i386_dr_low_get_status): New function.
13329 (i386_insert_point, i386_remove_point): New functions.
13330 (i386_stopped_by_watchpoint): New function.
13331 (i386_stopped_data_address): New function.
13332 (i386_initial_stuff): Update.
13333 (get_thread_context,set_thread_context,i386_thread_added): Update.
13334 (the_low_target): Add entries for insert_point,
13335 remove_point, stopped_by_watchpoint, stopped_data_address.
13336 * win32-low.c (win32_insert_watchpoint): New function.
13337 (win32_remove_watchpoint): New function.
13338 (win32_stopped_by_watchpoint): New function.
13339 (win32_stopped_data_address): New function.
13340 (win32_target_ops): Add entries for insert_watchpoint,
13341 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13342 * win32-low.h (win32_target_ops): New members insert_point,
13343 remove_point, stopped_by_watchpoint, stopped_data_address.
13344
133452009-06-25 Pedro Alves <pedro@codesourcery.com>
13346
13347 * server.c (process_serial_event): Re-return unsupported, not
13348 error, if the type isn't recognized. Re-allow supporting only
13349 insert or remove packets. Also call require_running for
13350 breakpoints. Add missing break statement to default case. Tidy.
13351 * target.h (struct target_ops): Rename insert_watchpoint to
13352 insert_point, and remove_watchpoint to remove_point.
13353
13354 * linux-low.h (struct linux_target_ops): Likewise.
13355 * linux-low.c (linux_insert_watchpoint): Rename to ...
13356 (linux_insert_point): ... this. Adjust.
13357 (linux_remove_watchpoint): Rename to ...
13358 (linux_remove_point): ... this. Adjust.
13359 (linux_target_ops): Adjust.
13360 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13361 (cris_insert_point): ... this.
13362 (cris_remove_watchpoint): Rename to ...
13363 (cris_remove_point): ... this.
13364 (the_low_target): Adjust.
13365
133662009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13367
13368 * server.c (handle_v_kill): Pass signal_pid to
13369 kill_inferior if multi_process is zero.
13370
133712009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13372
13373 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13374 * target.h (target_ops): Comment for *_watchpoint to make it clear
13375 the functions can get types '0' and '1'.
13376
133772009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13378
13379 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13380 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13381 * regcache.c (get_regcache): Likewise.
13382 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13383 * win32-low.c (child_fetch_inferior_registers): Remove check for
13384 regno 0.
13385
133862009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13387 Pedro Alves <pedro@codesourcery.com>
13388
13389 * target.h (struct target_ops) <supports_multi_process>: New
13390 callback.
13391 (target_supports_multi_process): New.
13392 * server.c (handle_query): Even if GDB reports support, only
13393 enable multi-process if the target also supports it. Report
13394 multi-process support only if the target backend supports it.
13395 * linux-low.c (linux_supports_multi_process): New function.
13396 (linux_target_ops): Install it as target_supports_multi_process
13397 callback.
13398
133992009-05-24 Doug Evans <dje@google.com>
13400
13401 Global renaming of find_thread_pid to find_thread_ptid.
13402 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13403 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13404 All callers updated.
13405
13406 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13407 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13408 directly.
13409
13410 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13411 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13412 (linux_resume_one_lwp): Ditto.
13413
134142009-05-23 Doug Evans <dje@google.com>
13415
13416 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13417 from struct inferior_list_entry * to struct lwp_info *.
13418 All callers updated.
13419
134202009-05-13 Doug Evans <dje@google.com>
13421
13422 * linux-x86-low.c: Don't include assert.h.
13423 (x86_siginfo_fixup): Use fatal, not assert.
13424 (x86_arch_setup): Fix comment.
13425
134262009-05-12 Doug Evans <dje@google.com>
13427
13428 Biarch support for i386/amd64 gdbserver.
13429 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13430 Add linux-x86-low.c.
13431 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13432 (linux-x86-low.o): Add.
13433 * linux-x86-64-low.c: Delete.
13434 * linux-i386-low.c: Delete.
13435 * linux-x86-low.c: New file.
13436 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13437 linux-x86-low.o.
13438 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13439 linux-x86-low.o.
13440 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13441 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13442 (linux_child_pid_to_exec_file): New function.
13443 (elf_64_header_p, elf_64_file_p): New functions.
13444 (siginfo_fixup): New function.
13445 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13446 give target a chance to convert layout.
13447 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13448 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13449
134502009-05-07 Doug Evans <dje@google.com>
13451
13452 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13453 (regsets_store_inferior_registers): Ditto.
13454
134552009-05-06 Pedro Alves <pedro@codesourcery.com>
13456
13457 PR server/10048
13458
13459 * linux-low.c (must_set_ptrace_flags): Delete.
13460 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13461 of the global.
13462 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13463 `lwp->must_set_ptrace_flags' instead.
13464 (linux_wait_for_event_1): Set ptrace options here.
13465 (linux_wait_1): ... not here.
13466
134672009-04-30 Doug Evans <dje@google.com>
13468
13469 * inferiors.c (started_inferior_callback): New function.
13470 (attached_inferior_callback): New function.
13471 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13472 * server.c (print_started_pid, print_attached_pid): New functions.
13473 (detach_or_kill_for_exit): New function.
13474 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13475 * server.h (have_started_inferiors_p): Declare.
13476 (have_attached_inferiors_p): Declare.
13477
13478 * inferiors.c (remove_process): Fix memory leak, free process.
13479 * linux-low.c (linux_remove_process): New function.
13480 (linux_kill): Call it instead of remove_process.
13481 (linux_detach, linux_wait_1): Ditto.
13482
134832009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13484
13485 * configure.srv: Add x86 Windows CE target.
13486
134872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13488
13489 * inferiors.c (get_thread_process): Make global.
13490 * server.h (get_thread_process): Add prototype.
13491 * thread-db.c (find_one_thread): Use get_thread_process
13492 instead of current_process.
13493 (thread_db_get_tls_address): Do not crash if called when
13494 thread layer is not yet initialized.
13495
134962009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13497
13498 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13499 * spu-low.c (current_tid): Rename to ...
13500 (current_ptid): ... this.
13501 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13502 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13503 ptid_get_lwp (current_ptid) instead of current_tid.
13504 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13505 instead of current_tid. Use find_process_pid to verify pid
13506 argument is valid. Pass proper argument to remove_process.
13507 (spu_thread_alive): Compare current_ptid instead of current_tid.
13508 (spu_resume): Likewise.
13509
135102009-04-02 Pedro Alves <pedro@codesourcery.com>
13511
13512 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13513 variable.
13514
135152009-04-01 Pedro Alves <pedro@codesourcery.com>
13516
13517 Implement the multiprocess extensions, and add linux multiprocess
13518 support.
13519
13520 * server.h (ULONGEST): Declare.
13521 (struct ptid, ptid_t): New.
13522 (minus_one_ptid, null_ptid): Declare.
13523 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13524 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13525 (struct inferior_list_entry): Change `id' type from unsigned from
13526 to ptid_t.
13527 (struct sym_cache, struct breakpoint, struct
13528 process_info_private): Forward declare.
13529 (struct process_info): Declare.
13530 (current_process): Declare.
13531 (all_processes): Declare.
13532 (initialize_inferiors): Declare.
13533 (add_thread): Adjust to use ptid_t.
13534 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13535 (add_process, remove_process, find_thread_pid): Declare.
13536 (find_inferior_id): Adjust to use ptid_t.
13537 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13538 (multi_process): Declare.
13539 (push_event): Adjust to use ptid_t.
13540 (read_ptid, write_ptid): Declare.
13541 (prepare_resume_reply): Adjust to use ptid_t.
13542 (clear_symbol_cache): Declare.
13543 * inferiors.c (all_processes): New.
13544 (null_ptid, minus_one_ptid): New.
13545 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13546 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13547 (add_thread): Change unsigned long to ptid. Remove gdb_id
13548 parameter. Adjust.
13549 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13550 (gdb_id_to_thread): Rename to ...
13551 (find_thread_pid): ... this. Change unsigned long to ptid.
13552 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13553 (loaded_dll, pull_pid_from_list): Adjust.
13554 (add_process, remove_process, find_process_pid)
13555 (get_thread_process, current_process, initialize_inferiors): New.
13556 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13557 (struct target_waitstatus) <related_pid>: Ditto.
13558 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13559 return type to int.
13560 (struct target_ops) <join>: Add `pid' argument.
13561 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13562 (struct target_ops) <wait>: Add `ptid' field. Change return type
13563 to ptid.
13564 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13565 (mywait): Add `ptid' argument. Change return type to ptid_t.
13566 (target_pid_to_str): Declare.
13567 * target.c (set_desired_inferior): Adjust to use ptids.
13568 (mywait): Add new `ptid' argument. Adjust.
13569 (target_pid_to_str): New.
13570 * mem-break.h (free_all_breakpoints): Declare.
13571 * mem-break.c (breakpoints): Delelete.
13572 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13573 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13574 to use per-process breakpoint list.
13575 (free_all_breakpoints): New.
13576 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13577 (symbol_cache, all_symbols_looked_up): Delete.
13578 (hexchars): New.
13579 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13580 read_ptid): New.
13581 (prepare_resume_reply): Change ptid argument's type from unsigned
13582 long to ptid_t. Adjust. Implement W;process and X;process.
13583 (free_sym_cache, clear_symbol_cache): New.
13584 (look_up_one_symbol): Adjust to per-process symbol cache. *
13585 * server.c (cont_thread, general_thread, step_thread): Change type
13586 to ptid_t.
13587 (attached): Delete.
13588 (multi_process): New.
13589 (last_ptid): Change type to ptid_t.
13590 (struct vstop_notif) <ptid>: Change type to ptid_t.
13591 (queue_stop_reply, push_event): Change `ptid' argument's type to
13592 ptid_t.
13593 (discard_queued_stop_replies): Add `pid' argument.
13594 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13595 changes. Don't reference the `attached' global.
13596 (attach_inferior): Adjust to mywait interface changes.
13597 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13598 features. Handle and report "multiprocess+". Handle
13599 "qAttached:PID".
13600 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13601 changes.
13602 (handle_v_kill): New.
13603 (handle_v_stopped): Adjust to use target_pid_to_str.
13604 (handle_v_requests): Allow multiple attaches and runs when
13605 multiprocess extensions are in effect. Handle "vKill".
13606 (myresume): Adjust to use ptids.
13607 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13608 (handle_status): Adjust to discard_queued_stop_replies interface
13609 change.
13610 (first_thread_of, kill_inferior_callback)
13611 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13612 (main): Call initialize_inferiors. Adjust to use ptids, killing
13613 and detaching from all inferiors. Handle multiprocess packet
13614 variants.
13615 * linux-low.h: Include gdb_proc_service.h.
13616 (struct process_info_private): New.
13617 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13618 <lwpid_of>: Use ptid_get_lwp.
13619 (get_lwp_thread): Adjust.
13620 (struct lwp_info): Add `dead' member.
13621 (find_lwp_pid): Declare.
13622 * linux-low.c (thread_db_active): Delete.
13623 (new_inferior): Adjust comment.
13624 (inferior_pid): Delete.
13625 (linux_add_process): New.
13626 (handle_extended_wait): Adjust.
13627 (add_lwp): Change unsigned long to ptid.
13628 (linux_create_inferior): Add process to processes table. Adjust
13629 to use ptids. Don't set new_inferior here.
13630 (linux_attach_lwp): Rename to ...
13631 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13632 it. Adjust to use ptids.
13633 (linux_attach_lwp): New.
13634 (linux_attach): Add process to processes table. Don't set
13635 new_inferior here.
13636 (struct counter): New.
13637 (second_thread_of_pid_p, last_thread_of_process_p): New.
13638 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13639 multiple processes.
13640 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13641 processes. Remove process from process table.
13642 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13643 to multiple processes.
13644 (any_thread_of): New.
13645 (linux_detach): Add `pid' argument, and handle it. Remove process
13646 from processes table.
13647 (linux_join): Add `pid' argument. Handle it.
13648 (linux_thread_alive): Change unsighed long argument to ptid_t.
13649 Consider dead lwps as not being alive.
13650 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13651 threads we're not interested in.
13652 (same_lwp, find_lwp_pid): New.
13653 (linux_wait_for_lwp): Change `pid' argument's type from int to
13654 ptid_t. Adjust.
13655 (linux_wait_for_event): Rename to ...
13656 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13657 from int to ptid_t. Adjust.
13658 (linux_wait_for_event): New.
13659 (linux_wait_1): Add `ptid' argument. Change return type to
13660 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13661 that exit from the process table.
13662 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13663 Adjust.
13664 (mark_lwp_dead): New.
13665 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13666 stopping all threads, mark its main lwp as dead.
13667 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13668 ptids.
13669 (fetch_register, usr_store_inferior_registers)
13670 (regsets_fetch_inferior_registers)
13671 (regsets_store_inferior_registers, linux_read_memory)
13672 (linux_write_memory): Inline `inferior_pid'.
13673 (linux_look_up_symbols): Adjust to use per-process
13674 `thread_db_active'.
13675 (linux_request_interrupt): Adjust to use ptids.
13676 (linux_read_auxv): Inline `inferior_pid'.
13677 (initialize_low): Don't reference thread_db_active.
13678 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13679 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13680 (ps_getpid): Return the pid of the current inferior.
13681 * thread-db.c (proc_handle, thread_agent): Delete.
13682 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13683 per-process data.
13684 (find_one_thread): Change argument type to ptid_t. Adjust to
13685 per-process data.
13686 (maybe_attach_thread): Adjust to per-process data and ptids.
13687 (thread_db_find_new_threads): Ditto.
13688 (thread_db_init): Ditto.
13689 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13690 processes table. Adjust to use ptids.
13691 (spu_kill, spu_detach): Adjust interface. Remove process from
13692 processes table.
13693 (spu_join, spu_thread_alive): Adjust interface.
13694 (spu_wait): Adjust interface. Remove process from processes
13695 table. Adjust to use ptids.
13696 * win32-low.c (current_inferior_tid): Delete.
13697 (current_inferior_ptid): New.
13698 (debug_event_ptid): New.
13699 (thread_rec): Take a ptid. Adjust.
13700 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13701 (child_delete_thread): Ditto.
13702 (do_initial_child_stuff): Add `attached' argument. Add process to
13703 processes table.
13704 (child_fetch_inferior_registers, child_store_inferior_registers):
13705 Adjust.
13706 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13707 (win32_attach): Pass 1 to do_initial_child_stuff.
13708 (win32_kill): Adjust interface. Remove process from processes
13709 table.
13710 (win32_detach): Ditto.
13711 (win32_join): Adjust interface.
13712 (win32_thread_alive): Take a ptid.
13713 (win32_resume): Adjust to use ptids.
13714 (get_child_debug_event): Ditto.
13715 (win32_wait): Adjust interface. Remove exiting process from
13716 processes table.
13717
137182009-04-01 Pedro Alves <pedro@codesourcery.com>
13719
13720 Non-stop mode support.
13721
13722 * server.h (non_stop): Declare.
13723 (gdb_client_data, handler_func): Declare.
13724 (delete_file_handler, add_file_handler, start_event_loop):
13725 Declare.
13726 (handle_serial_event, handle_target_event, push_event)
13727 (putpkt_notif): Declare.
13728 * target.h (enum resume_kind): New.
13729 (struct thread_resume): Replace `step' field by `kind' field.
13730 (TARGET_WNOHANG): Define.
13731 (struct target_ops) <wait>: Add `options' argument.
13732 <supports_non_stop, async, start_non_stop>: New fields.
13733 (target_supports_non_stop, target_async): New.
13734 (start_non_stop): Declare.
13735 (mywait): Add `options' argument.
13736 * target.c (mywait): Add `options' argument. Print child exit
13737 notifications here.
13738 (start_non_stop): New.
13739 * server.c (non_stop, own_buf, mem_buf): New globals.
13740 (struct vstop_notif): New.
13741 (notif_queue): New global.
13742 (queue_stop_reply, push_event, discard_queued_stop_replies)
13743 (send_next_stop_reply): New.
13744 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13745 interface changes.
13746 (attach_inferior): In non-stop mode, don't wait for the target
13747 here.
13748 (handle_general_set): Handle QNonStop.
13749 (handle_query): When handling qC, return the current general
13750 thread, instead of the first thread of the list.
13751 (handle_query): If the backend supports non-stop mode, include
13752 QNonStop+ in the qSupported query response.
13753 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13754 and non-stop mode.
13755 (handle_v_attach, handle_v_run): Handle non-stop mode.
13756 (handle_v_stopped): New.
13757 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13758 (myresume): Adjust to use resume_kind. Handle non-stop.
13759 (queue_stop_reply_callback): New.
13760 (handle_status): Handle non-stop mode.
13761 (main): Clear non_stop flag on reconnection. Use the event-loop.
13762 Refactor serial protocol handling from here ...
13763 (process_serial_event): ... to this new function. When GDB
13764 selects any thread, select one here. In non-stop mode, wait until
13765 GDB acks all pending events before exiting.
13766 (handle_serial_event, handle_target_event): New.
13767 * remote-utils.c (remote_open): Install remote_desc in the event
13768 loop.
13769 (remote_close): Remove remote_desc from the event loop.
13770 (putpkt_binary): Rename to...
13771 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13772 (putpkt_binary): New as wrapper around putpkt_binary_1.
13773 (putpkt_notif): New.
13774 (prepare_resume_reply): In non-stop mode, don't change the
13775 general_thread.
13776 * event-loop.c: New.
13777 * Makefile.in (OBJ): Add event-loop.o.
13778 (event-loop.o): New rule.
13779
13780 * linux-low.h (pid_of): Moved here.
13781 (lwpid_of): New.
13782 (get_lwp_thread): Use lwpid_of.
13783 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13784 * linux-low.c (pid_of): Delete.
13785 (inferior_pid): Use lwpid_of.
13786 (linux_event_pipe): New.
13787 (target_is_async_p): New.
13788 (delete_lwp): New.
13789 (handle_extended_wait): Use lwpid_of.
13790 (add_lwp): Don't set lwpid field.
13791 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13792 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13793 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13794 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13795 first. Adjust to linux_wait_for_event interface changes. Use
13796 lwpid_of.
13797 (linux_detach): Don't delete the main lwp here.
13798 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13799 (status_pending_p): Don't consider explicitly suspended lwps.
13800 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13801 pointer. Add OPTIONS argument. Change return type to int. Use
13802 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13803 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13804 pointer. Add status pointer argument. Return a pid instead of a
13805 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13806 changes. In non-stop mode, don't switch to a random thread.
13807 (linux_wait): Rename to...
13808 (linux_wait_1): ... this. Add target_options argument, and handle
13809 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13810 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13811 clean exit and signal exit code. Don't stop all threads in
13812 non-stop mode. In all-stop mode, only stop all threads when
13813 reporting a stop to GDB. Handle explicit thread stop requests.
13814 (async_file_flush, async_file_mark): New.
13815 (linux_wait): New.
13816 (send_sigstop): Use lwpid_of.
13817 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13818 interface changes. In non-stop mode, don't switch to a random
13819 thread.
13820 (linux_resume_one_lwp): Use lwpid_of.
13821 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13822 (linux_resume_one_thread): ... this. Handle resume_stop. In
13823 non-stop mode, don't look for pending flag in all threads.
13824 (resume_status_pending_p): Don't consider explicitly suspended
13825 threads.
13826 (my_waitpid): Reimplement. Emulate __WALL.
13827 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13828 Use lwpid_of.
13829 (sigchld_handler, linux_supports_non_stop, linux_async)
13830 (linux_start_non_stop): New.
13831 (linux_target_ops): Register linux_supports_non_stop, linux_async
13832 and linux_start_non_stop.
13833 (initialize_low): Install SIGCHLD handler.
13834 * thread-db.c (thread_db_create_event, find_one_thread)
13835 (thread_db_get_tls_address): Use lwpid_of.
13836 * win32-low.c (win32_detach): Adjust to use resume_kind.
13837 (win32_wait): Add `options' argument.
13838 * spu-low.c (spu_resume): Adjust to use resume_kind.
13839 (spu_wait): Add `options' argument.
13840
138412009-04-01 Pedro Alves <pedro@codesourcery.com>
13842
13843 Decouple target code from remote protocol.
13844
13845 * target.h (enum target_waitkind): New.
13846 (struct target_waitstatus): New.
13847 (struct target_ops) <wait>: Return an unsigned long. Take a
13848 target_waitstatus pointer instead of a char pointer.
13849 (mywait): Likewise.
13850 * target.c (mywait): Change prototype to return an unsigned long.
13851 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13852 * server.h (thread_from_wait, old_thread_from_wait): Delete
13853 declarations.
13854 (prepare_resume_reply): Change prototype to take a
13855 target_waitstatus.
13856 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13857 (last_status, last_ptid): New.
13858 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13859 pid instead of a signal.
13860 (attach_inferior): Remove "status" and "signal" parameters.
13861 Adjust.
13862 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13863 not as an address.
13864 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13865 (handle_v_requests, myresume): Remove "status" and "signal"
13866 parameters. Adjust.
13867 (handle_status): New.
13868 (main): Delete local `status'. Adjust.
13869 * remote-utils.c: Include target.h.
13870 (prepare_resume_reply): Change prototype to take a
13871 target_waitstatus. Adjust.
13872
13873 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13874 interface.
13875 * spu-low.c (spu_wait): Adjust.
13876 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13877 Delete.
13878 (win32_wait): Adjust.
13879
138802009-04-01 Pedro Alves <pedro@codesourcery.com>
13881
13882 * target.h (struct thread_resume): Delete leave_stopped member.
13883 (struct target_ops): Add a `n' argument to the `resume' callback.
13884 * server.c (start_inferior): Adjust.
13885 (handle_v_cont, myresume): Adjust.
13886 * linux-low.c (check_removed_breakpoint): Adjust to resume
13887 interface change, and to removed leave_stopped field.
13888 (resume_ptr): Delete.
13889 (struct thread_resume_array): New.
13890 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13891 resume interface change.
13892 (linux_continue_one_thread, linux_queue_one_thread)
13893 (resume_status_pending_p): Check if the resume field is NULL
13894 instead of checking the leave_stopped member.
13895 (linux_resume): Adjust to the target resume interface change.
13896 * spu-low.c (spu_resume): Adjust to the target resume interface
13897 change.
13898 * win32-low.c (win32_detach, win32_resume): Ditto.
13899
139002009-04-01 Pedro Alves <pedro@codesourcery.com>
13901
13902 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13903 flag.
13904 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13905 pending.
13906 (linux_continue_one_thread): Only preserve the stepping flag if
13907 there's a pending breakpoint.
13908
139092009-03-31 Pedro Alves <pedro@codesourcery.com>
13910
13911 * server.c (main): After the inferior having exited, call
13912 remote_close before exiting gdbserver.
13913
139142009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13915
13916 Fix size of FPSCR in Power 7 processors.
13917 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13918 (PPC_FEATURE_HAS_DFP): New #define.
13919 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13920 size of the FPSCR.
13921
139222009-03-23 Pedro Alves <pedro@codesourcery.com>
13923
13924 * server.c (handle_query) Whitespace and formatting.
13925
139262009-03-22 Pedro Alves <pedro@codesourcery.com>
13927
13928 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13929 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13930 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13931 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13932 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13933 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13934 Makefile.in, configure.ac: Fix whitespace throughout.
13935 * configure: Regenerate.
13936
139372009-03-22 Pedro Alves <pedro@codesourcery.com>
13938
13939 * inferiors.c (find_inferior): Make it safe for the callback
13940 function to delete the currently iterated inferior.
13941
139422009-03-22 Pedro Alves <pedro@codesourcery.com>
13943
13944 * Makefile.in (linuw_low_h): Move higher.
13945 (thread-db.o): Depend on $(linux_low_h).
13946
139472009-03-17 Pedro Alves <pedro@codesourcery.com>
13948
13949 Rename "process" to "lwp" throughout.
13950
13951 * linux-low.c (all_processes): Rename to...
13952 (all_lwps): ... this.
13953 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13954 (add_process): Rename to ...
13955 (add_lwp): ... this. Adjust.
13956 (linux_create_inferior): Adjust.
13957 (linux_attach_lwp): Adjust.
13958 (linux_attach): Adjust.
13959 (linux_kill_one_process): Rename to ...
13960 (linux_kill_one_lwp): ... this. Adjust.
13961 (linux_kill): Adjust.
13962 (linux_detach_one_process): Rename to ...
13963 (linux_detach_one_lwp): ... this. Adjust.
13964 (linux_detach): Adjust.
13965 (check_removed_breakpoint): Adjust.
13966 (status_pending_p): Adjust.
13967 (linux_wait_for_process): Rename to ...
13968 (linux_wait_for_lwp): ... this. Adjust.
13969 (linux_wait_for_event): Adjust.
13970 (send_sigstop): Adjust.
13971 (wait_for_sigstop): Adjust.
13972 (stop_all_processes): Rename to ...
13973 (stop_all_lwps): ... this.
13974 (linux_resume_one_process): Rename to ...
13975 (linux_resume_one_lwp): ... this. Adjust.
13976 (linux_set_resume_request, linux_continue_one_thread)
13977 (linux_queue_one_thread, resume_status_pending_p)
13978 (usr_store_inferior_registers, regsets_store_inferior_registers)
13979 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13980 Adjust.
13981 * linux-low.h (get_process): Rename to ...
13982 (get_lwp): ... this. Adjust.
13983 (get_thread_process): Rename to ...
13984 (get_thread_lwp): ... this. Adjust.
13985 (get_process_thread): Rename to ...
13986 (get_lwp_thread): ... this. Adjust.
13987 (struct process_info): Rename to ...
13988 (struct lwp_info): ... this.
13989 (all_processes): Rename to ...
13990 (all_lwps): ... this.
13991 * proc-service.c (ps_lgetregs): Adjust.
13992 * thread-db.c (thread_db_create_event, find_one_thread)
13993 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13994
139952009-03-14 Pedro Alves <pedro@codesourcery.com>
13996
13997 * server.c (handle_query): Handle "qAttached".
13998
139992009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14000
14001 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14002 GPLv3, update license URL.
14003
140042009-03-01 Doug Evans <dje@google.com>
14005
14006 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14007 (server_h): Add gdb_signals.h.
14008 (signals.o): Update.
14009 * server.h (target_signal_from_host,target_signal_to_host_p)
14010 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14011
140122009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14013
14014 * remote-utils.c (getpkt): Also generate remote-debug
14015 information if noack_mode is set.
14016
140172009-02-06 Pedro Alves <pedro@codesourcery.com>
14018
14019 * server.c (handle_query): Report qXfer:siginfo:read and
14020 qXfer:siginfo:write as supported and handle them.
14021 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14022 * linux-low.c (linux_xfer_siginfo): New.
14023 (linux_target_ops): Set it.
14024
140252009-01-26 Pedro Alves <pedro@codesourcery.com>
14026
14027 * server.c (gdbserver_usage): Mention --remote-debug.
14028 (main): Accept '--remote-debug' switch.
14029
140302009-01-18 Doug Evans <dje@google.com>
14031
14032 * regcache.c (new_register_cache): No need to check result of xcalloc.
14033 * server.c (handle_search_memory): Back out calls to xmalloc,
14034 result is checked and error is returned to user upon failure.
14035 (handle_query): Ditto. Add more checks for result of malloc.
14036 (handle_v_cont): Check result of malloc, report error back to
14037 user upon failure.
14038 (handle_v_run): Ditto. Call freeargv.
14039 * server.h (freeargv): Declare.
14040 * utils.c (freeargv): New fn.
14041
140422009-01-15 Doug Evans <dje@google.com>
14043
14044 * gdbreplay.c (perror_with_name): Make arg const char *.
14045 * server.h (target_signal_to_name): Make return type const char *.
14046 * thread-db.c (thread_db_err_str): Make return type const char *.
14047 * utils.c (perror_with_name): Make arg const char *.
14048
140492009-01-14 Pedro Alves <pedro@codesourcery.com>
14050
14051 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14052 when handling a EXIT_PROCESS_DEBUG_EVENT.
14053
140542009-01-06 Joel Brobecker <brobecker@adacore.com>
14055
14056 * gdbreplay.c (gdbreplay_version): Update copyright year.
14057 * server.c (gdbserver_version): Likewise.
14058
140592009-01-05 Doug Evans <dje@google.com>
14060
14061 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14062 (handle_extended_wait): Improve comment.
14063
140642008-12-13 Doug Evans <dje@google.com>
14065
14066 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14067 * server.h (ATTR_MALLOC): New macro.
14068 (xmalloc,xcalloc,xstrdup): Declare.
14069 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14070 * inferiors.c: Ditto.
14071 * linux-low.c: Ditto.
14072 * mem-break.c: Ditto.
14073 * regcache.c: Ditto.
14074 * remote-utils.c: Ditto.
14075 * server.c: Ditto.
14076 * target.c: Ditto.
14077 * win32-low.c: Ditto.
14078
140792008-12-12 Doug Evans <dje@google.com>
14080
14081 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14082 in debugging printf.
14083
14084 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14085
140862008-12-09 Doug Evans <dje@google.com>
14087
14088 * linux-low.h (struct process_info): Delete member tid, unused.
14089 * thread-db.c (find_one_thread): Update.
14090 (maybe_attach_thread): Update.
14091
140922008-12-02 Pedro Alves <pedro@codesourcery.com>
14093
14094 * target.h (struct target_ops): Add qxfer_osdata member.
14095 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14096 and dirent.h.
14097 (linux_qxfer_osdata): New functions.
14098 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14099 callback.
14100 * server.c (handle_query): Handle "qXfer:osdata:read:".
14101 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14102 (buffer_xml_printf): New functions.
14103 * server.h (struct buffer): New.
14104 (buffer_grow_str, buffer_grow_str0): New macros.
14105 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14106 (buffer_xml_printf): Declare.
14107
141082008-11-24 Doug Evans <dje@google.com>
14109
14110 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14111
141122008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14113
14114 * server.c (handle_v_run): Always use the supplied argument list.
14115
141162008-11-19 Bob Wilson <bob.wilson@acm.org>
14117
14118 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14119 (xtensa_regmap_table): Add entry for scompare1.
14120
141212008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14122
14123 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14124 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14125 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14126 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14127 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14128 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14129 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14130 XML target descriptions.
14131 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14132 when inferior is running on an ISA 2.05 or later processor. Add
14133 special case to return offset for full 64-bit slot of FPSCR when
14134 in 32-bits.
14135
141362008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14137
14138 * Makefile.in (SFILES, clean): Added sparc64 files.
14139 (reg-sparc64.o, reg-sparc64.c): New.
14140 * configure.srv (sparc*-*-linux*): New configuration.
14141 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14142 syscall arguments for SPARC.
14143 (regsets_store_inferior_registers): Likewise.
14144 * linux-sparc-low.c: New file.
14145
141462008-10-21 Doug Evans <dje@google.com>
14147
14148 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14149 (READLINE_DIR,READLINE_DEP): Delete.
14150 (INTERNAL_CFLAGS): Update.
14151 (LINTFLAGS): Update.
14152
141532008-10-10 Pedro Alves <pedro@codesourcery.com>
14154
14155 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14156 whole argv from the last run, not just argv[0].
14157
141582008-09-08 Pedro Alves <pedro@codesourcery.com>
14159
14160 * regcache.c (new_register_cache): Return NULL if the register
14161 cache size isn't known yet.
14162 (free_register_cache): Avoid dereferencing a NULL regcache.
14163
141642008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * configure.srv: Merge MIPS and MIPS64.
14167
141682008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14169
14170 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14171
141722008-08-18 Luis Machado <luisgpm@br.ibm.com>
14173
14174 * Makefile.in: Add required vsx dependencies.
14175
14176 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14177 Declare init_registers_powerpc_vsx32l.
14178 Declare init_registers_powerpc_vsx64l.
14179 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14180 (ppc_arch_setup): Check for VSX in hwcap.
14181 (ppc_fill_vsxregset): New function.
14182 (ppc_store_vsxregset): New function.
14183 Add new VSX entry in regset_info target_regsets.
14184
14185 * configure.srv: Add new VSX dependencies.
14186
141872008-08-12 Pedro Alves <pedro@codesourcery.com>
14188
14189 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14190 (remote_open): Set or clear transport_is_reliable.
14191 (putpkt_binary): Don't expect acks in noack mode.
14192 (getpkt): Don't send ack/nac in noack mode.
14193 * server.c (handle_general_set): Handle QStartNoAckMode.
14194 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14195 qSupported.
14196 (main): Reset noack_mode on every connection.
14197 * server.h (noack_mode): Declare.
14198
141992008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14200
14201 * Makefile.in (GDBREPLAY_OBS): New variable.
14202 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14203
142042008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14205 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14208 (usr_store_inferior_registers): Likewise.
14209 (regsets_store_inferior_registers): Likewise.
14210
142112008-07-31 Rolf Jansen <rj@surtec.com>
14212 Pedro Alves <pedro@codesourcery.com>
14213
14214 * configure.ac: Check for memmem declaration.
14215 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14216 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14217 (disable_packet_qfThreadInfo): Unconditionally compile.
14218 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14219 * configure, config.in: Regenerate.
14220
142212008-07-28 Doug Kwan <dougkwan@google.com>
14222
14223 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14224 (linux_write_memory): Remove declaration of errno.
14225
142262008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14227
14228 * linux-low.c (handle_extended_wait): Do not use "status"
14229 variable uninitialized.
14230
142312008-07-07 Pedro Alves <pedro@codesourcery.com>
14232
14233 * server.c (handle_v_attach): Inhibit reporting dll changes.
14234
142352008-06-27 Pedro Alves <pedro@codesourcery.com>
14236
14237 * remote-utils.c (prepare_resume_reply): If requested, don't
14238 output "thread:TID" in the T stop reply.
14239
14240 * server.c (disable_packet_vCont, disable_packet_Tthread)
14241 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14242 (handle_query): If requested, disable support for qC, qfThreadInfo
14243 and qsThreadInfo.
14244 (handle_v_requests): If requested, disable support for vCont.
14245 (gdbserver_show_disableable): New.
14246 (main): Handle --disable-packet and --disable-packet=LIST.
14247
14248 * server.h (disable_packet_vCont, disable_packet_Tthread)
14249 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14250
142512008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14252
14253 * server.c (gdbserver_usage): Mention --version.
14254
142552008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14256
14257 * Makefile.in (gdbreplay.o): New rule.
14258
142592008-06-06 Joseph Myers <joseph@codesourcery.com>
14260
14261 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14262 message, not gdbserver.
14263
142642008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14265 Nathan Sidwell <nathan@codesourcery.com>
14266 Joseph Myers <joseph@codesourcery.com>
14267
14268 * acinclude.m4: Include ../../config/acx.m4.
14269 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14270 * configure, config.in: Regenerate.
14271 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14272 * server.c (gdbserver_version): Print PKGVERSION.
14273 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14274 (main): Adjust gdbserver_usage calls.
14275 * gdbreplay.c (version, host_name): Add declarations.
14276 (gdbreplay_version, gdbreplay_usage): New.
14277 (main): Accept --version and --help options.
14278
142792008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14280
14281 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14282 (arm_breakpoint_at): Handle Thumb.
14283 (the_low_target): Add comment.
14284
142852008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14286
14287 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14288
142892008-05-09 Doug Evans <dje@google.com>
14290
14291 * server.h (decode_search_memory_packet): Declare.
14292 * remote-utils.c (decode_search_memory_packet): New fn.
14293 * server.c (handle_search_memory_1): New fn.
14294 (handle_search_memory): New fn.
14295 (handle_query): Process qSearch:memory packets.
14296
142972008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14298
14299 * regcache.c (registers_length): Remove.
14300 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14301 full register packet.
14302 * regcache.h (registers_length): Remove prototype.
14303 * server.h (PBUFSIZ): Define to 16384.
14304
143052008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14306
14307 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14308 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14309 powerpc-64l.o, and powerpc-altivec64l.o.
14310 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14311 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14312 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14313 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14314 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14315 to srv_xmlfiles.
14316
14317 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14318 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14319 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14320 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14321 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14322 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14323 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14324 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14325 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14326 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14327 (clean): Update.
14328
14329 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14330 (init_registers_powerpc_32l): ... this new prototype.
14331 (init_registers_powerpc_32): Remove, replace by ...
14332 (init_registers_powerpc_altivec32l): ... this new prototype.
14333 (init_registers_powerpc_e500): Remove, replace by ...
14334 (init_registers_powerpc_e500l): ... this new prototype.
14335 (init_registers_ppc64): Remove, replace by ...
14336 (init_registers_powerpc_64l): ... this new prototype.
14337 (init_registers_powerpc_64): Remove, replace by ...
14338 (init_registers_powerpc_altivec64l): ... this new prototype.
14339 (ppc_num_regs): Set to 73.
14340 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14341 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14342 (ppc_cannot_store_register): Handle orig_r3 and trap.
14343 (ppc_arch_setup): Update init_registers_... calls.
14344 (ppc_fill_gregset): Handle orig_r3 and trap.
14345
14346 * inferiors.c (clear_inferiors): Reset current_inferior.
14347
143482008-04-23 Paolo Bonzini <bonzini@gnu.org>
14349
14350 * acinclude.m4: Add override.m4.
14351 * configure: Regenerate.
14352
143532008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14354
14355 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14356 initial call to init_register_ppc64.
14357
143582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14359
14360 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14361 single powerpc*-*-linux* case.
14362 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14363
143642008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14365
14366 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14367 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14368 from reg_xmlfiles.
14369 * linux-ppc-low.c: Include <elf.h>.
14370 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14371 (ppc_hwcap): New global variable.
14372 (ppc_regmap): Remove __SPE__ #ifdef sections.
14373 (ppc_regmap_e500): New global variable.
14374 (ppc_cannot_store_register): Update __SPE__ special case.
14375 (ppc_get_hwcap): New function.
14376 (ppc_arch_setup): Use it to determine whether inferior supports
14377 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14378 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14379 Do not access registers if target does not support AltiVec.
14380 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14381 Do not access registers if target does not support SPE.
14382 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14383
143842008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * linux-low.c (disabled_regsets, num_regsets): New.
14387 (use_regsets_p): Delete.
14388 (linux_wait_for_process): Clear disabled_regsets.
14389 (regsets_fetch_inferior_registers): Check and set it.
14390 (regsets_store_inferior_registers): Likewise.
14391 (linux_fetch_registers, linux_store_registers): Do not use
14392 use_regsets_p.
14393 (initialize_low): Allocate disabled_regsets.
14394
143952008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14396
14397 * Makefile.in (LIBOBJS): New.
14398 (OBS): Use LIBOBJS.
14399 (memmem.o): New rule.
14400 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14401 * configure: Regenerated.
14402
144032008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14404
14405 * server.c (handle_query): Never return "unsupported" for
14406 qXfer:features:read queries.
14407
144082008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14409
14410 * server.c (get_features_xml): Fix inverted condition.
14411 (handle_query): Always support qXfer:feature:read.
14412
144132008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * server.c (wrapper_argv): New.
14416 (start_inferior): Handle wrapper_argv. If set, expect an extra
14417 trap.
14418 (gdbserver_usage): Document --wrapper.
14419 (main): Parse --wrapper.
14420
144212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14422
14423 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14424 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14425 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14426 (ppc_set_pc): Likewise.
14427 (ppc_arch_setup): New function.
14428 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14429 of collect_register.
14430 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14431
144322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14433
14434 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14435 instead of linux-ppc64-low.o.
14436 * linux-ppc64-low.c: Remove file.
14437 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14438 (linux-ppc64-low.o): Remove rule.
14439
14440 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14441 (init_registers_powerpc_64): Likewise.
14442 (ppc_regmap): Conditionally define depending on __powerpc64__.
14443 (ppc_cannot_store_register): Do not special-case "fpscr" when
14444 compiled on __powerpc64__.
14445 (ppc_collect_ptrace_register): New function.
14446 (ppc_supply_ptrace_register): New function.
14447 (ppc_breakpoint): Change type to "unsigned int".
14448 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14449 (the_low_target): Conditionally provide initializers for the
14450 arch_setup member depending on __powerpc64__. Install
14451 collect_ptrace_register and supply_ptrace_register members.
14452
144532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14454
14455 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14456 * server.c (gdbserver_xmltarget): Define.
14457 (get_features_xml): Use it to replace "target.xml" and arch_string.
14458
14459 * configure.srv: Remove srv_xmltarget. Add XML files that were
14460 mentioned there to srv_xmlfiles instead. Remove conditional tests
14461 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14462 srv_xmlfiles and srv_regobj to include all possible choices.
14463 * configure.ac (srv_xmltarget): Remove.
14464 (srv_xmlfiles): Do not add "target.xml".
14465 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14466 checks for supplementary target information.
14467 * configure: Regenerate.
14468 * Makefile.in (XML_TARGET): Remove.
14469 (target.xml): Remove rule.
14470 (clean): Do not clean up target.xml.
14471 (.PRECIOUS): Do not mention target.xml.
14472
14473 * target.h (struct target_ops): Remove arch_string member.
14474 * linux-low.c (linux_arch_string): Remove.
14475 (linux_target_ops): Remove arch_string initializer.
14476 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14477 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14478 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14479 * spu-low.c (spu_arch_string): Remove.
14480 (spu_target_ops): Remove arch_string initializer.
14481 * win32-low.c (win32_arch_string): Remove.
14482 (win32_target_ops): Remove arch_string initializer.
14483 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14484 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14485 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14486
144872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14488
14489 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14490 by collect_ptrace_register and supply_ptrace_register hooks.
14491 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14492 instead of checking for the_low_target.left_pad_xfer.
14493 (usr_store_inferior_registers): Use collect_ptrace_register callback
14494 instead of checking for the_low_target.left_pad_xfer.
14495
14496 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14497 (s390_supply_ptrace_register): Likewise.
14498 (s390_fill_gregset): Call s390_collect_ptrace_register.
14499 (the_low_target): Update.
14500
14501 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14502 (ppc_supply_ptrace_register): Likewise.
14503 (the_low_target): Update.
14504
14505 * linux-i386-low.c (the_low_target): Update.
14506 * linux-x86-64-low.c (the_low_target): Update.
14507
145082008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14509
14510 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14511 reg-s390.o and reg-s390x.o.
14512
14513 * linux-low.c (new_inferior): New global variable.
14514 (linux_create_inferior, linux_attach): Set it.
14515 (linux_wait_for_process): Call the_low_target.arch_setup after the
14516 target has stopped for the first time.
14517 (initialize_low): Do not call the_low_target.arch_setup.
14518
14519 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14520 (s390_set_pc): Likewise.
14521 (s390_arch_setup): New function.
14522 (the_low_target): Use s390_arch_setup as arch_setup routine.
14523
14524 * regcache.c (realloc_register_cache): New function.
14525 (set_register_cache): Call it for each existing regcache.
14526
145272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14528
14529 * server.h (init_registers): Remove prototype.
14530
14531 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14532 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14533 instead of init_registers ().
14534 * linux-arm-low.c (init_registers_arm): Add prototype.
14535 (init_registers_arm_with_iwmmxt): Likewise.
14536 (the_low_target): Add initializer for arch_setup field.
14537 * linux-cris-low.c (init_registers_cris): Add prototype.
14538 (the_low_target): Add initializer for arch_setup field.
14539 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14540 (the_low_target): Add initializer for arch_setup field.
14541 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14542 (the_low_target): Add initializer for arch_setup field.
14543 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14544 (the_low_target): Add initializer for arch_setup field.
14545 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14546 (the_low_target): Add initializer for arch_setup field.
14547 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14548 (the_low_target): Add initializer for arch_setup field.
14549 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14550 (init_registers_mips64_linux): Likewise.
14551 (the_low_target): Add initializer for arch_setup field.
14552 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14553 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14554 (the_low_target): Add initializer for arch_setup field.
14555 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14556 (init_registers_powerpc_64): Likewise.
14557 (the_low_target): Add initializer for arch_setup field.
14558 * linux-s390-low.c (init_registers_s390): Add prototype.
14559 (init_registers_s390x): Likewise.
14560 (the_low_target): Add initializer for arch_setup field.
14561 * linux-sh-low.c (init_registers_sh): Add prototype.
14562 (the_low_target): Add initializer for arch_setup field.
14563 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14564 (the_low_target): Add initializer for arch_setup field.
14565 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14566 (the_low_target): Add initializer for arch_setup field.
14567
14568 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14569 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14570 instead of init_registers ().
14571 * win32-arm-low.c (init_registers_arm): Add prototype.
14572 (the_low_target): Add initializer for arch_setup field.
14573 * win32-i386-low.c (init_registers_i386): Add prototype.
14574 (the_low_target): Add initializer for arch_setup field.
14575
14576 * spu-low.c (init_registers_spu): Add prototype.
14577 (initialize_low): Call initialie_registers_spu () instead of
14578 initialize_registers ().
14579
145802008-02-19 Pedro Alves <pedro@codesourcery.com>
14581
14582 * server.c (handle_v_requests): When handling the vRun and vAttach
14583 packets, if already debugging a process, don't kill it. Return an
14584 error instead.
14585
145862008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * server.c (handle_query): Correct length check.
14589
145902008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14591
14592 * win32-low.c (do_initial_child_stuff): Add process handle
14593 parameter. Set current_process_handle and current_process_id from the
14594 parameters. Clear globals.
14595 (win32_create_inferior): Don't set current_process_handle and
14596 current_process_id here. Instead pass them on the call to
14597 do_initial_child_stuff.
14598 (win32_attach): Likewise.
14599 (win32_clear_inferiors): New.
14600 (win32_kill): Don't close the current process handle or the
14601 current thread handle here. Instead call win32_clear_inferiors.
14602 (win32_detach): Don't open a new handle to the process. Call
14603 win32_clear_inferiors.
14604 (win32_join): Don't rely on current_process_handle; open a new
14605 handle using the process id.
14606 (win32_wait): Call win32_clear_inferiors when the inferior process
14607 has exited.
14608
146092008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * server.c (monitor_show_help): Add "exit".
14612
146132008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14614
14615 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14616 (clean): Add reg-xtensa.c.
14617 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14618 * configure.srv (xtensa*-*-linux*) New target.
14619 * linux-xtensa-low.c: New.
14620 * xtensa-xtregs.c: New.
14621
146222008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14623
14624 * hostio.c: Don't include errno.h.
14625 (errno_to_fileio_errno): Move to hostio-errno.
14626 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14627 error number outputting to the target->hostio_last_error callback.
14628 (hostio_packet_error): Use FILEIO_EINVAL directly.
14629 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14630 calls to hostio_error.
14631 * hostio-errno.c: New.
14632 * server.h (hostio_last_error_from_errno): Declare.
14633 * target.h (target_ops): Add hostio_last_error member.
14634 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14635 as hostio_last_error handler.
14636 * spu-low.c (spu_target_ops): Likewise.
14637 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14638 (wince_hostio_last_error): New functions.
14639 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14640 as hostio_last_error handler.
14641 (win32_target_ops) [!_WIN32_WCE]: Register
14642 hostio_last_error_from_errno as hostio_last_error handler.
14643 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14644 (hostio-errno.o): New rule.
14645 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14646 * configure.srv (srv_hostio_err_objs): New variable. Default to
14647 hostio-errno.o.
14648 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14649 * configure: Regenerate.
14650
146512008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14652
14653 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14654 (linux_kill, linux_detach): Clean up the process list.
14655 * remote-utils.c (remote_open): Improve port number parsing.
14656 (putpkt_binary, input_interrupt): Only send interrupts if the target
14657 is running.
14658 * server.c (extended_protocol): Make static.
14659 (attached): Define earlier.
14660 (exit_requested, response_needed, program_argv): New variables.
14661 (target_running): New.
14662 (start_inferior): Clear attached here.
14663 (attach_inferior): Set attached here.
14664 (require_running): Define.
14665 (handle_query): Use require_running and target_running. Implement
14666 "monitor exit".
14667 (handle_v_attach, handle_v_run): New.
14668 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14669 (gdbserver_usage): Update.
14670 (main): Redo argument parsing. Handle --debug and --multi. Handle
14671 --attach along with other options or after the port. Save
14672 program_argv. Support no initial program. Resynchronize
14673 communication with GDB after an error. Handle "monitor exit".
14674 Use require_running and target_running. Always allow the extended
14675 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14676 restart in extended mode.
14677 * README: Refer to the GDB manual. Update --attach usage.
14678
146792007-12-20 Andreas Schwab <schwab@suse.de>
14680
14681 * linux-low.c (STACK_SIZE): Define.
14682 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14683 (linux_test_for_tracefork): Likewise.
14684
146852007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * linux-low.c (linux_wait_for_event): Update messages. Do not
14688 reinsert auto-delete breakpoints.
14689 * mem-break.c (struct breakpoint): Change return type of handler to
14690 int.
14691 (set_breakpoint_at): Update handler type.
14692 (reinsert_breakpoint_handler): Return 1 instead of calling
14693 delete_breakpoint.
14694 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14695 setting a new one.
14696 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14697 * mem-break.h (set_breakpoint_at): Update handler type.
14698 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14699 * win32-low.c (auto_delete_breakpoint): New.
14700 (get_child_debug_event): Use it.
14701
147022007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * configure.ac: Check for pread and pwrite.
14705 * hostio.c (handle_pread): Fall back to lseek and read.
14706 (handle_pwrite): Fall back to lseek and write.
14707 * config.in, configure: Regenerated.
14708
147092007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * server.c (myresume): Add own_buf argument.
14712 (main): Update calls.
14713
147142007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14717 * remote-utils.c (remote_open): Do not call disable_async_io.
14718 (block_async_io): Delete.
14719 (unblock_async_io): Make static.
14720 (initialize_async_io): New.
14721 * server.c (handle_v_cont): Handle async I/O here.
14722 (myresume): Likewise. Move other common resume tasks here...
14723 (main): ... from here. Call initialize_async_io. Disable async
14724 I/O before the main loop.
14725 * server.h (initialize_async_io): Declare.
14726 (block_async_io, unblock_async_io): Delete prototypes.
14727 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14728
147292007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14730
14731 * remote-utils.c (readchar): Allow binary data in received messages.
14732
147332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14734
14735 * win32-low.c (attaching): New global.
14736 (win32_create_inferior): Clear the `attaching' global.
14737 (win32_attach): Set the `attaching' global.
14738 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14739 attaching. Only set a breakpoint at the entry point if not
14740 attaching.
14741
147422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14743
14744 * server.c (main): Don't report dll events on the initial
14745 connection on attaches.
14746
147472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * server.c (main): Relax numerical bases supported for the pid of
14750 the --attach command line argument.
14751
147522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14753
14754 * win32-low.c (win32_attach): Call OpenProcess before
14755 DebugActiveProcess, not after. Add last error output to error
14756 call.
14757
147582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14759
14760 * win32-low.c (win32_get_thread_context)
14761 (win32_set_thread_context): New functions.
14762 (thread_rec): Use win32_get_thread_context.
14763 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14764 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14765 field.
14766
147672007-12-03 Leo Zayas
14768 Pedro Alves <pedro_alves@portugalmail.pt>
14769
14770 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14771 global variables.
14772 (child_add_thread): Minor cleanup.
14773 (child_continue): Resume artificially suspended threads before
14774 calling ContinueDebugEvent.
14775 (suspend_one_thread): New.
14776 (fake_breakpoint_event): New.
14777 (get_child_debug_event): Change return type to int. Check here if
14778 gdb sent an interrupt request. If a soft interrupt was requested,
14779 fake a breakpoint event. Return 0 if there is no event to handle,
14780 and 1 otherwise.
14781 (win32_wait): Don't check here if gdb sent an interrupt request.
14782 Ensure there is a valid event to handle.
14783 (win32_request_interrupt): Add soft interruption method as last
14784 resort.
14785
147862007-12-03 Leo Zayas
14787 Pedro Alves <pedro_alves@portugalmail.pt>
14788
14789 * win32-low.h (win32_thread_info): Add descriptions to the
14790 structure members. Replace `suspend_count' counter by a
14791 `suspended' flag.
14792 * win32-low.c (thread_rec): Update condition of when to get the
14793 context from the inferior. Rely on ContextFlags being set if it
14794 has already been retrieved. Only suspend the inferior thread if
14795 we haven't already. Warn if that fails.
14796 (continue_one_thread): s/suspend_count/suspended/. Only call
14797 ResumeThread once. Warn if that fails.
14798
147992007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14800
14801 * win32-low.c (win32_wait): Don't read from the inferior when it
14802 has already exited.
14803
148042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14805
14806 * Makefile.in (win32_low_h): New variable.
14807 (win32-low.o): Add dependency on $(win32_low_h).
14808 (win32-arm-low.o, win32-i386-low.o): New rules.
14809
148102007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * hostio.c: Correct copyright year.
14813
148142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * Makefile.in (OBS): Add hostio.o.
14817 (hostio.o): New rule.
14818 * server.h (handle_vFile): Declare.
14819 * hostio.c: New file.
14820 * server.c (handle_v_requests): Take packet_len and new_packet_len
14821 for binary packets. Call handle_vFile.
14822 (main): Update call to handle_v_requests.
14823
148242007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * linux-low.c: Include <sched.h>.
14827
148282007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14829
14830 * linux-low.c (linux_tracefork_grandchild): New.
14831 (linux_tracefork_child): Use clone.
14832 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14833
148342007-10-31 Joel Brobecker <brobecker@adacore.com>
14835
14836 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14837
148382007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14839
14840 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14841
148422007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14843
14844 * inferiors.c (change_inferior_id): Delete.
14845 (add_pid_to_list, pull_pid_from_list): New.
14846 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14847 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14848 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14849 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14850 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14851 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14852 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14853 (using_threads): Always set to 1.
14854 (handle_extended_wait): New.
14855 (add_process): Do not set TID.
14856 (linux_create_inferior): Set must_set_ptrace_flags.
14857 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14858 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14859 (linux_thread_alive): Rename TID argument to LWPID.
14860 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14861 (linux_wait_for_event): Do not use TID or check using_threads. Update
14862 call to dead_thread_notify. Call handle_extended_wait.
14863 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14864 (send_sigstop): Delete sigstop_sent.
14865 (wait_for_sigstop): Avoid TID.
14866 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14867 (linux_test_for_tracefork): New.
14868 (linux_lookup_signals): Use thread_db_active and
14869 linux_supports_tracefork_flag.
14870 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14871 * linux-low.h (get_process_thread): Avoid TID.
14872 (struct process_ifo): Move thread_known and tid to the end. Remove
14873 sigstop_sent.
14874 (linux_attach_lwp, thread_db_init): Update prototypes.
14875 * server.h (change_inferior_id): Delete prototype.
14876 (add_pid_to_list, pull_pid_from_list): New prototypes.
14877 * thread-db.c (thread_db_use_events): New.
14878 (find_first_thread): Rename to...
14879 (find_one_thread): ...this. Update callers and messages. Do not
14880 call fatal. Check thread_db_use_events. Do not call
14881 change_inferior_id or new_thread_notify.
14882 (maybe_attach_thread): Update. Do not call new_thread_notify.
14883 (thread_db_init): Set thread_db_use_events. Check use_events.
14884 * utils.c (fatal, warning): Correct message prefix.
14885
148862007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14887
14888 * Makefile.in (clean): Remove new files.
14889 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14890 (powerpc-64.o, powerpc-64.c): New rules.
14891 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14892 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14893 with SPE.
14894 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14895 SPE targets.
14896 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14897 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14898 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14899 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14900 (target_regsets): Add AltiVec and SPE register sets.
14901 * configure.ac: Check for AltiVec and SPE.
14902 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14903 (ppc_fill_vrregset, ppc_store_vrregset): New.
14904 (target_regsets): Add AltiVec register set.
14905 * configure: Regenerated.
14906
149072007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14908
14909 * linux-low.c (O_LARGEFILE): Define.
14910 (linux_read_memory): Use /proc/PID/mem.
14911 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14912 * configure, config.in: Regenerated.
14913
149142007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * linux-low.c (linux_wait_for_event): Do not pass signals while
14917 single-stepping.
14918
149192007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14920
14921 * win32-low.c (create_process): New.
14922 (win32_create_inferior): Use create_process instead of
14923 CreateProcess. If create_process failed retry appending an ".exe"
14924 suffix. Store the GetLastError result immediatelly after
14925 create_process calls and use it on the call to error.
14926
149272007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14928
14929 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14930
149312007-08-23 Joel Brobecker <brobecker@adacore.com>
14932
14933 * configure.ac: Switch license to GPLv3.
14934
149352007-08-01 Michael Snyder <msnyder@access-company.com>
14936
14937 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14938
149392007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14940
14941 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14942 typedef.
14943 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14944 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14945 CloseToolhelp32Snapshot.
14946 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14947 CloseToolhelp32Snapshot.
14948
149492007-07-27 Michael Snyder <michael.snyder@access-company.com>
14950
14951 * server.c (main): Check for inferior exit before main loop.
14952
149532007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14954
14955 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14956 instead of on tmp_desc.
14957
149582007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14959 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14962 (add_thread): Minor cleanups.
14963 (clear_inferiors): Move lower in the file. Clear the DLL
14964 list.
14965 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14966 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14967 (xml_escape_text): New.
14968 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14969 for qSupported.
14970 (handle_v_cont): Report errors.
14971 (gdbserver_version): Update.
14972 (main): Correct size of own_buf. Do not report initial DLL events.
14973 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14974 (unloaded_dll, xml_escape_text): New.
14975 * win32-low.c (enum target_waitkind): Update comments.
14976 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14977 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14978 (win32_EnumProcessModules, win32_GetModuleInformation)
14979 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14980 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14981 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14982 (win32_Module32First, win32_Module32Next, load_toolhelp)
14983 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14984 (get_child_debug_event): Handle DLL events.
14985 (win32_wait): Likewise.
14986
149872007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14990 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14991
149922007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14993
14994 * win32-low.c (handle_output_debug_string): Ignore event if not
14995 waiting.
14996
149972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14998
14999 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15000
150012007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15004
150052007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15006
15007 * inferiors.c (change_inferior_id): Add comment.
15008 * linux-low.c (check_removed_breakpoint): Add an early
15009 prototype. Improve debug output.
15010 (linux_attach): Doc update.
15011 (linux_detach_one_process, linux_detach): Clean up before releasing
15012 each process.
15013 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15014 * linux-low.h (struct process_info): Doc improvement.
15015 * mem-break.c (delete_all_breakpoints): New.
15016 * mem-break.h (delete_all_breakpoints): New prototype.
15017 * thread-db.c (find_first_thread): New.
15018 (thread_db_create_event): Call it instead of
15019 thread_db_find_new_threads. Clean up unused variables.
15020 (maybe_attach_thread): Remove first thread handling.
15021 (thread_db_find_new_threads): Use find_first_thread.
15022 (thread_db_get_tls_address): Likewise.
15023
150242007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * thread-db.c (thread_db_find_new_threads): Add prototype.
15027 (thread_db_create_event): Check for the main thread before adding
15028 a new thread.
15029 (maybe_attach_thread): Only enable event reporting if TID == 0.
15030 (thread_db_get_tls_address): Check for new threads.
15031
150322007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15033
15034 * linux-low.c (linux_create_inferior): Try execv before execvp.
15035 * spu-low.c (spu_create_inferior): Likewise.
15036
150372007-06-13 Mike Frysinger <vapier@gentoo.org>
15038
15039 * linux-low.c (linux_create_inferior): Change execv to execvp.
15040 * spu-low.c (spu_create_inferior): Likewies.
15041
150422007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15043
15044 * Makefile.in (clean): Clean new files instead of deleted ones.
15045 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15046 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15047 rules.
15048 * configure.srv: Specify XML files and new regformats for MIPS and
15049 MIPS64 GNU/Linux.
15050 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15051 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15052 an entry for the restart register.
15053 (mips_cannot_fetch_register, mips_cannot_store_register)
15054 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15055 register names to match the XML descriptions.
15056 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15057 restart register instead of $0.
15058
150592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15060 Markus Deuling <deuling@de.ibm.com>
15061
15062 * remote-utils.c (decode_xfer_write): New function.
15063 * server.h (decode_xfer_write): Add prototype.
15064 * server.c (handle_query): Add PACKET_LEN argument. Support
15065 qXfer:spu:read and qXfer:spu:write packets.
15066 (main): Pass packet_len to handle_query.
15067 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15068 * target.h (target_ops): Add qxfer_spu.
15069
150702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15071
15072 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15073 accessing non-seekable spufs files.
15074
150752007-05-16 Markus Deuling <deuling@de.ibm.com>
15076
15077 * server.c (handle_query): Add reply for qC packet.
15078
150792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15080 Leo Zayas <lerele@champenstudios@com>
15081
15082 * server.h (check_remote_input_interrupt_request): New function.
15083 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15084 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15085 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15086 (check_remote_input_interrupt_request): New function.
15087 * server.h (check_remote_input_interrupt_request): Declare.
15088 * win32-low.c (winapi_DebugBreakProcess,
15089 winapi_GenerateConsoleCtrlEvent): New typedefs.
15090 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15091 to 250 ms.
15092 (win32_wait): Check for remote interrupt request
15093 with check_remote_input_interrupt_request.
15094 (win32_request_interrupt): New function.
15095 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15096
150972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15098
15099 * win32-low.c (debug_registers_changed,
15100 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15101 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15102 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15103 (thread_rec): Get context using the low target.
15104 (child_add_thread): Call thread_added on the low target,
15105 which does the same thing.
15106 (regptr): Delete.
15107 (do_initial_child_stuff): Remove debug registers references.
15108 Set context using the low target. Resume threads after
15109 setting the contexts.
15110 (child_continue): Remove dead variable. Remove debug
15111 registers references.
15112 (child_fetch_inferior_registers): Go through the low target.
15113 (do_child_store_inferior_registers): Remove.
15114 (child_store_inferior_registers): Go through the low target.
15115 (win32_resume): Remove debug registers references.
15116 Set context using the low target.
15117 (handle_exception): Change return type to void. Don't record
15118 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15119 first chance exception.
15120 (get_child_debug_event): Change return type to void. Remove
15121 goto loop. Always return after waiting for debug event.
15122 (win32_wait): Convert to switch statement. Handle spurious
15123 events.
15124
15125 * win32-i386-low.c (debug_registers_changed,
15126 debug_registers_used): New.
15127 (initial_stuff): Rename to ...
15128 (i386_initial_stuff): ... this. Clear debug registers
15129 state variables.
15130 (store_debug_registers): Delete.
15131 (i386_get_thread_context): New.
15132 (load_debug_registers): Delete.
15133 (i386_set_thread_context): New.
15134 (i386_thread_added): New.
15135 (single_step): Rename to ...
15136 (i386_single_step): ... this.
15137 (do_fetch_inferior_registers): Rename to ...
15138 (i386_fetch_inferior_register): ... this.
15139 (i386_store_inferior_register): New.
15140 (the_low_target): Adapt to new interface.
15141
15142 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15143 (arm_get_thread_context): New.
15144 (arm_set_thread_context): New.
15145 (regptr): New.
15146 (do_fetch_inferior_registers): Rename to ...
15147 (arm_fetch_inferior_register): ... this.
15148 (arm_store_inferior_register): New.
15149 (arm_wince_breakpoint): Reimplement as unsigned long.
15150 (arm_wince_breakpoint_len): Define.
15151 (the_low_target): Adapt to new interface.
15152
15153 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15154 load_debug_registers. Add get_thread_context, set_thread_context,
15155 thread_added and store_inferior_register. Rename
15156 fetch_inferior_registers to fetch_inferior_register.
15157 (regptr): Remove declaration.
15158
151592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15160
15161 * linux-low.c (linux_detach): Change return type to int. Return 0.
15162 * spu-low.c (spu_detach): Likewise.
15163
151642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15165
15166 * target.h (target_ops): Change return type of detach to int.
15167 Add join.
15168 (join_inferior): New.
15169 * server.c (main): Don't skip detach support on mingw32.
15170 If the inferior doesn't support detaching return error.
15171 Call join_inferior instead of using waitpid.
15172 * linux-low.c (linux_join): New.
15173 (linux_target_op): Add linux_join.
15174 * spu-low.c (spu_join): New.
15175 (spu_target_ops): Add spu_join.
15176 * win32-low.c (win32_detach): Adapt to new interface.
15177 Reopen current_process_handle before detaching. Issue a child
15178 resume before detaching.
15179 (win32_join): New.
15180 (win32_target_op): Add win32_join.
15181
151822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15183
15184 * win32-low.c (win32-attach): Fix return value.
15185 * target.h (target_ops): Describe ATTACH return values.
15186
151872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15188
15189 * win32-low.c (GETPROCADDRESS): Define.
15190 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15191 (winapi_DebugSetProcessKillOnExit): Likewise.
15192 (win32_create_inferior): Force usage of ansi CreateProcessA.
15193 (win32_attach): Use GETPROCADDRESS.
15194 (win32_detach): Likewise.
15195
151962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15197
15198 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15199
152002007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15201
15202 * win32-low.c: Commit leftover changes from 2007-03-29.
15203
152042007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15205
15206 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15207 fields short instead of int. Add explicit padding.
15208 (i387_cache_to_fsave): Remove unnecessary casts.
15209 (i387_fsave_to_cache): Doc fix.
15210 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15211
152122007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15213
15214 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15215 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15216
152172007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15218
15219 * configure.srv (arm*-*-mingw32ce*): Move near the other
15220 arm targets.
15221
152222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15223
15224 * configure.ac: Add errno checking.
15225 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15226 sys/file.h and malloc.h.
15227 (AC_CHECK_DECLS): Add perror.
15228 (srv_mingwce): Handle.
15229 * configure.srv (i[34567]86-*-cygwin*): Add
15230 win32-i386-low.o to srv_tgtobj.
15231 (i[34567]86-*-mingw*): Likewise.
15232 (arm*-*-mingw32ce*): Add case.
15233 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15234 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15235 [__MINGW32CE__] (strerror): New function.
15236 [__MINGW32CE__] (errno): Define to GetLastError.
15237 [__MINGW32CE__] (COUNTOF): New macro.
15238 (remote_open): Remove extra close call.
15239 * mem-break.c (delete_breakpoint_at): New function.
15240 * mem-break.h (delete_breakpoint_at): Declare.
15241 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15242 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15243 [USE_WIN32API] (read, write): Add char* casts.
15244 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15245 * server.h: Include wincecompat.h on Windows CE.
15246 [HAVE_ERRNO_H]: Check.
15247 (perror): Declare if not declared.
15248 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15249 (perror_with_name): Remove errno declaration.
15250 * wincecompat.h: New.
15251 * wincecompat.c: New.
15252 * win32-low.h: New.
15253 * win32-arm-low.c: New.
15254 * win32-i386-low.c: New.
15255 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15256 (OUTMSG2): Make it safe.
15257 (_T): New macro.
15258 (COUNTOF): New macro.
15259 (NUM_REGS): Get it from the low target.
15260 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15261 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15262 (thread_rec): Let low target handle debug registers.
15263 (child_add_thread): Likewise.
15264 (child_init_thread_list): Likewise.
15265 (continue_one_thread): Likewise.
15266 (regptr): New.
15267 (do_child_fetch_inferior_registers): Move to ...
15268 * win32-i386-low.c: ... here, and rename to ...
15269 (do_fetch_inferior_registers): ... this.
15270 * win32-low.c (child_fetch_inferior_registers):
15271 Go through the low target.
15272 (do_child_store_inferior_registers): Use regptr.
15273 (strwinerror): New function.
15274 (win32_create_inferior): Handle Windows CE.
15275 Use strwinerror instead of strerror on Windows error
15276 codes. Add program to the error output.
15277 Don't close the main thread handle on Windows CE.
15278 (win32_attach): Use coredll.dll on Windows CE.
15279 (win32_kill): Close current process and current
15280 thread handles.
15281 (win32_detach): Use coredll.dll on Windows CE.
15282 (win32_resume): Let low target handle debug registers, and
15283 step request.
15284 (handle_exception): Add/Remove initial breakpoint. Avoid
15285 non-existant WSTOPSIG on Windows CE.
15286 (win32_read_inferior_memory): Cast to remove warning.
15287 (win32_arch_string): Go through the low target.
15288 (initialize_low): Call set_breakpoint_data with the low
15289 target's breakpoint.
15290 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15291 FOP_REGNUM, mappings): Move to ...
15292 * win32-i386-low.c: ... here.
15293 * win32-low.c (win32_thread_info): Move to ...
15294 * win32-low.h: ... here.
15295 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15296 win32-arm-low.c and wincecompat.c.
15297 (all:): Add $EXEEXT.
15298 (install-only:): Likewise.
15299 (gdbserver:): Likewise.
15300 (gdbreplay:): Likewise.
15301 * config.in: Regenerate.
15302 * configure: Regenerate.
15303
153042007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15305
15306 * win32-low.c: Rename typedef thread_info to
15307 win32_thread_info throughout.
15308
153092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15310
15311 * win32-i386-low.c: Rename to ...
15312 * win32-low.c: ... this.
15313 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15314 * Makefile.in: Likewise.
15315
153162007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15317
15318 * remote-utils.c (monitor_output): Constify msg parameter.
15319 * server.h (monitor_output): Likewise.
15320 * win32-i386-low.c (handle_output_debug_string): New.
15321 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15322 handle_output_debug_string.
15323 (get_child_debug_event): Likewise.
15324
153252007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15326
15327 * server.c (main): Correct strtoul check.
15328
153292007-03-27 Jon Ringle <jon@ringle.org>
15330
15331 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15332
153332007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15334
15335 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15336
153372007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15338
15339 * terminal.h: Check HAVE_SGTTY_H.
15340
153412007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15342
15343 * remote-utils.c (remote_open): Print out the assigned port number.
15344
153452007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15346
15347 * remote-utils.c (monitor_output): New function.
15348 * server.c (debug_threads): Define here.
15349 (monitor_show_help): New function.
15350 (handle_query): Handle qRcmd.
15351 (main): Do not handle 'd' packet.
15352 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15353 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15354 of debug_threads.
15355
153562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15357
15358 * Makefile.in (EXEEXT): New.
15359 (clean): Use $(EXEEXT).
15360
153612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15362
15363 * target.h (target_ops): Rename send_signal to request_interrupt,
15364 and remove enum target_signal parameter.
15365 * linux-low.c (linux_request_interrupt): Rename from
15366 linux_send_signal, and always send SIGINT.
15367 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15368 and always send SIGINT.
15369 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15370 of send_signal.
15371 (input_interrupt): Likewise.
15372
153732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15374
15375 * server.c (get_features_xml): Check if target implemented
15376 arch_string.
15377 * win32-i386-low.c (win32_arch_string): New.
15378 (win32_target_ops): Add win32_arch_string as arch_string member.
15379
153802007-02-22 Markus Deuling <deuling@de.ibm.com>
15381
15382 * spu-low.c (spu_arch_string): New.
15383 (spu_target_ops): Add spu_arch_string.
15384
153852007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15386
15387 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15388 * configure.ac: Do not check for terminal.h.
15389 * configure, config.in: Regenerated.
15390
153912007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * Makefile.in (OBS): Add $(XML_BUILTIN).
15394 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15395 (clean): Update.
15396 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15397 (arm-with-iwmmxt.c): New.
15398 * config.in, configure: Regenerate.
15399 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15400 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15401 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15402 (arm*-*-linux*): Add iWMMXt and regset support.
15403 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15404 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15405 (arm_store_wmmxregset, target_regsets): New.
15406 * server.c (get_features_xml): Take annex argument. Check builtin
15407 XML documents.
15408 (handle_query): Handle multiple annexes.
15409
154102007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * remote-utils.c [USE_WIN32API] (read, write): Define.
15413 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15414 write.
15415
154162007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * linux-i386-low.c (the_low_target): Set arch_string.
15419 * linux-x86-64-low.c (the_low_target): Likewise.
15420 * linux-low.c (linux_arch_string): New.
15421 (linux_target_ops): Add it.
15422 * linux-low.h (struct linux_target_ops): Add arch_string.
15423 * server.c (write_qxfer_response): Use const void * for DATA.
15424 (get_features_xml): New.
15425 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15426 * target.h (struct target_ops): Add arch_string method.
15427
154282007-01-03 Denis Pilat <denis.pilat@st.com>
15429 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * linux-low.c (linux_kill): Handle being called with no threads.
15432 * win32-i386-low.c (win32_kill): Likewise.
15433 (get_child_debug_event): Clear current_process_handle.
15434
154352006-12-30 Denis PILAT <denis.pilat@st.com>
15436 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * remote-utils.c (remote_open): Check the type of specified
15439 serial port devices before opening them.
15440 * server.c (main): Kill the inferior if an error occurs during
15441 the first remote_open.
15442
154432006-12-05 Markus Deuling <deuling@de.ibm.com>
15444
15445 * README: Update supported targets.
15446
154472006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15448
15449 * Makefile.in (clean): Remove reg-mips64.c.
15450 (reg-mips64.c, reg-mips64.o): New rules.
15451 * configure.srv: Handle mips64. Include regset support for mips.
15452 * linux-mips-low.c (union mips_register): New.
15453 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15454 (mips_breakpoint, mips_breakpoint_at): Use int.
15455 (mips_collect_register, mips_supply_register)
15456 (mips_collect_register_32bit, mips_supply_register_32bit)
15457 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15458 (mips_store_fpregset, target_regsets): New.
15459 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15460
154612006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15462
15463 * configure.srv: Add target "spu*-*-*".
15464 * Makefile.in (clean): Remove reg-spu.c.
15465 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15466 * spu-low.c: New file.
15467
154682006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15469
15470 * configure.ac: Correct td_thr_tls_get_addr test.
15471 * configure: Regenerated.
15472
154732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15474
15475 * linux-low.c (linux_wait_for_event): Reformat. Use the
15476 pass_signals array.
15477 * remote-utils.c (decode_address_to_semicolon): New.
15478 * server.c (pass_signals, handle_general_set): New.
15479 (handle_query): Mention QPassSignals for qSupported.
15480 (main): Call handle_general_set.
15481 * server.h (pass_signals, decode_address_to_semicolon): New.
15482
154832006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * server.c (handle_query): Correct error handling for read_auxv.
15486
154872005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15488
15489 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15490 and srv_linux_thread_db to yes.
15491 * linux-s390-low.c (s390_fill_gregset): New function.
15492 (target_regsets): Define data structure.
15493
154942006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15497 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15498 * config.in, configure: Regenerated.
15499 * inferiors.c (gdb_id_to_thread): New function.
15500 (gdb_id_to_thread_id): Use it.
15501 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15502 * linux-low.h (struct process_info): Add th member.
15503 (thread_db_get_tls_address): New prototype.
15504 * remote-utils.c (decode_address): Make non-static.
15505 * server.c (handle_query): Handle qGetTLSAddr.
15506 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15507 * target.h (struct target_ops): Add get_tls_address.
15508 * thread-db.c (maybe_attach_thread): Save the thread handle.
15509 (thread_db_get_tls_address): New.
15510
155112006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15514 (linux_resume_one_process): Take a siginfo_t *. Update all
15515 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15516 (struct pending_signals): Add a siginfo_t.
15517 (linux_wait_for_process): Always set last_status.
15518 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15519 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15520 * linux-low.h (struct process_info): Add last_status.
15521
155222006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * remote-utils.c (try_rle): New function.
15525 (putpkt_binary): Use it.
15526
155272006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15528
15529 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15530 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15531 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15532 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15533 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15534 point registers.
15535
155362006-08-08 Richard Sandiford <richard@codesourcery.com>
15537
15538 * server.c (terminal_fd): New variable.
15539 (old_foreground_pgrp): Likewise.
15540 (restore_old_foreground_pgrp): New function.
15541 (start_inferior): Record the terminal file descriptor in terminal_fd
15542 and its original foreground group in old_foreground_pgrp. Register
15543 restore_old_foreground_pgrp with atexit().
15544
155452006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * server.c (handle_query): Correct qPart to qXfer.
15548
155492006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15550
15551 * configure.ac: Check for more headers which are missing on
15552 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15553 * configure.srv: Add Cygwin and mingw32.
15554 * remote-utils.c: Don't include headers unconditionally which
15555 are missing on mingw32. Include <winsock.h> for mingw32.
15556 (remote_open): Adjust for mingw32 support. Flush
15557 standard error after writing to it.
15558 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15559 (unblock_async_io, enable_async_io, disable_async_io)
15560 (readchar, getpkt): Update for Winsock support.
15561 (prepare_resume_reply): Expect a protocol signal number.
15562 * server.c: Disable <sys/wait.h> on mingw32.
15563 (start_inferior): Adjust for mingw32 support. Flush
15564 standard error after writing to it.
15565 (attach_inferior): Likewise. Use protocol signal
15566 numbers.
15567 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15568 and names.
15569 * win32-i386-low.c: New file.
15570 * Makefile.in (XM_CLIBS): Set.
15571 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15572 (win32-i386-low.o): New dependency rule.
15573 * linux-low.c (linux_wait): Use target signal numbers.
15574 * target.h (struct target_ops): Doc fix.
15575 * server.h (target_signal_to_name): New prototype.
15576 * gdbreplay.c: Don't include headers unconditionally which
15577 are missing on mingw32. Include <winsock.h> for mingw32.
15578 (remote_close, remote_open): Adjust for Winsock support.
15579 * configure, config.in: Regenerated.
15580
155812006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15582
15583 * server.c (decode_xfer_read, write_qxfer_response): New.
15584 (handle_query): Take a packet length argument. Handle
15585 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15586 the qSupported response.
15587 (main): Update call to handle_query.
15588
155892006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15590
15591 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15592 (putpkt_binary): Renamed from putpkt and adjusted for binary
15593 data.
15594 (putpkt): New wrapper for putpkt_binary.
15595 (readchar): Don't mask off the high bit.
15596 (decode_X_packet): New function.
15597 * server.c (main): Call putpkt_binary if a handler sets the packet
15598 length. Save the length of the incoming packet. Handle 'X'.
15599 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15600
156012006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15602
15603 * server.c (handle_query): Handle qSupported.
15604
156052006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * remote-utils.c (all_symbols_looked_up): New variable.
15608 (look_up_one_symbol): Check it.
15609 * server.h (look_up_one_symbol): New declaration.
15610 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15611
156122006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * Makefile.in (linux-arm-low.o): Update dependencies.
15615 * linux-arm-low.c: Include "gdb_proc_service.h".
15616 (PTRACE_GET_THREAD_AREA): Define.
15617 (ps_get_thread_area): New function.
15618
156192006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15620
15621 * configure.srv (m68k*-*-uclinux*): New target.
15622 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15623 (linux_resume_one_process): Remove extraneous cast.
15624 (linux_read_offsets): New.
15625 (linux_target_op): Add linux_read_offsets on mmuless systems.
15626 * server.c (handle_query): Add qOffsets logic.
15627 * target.h (struct target_ops): Add read_offsets.
15628
156292006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15632 (PTRACE_GET_THREAD_AREA): Define.
15633 (ps_get_thread_area): New function.
15634 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15635 (linux-x86-64-low.o): Update.
15636
156372006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15638
15639 * configure.ac: Remove checks for prfpregset_t.
15640 * gdb_proc_service.h: New file.
15641 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15642 new "gdb_proc_service.h".
15643 * proc-service.c: Likewise.
15644 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15645 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15646 * Makefile.in (gdb_proc_service_h): Updated.
15647 * configure, config.in: Regenerated.
15648
156492006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15650
15651 * remote-utils.c (prepare_resume_reply): Move declaration
15652 of gdb_id_from_wait to the top of the block.
15653
156542006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15655
15656 * linux-low.c (regsets_store_inferior_registers): Read the regset
15657 from the target before filling it.
15658
156592006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * server.c (attach_inferior): Return SIGTRAP for a successful
15662 attach.
15663
156642006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15665
15666 * Makefile.in (OBS): Add version.o.
15667 (STAGESTUFF): Delete.
15668 (version.o): Add dependencies.
15669 (version.c): Replace rule.
15670 (clean): Remove version.c.
15671 * server.c (gdbserver_version): New.
15672 (gdbserver_usage): Use printf.
15673 (main): Handle --version and --help.
15674 * server.h (version, host_name): Add declarations.
15675
156762005-12-23 Eli Zaretskii <eliz@gnu.org>
15677
15678 * linux-arm-low.c:
15679 * linux-arm-low.c:
15680 * inferiors.c:
15681 * i387-fp.h:
15682 * i387-fp.c:
15683 * gdbreplay.c:
15684 * regcache.c:
15685 * proc-service.c:
15686 * mem-break.h:
15687 * mem-break.c:
15688 * linux-x86-64-low.c:
15689 * linux-sh-low.c:
15690 * linux-s390-low.c:
15691 * linux-ppc64-low.c:
15692 * linux-ppc-low.c:
15693 * linux-mips-low.c:
15694 * linux-m68k-low.c:
15695 * linux-m32r-low.c:
15696 * linux-low.h:
15697 * linux-low.c:
15698 * linux-ia64-low.c:
15699 * linux-i386-low.c:
15700 * linux-crisv32-low.c:
15701 * thread-db.c:
15702 * terminal.h:
15703 * target.h:
15704 * target.c:
15705 * server.h:
15706 * server.c:
15707 * remote-utils.c:
15708 * regcache.h:
15709 * utils.c:
15710 * Makefile.in:
15711 * configure.ac:
15712 * gdbserver.1: Add (C) after Copyright. Update the FSF
15713 address.
15714
157152005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15716
15717 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15718 (arm_breakpoint_at): Recognize both breakpoints.
15719 (the_low_target): Use the correct breakpoint instruction.
15720
157212005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15722
15723 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15724 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15725 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15726 (the_low_target): Update.
15727
157282005-10-25 Andreas Schwab <schwab@suse.de>
15729
15730 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15731
15732 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15733 (ia64_num_regs): Reduce to 462.
15734
157352005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15736
15737 * acinclude.m4: Correct quoting.
15738 * aclocal.m4: Regenerated.
15739
15740 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15741 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15742 (thread_db_init): Call thread_db_err_str.
15743 * configure.ac: Check for TD_VERSION.
15744 * config.in, configure: Regenerated.
15745
157462005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15747
15748 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15749
157502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15753 is not available. Define HAVE_PTRACE_GETREGS if it is.
15754 * config.in, configure: Regenerated.
15755 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15756 * linux-i386-low.c, linux-m68k-low.c: Update to use
15757 HAVE_PTRACE_GETREGS.
15758 * linux-low.c (regsets_fetch_inferior_registers)
15759 (regsets_store_inferior_registers): Only return 0 if we processed
15760 GENERAL_REGS.
15761 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15762 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15763
157642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15765
15766 * inferiors.c (struct thread_info): Add gdb_id.
15767 (add_thread): Add gdb_id argument.
15768 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15769 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15770 calls to add_thread.
15771 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15772 * server.c (handle_query): Use thread_to_gdb_id.
15773 (handle_v_cont, main): Use gdb_id_to_thread_id.
15774 * server.h (add_thread): Update prototype.
15775 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15776 prototypes.
15777
157782005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15781 left-padded registers.
15782 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15783 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15784
157852005-07-01 Steve Ellcey <sje@cup.hp.com>
15786
15787 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15788 * configure: Regenerate.
15789 * config.in: Regenerate.
15790 * server.h (NEED_DECLARATION_STRERROR):
15791 Replace with !HAVE_DECL_STRERROR.
15792
157932005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15794
15795 * linux-low.c (linux_wait, linux_send_signal): Don't test
15796 an unsigned long variable for > 0 if it could be MAX_ULONG.
15797 * server.c (myresume): Likewise.
15798 * target.c (set_desired_inferior): Likewise.
15799
158002005-06-13 Mark Kettenis <kettenis@gnu.org>
15801
15802 * configure.ac: Simplify and improve check for socklen_t.
15803 * configure, config.in: Regenerate.
15804
158052005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15806
15807 * acconfig.h: Remove.
15808 * configure.ac: Add a test for socklen_t. Use three-argument
15809 AC_DEFINE throughout.
15810 * config.in: Regenerated using autoheader 2.59.
15811 * configure: Regenerated.
15812
15813 * gdbreplay.c (socklen_t): Provide a default.
15814 (remote_open): Use socklen_t.
15815 * remote-utils.c (socklen_t): Provide a default.
15816 (remote_open): Use socklen_t.
15817 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15818 unsigned char.
15819
15820 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15821 char for buffers.
15822 * linux-low.c (linux_read_memory, linux_write_memory)
15823 (linux_read_auxv): Likewise.
15824 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15825 (check_mem_write): Likewise.
15826 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15827 Likewise.
15828 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15829 (registers_from_string, register_data): Likewise.
15830 * server.c (handle_query, main): Likewise.
15831 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15832 (decode_M_packet): Likewise.
15833 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15834 * target.h (struct target_ops): Update read_memory, write_memory,
15835 and read_auxv.
15836 (read_inferior_memory, write_inferior_memory): Update.
15837 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15838 to unsigned char *.
15839 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15840 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15841 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15842 linux-s390-low.c, linux-sh-low.c: Update for changes in
15843 read_inferior_memory and the_low_target->breakpoint.
15844
158452005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15846
15847 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15848 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15849 * configure.srv: Add powerpc64-*-linux*.
15850 * linux-ppc64-low.c: New file.
15851
158522005-05-23 Orjan Friberg <orjanf@axis.com>
15853
15854 * linux-cris-low.c: New file with support for CRIS.
15855 * linux-crisv32-low.c: Ditto for CRISv32.
15856 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15857 (clean): Add reg-cris.c and reg-crisv32.c.
15858 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15859 reg-crisv32.o, and reg-crisv32.c to make rules.
15860 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15861 recognized targets.
15862
158632005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15864
15865 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15866 of sizeof (PTRACE_XFER_TYPE).
15867 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15868
158692005-05-12 Orjan Friberg <orjanf@axis.com>
15870
15871 * target.h (struct target_ops): Add insert_watchpoint,
15872 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15873 pointers for hardware watchpoint support.
15874 * linux-low.h (struct linux_target_ops): Ditto.
15875 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15876 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15877 to linux_target_ops.
15878 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15879 reply packet.
15880 * server.c (main): Recognize 'Z' and 'z' packets.
15881
158822005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15883
15884 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15885 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15886 (the_low_target): Add new members.
15887
158882005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15889
15890 * proc-service.c (ps_lgetregs): Search all_processes instead of
15891 all_threads.
15892
158932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15894
15895 * server.c (start_inferior): Change return type to int.
15896 (attach_inferior): Change sigptr to int *.
15897 (handle_v_cont, handle_v_requests): Change signal to int *.
15898 (main): Change signal to int.
15899
159002005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15901
15902 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15903 * configure.srv: Add m32r*-*-linux*.
15904 * linux-m32r-low.c: New file.
15905
159062005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15907
15908 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15909
159102005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15913 Take unsigned long arguments for PIDs.
15914 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15915 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15916 (wait_for_sigstop, linux_resume_one_process)
15917 (regsets_fetch_inferior_registers, linux_send_signal)
15918 (linux_read_auxv): Likewise. Update the types of variables holding
15919 PIDs. Update format string specifiers.
15920 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15921 * remote-utils.c (prepare_resume_reply): Likewise.
15922 * server.c (cont_thread, general_thread, step_thread)
15923 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15924 unsigned long.
15925 (handle_query): Update format specifiers.
15926 (handle_v_cont, main): Use strtoul for thread IDs.
15927 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15928 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15929 (general_thread, step_thread, thread_from_wait)
15930 (old_thread_from_wait): Update.
15931 * target.h (struct thread_resume): Use unsigned long for THREAD.
15932 (struct target_ops): Use unsigned long for arguments to attach and
15933 thread_alive.
15934
159352005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15936
15937 * acinclude.m4: Include bfd/bfd.m4 directly.
15938 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15939 <agriffis@toolchain.org>.
15940 * aclocal.m4, configure: Regenerated.
15941
159422005-01-07 Andrew Cagney <cagney@gnu.org>
15943
15944 * configure.ac: Rename configure.in, require autoconf 2.59.
15945 * configure: Re-generate.
15946
159472004-12-08 Daniel Jacobowitz <dan@debian.org>
15948
15949 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15950 LIBS when finished.
15951 * aclocal.m4: Regenerated.
15952 * configure: Regenerated.
15953
159542004-11-21 Andreas Schwab <schwab@suse.de>
15955
15956 * linux-m68k-low.c (m68k_num_gregs): Define.
15957 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15958 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15959 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15960 (m68k_breakpoint_at): New. Add to the_low_target.
15961
15962 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15963 srv_linux_thread_db to yes.
15964
159652004-10-20 Joel Brobecker <brobecker@gnat.com>
15966
15967 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15968 (ARCH_SET_FS): Likewise.
15969 (ARCH_GET_FS): Likewise.
15970 (ARCH_GET_GS): Likewise.
15971
159722004-10-16 Daniel Jacobowitz <dan@debian.org>
15973
15974 * linux-i386-low.c (ps_get_thread_area): New.
15975 * linux-x86-64-low.c (ps_get_thread_area): New.
15976 * linux-low.c: Include <sys/syscall.h>.
15977 (linux_kill_one_process): Don't kill the first thread here.
15978 (linux_kill): Kill the first thread here.
15979 (kill_lwp): New function.
15980 (send_sigstop, linux_send_signal): Use it.
15981 * proc-service.c: Clean up #ifdefs.
15982 (fpregset_info): Delete.
15983 (ps_lgetregs): Update and enable implementation.
15984 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15985 implementations.
15986 * remote-utils.c (struct sym_cache, symbol_cache): New.
15987 (input_interrupt): Print a clearer message.
15988 (async_io_enabled): New variable.
15989 (enable_async_io, disable_async_io): Use it. Update comments.
15990 (look_up_one_symbol): Use the symbol cache.
15991 * thread-db.c (thread_db_look_up_symbols): New function.
15992 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15993
159942004-10-16 Daniel Jacobowitz <dan@debian.org>
15995
15996 * configure.in: Test for -rdynamic.
15997 * configure: Regenerated.
15998 * Makefile (INTERNAL_LDFLAGS): New.
15999 (gdbserver, gdbreplay): Use it.
16000
160012004-09-02 Andrew Cagney <cagney@gnu.org>
16002
16003 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16004
160052004-03-23 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * linux-low.c (linux_wait): Clear all_processes list also.
16008
160092004-03-12 Daniel Jacobowitz <drow@mvista.com>
16010
16011 * linux-low.c: Include <errno.h>. Remove extern declaration of
16012 errno.
16013
160142004-03-12 Daniel Jacobowitz <drow@mvista.com>
16015
16016 * gdbreplay.c, server.h, utils.c: Update copyright years.
16017
160182004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16019
16020 * server.c (main): Print child status or termination signal from
16021 variable 'signal', not 'sig'.
16022
160232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16024
16025 * linux-low.c (linux_read_memory): Change return type to
16026 int. Check for and return error from ptrace().
16027 * target.c (read_inferior_memory): Change return type to int. Pass
16028 back return status from the_target->read_memory().
16029 * target.h (struct target_ops): Adapt *read_memory() prototype.
16030 Update comment.
16031 (read_inferior_memory): Adapt prototype.
16032 * server.c (main): Return an error packet if
16033 read_inferior_memory() returns an error.
16034
160352004-03-04 Daniel Jacobowitz <drow@mvista.com>
16036
16037 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16038 Unify with other clean targets.
16039
160402004-02-29 Daniel Jacobowitz <drow@mvista.com>
16041
16042 * server.c (handle_v_cont): Call set_desired_inferior.
16043
160442004-02-29 Daniel Jacobowitz <drow@mvista.com>
16045
16046 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16047
160482004-02-29 Daniel Jacobowitz <drow@mvista.com>
16049
16050 * linux-low.c (linux_wait): Unblock async I/O.
16051 (linux_resume): Block and enable async I/O.
16052 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16053 * server.h (block_async_io, unblock_async_io): Add prototypes.
16054
160552004-02-29 Daniel Jacobowitz <drow@mvista.com>
16056
16057 * remote-utils.c (remote_open): Print a status notice after
16058 opening a TCP port.
16059 * server.c (attach_inferior): Print a status notice after
16060 attaching.
16061
160622004-02-29 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16065
160662004-02-26 Daniel Jacobowitz <drow@mvista.com>
16067
16068 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16069 error packet.
16070 * server.c, target.h: Update copyright years.
16071
160722004-02-25 Roland McGrath <roland@redhat.com>
16073
16074 * target.h (struct target_ops): New member `read_auxv'.
16075 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16076 * linux-low.c (linux_read_auxv): New function.
16077 (linux_target_ops): Initialize `read_auxv' member to that.
16078
160792004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16080
16081 Committed by Jim Blandy <jimb@redhat.com>.
16082
16083 * linux-s390-low.c (s390_num_regs): Update.
16084 (s390_regmap): Remove control registers. Use __s390x__ predefine
16085 instead of GPR_SIZE to distiguish s390 and s390x targets.
16086
160872004-01-31 Daniel Jacobowitz <drow@mvista.com>
16088
16089 * linux-low.c: Update copyright year.
16090 (check_removed_breakpoint): Clear pending_is_breakpoint.
16091 (linux_set_resume_request, linux_queue_one_thread)
16092 (resume_status_pending_p): New functions.
16093 (linux_continue_one_thread): Use process->resume.
16094 (linux_resume): Only resume threads if there are no pending events.
16095 * linux-low.h (struct process_info): Add resume request
16096 pointer.
16097
160982004-01-30 Daniel Jacobowitz <drow@mvista.com>
16099
16100 * regcache.c (new_register_cache): Clear the allocated register
16101 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16102
161032003-10-13 Daniel Jacobowitz <drow@mvista.com>
16104
16105 * linux-low.c (linux_resume): Take a struct thread_resume *
16106 argument.
16107 (linux_wait): Update call.
16108 (resume_ptr): New static variable.
16109 (linux_continue_one_thread): Renamed from
16110 linux_continue_one_process. Use resume_ptr.
16111 (linux_resume): Use linux_continue_one_thread.
16112 * server.c (handle_v_cont, handle_v_requests): New functions.
16113 (myresume): New function.
16114 (main): Handle 'v' case.
16115 * target.h (struct thread_resume): New type.
16116 (struct target_ops): Change argument of "resume" to struct
16117 thread_resume *.
16118 (myresume): Delete macro.
16119
161202003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16121
16122 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16123 (uninstall): Support DESTDIR.
16124
16125Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16126
16127 * configure.srv: Add xscale*linux copy of arm*linux entry.
16128
161292003-07-24 Daniel Jacobowitz <drow@mvista.com>
16130
16131 * linux-arm-low.c (arm_reinsert_addr): New function.
16132 (the_low_target): Add arm_reinsert_addr.
16133
161342003-07-08 Mark Kettenis <kettenis@gnu.org>
16135
16136 * mem-break.c: Remove whitespace at end of file.
16137
161382003-06-28 Daniel Jacobowitz <drow@mvista.com>
16139
16140 * configure.in: Check whether we need to prototype strerror.
16141 * server.h: Optionally prototype strerror.
16142 * gdbreplay.c (perror_with_name): Use strerror.
16143 * linux-low.c (linux_attach_lwp): Use strerror.
16144 * utils.c (perror_with_name): Use strerror.
16145 * config.in, configure: Regenerated.
16146
161472003-06-28 Daniel Jacobowitz <drow@mvista.com>
16148
16149 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16150 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16151
161522003-06-20 Daniel Jacobowitz <drow@mvista.com>
16153
16154 * Makefile.in (SFILES): Update.
16155 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16156 low-sun3.c: Remove files.
16157
161582003-06-17 Daniel Jacobowitz <drow@mvista.com>
16159
16160 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16161 (linux_detach_one_process, linux_detach): New functions.
16162 (linux_target_ops): Add linux_detach.
16163 * server.c (main): Handle 'D' packet.
16164 * target.h (struct target_ops): Add "detach" member.
16165 (detach_inferior): Define.
16166
161672003-06-13 Mark Kettenis <kettenis@gnu.org>
16168
16169 From Kelley Cook <kelleycook@wideopenwest.com>:
16170 * configure.srv: Accept i[34567]86 variants.
16171
161722003-06-05 Daniel Jacobowitz <drow@mvista.com>
16173
16174 * linux-low.c (linux_wait_for_event): Correct comment typos.
16175 (linux_resume_one_process): Call check_removed_breakpoint.
16176 (linux_send_signal): New function.
16177 (linux_target_ops): Add linux_send_signal.
16178 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16179 of kill.
16180 * target.h (struct target_ops): Add send_signal.
16181
161822003-05-29 Jim Blandy <jimb@redhat.com>
16183
16184 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16185 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16186 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16187 away part of the register's value.
16188
161892003-03-26 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16192 (linux_wait_for_event, linux_init_signals): Likewise.
16193
161942003-03-17 Daniel Jacobowitz <drow@mvista.com>
16195
16196 * configure.in: Check for stdlib.h.
16197 * configure: Regenerated.
16198 * config.in: Regenerated.
16199
162002003-01-04 Andreas Schwab <schwab@suse.de>
16201
16202 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16203
162042003-01-02 Andrew Cagney <ac131313@redhat.com>
16205
16206 * Makefile.in: Remove obsolete code.
16207
162082002-11-20 Daniel Jacobowitz <drow@mvista.com>
16209
16210 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16211 defined(PT_FPR0_HI).
16212
162132002-11-17 Stuart Hughes <seh@zee2.com>
16214
16215 * linux-arm-low.c (arm_num_regs): Increase.
16216 (arm_regmap): Include status register.
16217
162182002-11-17 Daniel Jacobowitz <drow@mvista.com>
16219
16220 * linux-low.c (register_addr): Remove incorrect -1 check.
16221
162222002-08-29 Daniel Jacobowitz <drow@mvista.com>
16223
16224 * linux-low.c (linux_create_inferior): Call setpgid. Return
16225 the new PID.
16226 (unstopped_p, linux_signal_pid): Remove.
16227 (linux_target_ops): Remove linux_signal_pid.
16228 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16229 global instead of target method.
16230 * target.h (struct target_ops): Remove signal_pid. Update comment
16231 for create_inferior.
16232 * server.c (signal_pid): New variable.
16233 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16234 gdbserver. Set the child to be the foreground process group.
16235 (attach_inferior): Set signal_pid.
16236
162372002-08-23 Daniel Jacobowitz <drow@mvista.com>
16238
16239 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16240
162412002-08-20 Jim Blandy <jimb@redhat.com>
16242
16243 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16244 default for this.
16245
162462002-08-01 Andrew Cagney <cagney@redhat.com>
16247
16248 * Makefile.in: Make chill references obsolete.
16249
162502002-07-24 Kevin Buettner <kevinb@redhat.com>
16251
16252 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16253 * configure: Regenerate.
16254 * config.in: Regenerate.
16255
162562002-07-09 David O'Brien <obrien@FreeBSD.org>
16257
16258 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16259 (perror_with_name, remote_close, remote_open, expect, play): Static.
16260
162612002-07-04 Michal Ludvig <mludvig@suse.cz>
16262
16263 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16264 byte offsets instead of an array of indexes.
16265 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16266
162672002-06-13 Daniel Jacobowitz <drow@mvista.com>
16268
16269 * regcache.c: Add comment.
16270
162712002-06-11 Daniel Jacobowitz <drow@mvista.com>
16272
16273 * thread-db.c: New file.
16274 * proc-service.c: New file.
16275 * acinclude.m4: New file.
16276 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16277 proc-service.o, and thread-db.o.
16278 (linux-low.o): Add USE_THREAD_DB.
16279 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16280 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16281 * aclocal.m4: Regenerated.
16282 * config.in: Regenerated.
16283 * configure: Regenerated.
16284 * configure.in: Check for proc_service.h, sys/procfs.h,
16285 thread_db.h, and linux/elf.h headrs.
16286 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16287 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16288 Check for -lthread_db and thread support.
16289 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16290 PowerPC, and SuperH.
16291 * i387-fp.c: Constify arguments.
16292 * i387-fp.h: Likewise.
16293 * inferiors.c: (struct thread_info): Renamed from
16294 `struct inferior_info'. Remove PID member. Use generic inferior
16295 list header. All uses updated.
16296 (inferiors, signal_pid): Removed.
16297 (all_threads): New variable.
16298 (get_thread): Define.
16299 (add_inferior_to_list): New function.
16300 (for_each_inferior): New function.
16301 (change_inferior_id): New function.
16302 (add_inferior): Removed.
16303 (remove_inferior): New function.
16304 (add_thread): New function.
16305 (free_one_thread): New function.
16306 (remove_thread): New function.
16307 (clear_inferiors): Use for_each_inferior and free_one_thread.
16308 (find_inferior): New function.
16309 (find_inferior_id): New function.
16310 (inferior_target_data): Update argument type.
16311 (set_inferior_target_data): Likewise.
16312 (inferior_regcache_data): Likewise.
16313 (set_inferior_regcache_data): Likewise.
16314 * linux-low.c (linux_bp_reinsert): Remove.
16315 (all_processes, stopping_threads, using_thrads)
16316 (struct pending_signals, debug_threads, pid_of): New.
16317 (inferior_pid): Replace with macro.
16318 (struct inferior_linux_data): Remove.
16319 (get_stop_pc, add_process): New functions.
16320 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16321 Use add_process and add_thread.
16322 (linux_attach_lwp): New function, based on old linux_attach. Use
16323 add_process and add_thread. Set stop_expected for new threads.
16324 (linux_attach): New function.
16325 (linux_kill_one_process): New function.
16326 (linux_kill): Kill all LWPs.
16327 (linux_thread_alive): Use find_inferior_id.
16328 (check_removed_breakpoints, status_pending_p): New functions.
16329 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16330 Update. Use WNOHANG. Wait for cloned processes also. Update process
16331 struct for the found process.
16332 (linux_wait_for_event): New function.
16333 (linux_wait): Use it. Support LWPs.
16334 (send_sigstop, wait_for_sigstop, stop_all_processes)
16335 (linux_resume_one_process, linux_continue_one_process): New functions.
16336 (linux_resume): Support LWPs.
16337 (REGISTER_RAW_SIZE): Remove.
16338 (fetch_register): Use register_size instead. Call supply_register.
16339 (usr_store_inferior_registers): Likewise. Call collect_register.
16340 Fix recursive case.
16341 (regsets_fetch_inferior_registers): Improve error message.
16342 (regsets_store_inferior_registers): Add debugging.
16343 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16344 (unstopped_p, linux_signal_pid): New functions.
16345 (linux_target_ops): Add linux_signal_pid.
16346 (linux_init_signals): New function.
16347 (initialize_low): Call it. Initialize using_threads.
16348 * regcache.c (inferior_regcache_data): Add valid
16349 flag.
16350 (get_regcache): Fetch registers lazily. Add fetch argument
16351 and update all callers.
16352 (regcache_invalidate_one, regcache_invalidate): New
16353 functions.
16354 (new_register_cache): Renamed from create_register_cache.
16355 Return the new regcache.
16356 (free_register_cache): Change argument to a void *.
16357 (registers_to_string, registers_from_string): Call get_regcache
16358 with fetch flag set.
16359 (register_data): Make static. Pass fetch flag to get_regcache.
16360 (supply_register): Call get_regcache with fetch flag clear.
16361 (collect_register): Call get_regcache with fetch flag set.
16362 (collect_register_as_string): New function.
16363 * regcache.h: Update.
16364 * remote-utils.c (putpkt): Flush after debug output and use
16365 stderr.
16366 Handle input interrupts while waiting for an ACK.
16367 (input_interrupt): Use signal_pid method.
16368 (getpkt): Flush after debug output and use stderr.
16369 (outreg): Use collect_register_as_string.
16370 (new_thread_notify, dead_thread_notify): New functions.
16371 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16372 and general_thread.
16373 (look_up_one_symbol): Flush after debug output.
16374 * server.c (step_thread, server_waiting): New variables.
16375 (start_inferior): Don't use signal_pid. Update call to mywait.
16376 (attach_inferior): Update call to mywait.
16377 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16378 (main): Don't fetch/store registers explicitly. Use
16379 set_desired_inferior. Support proposed ``Hs'' packet. Update
16380 calls to mywait.
16381 * server.h: Update.
16382 (struct inferior_list, struct_inferior_list_entry): New.
16383 * target.c (set_desired_inferior): New.
16384 (write_inferior_memory): Constify.
16385 (mywait): New function.
16386 * target.h: Update.
16387 (struct target_ops): New signal_pid method.
16388 (mywait): Removed macro, added prototype.
16389
16390 * linux-low.h (regset_func): Removed.
16391 (regset_fill_func, regset_store_func): New.
16392 (enum regset_type): New.
16393 (struct regset_info): Add type field. Use new operation types.
16394 (struct linux_target_ops): stop_pc renamed to get_pc.
16395 Add decr_pc_after_break and breakpoint_at.
16396 (get_process, get_thread_proess, get_process_thread)
16397 (strut process_info, all_processes, linux_attach_lwp)
16398 (thread_db_init): New.
16399
16400 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16401 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16402 (the_low_target): Add new members.
16403 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16404 (i386_store_fpxregset): Constify.
16405 (target_regsets): Add new kind identifier.
16406 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16407 (i386_set_pc): Add debugging.
16408 (i386_breakpoint_at): New function.
16409 (the_low_target): Add new members.
16410 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16411 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16412 (mips_breakpoint_at): New.
16413 (the_low_target): Add new members.
16414 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16415 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16416 (the_low_target): Add new members.
16417 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16418 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16419 (the_low_target): Add new members.
16420 * linux-x86-64-low.c (target_regsets): Add new kind
16421 identifier.
16422
164232002-05-15 Daniel Jacobowitz <drow@mvista.com>
16424
16425 From Martin Pool <mbp@samba.org>:
16426 * server.c (gdbserver_usage): New function.
16427 (main): Call it.
16428
164292002-05-14 Daniel Jacobowitz <drow@mvista.com>
16430
16431 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16432 stop_at -> stop_pc.
16433
164342002-05-04 Andrew Cagney <ac131313@redhat.com>
16435
16436 * Makefile.in: Remove obsolete code.
16437
164382002-04-24 Michal Ludvig <mludvig@suse.cz>
16439
16440 * linux-low.c (regsets_fetch_inferior_registers),
16441 (regsets_store_inferior_registers): Removed cast to int from
16442 ptrace() calls.
16443 * regcache.h: Added declaration of struct inferior_info.
16444
164452002-04-20 Daniel Jacobowitz <drow@mvista.com>
16446
16447 * inferiors.c (struct inferior_info): Add regcache_data.
16448 (add_inferior): Call create_register_cache.
16449 (clear_inferiors): Call free_register_cache.
16450 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16451 * regcache.c (struct inferior_regcache_data): New.
16452 (registers): Remove.
16453 (get_regcache): New function.
16454 (create_register_cache, free_register_cache): New functions.
16455 (set_register_cache): Don't initialize the register cache here.
16456 (registers_to_string, registers_from_string, register_data): Call
16457 get_regcache.
16458 * regcache.h: Add prototypes.
16459 * server.h: Likewise.
16460
164612002-04-20 Daniel Jacobowitz <drow@mvista.com>
16462
16463 * mem-break.c: New file.
16464 * mem-break.h: New file.
16465 * Makefile.in: Add mem-break.o rule; update server.h
16466 dependencies.
16467 * inferiors.c (struct inferior_info): Add target_data
16468 member.
16469 (clear_inferiors): Free target_data member if set.
16470 (inferior_target_data, set_inferior_target_data): New functions.
16471 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16472 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16473 * linux-low.c (linux_bp_reinsert): New variable.
16474 (struct inferior_linux_data): New.
16475 (linux_create_inferior): Use set_inferior_target_data.
16476 (linux_attach): Likewise. Call add_inferior.
16477 (linux_wait_for_one_inferior): New function.
16478 (linux_wait): Call it.
16479 (linux_write_memory): Add const.
16480 (initialize_low): Call set_breakpoint_data.
16481 * linux-low.h (struct linux_target_ops): Add breakpoint
16482 handling members.
16483 * server.c (attach_inferior): Remove extra add_inferior
16484 call.
16485 * server.h: Include mem-break.h. Update inferior.c
16486 prototypes.
16487 * target.c (read_inferior_memory)
16488 (write_inferior_memory): New functions.
16489 * target.h (read_inferior_memory)
16490 (write_inferior_memory): Change macros to prototypes.
16491 (struct target_ops): Update comments. Add const to write_memory
16492 definition.
16493
164942002-04-11 Daniel Jacobowitz <drow@mvista.com>
16495
16496 * linux-low.c (usr_store_inferior_registers): Support
16497 registers which are allowed to fail to store.
16498 * linux-low.h (linux_target_ops): Likewise.
16499 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16500 (ppc_cannot_store_register): FPSCR may not be storable.
16501
165022002-04-09 Daniel Jacobowitz <drow@mvista.com>
16503
16504 * server.h: Include <string.h> if HAVE_STRING_H.
16505 * ChangeLog: Correct paths in last ChangeLog entry.
16506
165072002-04-09 Daniel Jacobowitz <drow@mvista.com>
16508
16509 * linux-low.h: Remove obsolete prototypes.
16510 (struct linux_target_ops): New.
16511 (extern the_low_target): New.
16512 * linux-low.c (num_regs, regmap): Remove declarations.
16513 (register_addr): Use the_low_target explicitly.
16514 (fetch_register): Likewise.
16515 (usr_fetch_inferior_registers): Likewise.
16516 (usr_store_inferior_registers): Likewise.
16517 * linux-arm-low.c (num_regs): Remove.
16518 (arm_num_regs): Define.
16519 (arm_regmap): Renamed from regmap, made static.
16520 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16521 made static.
16522 (arm_cannot_store_register): Renamed from cannot_store_register,
16523 made static.
16524 (the_low_target): New.
16525 * linux-i386-low.c (num_regs): Remove.
16526 (i386_num_regs): Define.
16527 (i386_regmap): Renamed from regmap, made static.
16528 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16529 made static.
16530 (i386_cannot_store_register): Renamed from cannot_store_register,
16531 made static.
16532 (the_low_target): New.
16533 * linux-ia64-low.c (num_regs): Remove.
16534 (ia64_num_regs): Define.
16535 (ia64_regmap): Renamed from regmap, made static.
16536 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16537 made static.
16538 (ia64_cannot_store_register): Renamed from cannot_store_register,
16539 made static.
16540 (the_low_target): New.
16541 * linux-m68k-low.c (num_regs): Remove.
16542 (m68k_num_regs): Define.
16543 (m68k_regmap): Renamed from regmap, made static.
16544 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16545 made static.
16546 (m68k_cannot_store_register): Renamed from cannot_store_register,
16547 made static.
16548 (the_low_target): New.
16549 * linux-mips-low.c (num_regs): Remove.
16550 (mips_num_regs): Define.
16551 (mips_regmap): Renamed from regmap, made static.
16552 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16553 made static.
16554 (mips_cannot_store_register): Renamed from cannot_store_register,
16555 made static.
16556 (the_low_target): New.
16557 * linux-ppc-low.c (num_regs): Remove.
16558 (ppc_num_regs): Define.
16559 (ppc_regmap): Renamed from regmap, made static.
16560 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16561 made static.
16562 (ppc_cannot_store_register): Renamed from cannot_store_register,
16563 made static.
16564 (the_low_target): New.
16565 * linux-s390-low.c (num_regs): Remove.
16566 (s390_num_regs): Define.
16567 (s390_regmap): Renamed from regmap, made static.
16568 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16569 made static.
16570 (s390_cannot_store_register): Renamed from cannot_store_register,
16571 made static.
16572 (the_low_target): New.
16573 * linux-sh-low.c (num_regs): Remove.
16574 (sh_num_regs): Define.
16575 (sh_regmap): Renamed from regmap, made static.
16576 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16577 made static.
16578 (sh_cannot_store_register): Renamed from cannot_store_register,
16579 made static.
16580 (the_low_target): New.
16581 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16582 (the_low_target): New.
16583
165842002-04-09 Daniel Jacobowitz <drow@mvista.com>
16585
16586 * Makefile.in: Add stamp-h target.
16587 * configure.in: Create stamp-h.
16588 * configure: Regenerated.
16589
165902002-04-09 Daniel Jacobowitz <drow@mvista.com>
16591
16592 * inferiors.c: New file.
16593 * target.c: New file.
16594 * target.h: New file.
16595 * Makefile.in: Add target.o and inferiors.o. Update
16596 dependencies.
16597 * linux-low.c (inferior_pid): New static variable,
16598 moved from server.c.
16599 (linux_create_inferior): Renamed from create_inferior.
16600 Call add_inferior. Return 0 on success instead of a PID.
16601 (linux_attach): Renamed from myattach.
16602 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16603 (linux_thread_alive): Renamed from mythread_alive.
16604 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16605 child dies.
16606 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16607 (regsets_store_inferior_registers): Correct error message.
16608 Add missing ``return 0''.
16609 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16610 (linux_store_registers): Renamed from store_inferior_registers.
16611 (linux_read_memory): Renamed from read_inferior_memory.
16612 (linux_write_memory): Renamed from write_inferior_memory.
16613 (linux_target_ops): New structure.
16614 (initialize_low): Call set_target_ops ().
16615 * remote-utils.c (unhexify): New function.
16616 (hexify): New function.
16617 (input_interrupt): Send signals to ``signal_pid''.
16618 * server.c (inferior_pid): Remove.
16619 (start_inferior): Update create_inferior call.
16620 (attach_inferior): Call add_inferior.
16621 (handle_query): New function.
16622 (main): Call handle_query for `q' packets.
16623 * server.h: Include "target.h". Remove obsolete prototypes.
16624 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16625
166262002-04-09 Daniel Jacobowitz <drow@mvista.com>
16627
16628 * Makefile.in: Add WARN_CFLAGS. Update configury
16629 dependencies.
16630 * configure.in: Check for <string.h>
16631 * configure: Regenerate.
16632 * config.in: Regenerate.
16633 * gdbreplay.c: Include needed system headers.
16634 (remote_open): Remove strchr prototype.
16635 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16636 * regcache.c (supply_register): Change buf argument to const void *.
16637 (supply_register_by_name): Likewise.
16638 (collect_register): Change buf argument to void *.
16639 (collect_register_by_name): Likewise.
16640 * regcache.h: Add missing prototypes.
16641 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16642 * server.c (handle_query): New function.
16643 (attached): New static variable, moved out of main.
16644 (main): Quiet longjmp clobber warnings.
16645 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16646 * utils.c (error): Remove NORETURN.
16647 (fatal): Likewise.
This page took 0.153259 seconds and 4 git commands to generate.