7aa59467ac3ffbe386b3ec4401cc6fd929a78a03
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2
3 PR server/23198
4 * hostio.c (require_int): Do not report overflow for integers
5 between 0xfffffff and 0x7fffffff.
6
7 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8
9 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
10 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
11 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
12 functions.
13 (the_low_target): Wire them.
14
15 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
16
17 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
18 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
19 mode. Call collect_register_by_name with vscr using
20 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
21 (ppc_store_vrregset): Add and set vscr_offset variable as in
22 ppc_fill_vrregset. Call supply_register_by_name with vscr using
23 vscr_offset.
24
25 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
26
27 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
28 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
29 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
30
31 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
32
33 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
34 (ppc_store_vsxregset): Likewise.
35 (ppc_fill_vrregset): Likewise.
36 (ppc_store_vrregset): Likewise.
37 (ppc_fill_evrregset): Likewise.
38 (ppc_store_evrregset): Likewise.
39 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
40 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
41 needed.
42
43 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
44
45 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
46 wordsize of the inferior. Call ppc_linux_target_wordsize.
47
48 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
49
50 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
51 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
52 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
53 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
54 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
55 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
56 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
57 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
58 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
59 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
60 (tdesc_powerpc_e500l): Remove.
61 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
62 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
63 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
64 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
65 linux-ppc-tdesc.h.
66 (ppc_arch_setup): Remove target description matching code. Fill a
67 ppc_linux_features struct and call ppc_linux_match_description
68 with it.
69
70 2018-05-22 Maciej W. Rozycki <macro@mips.com>
71
72 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
73 width of the requested register exceeds the width of the
74 `ptrace' data type.
75 (mips_cannot_store_register): Likewise.
76
77 2018-05-21 Maciej W. Rozycki <macro@mips.com>
78
79 * linux-mips-low.c (mips_fetch_register): New function. Update
80 preceding comment.
81 (mips_store_gregset): Supply 0 rather than $restart for $zero.
82 (the_low_target): Wire `mips_fetch_register'.
83
84 2018-05-10 Joel Brobecker <brobecker@adacore.com>
85
86 * lynx-i386-low.c (LYNXOS_178): New macro.
87 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
88 the layout on LynxOS-178.
89 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
90 handle floating point registers that are not supported by
91 LynxOS-178.
92
93 2018-05-10 Tom Tromey <tom@tromey.com>
94
95 * configure: Rebuild.
96
97 2018-05-10 Joel Brobecker <brobecker@adacore.com>
98
99 PR server/23158:
100 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
101 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
102 Use it to set the expedite_regs field in the given tdesc.
103 * x86-tdesc.h: New file.
104 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
105 Adjust following the addition of the new expedite_regs parameter
106 to init_target_desc.
107 * linux-tic6x-low.c (tic6x_read_description): Likewise.
108 * linux-x86-tdesc.c: #include "x86-tdesc.h".
109 (i386_linux_read_description, amd64_linux_read_description):
110 Adjust following the addition of the new expedite_regs parameter
111 to init_target_desc.
112 * lynx-i386-low.c: #include "x86-tdesc.h".
113 (lynx_i386_arch_setup): Adjust following the addition of the new
114 expedite_regs parameter to init_target_desc.
115 * nto-x86-low.c: #include "x86-tdesc.h".
116 (nto_x86_arch_setup): Adjust following the addition of the new
117 expedite_regs parameter to init_target_desc.
118 * win32-i386-low.c: #include "x86-tdesc.h".
119 (i386_arch_setup): Adjust following the addition of the new
120 expedite_regs parameter to init_target_desc.
121
122 2018-05-10 Joel Brobecker <brobecker@adacore.com>
123
124 PR server/23158:
125 * win32-low.c (win32_create_inferior): Add call to my_wait
126 setting last_status global.
127
128 2018-05-10 Joel Brobecker <brobecker@adacore.com>
129
130 PR server/23158:
131 * win32-low.c (create_process): Only call gdb_tilde_expand if
132 inferior_cwd is not NULL.
133
134 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
135
136 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
137 registers to the cache if their values have changed.
138 (i387_xsave_to_cache): Provide default values for x87 control
139 registers when these features are available, but disabled.
140 * regcache.c (supply_register_by_name_zeroed): New function.
141 * regcache.h (supply_register_by_name_zeroed): Declare new
142 function.
143
144 2018-05-07 Tom Tromey <tom@tromey.com>
145
146 * configure: Rebuild.
147
148 2018-05-04 Tom Tromey <tom@tromey.com>
149
150 * configure: Rebuild.
151
152 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
153 Pedro Alves <palves@redhat.com>
154
155 * linux-aarch64-low.c (aarch64_stopped_data_address):
156 Likewise.
157
158 2018-04-27 Tom Tromey <tom@tromey.com>
159
160 * configure: Rebuild.
161
162 2018-04-23 Tom Tromey <tom@tromey.com>
163
164 * configure: Rebuild.
165
166 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
167
168 * Makefile.in (depcomp): Add "..".
169 (all_deps_files): New and use it.
170
171 2018-04-18 Alan Hayward <alan.hayward@arm.com>
172
173 * configure.srv (aarch64*-*-linux*): Don't include xml.
174 (i[34567]86-*-cygwin*): Likewise.
175 (i[34567]86-*-linux*): Likewise.
176 (i[34567]86-*-lynxos*): Likewise.
177 (i[34567]86-*-mingw32ce*): Likewise.
178 (i[34567]86-*-mingw*): Likewise.
179 (i[34567]86-*-nto*): Likewise.
180 (tic6x-*-uclinux): Likewise.
181 (x86_64-*-linux*): Likewise.
182 (x86_64-*-mingw*): Likewise.
183 (x86_64-*-cygwin*): Likewise.
184
185 2018-04-18 Alan Hayward <alan.hayward@arm.com>
186
187 * tdesc.c: Remove xml parameter.
188
189 2018-04-18 Alan Hayward <alan.hayward@arm.com>
190
191 * server.c (get_features_xml): Remove cast.
192 * tdesc.c (void target_desc::accept): Fill in function.
193 (tdesc_get_features_xml): Remove old xml creation.
194 (print_xml_feature::visit_pre): Add xml vistor.
195 * tdesc.h (struct target_desc): Make xmltarget mutable.
196 (tdesc_get_features_xml): Remove declaration.
197
198 2018-04-18 Alan Hayward <alan.hayward@arm.com>
199
200 * tdesc.c (tdesc_architecture_name): Add new function.
201 (tdesc_osabi_name): Likewise.
202 (tdesc_get_features_xml): Use new functions.
203
204 2018-04-18 Alan Hayward <alan.hayward@arm.com>
205
206 * tdesc.c (tdesc_create_flags): Remove.
207 (tdesc_add_flag): Likewise.
208 (tdesc_named_type): Likewise.
209 (tdesc_create_union): Likewise.
210 (tdesc_create_struct): Likewise.
211 (tdesc_create_vector): Likewise.
212 (tdesc_add_bitfield): Likewise.
213 (tdesc_add_field): Likewise.
214 (tdesc_set_struct_size): Likewise.
215
216 2018-04-18 Alan Hayward <alan.hayward@arm.com>
217
218 * tdesc.c (~target_desc): Remove implictly deleted items.
219 (init_target_desc): Iterate all features.
220 (tdesc_get_features_xml): Use vector.
221 (tdesc_create_feature): Create feature.
222 * tdesc.h (tdesc_feature) Remove
223 (target_desc): Add features.
224
225 2018-04-18 Alan Hayward <alan.hayward@arm.com>
226
227 * Makefile.in: Add common/tdesc.c
228 * tdesc.c (init_target_desc): init all reg_defs from register
229 vector.
230 (tdesc_create_reg): Create tdesc_reg.
231 * tdesc.h (tdesc_feature): Add register vector.
232
233 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
234
235 * tdesc.h (struct target_desc) <features>: Change type to
236 std::vector<std::string>.
237 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
238 changes.
239 (tdesc_get_features_xml): Likewise.
240 (tdesc_create_feature): Likewise.
241
242 2018-03-26 Alan Hayward <alan.hayward@arm.com>
243
244 * regcache.c (find_register_by_number): Return a ref.
245 (find_regno): Use references.
246 (register_size): Likewise.
247 (register_data): Likewise.
248 * tdesc.c (target_desc::~target_desc): Remove free calls.
249 (target_desc::operator==): Use std::vector compare.
250 (init_target_desc): Use reference.
251 (tdesc_create_reg): Use reg constructors.
252 * tdesc.h (struct target_desc): Replace pointer with object.
253
254 2018-03-23 Alan Hayward <alan.hayward@arm.com>
255
256 * regcache.c (find_register_by_number): Make static.
257 (find_regno): Use find_register_by_number
258 * regcache.h (struct reg): Remove declaration.
259
260 2018-03-23 Alan Hayward <alan.hayward@arm.com>
261
262 * tdesc.c (target_desc::~target_desc): Move to here.
263 (target_desc::operator==): Likewise.
264 * tdesc.h (target_desc::~target_desc): Move from here.
265 (target_desc::operator==): Likewise.
266
267 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
268
269 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
270
271 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
272
273 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
274 S390_TDESC_GS.
275 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
276 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
277 and init_registers_s390_gs_linux64.
278
279 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
280
281 * linux-s390-low.c (s390_fill_gs): Remove function.
282 (s390_fill_gsbc): Remove function.
283 (s390_regsets): Set fill functions for the guarded storage regsets
284 to NULL.
285
286 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
287
288 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
289 the word size. Add comment.
290 (s390_get_wordsize): New function.
291 (s390_arch_setup): No longer select a temporary tdesc to fetch the
292 pswm with it. Instead, use s390_get_wordsize to determine the
293 word size first and derive the correct tdesc from that directly.
294
295 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * Makefile.in: Include silent-rules.mk.
298 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
299 (COMPILE): Add ECHO_CXX.
300 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
301 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
302 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
303 (version-generated.c): Add ECHO_GEN.
304 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
305 (IPAGENT_COMPILE): Add ECHO_CXX.
306 (%-generated.c): Add ECHO_REGDAT.
307
308 2018-03-14 Tom Tromey <tom@tromey.com>
309
310 PR cli/14977:
311 * ax.c (ax_printf): Special case for NULL.
312
313 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
314
315 * linux-low.c (linux_qxfer_libraries_svr4): Use
316 xml_escape_text_append.
317
318 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
321
322 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * server.c (handle_general_set): Remove unnecessary xstrdup.
325
326 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * server.c (parse_debug_format_options): Adjust to
329 delim_string_to_char_ptr_vec changes.
330 * thread-db.c (thread_db_load_search): Adjust to
331 dirnames_to_char_ptr_vec changes.
332
333 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
334
335 * target.h (target_enable_btrace, target_disable_btrace)
336 (target_read_btrace, target_read_btrace_conf): Turn macro into
337 inline function. Throw error if target method is not defined.
338 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
339 check for btrace target method. Be prepared to handle exceptions
340 from btrace target methods.
341
342 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
343
344 * server.c (captured_main): Change order of error message printed
345 when the current working directory cannot be found.
346
347 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
348
349 * server.c: Include "filenames.h" and "pathstuff.h".
350 (program_name): Delete variable.
351 (program_path): New anonymous class.
352 (get_exec_wrapper): Use "program_path" instead of
353 "program_name".
354 (handle_v_run): Likewise.
355 (captured_main): Likewise.
356 (process_serial_event): Likewise.
357
358 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
359
360 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
361 (OBJS): Add "pathstuff.o".
362 * server.c (current_directory): New global variable.
363 (captured_main): Initialize "current_directory".
364
365 2018-02-26 Alan Hayward <alan.hayward@arm.com>
366
367 * tdesc.c: Use common/tdesc.h.
368 * tdesc.h: Likewise.
369
370 2018-02-20 Alan Hayward <alan.hayward@arm.com>
371 Simon Marchi <simon.marchi@ericsson.com>
372
373 * Makefile.in: Switch order of make rules.
374
375 2018-02-19 Alan Hayward <alan.hayward@arm.com>
376
377 * Makefile.in: Add common directory in build.
378 * configure.ac: Add common reference.
379 * configure: Regenerate.
380
381 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
382
383 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
384 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
385 * spu-low.c (spu_target_ops): Likewise.
386 * win32-low.c (win32_target_ops): Likewise.
387 * server.c (supported_btrace_packets): Report packets unconditionally.
388 * target.h (target_ops) <supports_btrace>: Remove.
389 (target_supports_btrace): Remove.
390
391 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
392
393 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
394 (handle_btrace_disable): Change return type to void. Use exceptions
395 to report errors.
396 (handle_btrace_general_set): Catch exception and copy message to
397 return message.
398
399 2018-02-08 Tom Tromey <tom@tromey.com>
400
401 * linux-low.c (install_software_single_step_breakpoints): Use
402 make_scoped_restore.
403 * inferiors.c (make_cleanup_restore_current_thread): Remove.
404 (do_restore_current_thread_cleanup): Remove.
405 * gdbthread.h (make_cleanup_restore_current_thread): Don't
406 declare.
407
408 2018-02-08 Tom Tromey <tom@tromey.com>
409
410 * mem-break.c (set_raw_breakpoint_at): Use
411 gdb::unique_xmalloc_ptr.
412
413 2018-01-30 Pedro Alves <palves@redhat.com>
414
415 PR gdb/13211
416 * target.c (target_terminal::terminal_state): Rename to ...
417 (target_terminal::m_terminal_state): ... this.
418
419 2018-01-19 James Clarke <jrtc27@jrtc27.com>
420
421 * linux-low.c (handle_extended_wait): Surround call to
422 thread_db_notice_clone with #ifdef USE_THREAD_DB.
423
424 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
425
426 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
427 linux_ptrace_attach_fail_reason_string now returning an
428 std::string.
429 (linux_attach): Likewise.
430 * thread-db.c (attach_thread): Likewise.
431
432 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
433
434 PR gdb/21559
435 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
436 checking for fs_base/gs_base fields in struct user_regs_struct.
437 * configure: Regenerate.
438
439 2018-01-16 Yao Qi <yao.qi@linaro.org>
440
441 PR gdb/18749
442 * linux-low.c (fetch_register): Call supply_register instead of
443 error.
444
445 2018-01-08 Yao Qi <yao.qi@linaro.org>
446 Simon Marchi <simon.marchi@ericsson.com>
447
448 * Makefile.in (OBS): Remove selftest.o.
449 * configure.ac: Set srv_selftest_objs if $development is true.
450 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
451 * configure: Re-generated.
452 * server.c (captured_main): Wrap variable selftest_filter with
453 GDB_SELF_TEST.
454
455 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
456
457 * server.c (parse_debug_format_options): Return std::string.
458 (handle_monitor_command, captured_main): Adjust.
459
460 2018-01-05 Pedro Alves <palves@redhat.com>
461
462 PR gdb/18653
463 * server.c (captured_main): Pass quiet=false to
464 save_original_signals_state.
465
466 2018-01-01 Joel Brobecker <brobecker@adacore.com>
467
468 * gdbreplay.c (gdbreplay_version): Update copyright year in
469 version message.
470 * server.c (gdbserver_version): Likewise.
471
472 2017-12-08 Tom Tromey <tom@tromey.com>
473
474 * ax.c (ax_printf): Update.
475
476 2017-12-07 Yao Qi <yao.qi@linaro.org>
477
478 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
479 aarch64_linux_read_description.
480 * linux-amd64-ipa.c (idx2mask): New array.
481 (get_ipa_tdesc): Move idx2mask out.
482 (initialize_low_tracepoint): Initialize target descriptions.
483 * linux-i386-ipa.c (idx2mask): New array.
484 (get_ipa_tdesc): Move idx2mask out.
485 (initialize_low_tracepoint): Initialize target descriptions.
486
487 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * tdesc.c (struct tdesc_type): Change return type.
490 (tdesc_add_flag): Change parameter type.
491 (tdesc_add_bitfield): Likewise.
492 (tdesc_add_field): Likewise.
493 (tdesc_set_struct_size): Likewise.
494
495 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
496
497 * regcache.c (registers_to_string): Remove unused variable.
498
499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
500
501 * inferiors.c (for_each_inferior_with_data): Remove.
502 * inferiors.h (for_each_inferior_with_data): Remove.
503 * server.c (handle_qxfer_threads_worker): Change parameter type.
504 (handle_qxfer_threads_proper): Use for_each_thread.
505
506 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * inferiors.c (for_each_inferior): Remove.
509 (clear_inferiors): Use for_each_thread.
510 * inferiors.h (for_each_inferior): Remove.
511 * linux-low.c (linux_wait_for_event_filtered): Use
512 for_each_thread.
513 (linux_stabilize_threads): Likewise.
514 * regcache.c (regcache_release): Likewise.
515 * server.c (gdb_wants_all_threads_stopped): Likewise.
516 (clear_pending_status_callback): Remove.
517 (handle_status): Use for_each_thread.
518 (captured_main): Likewise.
519 * win32-low.c (child_init_thread_list): Likewise.
520 (win32_clear_inferiors): Likewise.
521 (fake_breakpoint_event): Likewise.
522
523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
524
525 * inferiors.h (find_inferior): Remove.
526 * inferiors.c (find_inferior): Remove.
527
528 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
529
530 * linux-low.c (resume_status_pending_p): Update comment.
531 (need_step_over_p): Update comment.
532
533 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
534
535 * linux-low.c (proceed_one_lwp): Return void, change parameter
536 type.
537 (unsuspend_and_proceed_one_lwp): Likewise.
538 (proceed_all_lwps): Use for_each_thread.
539 (unstop_all_lwps): Likewise.
540
541 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * linux-low.c (linux_resume_one_thread): Return void, take
544 parameter directly.
545 (linux_resume): Use for_each_thread.
546
547 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
548
549 * linux-low.c (send_sigstop_callback): Return void, change
550 parameter type. Rename to...
551 (send_sigstop): ... this.
552 (suspend_and_send_sigstop_callback): Return void, change parameter
553 type. Rename to...
554 (suspend_and_send_sigstop): ... this.
555 (stop_all_lwps): Use for_each_thread.
556
557 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
558
559 * linux-low.c (lwp_running): Return bool, remove unused
560 argument.
561 (linux_stabilize_threads): Use find_thread.
562
563 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * linux-low.c (select_singlestep_lwp_callback): Remove.
566 (count_events_callback): Remove.
567 (select_event_lwp_callback): Remove.
568 (select_event_lwp): Use find_thread/for_each_thread.
569
570 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
571
572 * linux-low.c (not_stopped_callback): Return bool, take filter
573 argument directly.
574 (linux_wait_for_event_filtered): Use find_thread.
575 (linux_wait_1): Likewise.
576
577 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
578
579 * linux-low.c (same_lwp): Remove.
580 (find_lwp_pid): Use find_thread.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-low.c (delete_lwp_callback): Remove.
585 (linux_mourn): Use for_each_thread.
586
587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * linux-low.c (linux_detach_lwp_callback): Return void, remove
590 args parameter, don't check for pid.
591 (linux_detach): Use for_each_thread.
592
593 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
594
595 * linux-low.c (struct counter): Remove.
596 (second_thread_of_pid_p): Remove.
597 (last_thread_of_process_p): Use find_thread.
598
599 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * inferiors.c (find_inferior_in_random): Remove.
602 * inferiors.h (find_inferior_in_random): Remove.
603 * linux-low.c (status_pending_p_callback): Return bool, accept
604 parameter ptid directly.
605 (linux_wait_for_event_filtered): Use find_thread_in_random.
606 (linux_wait_1): Likewise.
607
608 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
609
610 * inferiors.c (find_inferior_id): Remove.
611 (find_thread_ptid): Move implemention from find_inferior_id to
612 here.
613 * inferiors.h (find_inferior_id): Remove.
614 * server.c (handle_status): Use find_thread_ptid.
615 (process_serial_event): Likewise.
616 * thread-db.c (find_one_thread): Likewise.
617 (thread_db_thread_handle): Likewise.
618 * win32-low.c (thread_rec): Likewise.
619 (child_delete_thread): Likewise.
620 (win32_thread_alive): Likewise.
621 (get_child_debug_event): Likewise.
622
623 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
624
625 * linux-mips-low.c (update_watch_registers_callback): Return
626 void, remove pid_p parameter, don't check for pid.
627 (mips_insert_point, mips_remove_point): Use for_each_thread.
628
629 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
630
631 * lynx.low (lynx_delete_thread_callback): Remove.
632 (lynx_mourn): Use for_each_thread.
633
634 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * regcache.c (regcache_invalidate_one): Remove.
637 (regcache_invalidate_pid): use for_each_thread.
638
639 2017-11-26 Tom Tromey <tom@tromey.com>
640
641 * linux-low.c (linux_create_inferior): Update.
642
643 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
644
645 * spu-low.c (spu_create_inferior): Fix typo in argument name.
646
647 2017-11-24 Alan Hayward <alan.hayward@arm.com>
648
649 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
650 * linux-aarch64-low.c (initialize_low_arch): Call init func.
651 * linux-aarch64-tdesc-selftest.c: New file.
652 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
653
654 2017-11-24 Alan Hayward <alan.hayward@arm.com>
655
656 * configure.srv: Add new file.
657 * linux-aarch64-low.c (initialize_low_arch): Call init func.
658 * linux-aarch64-tdesc-selftest.c: New file.
659 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
660
661 2017-11-24 Alan Hayward <alan.hayward@arm.com>
662
663 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
664 * linux-aarch64-low.c (initialize_low_arch): Remove init.
665 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
666
667 2017-11-24 Alan Hayward <alan.hayward@arm.com>
668
669 * configure.srv: Add new files.
670 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
671 aarch64_linux_read_description.
672 * linux-aarch64-low.c (aarch64_linux_read_description):
673 Merge with aarch64_arch_setup.
674 (aarch64_arch_setup): Call aarch64_linux_read_description.
675 * linux-aarch64-tdesc.c: New file.
676 * linux-aarch64-tdesc.h: New file.
677
678 2017-11-24 Yao Qi <yao.qi@linaro.org>
679
680 * configure.srv: Set $srv_regobj for tic6x-linux.
681 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
682 (tic6x_read_description): Move some code to tic6x_arch_setup.
683 (tic6x_tdesc_test): New function.
684 (initialize_low_arch): Call selftests::register_test.
685
686 2017-11-22 Yao Qi <yao.qi@linaro.org>
687
688 * remote-utils.c (prepare_resume_reply): Use memcpy.
689
690 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
691
692 * linux-low.c (kill_one_lwp_callback): Return void, take
693 argument directly, don't filter on pid.
694 (linux_kill): Use for_each_thread.
695
696 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
697
698 * linux-low.c (need_step_over_p): Return bool, remove dummy
699 argument.
700 (linux_resume, proceed_all_lwps): Use find_thread.
701
702 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
703
704 * linux-low.c (resume_status_pending_p): Return bool, remove
705 flag_p argument.
706 (linux_resume): Use find_thread.
707
708 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
709
710 * linux-low.c (struct thread_resume_array): Remove.
711 (linux_set_resume_request): Return void, take arguments
712 directly.
713 (linux_resume): Use for_each_thread.
714
715 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
716
717 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
718 return bool, remove data argument.
719 (linux_stabilize_threads): Use find_thread.
720
721 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
722
723 * linux-low.c (unsuspend_one_lwp): Remove.
724 (unsuspend_all_lwps): Use for_each_thread, inline code from
725 unsuspend_one_lwp.
726
727 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
728
729 * gdbthread.h (find_thread): Add overload with ptid_t filter.
730 * linux-low.c (struct iterate_over_lwps_args): Remove.
731 (iterate_over_lwps_filter): Remove.
732 (iterate_over_lwps): Use find_thread.
733
734 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
735
736 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
737 (linux_handle_new_gdb_connection): Use for_each_thread, inline
738 code from reset_lwp_ptrace_options_callback.
739
740 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
741
742 * linux-arm-low.c (struct update_registers_data): Remove.
743 (update_registers_callback): Return void, take arguments
744 directly, don't check thread's pid.
745 (arm_insert_point, arm_remove_point): Use for_each_thread.
746
747 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
748
749 * win32-low.c (continue_one_thread): Return void, take argument
750 directly.
751 (child_continue): Use for_each_thread.
752
753 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
754
755 * win32-i386-low.c (update_debug_registers_callback): Rename
756 to ...
757 (update_debug_registers): ... this, return void, remove pid_p arg.
758 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
759
760 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * inferiors.h (struct process_info): Add constructor, initialize
763 fields..
764 <syscalls_to_catch>: Change type to std::vector<int>.
765 * inferiors.c (add_process): Allocate process_info with new.
766 (remove_process): Free process_info with delete.
767 * linux-low.c (handle_extended_wait): Adjust.
768 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
769 * server.c (handle_general_set): Adjust.
770
771 2017-11-16 Pedro Alves <palves@redhat.com>
772
773 * remote-utils.c (remote_close): Block SIGIO signals instead of
774 uninstalling the SIGIO handler.
775
776 2017-11-16 Alan Hayward <alan.hayward@arm.com>
777
778 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
779
780 2017-11-16 Yao Qi <yao.qi@linaro.org>
781
782 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
783 (tic6x_store_gregset): Likewise.
784 (tic6x_usrregs_info): Move it up.
785
786 2017-11-15 Alan Hayward <alan.hayward@arm.com>
787
788 * Makefile.in: Update arch rules.
789 * configure.srv: Explicitly mark arch/ files.
790
791 2017-11-13 Andreas Schwab <schwab@suse.de>
792
793 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
794 function.
795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
796
797 2017-11-06 Pedro Alves <palves@redhat.com>
798
799 * config.in, configure: Regenerate.
800
801 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
802
803 * target.c (struct thread_search): Remove.
804 (thread_search_callback): Remove.
805 (prepare_to_access_memory): Use for_each_thread instead of
806 find_inferior. Inline code from thread_search_callback.
807
808 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
809
810 * server.c (struct visit_actioned_threads_data): Remove.
811 (visit_actioned_threads): Change prototype to take arguments
812 directly.
813 (resume): Use find_thread instead of find_inferior.
814
815 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
816
817 * server.c (queue_stop_reply_callback): Change prototype, return
818 void.
819 (find_status_pending_thread_callback): Remove.
820 (handle_status): Replace find_inferior with find_thread and
821 for_each_thread.
822
823 2017-10-25 Alan Hayward <alan.hayward@arm.com>
824
825 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
826 with REGNO.
827 (aarch64_store_gregset): Likewise.
828 (aarch64_fill_fpregset): Likewise.
829 (aarch64_store_fpregset): Likewise.
830
831 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
832
833 * gdbthread.h (find_thread, for_each_thread): New functions.
834 * inferiors.c (thread_of_pid): Remove.
835 (find_any_thread_of_pid): Use find_thread.
836 * linux-low.c (num_lwps): Use for_each_thread.
837
838 2017-10-17 Yao Qi <yao.qi@linaro.org>
839
840 * Makefile.in: Remove one rule.
841 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
842
843 2017-10-17 Yao Qi <yao.qi@linaro.org>
844
845 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
846 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
847
848 2017-10-17 Yao Qi <yao.qi@linaro.org>
849
850 * configure.srv: Rename arm.o with arch/arm.o.
851
852 2017-10-17 Yao Qi <yao.qi@linaro.org>
853
854 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
855 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
856 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
857 (arch-i386.o, arch-amd64.o): Remove rules.
858 (arch/%.o): New rule.
859 Update POSTCOMPILE and COMPILE.pre.
860 * configure.ac: Invoke AC_CONFIG_COMMANDS.
861 * configure: Re-generated.
862 * configure.srv: Replace arch-i386.o with arch/i386.o.
863 Replace arch-amd64.o with arch/amd64.o.
864
865 2017-10-16 Yao Qi <yao.qi@linaro.org>
866
867 * configure: Regenerated.
868
869 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
870
871 * inferiors.h: (struct inferior_list): Remove.
872 (struct inferior_list_entry); Remove.
873 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
874 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
875 get_first_inferior): Remove.
876 (for_each_inferior, for_each_inferior_with_data, find_inferior,
877 find_inferior_id, find_inferior_in_random): Change signature.
878 * inferiors.c (all_threads): Change type to
879 std::list<thread_info *>.
880 (get_thread): Remove macro.
881 (find_inferior, find_inferior_id): Change signature, implement
882 using find_thread.
883 (find_inferior_in_random): Change signature, implement using
884 find_thread_in_random.
885 (for_each_inferior, for_each_inferior_with_data): Change
886 signature, implement using for_each_thread.
887 (add_inferior_to_list, remove_inferior): Remove.
888 (add_thread, get_first_thread, thread_of_pid,
889 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
890 (get_first_inferior, one_inferior_p, clear_inferior_list):
891 Remove.
892 (clear_inferiors, get_thread_process): Update.
893 * gdbthread.h: Include <list>.
894 (struct thread_info) <entry>: Remove field.
895 <id>: New field.
896 (all_threads): Change type to std::list<thread_info *>.
897 (get_first_inferior): Add doc.
898 (find_thread, for_each_thread, find_thread_in_random): New
899 functions.
900 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
901 * linux-arm-low.c (update_registers_callback): Update.
902 * linux-low.c (second_thread_of_pid_p): Update.
903 (kill_one_lwp_callback, linux_detach_lwp_callback,
904 delete_lwp_callback, status_pending_p_callback, same_lwp,
905 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
906 iterate_over_lwps, not_stopped_callback,
907 resume_stopped_resumed_lwps, count_events_callback,
908 select_singlestep_lwp_callback, select_event_lwp_callback,
909 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
910 suspend_and_send_sigstop_callback, wait_for_sigstop,
911 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
912 lwp_running, linux_set_resume_request, resume_status_pending_p,
913 need_step_over_p, start_step_over, linux_resume_one_thread,
914 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
915 reset_lwp_ptrace_options_callback): Update.
916 * linux-mips-low.c (update_watch_registers_callback): Update.
917 * regcache.c (regcache_invalidate_one, regcache_invalidate):
918 Update.
919 (free_register_cache_thread_one): Remove.
920 (regcache_release): Update.
921 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
922 handle_qxfer_threads_worker): Update.
923 (handle_query): Update, use list iterator.
924 (visit_actioned_threads, handle_pending_status,
925 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
926 clear_pending_status_callback, set_pending_status_callback,
927 find_status_pending_thread_callback, handle_status,
928 process_serial_event): Update.
929 * target.c (thread_search_callback): Update.
930 * thread-db.c (thread_db_get_tls_address): Update.
931 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
932 Update.
933 * win32-i386-low.c (update_debug_registers_callback): Update.
934 * win32-low.c (delete_thread_info, child_delete_thread,
935 continue_one_thread, suspend_one_thread,
936 get_child_debug_event): Adjust.
937
938 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
939
940 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
941 * inferiors.h: Include <list>.
942 (struct process_info) <entry>: Remove field.
943 <pid>: New field.
944 (pid_of): Change macro to function.
945 (ptid_of, lwpid_of): Remove macro.
946 (all_processes): Change type to std::list<process_info *>.
947 (ALL_PROCESSES): Remove macro.
948 (for_each_process, find_process): New function.
949 * inferiors.c (all_processes): Change type to
950 std::list<process_info *>.
951 (find_thread_process): Adjust.
952 (add_process): Likewise.
953 (remove_process): Likewise.
954 (find_process_pid): Likewise.
955 (get_first_process): Likewise.
956 (started_inferior_callback): Remove.
957 (have_started_inferiors_p): Adjust.
958 (attached_inferior_callback): Remove.
959 (have_attached_inferiors_p): Adjust.
960 * linux-low.c (check_zombie_leaders): Likewise.
961 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
962 (x86_linux_update_xmltarget): Adjust.
963 * server.c (handle_query): Likewise.
964 (gdb_reattached_process): Remove.
965 (handle_status): Adjust.
966 (kill_inferior_callback): Likewise.
967 (detach_or_kill_inferior): Remove.
968 (print_started_pid): Likewise.
969 (print_attached_pid): Likewise.
970 (detach_or_kill_for_exit): Update.
971 (process_serial_event): Likewise.
972 * linux-arm-low.c (arm_new_fork): Likewise.
973
974 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * dll.h: Include <list>.
977 (struct dll_info): Add constructor.
978 <entry>: Remove field.
979 (all_dlls): Change type to std::list<dll_info>.
980 * dll.c: Include <algorithm>.
981 (get_dll): Remove macro.
982 (all_dlls): Change type to std::list<dll_info *>.
983 (free_one_dll): Remove.
984 (match_dll): Likewise.
985 (loaded_dll): Adjust.
986 (unloaded_dll): Adjust to all_dlls type change, use
987 std::find_if. Inline code from match_dll.
988 (clear_dlls): Adjust to all_dlls type change.
989 * server.c (emit_dll_description): Remove.
990 (handle_qxfer_libraries): Adjust to all_dlls type change,
991 integrate emit_dll_description's functionality.
992
993 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
994
995 * linux-low.h (struct linux_target_ops) <delete_process>: New
996 field.
997 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
998 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
999 (struct linux_target_ops): Add delete_process callback.
1000 * linux-arm-low.c (arm_delete_process): New.
1001 (struct linux_target_ops): Add delete_process callback.
1002 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1003 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1004 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1005 * linux-mips-low.c (mips_linux_delete_process): New.
1006 (struct linux_target_ops): Add delete_process callback.
1007 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1008 * linux-s390-low.c (struct linux_target_ops): Likewise.
1009 * linux-sh-low.c (struct linux_target_ops): Likewise.
1010 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1011 * linux-tile-low.c (struct linux_target_ops): Likewise.
1012 * linux-x86-low.c (x86_linux_delete_process): New.
1013 (struct linux_target_ops): Add delete_process callback.
1014 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1015
1016 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1017
1018 * linux-aarch64-low.c (the_low_target): Add thread delete
1019 callback.
1020 * linux-arm-low.c (arm_delete_thread): New function.
1021 (the_low_target): Add thread delete callback.
1022 * linux-bfin-low.c (the_low_target): Likewise.
1023 * linux-crisv32-low.c (the_low_target): Likewise.
1024 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1025 set.
1026 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1027 field.
1028 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1029 * linux-mips-low.c (mips_linux_delete_thread): New function.
1030 (the_low_target): Add thread delete callback.
1031 * linux-ppc-low.c (the_low_target): Likewise.
1032 * linux-s390-low.c (the_low_target): Likewise.
1033 * linux-sh-low.c (the_low_target): Likewise.
1034 * linux-tic6x-low.c (the_low_target): Likewise.
1035 * linux-tile-low.c (the_low_target): Likewise.
1036 * linux-x86-low.c (the_low_target): Likewise.
1037 * linux-xtensa-low.c (the_low_target): Likewise.
1038
1039 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1040
1041 * win32-low.c: Include "common-inferior.h".
1042
1043 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1044
1045 * inferiors.c (set_inferior_cwd): New function.
1046 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1047 (handle_query): Inform that QSetWorkingDir is supported.
1048 * win32-low.c (create_process): Pass the inferior's cwd to
1049 CreateProcess.
1050
1051 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1052
1053 * inferiors.c (current_inferior_cwd): New global variable.
1054 (get_inferior_cwd): New function.
1055 * inferiors.h (struct process_info) <cwd>: New field.
1056
1057 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1058
1059 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1060 (OBS): Add gdb_tilde_expand.o.
1061
1062 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1065 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1066
1067 2017-09-29 Pedro Alves <palves@redhat.com>
1068
1069 * ax.c (gdb_parse_agent_expr): Constify.
1070 * ax.h (gdb_parse_agent_expr): Constify.
1071 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1072 Constify.
1073 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1074 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1075 * remote-utils.h (read_ptid): Constify.
1076 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1077 (process_point_options, process_serial_event): Constify.
1078 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1079 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1080 (cmd_qtbuffer): Constify.
1081
1082 2017-09-29 Pedro Alves <palves@redhat.com>
1083
1084 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1085 fails.
1086
1087 2017-09-29 Pedro Alves <palves@redhat.com>
1088
1089 * linux-low.c (handle_extended_wait): Pass parent thread instead
1090 of process to thread_db_notice_clone.
1091 * linux-low.h (thread_db_notice_clone): Replace parent process
1092 parameter with parent thread parameter.
1093 * thread-db.c (find_one_thread): Add comment.
1094 (thread_db_notice_clone): Replace parent process parameter with
1095 parent thread parameter. Temporarily switch to the parent thread.
1096
1097 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * gdbthread.h: Include "common-gdbthread.h".
1100 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1101 "if" when validating the ptid.
1102 * remote-utils.c: Include "gdbthread.h".
1103 (prepare_resume_reply): Use "switch_to_thread".
1104 * target.c (done_accessing_memory): Likewise.
1105
1106 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1107
1108 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1109 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1110 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1111 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1112 s390x-gs-linux64-ipa.o to ipa_obj.
1113 * linux-s390-low.c (HWCAP_S390_GS): New define.
1114 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1115 New functions.
1116 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1117 (s390_arch_setup): Check for guarded-storage support and choose
1118 appropriate tdesc.
1119 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1120 init_registers_s390x_gs_linux64.
1121 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1122 enum value.
1123 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1124 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1125
1126 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1127
1128 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1129
1130 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1131
1132 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1133 (thread_db_thread_handle): Declare.
1134 * linux-low.c (linux_target_ops): Initialize thread_handle.
1135 * server.c (handle_qxfer_threads_worker): Add support for
1136 "handle" attribute.
1137 * target.h (struct target_ops): Add new function pointer,
1138 thread_handle.
1139 (target_thread_handle): Define.
1140 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1141 field in lwp.
1142 (thread_db_thread_handle): New function.
1143
1144 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1145
1146 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1147 * linux-low.h (thread_db_notice_clone): Declare.
1148 * thread-db.c (thread_db_notice_clone): New function.
1149
1150 2017-09-21 Pedro Alves <palves@redhat.com>
1151
1152 * server.c (gdb_read_memory, handle_status, process_serial_event)
1153 (handle_serial_event, handle_target_event): Adjust to
1154 set_desired_thread prototype change.
1155 * target.c (set_desired_thread): Remove 'use_general' parameter
1156 and adjust.
1157 * target.h (set_desired_thread): Remove 'use_general' parameter.
1158
1159 2017-09-20 Tom Tromey <tom@tromey.com>
1160
1161 * target.c (target_terminal::terminal_state): Define.
1162 (target_terminal::init): Rename from target_terminal_init.
1163 (target_terminal::inferior): Rename from
1164 target_terminal_inferior.
1165 (target_terminal::ours): Rename from target_terminal_ours.
1166 (target_terminal::ours_for_output, target_terminal::info): New.
1167
1168 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * server.c (accumulate_file_name_length): Remove.
1171 (emit_dll_description): Adjust to std::string change.
1172 (handle_qxfer_libraries): Use std::string to hold document.
1173
1174 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1175
1176 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1177 return type of xml_escape_text.
1178 * server.c (emit_dll_description): Likewise.
1179
1180 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1181
1182 * server.c (captured_main): Accept argument for --selftest.
1183 Update run_tests call.
1184 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1185 when registering selftests.
1186
1187 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1190 instead of "VEC" for "target_desc.reg_defs".
1191 (regcache_cpy): Likewise.
1192 (registers_to_string): Likewise.
1193 (registers_from_string): Likewise.
1194 (find_regno): Likewise.
1195 (supply_regblock): Likewise.
1196 (regcache_raw_read_unsigned): Likewise.
1197 * tdesc.c (init_target_desc): Likewise.
1198 (tdesc_create_reg): Likewise.
1199 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1200 (struct target_desc) <reg_defs>: Convert to "std::vector".
1201 (target_desc): Do not initialize "reg_defs".
1202 (~target_desc): Update code to use "std::vector" instead of "VEC"
1203 for "target_desc.reg_defs".
1204 (operator==): Likewise.
1205
1206 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1207
1208 * inferiors.h (thread_to_gdb_id): Remove.
1209 * inferiors.c (thread_to_gdb_id): Remove.
1210 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1211 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1212 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1213 Likewise.
1214 * nto-low.c (nto_fetch_registers, nto_store_registers,
1215 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1216
1217 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * inferiors.h (gdb_id_to_thread_id): Remove.
1220 * inferiors.c (gdb_id_to_thread_id): Remove.
1221 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1222 removal. Move pid declaration closer to where it's used.
1223
1224 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1225
1226 * server.c (handle_detach): New function.
1227 (process_serial_event): Move code out, call handle_detach.
1228
1229 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1230
1231 * server.c (require_running): Rename to ...
1232 (require_running_or_return): ... this ...
1233 (require_running_or_break): ... and this.
1234 (handle_query, process_serial_event): Adjust.
1235
1236 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * linux-low.c (linux_set_resume_request): Remove unused
1239 variables.
1240
1241 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1242
1243 * server.c (first_thread_of): Remove.
1244 (process_serial_event): Replace usage of first_thread_of with
1245 find_any_thread_of_pid.
1246 * tracepoint.c (same_process_p): Remove.
1247 (gdb_agent_about_to_close): Replace usage of same_process_p with
1248 find_any_thread_of_pid.
1249 * linux-x86-low.c (same_process_callback): Remove.
1250 (x86_arch_setup_process_callback): Replace usage of
1251 same_process_callback with find_any_thread_of_pid.
1252 * thread-db.c (any_thread_of): Remove.
1253 (switch_to_process): Replace usage of any_thread_of with
1254 find_any_thread_of_pid.
1255 * inferiors.c (thread_pid_matches_callback): Remove.
1256 (find_thread_process): Adjust to use find_any_thread_of_pid.
1257
1258 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1259
1260 * regcache.c (get_thread_regcache): Guard calls to "memset"
1261 with "!VEC_empty".
1262
1263 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1264
1265 * linux-low.c (handle_extended_wait): Use
1266 "allocate_target_description" instead of "XNEW".
1267 * linux-x86-low.c (initialize_low_arch): Likewise.
1268
1269 2017-09-05 Yao Qi <yao.qi@linaro.org>
1270
1271 * configure.srv (srv_i386_regobj): Remove.
1272 (srv_amd64_regobj): Remove.
1273 (srv_regobj): Set it to "" for x86 non-linux targets.
1274 * linux-x86-tdesc.c (i386_linux_read_description):
1275 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1276 (init_registers_i386): Remove the declaration.
1277 (tdesc_i386): Remove the declaration.
1278 (lynx_i386_arch_setup): Call i386_create_target_description.
1279 * nto-x86-low.c: Likewise.
1280 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1281 [!__x86_64__]: include arch/i386.h.
1282 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1283
1284 2017-09-05 Yao Qi <yao.qi@linaro.org>
1285
1286 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1287 i386/amd64-XXX-linux from it.
1288
1289 2017-09-05 Yao Qi <yao.qi@linaro.org>
1290
1291 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1292 false.
1293 (ipa_amd64_linux_regobj): Remove.
1294 (ipa_x32_linux_regobj): Remove.
1295
1296 2017-09-05 Yao Qi <yao.qi@linaro.org>
1297
1298 * Makefile.in (arch-amd64.o): New rule.
1299 * configure.srv: Append arch-amd64.o.
1300 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1301 (get_ipa_tdesc): Call amd64_linux_read_description.
1302 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1303 and init_registers_amd64_XXX.
1304 * linux-x86-low.c (x86_linux_read_description): Call
1305 amd64_linux_read_description.
1306 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1307 (initialize_low_arch): Don't call init_registers_x32_XXX and
1308 init_registers_amd64_XXX.
1309 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1310 and tdesc_amd64_XXX.
1311 [__x86_64__] (amd64_tdesc_test): New function.
1312 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1313 and init_registers_amd64_XXX.
1314 * linux-x86-tdesc.c: Include arch/amd64.h.
1315 (xcr0_to_tdesc_idx): New function.
1316 (i386_linux_read_description): New function.
1317 (amd64_get_ipa_tdesc_idx): New function.
1318 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1319 (amd64_get_ipa_tdesc): Declare.
1320
1321 2017-09-05 Yao Qi <yao.qi@linaro.org>
1322
1323 * configure.srv (srv_i386_linux_xmlfiles): Remove
1324 i386/i386-XXX-linux.xml from it.
1325
1326 2017-09-05 Yao Qi <yao.qi@linaro.org>
1327
1328 * configure.srv: Set srv_i386_linux_regobj empty if $development
1329 is false.
1330 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1331 initialize_low_tdesc.
1332 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1333 with #if initialize_low_tdesc.
1334 * linux-x86-tdesc-selftest.c: New file.
1335 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1336
1337 2017-09-05 Yao Qi <yao.qi@linaro.org>
1338
1339 * Makefile.in (arch-i386.o): New rule.
1340 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1341 (x86_64-*-linux*): Likewise.
1342 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1343 include arch/i386.h.
1344 (i386_linux_read_description): Remove code and call
1345 i386_create_target_description.
1346 * tdesc.c (allocate_target_description): New function.
1347 * tdesc.h (set_tdesc_architecture): Remove declaration.
1348 (set_tdesc_osabi): Likewise.
1349
1350 2017-09-05 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1353 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1354 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1355 .xmltarget.
1356 * server.c (get_features_xml): Call tdesc_get_features_xml.
1357 * tdesc.c (set_tdesc_architecture): New function.
1358 (set_tdesc_osabi): New function.
1359 (tdesc_get_features_xml): New function.
1360 (tdesc_create_feature): Add an argument.
1361 * tdesc.h (struct target_desc) <features>: New field.
1362 <arch, osabi>: New field.
1363 (~target_desc): xfree features, arch, and osabi.
1364 (target_desc::oerator==): Don't compare .xmltarget.
1365 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1366 (set_tdesc_osabi): Likewise.
1367 (tdesc_get_features_xml): Likewise.
1368
1369 2017-09-05 Yao Qi <yao.qi@linaro.org>
1370
1371 * linux-x86-tdesc.c: Include selftest.h.
1372 (i386_tdesc_test): New function.
1373 (initialize_low_tdesc): Call selftests::register_test.
1374 * tdesc.h: Include regdef.h.
1375 (target_desc): Override operator == and !=.
1376
1377 2017-09-05 Yao Qi <yao.qi@linaro.org>
1378
1379 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1380 (ipa_obj): Likewise.
1381 * linux-i386-ipa.c: Include common/x86-xstate.h
1382 (get_ipa_tdesc): Call i386_linux_read_description.
1383 (initialize_low_tracepoint): Don't call init_registers_XXX
1384 functions, call initialize_low_tdesc instead.
1385 * linux-x86-low.c (x86_linux_read_description): Call
1386 i386_linux_read_description.
1387 (initialize_low_arch): Don't call init_registers_i386_XXX
1388 functions, call initialize_low_tdesc.
1389 * linux-x86-tdesc.c: New file.
1390 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1391 (i386_get_ipa_tdesc_idx): Declare.
1392 (i386_get_ipa_tdesc): Declare.
1393 (initialize_low_tdesc): Declare.
1394
1395 2017-09-05 Yao Qi <yao.qi@linaro.org>
1396
1397 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1398 instead of 0.
1399
1400 2017-09-05 Yao Qi <yao.qi@linaro.org>
1401
1402 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1403 * regcache.c (get_thread_regcache): Use VEC_length.
1404 (init_register_cache): Likewise.
1405 (regcache_cpy): Likewise.
1406 (registers_to_string): Iterate reg_defs via VEC_iterate.
1407 (find_regno): Likewise.
1408 (find_register_by_number): Use VEC_index.
1409 (register_size): Call find_register_by_number.
1410 (register_data): Call find_register_by_number.
1411 (supply_regblock): Use VEC_length.
1412 (regcache_raw_read_unsigned): Likewise.
1413 * tdesc.c (init_target_desc): Iterate reg_defs via
1414 VEC_iterate.
1415 (default_description): Update initializer.
1416 (copy_target_description): Don't update field num_registers.
1417 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1418 <num_registers>: Remove.
1419
1420 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * Makefile.in (.SECONDARY): Define target.
1423
1424 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1425
1426 * linux-low.c (linux_wait_1): Adjust.
1427 * server.c (queue_stop_reply_callback): Adjust.
1428
1429 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1430
1431 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1432 QEnvironmentUnset and QEnvironmentReset packets.
1433 (handle_query): Inform remote that QEnvironmentHexEncoded,
1434 QEnvironmentUnset and QEnvironmentReset are supported.
1435
1436 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * inferiors.h (inferior_target_data): Rename to ...
1439 (thread_target_data): ... this.
1440 (inferior_regcache_data): Rename to ...
1441 (thread_regcache_data): ... this.
1442 (set_inferior_regcache_data): Rename to ...
1443 (set_thread_regcache_data): ... this.
1444 * inferiors.c (inferior_target_data): Rename to ...
1445 (thread_target_data): ... this.
1446 (inferior_regcache_data): Rename to ...
1447 (thread_regcache_data): ... this.
1448 (set_inferior_regcache_data): Rename to ...
1449 (set_thread_regcache_data): ... this.
1450 (free_one_thread): Update.
1451 * linux-low.h (get_thread_lwp): Update.
1452 * regcache.c (get_thread_regcache): Update.
1453 (regcache_invalidate_thread): Update.
1454 (free_register_cache_thread): Update.
1455 * win32-i386-low.c (update_debug_registers_callback): Update.
1456 (win32_get_current_dr): Update.
1457 * win32-low.c (thread_rec): Update.
1458 (delete_thread_info): Update.
1459 (continue_one_thread): Update.
1460 (suspend_one_thread): Update.
1461
1462 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * inferiors.c (set_inferior_target_data): Remove.
1465 * inferiors.h (set_inferior_target_data): Remove.
1466
1467 2017-08-18 Yao Qi <yao.qi@linaro.org>
1468
1469 * Makefile.in (OBS): Add selftest.o.
1470 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1471 * configure, config.in: Re-generated.
1472 * server.c: Include common/sefltest.h.
1473 (captured_main): Handle option --selftest.
1474
1475 2017-08-09 Yao Qi <yao.qi@linaro.org>
1476
1477 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1478 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1479 i386-avx-mpx.o and i386-mmx.o.
1480 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1481 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1482 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1483 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1484 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1485 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1486 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1487 i386/amd64-avx-mpx.xml.
1488
1489 2017-08-09 Yao Qi <yao.qi@linaro.org>
1490
1491 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1492 and x32-avx-avx512.o.
1493 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1494 i386/x32-avx-avx512.xml.
1495
1496 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1497
1498 * tracepoint.h (enum class fast_tpoint_collect_result): New
1499 enumeration.
1500 (fast_tracepoint_collecting): Change return type to
1501 fast_tpoint_collect_result.
1502 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1503 * linux-low.h: Include tracepoint.h.
1504 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1505 fast_tpoint_collect_result.
1506 * linux-low.c (handle_tracepoints): Adjust.
1507 (linux_fast_tracepoint_collecting): Change return type to
1508 fast_tpoint_collect_result.
1509 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1510 linux_wait_1, stuck_in_jump_pad_callback,
1511 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1512 proceed_one_lwp): Adjust to type change.
1513
1514 2017-07-10 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1517
1518 2017-06-29 Yao Qi <yao.qi@linaro.org>
1519
1520 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1521 Remove.
1522 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1523
1524 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1525
1526 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1527
1528 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1529
1530 * linux-low.c (linux_create_inferior): Adjust code to access the
1531 environment information via 'gdb_environ' class.
1532 * lynx-low.c (lynx_create_inferior): Likewise.
1533 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1534 (get_environ): Return a pointer to 'our_environ'.
1535 (captured_main): Initialize 'our_environ'.
1536 * server.h (get_environ): Adjust prototype.
1537 * spu-low.c (spu_create_inferior): Adjust code to access the
1538 environment information via 'gdb_environ' class.
1539
1540 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1541
1542 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1543 usage of "register" keyword.
1544
1545 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * configure: Re-generate.
1548
1549 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * configure: Re-generate.
1552
1553 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1554
1555 * Makefile.in (COMPILE.pre): Add "-x c++".
1556
1557 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1558
1559 * fork-child.c: Conditionally include <signal.h>.
1560
1561 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1562
1563 * server.c (handle_general_set): Handle new packet
1564 "QStartupWithShell".
1565 (handle_query): Add "QStartupWithShell" to the list of supported
1566 packets.
1567 (gdbserver_usage): Add help text explaining the
1568 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1569 options.
1570 (captured_main): Recognize and act upon the presence of the new
1571 CLI options.
1572
1573 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1574 Pedro Alves <palves@redhat.com>
1575
1576 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1577 * configure: Regenerate.
1578 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1579 "fork-inferior.o".
1580 (i[34567]86-*-lynxos*): Likewise.
1581 (spu*-*-*): Likewise.
1582 * fork-child.c: New file.
1583 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1584 and "environ.h".
1585 (linux_ptrace_fun): New function.
1586 (linux_create_inferior): Adjust function prototype to reflect
1587 change on "target.h". Adjust function code to use
1588 "fork_inferior".
1589 (linux_request_interrupt): Delete "signal_pid".
1590 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1591 (lynx_ptrace_fun): New function.
1592 (lynx_create_inferior): Adjust function prototype to reflect
1593 change on "target.h". Adjust function code to use
1594 "fork_inferior".
1595 * nto-low.c (nto_create_inferior): Adjust function prototype and
1596 code to reflect change on "target.h". Update comments.
1597 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1598 "common-terminal.h" and "environ.h".
1599 (terminal_fd): Moved to fork-child.c.
1600 (old_foreground_pgrp): Likewise.
1601 (restore_old_foreground_pgrp): Likewise.
1602 (last_status): Make it global.
1603 (last_ptid): Likewise.
1604 (our_environ): New variable.
1605 (startup_with_shell): Likewise.
1606 (program_name): Likewise.
1607 (program_argv): Rename to...
1608 (program_args): ...this.
1609 (wrapper_argv): New variable.
1610 (start_inferior): Delete function.
1611 (get_exec_wrapper): New function.
1612 (get_exec_file): Likewise.
1613 (get_environ): Likewise.
1614 (prefork_hook): Likewise.
1615 (post_fork_inferior): Likewise.
1616 (postfork_hook): Likewise.
1617 (postfork_child_hook): Likewise.
1618 (handle_v_run): Update code to deal with arguments coming from the
1619 remote host. Update calls from "start_inferior" to
1620 "create_inferior".
1621 (captured_main): Likewise. Initialize environment variable. Call
1622 "have_job_control".
1623 * server.h (post_fork_inferior): New prototype.
1624 (get_environ): Likewise.
1625 (last_status): Declare.
1626 (last_ptid): Likewise.
1627 (signal_pid): Likewise.
1628 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1629 (spu_ptrace_fun): New function.
1630 (spu_create_inferior): Adjust function prototype to reflect change
1631 on "target.h". Adjust function code to use "fork_inferior".
1632 * target.c (target_terminal_init): New function.
1633 (target_terminal_inferior): Likewise.
1634 (target_terminal_ours): Likewise.
1635 * target.h: Include <vector>.
1636 (struct target_ops) <create_inferior>: Update prototype.
1637 (create_inferior): Update macro.
1638 * utils.c (gdb_flush_out_err): New function.
1639 * win32-low.c (win32_create_inferior): Adjust function prototype
1640 and code to reflect change on "target.h".
1641
1642 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1643
1644 * inferiors.c (switch_to_thread): New function.
1645
1646 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1647
1648 * Makefile.in (SFILE): Add "common/job-control.c".
1649 (OBS): Add "job-control.o".
1650
1651 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1652
1653 * Makefile: Remove "@host_makefile_frag@".
1654
1655 2017-05-05 Pedro Alves <palves@redhat.com>
1656
1657 * configure: Regenerate.
1658
1659 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1660
1661 * configure: Regenerate.
1662
1663 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1664
1665 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1666 software_single_step change of return type to
1667 std::vector<CORE_ADDR>.
1668 * linux-low.c (install_software_single_step_breakpoints):
1669 Likewise.
1670 * linux-low.h (install_software_single_step_breakpoints):
1671 Likewise.
1672
1673 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1674
1675 * remote-utils.c: Include "gdb_termios.h" instead of
1676 "terminal.h".
1677 * terminal.h: Delete file.
1678
1679 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1680
1681 * server.c: Include <vector>.
1682 <program_argv, wrapper_argv>: Convert to std::vector.
1683 (start_inferior): Rewrite function to use C++.
1684 (handle_v_run): Likewise. Update code that calculates the argv
1685 based on the vRun packet; use C++.
1686 (captured_main): Likewise.
1687
1688 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * server.c (handle_v_cont): Initialize thread_resume::thread
1691 with null_ptid.
1692
1693 2017-04-05 Pedro Alves <palves@redhat.com>
1694
1695 * configure: Regenerate.
1696
1697 2017-04-05 Pedro Alves <palves@redhat.com>
1698
1699 * gdbreplay.c (sync_error): Constify.
1700 * linux-x86-low.c (push_opcode): Constify.
1701
1702 2017-04-05 Pedro Alves <palves@redhat.com>
1703
1704 * win32-low.c (get_child_debug_event)
1705 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1706 Report TARGET_WAITKIND_SPURIOUS instead.
1707
1708 2017-04-05 Pedro Alves <palves@redhat.com>
1709
1710 * remote-utils.c (remote_prepare, remote_open): Constify.
1711 * remote-utils.h (remote_prepare, remote_open): Constify.
1712 * server.c (captured_main): Constify 'port' handling.
1713
1714 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1715
1716 * Makefile.in (clean): Clear .deps.
1717
1718 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1719
1720 * .gitignore: Remove generated files, replace with wildcard.
1721 * (clean): Replace removal of generated files with wildcard.
1722 (version.c): Replace with...
1723 (version-generated.c): ...this.
1724 (xml-builtin.c): Replace with...
1725 (xml-builtin-generated.c): ...this.
1726 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1727 (%.c: *regformats*): Replace with...
1728 (%-generated.c: *regformats*): ...this.
1729
1730 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1731
1732 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1733 (xtensa_fill_gregset): Call collect_register_by_name for
1734 threadptr register.
1735 (xtensa_store_gregset): Call supply_register_by_name for
1736 threadptr register.
1737
1738 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1739
1740 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1741 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1742 (xtensa_store_gregset): Call supply_register for all registers in
1743 a0_regnum..a0_regnum + C0_NREGS range.
1744
1745 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1748 (ax-ipa.o: ax.c): Remove.
1749 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1750 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1751 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1752 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1753 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1754
1755 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1756
1757 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1758 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1759 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1760 (errors-ipa.o: ../common/errors.c): Remove.
1761 (format-ipa.o: ../common/format.c): Remove.
1762 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1763
1764 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * Makefile.in (%-ipa.o: %.c): New rule.
1767 (tracepoint-ipa.o: tracepoint.c): Remove.
1768 (utils-ipa.o: utils.c): Remove.
1769 (remote-utils-ipa.o: remote-utils.c): Remove.
1770 (regcache-ipa.o: regcache.c): Remove.
1771 (i386-linux-ipa.o: i386-linux.c): Remove.
1772 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1773 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1774 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1775 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1776 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1777 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1778 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1779 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1780 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1781 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1782 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1783 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1784 (aarch64-ipa.o: aarch64.c): Remove.
1785 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1786 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1787 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1788 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1789 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1790 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1791 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1792 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1793 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1794 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1795 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1796 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1797 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1798 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1799 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1800 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1801 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1802 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1803 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1804 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1805 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1806 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1807 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1808 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1809 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1810 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1811 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1812 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1813 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1814 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1815 (tdesc-ipa.o: tdesc.c): Remove.
1816 (x32-linux-ipa.o: x32-linux.c): Remove.
1817 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1818 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1819
1820 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1821
1822 * Makefile.in (%.o: ../arch/%.c): New rule.
1823 (arm.o: ../arch/arm.c): Remove.
1824 (arm-linux.o: ../arch/arm-linux.c): Remove.
1825 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1826 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1827
1828 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1829
1830 * Makefile.in (%.o: ../nat/%.c): New rule.
1831 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1832 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1833 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1834 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1835 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1836 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1837 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1838 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1839 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1840 (linux-personality.o: ../nat/linux-personality.c): Remove.
1841 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1842 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1843 (x86-linux.o: ../nat/x86-linux.c): Remove.
1844 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1845 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1846
1847 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1848
1849 * Makefile.in (%.o: ../common/%.c): New rule.
1850 (signals.o: ../common/signals.c): Remove.
1851 (print-utils.o: ../common/print-utils.c): Remove.
1852 (rsp-low.o: ../common/rsp-low.c): Remove.
1853 (common-utils.o: ../common/common-utils.c): Remove.
1854 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1855 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1856 (vec.o: ../common/vec.c): Remove.
1857 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1858 (xml-utils.o: ../common/xml-utils.c): Remove.
1859 (ptid.o: ../common/ptid.c): Remove.
1860 (buffer.o: ../common/buffer.c): Remove.
1861 (format.o: ../common/format.c): Remove.
1862 (filestuff.o: ../common/filestuff.c): Remove.
1863 (agent.o: ../common/agent.c): Remove.
1864 (errors.o: ../common/errors.c): Remove.
1865 (environ.o: ../common/environ.c): Remove.
1866 (common-debug.o: ../common/common-debug.c): Remove.
1867 (cleanups.o: ../common/cleanups.c): Remove.
1868 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1869 (fileio.o: ../common/fileio.c): Remove.
1870 (common-regcache.o: ../common/common-regcache.c): Remove.
1871 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1872 (new-op.o: ../common/new-op.c): Remove.
1873 (btrace-common.o: ../common/btrace-common.c): Remove.
1874
1875 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1876
1877 * Makefile.in (%.o: ../target/%.c): New rule.
1878 (waitstatus.o: ../target/waitstatus.c): Remove.
1879
1880 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1881
1882 * Makefile.in
1883 (%.c: ../regformats/%.dat,
1884 (%.c: ../regformats/arm/%.dat,
1885 (%.c: ../regformats/i386/%.dat,
1886 (%.c: ../regformats/rs6000/%.dat): New rules.
1887 (aarch64.c): Remove.
1888 (reg-arm.c): Remove.
1889 (arm-with-iwmmxt.c): Remove.
1890 (arm-with-vfpv2.c): Remove.
1891 (arm-with-vfpv3.c): Remove.
1892 (arm-with-neon.c): Remove.
1893 (reg-bfin.c): Remove.
1894 (reg-cris.c): Remove.
1895 (reg-crisv32.c): Remove.
1896 (i386.c): Remove.
1897 (i386-linux.c): Remove.
1898 (i386-avx.c): Remove.
1899 (i386-avx-linux.c): Remove.
1900 (i386-avx-avx512.c): Remove.
1901 (i386-avx-avx512-linux.c): Remove.
1902 (i386-mpx.c): Remove.
1903 (i386-mpx-linux.c): Remove.
1904 (i386-avx-mpx-avx512-pku.c): Remove.
1905 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1906 (i386-avx-mpx.c): Remove.
1907 (i386-avx-mpx-linux.c): Remove.
1908 (i386-mmx.c): Remove.
1909 (i386-mmx-linux.c): Remove.
1910 (reg-ia64.c): Remove.
1911 (reg-m32r.c): Remove.
1912 (reg-m68k.c): Remove.
1913 (reg-cf.c): Remove.
1914 (mips-linux.c): Remove.
1915 (mips-dsp-linux.c): Remove.
1916 (mips64-linux.c): Remove.
1917 (mips64-dsp-linux.c): Remove.
1918 (nios2-linux.c): Remove.
1919 (powerpc-32.c): Remove.
1920 (powerpc-32l.c): Remove.
1921 (powerpc-altivec32l.c): Remove.
1922 (powerpc-cell32l.c): Remove.
1923 (powerpc-vsx32l.c): Remove.
1924 (powerpc-isa205-32l.c): Remove.
1925 (powerpc-isa205-altivec32l.c): Remove.
1926 (powerpc-isa205-vsx32l.c): Remove.
1927 (powerpc-e500l.c): Remove.
1928 (powerpc-64l.c): Remove.
1929 (powerpc-altivec64l.c): Remove.
1930 (powerpc-cell64l.c): Remove.
1931 (powerpc-vsx64l.c): Remove.
1932 (powerpc-isa205-64l.c): Remove.
1933 (powerpc-isa205-altivec64l.c): Remove.
1934 (powerpc-isa205-vsx64l.c): Remove.
1935 (s390-linux32.c): Remove.
1936 (s390-linux32v1.c): Remove.
1937 (s390-linux32v2.c): Remove.
1938 (s390-linux64.c): Remove.
1939 (s390-linux64v1.c): Remove.
1940 (s390-linux64v2.c): Remove.
1941 (s390-te-linux64.c): Remove.
1942 (s390-vx-linux64.c): Remove.
1943 (s390-tevx-linux64.c): Remove.
1944 (s390x-linux64.c): Remove.
1945 (s390x-linux64v1.c): Remove.
1946 (s390x-linux64v2.c): Remove.
1947 (s390x-te-linux64.c): Remove.
1948 (s390x-vx-linux64.c): Remove.
1949 (s390x-tevx-linux64.c): Remove.
1950 (tic6x-c64xp-linux.c): Remove.
1951 (tic6x-c64x-linux.c): Remove.
1952 (tic6x-c62x-linux.c): Remove.
1953 (reg-sh.c): Remove.
1954 (reg-sparc64.c): Remove.
1955 (reg-spu.c): Remove.
1956 (amd64.c): Remove.
1957 (amd64-linux.c): Remove.
1958 (amd64-avx.c): Remove.
1959 (amd64-avx-linux.c): Remove.
1960 (amd64-avx-avx512.c): Remove.
1961 (amd64-avx-avx512-linux.c): Remove.
1962 (amd64-mpx.c): Remove.
1963 (amd64-mpx-linux.c): Remove.
1964 (amd64-avx-mpx-avx512-pku.c): Remove.
1965 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1966 (amd64-avx-mpx.c): Remove.
1967 (amd64-avx-mpx-linux.c): Remove.
1968 (x32.c): Remove.
1969 (x32-linux.c): Remove.
1970 (x32-avx.c): Remove.
1971 (x32-avx-linux.c): Remove.
1972 (x32-avx-avx512.c): Remove.
1973 (x32-avx-avx512-linux.c): Remove.
1974 (reg-xtensa.c): Remove.
1975 (reg-tilegx.c): Remove.
1976 (reg-tilegx32.c): Remove.
1977
1978 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1979
1980 * Makefile.in (SFILES): Add "common/environ.c".
1981 (OBJS): Add "common/environ.h".
1982
1983 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1984
1985 * configure.ac: Check if the fs_base and gs_base members of
1986 `struct user_regs_struct' exist.
1987 * config.in: Regenerated.
1988 * configure: Likewise.
1989
1990 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1991
1992 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1993 target_read_memory.
1994 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1995 (get_next_pcs_syscall_next_pc): Likewise.
1996
1997 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1998
1999 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2000 * nto-x86-low.c: Likewise.
2001
2002 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2003
2004 * Makefile.in: Include disable-implicit-rules.mk.
2005
2006 2016-11-23 Pedro Alves <palves@redhat.com>
2007
2008 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2009 (debug_vprintf): Use std::chrono::steady_clock instead of
2010 gettimeofday. Use '.' instead of ':'.
2011 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2012 (get_timestamp): Use std::chrono::steady_clock instead of
2013 gettimeofday.
2014
2015 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2016
2017 * Makefile.in: Fix whitespace formatting.
2018
2019 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2020
2021 * Makefile.in (SFILES, OBS): Flatten list and order
2022 alphabetically.
2023
2024 2016-11-23 Pedro Alves <palves@redhat.com>
2025
2026 * event-loop.c (handle_file_event): Use warning.
2027 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2028 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2029 Use warning.
2030
2031 2016-11-23 Pedro Alves <palves@redhat.com>
2032
2033 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2034 output.
2035 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2036 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2037 debug_printf and debug_flush for debug output.
2038 * server.c (handle_general_set): Likewise.
2039 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2040 output.
2041
2042 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2043
2044 * Makefile.in (.c.o): Replace rule with ...
2045 (%.o: %.c): ... this one.
2046
2047 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2048
2049 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2050 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2051 make.
2052 * configure.ac: Remove checks for the make program.
2053 * configure: Re-generate.
2054
2055 2016-10-28 Pedro Alves <palves@redhat.com>
2056
2057 * Makefile.in (CXX_DIALECT): Get from configure.
2058 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2059 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2060 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2061 * config.in: Regenerate.
2062 * configure: Regenerate.
2063
2064 2016-10-27 Yao Qi <yao.qi@linaro.org>
2065
2066 * linux-low.c (linux_supports_range_stepping): Return true if
2067 can_software_single_step return true.
2068
2069 2016-10-27 Yao Qi <yao.qi@linaro.org>
2070
2071 * inferiors.c (find_inferior_in_random): New function.
2072 * inferiors.h (find_inferior_in_random): Declare.
2073 * linux-low.c (linux_wait_for_event_filtered): Call
2074 find_inferior_in_random instead of find_inferior.
2075
2076 2016-10-27 Yao Qi <yao.qi@linaro.org>
2077
2078 * linux-low.c (linux_wait_1): If single-step breakpoints are
2079 inserted, remove them.
2080
2081 2016-10-26 Pedro Alves <palves@redhat.com>
2082
2083 * linux-low.c (handle_extended_wait): Link parent/child fork
2084 threads.
2085 (linux_wait_1): Unlink them.
2086 (linux_set_resume_request): Ignore resume requests for
2087 already-resumed and unhandled fork child threads.
2088 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2089 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2090 New functions.
2091 (handle_v_requests) <vCont>: Don't call require_running.
2092 * server.h (in_queued_stop_replies): New declaration.
2093
2094 2016-10-24 Yao Qi <yao.qi@linaro.org>
2095
2096 PR server/20733
2097 * linux-aarch64-low.c (append_insns): Cast the return value to
2098 'uint32_t *'.
2099
2100 2016-10-10 Yao Qi <yao.qi@linaro.org>
2101
2102 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2103
2104 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2105
2106 * target.c (target_supports_multi_process): New function, moved
2107 from...
2108 * target.h (target_supports_multi_process): ... here. Remove
2109 macro.
2110
2111 2016-10-05 Tom Tromey <tom@tromey.com>
2112
2113 PR remote/20655:
2114 * tracepoint.c (handle_tracepoint_bkpts): Check
2115 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2116
2117 2016-10-05 Yao Qi <yao.qi@linaro.org>
2118
2119 * configure.srv: Update the path of arm-*.xml files.
2120
2121 2016-10-05 Terry Guo <terry.guo@arm.com>
2122 Yao Qi <yao.qi@linaro.org>
2123
2124 * Makefile.in: Adjust the path of rules.
2125 * configure.srv: Update the path of xml files.
2126 * regformats/arm-with-iwmmxt.dat: Regenerated.
2127 * regformats/arm-with-neon.dat: Likewise.
2128 * regformats/arm-with-vfpv2.dat: Likewise.
2129 * regformats/arm-with-vfpv3.dat Likewise.
2130
2131 2016-09-30 Yao Qi <yao.qi@linaro.org>
2132
2133 PR gdbserver/20627
2134 * target.c (target_stop_and_wait): Don't call
2135 target_continue_no_signal, use resume_stop instead.
2136
2137 2016-09-26 Yao Qi <yao.qi@linaro.org>
2138
2139 * linux-low.c (linux_wait_1): Call debug_exit.
2140
2141 2016-09-23 Pedro Alves <palves@redhat.com>
2142
2143 * Makefile.in (SFILES): Add common/new-op.c.
2144 (OBS): Add common/new-op.o.
2145 (new-op.o): New rule.
2146
2147 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2148
2149 * .gitinore: Ignore more files.
2150
2151 2016-09-21 Yao Qi <yao.qi@linaro.org>
2152
2153 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2154 23.
2155
2156 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2157
2158 * server.c (start_inferior): Call target_mourn_inferior instead of
2159 mourn_inferior; pass ptid_t argument to it.
2160 (resume): Likewise.
2161 (handle_target_event): Likewise.
2162 * target.c (target_mourn_inferior): New function.
2163 * target.h (mourn_inferior): Delete macro.
2164
2165 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2166
2167 * linux-low.c (lwp_is_stepping): New function.
2168
2169 2016-09-06 Carl Love <cel@us.ibm.com>
2170
2171 * server.c (start_inferior): Fixed comment, requested comment change
2172 didn't get updated correctly. Removed reference to ptrace () call as
2173 it is only true on Linux systems.
2174
2175 2016-09-06 Carl Love <cel@us.ibm.com>
2176
2177 * server.c (start_inferior): Do not call
2178 function target_post_create_inferior () if the
2179 inferior process has already exited.
2180
2181 2016-09-05 Pedro Alves <palves@redhat.com>
2182
2183 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2184 (COMPILE.pre, CC_LD): Use CXX directly.
2185 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2186 * acinclude.m4: Don't include build-with-cxx.m4.
2187 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2188 * configure: Regenerate.
2189
2190 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2191
2192 PR gdb/19495
2193 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2194 call writing data to own_buf.
2195
2196 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2197
2198 * target.c (mywait): Call target_wait instead of
2199 the_target->wait.
2200 (target_wait): New function.
2201
2202 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2203
2204 * server.c (start_inferior): New variable 'ptid'. Replace calls
2205 to the_target->resume by target_continue{,_no_signal}, depending
2206 on the case.
2207 * target.c (target_stop_and_wait): Call target_continue_no_signal
2208 instead of the_target->resume.
2209 (target_continue): New function.
2210
2211 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2212
2213 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2214
2215 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2216
2217 PR server/20491
2218 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2219 ps_prochandle.
2220 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2221 * linux-arm-low.c (ps_get_thread_area): Likewise.
2222 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2223 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2224 * linux-mips-low.c (ps_get_thread_area): Likewise.
2225 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2226 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2227 * linux-x86-low.c (ps_get_thread_area): Likewise.
2228 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2229
2230 2016-08-19 Pedro Alves <palves@redhat.com>
2231
2232 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2233
2234 2016-08-19 Pedro Alves <palves@redhat.com>
2235
2236 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2237 comment. Use memcpy instead of casting through unsigned long.
2238
2239 2016-08-19 Pedro Alves <palves@redhat.com>
2240
2241 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2242 allocating around 0x80000000.
2243
2244 2016-08-19 Pedro Alves <palves@redhat.com>
2245
2246 PR gdb/20415
2247 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2248 (x32-avx512-linux-ipa.o): New rules.
2249 * configure.ac (x86_64-*-linux*): New x32 check.
2250 * configure.srv (ipa_x32_linux_regobj): New.
2251 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2252 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2253 descriptions.
2254 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2255 descriptions.
2256 * configure: Regenerate.
2257
2258 2016-08-09 Pedro Alves <palves@redhat.com>
2259
2260 PR gdb/18653
2261 * Makefile.in (OBS): Add signals-state-save-restore.o.
2262 (signals-state-save-restore.o): New rule.
2263 * config.in: Regenerate.
2264 * configure: Regenerate.
2265 * linux-low.c: Include "signals-state-save-restore.h".
2266 (linux_create_inferior): Call
2267 restore_original_signals_state.
2268 * server.c: Include "dispositions-save-restore.h".
2269 (captured_main): Call save_original_signals_state.
2270
2271 2016-08-05 Pedro Alves <palves@redhat.com>
2272
2273 * configure: Regenerate.
2274
2275 2016-08-04 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-low.c (regsets_fetch_inferior_registers): Check
2278 errno is ESRCH or not.
2279
2280 2016-08-02 Yao Qi <yao.qi@linaro.org>
2281
2282 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2283 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2284 (thread_db_load_search): Update.
2285 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2286 td_ta_set_event and td_ta_event_getmsg.
2287
2288 2016-07-26 Pedro Alves <palves@redhat.com>
2289
2290 PR server/20414
2291 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2292 of unsigned long for 64-bit registers and use uint32_t instead of
2293 unsigned int for 32-bit registers.
2294
2295 2016-07-26 Pedro Alves <palves@redhat.com>
2296
2297 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2298 to 'ptrace'.
2299
2300 2016-07-21 Tom Tromey <tom@tromey.com>
2301
2302 * configure: Rebuild.
2303
2304 2016-07-21 Yao Qi <yao.qi@linaro.org>
2305
2306 * mem-break.c (find_gdb_breakpoint): Cast bp to
2307 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2308
2309 2016-07-21 Yao Qi <yao.qi@linaro.org>
2310
2311 * server.c (handle_v_requests): Support s and S actions
2312 if target_supports_software_single_step return true.
2313
2314 2016-07-21 Yao Qi <yao.qi@linaro.org>
2315
2316 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2317 is resume_step, call maybe_hw_step.
2318 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2319 and unstop them.
2320 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2321 breakpoints or not.
2322 (proceed_one_lwp): If resume request is resume_step, install
2323 reinsert breakpoints and call maybe_hw_step.
2324
2325 2016-07-21 Yao Qi <yao.qi@linaro.org>
2326
2327 * linux-low.c (proceed_one_lwp): Declare.
2328 (linux_resume_one_thread): Remove local variable 'step'.
2329 Lift code enqueue signal. Call proceed_one_lwp instead of
2330 linux_resume_one_lwp.
2331
2332 2016-07-21 Yao Qi <yao.qi@linaro.org>
2333
2334 * linux-low.c (linux_resume_one_thread): Call
2335 enqueue_pending_signal.
2336
2337 2016-07-21 Yao Qi <yao.qi@linaro.org>
2338
2339 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2340 * inferiors.c (do_restore_current_thread_cleanup): New function.
2341 (make_cleanup_restore_current_thread): Likewise.
2342 * linux-low.c (install_software_single_step_breakpoints): Call
2343 make_cleanup_restore_current_thread. Switch current_thread to
2344 thread.
2345
2346 2016-07-21 Yao Qi <yao.qi@linaro.org>
2347
2348 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2349 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2350 (clone_one_breakpoint): Likewise.
2351 (delete_reinsert_breakpoints): Change parameter to thread.
2352 Callers updated.
2353 (has_reinsert_breakpoints): Likewise.
2354 (uninsert_reinsert_breakpoints): Likewise.
2355 (reinsert_reinsert_breakpoints): Likewise.
2356 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2357 (delete_reinsert_breakpoints): Likewise.
2358 (reinsert_reinsert_breakpoints): Likewise.
2359 (uninsert_reinsert_breakpoints): Likewise.
2360 (has_reinsert_breakpoints): Likewise.
2361
2362 2016-07-21 Yao Qi <yao.qi@linaro.org>
2363
2364 * inferiors.c (get_thread_process): Make parameter const.
2365 * inferiors.h (get_thread_process): Update declaration.
2366 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2367 Add new parameters child_thread and parent_thread. Callers
2368 updated.
2369 * mem-break.h (clone_all_breakpoints): Update declaration.
2370
2371 2016-07-21 Yao Qi <yao.qi@linaro.org>
2372
2373 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2374 <command_list, handler>: Remove.
2375 (struct gdb_breakpoint): New.
2376 (struct other_breakpoint): New.
2377 (struct reinsert_breakpoint): New.
2378 (is_gdb_breakpoint): New function.
2379 (any_persistent_commands): Update command_list if
2380 is_gdb_breakpoint returns true.
2381 (set_breakpoint): Create breakpoints according to their types.
2382 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2383 (set_gdb_breakpoint_1): Likewise.
2384 (set_gdb_breakpoint): Likewise.
2385 (clear_breakpoint_conditions): Change parameter type to
2386 'struct gdb_breakpoint *'.
2387 (clear_breakpoint_commands): Likewise.
2388 (clear_breakpoint_conditions_and_commands): Likewise.
2389 (add_condition_to_breakpoint): Likewise.
2390 (add_breakpoint_condition): Likewise.
2391 (add_commands_to_breakpoint): Likewise.
2392 (check_breakpoints): Check other_breakpoint.
2393 (clone_one_breakpoint): Clone breakpopint according to its type.
2394 * mem-break.h (struct gdb_breakpoint): Declare.
2395 (set_gdb_breakpoint): Update declaration.
2396 (clear_breakpoint_conditions_and_commands): Likewise.
2397 (add_breakpoint_condition): Likewise.
2398 (add_breakpoint_commands): Likewise.
2399 * server.c (process_point_options): Change parameter type to
2400 'struct gdb_breakpoint *'.
2401
2402 2016-07-21 Yao Qi <yao.qi@linaro.org>
2403
2404 * mem-break.c (set_breakpoint_at): Rename it to ...
2405 (set_breakpoint_type_at): ... it.
2406 (set_breakpoint_at): Call set_breakpoint_type_at.
2407 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2408 * mem-break.h (set_breakpoint_at): Update comments.
2409
2410 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2411
2412 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2413 to buf parameter.
2414 (nios2_store_gregset): Likewise.
2415
2416 2016-07-01 Pedro Alves <palves@redhat.com>
2417 Antoine Tremblay <antoine.tremblay@ericsson.com>
2418
2419 * linux-low.c: Change interface to take the target lwp_info
2420 pointer directly and return void. Handle detaching from a zombie
2421 thread.
2422 (linux_detach_lwp_callback): New function.
2423 (linux_detach): Detach from the leader thread after detaching from
2424 the clone threads.
2425
2426 2016-06-28 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2429 for variable new_offset.
2430 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2431 (aarch64_ftrace_insn_reloc_cb): Likewise.
2432 (aarch64_ftrace_insn_reloc_tb): Likewise.
2433 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2434 PRIx64 instead of PRIx32.
2435
2436 2016-06-28 Yao Qi <yao.qi@linaro.org>
2437
2438 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2439 (the_low_target): Install arm_get_syscall_trapinfo.
2440
2441 2016-06-28 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2444 function.
2445 (the_low_target): Install aarch64_get_syscall_trapinfo.
2446
2447 2016-06-28 Yao Qi <yao.qi@linaro.org>
2448
2449 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2450 Callers updated.
2451 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2452 Remove parameter sysno.
2453 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2454 sysret.
2455
2456 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2457
2458 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2459 (s390_emit_ne_goto): Likewise.
2460 (s390_emit_lt_goto): Likewise.
2461 (s390_emit_le_goto): Likewise.
2462 (s390_emit_gt_goto): Likewise.
2463 (s390_emit_ge_goto): Likewise.
2464 (s390x_emit_eq_goto): Likewise.
2465 (s390x_emit_ne_goto): Likewise.
2466 (s390x_emit_lt_goto): Likewise.
2467 (s390x_emit_le_goto): Likewise.
2468 (s390x_emit_gt_goto): Likewise.
2469 (s390x_emit_ge_goto): Likewise.
2470 (s390_emit_ops_impl): Mark variable static.
2471 (s390x_emit_ops): Likewise.
2472
2473 2016-06-17 Yao Qi <yao.qi@linaro.org>
2474
2475 * linux-low.c (handle_extended_wait): Call
2476 uninsert_reinsert_breakpoints for the parent process. Remove
2477 reinsert breakpoints from the child process. Reinsert them to
2478 the parent process when vfork is done.
2479 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2480 (reinsert_reinsert_breakpoints): New function.
2481 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2482 (reinsert_reinsert_breakpoints): Declare.
2483
2484 2016-06-17 Yao Qi <yao.qi@linaro.org>
2485
2486 * linux-low.c (handle_extended_wait): If the parent is doing
2487 step-over, remove the reinsert breakpoints from the forked child.
2488
2489 2016-06-17 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-low.c (unsuspend_all_lwps): Declare.
2492 (linux_low_filter_event): If thread exited, call finish_step_over.
2493 If step-over is finished, unsuspend other threads.
2494
2495 2016-06-17 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-low.c (linux_resume_one_lwp_throw): Assert
2498 has_reinsert_breakpoints returns false.
2499 * mem-break.c (delete_disabled_breakpoints): Assert
2500 bp type isn't reinsert_breakpoint.
2501
2502 2016-06-17 Yao Qi <yao.qi@linaro.org>
2503
2504 * linux-low.c (maybe_hw_step): New function.
2505 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2506 (finish_step_over): Switch current_thread to lwp temporarily,
2507 and assert has_reinsert_breakpoints returns true.
2508 (proceed_one_lwp): Call maybe_hw_step.
2509 * mem-break.c (has_reinsert_breakpoints): New function.
2510 * mem-break.h (has_reinsert_breakpoints): Declare.
2511
2512 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2513
2514 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2515
2516 2016-05-17 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2519 instead of find_inferior.
2520
2521 2016-05-05 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2524 Initialize res to zero.
2525
2526 2016-05-05 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2529 to uint32_t.
2530
2531 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2532
2533 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2534 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2535 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2536
2537 2016-04-28 Par Olsson <par.olsson@windriver.com>
2538 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * tracepoint.c (write_inferior_int8): New function.
2541 (cmd_qtenable_disable): Write enable flag using
2542 write_inferior_int8.
2543
2544 2016-04-25 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2547 (need_step_over_p): Return zero if the LWP has pending signals
2548 can be delivered on software single step target.
2549
2550 2016-04-25 Yao Qi <yao.qi@linaro.org>
2551
2552 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2553 return instead of error.
2554
2555 2016-04-22 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2558 to 23.
2559
2560 2016-04-22 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2563 signal when stepping over breakpoint with software single
2564 step.
2565
2566 2016-04-21 Pedro Alves <palves@redhat.com>
2567
2568 * linux-s390-low.c (s390_collect_ptrace_register)
2569 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2570 add casts.
2571 (s390_check_regset): Use void * instead of gdb_byte *.
2572
2573 2016-04-20 Pedro Alves <palves@redhat.com>
2574
2575 * configure: Renegerate.
2576
2577 2016-04-20 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2580 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2581 number 16.
2582 (arm_store_gregset): Likewise.
2583
2584 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2585
2586 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2587 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2588 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2589 (amd64-avx-mpx-linux.c): New rules.
2590 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2591 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2592 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2593 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2594 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2595 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2596 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2597 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2598 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2599 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2600 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2601 * linux-x86-low.c (x86_linux_read_description): Add case for
2602 X86_XSTATE_AVX_MPX_MASK.
2603 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2604 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2605 init_registers_i386_avx_mpx_linux.
2606 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2607 (initialize_low_tracepoint): Call
2608 init_registers_i386_avx_mpx_linux.
2609 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2610 (initialize_low_tracepoint): Call
2611 init_registers_amd64_avx_mpx_linux.
2612 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2613 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2614 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2615 declarations.
2616
2617 2016-04-18 Pedro Alves <palves@redhat.com>
2618
2619 * configure: Regenerate.
2620
2621 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2622
2623 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2624 (aarch64_emit_sub): Likewise.
2625
2626 2016-04-12 Pedro Alves <palves@redhat.com>
2627
2628 * utils.c (prepare_to_throw_exception): Delete.
2629
2630 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2633
2634 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2635
2636 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2637
2638 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2639
2640 * linux-aarch64-ipa.c: Add <elf.h> include.
2641 * linux-ppc-ipa.c: Add <elf.h> include.
2642 * linux-s390-ipa.c: Add <elf.h> include.
2643
2644 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2645
2646 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2647 (get_raw_reg_ptr): Likewise.
2648 (get_trace_state_variable_value_ptr): Likewise.
2649 (set_trace_state_variable_value_ptr): Likewise.
2650 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2651 char *.
2652
2653 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2654 Marcin Kościelnicki <koriakin@0x04.net>
2655
2656 PR/17221
2657 * linux-ppc-low.c (emit_insns): New function.
2658 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2659 (ppc_emit_prologue): New function.
2660 (ppc_emit_epilogue): New function.
2661 (ppc_emit_add): New function.
2662 (ppc_emit_sub): New function.
2663 (ppc_emit_mul): New function.
2664 (ppc_emit_lsh): New function.
2665 (ppc_emit_rsh_signed): New function.
2666 (ppc_emit_rsh_unsigned): New function.
2667 (ppc_emit_ext): New function.
2668 (ppc_emit_zero_ext): New function.
2669 (ppc_emit_log_not): New function.
2670 (ppc_emit_bit_and): New function.
2671 (ppc_emit_bit_or): New function.
2672 (ppc_emit_bit_xor): New function.
2673 (ppc_emit_bit_not): New function.
2674 (ppc_emit_equal): New function.
2675 (ppc_emit_less_signed): New function.
2676 (ppc_emit_less_unsigned): New function.
2677 (ppc_emit_ref): New function.
2678 (ppc_emit_const): New function.
2679 (ppc_emit_reg): New function.
2680 (ppc_emit_pop): New function.
2681 (ppc_emit_stack_flush): New function.
2682 (ppc_emit_swap): New function.
2683 (ppc_emit_stack_adjust): New function.
2684 (ppc_emit_call): New function.
2685 (ppc_emit_int_call_1): New function.
2686 (ppc_emit_void_call_2): New function.
2687 (ppc_emit_if_goto): New function.
2688 (ppc_emit_goto): New function.
2689 (ppc_emit_eq_goto): New function.
2690 (ppc_emit_ne_goto): New function.
2691 (ppc_emit_lt_goto): New function.
2692 (ppc_emit_le_goto): New function.
2693 (ppc_emit_gt_goto): New function.
2694 (ppc_emit_ge_goto): New function.
2695 (ppc_write_goto_address): New function.
2696 (ppc_emit_ops_impl): New static variable.
2697 (ppc64v1_emit_prologue): New function.
2698 (ppc64v2_emit_prologue): New function.
2699 (ppc64_emit_epilogue): New function.
2700 (ppc64_emit_add): New function.
2701 (ppc64_emit_sub): New function.
2702 (ppc64_emit_mul): New function.
2703 (ppc64_emit_lsh): New function.
2704 (ppc64_emit_rsh_signed): New function.
2705 (ppc64_emit_rsh_unsigned): New function.
2706 (ppc64_emit_ext): New function.
2707 (ppc64_emit_zero_ext): New function.
2708 (ppc64_emit_log_not): New function.
2709 (ppc64_emit_bit_and): New function.
2710 (ppc64_emit_bit_or): New function.
2711 (ppc64_emit_bit_xor): New function.
2712 (ppc64_emit_bit_not): New function.
2713 (ppc64_emit_equal): New function.
2714 (ppc64_emit_less_signed): New function.
2715 (ppc64_emit_less_unsigned): New function.
2716 (ppc64_emit_ref): New function.
2717 (ppc64_emit_const): New function.
2718 (ppc64v1_emit_reg): New function.
2719 (ppc64v2_emit_reg): New function.
2720 (ppc64_emit_pop): New function.
2721 (ppc64_emit_stack_flush): New function.
2722 (ppc64_emit_swap): New function.
2723 (ppc64v1_emit_call): New function.
2724 (ppc64v2_emit_call): New function.
2725 (ppc64v1_emit_int_call_1): New function.
2726 (ppc64v2_emit_int_call_1): New function.
2727 (ppc64v1_emit_void_call_2): New function.
2728 (ppc64v2_emit_void_call_2): New function.
2729 (ppc64_emit_if_goto): New function.
2730 (ppc64_emit_eq_goto): New function.
2731 (ppc64_emit_ne_goto): New function.
2732 (ppc64_emit_lt_goto): New function.
2733 (ppc64_emit_le_goto): New function.
2734 (ppc64_emit_gt_goto): New function.
2735 (ppc64_emit_ge_goto): New function.
2736 (ppc64v1_emit_ops_impl): New static variable.
2737 (ppc64v2_emit_ops_impl): New static variable.
2738 (ppc_emit_ops): New function.
2739 (linux_low_target): Wire in ppc_emit_ops.
2740
2741 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2742 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 PR/17221
2745 * Makefile.in: Add powerpc-*-ipa.o
2746 * configure.srv: Add ipa_obj for powerpc*-linux.
2747 * linux-ppc-ipa.c: New file.
2748 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2749 includes.
2750 (PPC_FIELD): New macro.
2751 (PPC_SEXT): New macro.
2752 (PPC_OP6): New macro.
2753 (PPC_BO): New macro.
2754 (PPC_LI): New macro.
2755 (PPC_BD): New macro.
2756 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2757 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2758 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2759 (ppc_get_thread_area): New function.
2760 (is_elfv2_inferior): New function.
2761 (gen_ds_form): New function.
2762 (GEN_STD): New macro.
2763 (GEN_STDU): New macro.
2764 (GEN_LD): New macro.
2765 (GEN_LDU): New macro.
2766 (gen_d_form): New function.
2767 (GEN_ADDI): New macro.
2768 (GEN_ADDIS): New macro.
2769 (GEN_LI): New macro.
2770 (GEN_LIS): New macro.
2771 (GEN_ORI): New macro.
2772 (GEN_ORIS): New macro.
2773 (GEN_LWZ): New macro.
2774 (GEN_STW): New macro.
2775 (GEN_STWU): New macro.
2776 (gen_xfx_form): New function.
2777 (GEN_MFSPR): New macro.
2778 (GEN_MTSPR): New macro.
2779 (GEN_MFCR): New macro.
2780 (GEN_MTCR): New macro.
2781 (GEN_SYNC): New macro.
2782 (GEN_LWSYNC): New macro.
2783 (gen_x_form): New function.
2784 (GEN_OR): New macro.
2785 (GEN_MR): New macro.
2786 (GEN_LWARX): New macro.
2787 (GEN_STWCX): New macro.
2788 (GEN_CMPW): New macro.
2789 (gen_md_form): New function.
2790 (GEN_RLDICL): New macro.
2791 (GEN_RLDICR): New macro.
2792 (gen_i_form): New function.
2793 (GEN_B): New macro.
2794 (GEN_BL): New macro.
2795 (gen_b_form): New function.
2796 (GEN_BNE): New macro.
2797 (GEN_LOAD): New macro.
2798 (GEN_STORE): New macro.
2799 (gen_limm): New function.
2800 (gen_atomic_xchg): New function.
2801 (gen_call): New function.
2802 (ppc_relocate_instruction): New function.
2803 (ppc_install_fast_tracepoint_jump_pad): New function.
2804 (ppc_get_min_fast_tracepoint_insn_len): New function.
2805 (ppc_get_ipa_tdesc_idx): New function.
2806 (the_low_target): Wire in the new functions.
2807 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2808 tdescs.
2809 * linux-ppc-tdesc.h: New file.
2810
2811 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2812
2813 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2814 (alloc_jump_pad_buffer): New function.
2815 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2816 (alloc_jump_pad_buffer): New function.
2817 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2818 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2819 (alloc_jump_pad_buffer): New function.
2820 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2821 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2822 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2823 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2824
2825 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2826
2827 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2828 * linux-amd64-ipa.c: Likewise.
2829 * linux-i386-ipa.c: Likewise.
2830 * linux-s390-ipa.c: Likewise.
2831 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2832 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2833 set_trace_state_variable_value_ptr.
2834 (struct ipa_sym_addresses): Likewise.
2835 (symbol_list): Likewise.
2836 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2837 accessing gdb_collect directly.
2838 (gdb_collect_ptr_type): New typedef.
2839 (get_raw_reg_ptr_type): New typedef.
2840 (get_trace_state_variable_value_ptr_type): New typedef.
2841 (set_trace_state_variable_value_ptr_type): New typedef.
2842 (gdb_collect_ptr): New global.
2843 (get_raw_reg_ptr): New global.
2844 (get_trace_state_variable_value_ptr): New global.
2845 (set_trace_state_variable_value_ptr): New global.
2846 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2847 accessing get_raw_reg directly.
2848 (get_get_tsv_func_addr): Likewise for
2849 get_trace_state_variable_value_ptr.
2850 (get_set_tsv_func_addr): Likewise for
2851 set_trace_state_variable_value_ptr.
2852 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2853
2854 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2855
2856 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2857
2858 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2859
2860 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2861 packets.
2862 (relocate_instruction): Remove own_buf.
2863 * server.c (own_buf): Make global.
2864 (handle_v_requests): Make global.
2865 * server.h (own_buf): New declaration.
2866 (handle_v_requests): New prototype.
2867
2868 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2869
2870 PR 18377
2871 * linux-s390-low.c (add_insns): New function.
2872 (s390_emit_prologue): New function.
2873 (s390_emit_epilogue): New function.
2874 (s390_emit_add): New function.
2875 (s390_emit_sub): New function.
2876 (s390_emit_mul): New function.
2877 (s390_emit_lsh): New function.
2878 (s390_emit_rsh_signed): New function.
2879 (s390_emit_rsh_unsigned): New function.
2880 (s390_emit_ext): New function.
2881 (s390_emit_log_not): New function.
2882 (s390_emit_bit_and): New function.
2883 (s390_emit_bit_or): New function.
2884 (s390_emit_bit_xor): New function.
2885 (s390_emit_bit_not): New function.
2886 (s390_emit_equal): New function.
2887 (s390_emit_less_signed): New function.
2888 (s390_emit_less_unsigned): New function.
2889 (s390_emit_ref): New function.
2890 (s390_emit_if_goto): New function.
2891 (s390_emit_goto): New function.
2892 (s390_write_goto_address): New function.
2893 (s390_emit_litpool): New function.
2894 (s390_emit_const): New function.
2895 (s390_emit_call): New function.
2896 (s390_emit_reg): New function.
2897 (s390_emit_pop): New function.
2898 (s390_emit_stack_flush): New function.
2899 (s390_emit_zero_ext): New function.
2900 (s390_emit_swap): New function.
2901 (s390_emit_stack_adjust): New function.
2902 (s390_emit_set_r2): New function.
2903 (s390_emit_int_call_1): New function.
2904 (s390_emit_void_call_2): New function.
2905 (s390_emit_eq_goto): New function.
2906 (s390_emit_ne_goto): New function.
2907 (s390_emit_lt_goto): New function.
2908 (s390_emit_le_goto): New function.
2909 (s390_emit_gt_goto): New function.
2910 (s390_emit_ge_goto): New function.
2911 (s390x_emit_prologue): New function.
2912 (s390x_emit_epilogue): New function.
2913 (s390x_emit_add): New function.
2914 (s390x_emit_sub): New function.
2915 (s390x_emit_mul): New function.
2916 (s390x_emit_lsh): New function.
2917 (s390x_emit_rsh_signed): New function.
2918 (s390x_emit_rsh_unsigned): New function.
2919 (s390x_emit_ext): New function.
2920 (s390x_emit_log_not): New function.
2921 (s390x_emit_bit_and): New function.
2922 (s390x_emit_bit_or): New function.
2923 (s390x_emit_bit_xor): New function.
2924 (s390x_emit_bit_not): New function.
2925 (s390x_emit_equal): New function.
2926 (s390x_emit_less_signed): New function.
2927 (s390x_emit_less_unsigned): New function.
2928 (s390x_emit_ref): New function.
2929 (s390x_emit_if_goto): New function.
2930 (s390x_emit_const): New function.
2931 (s390x_emit_call): New function.
2932 (s390x_emit_reg): New function.
2933 (s390x_emit_pop): New function.
2934 (s390x_emit_stack_flush): New function.
2935 (s390x_emit_zero_ext): New function.
2936 (s390x_emit_swap): New function.
2937 (s390x_emit_stack_adjust): New function.
2938 (s390x_emit_int_call_1): New function.
2939 (s390x_emit_void_call_2): New function.
2940 (s390x_emit_eq_goto): New function.
2941 (s390x_emit_ne_goto): New function.
2942 (s390x_emit_lt_goto): New function.
2943 (s390x_emit_le_goto): New function.
2944 (s390x_emit_gt_goto): New function.
2945 (s390x_emit_ge_goto): New function.
2946 (s390_emit_ops): New function.
2947 (struct linux_target_ops): Fill in emit_ops hook.
2948
2949 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2950
2951 PR 18377
2952 * Makefile.in: Add s390 IPA files.
2953 * configure.srv: Build IPA for s390.
2954 * linux-s390-ipa.c: New file.
2955 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2956 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2957 (tdesc_s390_linux32): Likewise.
2958 (init_registers_s390_linux32v1): Likewise.
2959 (tdesc_s390_linux32v1): Likewise.
2960 (init_registers_s390_linux32v2): Likewise.
2961 (tdesc_s390_linux32v2): Likewise.
2962 (init_registers_s390_linux64): Likewise.
2963 (tdesc_s390_linux64): Likewise.
2964 (init_registers_s390_linux64v1): Likewise.
2965 (tdesc_s390_linux64v1): Likewise.
2966 (init_registers_s390_linux64v2): Likewise.
2967 (tdesc_s390_linux64v2): Likewise.
2968 (init_registers_s390_te_linux64): Likewise.
2969 (tdesc_s390_te_linux64): Likewise.
2970 (init_registers_s390_vx_linux64): Likewise.
2971 (tdesc_s390_vx_linux64): Likewise.
2972 (init_registers_s390_tevx_linux64): Likewise.
2973 (tdesc_s390_tevx_linux64): Likewise.
2974 (init_registers_s390x_linux64): Likewise.
2975 (tdesc_s390x_linux64): Likewise.
2976 (init_registers_s390x_linux64v1): Likewise.
2977 (tdesc_s390x_linux64v1): Likewise.
2978 (init_registers_s390x_linux64v2): Likewise.
2979 (tdesc_s390x_linux64v2): Likewise.
2980 (init_registers_s390x_te_linux64): Likewise.
2981 (tdesc_s390x_te_linux64): Likewise.
2982 (init_registers_s390x_vx_linux64): Likewise.
2983 (tdesc_s390x_vx_linux64): Likewise.
2984 (init_registers_s390x_tevx_linux64): Likewise.
2985 (tdesc_s390x_tevx_linux64): Likewise.
2986 (have_hwcap_s390_vx): New static variable.
2987 (s390_arch_setup): Fill have_hwcap_s390_vx.
2988 (s390_get_thread_area): New function.
2989 (s390_ft_entry_gpr_esa): New const.
2990 (s390_ft_entry_gpr_zarch): New const.
2991 (s390_ft_entry_misc): New const.
2992 (s390_ft_entry_fr): New const.
2993 (s390_ft_entry_vr): New const.
2994 (s390_ft_main_31): New const.
2995 (s390_ft_main_64): New const.
2996 (s390_ft_exit_fr): New const.
2997 (s390_ft_exit_vr): New const.
2998 (s390_ft_exit_misc): New const.
2999 (s390_ft_exit_gpr_esa): New const.
3000 (s390_ft_exit_gpr_zarch): New const.
3001 (append_insns): New function.
3002 (s390_relocate_instruction): New function.
3003 (s390_install_fast_tracepoint_jump_pad): New function.
3004 (s390_get_min_fast_tracepoint_insn_len): New function.
3005 (s390_get_ipa_tdesc_idx): New function.
3006 (struct linux_target_ops): Wire in the above functions.
3007 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3008 * linux-s390-tdesc.h: New file.
3009
3010 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3011
3012 * linux-s390-low.c (s390_supports_tracepoints): New function.
3013 (struct linux_target_ops): Fill supports_tracepoints hook.
3014
3015 2016-03-18 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-low.c (lwp_signal_can_be_delivered): New function.
3018 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3019
3020 2016-03-18 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3023 0 if signal is enqueued. Remove 'signal' from one debugging
3024 message. Move one debugging message to some lines below.
3025 Remove code setting 'signal' to 0.
3026
3027 2016-03-18 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-low.c (linux_low_filter_event): Remove redundant
3030 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3031
3032 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3033
3034 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3035 (struct linux_target_ops): Wire in the above.
3036
3037 2016-03-03 Yao Qi <yao.qi@linaro.org>
3038
3039 * linux-low.c: Update comments to start_step_over.
3040
3041 2016-03-03 Yao Qi <yao.qi@linaro.org>
3042
3043 PR server/19736
3044 * linux-low.c (handle_extended_wait): Set child suspended
3045 if event_lwp->bp_reinsert isn't zero.
3046
3047 2016-03-02 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3050 enqueue_pending_signal.
3051
3052 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3053
3054 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3055 is actually loaded.
3056
3057 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3058
3059 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3060 (s390_regmap_3264) [!__s390x__]: New global.
3061 (s390_collect_ptrace_register): Skip map entries containing -1.
3062 (s390_supply_ptrace_register): Ditto.
3063 (s390_fill_gprs_high): New function.
3064 (s390_store_gprs_high): New function.
3065 (s390_regsets): Add NT_S390_HIGH_GPRS.
3066 (s390_get_hwcap): Enable on 31-bit.
3067 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3068 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3069 Detect NT_S390_HIGH_GPRS.
3070 (s390_usrregs_info_3264): Enable on 31-bit.
3071 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3072 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3073
3074 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3075
3076 PR gdb/13808
3077 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3078 * configure.srv: Ditto.
3079 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3080 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3081 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3082 (init_registers_amd64_linux): Remove prototype.
3083 (tdesc_amd64_linux): Remove declaration.
3084 (get_ipa_tdesc): New function.
3085 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3086 initialize remaining tdescs.
3087 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3088 (init_registers_i386_linux): Remove prototype.
3089 (tdesc_i386_linux): Remove declaration.
3090 (get_ipa_tdesc): New function.
3091 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3092 initialize remaining tdescs.
3093 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3094 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3095 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3096 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3097 (x86_get_ipa_tdesc_idx): New function.
3098 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3099 * linux-x86-tdesc.h: New file.
3100 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3101 (target_get_ipa_tdesc_idx): New macro.
3102 * tracepoint.c (ipa_tdesc_idx): New macro.
3103 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3104 (symbol_list): Add ipa_tdesc_idx.
3105 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3106 (ipa_tdesc): Remove.
3107 (ipa_tdesc_idx): New variable.
3108 (get_context_regcache): Use get_ipa_tdesc.
3109 (gdb_collect): Ditto.
3110 (gdb_probe): Ditto.
3111 * tracepoint.h (get_ipa_tdesc): New prototype.
3112 (ipa_tdesc): Remove.
3113
3114 2016-02-24 Pedro Alves <palves@redhat.com>
3115
3116 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3117 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3118 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3119 Factor out common code between the USE_SIGTRAP_SIGINFO and
3120 !USE_SIGTRAP_SIGINFO blocks.
3121 (linux_low_filter_event): Call save_stop_reason instead of
3122 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3123 Update comments.
3124 (linux_wait_1): Update comments.
3125
3126 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3127
3128 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3129 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3130 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3131 ppc_insert_point, ppc_remove_point.
3132
3133 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3134
3135 * linux-s390-low.c (s390_supports_z_point_type): New function.
3136 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3137
3138 2016-02-16 Yao Qi <yao.qi@linaro.org>
3139
3140 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3141 PC. Get pc from regcache_read_pc.
3142
3143 2016-02-12 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3146 or linux_get_pc_32bit.
3147 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3148
3149 2016-02-12 Yao Qi <yao.qi@linaro.org>
3150
3151 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3152 arm_linux_get_next_pcs_fixup.
3153
3154 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3155
3156 * tracepoint.c (x_tracepoint_action_download): Change
3157 write_inferior_data_ptr to write_inferior_data_pointer.
3158 (cmd_qtstart): Likewise.
3159 (write_inferior_data_ptr): Remove.
3160 (download_agent_expr): Change write_inferior_data_ptr to
3161 write_inferior_data_pointer.
3162 (download_tracepoint_1): Likewise.
3163 (download_tracepoint): Likewise.
3164 (download_trace_state_variables): Likewise.
3165
3166 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3167 Marcin Kościelnicki <koriakin@0x04.net>
3168
3169 * tracepoint.c (struct tracepoint_action_ops): Remove.
3170 (struct tracepoint_action): Remove ops.
3171 (m_tracepoint_action_download, r_tracepoint_action_download)
3172 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3173 size and offset accordingly.
3174 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3175 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3176 (tracepoint_action_send, tracepoint_action_download): New functions.
3177 Helpers for trace action handlers.
3178 (add_tracepoint_action): Remove setup actions ops.
3179 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3180
3181 2016-02-10 Yao Qi <yao.qi@linaro.org>
3182
3183 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3184
3185 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3186
3187 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3188 to AC_OUTPUT.
3189 * configure: Regenerate.
3190
3191 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3192
3193 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3194 void * to gdb_byte *.
3195 * linux-low.c (siginfo_fixup): Likewise.
3196 (linux_xfer_siginfo): Likewise.
3197 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3198 Likewise.
3199 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3200
3201 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3202
3203 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3204 to srv_tgtobj.
3205 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3206 to srv_tgtobj.
3207 * linux-x86-low.c [__x86_64__]: Include
3208 "nat/amd64-linux-siginfo.h".
3209 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3210 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3211 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3212 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3213 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3214 (cpt_si_fd, si_timerid, si_overrun): Move from
3215 nat/amd64-linux-siginfo.c.
3216 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3217
3218 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3219
3220 * server.c (skip_to_semicolon): Remove.
3221 (process_point_options): Use strchrnul instead of
3222 skip_to_semicolon.
3223
3224 2016-01-26 Yao Qi <yao.qi@linaro.org>
3225
3226 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3227 * linux-low.c (install_software_single_step_breakpoints): Don't
3228 call regcache_read_pc.
3229 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3230 argument pc.
3231
3232 2016-01-26 Yao Qi <yao.qi@linaro.org>
3233
3234 * linux-low.c (install_software_single_step_breakpoints): Call
3235 regcache_read_pc instead of get_pc.
3236
3237 2016-01-26 Yao Qi <yao.qi@linaro.org>
3238
3239 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3240 (unblock_async_io): Rename to ...
3241 (block_unblock_async_io): ... it. New function.
3242 (enable_async_io): Don't install SIGIO handler. Unblock it
3243 instead.
3244 (disable_async_io): Don't ignore SIGIO. Block it instead.
3245 (initialize_async_io): Install SIGIO handler. Don't call
3246 unblock_async_io.
3247
3248 2016-01-26 Yao Qi <yao.qi@linaro.org>
3249
3250 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3251 first character is '\003', call *the_target->request_interrupt.
3252
3253 2016-01-25 Yao Qi <yao.qi@linaro.org>
3254
3255 * remote-utils.c (new_thread_notify): Remove.
3256 (dead_thread_notify): Likewise.
3257 * remote-utils.h (new_thread_notify): Remove declaration.
3258 (dead_thread_notify): Likewise.
3259
3260 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3261
3262 * gdb.trace/pending.exp: Fix expected message on continue.
3263
3264 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3265
3266 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3267 it works properly on big-endian machines where sizeof (CORE_ADDR)
3268 != sizeof (void *).
3269
3270 2016-01-21 Pedro Alves <palves@redhat.com>
3271
3272 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3273 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3274 * configure: Regenerate.
3275
3276 2016-01-21 Yao Qi <yao.qi@linaro.org>
3277
3278 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3279 is_thumb and set it according to CPSR saved on the stack.
3280 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3281 arm_sigreturn_next_pc.
3282
3283 2016-01-18 Yao Qi <yao.qi@linaro.org>
3284
3285 * linux-low.c (linux_set_pc_64bit): New function.
3286 (linux_get_pc_64bit): New function.
3287 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3288 Declare.
3289 * linux-sparc-low.c (debug_threads): Remove declaration.
3290 (sparc_get_pc): Remove.
3291 (the_low_target): Use linux_get_pc_64bit instead of
3292 sparc_get_pc.
3293 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3294 (the_low_target): Use linux_get_pc_64bit and
3295 linux_set_pc_64bit.
3296
3297 2016-01-18 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-arm-low.c (debug_threads): Remove declaration.
3300 (arm_get_pc, arm_set_pc): Remove.
3301 (the_low_target): Use linux_get_pc_32bit and
3302 linux_set_pc_32bit.
3303 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3304 (the_low_target): Use linux_get_pc_32bit and
3305 linux_set_pc_32bit.
3306 * linux-cris-low.c (debug_threads): Remove declaration.
3307 (cris_get_pc, cris_set_pc,): Remove.
3308 (the_low_target): Use linux_get_pc_32bit and
3309 linux_set_pc_32bit.
3310 * linux-crisv32-low.c (debug_threads): Remove declaration.
3311 (cris_get_pc, cris_set_pc): Remove.
3312 (the_low_target): Use linux_get_pc_32bit and
3313 linux_set_pc_32bit.
3314 * linux-low.c: Include inttypes.h.
3315 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3316 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3317 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3318 (the_low_target): Use linux_get_pc_32bit and
3319 linux_set_pc_32bit.
3320 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3321 (the_low_target): Use linux_get_pc_32bit and
3322 linux_set_pc_32bit.
3323 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3324 (the_low_target): Use linux_get_pc_32bit and
3325 linux_set_pc_32bit.
3326 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3327 (the_low_target): Use linux_get_pc_32bit and
3328 linux_set_pc_32bit.
3329 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3330 (the_low_target): Use linux_get_pc_32bit and
3331 linux_set_pc_32bit.
3332
3333 2016-01-18 Gary Benson <gbenson@redhat.com>
3334
3335 * configure.ac (AC_FUNC_FORK): New check.
3336 * config.in: Regenerate.
3337 * configure: Likewise.
3338
3339 2016-01-14 Yao Qi <yao.qi@linaro.org>
3340
3341 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3342 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3343 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3344 arm_get_next_pcs_ctor.
3345
3346 2016-01-12 Josh Stone <jistone@redhat.com>
3347 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3348
3349 * inferiors.h: Include "gdb_vecs.h".
3350 (struct process_info): Add syscalls_to_catch.
3351 * inferiors.c (remove_process): Free syscalls_to_catch.
3352 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3353 syscall_return stops.
3354 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3355 * server.c (handle_general_set): Handle QCatchSyscalls.
3356 (handle_query): Report support for QCatchSyscalls.
3357 * target.h (struct target_ops): Add supports_catch_syscall.
3358 (target_supports_catch_syscall): New macro.
3359 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3360 (struct lwp_info): Add syscall_state.
3361 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3362 Maintain syscall_state and syscalls_to_catch across exec.
3363 (get_syscall_trapinfo): New function, proxy to the_low_target.
3364 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3365 (linux_low_filter_event): Toggle syscall_state entry/return for
3366 syscall traps, and set it ignored for all others.
3367 (gdb_catching_syscalls_p): New function.
3368 (gdb_catch_this_syscall_p): New function.
3369 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3370 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3371 (linux_supports_catch_syscall): New function.
3372 (linux_target_ops): Install it.
3373 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3374 (the_low_target): Install it.
3375
3376 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3377
3378 * acinclude.m4: Include new ../warning.m4 file.
3379 * configure: Regenerated.
3380 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3381
3382 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3383
3384 * ax.c (is_goto_target): Mark static.
3385 * linux-low.c (register_addr): Likewise.
3386 (linux_fetch_registers, linux_store_registers): Likewise.
3387 * mem-break.c (any_persistent_commands): Fix old prototype.
3388 (add_commands_to_breakpoint): Mark static.
3389 * regcache.c (find_register_by_name): Delete unused func.
3390 * remote-utils.c (hex_or_minus_one): Mark static.
3391 * server.c (monitor_show_help): Mark static.
3392 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3393 handle_v_requests): Likewise.
3394
3395 2016-01-12 Pedro Alves <palves@redhat.com>
3396
3397 Remove use of the registered trademark symbol throughout.
3398
3399 2016-01-08 Yao Qi <yao.qi@linaro.org>
3400
3401 * remote-utils.c (getpkt): If c is '\003', call target hook
3402 request_interrupt.
3403
3404 2016-01-06 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3407 linux-aarch32-low.c.
3408 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3409 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3410 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3411 (thumb2_breakpoint): Declare.
3412 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3413 linux-aarch32-low.h.
3414 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3415 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3416 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3417
3418 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3419
3420 * gdbreplay.c (gdbreplay_version): Change copyright year in
3421 version message.
3422 * server.c (gdbserver_version): Likewise.
3423
3424 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3425
3426 * server.c (crc32_table): Delete.
3427 (crc32): Use libiberty's xcrc32 function.
3428
3429 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3430
3431 * lynx-low.c (lynx_delete_thread_callback): New function.
3432 (lynx_mourn): Properly delete our process and all of its
3433 threads. Remove call to clear_inferiors.
3434
3435 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3436
3437 * target.c (thread_search_callback): Add check that
3438 the thread_stopped target callback is not NULL before
3439 calling it.
3440
3441 2015-12-21 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3444 arm breakpoint.
3445
3446 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3447
3448 * server.c (handle_query): Call target_supports_software_single_step.
3449
3450 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * linux-low.c (single_step): New function.
3453 (linux_resume_one_lwp_throw): Call single_step.
3454 (start_step_over): Likewise.
3455
3456 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3457
3458 * Makefile.in (SFILES): Append arch/arm-linux.c,
3459 arch/arm-get-next-pcs.c.
3460 (arm-linux.o): New rule.
3461 (arm-get-next-pcs.o): New rule.
3462 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3463 arm-linux.o.
3464 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3465 to linux-aarch32-low.c.
3466 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3467 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3468 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3469 (thumb2_breakpoint_len): Likewise.
3470 (arm_is_thumb_mode): Make non-static.
3471 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3472 from linux-aarch32-low.c.
3473 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3474 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3475 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3476 (thumb2_breakpoint_len): Likewise.
3477 (arm_is_thumb_mode): New declaration.
3478 * linux-arm-low.c: Include arch/arm-linux.h
3479 aarch/arm-get-next-pcs.h, sys/syscall.h.
3480 (get_next_pcs_ops): New struct.
3481 (get_next_pcs_addr_bits_remove): New function.
3482 (get_next_pcs_is_thumb): New function.
3483 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3484 (arm_sigreturn_next_pc): Likewise.
3485 (get_next_pcs_syscall_next_pc): Likewise.
3486 (arm_gdbserver_get_next_pcs): Likewise.
3487 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3488 Initialize.
3489 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3490 * server.h: Include gdb_vecs.h.
3491
3492 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3493
3494 * Makefile.in (SFILES): Append common/common-regcache.c.
3495 (OBS): Append common-regcache.o.
3496 (common-regcache.o): New rule.
3497 * regcache.c (init_register_cache): Initialize cache to
3498 REG_UNAVAILABLE.
3499 (regcache_raw_read_unsigned): New function.
3500 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3501 register_status enum.
3502
3503 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3504
3505 * linux-aarch64-low.c (the_low_targets): Rename
3506 breakpoint_reinsert_addr to get_next_pcs.
3507 * linux-arm-low.c (the_low_targets): Likewise.
3508 * linux-bfin-low.c (the_low_targets): Likewise.
3509 * linux-cris-low.c (the_low_targets): Likewise.
3510 * linux-crisv32-low.c (the_low_targets): Likewise.
3511 * linux-low.c (can_software_single_step): Likewise.
3512 (install_software_single_step_breakpoints): New function.
3513 (start_step_over): Use install_software_single_step_breakpoints.
3514 * linux-low.h: New CORE_ADDR vector.
3515 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3516 get_next_pcs.
3517 * linux-mips-low.c (the_low_targets): Likewise.
3518 * linux-nios2-low.c (the_low_targets): Likewise.
3519 * linux-sparc-low.c (the_low_targets): Likewise.
3520
3521 2015-12-17 Pedro Alves <palves@redhat.com>
3522
3523 * linux-low.c (linux_kill_one_lwp): Remove references to
3524 LinuxThreads.
3525 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3526 to 'kill'.
3527 (linux_init_signals): Delete.
3528 (initialize_low): Adjust.
3529 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3530
3531 2015-12-16 Pedro Alves <palves@redhat.com>
3532
3533 * configure.ac (compiler warning flags): When testing a
3534 -Wno-foo option, check whether -Wfoo works instead.
3535 * configure: Regenerate.
3536
3537 2015-12-11 Don Breazeal <donb@codesourcery.com>
3538
3539 * server.c (process_serial_event): Don't exit from gdbserver
3540 in remote mode if there are still active inferiors.
3541
3542 2015-12-11 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3545 arm_breakpoint_at if the process is 32-bit.
3546
3547 2015-12-11 Yao Qi <yao.qi@linaro.org>
3548
3549 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3550 arm breakpoint.
3551
3552 2015-12-07 Yao Qi <yao.qi@linaro.org>
3553
3554 * configure.srv: Append arm.o to srv_tgtobj for
3555 aarch64*-*-linux* target.
3556 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3557 from linux-arm-low.c.
3558 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3559 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3560 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3561 (thumb2_breakpoint_len): Likewise.
3562 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3563 (arm_breakpoint_kinds): Likewise.
3564 (arm_breakpoint_kind_from_pc): Likewise.
3565 (arm_sw_breakpoint_from_kind): Likewise.
3566 (arm_breakpoint_kind_from_current_state): Likewise.
3567 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3568 (arm_sw_breakpoint_from_kind): Declare.
3569 (arm_breakpoint_kind_from_current_state): Declare.
3570 (arm_breakpoint_at): Declare.
3571 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3572 arm_sw_breakpoint_from_kind if process is 32-bit.
3573 (aarch64_breakpoint_kind_from_pc): New function.
3574 (aarch64_breakpoint_kind_from_current_state): New function.
3575 (the_low_target): Initialize fields breakpoint_kind_from_pc
3576 and breakpoint_kind_from_current_state.
3577 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3578 linux-aarch32-low.c.
3579 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3580 (arm_breakpoint, arm_breakpoint_len): Likewise.
3581 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3582 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3583 (arm_is_thumb_mode): Likewise.
3584 (arm_breakpoint_at): Likewise.
3585 (arm_breakpoint_kind_from_pc): Likewise.
3586 (arm_sw_breakpoint_from_kind): Likewise.
3587 (arm_breakpoint_kind_from_current_state): Likewise.
3588
3589 Revert:
3590 2015-08-04 Yao Qi <yao.qi@linaro.org>
3591
3592 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3593 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3594 * server.c (extended_protocol): Remove "static".
3595 * server.h (extended_protocol): Declare it.
3596
3597 2015-12-04 Josh Stone <jistone@redhat.com>
3598
3599 * target.h (struct target_ops) <arch_setup>: Rename to ...
3600 (struct target_ops) <post_create_inferior>: ... this.
3601 (target_arch_setup): Rename to ...
3602 (target_post_create_inferior): ... this, calling post_create_inferior.
3603 * server.c (start_inferior): Update target_arch_setup calls to
3604 target_post_create_inferior.
3605 * linux-low.c (linux_low_ptrace_options): Forward declare.
3606 (linux_arch_setup): Update its comment for general use.
3607 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3608 (struct linux_target_ops): Use linux_post_create_inferior.
3609 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3610 to post_create_inferior.
3611 * nto-low.c (struct nto_target_ops): Likewise.
3612 * spu-low.c (struct spu_target_ops): Likewise.
3613 * win32-low.c (struct win32_target_ops): Likewise.
3614
3615 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3616
3617 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3618
3619 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3620
3621 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3622 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3623 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3624 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3625 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3626 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3627 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3628 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3629 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3630 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3631 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3632 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3633
3634 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3635
3636 * linux-low.c (linux_look_up_symbols): Don't call
3637 linux_supports_traceclone.
3638 * linux-low.h (thread_db_init): Remove use_events argument.
3639 * thread-db.c (thread_db_use_event): Remove global variable.
3640 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3641 (struct thread_db) <td_create_bp>: Remove field.
3642 (thread_db_create_event): Remove function.
3643 (thread_db_enable_reporting): Likewise.
3644 (find_one_thread): Don't check for thread_db_use_events.
3645 (attach_thread): Likewise.
3646 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3647 (try_thread_db_load_1): Don't check for thread_db_use_events.
3648 (thread_db_init): Remove use_events argument and thread events
3649 handling.
3650 (remove_thread_event_breakpoints): Remove function.
3651 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3652
3653 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3654
3655 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3656 New function.
3657 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3658 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3660 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3661 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3662 Initialize.
3663 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3664 New function.
3665 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3666 * linux-low.c (can_hardware_single_step): Use
3667 supports_hardware_single_step.
3668 (can_software_single_step): New function.
3669 (start_step_over): Call can_software_single_step.
3670 (linux_supports_hardware_single_step): New function.
3671 (struct target_ops) <supports_software_single_step>: Initialize.
3672 * linux-low.h (struct linux_target_ops)
3673 <supports_hardware_single_step>: Initialize.
3674 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3676 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3677 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3678 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3679 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3680 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3681 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3682 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3683 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3684 Initialize.
3685 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3686 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3687 Initialize.
3688 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3689 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3690 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3691 New function.
3692 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3693 * target.h (struct target_ops): <supports_software_single_step>:
3694 New field.
3695 (target_supports_software_single_step): New macro.
3696
3697 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3698
3699 * linux-low.c (linux_wait_1): Fix pc advance condition.
3700 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3701 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3702
3703 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3704
3705 * linux-arm-low.c (arm_is_thumb_mode): New function.
3706 (arm_breakpoint_at): Use arm_is_thumb_mode.
3707 (arm_breakpoint_kind_from_current_state): New function.
3708 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3709 Initialize.
3710 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3711 (linux_breakpoint_kind_from_current_state): New function.
3712 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3713 * linux-low.h (struct linux_target_ops)
3714 <breakpoint_kind_from_current_state>: New field.
3715 * target.h (struct target_ops): Likewise.
3716 (target_breakpoint_kind_from_current_state): New macro.
3717
3718 2015-11-30 Pedro Alves <palves@redhat.com>
3719
3720 * linux-low.c (linux_resume): Wake up the event loop before
3721 returning.
3722
3723 2015-11-30 Pedro Alves <palves@redhat.com>
3724
3725 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3726 check.
3727 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3728 to -1.
3729 * target.c (struct thread_search): New structure.
3730 (thread_search_callback): New function.
3731 (prev_general_thread): New global.
3732 (prepare_to_access_memory, done_accessing_memory): New functions.
3733 * target.h (prepare_to_access_memory, done_accessing_memory):
3734 Replace macros with function declarations.
3735
3736 2015-11-30 Pedro Alves <palves@redhat.com>
3737
3738 PR 14618
3739 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3740 report TARGET_WAITKIND_NO_RESUMED.
3741 * remote-utils.c (prepare_resume_reply): Handle
3742 TARGET_WAITKIND_NO_RESUMED.
3743 * server.c (report_no_resumed): New global.
3744 (handle_query) <qSupported>: Handle "no-resumed+". Report
3745 "no-resumed+" support.
3746 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3747 return error if the client doesn't support no-resumed events.
3748 (push_stop_notification): New function.
3749 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3750 events if the client supports them.
3751
3752 2015-11-30 Pedro Alves <palves@redhat.com>
3753
3754 * linux-low.c (thread_still_has_status_pending_p): Don't check
3755 vCont;t here.
3756 (lwp_resumed): New function.
3757 (status_pending_p_callback): Return early if the LWP is not
3758 supposed to be resumed.
3759
3760 2015-11-30 Pedro Alves <palves@redhat.com>
3761
3762 * linux-low.c (handle_extended_wait): Assert that the LWP's
3763 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3764 thread create events, leave the new child's status pending.
3765 (linux_low_filter_event): If GDB wants to hear about thread exit
3766 events, leave the LWP marked dead and don't delete it.
3767 (linux_wait_for_event_filtered): Don't check for thread exit.
3768 (filter_exit_event): New function.
3769 (linux_wait_1): Use it, when returning an exit event.
3770 (linux_resume_one_lwp_throw): Assert that the LWP's
3771 waitstatus is TARGET_WAITKIND_IGNORE.
3772 * remote-utils.c (prepare_resume_reply): Handle
3773 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3774 * server.c (report_thread_events): New global.
3775 (handle_general_set): Handle QThreadEvents.
3776 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3777 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3778 TARGET_WAITKIND_THREAD_EXITED.
3779 * server.h (report_thread_events): Declare.
3780
3781 2015-11-30 Pedro Alves <palves@redhat.com>
3782
3783 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3784 the thread's last_resume_kind was resume_stop.
3785
3786 2015-11-30 Pedro Alves <palves@redhat.com>
3787
3788 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3789 before returning.
3790
3791 2015-11-30 Pedro Alves <palves@redhat.com>
3792
3793 * server.c (handle_v_requests): Handle vCtrlC.
3794
3795 2015-11-30 Pedro Alves <palves@redhat.com>
3796
3797 * gdbthread.h (find_any_thread_of_pid): Declare.
3798 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3799 functions.
3800 * server.c (handle_query): If current_thread is NULL, look for
3801 another thread of the selected process.
3802
3803 2015-11-26 Daniel Colascione <dancol@dancol.org>
3804 Simon Marchi <simon.marchi@ericsson.com>
3805
3806 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3807 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3808 name in reply.
3809 * target.h (struct target_ops) <thread_name>: New field.
3810 (target_thread_name): New macro.
3811
3812 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3813
3814 * regcache.h (regcache_invalidate_pid): Add declaration.
3815 * regcache.c (regcache_invalidate_pid): New function, extracted
3816 from regcache_invalidate.
3817 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3818 Add trivial documentation comment.
3819 * lynx-low.c: Use regcache_invalidate_pid instead of
3820 regcache_invalidate.
3821
3822 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3823
3824 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3825 and Elf64_auxv_t if the target is Android.
3826
3827 2015-11-22 Doug Evans <xdje42@gmail.com>
3828
3829 * target.h: #include <sys/types.h>.
3830
3831 2015-11-19 Pedro Alves <palves@redhat.com>
3832
3833 * linux-low.c (linux_process_qsupported): Change prototype.
3834 Adjust.
3835 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3836 Change prototype.
3837 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3838 and adjust to loop over all features.
3839 * server.c (handle_query) <qSupported>: Adjust to call
3840 target_process_qsupported once, passing it a vector of unprocessed
3841 features.
3842 * target.h (struct target_ops) <process_qsupported>: Change
3843 prototype.
3844 (target_process_qsupported): Adjust.
3845
3846 2015-11-19 Pedro Alves <palves@redhat.com>
3847
3848 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3849 mode.
3850 * configure: Regenerate.
3851
3852 2015-11-19 Pedro Alves <palves@redhat.com>
3853
3854 * configure: Regenerate.
3855
3856 2015-11-19 Yao Qi <yao.qi@linaro.org>
3857
3858 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3859 type to uint32_t.
3860
3861 2015-11-19 Yao Qi <yao.qi@linaro.org>
3862
3863 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3864 (struct aarch64_operand): Move enum out.
3865
3866 2015-11-19 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3869 struct user_fpsimd_state *.
3870 (aarch64_store_fpregset): Likewise.
3871
3872 2015-11-19 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3875 struct user_pt_regs *.
3876 (aarch64_store_gregset): Likewise.
3877
3878 2015-11-18 Pedro Alves <palves@redhat.com>
3879
3880 * Makefile.in (all_object_files): Add $IPA_OBJS.
3881
3882 2015-11-17 Pedro Alves <palves@redhat.com>
3883
3884 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3885 GDB_SIGNAL_0 and gdb_signal_to_string.
3886
3887 2015-11-17 Pedro Alves <palves@redhat.com>
3888
3889 * win32-low.c (handle_output_debug_string): Remove parameter.
3890 (win32_kill): Remove our_status local and adjust call to
3891 handle_output_debug_string.
3892 (get_child_debug_event): Adjust call to
3893 handle_output_debug_string.
3894
3895 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3896
3897 * linux-mips-low.c (mips_fill_gregset): Add cast.
3898 (mips_store_gregset): Likewise.
3899 (mips_fill_fpregset): Likewise.
3900 (mips_store_fpregset): Likewise.
3901
3902 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3903
3904 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3905 priv.
3906
3907 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3908
3909 * linux-mips-low.c (mips_linux_new_thread): Change type of
3910 watch_type to enum target_hw_bp_type.
3911
3912 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3913
3914 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3915 Change return type to arm_hwbp_type.
3916
3917 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3920 (arm_store_gregset): Likewise.
3921 * linux-arm-low.c (arm_get_hwcap): Likewise.
3922 (arm_read_description): Likewise.
3923
3924 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3925
3926 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3927
3928 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3929
3930 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3931 (ppc_fill_vsxregset): Likewise.
3932 (ppc_store_vsxregset): Likewise.
3933 (ppc_fill_vrregset): Likewise.
3934 (ppc_store_vrregset): Likewise.
3935 (ppc_fill_evrregset): Likewise.
3936 (ppc_store_evrregset): Likewise.
3937
3938 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3939
3940 * linux-ppc-low.c (ppc_usrregs_info): Remove
3941 forward-declaration.
3942 (ppc_arch_setup): Move lower in file.
3943
3944 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3947 (ps_pdwrite): Likewise.
3948
3949 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3950
3951 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3952 to after assert checks.
3953
3954 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3955
3956 * proc-service.c (ps_pdread): Add/adjust casts.
3957 (ps_pdwrite): Add/adjust casts.
3958
3959 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3960
3961 * server.c (handle_search_memory_1): Cast return value of
3962 memmem.
3963
3964 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3965
3966 * server.c (write_qxfer_response): Change type of data to
3967 gdb_byte *.
3968
3969 2015-10-29 Pedro Alves <palves@redhat.com>
3970
3971 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3972
3973 2015-10-29 Pedro Alves <palves@redhat.com>
3974
3975 * tracepoint.c (clear_installed_tracepoints): Add casts.
3976
3977 2015-10-29 Pedro Alves <palves@redhat.com>
3978
3979 * server.c (handle_v_cont, process_serial_event): Add enum
3980 gdb_signal casts to signal parsing code.
3981
3982 2015-10-29 Pedro Alves <palves@redhat.com>
3983
3984 * linux-low.h (NULL_REGSET): Define.
3985 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3986 * linux-arm-low.c (arm_regsets): Likewise.
3987 * linux-crisv32-low.c (cris_regsets): Likewise.
3988 * linux-m68k-low.c (m68k_regsets): Likewise.
3989 * linux-mips-low.c (mips_regsets): Likewise.
3990 * linux-nios2-low.c (nios2_regsets): Likewise.
3991 * linux-ppc-low.c (ppc_regsets): Likewise.
3992 * linux-s390-low.c (s390_regsets): Likewise.
3993 * linux-sh-low.c (sh_regsets): Likewise.
3994 * linux-sparc-low.c (sparc_regsets): Likewise.
3995 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3996 * linux-tile-low.c (tile_regsets): Likewise.
3997 * linux-x86-low.c (x86_regsets): Likewise.
3998 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3999
4000 2015-10-29 Pedro Alves <palves@redhat.com>
4001
4002 * linux-low.h (NULL_REGSET): Define.
4003 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4004 * linux-arm-low.c (arm_regsets): Likewise.
4005 * linux-crisv32-low.c (cris_regsets): Likewise.
4006 * linux-m68k-low.c (m68k_regsets): Likewise.
4007 * linux-mips-low.c (mips_regsets): Likewise.
4008 * linux-nios2-low.c (nios2_regsets): Likewise.
4009 * linux-ppc-low.c (ppc_regsets): Likewise.
4010 * linux-s390-low.c (s390_regsets): Likewise.
4011 * linux-sh-low.c (sh_regsets): Likewise.
4012 * linux-sparc-low.c (sparc_regsets): Likewise.
4013 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4014 * linux-tile-low.c (tile_regsets): Likewise.
4015 * linux-x86-low.c (x86_regsets): Likewise.
4016 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4017
4018 2015-10-26 Doug Evans <dje@google.com>
4019
4020 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4021
4022 2015-10-26 Doug Evans <dje@google.com>
4023
4024 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4025
4026 2015-10-26 Doug Evans <dje@google.com>
4027
4028 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4029 for debug_printf.
4030 (attach_thread, find_new_threads_callback): Ditto.
4031
4032 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4033
4034 * mem-break.h (set_breakpoint_data): Remove.
4035
4036 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4037
4038 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4039 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4040 (initialize_low): Remove set_breakpoint_data call.
4041 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4042 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4043 (initialize_low): Remove set_breakpoint_data call.
4044 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4045 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4046 (initialize_low): Remove set_breakpoint_data call.
4047
4048 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4049
4050 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4051 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4052 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4053 * target.h (target_breakpoint_kind_from_pc): New macro.
4054
4055 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4056
4057 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4058 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4059 the default breakpoint kind.
4060
4061 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4062
4063 * linux-arm-low.c (arm_supports_z_point_type): Add software
4064 breakpoint support.
4065
4066 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4067
4068 * linux-arm-low.c: Refactor breakpoint definitions.
4069 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4070 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4071
4072 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4073
4074 * Makefile.in: Add arm.c/o.
4075 * configure.srv: Likewise.
4076 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4077 (arm_breakpoint_kind_from_pc): New function.
4078 (arm_sw_breakpoint_from_kind): Return proper kind.
4079 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4080
4081 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4082
4083 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4084 removal.
4085 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4086 (struct raw_breakpoint) <size>: Remove.
4087 (struct raw_breakpoint) <kind>: Add.
4088 (bp_size): New function.
4089 (bp_opcode): Likewise.
4090 (find_raw_breakpoint_at): Adjust for kind.
4091 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4092 (remove_memory_breakpoint): Adjust for kind call bp_size.
4093 (set_raw_breakpoint_at): Adjust for kind.
4094 (set_breakpoint): Likewise.
4095 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4096 (delete_raw_breakpoint): Adjust for kind.
4097 (delete_breakpoint): Likewise.
4098 (find_gdb_breakpoint): Likewise.
4099 (set_gdb_breakpoint_1): Likewise.
4100 (set_gdb_breakpoint): Likewise.
4101 (delete_gdb_breakpoint_1): Likewise.
4102 (delete_gdb_breakpoint): Likewise.
4103 (uninsert_raw_breakpoint): Likewise.
4104 (reinsert_raw_breakpoint): Likewise.
4105 (set_breakpoint_data): Remove.
4106 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4107 (check_mem_read): Adjust for kind call bp_size.
4108 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4109 (clone_one_breakpoint): Adjust for kind.
4110 * mem-break.h (set_gdb_breakpoint): Likewise.
4111 (delete_gdb_breakpoint): Likewise.
4112 * server.c (process_serial_event): Likewise.
4113
4114 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4115
4116 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4117 (struct linux_target_ops) <breakpoint>: Remove.
4118 (struct linux_target_ops) <breakpoint_len>: Remove.
4119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4121 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4122 (arm_sw_breakpoint_from_kind): New function.
4123 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4124 (struct linux_target_ops) <breakpoint>: Remove.
4125 (struct linux_target_ops) <breakpoint_len>: Remove.
4126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4128 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4129 (struct linux_target_ops) <breakpoint>: Remove.
4130 (struct linux_target_ops) <breakpoint_len>: Remove.
4131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4133 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4134 (struct linux_target_ops) <breakpoint>: Remove.
4135 (struct linux_target_ops) <breakpoint_len>: Remove.
4136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4138 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4139 and sw_breakpoint_from_kind to increment the pc.
4140 (linux_breakpoint_kind_from_pc): New function.
4141 (linux_sw_breakpoint_from_kind): New function.
4142 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4143 (initialize_low): Call breakpoint_kind_from_pc and
4144 sw_breakpoint_from_kind to replace breakpoint_data/len.
4145 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4146 New field.
4147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4148 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4149 (struct linux_target_ops) <breakpoint>: Remove.
4150 (struct linux_target_ops) <breakpoint_len>: Remove.
4151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4153 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4154 (struct linux_target_ops) <breakpoint>: Remove.
4155 (struct linux_target_ops) <breakpoint_len>: Remove.
4156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4158 * linux-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4174 (struct linux_target_ops) <breakpoint>: Remove.
4175 (struct linux_target_ops) <breakpoint_len>: Remove.
4176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4178 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4179 (struct linux_target_ops) <breakpoint>: Remove.
4180 (struct linux_target_ops) <breakpoint_len>: Remove.
4181 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4182 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4183 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4194 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4195 (struct linux_target_ops) <breakpoint>: Remove.
4196 (struct linux_target_ops) <breakpoint_len>: Remove.
4197 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4198 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4199 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4200 (struct linux_target_ops) <breakpoint>: Remove.
4201 (struct linux_target_ops) <breakpoint_len>: Remove.
4202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4204
4205 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4206
4207 * linux-cris-low.c (cris_get_pc): Remove void arg.
4208
4209 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4210
4211 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4212 variable name.
4213
4214 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4215
4216 * inferiors.c (thread_pid_matches_callback): New function.
4217 (find_thread_process): New function.
4218 (remove_thread): Reset current_thread.
4219 (remove_process): Assert threads have been removed first.
4220
4221 2015-10-15 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4224 if it is 3.
4225 (aarch64_remove_point): Likewise.
4226 * regcache.c (regcache_register_size): New function.
4227
4228 2015-10-12 Yao Qi <yao.qi@linaro.org>
4229
4230 * linux-aarch64-low.c: Update all callers as emit_load_store
4231 is renamed to aarch64_emit_load_store.
4232
4233 2015-10-12 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-aarch64-low.c: Update all callers of function renaming
4236 from emit_insn to aarch64_emit_insn.
4237
4238 2015-10-12 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4241 arch/aarch64-insn.h.
4242 (struct aarch64_memory_operand): Likewise.
4243 (ENCODE): Likewise.
4244 (emit_insn): Move to arch/aarch64-insn.c.
4245 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4246 (emit_load_store): Move to arch/aarch64-insn.c.
4247 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4248 (can_encode_int32): Remove.
4249
4250 2015-10-12 Yao Qi <yao.qi@linaro.org>
4251
4252 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4253 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4254 (aarch64_relocate_instruction): Likewise.
4255 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4256 (struct aarch64_insn_visitor): Likewise.
4257
4258 2015-10-12 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4261 (struct aarch64_insn_visitor): New.
4262 (struct aarch64_insn_relocation_data): New.
4263 (aarch64_ftrace_insn_reloc_b): New function.
4264 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4265 (aarch64_ftrace_insn_reloc_cb): Likewise.
4266 (aarch64_ftrace_insn_reloc_tb): Likewise.
4267 (aarch64_ftrace_insn_reloc_adr): Likewise.
4268 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4269 (aarch64_ftrace_insn_reloc_others): Likewise.
4270 (visitor): New.
4271 (aarch64_relocate_instruction): Use visitor.
4272
4273 2015-10-12 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4276 int. Add argument buf.
4277 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4278 aarch64_relocate_instruction.
4279
4280 2015-10-12 Yao Qi <yao.qi@linaro.org>
4281
4282 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4283 argument insn. Remove local variable insn. Don't call
4284 target_read_uint32.
4285 (aarch64_install_fast_tracepoint_jump_pad): Call
4286 target_read_uint32.
4287
4288 2015-09-30 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4291 (emit_load_store_pair): Likewise.
4292
4293 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4294
4295 * dll.c (match_dll): Add cast(s).
4296 (unloaded_dll): Likewise.
4297 * linux-low.c (second_thread_of_pid_p): Likewise.
4298 (delete_lwp_callback): Likewise.
4299 (count_events_callback): Likewise.
4300 (select_event_lwp_callback): Likewise.
4301 (linux_set_resume_request): Likewise.
4302 * server.c (accumulate_file_name_length): Likewise.
4303 (emit_dll_description): Likewise.
4304 (handle_qxfer_threads_worker): Likewise.
4305 (visit_actioned_threads): Likewise.
4306 * thread-db.c (any_thread_of): Likewise.
4307 * tracepoint.c (same_process_p): Likewise.
4308 (match_blocktype): Likewise.
4309 (build_traceframe_info_xml): Likewise.
4310
4311 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4312
4313 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4314 assignment.
4315 (gdb_unparse_agent_expr): Likewise.
4316 * hostio.c (require_data): Likewise.
4317 (handle_pread): Likewise.
4318 * linux-low.c (disable_regset): Likewise.
4319 (fetch_register): Likewise.
4320 (store_register): Likewise.
4321 (get_dynamic): Likewise.
4322 (linux_qxfer_libraries_svr4): Likewise.
4323 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4324 (set_fast_tracepoint_jump): Likewise.
4325 (uninsert_fast_tracepoint_jumps_at): Likewise.
4326 (reinsert_fast_tracepoint_jumps_at): Likewise.
4327 (validate_inserted_breakpoint): Likewise.
4328 (clone_agent_expr): Likewise.
4329 * regcache.c (init_register_cache): Likewise.
4330 * remote-utils.c (putpkt_binary_1): Likewise.
4331 (decode_M_packet): Likewise.
4332 (decode_X_packet): Likewise.
4333 (look_up_one_symbol): Likewise.
4334 (relocate_instruction): Likewise.
4335 (monitor_output): Likewise.
4336 * server.c (handle_search_memory): Likewise.
4337 (handle_qxfer_exec_file): Likewise.
4338 (handle_qxfer_libraries): Likewise.
4339 (handle_qxfer): Likewise.
4340 (handle_query): Likewise.
4341 (handle_v_cont): Likewise.
4342 (handle_v_run): Likewise.
4343 (captured_main): Likewise.
4344 * target.c (write_inferior_memory): Likewise.
4345 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4346 * tracepoint.c (init_trace_buffer): Likewise.
4347 (add_tracepoint_action): Likewise.
4348 (add_traceframe): Likewise.
4349 (add_traceframe_block): Likewise.
4350 (cmd_qtdpsrc): Likewise.
4351 (cmd_qtdv): Likewise.
4352 (cmd_qtstatus): Likewise.
4353 (response_source): Likewise.
4354 (response_tsv): Likewise.
4355 (cmd_qtnotes): Likewise.
4356 (gdb_collect): Likewise.
4357 (initialize_tracepoint): Likewise.
4358
4359 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4360
4361 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4362 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4363 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4364 <NOP>: New.
4365 (enum aarch64_condition_codes): New enum.
4366 (w0): New static global.
4367 (fp): Likewise.
4368 (lr): Likewise.
4369 (struct aarch64_memory_operand) <type>: New
4370 MEMORY_OPERAND_POSTINDEX type.
4371 (postindex_memory_operand): New helper function.
4372 (emit_ret): New function.
4373 (emit_load_store_pair): New function, factored out of emit_stp
4374 with support for MEMORY_OPERAND_POSTINDEX.
4375 (emit_stp): Rewrite using emit_load_store_pair.
4376 (emit_ldp): New function.
4377 (emit_load_store): Likewise.
4378 (emit_ldr): Mention post-index instruction in comment.
4379 (emit_ldrh): New function.
4380 (emit_ldrb): New function.
4381 (emit_ldrsw): Mention post-index instruction in comment.
4382 (emit_str): Likewise.
4383 (emit_subs): New function.
4384 (emit_cmp): Likewise.
4385 (emit_and): Likewise.
4386 (emit_orr): Likewise.
4387 (emit_orn): Likewise.
4388 (emit_eor): Likewise.
4389 (emit_mvn): Likewise.
4390 (emit_lslv): Likewise.
4391 (emit_lsrv): Likewise.
4392 (emit_asrv): Likewise.
4393 (emit_mul): Likewise.
4394 (emit_sbfm): Likewise.
4395 (emit_sbfx): Likewise.
4396 (emit_ubfm): Likewise.
4397 (emit_ubfx): Likewise.
4398 (emit_csinc): Likewise.
4399 (emit_cset): Likewise.
4400 (emit_nop): Likewise.
4401 (emit_ops_insns): New helper function.
4402 (emit_pop): Likewise.
4403 (emit_push): Likewise.
4404 (aarch64_emit_prologue): New function.
4405 (aarch64_emit_epilogue): Likewise.
4406 (aarch64_emit_add): Likewise.
4407 (aarch64_emit_sub): Likewise.
4408 (aarch64_emit_mul): Likewise.
4409 (aarch64_emit_lsh): Likewise.
4410 (aarch64_emit_rsh_signed): Likewise.
4411 (aarch64_emit_rsh_unsigned): Likewise.
4412 (aarch64_emit_ext): Likewise.
4413 (aarch64_emit_log_not): Likewise.
4414 (aarch64_emit_bit_and): Likewise.
4415 (aarch64_emit_bit_or): Likewise.
4416 (aarch64_emit_bit_xor): Likewise.
4417 (aarch64_emit_bit_not): Likewise.
4418 (aarch64_emit_equal): Likewise.
4419 (aarch64_emit_less_signed): Likewise.
4420 (aarch64_emit_less_unsigned): Likewise.
4421 (aarch64_emit_ref): Likewise.
4422 (aarch64_emit_if_goto): Likewise.
4423 (aarch64_emit_goto): Likewise.
4424 (aarch64_write_goto_address): Likewise.
4425 (aarch64_emit_const): Likewise.
4426 (aarch64_emit_call): Likewise.
4427 (aarch64_emit_reg): Likewise.
4428 (aarch64_emit_pop): Likewise.
4429 (aarch64_emit_stack_flush): Likewise.
4430 (aarch64_emit_zero_ext): Likewise.
4431 (aarch64_emit_swap): Likewise.
4432 (aarch64_emit_stack_adjust): Likewise.
4433 (aarch64_emit_int_call_1): Likewise.
4434 (aarch64_emit_void_call_2): Likewise.
4435 (aarch64_emit_eq_goto): Likewise.
4436 (aarch64_emit_ne_goto): Likewise.
4437 (aarch64_emit_lt_goto): Likewise.
4438 (aarch64_emit_le_goto): Likewise.
4439 (aarch64_emit_gt_goto): Likewise.
4440 (aarch64_emit_ge_got): Likewise.
4441 (aarch64_emit_ops_impl): New static global variable.
4442 (aarch64_emit_ops): New target function, return
4443 &aarch64_emit_ops_impl.
4444 (struct linux_target_ops): Install it.
4445
4446 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4447
4448 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4449 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4450 aarch64-ipa.o.
4451 * linux-aarch64-ipa.c: New file.
4452 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4453 and endian.h.
4454 (aarch64_get_thread_area): New target method.
4455 (extract_signed_bitfield): New helper function.
4456 (aarch64_decode_ldr_literal): New function.
4457 (enum aarch64_opcodes): New enum.
4458 (struct aarch64_register): New struct.
4459 (struct aarch64_operand): New struct.
4460 (x0): New static global.
4461 (x1): Likewise.
4462 (x2): Likewise.
4463 (x3): Likewise.
4464 (x4): Likewise.
4465 (w2): Likewise.
4466 (ip0): Likewise.
4467 (sp): Likewise.
4468 (xzr): Likewise.
4469 (aarch64_register): New helper function.
4470 (register_operand): Likewise.
4471 (immediate_operand): Likewise.
4472 (struct aarch64_memory_operand): New struct.
4473 (offset_memory_operand): New helper function.
4474 (preindex_memory_operand): Likewise.
4475 (enum aarch64_system_control_registers): New enum.
4476 (ENCODE): New macro.
4477 (emit_insn): New helper function.
4478 (emit_b): New function.
4479 (emit_bcond): Likewise.
4480 (emit_cb): Likewise.
4481 (emit_tb): Likewise.
4482 (emit_blr): Likewise.
4483 (emit_stp): Likewise.
4484 (emit_ldp_q_offset): Likewise.
4485 (emit_stp_q_offset): Likewise.
4486 (emit_load_store): Likewise.
4487 (emit_ldr): Likewise.
4488 (emit_ldrsw): Likewise.
4489 (emit_str): Likewise.
4490 (emit_ldaxr): Likewise.
4491 (emit_stxr): Likewise.
4492 (emit_stlr): Likewise.
4493 (emit_data_processing_reg): Likewise.
4494 (emit_data_processing): Likewise.
4495 (emit_add): Likewise.
4496 (emit_sub): Likewise.
4497 (emit_mov): Likewise.
4498 (emit_movk): Likewise.
4499 (emit_mov_addr): Likewise.
4500 (emit_mrs): Likewise.
4501 (emit_msr): Likewise.
4502 (emit_sevl): Likewise.
4503 (emit_wfe): Likewise.
4504 (append_insns): Likewise.
4505 (can_encode_int32_in): New helper function.
4506 (aarch64_relocate_instruction): New function.
4507 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4508 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4509 (struct linux_target_ops): Install aarch64_get_thread_area,
4510 aarch64_install_fast_tracepoint_jump_pad and
4511 aarch64_get_min_fast_tracepoint_insn_len.
4512
4513 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4514
4515 * Makefile.in (aarch64-insn.o): New rule.
4516 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4517
4518 2015-09-21 Yao Qi <yao.qi@linaro.org>
4519
4520 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4521
4522 2015-09-21 Yao Qi <yao.qi@linaro.org>
4523
4524 * tracepoint.c (max_jump_pad_size): Remove.
4525
4526 2015-09-18 Yao Qi <yao.qi@linaro.org>
4527
4528 * linux-aarch64-low.c: Don't include sys/uio.h.
4529 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4530
4531 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4532
4533 * tracepoint.c (eval_result_type): Change prototype.
4534 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4535
4536 2015-09-15 Pedro Alves <palves@redhat.com>
4537
4538 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4539 Check whether to report exec events instead of checking whether
4540 multiprocess is enabled.
4541
4542 2015-09-15 Pedro Alves <palves@redhat.com>
4543
4544 PR remote/18965
4545 * remote-utils.c (prepare_resume_reply): Merge
4546 TARGET_WAITKIND_VFORK_DONE switch case with the
4547 TARGET_WAITKIND_FORKED case.
4548
4549 2015-09-15 Yao Qi <yao.qi@linaro.org>
4550
4551 * server.c (handle_query): Check string comparison using
4552 "else if" instead of "if".
4553
4554 2015-09-15 Yao Qi <yao.qi@linaro.org>
4555
4556 * server.c (vCont_supported): New global variable.
4557 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4558 matches. Append ";vContSupported+" to own_buf.
4559 (handle_v_requests): Append ";s;S" to own_buf if target supports
4560 hardware single step or vCont_supported is false.
4561 (capture_main): Set vCont_supported to zero.
4562
4563 2015-09-15 Yao Qi <yao.qi@linaro.org>
4564
4565 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4566 it to ...
4567 (linux_supports_hardware_single_step): ... New function.
4568 (linux_target_ops): Update.
4569 * lynx-low.c (lynx_target_ops): Set field
4570 supports_hardware_single_step to target_can_do_hardware_single_step.
4571 * nto-low.c (nto_target_ops): Likewise.
4572 * spu-low.c (spu_target_ops): Likewise.
4573 * win32-low.c (win32_target_ops): Likewise.
4574 * target.c (target_can_do_hardware_single_step): New function.
4575 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4576 Remove. <supports_hardware_single_step>: New field.
4577 (target_supports_conditional_breakpoints): Remove.
4578 (target_supports_hardware_single_step): New macro.
4579 (target_can_do_hardware_single_step): Declare.
4580 * server.c (handle_query): Use target_supports_hardware_single_step
4581 instead of target_supports_conditional_breakpoints.
4582
4583 2015-09-15 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4586 function.
4587 (struct linux_target_ops the_low_target): Install
4588 aarch64_linux_siginfo_fixup.
4589
4590 2015-09-11 Don Breazeal <donb@codesourcery.com>
4591 Luis Machado <lgustavo@codesourcery.com>
4592
4593 * linux-low.c (linux_mourn): Static declaration.
4594 (linux_arch_setup): Move in front of
4595 handle_extended_wait.
4596 (linux_arch_setup_thread): New function.
4597 (handle_extended_wait): Handle exec events. Call
4598 linux_arch_setup_thread. Make event_lwp argument a
4599 pointer-to-a-pointer.
4600 (check_zombie_leaders): Do not check stopped threads.
4601 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4602 (linux_low_filter_event): Add lwp and thread for exec'ing
4603 non-leader thread if leader thread has been deleted.
4604 Refactor code into linux_arch_setup_thread and call it.
4605 Pass child lwp pointer by reference to handle_extended_wait.
4606 (linux_wait_for_event_filtered): Update comment.
4607 (linux_wait_1): Prevent clobbering exec event status.
4608 (linux_supports_exec_events): New function.
4609 (linux_target_ops) <supports_exec_events>: Initialize new member.
4610 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4611 new member.
4612 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4613 * server.c (report_exec_events): New global variable.
4614 (handle_query): Handle qSupported query for exec-events feature.
4615 (captured_main): Initialize report_exec_events.
4616 * server.h (report_exec_events): Declare new global variable.
4617 * target.h (struct target_ops) <supports_exec_events>: New
4618 member.
4619 (target_supports_exec_events): New macro.
4620 * win32-low.c (win32_target_ops) <supports_exec_events>:
4621 Initialize new member.
4622
4623 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4624
4625 * linux-low.c (linux_low_enable_btrace): Remove.
4626 (linux_target_ops): Replace linux_low_enable_btrace with
4627 linux_enable_btrace.
4628
4629 2015-09-03 Yao Qi <yao.qi@linaro.org>
4630
4631 * linux-aarch64-low.c (aarch64_insert_point): Call
4632 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4633 returns true.
4634
4635 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4636
4637 * linux-low.c (check_stopped_by_breakpoint): Use
4638 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4639
4640 2015-08-27 Pedro Alves <palves@redhat.com>
4641
4642 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4643
4644 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4645
4646 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4647 the XNEW-family equivalent.
4648 (compile_bytecodes): Likewise.
4649 * dll.c (loaded_dll): Likewise.
4650 * event-loop.c (append_callback_event): Likewise.
4651 (create_file_handler): Likewise.
4652 (create_file_event): Likewise.
4653 * hostio.c (handle_open): Likewise.
4654 * inferiors.c (add_thread): Likewise.
4655 (add_process): Likewise.
4656 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4657 * linux-arm-low.c (arm_new_process): Likewise.
4658 (arm_new_thread): Likewise.
4659 * linux-low.c (add_to_pid_list): Likewise.
4660 (linux_add_process): Likewise.
4661 (handle_extended_wait): Likewise.
4662 (add_lwp): Likewise.
4663 (enqueue_one_deferred_signal): Likewise.
4664 (enqueue_pending_signal): Likewise.
4665 (linux_resume_one_lwp_throw): Likewise.
4666 (linux_resume_one_thread): Likewise.
4667 (linux_read_memory): Likewise.
4668 (linux_write_memory): Likewise.
4669 * linux-mips-low.c (mips_linux_new_process): Likewise.
4670 (mips_linux_new_thread): Likewise.
4671 (mips_add_watchpoint): Likewise.
4672 * linux-x86-low.c (initialize_low_arch): Likewise.
4673 * lynx-low.c (lynx_add_process): Likewise.
4674 * mem-break.c (set_raw_breakpoint_at): Likewise.
4675 (set_breakpoint): Likewise.
4676 (add_condition_to_breakpoint): Likewise.
4677 (add_commands_to_breakpoint): Likewise.
4678 (clone_agent_expr): Likewise.
4679 (clone_one_breakpoint): Likewise.
4680 * regcache.c (new_register_cache): Likewise.
4681 * remote-utils.c (look_up_one_symbol): Likewise.
4682 * server.c (queue_stop_reply): Likewise.
4683 (start_inferior): Likewise.
4684 (queue_stop_reply_callback): Likewise.
4685 (handle_target_event): Likewise.
4686 * spu-low.c (fetch_ppc_memory): Likewise.
4687 (store_ppc_memory): Likewise.
4688 * target.c (set_target_ops): Likewise.
4689 * thread-db.c (thread_db_load_search): Likewise.
4690 (try_thread_db_load_1): Likewise.
4691 * tracepoint.c (add_tracepoint): Likewise.
4692 (add_tracepoint_action): Likewise.
4693 (create_trace_state_variable): Likewise.
4694 (cmd_qtdpsrc): Likewise.
4695 (cmd_qtro): Likewise.
4696 (add_while_stepping_state): Likewise.
4697 * win32-low.c (child_add_thread): Likewise.
4698 (get_image_name): Likewise.
4699
4700 2015-08-25 Yao Qi <yao.qi@linaro.org>
4701
4702 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4703
4704 2015-08-25 Yao Qi <yao.qi@linaro.org>
4705
4706 * Makefile.in (aarch64-linux.o): New rule.
4707 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4708 srv_tgtobj.
4709 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4710 (aarch64_init_debug_reg_state): Make it extern.
4711 (aarch64_linux_prepare_to_resume): Remove.
4712
4713 2015-08-25 Yao Qi <yao.qi@linaro.org>
4714
4715 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4716 lwp_arch_private_info and ptid_of_lwp.
4717
4718 2015-08-25 Yao Qi <yao.qi@linaro.org>
4719
4720 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4721 Find proc_info by find_process_pid. All callers updated.
4722
4723 2015-08-25 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4726 Remove.
4727 (debug_reg_change_callback): Remove.
4728 (aarch64_notify_debug_reg_change): Remove.
4729
4730 2015-08-25 Yao Qi <yao.qi@linaro.org>
4731
4732 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4733 Call current_lwp_ptid.
4734
4735 2015-08-25 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (debug_reg_change_callback): Use
4738 debug_printf.
4739
4740 2015-08-25 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4743
4744 2015-08-25 Yao Qi <yao.qi@linaro.org>
4745
4746 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4747
4748 2015-08-25 Yao Qi <yao.qi@linaro.org>
4749
4750 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4751 the code.
4752
4753 2015-08-25 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4756 Remove.
4757 (debug_reg_change_callback): Remove argument entry and add argument
4758 lwp. Remove local variable thread. Don't print thread id in the
4759 debugging output. Don't check whether pid of thread equals to pid.
4760 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4761 iterate_over_lwps instead find_inferior.
4762
4763 2015-08-24 Pedro Alves <palves@redhat.com>
4764
4765 * inferiors.c (get_first_process): New function.
4766 * inferiors.h (get_first_process): New declaration.
4767 * remote-utils.c (read_ptid): Default to the first process in the
4768 list, instead of to the current thread's process.
4769
4770 2015-08-24 Pedro Alves <palves@redhat.com>
4771
4772 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4773 * event-loop.c: Likewise.
4774 * remote-utils.c: Likewise.
4775 * tracepoint.c: Likewise.
4776
4777 2015-08-24 Pedro Alves <palves@redhat.com>
4778
4779 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4780 ptid_get_lwp.
4781
4782 2015-08-21 Pedro Alves <palves@redhat.com>
4783
4784 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4785 instead of literal 1.
4786
4787 2015-08-21 Pedro Alves <palves@redhat.com>
4788
4789 * tdesc.c (default_description): Explicitly zero-initialize.
4790
4791 2015-08-21 Pedro Alves <palves@redhat.com>
4792
4793 PR gdb/18749
4794 * inferiors.c (remove_thread): Discard any pending stop reply for
4795 this thread.
4796 * server.c (remove_all_on_match_pid): Rename to ...
4797 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4798 instead of a pid.
4799 (discard_queued_stop_replies): Change parameter to a ptid. Now
4800 extern.
4801 (handle_v_kill, kill_inferior_callback, captured_main)
4802 (process_serial_event): Adjust.
4803 * server.h (discard_queued_stop_replies): Declare.
4804
4805 2015-08-21 Pedro Alves <palves@redhat.com>
4806
4807 * linux-low.c (wait_for_sigstop): Always switch to no thread
4808 selected if the previously current thread dies.
4809 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4810 process instead of the current thread's.
4811 * remote-utils.c (input_interrupt): Don't check if there's no
4812 current thread.
4813 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4814 current thread to the general thread fails, error out.
4815 (handle_qxfer_auxv, handle_qxfer_libraries)
4816 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4817 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4818 (handle_query): Check if there's a thread selected instead of
4819 checking whether there's any thread in the thread list.
4820 (handle_qxfer_threads, handle_qxfer_btrace)
4821 (handle_qxfer_btrace_conf): Don't error out early if there's no
4822 thread in the thread list.
4823 (handle_v_cont, myresume): Don't set the current thread to the
4824 continue thread.
4825 (process_serial_event) <Hg handling>: Also set thread_id if the
4826 previous general thread is still alive.
4827 (process_serial_event) <g/G handling>: If setting the current
4828 thread to the general thread fails, error out.
4829 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4830 thread's lwp instead of the current thread's.
4831 * target.c (set_desired_thread): If the desired thread was not
4832 found, leave the current thread pointing to NULL. Return an int
4833 (boolean) indicating success.
4834 * target.h (set_desired_thread): Change return type to int.
4835
4836 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4837
4838 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4839 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4840 #includes.
4841 (ps_get_thread_area): New function.
4842
4843 2015-08-19 Gary Benson <gbenson@redhat.com>
4844
4845 * hostio.c (handle_pread): Do not attempt to read more data
4846 than hostio_reply_with_data can fit in a packet.
4847
4848 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4849
4850 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4851
4852 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4853
4854 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4855
4856 2015-08-06 Pedro Alves <palves@redhat.com>
4857
4858 * tracepoint.c (expr_eval_result): Now an int.
4859
4860 2015-08-06 Pedro Alves <palves@redhat.com>
4861
4862 * gdbthread.h (struct regcache): Forward declare.
4863 (struct thread_info) <regcache_data>: Now a struct regcache
4864 pointer.
4865 * inferiors.c (inferior_regcache_data)
4866 (set_inferior_regcache_data): Now work with struct regcache
4867 pointers.
4868 * inferiors.h (struct regcache): Forward declare.
4869 (inferior_regcache_data, set_inferior_regcache_data): Now work
4870 with struct regcache pointers.
4871 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4872 (free_register_cache_thread): Remove struct regcache pointer
4873 casts.
4874
4875 2015-08-06 Pedro Alves <palves@redhat.com>
4876
4877 * server.c (captured_main): On error, print the exception message
4878 to stderr, and if run_once is set, throw a quit.
4879
4880 2015-08-06 Pedro Alves <palves@redhat.com>
4881
4882 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4883 the current thread.
4884
4885 2015-08-06 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4888 reading beyond the passed in buffer length.
4889
4890 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4891
4892 * tracepoint.c (symbol_list) <required>: Remove.
4893
4894 2015-08-06 Pedro Alves <palves@redhat.com>
4895
4896 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4897 count if stopping and suspending threads.
4898 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4899 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4900 (linux_detach): Complete an ongoing step-over.
4901 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4902 throughout.
4903 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4904 (linux_wait_1): If passing a signal to the inferior after
4905 finishing a step-over, unsuspend and re-resume all lwps. If we
4906 see a single-step event but the thread should be continuing, don't
4907 pass the trap to gdb.
4908 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4909 internal_error instead of gdb_assert.
4910 (enqueue_pending_signal): New function.
4911 (check_ptrace_stopped_lwp_gone): Add debug output.
4912 (start_step_over): Use internal_error instead of gdb_assert.
4913 (complete_ongoing_step_over): New function.
4914 (linux_resume_one_thread): Don't resume a suspended thread.
4915 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4916 it stepping.
4917
4918 2015-08-06 Pedro Alves <palves@redhat.com>
4919
4920 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4921 (linux_thread_alive): Use lwp_is_marked_dead.
4922 (extended_event_reported): Delete.
4923 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4924 instead of extended_event_reported.
4925 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4926 as well.
4927 (lwp_is_marked_dead): New function.
4928 (lwp_running): Use lwp_is_marked_dead.
4929 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4930 comment.
4931
4932 2015-08-06 Pedro Alves <palves@redhat.com>
4933
4934 * linux-low.c (linux_wait_1): Move fork event output out of the
4935 !report_to_gdb check. Pass event_child->waitstatus to
4936 target_waitstatus_to_string instead of ourstatus.
4937
4938 2015-08-04 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4941 if current_thread is 32 bit.
4942
4943 2015-08-04 Yao Qi <yao.qi@linaro.org>
4944
4945 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4946 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4947 * server.c (extended_protocol): Remove "static".
4948 * server.h (extended_protocol): Declare it.
4949
4950 2015-08-04 Yao Qi <yao.qi@linaro.org>
4951
4952 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4953 both aarch64 and aarch32.
4954 (aarch64_set_pc): Likewise.
4955
4956 2015-08-04 Yao Qi <yao.qi@linaro.org>
4957
4958 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4959 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4960 arm-with-neon.xml to srv_xmlfiles.
4961 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4962 (is_64bit_tdesc): New function.
4963 (aarch64_linux_read_description): New function.
4964 (aarch64_arch_setup): Call aarch64_linux_read_description.
4965 (regs_info): Rename to regs_info_aarch64.
4966 (aarch64_regs_info): Return right regs_info.
4967 (initialize_low_arch): Call initialize_low_arch_aarch32.
4968
4969 2015-08-04 Yao Qi <yao.qi@linaro.org>
4970
4971 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4972 * linux-aarch32-low.c: New file.
4973 * linux-aarch32-low.h: New file.
4974 * linux-arm-low.c (arm_fill_gregset): Move it to
4975 linux-aarch32-low.c.
4976 (arm_store_gregset): Likewise.
4977 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4978 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4979 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4980 (regs_info): Rename to regs_info_arm.
4981 (arm_regs_info): Return regs_info_aarch32 if
4982 have_ptrace_getregset is 1 and target description is
4983 arm_with_neon or arm_with_vfpv3.
4984 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4985 Call initialize_low_arch_aarch32 instead.
4986
4987 2015-08-04 Yao Qi <yao.qi@linaro.org>
4988
4989 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4990 * linux-low.c: ... here.
4991 * linux-low.h (have_ptrace_getregset): Declare it.
4992
4993 2015-08-04 Pedro Alves <palves@redhat.com>
4994
4995 * thread-db.c (struct thread_db): Use new typedefs.
4996 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4997 CHK calls.
4998 (disable_thread_event_reporting): Cast result of dlsym to
4999 destination function pointer type.
5000 (thread_db_mourn): Use td_ta_delete_ftype.
5001
5002 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5003
5004 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5005 arch variant.
5006 (CDX_BREAKPOINT): Define for R2.
5007 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5008 (the_low_target): Add comments.
5009
5010 2015-07-30 Yao Qi <yao.qi@linaro.org>
5011
5012 * linux-arm-low.c (arm_hwcap): Remove it.
5013 (arm_read_description): New local variable arm_hwcap. Don't
5014 set arm_hwcap to zero.
5015
5016 2015-07-30 Yao Qi <yao.qi@linaro.org>
5017
5018 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5019 Use regcache->tdesc instead.
5020 (arm_store_wmmxregset): Likewise.
5021 (arm_fill_vfpregset): Likewise.
5022 (arm_store_vfpregset): Likewise.
5023
5024 2015-07-30 Yao Qi <yao.qi@linaro.org>
5025
5026 * linux-arm-low.c: Include arch/arm.h.
5027 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5028 (arm_store_gregset): Likewise.
5029
5030 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5031
5032 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5033 ptrace's 4th parameter.
5034
5035 2015-07-27 Yao Qi <yao.qi@linaro.org>
5036
5037 * configure.srv (case aarch64*-*-linux*): Don't set
5038 srv_linux_usrregs.
5039
5040 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5041
5042 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5043 sys/ptrace.h.
5044 * linux-arm-low.c: Likewise.
5045 * linux-cris-low.c: Likewise.
5046 * linux-crisv32-low.c: Likewise.
5047 * linux-low.c: Likewise.
5048 * linux-m68k-low.c: Likewise.
5049 * linux-mips-low.c: Likewise.
5050 * linux-nios2-low.c: Likewise.
5051 * linux-s390-low.c: Likewise.
5052 * linux-sparc-low.c: Likewise.
5053 * linux-tic6x-low.c: Likewise.
5054 * linux-tile-low.c: Likewise.
5055 * linux-x86-low.c: Likewise.
5056
5057 2015-07-24 Pedro Alves <palves@redhat.com>
5058
5059 * config.in: Regenerate.
5060 * configure: Regenerate.
5061
5062 2015-07-24 Pedro Alves <palves@redhat.com>
5063
5064 * acinclude.m4: Include ../ptrace.m4.
5065 * configure.ac: Call GDB_AC_PTRACE.
5066 * config.in, configure: Regenerate.
5067
5068 2015-07-24 Yao Qi <yao.qi@linaro.org>
5069
5070 * linux-low.c (linux_create_inferior): Remove setting to
5071 proc->priv->new_inferior.
5072 (linux_attach): Likewise.
5073 (linux_low_filter_event): Likewise.
5074 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5075
5076 2015-07-24 Yao Qi <yao.qi@linaro.org>
5077
5078 * linux-low.c (linux_arch_setup): New function.
5079 (linux_low_filter_event): If proc->tdesc is NULL and
5080 proc->attached is true, call the_low_target.arch_setup.
5081 Otherwise, keep status pending, and return.
5082 (linux_resume_one_lwp_throw): Don't call get_pc if
5083 thread->while_stepping isn't NULL. Don't call
5084 get_thread_regcache if proc->tdesc is NULL.
5085 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5086 (linux_target_ops): Install arch_setup.
5087 * server.c (start_inferior): Call the_target->arch_setup.
5088 * target.h (struct target_ops) <arch_setup>: New field.
5089 (target_arch_setup): New marco.
5090 * lynx-low.c (lynx_target_ops): Update.
5091 * nto-low.c (nto_target_ops): Update.
5092 * spu-low.c (spu_target_ops): Update.
5093 * win32-low.c (win32_target_ops): Update.
5094
5095 2015-07-24 Yao Qi <yao.qi@linaro.org>
5096
5097 * linux-low.c (linux_add_process): Don't set
5098 proc->priv->new_inferior.
5099 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5100 (linux_attach): Likewise.
5101
5102 2015-07-24 Yao Qi <yao.qi@linaro.org>
5103
5104 * server.c (start_inferior): Code refactor.
5105
5106 2015-07-24 Yao Qi <yao.qi@linaro.org>
5107
5108 * server.c (process_serial_event): Set general_thread.
5109
5110 2015-07-21 Yao Qi <yao.qi@linaro.org>
5111
5112 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5113 aarch64_linux_get_debug_reg_capacity.
5114
5115 2015-07-17 Yao Qi <yao.qi@linaro.org>
5116
5117 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5118 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5119 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5120 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5121 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5122 (AARCH64_HWP_ALIGNMENT): Likewise.
5123 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5124 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5125 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5126 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5127 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5128 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5129 (struct aarch64_debug_reg_state): Likewise.
5130 (struct arch_lwp_info): Likewise.
5131 (aarch64_align_watchpoint): Likewise.
5132 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5133 (aarch64_watchpoint_length): Likewise.
5134 (aarch64_point_encode_ctrl_reg): Likewise
5135 (aarch64_point_is_aligned): Likewise.
5136 (aarch64_align_watchpoint): Likewise.
5137 (aarch64_linux_set_debug_regs):
5138 (aarch64_dr_state_insert_one_point): Likewise.
5139 (aarch64_dr_state_remove_one_point): Likewise.
5140 (aarch64_handle_breakpoint): Likewise.
5141 (aarch64_handle_aligned_watchpoint): Likewise.
5142 (aarch64_handle_unaligned_watchpoint): Likewise.
5143 (aarch64_handle_watchpoint): Likewise.
5144
5145 2015-07-17 Yao Qi <yao.qi@linaro.org>
5146
5147 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5148 and don't aarch64_get_debug_reg_state. All callers update.
5149 (aarch64_handle_aligned_watchpoint): Likewise.
5150 (aarch64_handle_unaligned_watchpoint): Likewise.
5151 (aarch64_handle_watchpoint): Likewise.
5152 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5153 (aarch64_remove_point): Likewise.
5154
5155 2015-07-17 Yao Qi <yao.qi@linaro.org>
5156
5157 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5158 debug_printf.
5159 (aarch64_handle_unaligned_watchpoint): Likewise.
5160
5161 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5162
5163 Revert the previous 3 commits:
5164 Move gdb_regex* to common/
5165 Move linux_find_memory_regions_full & co.
5166 gdbserver build-id attribute generator
5167
5168 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5169 Jan Kratochvil <jan.kratochvil@redhat.com>
5170
5171 gdbserver build-id attribute generator.
5172 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5173 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5174 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5175 (find_phdr): New.
5176 (get_dynamic): Use find_pdhr to traverse program headers.
5177 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5178 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5179 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5180 (get_hex_build_id): New.
5181 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5182 to reply XML document.
5183
5184 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5185 Jan Kratochvil <jan.kratochvil@redhat.com>
5186
5187 * target.c: Include target/target-utils.h and fcntl.h.
5188 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5189 (target_fileio_read_stralloc): New functions.
5190
5191 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5192
5193 * Makefile.in (OBS): Add gdb_regex.o.
5194 (gdb_regex.o): New.
5195 * config.in: Rebuilt.
5196 * configure: Rebuilt.
5197
5198 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5199 Jan Kratochvil <jan.kratochvil@redhat.com>
5200
5201 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5202 * Makefile.in (OBS): Add target-utils.o.
5203 (linux-maps.o, target-utils.o): New.
5204 * configure.srv (srv_linux_obj): Add linux-maps.o.
5205
5206 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5207
5208 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5209 function, return 1.
5210 (the_low_target): Install it.
5211
5212 2015-07-14 Pedro Alves <palves@redhat.com>
5213
5214 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5215 Instead, ignore ECHILD, and throw an error for other errnos.
5216
5217 2015-07-10 Pedro Alves <palves@redhat.com>
5218
5219 * event-loop.c (struct callback_event) <data>: Change type to
5220 gdb_client_data instance instead of gdb_client_data pointer.
5221 (append_callback_event): Adjust.
5222
5223 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5224
5225 * linux-aarch64-low.c: Add comments for each linux_target_ops
5226 method. Remove comments already covered in target_ops and
5227 linux_target_ops definitions.
5228 (the_low_target): Add comments for each unimplemented method.
5229
5230 2015-07-09 Yao Qi <yao.qi@linaro.org>
5231
5232 * linux-aarch64-low.c (aarch64_regmap): Remove.
5233 (aarch64_usrregs_info): Remove.
5234 (regs_info): Set field usrregs to NULL.
5235
5236 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5237
5238 * linux-low.c: Include "rsp-low.h"
5239 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5240 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5241 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5242 (handle_btrace_enable_pt): New.
5243 (handle_btrace_general_set): Support "pt".
5244 (handle_btrace_conf_general_set): Support "pt:size".
5245
5246 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5247
5248 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5249 Z_PACKET_SW_BP.
5250
5251 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5252
5253 * linux-aarch64-low.c: Remove comment about endianness.
5254 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5255 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5256 memcmp.
5257
5258 2015-06-24 Gary Benson <gbenson@redhat.com>
5259
5260 * linux-i386-ipa.c (stdint.h): Do not include.
5261 * lynx-i386-low.c (stdint.h): Likewise.
5262 * lynx-ppc-low.c (stdint.h): Likewise.
5263 * mem-break.c (stdint.h): Likewise.
5264 * thread-db.c (stdint.h): Likewise.
5265 * tracepoint.c (stdint.h): Likewise.
5266 * win32-low.c (stdint.h): Likewise.
5267
5268 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5269
5270 * server.c (write_qxfer_response): Update call to
5271 remote_escape_output.
5272
5273 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5274 Jan Kratochvil <jan.kratochvil@redhat.com>
5275
5276 Merge multiple hex conversions.
5277 * gdbreplay.c (tohex): Rename to 'fromhex'.
5278 (logchar): Use fromhex.
5279
5280 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5281
5282 * server.c (handle_qxfer_libraries): Set `version' attribute for
5283 <library-list>.
5284
5285 2015-06-10 Gary Benson <gbenson@redhat.com>
5286
5287 * target.h (struct target_ops) <multifs_open>: New field.
5288 <multifs_unlink>: Likewise.
5289 <multifs_readlink>: Likewise.
5290 * linux-low.c (nat/linux-namespaces.h): New include.
5291 (linux_target_ops): Initialize the_target->multifs_open,
5292 the_target->multifs_unlink and the_target->multifs_readlink.
5293 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5294 * hostio.c (hostio_fs_pid): New static variable.
5295 (hostio_handle_new_gdb_connection): New function.
5296 (handle_setfs): Likewise.
5297 (handle_open): Use the_target->multifs_open as appropriate.
5298 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5299 (handle_readlink): Use the_target->multifs_readlink as
5300 appropriate.
5301 (handle_vFile): Handle vFile:setfs packets.
5302 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5303 after target_handle_new_gdb_connection.
5304
5305 2015-06-10 Gary Benson <gbenson@redhat.com>
5306
5307 * configure.ac (AC_CHECK_FUNCS): Add setns.
5308 * config.in: Regenerate.
5309 * configure: Likewise.
5310 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5311 (linux-namespaces.o): New rule.
5312 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5313
5314 2015-06-09 Gary Benson <gbenson@redhat.com>
5315
5316 * hostio.c (handle_open): Process mode argument with
5317 fileio_to_host_mode.
5318
5319 2015-06-01 Yao Qi <yao.qi@linaro.org>
5320
5321 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5322 * linux-x86-low.c: Likewise.
5323
5324 2015-05-28 Don Breazeal <donb@codesourcery.com>
5325
5326 * linux-low.c (handle_extended_wait): Initialize
5327 thread_info.last_resume_kind for new fork children.
5328
5329 2015-05-15 Pedro Alves <palves@redhat.com>
5330
5331 * target.h (target_handle_new_gdb_connection): Rewrite using if
5332 wrapped in do/while.
5333
5334 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5335
5336 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5337 * configure, config.in: Regenerate.
5338 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5339 Declare typedef.
5340
5341 2015-05-12 Don Breazeal <donb@codesourcery.com>
5342
5343 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5344 PTRACE_EVENT_VFORK_DONE.
5345 (linux_low_ptrace_options, extended_event_reported): Add vfork
5346 events.
5347 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5348 and "vforkdone" for RSP 'T' Stop Reply Packet.
5349 * server.h (report_vfork_events): Declare
5350 global variable.
5351
5352 2015-05-12 Don Breazeal <donb@codesourcery.com>
5353
5354 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5355 (the_low_target) <new_fork>: Initialize new member.
5356 * linux-arm-low.c (arm_new_fork): New function.
5357 (the_low_target) <new_fork>: Initialize new member.
5358 * linux-low.c (handle_extended_wait): Call new target function
5359 new_fork.
5360 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5361 * linux-mips-low.c (mips_add_watchpoint): New function
5362 extracted from mips_insert_point.
5363 (the_low_target) <new_fork>: Initialize new member.
5364 (mips_linux_new_fork): New function.
5365 (mips_insert_point): Call mips_add_watchpoint.
5366 * linux-x86-low.c (x86_linux_new_fork): New function.
5367 (the_low_target) <new_fork>: Initialize new member.
5368
5369 2015-05-12 Don Breazeal <donb@codesourcery.com>
5370
5371 * linux-low.c (handle_extended_wait): Implement return value,
5372 rename argument 'event_child' to 'event_lwp', handle
5373 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5374 (linux_low_ptrace_options): New function.
5375 (linux_low_filter_event): Call linux_low_ptrace_options,
5376 use different argument fo linux_enable_event_reporting,
5377 use return value from handle_extended_wait.
5378 (extended_event_reported): New function.
5379 (linux_wait_1): Call extended_event_reported and set
5380 status to report fork events.
5381 (linux_write_memory): Add pid to debug message.
5382 (reset_lwp_ptrace_options_callback): New function.
5383 (linux_handle_new_gdb_connection): New function.
5384 (linux_target_ops): Initialize new structure member.
5385 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5386 * lynx-low.c: Initialize new structure member.
5387 * remote-utils.c (prepare_resume_reply): Implement stop reason
5388 "fork" for "T" stop message.
5389 * server.c (handle_query): Call handle_new_gdb_connection.
5390 * server.h (report_fork_events): Declare global flag.
5391 * target.h (struct target_ops) <handle_new_gdb_connection>:
5392 New member.
5393 (target_handle_new_gdb_connection): New macro.
5394 * win32-low.c: Initialize new structure member.
5395
5396 2015-05-12 Don Breazeal <donb@codesourcery.com>
5397
5398 * mem-break.c (APPEND_TO_LIST): Define macro.
5399 (clone_agent_expr): New function.
5400 (clone_one_breakpoint): New function.
5401 (clone_all_breakpoints): New function.
5402 * mem-break.h: Declare new functions.
5403
5404 2015-05-12 Don Breazeal <donb@codesourcery.com>
5405
5406 * linux-low.c (linux_supports_fork_events): New function.
5407 (linux_supports_vfork_events): New function.
5408 (linux_target_ops): Initialize new structure members.
5409 (initialize_low): Call linux_check_ptrace_features.
5410 * lynx-low.c (lynx_target_ops): Initialize new structure
5411 members.
5412 * server.c (report_fork_events, report_vfork_events):
5413 New global flags.
5414 (handle_query): Add new features to qSupported packet and
5415 response.
5416 (captured_main): Initialize new global variables.
5417 * target.h (struct target_ops) <supports_fork_events>:
5418 New member.
5419 <supports_vfork_events>: New member.
5420 (target_supports_fork_events): New macro.
5421 (target_supports_vfork_events): New macro.
5422 * win32-low.c (win32_target_ops): Initialize new structure
5423 members.
5424
5425 2015-05-12 Gary Benson <gbenson@redhat.com>
5426
5427 * server.c (handle_qxfer_exec_file): Use current process
5428 if annex is empty.
5429
5430 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5431
5432 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5433 Remove HAVE_PTRACE_GETREGS conditionals.
5434 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5435 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5436
5437 2015-05-08 Yao Qi <yao.qi@linaro.org>
5438
5439 * linux-low.c (linux_supports_conditional_breakpoints): New
5440 function.
5441 (linux_target_ops): Install new target method.
5442 * lynx-low.c (lynx_target_ops): Install NULL hook for
5443 supports_conditional_breakpoints.
5444 * nto-low.c (nto_target_ops): Likewise.
5445 * spu-low.c (spu_target_ops): Likewise.
5446 * win32-low.c (win32_target_ops): Likewise.
5447 * server.c (handle_query): Check
5448 target_supports_conditional_breakpoints.
5449 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5450 New field.
5451 (target_supports_conditional_breakpoints): New macro.
5452
5453 2015-05-06 Pedro Alves <palves@redhat.com>
5454
5455 PR server/18081
5456 * server.c (start_inferior): If the process exits, mourn it.
5457
5458 2015-04-21 Gary Benson <gbenson@redhat.com>
5459
5460 * hostio.c (fileio_open_flags_to_host): Factored out to
5461 fileio_to_host_openflags in common/fileio.c. Single use
5462 updated.
5463
5464 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5465
5466 * linux-xtensa-low.c (xtensa_fill_gregset)
5467 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5468 XCHAL_HAVE_LOOP.
5469
5470 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5471
5472 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5473 (regs_info): Replace usrregs pointer with NULL.
5474
5475 2015-04-17 Gary Benson <gbenson@redhat.com>
5476
5477 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5478 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5479 * server.c (handle_qxfer_exec_file): New function.
5480 (qxfer_packets): Add exec-file entry.
5481 (handle_query): Report qXfer:exec-file:read as supported packet.
5482
5483 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5484
5485 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5486
5487 2015-04-09 Gary Benson <gbenson@redhat.com>
5488
5489 * hostio-errno.c (errno_to_fileio_error): Remove function.
5490 Update caller to use remote_fileio_to_fio_error.
5491
5492 2015-04-09 Yao Qi <yao.qi@linaro.org>
5493
5494 * linux-low.c (linux_insert_point): Call
5495 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5496 (linux_remove_point): Call remove_memory_breakpoint if type is
5497 raw_bkpt_type_sw.
5498 * linux-x86-low.c (x86_insert_point): Don't call
5499 insert_memory_breakpoint.
5500 (x86_remove_point): Don't call remove_memory_breakpoint.
5501
5502 2015-04-01 Pedro Alves <palves@redhat.com>
5503 Cleber Rosa <crosa@redhat.com>
5504
5505 * server.c (gdbserver_usage): Reorganize and extend the usage
5506 message.
5507
5508 2015-03-24 Pedro Alves <palves@redhat.com>
5509
5510 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5511 output. Also dump TRAP_TRACE.
5512 (linux_low_filter_event): In debug output, distinguish a
5513 resume_stop SIGSTOP from a delayed SIGSTOP.
5514
5515 2015-03-24 Gary Benson <gbenson@redhat.com>
5516
5517 * linux-x86-low.c (x86_linux_new_thread): Moved to
5518 nat/x86-linux.c.
5519 (x86_linux_prepare_to_resume): Likewise.
5520
5521 2015-03-24 Gary Benson <gbenson@redhat.com>
5522
5523 * Makefile.in (x86-linux-dregs.o): New rule.
5524 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5525 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5526 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5527 (x86_linux_dr_get): Likewise.
5528 (x86_linux_dr_set): Likewise.
5529 (update_debug_registers_callback): Likewise.
5530 (x86_linux_dr_set_addr): Likewise.
5531 (x86_linux_dr_get_addr): Likewise.
5532 (x86_linux_dr_set_control): Likewise.
5533 (x86_linux_dr_get_control): Likewise.
5534 (x86_linux_dr_get_status): Likewise.
5535 (x86_linux_update_debug_registers): Likewise.
5536
5537 2015-03-24 Gary Benson <gbenson@redhat.com>
5538
5539 * linux-x86-low.c (x86_linux_update_debug_registers):
5540 New function, factored out from...
5541 (x86_linux_prepare_to_resume): ...this.
5542
5543 2015-03-24 Gary Benson <gbenson@redhat.com>
5544
5545 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5546 (x86_linux_dr_set): Likewise.
5547 (update_debug_registers_callback): Likewise.
5548 (x86_linux_dr_set_addr): Likewise.
5549 (x86_linux_dr_get_addr): Likewise.
5550 (x86_linux_dr_set_control): Likewise.
5551 (x86_linux_dr_get_control): Likewise.
5552 (x86_linux_dr_get_status): Likewise.
5553 (x86_linux_prepare_to_resume): Likewise.
5554
5555 2015-03-24 Gary Benson <gbenson@redhat.com>
5556
5557 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5558 Use perror_with_name. Pass string through gettext.
5559 (x86_linux_dr_set): Likewise.
5560
5561 2015-03-24 Gary Benson <gbenson@redhat.com>
5562
5563 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5564 (x86_linux_dr_set_addr): ...this.
5565 (x86_dr_low_get_addr): Rename to...
5566 (x86_linux_dr_get_addr): ...this.
5567 (x86_dr_low_set_control): Rename to...
5568 (x86_linux_dr_set_control): ...this.
5569 (x86_dr_low_get_control): Rename to...
5570 (x86_linux_dr_get_control): ...this.
5571 (x86_dr_low_get_status): Rename to...
5572 (x86_linux_dr_get_status): ...this.
5573 (x86_dr_low): Update with new function names.
5574
5575 2015-03-24 Gary Benson <gbenson@redhat.com>
5576
5577 * Makefile.in (x86-linux.o): New rule.
5578 * configure.srv: Add x86-linux.o to relevant targets.
5579 * linux-low.c (lwp_set_arch_private_info): New function.
5580 (lwp_arch_private_info): Likewise.
5581 * linux-x86-low.c: Include nat/x86-linux.h.
5582 (arch_lwp_info): Removed structure.
5583 (update_debug_registers_callback):
5584 Use lwp_set_debug_registers_changed.
5585 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5586 and lwp_set_debug_registers_changed.
5587 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5588
5589 2015-03-24 Gary Benson <gbenson@redhat.com>
5590
5591 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5592 * linux-arm-low.c (arm_new_thread): Likewise.
5593 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5594 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5595 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5596 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5597
5598 2015-03-24 Gary Benson <gbenson@redhat.com>
5599
5600 * linux-low.c (ptid_of_lwp): New function.
5601 (lwp_is_stopped): Likewise.
5602 (lwp_stop_reason): Likewise.
5603 * linux-x86-low.c (update_debug_registers_callback):
5604 Use lwp_is_stopped.
5605 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5606 lwp_stop_reason.
5607
5608 2015-03-24 Gary Benson <gbenson@redhat.com>
5609
5610 * linux-low.h (linux_stop_lwp): Remove declaration.
5611
5612 2015-03-24 Gary Benson <gbenson@redhat.com>
5613
5614 * linux-low.h: Include nat/linux-nat.h.
5615 * linux-low.c (iterate_over_lwps_args): New structure.
5616 (iterate_over_lwps_filter): New function.
5617 (iterate_over_lwps): Likewise.
5618 * linux-x86-low.c (update_debug_registers_callback):
5619 Update signature to what iterate_over_lwps expects.
5620 Remove PID check that iterate_over_lwps now performs.
5621 (x86_dr_low_set_addr): Use iterate_over_lwps.
5622 (x86_dr_low_set_control): Likewise.
5623
5624 2015-03-24 Gary Benson <gbenson@redhat.com>
5625
5626 * linux-x86-low.c (x86_debug_reg_state): New function.
5627 (x86_linux_prepare_to_resume): Use the above.
5628
5629 2015-03-24 Gary Benson <gbenson@redhat.com>
5630
5631 * linux-low.c (current_lwp_ptid): New function.
5632 * linux-x86-low.c: Include nat/linux-nat.h.
5633 (x86_dr_low_get_addr): Use current_lwp_ptid.
5634 (x86_dr_low_get_control): Likewise.
5635 (x86_dr_low_get_status): Likewise.
5636
5637 2015-03-20 Pedro Alves <palves@redhat.com>
5638
5639 * tracepoint.c (cmd_qtstatus): Make "str" const.
5640
5641 2015-03-20 Pedro Alves <palves@redhat.com>
5642
5643 * server.c (handle_general_set): Make "req_str" const.
5644
5645 2015-03-19 Pedro Alves <palves@redhat.com>
5646
5647 * linux-low.c (linux_resume_one_lwp): Rename to ...
5648 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5649 instead call perror_with_name.
5650 (check_ptrace_stopped_lwp_gone): New function.
5651 (linux_resume_one_lwp): Reimplement as wrapper around
5652 linux_resume_one_lwp_throw that swallows errors if the LWP is
5653 gone.
5654
5655 2015-03-19 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (count_events_callback, select_event_lwp_callback):
5658 No longer check whether the thread has resume_stop as last resume
5659 kind.
5660
5661 2015-03-19 Pedro Alves <palves@redhat.com>
5662
5663 * linux-low.c (count_events_callback, select_event_lwp_callback):
5664 Use the lwp's status_pending_p field, not the thread's.
5665
5666 2015-03-19 Pedro Alves <palves@redhat.com>
5667
5668 * linux-low.c (select_event_lwp_callback): Update comments to
5669 no longer mention SIGTRAP.
5670
5671 2015-03-18 Gary Benson <gbenson@redhat.com>
5672
5673 * server.c (handle_query): Do not report vFile:fstat as supported.
5674
5675 2015-03-11 Gary Benson <gbenson@redhat.com>
5676
5677 * hostio.c (sys/types.h): New include.
5678 (sys/stat.h): Likewise.
5679 (common-remote-fileio.h): Likewise.
5680 (handle_fstat): New function.
5681 (handle_vFile): Handle vFile:fstat packets.
5682
5683 2015-03-11 Gary Benson <gbenson@redhat.com>
5684
5685 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5686 struct stat.st_blocks and struct stat.st_blksize.
5687 * configure: Regenerate.
5688 * config.in: Likewise.
5689 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5690 (OBS): Add common-remote-fileio.o.
5691 (common-remote-fileio.o): New rule.
5692
5693 2015-03-09 Pedro Alves <palves@redhat.com>
5694
5695 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5696 'struct sockaddr' pointer in 'accept' call.
5697
5698 2015-03-09 Pedro Alves <palves@redhat.com>
5699
5700 Revert:
5701 2015-03-07 Pedro Alves <palves@redhat.com>
5702 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5703 or <winsock2.h> here. Instead include "gdb_socket.h".
5704 (remote_open): Use union gdb_sockaddr_u.
5705 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5706 or <winsock2.h> here. Instead include "gdb_socket.h".
5707 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5708 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5709 or <sys/un.h>.
5710 (init_named_socket, gdb_agent_helper_thread): Use union
5711 gdb_sockaddr_u.
5712
5713 2015-03-07 Pedro Alves <palves@redhat.com>
5714
5715 * configure.ac (build_warnings): Move
5716 -Wdeclaration-after-statement to the C-specific set.
5717 * configure: Regenerate.
5718
5719 2015-03-07 Pedro Alves <palves@redhat.com>
5720
5721 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5722 or <winsock2.h> here. Instead include "gdb_socket.h".
5723 (remote_open): Use union gdb_sockaddr_u.
5724 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5725 or <winsock2.h> here. Instead include "gdb_socket.h".
5726 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5727 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5728 or <sys/un.h>.
5729 (init_named_socket, gdb_agent_helper_thread): Use union
5730 gdb_sockaddr_u.
5731
5732 2015-03-07 Pedro Alves <palves@redhat.com>
5733
5734 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5735 instead.
5736
5737 2015-03-06 Yao Qi <yao.qi@linaro.org>
5738
5739 * linux-aarch64-low.c (aarch64_insert_point): Use
5740 show_debug_regs as a boolean.
5741 (aarch64_remove_point): Likewise.
5742
5743 2015-03-05 Pedro Alves <palves@redhat.com>
5744
5745 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5746 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5747 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5748 * nto-low.c (nto_target_ops): Likewise.
5749 * spu-low.c (spu_target_ops): Likewise.
5750 * win32-low.c (win32_target_ops): Likewise.
5751
5752 2015-03-04 Pedro Alves <palves@redhat.com>
5753
5754 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5755 Decide whether a breakpoint triggered based on the SIGTRAP's
5756 siginfo.si_code.
5757 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5758 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5759 (linux_low_filter_event): Check for breakpoints before checking
5760 watchpoints.
5761 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5762 siginfo.si_code.
5763 (linux_stopped_by_sw_breakpoint)
5764 (linux_supports_stopped_by_sw_breakpoint)
5765 (linux_stopped_by_hw_breakpoint)
5766 (linux_supports_stopped_by_hw_breakpoint): New functions.
5767 (linux_target_ops): Install new target methods.
5768
5769 2015-03-04 Pedro Alves <palves@redhat.com>
5770
5771 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5772 * server.c (swbreak_feature, hwbreak_feature): New globals.
5773 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5774 (captured_main): Clear swbreak_feature and hwbreak_feature.
5775 * server.h (swbreak_feature, hwbreak_feature): Declare.
5776 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5777 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5778 supports_stopped_by_hw_breakpoint>: New fields.
5779 (target_supports_stopped_by_sw_breakpoint)
5780 (target_stopped_by_sw_breakpoint)
5781 (target_supports_stopped_by_hw_breakpoint)
5782 (target_stopped_by_hw_breakpoint): Declare.
5783
5784 2015-03-04 Pedro Alves <palves@redhat.com>
5785
5786 enum lwp_stop_reason -> enum target_stop_reason
5787 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5788 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5789 (linux_wait_1, stuck_in_jump_pad_callback)
5790 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5791 (linux_stopped_by_watchpoint):
5792 * linux-low.h (enum lwp_stop_reason): Delete.
5793 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5794 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5795
5796 2015-03-04 Yao Qi <yao.qi@linaro.org>
5797
5798 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5799
5800 2015-03-03 Gary Benson <gbenson@redhat.com>
5801
5802 * hostio.c (handle_vFile): Fix prefix lengths.
5803
5804 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5805
5806 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5807 ptr_bits.
5808
5809 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5810
5811 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5812 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5813 (clean): Add "rm -f" for above C files.
5814 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5815 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5816 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5817 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5818 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5819 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5820 (init_registers_s390x_vx_linux64)
5821 (init_registers_s390x_tevx_linux64)
5822 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5823 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5824 declarations.
5825 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5826 (s390_store_vxrs_high): New functions.
5827 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5828 NT_S390_VXRS_HIGH.
5829 (s390_arch_setup): Add logic for selecting one of the new target
5830 descriptions. Activate the new vector regsets if applicable.
5831 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5832 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5833 and init_registers_s390x_tevx_linux64.
5834
5835 2015-03-01 Pedro Alves <palves@redhat.com>
5836
5837 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5838 parameter.
5839
5840 2015-02-27 Pedro Alves <palves@redhat.com>
5841
5842 * linux-x86-low.c (u_debugreg_offset): New function.
5843 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5844
5845 2015-02-27 Pedro Alves <palves@redhat.com>
5846
5847 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5848 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5849 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5850 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5851 (ps_lsetfpregs, ps_getpid)
5852 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5853 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5854 (ps_lsetxregs, ps_plog): Declare.
5855
5856 2015-02-27 Pedro Alves <palves@redhat.com>
5857
5858 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5859 IP_AGENT_EXPORT_FUNC.
5860 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5861 IP_AGENT_EXPORT_FUNC.
5862 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5863 (IP_AGENT_EXPORT): Delete.
5864 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5865 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5866 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5867 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5868 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5869 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5870 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5871 (traceframe_read_count, traceframe_write_count)
5872 (traceframes_created, trace_state_variables, get_raw_reg)
5873 (get_trace_state_variable_value, set_trace_state_variable_value)
5874 (ust_loaded, helper_thread_id, cmd_buf): Use
5875 IPA_SYM_EXPORTED_NAME.
5876 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5877 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5878 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5879 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5880 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5881 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5882 EXTERN_C_PUSH/EXTERN_C_POP.
5883 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5884 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5885 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5886 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5887 (traceframe_write_count, traceframe_read_count)
5888 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5889 (about_to_request_buffer_space, get_trace_state_variable_value)
5890 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5891 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5892 EXTERN_C_PUSH/EXTERN_C_POP.
5893 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5894 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5895 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5896 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5897 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5898 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5899 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5900 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5901 Define.
5902 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5903 (IP_AGENT_EXPORT_VAR_DECL): Define.
5904 (tracing): Declare.
5905 (gdb_agent_get_raw_reg): Declare.
5906
5907 2015-02-27 Tom Tromey <tromey@redhat.com>
5908 Pedro Alves <palves@redhat.com>
5909
5910 Rename symbols whose names are reserved C++ keywords throughout.
5911
5912 2015-02-27 Pedro Alves <palves@redhat.com>
5913
5914 * Makefile.in (COMPILER): New, get it from autoconf.
5915 (CXX): Get from autoconf instead.
5916 (COMPILE.pre): Use COMPILER.
5917 (CC-LD): Rename to ...
5918 (CC_LD): ... this. Use COMPILER.
5919 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5920 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5921 * acinclude.m4: Include build-with-cxx.m4.
5922 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5923 Disable -Werror by default if building in C++ mode.
5924 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5925 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5926 the C++ compiler. Save/restore CXXFLAGS too.
5927 * configure: Regenerate.
5928
5929 2015-02-27 Pedro Alves <palves@redhat.com>
5930
5931 * acinclude.m4: Include libiberty.m4.
5932 * configure.ac: Call libiberty_INIT.
5933 * config.in, configure: Regenerate.
5934
5935 2015-02-26 Pedro Alves <palves@redhat.com>
5936
5937 * linux-low.c (linux_wait_1): When incrementing the PC past a
5938 program breakpoint always use the_low_target.breakpoint_len as
5939 increment, rather than the maximum between that and
5940 the_low_target.decr_pc_after_break.
5941
5942 2015-02-23 Pedro Alves <palves@redhat.com>
5943
5944 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5945 thread was doing a step-over; always adjust the PC if
5946 we stepped over a permanent breakpoint.
5947 (linux_wait_1): If we stepped over breakpoint that was on top of a
5948 permanent breakpoint, manually advance the PC past it.
5949
5950 2015-02-23 Pedro Alves <palves@redhat.com>
5951
5952 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5953 modes.
5954 (x86_fill_gregset, x86_store_gregset): Use it when handling
5955 $orig_eax.
5956
5957 2015-02-20 Pedro Alves <palves@redhat.com>
5958
5959 * thread-db.c: Include "nat/linux-procfs.h".
5960 (thread_db_init): Skip listing new threads if the kernel supports
5961 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5962
5963 2015-02-20 Pedro Alves <palves@redhat.com>
5964
5965 * linux-low.c (status_pending_p_callback): Use ptid_match.
5966
5967 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5968
5969 PR breakpoints/16812
5970 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5971 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5972 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5973
5974 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5975
5976 PR breakpoints/15956
5977 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5978
5979 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5980
5981 * linux-low.c (linux_low_btrace_conf): Print size.
5982 * server.c (handle_btrace_conf_general_set): New.
5983 (hanle_general_set): Call handle_btrace_conf_general_set.
5984 (handle_query): Report Qbtrace-conf:bts:size as supported.
5985
5986 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5987
5988 * linux-low.c (linux_low_enable_btrace): Update parameters.
5989 (linux_low_btrace_conf): New.
5990 (linux_target_ops)<to_btrace_conf>: Initialize.
5991 * server.c (current_btrace_conf): New.
5992 (handle_btrace_enable): Rename to ...
5993 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5994 to target_enable_btrace. Update comment. Update users.
5995 (handle_qxfer_btrace_conf): New.
5996 (qxfer_packets): Add btrace-conf entry.
5997 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5998 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5999 (target_ops)<read_btrace_conf>: New.
6000 (target_enable_btrace): Update parameters.
6001 (target_read_btrace_conf): New.
6002
6003 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6004
6005 * server.c (handle_btrace_general_set): Remove call to
6006 target_supports_btrace.
6007 (supported_btrace_packets): New.
6008 (handle_query): Call supported_btrace_packets.
6009 * target.h: include btrace-common.h.
6010 (btrace_target_info): Removed.
6011 (supports_btrace, target_supports_btrace): Update parameters.
6012
6013 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6014
6015 * Makefile.in (SFILES): Add common/btrace-common.c.
6016 (OBS): Add common/btrace-common.o.
6017 (btrace-common.o): Add build rules.
6018 * linux-low: Include btrace-common.h.
6019 (linux_low_read_btrace): Use struct btrace_data. Call
6020 btrace_data_init and btrace_data_fini.
6021
6022 2015-02-06 Pedro Alves <palves@redhat.com>
6023
6024 * thread-db.c (find_new_threads_callback): Add debug output.
6025
6026 2015-02-04 Pedro Alves <palves@redhat.com>
6027
6028 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6029 (resume_stopped_resumed_lwps): New function.
6030 (linux_wait_for_event_filtered): Use it.
6031
6032 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6033
6034 * Makefile.in (SFILES): Add linux-personality.c.
6035 (linux-personality.o): New rule.
6036 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6037 list of objects to be built.
6038 * linux-low.c: Include nat/linux-personality.h.
6039 (linux_create_inferior): Remove code to disable address space
6040 randomization (moved to ../nat/linux-personality.c). Create
6041 cleanup to disable address space randomization.
6042
6043 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6044
6045 * Makefile.in (posix-strerror.o): New rule.
6046 (mingw-strerror.o): Likewise.
6047 * configure: Regenerated.
6048 * configure.ac: Source file ../common/common.host. Initialize new
6049 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6050
6051 2015-01-14 Yao Qi <yao@codesourcery.com>
6052
6053 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6054 (ppc-linux.o): New rule.
6055 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6056 * configure.ac: AC_CHECK_FUNCS(getauxval).
6057 * config.in: Re-generated.
6058 * configure: Re-generated.
6059 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6060 ppc64_64bit_inferior_p
6061
6062 2015-01-14 Yao Qi <yao@codesourcery.com>
6063
6064 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6065 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6066 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6067 (PT_ORIG_R3, PT_TRAP): Likewise.
6068 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6069 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6070 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6071
6072 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6073
6074 * i387-fp.c (i387_cache_to_xsave): In look over
6075 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6076 zmmh_low_space field by use of zmmh_high_space.
6077
6078 2015-01-09 Pedro Alves <palves@redhat.com>
6079
6080 * linux-low.c (step_over_bkpt): Move higher up in the file.
6081 (handle_extended_wait): Don't store the stop_pc here.
6082 (get_stop_pc): Adjust comments and rename to ...
6083 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6084 stopped for a software breakpoint or hardware breakpoint.
6085 (thread_still_has_status_pending_p): New function.
6086 (status_pending_p_callback): Use
6087 thread_still_has_status_pending_p. If the event is no longer
6088 interesting, resume the LWP.
6089 (handle_tracepoints): Add assert.
6090 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6091 (wstatus_maybe_breakpoint): New function.
6092 (cancel_breakpoint): Delete function.
6093 (check_stopped_by_watchpoint): New function, factored out from
6094 linux_low_filter_event.
6095 (lp_status_maybe_breakpoint): Delete function.
6096 (linux_low_filter_event): Remove filter_ptid argument.
6097 Leave thread group exits pending here. Store the LWP's stop PC.
6098 Always leave events pending.
6099 (linux_wait_for_event_filtered): Pull all events out of the
6100 kernel, and leave them all pending.
6101 (count_events_callback, select_event_lwp_callback): Consider all
6102 events.
6103 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6104 (select_event_lwp): Only give preference to the stepping LWP in
6105 all-stop mode. Adjust comments.
6106 (ignore_event): New function.
6107 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6108 references to cancel_breakpoints. Adjust to renames. Also give
6109 equal priority to all LWPs that have had events in non-stop mode.
6110 If reporting a software breakpoint event, unadjust the LWP's PC.
6111 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6112 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6113 Adjust.
6114 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6115 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6116 (linux_stopped_by_watchpoint): Adjust.
6117 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6118 * linux-low.h (enum lwp_stop_reason): New.
6119 (struct lwp_info) <stop_pc>: Adjust comment.
6120 <stopped_by_watchpoint>: Delete field.
6121 <stop_reason>: New field.
6122 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6123 * mem-break.c (software_breakpoint_inserted_here)
6124 (hardware_breakpoint_inserted_here): New function.
6125 * mem-break.h (software_breakpoint_inserted_here)
6126 (hardware_breakpoint_inserted_here): Declare.
6127 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6128 (cancel_breakpoints): Delete.
6129 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6130 (upload_fast_traceframes): Remove references to
6131 cancel_breakpoints.
6132
6133 2015-01-09 Pedro Alves <palves@redhat.com>
6134
6135 * thread-db.c (find_new_threads_callback): Ignore thread if the
6136 kernel thread ID is -1.
6137
6138 2015-01-09 Pedro Alves <palves@redhat.com>
6139
6140 * linux-low.c (linux_attach_fail_reason_string): Move to
6141 nat/linux-ptrace.c, and rename.
6142 (linux_attach_lwp): Update comment.
6143 (attach_proc_task_lwp_callback): New function.
6144 (linux_attach): Adjust to rename and use
6145 linux_proc_attach_tgid_threads.
6146 (linux_attach_fail_reason_string): Delete declaration.
6147
6148 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6149
6150 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6151 * server.c (gdbserver_version): Likewise.
6152
6153 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6154
6155 * remote-utils.c: Include ctype.h.
6156 (input_interrupt): Explicitly handle the case when the char
6157 received is the NUL byte. Improve the printing of non-ASCII
6158 characters.
6159
6160 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6161
6162 * linux-low.c (linux_low_filter_event): Update call to
6163 linux_enable_event_reporting following the addition of
6164 a new parameter to that function.
6165
6166 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6167
6168 PR server/17457
6169 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6170 (AARCH64_FPCR_REGNO): Likewise.
6171 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6172 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6173 (aarch64_store_fpregset): Likewise.
6174
6175 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6176
6177 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6178 Remove FIXME comment about assumption about N.
6179
6180 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6181
6182 * configure.ac: If large-file support is disabled in GDBserver,
6183 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6184 * configure: Regenerate.
6185
6186 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6187
6188 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6189 warning upon ENODATA from ptrace.
6190 * linux-s390-low.c (s390_store_tdb): New.
6191 (s390_regsets): Add regset for NT_S390_TDB.
6192
6193 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6194
6195 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6196 without a fill_function.
6197 * linux-s390-low.c (s390_fill_last_break): Remove.
6198 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6199 (s390_arch_setup): Use regset's size instead of fill_function for
6200 loop end condition.
6201
6202 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6203
6204 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6205 the regset's store function when ptrace returned an error.
6206 * regcache.c (get_thread_regcache): Invalidate register cache
6207 before fetching inferior's registers.
6208
6209 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6210
6211 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6212 while-loop as for-loop.
6213 (regsets_store_inferior_registers): Likewise.
6214
6215 2014-11-28 Yao Qi <yao@codesourcery.com>
6216
6217 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6218 * config.in, configure: Re-generate.
6219 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6220 is defined.
6221
6222 2014-11-21 Yao Qi <yao@codesourcery.com>
6223
6224 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6225 (AC_CHECK_HEADERS): Remove malloc.h.
6226 * configure: Re-generated.
6227 * config.in: Re-generated.
6228 * server.h: Don't include alloca.h and malloc.h.
6229 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6230 Don't include malloc.h.
6231
6232 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6233
6234 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6235 corresponding ERRNO check in same block.
6236
6237 2014-11-12 Pedro Alves <palves@redhat.com>
6238
6239 * server.c (cont_thread): Update comment.
6240 (start_inferior, attach_inferior): No longer clear cont_thread.
6241 (handle_v_cont): No longer set cont_thread.
6242 (captured_main): Clear cont_thread each time a GDB connects.
6243
6244 2014-11-12 Pedro Alves <palves@redhat.com>
6245
6246 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6247 thread, and don't resume all threads if the Hc thread has exited.
6248
6249 2014-11-12 Pedro Alves <palves@redhat.com>
6250
6251 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6252 the process group instead of to a specific LWP.
6253
6254 2014-10-15 Pedro Alves <palves@redhat.com>
6255
6256 PR server/17487
6257 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6258 parameter.
6259 (arm_set_thread_context): Delete.
6260 (the_low_target): Adjust.
6261 * win32-i386-low.c (debug_registers_changed)
6262 (debug_registers_used): Delete.
6263 (update_debug_registers_callback): New function.
6264 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6265 needing to update their debug registers.
6266 (win32_get_current_dr): New function.
6267 (x86_dr_low_get_addr, x86_dr_low_get_control)
6268 (x86_dr_low_get_status): Fetch the debug register from the thread
6269 record's context.
6270 (i386_initial_stuff): Adjust.
6271 (i386_get_thread_context): Remove current_event parameter. Don't
6272 clear debug_registers_changed nor copy DR values to
6273 debug_reg_state.
6274 (i386_set_thread_context): Delete.
6275 (i386_prepare_to_resume): New function.
6276 (i386_thread_added): Mark the thread as needing to update irs
6277 debug registers.
6278 (the_low_target): Remove i386_set_thread_context and install
6279 i386_prepare_to_resume.
6280 * win32-low.c (win32_get_thread_context): Adjust.
6281 (win32_set_thread_context): Use SetThreadContext
6282 directly.
6283 (win32_prepare_to_resume): New function.
6284 (win32_require_context): New function, factored out from ...
6285 (thread_rec): ... this.
6286 (continue_one_thread): Call win32_prepare_to_resume on each thread
6287 we're about to continue.
6288 (win32_resume): Call win32_prepare_to_resume on the event thread.
6289 * win32-low.h (struct win32_thread_info)
6290 <debug_registers_changed>: New field.
6291 (struct win32_target_ops): Change prototype of set_thread_context,
6292 delete set_thread_context and add prepare_to_resume.
6293 (win32_require_context): New declaration.
6294
6295 2014-10-08 Gary Benson <gbenson@redhat.com>
6296
6297 * server.h: Do not include common-exceptions.h.
6298
6299 2014-10-08 Gary Benson <gbenson@redhat.com>
6300
6301 * server.h: Do not include cleanups.h.
6302
6303 2014-09-30 James Hogan <james.hogan@imgtec.com>
6304
6305 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6306 mips64-dsp-linux.c.
6307
6308 2014-09-23 Yao Qi <yao@codesourcery.com>
6309
6310 * linux-low.c (lp_status_maybe_breakpoint): New function.
6311 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6312 (count_events_callback): Likewise.
6313 (select_event_lwp_callback): Likewise.
6314 (cancel_breakpoints_callback): Likewise.
6315
6316 2014-09-19 Don Breazeal <donb@codesourcery.com>
6317
6318 * linux-low.c (handle_extended_wait): Call
6319 linux_ptrace_get_extended_event.
6320 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6321 linux_is_extended_waitstatus.
6322
6323 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6324
6325 * Makefile.in (CPPFLAGS): Define.
6326 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6327 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6328
6329 2014-09-16 Gary Benson <gbenson@redhat.com>
6330
6331 * inferiors.h (current_inferior): Renamed as...
6332 (current_thread): New variable. All uses updated.
6333 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6334 (maybe_move_out_of_jump_pad): Likewise.
6335 (cancel_breakpoint): Likewise.
6336 (linux_low_filter_event): Likewise.
6337 (wait_for_sigstop): Likewise.
6338 (linux_resume_one_lwp): Likewise.
6339 (need_step_over_p): Likewise.
6340 (start_step_over): Likewise.
6341 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6342 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6343 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6344 and save_inferior as saved_thread.
6345 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6346 saved_thread.
6347 (regcache_invalidate_thread): Likewise.
6348 * remote-utils.c (prepare_resume_reply): Likewise.
6349 * thread-db.c (thread_db_get_tls_address): Likewise.
6350 (disable_thread_event_reporting): Likewise.
6351 (remove_thread_event_breakpoints): Likewise.
6352 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6353 as saved_thread.
6354 * target.h (set_desired_inferior): Renamed as...
6355 (set_desired_thread): New declaration. All uses updated.
6356 * server.c (myresume): Updated comment to reference thread instead
6357 of inferior.
6358 (handle_serial_event): Likewise.
6359 (handle_target_event): Likewise.
6360
6361 2014-09-12 Tom Tromey <tromey@redhat.com>
6362 Gary Benson <gbenson@redhat.com>
6363
6364 * regcache.h: Include common-regcache.h.
6365 (regcache_read_pc): Don't declare.
6366 * regcache.c (get_thread_regcache_for_ptid): New function.
6367
6368 2014-09-11 Tom Tromey <tromey@redhat.com>
6369 Gary Benson <gbenson@redhat.com>
6370
6371 * symbol.c: New file.
6372 * Makefile.in (SFILES): Add symbol.c.
6373 (OBS): Add symbol.o.
6374
6375 2014-09-11 Gary Benson <gbenson@redhat.com>
6376
6377 * target.c (target_stop_ptid, target_continue_ptid): New
6378 functions.
6379
6380 2014-09-11 Tom Tromey <tromey@redhat.com>
6381 Gary Benson <gbenson@redhat.com>
6382
6383 * target.h: Include target/target.h.
6384 * target.c (target_read_memory, target_read_uint32)
6385 (target_write_memory): New functions.
6386
6387 2014-09-11 Gary Benson <gbenson@redhat.com>
6388
6389 * server.h (debug_hw_points): Don't declare.
6390 * server.c (debug_hw_points): Don't define. Replace all uses
6391 with show_debug_regs.
6392 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6393 all uses with show_debug_regs.
6394
6395 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6396
6397 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6398 endianness into account.
6399 (ppc_supply_ptrace_register): Likewise.
6400
6401 2014-09-03 James Hogan <james.hogan@imgtec.com>
6402
6403 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6404 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6405
6406 2014-09-03 Gary Benson <gbenson@redhat.com>
6407
6408 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6409 ALL_DEBUG_ADDRESS_REGISTERS.
6410
6411 2014-09-02 Gary Benson <gbenson@redhat.com>
6412
6413 * i386-low.h: Renamed as...
6414 * x86-low.h: New file. All type, function and variable name
6415 prefixes changed from "i386_" to "x86_". All references updated.
6416 * i386-low.c: Renamed as...
6417 * x86-low.c: New file. All type, function and variable name
6418 prefixes changed from "i386_" to "x86_". All references updated.
6419
6420 2014-09-02 Gary Benson <gbenson@redhat.com>
6421
6422 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6423 (x86_linux_new_thread): Likewise.
6424
6425 2014-08-29 Gary Benson <gbenson@redhat.com>
6426
6427 * server.h (setjmp.h): Do not include.
6428 (toplevel): Do not declare.
6429 (common-exceptions.h): Include.
6430 (cleanups.h): Likewise.
6431 * server.c (toplevel): Do not define.
6432 (exit_code): New static global.
6433 (detach_or_kill_for_exit_cleanup): New function.
6434 (main): New function. Original main renamed to...
6435 (captured_main): New function.
6436 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6437
6438 2014-08-29 Gary Benson <gbenson@redhat.com>
6439
6440 * Makefile.in (SFILES): Add common/common-exceptions.c.
6441 (OBS): Add common-exceptions.o.
6442 (common-exceptions.o): New rule.
6443 * utils.c (prepare_to_throw_exception): New function.
6444
6445 2014-08-29 Gary Benson <gbenson@redhat.com>
6446
6447 * config.in: Regenerate.
6448 * configure: Likewise.
6449
6450 2014-08-29 Gary Benson <gbenson@redhat.com>
6451
6452 * Makefile.in (SFILES): Add common/cleanups.c.
6453 (OBS): cleanups.o.
6454 (cleanups.o): New rule.
6455
6456 2014-08-29 Gary Benson <gbenson@redhat.com>
6457
6458 * utils.c (internal_vwarning): New function.
6459
6460 2014-08-28 Gary Benson <gbenson@redhat.com>
6461
6462 * utils.h (fatal): Remove declaration.
6463 * utils.c (fatal): Remove function.
6464
6465 2014-08-28 Gary Benson <gbenson@redhat.com>
6466
6467 * tracepoint.c (gdb_agent_init): Replace fatal with
6468 perror_with_name.
6469 (initialize_tracepoint): Likewise.
6470
6471 2014-08-28 Gary Benson <gbenson@redhat.com>
6472
6473 * remote-utils.c (remote_prepare): Replace fatal with error.
6474
6475 2014-08-28 Gary Benson <gbenson@redhat.com>
6476
6477 * linux-low.c (linux_async): Replace fatal with warning.
6478 Tidy up and return.
6479 (linux_start_non_stop): Return -1 if linux_async failed.
6480
6481 2014-08-28 Gary Benson <gbenson@redhat.com>
6482
6483 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6484 gdb_assert.
6485 (i386_dr_low_get_addr): Remove vague comment.
6486 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6487 gdb_assert.
6488
6489 2014-08-28 Gary Benson <gbenson@redhat.com>
6490
6491 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6492 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6493 internal_error.
6494 (linux_resume_one_lwp): Likewise.
6495 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6496 gdb_assert.
6497 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6498 with internal_error.
6499 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6500 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6501 (find_register_by_name): Replace fatal with internal_error.
6502 (find_regno): Likewise.
6503 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6504 * thread-db.c (thread_db_create_event): Likewise.
6505 (thread_db_load_search): Likewise.
6506 (try_thread_db_load_1): Likewise.
6507 * tracepoint.c (get_jump_space_head): Replace fatal with
6508 internal_error.
6509 (claim_trampoline_space): Likewise.
6510 (have_fast_tracepoint_trampoline_buffer): Likewise.
6511 (cmd_qtstart): Likewise.
6512 (stop_tracing): Likewise.
6513 (fast_tracepoint_collecting): Likewise.
6514 (target_malloc): Likewise.
6515 (download_tracepoint): Likewise.
6516 (download_trace_state_variables): Replace check with gdb_assert.
6517 (upload_fast_traceframes): Replace fatal with internal_error.
6518
6519 2014-08-19 Tom Tromey <tromey@redhat.com>
6520 Gary Benson <gbenson@redhat.com>
6521
6522 * Makefile.in (SFILES): Add common/common-debug.c.
6523 (OBS): Add common-debug.o.
6524 (common-debug.o): New rule.
6525 * debug.h (debug_printf): Don't declare.
6526 * debug.c (debug_printf): Renamed and rewritten as...
6527 (debug_vprintf): New function.
6528
6529 2014-08-19 Gary Benson <gbenson@redhat.com>
6530
6531 * utils.h: Do not include print-utils.h.
6532
6533 2014-08-19 Tom Tromey <tromey@redhat.com>
6534 Gary Benson <gbenson@redhat.com>
6535
6536 * server.h: Add static assertion.
6537 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6538
6539 2014-08-19 Tom Tromey <tromey@redhat.com>
6540 Gary Benson <gbenson@redhat.com>
6541
6542 * Makefile.in (SFILES): Add common/errors.c.
6543 (OBS): Add errors.o.
6544 (IPA_OBS): Add errors-ipa.o.
6545 (errors.o): New rule.
6546 (errors-ipa.o): Likewise.
6547 * utils.h (perror_with_name, error, warning): Don't declare.
6548 * utils.c (warning): Renamed and rewritten as...
6549 (vwarning): New function.
6550 (error): Renamed and rewritten as...
6551 (verror): New function.
6552 (internal_error): Renamed and rewritten as...
6553 (internal_verror): New function.
6554
6555 2014-08-07 Gary Benson <gbenson@redhat.com>
6556
6557 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6558 * configure: Regenerate.
6559 * config.in: Likewise.
6560 * server.h: Do not include errno.h.
6561 * event-loop.c: Likewise.
6562 * hostio-errno.c: Likewise.
6563 * linux-low.c: Likewise.
6564 * remote-utils.c: Likewise.
6565 * spu-low.c: Likewise.
6566 * utils.c: Likewise.
6567 * gdbreplay.c: Unconditionally include errno.h.
6568
6569 2014-08-07 Gary Benson <gbenson@redhat.com>
6570
6571 * server.h: Do not include string.h.
6572 * event-loop.c: Likewise.
6573 * linux-low.c: Likewise.
6574 * regcache.c: Likewise.
6575 * remote-utils.c: Likewise.
6576 * spu-low.c: Likewise.
6577 * utils.c: Likewise.
6578
6579 2014-08-07 Gary Benson <gbenson@redhat.com>
6580
6581 * server.h: Do not include gdb_assert.h.
6582
6583 2014-08-07 Gary Benson <gbenson@redhat.com>
6584
6585 * server.h: Do not include common-utils.h.
6586
6587 2014-08-07 Gary Benson <gbenson@redhat.com>
6588
6589 * server.h: Do not include ptid.h.
6590 * notif.h: Likewise.
6591
6592 2014-08-07 Gary Benson <gbenson@redhat.com>
6593
6594 * server.h: Do not include gdb_locale.h.
6595
6596 2014-08-07 Gary Benson <gbenson@redhat.com>
6597
6598 * server.h: Do not include gdb/signals.h.
6599 * win32-low.c: Likewise.
6600
6601 2014-08-07 Gary Benson <gbenson@redhat.com>
6602
6603 * server.h: Do not include pathmax.h.
6604
6605 2014-08-07 Gary Benson <gbenson@redhat.com>
6606
6607 * server.h: Do not include libiberty.h.
6608 * linux-bfin-low.c: Likewise.
6609
6610 2014-08-07 Gary Benson <gbenson@redhat.com>
6611
6612 * server.h: Do not include ansidecl.h.
6613
6614 2014-08-07 Gary Benson <gbenson@redhat.com>
6615
6616 * linux-x86-low.c: Do not include stddef.h.
6617 * lynx-ppc-low.c: Likewise.
6618 * tracepoint.c: Likewise.
6619
6620 2014-08-07 Gary Benson <gbenson@redhat.com>
6621
6622 * server.h: Do not include stdarg.h.
6623 * nto-low.c: Likewise.
6624
6625 2014-08-07 Gary Benson <gbenson@redhat.com>
6626
6627 * server.h: Do not include stdlib.h.
6628 * inferiors.c: Likewise.
6629 * linux-low.c: Likewise.
6630 * regcache.c: Likewise.
6631 * spu-low.c: Likewise.
6632 * tracepoint.c: Likewise.
6633 * utils.c: Likewise.
6634
6635 2014-08-07 Gary Benson <gbenson@redhat.com>
6636
6637 * server.h: Do not include stdio.h.
6638 * linux-low.c: Likewise.
6639 * remote-utils.c: Likewise.
6640 * spu-low.c: Likewise.
6641 * utils.c: Likewise.
6642 * wincecompat.c: Likewise.
6643
6644 2014-08-06 Gary Benson <gbenson@redhat.com>
6645
6646 * regcache.c (init_register_cache): Move conditionals inside if.
6647
6648 2014-08-06 Gary Benson <gbenson@redhat.com>
6649
6650 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6651
6652 2014-07-31 Gary Benson <gbenson@redhat.com>
6653
6654 * ax.h: Do not include server.h.
6655 * gdbthread.h: Likewise.
6656 * lynx-low.h: Likewise.
6657 * notif.h: Likewise.
6658
6659 2014-07-30 Gary Benson <gbenson@redhat.com>
6660
6661 * server.h: Include common-defs.h.
6662 Do not include config.h or build-gnulib-gdbserver/config.h.
6663
6664 2014-07-30 Gary Benson <gbenson@redhat.com>
6665
6666 * hostio-errno.c: Move server.h to top of includes list.
6667 * inferiors.c: Likewise.
6668 * linux-x86-low.c: Likewise.
6669 * notif.c: Include server.h.
6670
6671 2014-07-24 Tom Tromey <tromey@redhat.com>
6672 Gary Benson <gbenson@redhat.com>
6673
6674 * server.h (CORE_ADDR): Now unsigned.
6675
6676 2014-07-16 Pedro Alves <palves@redhat.com>
6677
6678 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6679
6680 2014-07-15 Pedro Alves <palves@redhat.com>
6681
6682 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6683 copy.
6684
6685 2014-07-11 Pedro Alves <palves@redhat.com>
6686
6687 * linux-low.c (kill_wait_lwp): New function, based on
6688 kill_one_lwp_callback, but use my_waitpid directly.
6689 (kill_one_lwp_callback, linux_kill): Use it.
6690
6691 2014-06-23 Pedro Alves <palves@redhat.com>
6692
6693 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6694 before setting DR0..DR3.
6695
6696 2014-06-20 Gary Benson <gbenson@redhat.com>
6697
6698 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6699 * configure: Regenerated.
6700 * config.in: Likewise.
6701
6702 2014-06-20 Gary Benson <gbenson@redhat.com>
6703
6704 * Makefile.in (SFILES): Update locations for files moved
6705 from common to nat.
6706 (object file files): Reordered.
6707
6708 2014-06-20 Gary Benson <gbenson@redhat.com>
6709
6710 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6711 (i386_dr_low_set_addr): Likewise.
6712 (i386_dr_low_get_addr): Likewise.
6713 (i386_dr_low_can_set_control): Likewise.
6714 (i386_dr_low_set_control): Likewise.
6715 (i386_dr_low_get_control): Likewise.
6716 (i386_dr_low_get_status): Likewise.
6717 (i386_get_debug_register_length): Likewise.
6718 * linux-x86-low.c (i386_dr_low_set_addr):
6719 Changed signature. Made static.
6720 (i386_dr_low_get_addr): Likewise.
6721 (i386_dr_low_set_control): Likewise.
6722 (i386_dr_low_get_control): Likewise.
6723 (i386_dr_low_get_status): Likewise.
6724 (i386_dr_low): New global variable.
6725 * win32-i386-low.c (i386_dr_low_set_addr):
6726 Changed signature. Made static.
6727 (i386_dr_low_get_addr): Likewise.
6728 (i386_dr_low_set_control): Likewise.
6729 (i386_dr_low_get_control): Likewise.
6730 (i386_dr_low_get_status): Likewise.
6731 (i386_dr_low): New global variable.
6732
6733 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6734
6735 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6736 * Makefile.in (AR, AR_FLAGS): Define.
6737 * configure: Regenerate.
6738
6739 2014-06-19 Gary Benson <gbenson@redhat.com>
6740
6741 * Makefile.in (i386-dregs.o): New rule.
6742 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6743 * i386-low.c (target.h): Remove include.
6744 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6745 (DR_CONTROL_SHIFT): Likewise.
6746 (DR_CONTROL_SIZE): Likewise.
6747 (DR_RW_EXECUTE): Likewise.
6748 (DR_RW_WRITE): Likewise.
6749 (DR_RW_READ): Likewise.
6750 (DR_RW_IORW): Likewise.
6751 (DR_LEN_1): Likewise.
6752 (DR_LEN_2): Likewise.
6753 (DR_LEN_4): Likewise.
6754 (DR_LEN_8): Likewise.
6755 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6756 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6757 (DR_ENABLE_SIZE): Likewise.
6758 (DR_LOCAL_SLOWDOWN): Likewise.
6759 (DR_GLOBAL_SLOWDOWN): Likewise.
6760 (DR_CONTROL_RESERVED): Likewise.
6761 (I386_DR_CONTROL_MASK): Likewise.
6762 (I386_DR_VACANT): Likewise.
6763 (I386_DR_LOCAL_ENABLE): Likewise.
6764 (I386_DR_GLOBAL_ENABLE): Likewise.
6765 (I386_DR_DISABLE): Likewise.
6766 (I386_DR_SET_RW_LEN): Likewise.
6767 (I386_DR_GET_RW_LEN): Likewise.
6768 (I386_DR_WATCH_HIT): Likewise.
6769 (i386_wp_op_t): Likewise.
6770 (i386_show_dr): Likewise.
6771 (i386_length_and_rw_bits): Likewise.
6772 (i386_insert_aligned_watchpoint): Likewise.
6773 (i386_remove_aligned_watchpoint): Likewise.
6774 (i386_handle_nonaligned_watchpoint): Likewise.
6775 i386_update_inferior_debug_regs(): Likewise.
6776 (i386_dr_insert_watchpoint): Likewise.
6777 (i386_dr_remove_watchpoint): Likewise.
6778 (i386_dr_region_ok_for_watchpoint): Likewise.
6779 (i386_dr_stopped_data_address): Likewise.
6780 (i386_dr_stopped_by_watchpoint): Likewise.
6781
6782 2014-06-19 Gary Benson <gbenson@redhat.com>
6783
6784 * i386-low.c (i386_dr_show): Renamed to
6785 i386_show_dr and made static. All uses updated.
6786 (i386_dr_length_and_rw_bits): Renamed to
6787 i386_length_and_rw_bits and made static.
6788 All uses updated.
6789 (i386_dr_insert_aligned_watchpoint): Renamed to
6790 i386_insert_aligned_watchpoint and made static.
6791 All uses updated.
6792 (i386_dr_remove_aligned_watchpoint): Renamed to
6793 i386_remove_aligned_watchpoint and made static.
6794 All uses updated.
6795 (i386_dr_update_inferior_debug_regs): Renamed to
6796 i386_update_inferior_debug_regs and made static.
6797 All uses updated.
6798
6799 2014-06-18 Gary Benson <gbenson@redhat.com>
6800
6801 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6802 (i386_dr_low_can_set_control): Likewise.
6803 (i386_get_debug_register_length): Likewise.
6804 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6805 (i386_dr_low_can_set_control): Likewise.
6806 (i386_get_debug_register_length): Likewise.
6807
6808 2014-06-17 Gary Benson <gbenson@redhat.com>
6809
6810 * i386-low.h (i386-dregs.h): New include.
6811 (DR_FIRSTADDR): Now in i386-dregs.h.
6812 (DR_LASTADDR): Likewise.
6813 (DR_NADDR): Likewise.
6814 (DR_STATUS): Likewise.
6815 (DR_CONTROL): Likewise.
6816 (i386_debug_reg_state): Likewise.
6817 (i386_dr_insert_watchpoint): Likewise.
6818 (i386_dr_remove_watchpoint): Likewise.
6819 (i386_dr_region_ok_for_watchpoint): Likewise.
6820 (i386_dr_stopped_data_address): Likewise.
6821 (i386_dr_stopped_by_watchpoint): Likewise.
6822 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6823
6824 2014-06-18 Gary Benson <gbenson@redhat.com>
6825
6826 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6827 i386_dr_insert_watchpoint.
6828 (i386_low_remove_watchpoint): Renamed to
6829 i386_dr_remove_watchpoint.
6830 (i386_low_region_ok_for_watchpoint): Renamed to
6831 i386_dr_region_ok_for_watchpoint.
6832 (i386_low_stopped_data_address): Renamed to
6833 i386_dr_stopped_data_address.
6834 (i386_low_stopped_by_watchpoint): Renamed to
6835 i386_dr_stopped_by_watchpoint.
6836 * i386-low.c (i386_show_dr): Renamed to
6837 i386_dr_show and made nonstatic. All uses updated.
6838 (i386_length_and_rw_bits): Renamed to
6839 i386_dr_length_and_rw_bits and made nonstatic.
6840 All uses updated.
6841 (i386_insert_aligned_watchpoint): Renamed to
6842 i386_dr_insert_aligned_watchpoint and made nonstatic.
6843 All uses updated.
6844 (i386_remove_aligned_watchpoint): Renamed to
6845 i386_dr_remove_aligned_watchpoint and made nonstatic.
6846 All uses updated.
6847 (i386_update_inferior_debug_regs): Renamed to
6848 i386_dr_update_inferior_debug_regs and made nonstatic.
6849 All uses updated.
6850 (i386_low_insert_watchpoint): Renamed to
6851 i386_dr_insert_watchpoint. All uses updated.
6852 (i386_low_remove_watchpoint): Renamed to
6853 i386_dr_remove_watchpoint. All uses updated.
6854 (i386_low_region_ok_for_watchpoint): Renamed to
6855 i386_dr_region_ok_for_watchpoint. All uses updated.
6856 (i386_low_stopped_data_address): Renamed to
6857 i386_dr_stopped_data_address. All uses updated.
6858 (i386_low_stopped_by_watchpoint): Renamed to
6859 i386_dr_stopped_by_watchpoint. All uses updated.
6860
6861 2014-06-18 Gary Benson <gbenson@redhat.com>
6862
6863 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6864 (i386_dr_low_can_set_control): Likewise.
6865 (i386_insert_aligned_watchpoint): New check.
6866
6867 2014-06-18 Gary Benson <gbenson@redhat.com>
6868
6869 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6870 Renamed to state.
6871
6872 2014-06-18 Gary Benson <gbenson@redhat.com>
6873
6874 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6875 instead of fatal and error.
6876 (i386_handle_nonaligned_watchpoint): Likewise.
6877
6878 2014-06-18 Gary Benson <gbenson@redhat.com>
6879
6880 * i386-low.c (i386_get_debug_register_length): New macro.
6881 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6882 (i386_show_dr): Use debug_printf instead of fprintf. Use
6883 phex to format values.
6884
6885 2014-06-18 Gary Benson <gbenson@redhat.com>
6886
6887 * i386-low.h: Comment changes.
6888 * i386-low.c: Likewise.
6889
6890 2014-06-18 Gary Benson <gbenson@redhat.com>
6891
6892 * i386-low.c: Whitespace changes.
6893
6894 2014-06-12 Tom Tromey <tromey@redhat.com>
6895
6896 * utils.c (freeargv): Remove.
6897
6898 2014-06-12 Tom Tromey <tromey@redhat.com>
6899
6900 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6901 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6902 (parse_debug_format_options): Likewise.
6903 (gdbserver_usage): Likewise.
6904 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6905 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6906 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6907 against libiberty.
6908 ($(LIBGNU)): Depend on libiberty.
6909 (all-lib): Recurse into all subdirs.
6910 (install-only): Invoke "install" target in subdirs.
6911 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6912 targets.
6913 * configure: Rebuild.
6914 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6915 for vasprintf, vsnprintf, or gettimeofday.
6916 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6917 srv_tgtobj.
6918
6919 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6920
6921 * development.sh: Delete.
6922 * Makefile.in (config.status): Adjust dependency on development.sh.
6923 * configure.ac: Adjust development.sh source call.
6924 * configure: Regenerate.
6925
6926 2014-06-02 Pedro Alves <palves@redhat.com>
6927
6928 * ax.c (gdb_free_agent_expr): New function.
6929 * ax.h (gdb_free_agent_expr): New declaration.
6930 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6931 list.
6932 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6933 static.
6934 (clear_breakpoint_conditions_and_commands): New function.
6935 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6936 (clear_breakpoint_conditions_and_commands): New declaration.
6937
6938 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6939
6940 * linux-aarch64-low.c (asm/ptrace.h): Include.
6941
6942 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6943
6944 Fix TLS access for -static -pthread.
6945 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6946 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6947 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6948
6949 2014-05-20 Pedro Alves <palves@redhat.com>
6950
6951 * linux-aarch64-low.c (aarch64_insert_point)
6952 (aarch64_remove_point): No longer check whether the type is
6953 supported here. Adjust to new interface.
6954 (the_low_target): Install aarch64_supports_z_point_type as
6955 supports_z_point_type method.
6956 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6957 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6958 instead of a Z packet char. Adjust.
6959 (arm_supports_z_point_type): New function.
6960 (arm_insert_point, arm_remove_point): Adjust to new interface.
6961 (the_low_target): Install arm_supports_z_point_type.
6962 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6963 (cris_insert_point, cris_remove_point): Adjust to new interface.
6964 Don't check whether the type is supported here.
6965 (the_low_target): Install cris_supports_z_point_type.
6966 * linux-low.c (linux_supports_z_point_type): New function.
6967 (linux_insert_point, linux_remove_point): Adjust to new interface.
6968 * linux-low.h (struct linux_target_ops) <insert_point,
6969 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6970 raw_breakpoint pointer parameter.
6971 <supports_z_point_type>: New method.
6972 * linux-mips-low.c (mips_supports_z_point_type): New function.
6973 (mips_insert_point, mips_remove_point): Adjust to new interface.
6974 Use mips_supports_z_point_type.
6975 (the_low_target): Install mips_supports_z_point_type.
6976 * linux-ppc-low.c (the_low_target): Install NULL as
6977 supports_z_point_type method.
6978 * linux-s390-low.c (the_low_target): Install NULL as
6979 supports_z_point_type method.
6980 * linux-sparc-low.c (the_low_target): Install NULL as
6981 supports_z_point_type method.
6982 * linux-x86-low.c (x86_supports_z_point_type): New function.
6983 (x86_insert_point): Adjust to new insert_point interface. Use
6984 insert_memory_breakpoint. Adjust to new
6985 i386_low_insert_watchpoint interface.
6986 (x86_remove_point): Adjust to remove_point interface. Use
6987 remove_memory_breakpoint. Adjust to new
6988 i386_low_remove_watchpoint interface.
6989 (the_low_target): Install x86_supports_z_point_type.
6990 * lynx-low.c (lynx_target_ops): Install NULL as
6991 supports_z_point_type callback.
6992 * nto-low.c (nto_supports_z_point_type): New.
6993 (nto_insert_point, nto_remove_point): Adjust to new interface.
6994 (nto_target_ops): Install nto_supports_z_point_type.
6995 * mem-break.c: Adjust intro comment.
6996 (struct raw_breakpoint) <raw_type, size>: New fields.
6997 <inserted>: Update comment.
6998 <shlib_disabled>: Delete field.
6999 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7000 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7001 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7002 (raw_bkpt_type_to_target_hw_bp_type): New function.
7003 (find_enabled_raw_code_breakpoint_at): New function.
7004 (find_raw_breakpoint_at): New type and size parameters. Use them.
7005 (insert_memory_breakpoint): New function, based off
7006 set_raw_breakpoint_at.
7007 (remove_memory_breakpoint): New function.
7008 (set_raw_breakpoint_at): Reimplement.
7009 (set_breakpoint): New, based on set_breakpoint_at.
7010 (set_breakpoint_at): Reimplement.
7011 (delete_raw_breakpoint): Go through the_target->remove_point
7012 instead of assuming memory breakpoints.
7013 (find_gdb_breakpoint_at): Delete.
7014 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7015 (find_gdb_breakpoint): New function.
7016 (set_gdb_breakpoint_at): Delete.
7017 (z_type_supported): New function.
7018 (set_gdb_breakpoint_1): New function, loosely based off
7019 set_gdb_breakpoint_at.
7020 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7021 (delete_gdb_breakpoint_at): Delete.
7022 (delete_gdb_breakpoint_1): New function, loosely based off
7023 delete_gdb_breakpoint_at.
7024 (delete_gdb_breakpoint): New function.
7025 (clear_gdb_breakpoint_conditions): Rename to ...
7026 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7027 breakpoint.
7028 (add_condition_to_breakpoint): Make static.
7029 (add_breakpoint_condition): Take a struct breakpoint pointer
7030 instead of an address. Adjust.
7031 (gdb_condition_true_at_breakpoint): Rename to ...
7032 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7033 z_type parameter.
7034 (gdb_condition_true_at_breakpoint): Reimplement.
7035 (add_breakpoint_commands): Take a struct breakpoint pointer
7036 instead of an address. Adjust.
7037 (gdb_no_commands_at_breakpoint): Rename to ...
7038 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7039 parameter. Return true if no breakpoint was found. Change debug
7040 output.
7041 (gdb_no_commands_at_breakpoint): Reimplement.
7042 (run_breakpoint_commands): Rename to ...
7043 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7044 and change return type to boolean.
7045 (run_breakpoint_commands): New function.
7046 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7047 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7048 breakpoint. Go through the_target->remove_point instead of
7049 assuming memory breakpoint.
7050 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7051 software and hardware breakpoints.
7052 (reinsert_raw_breakpoint): Go through the_target->insert_point
7053 instead of assuming memory breakpoint.
7054 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7055 software and hardware breakpoints.
7056 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7057 Check both software and hardware breakpoints.
7058 (validate_inserted_breakpoint): Assert the breakpoint is a
7059 software breakpoint. Set the inserted flag to -1 instead of
7060 setting shlib_disabled.
7061 (delete_disabled_breakpoints): Adjust.
7062 (validate_breakpoints): Only validate software breakpoints.
7063 Adjust to inserted flag change.
7064 (check_mem_read, check_mem_write): Skip breakpoint types other
7065 than software breakpoints. Adjust to inserted flag change.
7066 * mem-break.h (enum raw_bkpt_type): New enum.
7067 (raw_breakpoint, struct process_info): Forward declare.
7068 (Z_packet_to_target_hw_bp_type): Delete declaration.
7069 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7070 (set_gdb_breakpoint, delete_gdb_breakpoint)
7071 (clear_breakpoint_conditions): New declarations.
7072 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7073 (breakpoint_inserted_here): Update comment.
7074 (add_breakpoint_condition, add_breakpoint_commands): Replace
7075 address parameter with a breakpoint pointer parameter.
7076 (gdb_breakpoint_here): Update comment.
7077 (delete_gdb_breakpoint_at): Delete.
7078 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7079 * server.c (process_point_options): Take a struct breakpoint
7080 pointer instead of an address. Adjust.
7081 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7082 delete_gdb_breakpoint.
7083 * spu-low.c (spu_target_ops): Install NULL as
7084 supports_z_point_type method.
7085 * target.h: Include mem-break.h.
7086 (struct target_ops) <prepare_to_access_memory>: Update comment.
7087 <supports_z_point_type>: New field.
7088 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7089 instead of a char. Also take a raw breakpoint pointer.
7090 * win32-arm-low.c (the_low_target): Install NULL as
7091 supports_z_point_type.
7092 * win32-i386-low.c (i386_supports_z_point_type): New function.
7093 (i386_insert_point, i386_remove_point): Adjust to new interface.
7094 (the_low_target): Install i386_supports_z_point_type.
7095 * win32-low.c (win32_supports_z_point_type): New function.
7096 (win32_insert_point, win32_remove_point): Adjust to new interface.
7097 (win32_target_ops): Install win32_supports_z_point_type.
7098 * win32-low.h (struct win32_target_ops):
7099 <supports_z_point_type>: New method.
7100 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7101 instead of a char. Also take a raw breakpoint pointer.
7102
7103 2014-05-20 Pedro Alves <palves@redhat.com>
7104
7105 * mem-break.h: Include break-common.h.
7106 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7107 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7108 (Z_packet_to_target_hw_bp_type): New declaration.
7109 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7110 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7111 (Z_PACKET_ACCESS_WP): Delete macros.
7112 (Z_packet_to_hw_type): Delete function.
7113 * i386-low.h: Don't include break-common.h here.
7114 (Z_packet_to_hw_type): Delete declaration.
7115 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7116 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7117 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7118 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7119 * linux-aarch64-low.c: Don't include break-common.h here.
7120 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7121 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7122 (Z_packet_to_target_hw_bp_type): Delete function.
7123 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7124 function.
7125 (mips_insert_point, mips_remove_point): Use
7126 Z_packet_to_target_hw_bp_type.
7127
7128 2014-05-20 Pedro Alves <palves@redhat.com>
7129
7130 * linux-aarch64-low.c: Include break-common.h.
7131 (enum target_point_type): Delete.
7132 (Z_packet_to_point_type): Rename to ...
7133 (Z_packet_to_target_hw_bp_type): ... this, and return a
7134 target_hw_bp_type instead.
7135 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7136 instead of an enum target_point_type.
7137 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7138 breakpoint type.
7139 (aarch64_dr_state_insert_one_point)
7140 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7141 (aarch64_handle_aligned_watchpoint)
7142 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7143 Take an enum target_hw_bp_type instead of an enum
7144 target_point_type.
7145 (aarch64_supports_z_point_type): New function.
7146 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7147 use Z_packet_to_target_hw_bp_type.
7148
7149 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7150
7151 * configure.ac: Only use -Werror by default when DEVELOPMENT
7152 is true.
7153 * configure: Regenerate.
7154
7155 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7156
7157 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7158 * linux-x86-low.c (X86_64_USER_REGS): New.
7159 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7160
7161 2014-04-28 Yao Qi <yao@codesourcery.com>
7162
7163 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7164 name.
7165
7166 2014-04-25 Pedro Alves <palves@redhat.com>
7167
7168 PR server/16255
7169 * linux-low.c (linux_attach_fail_reason_string): New function.
7170 (linux_attach_lwp): Delete.
7171 (linux_attach_lwp_1): Rename to ...
7172 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7173 argument. Remove "initial" parameter. Return int instead of
7174 void. Don't error or warn here.
7175 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7176 failure to attach to the tgid. Call warning when failing to
7177 attach to an lwp.
7178 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7179 argument. Remove "initial" parameter. Return int instead of
7180 void. Don't error or warn here.
7181 (linux_attach_fail_reason_string): New declaration.
7182 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7183 interface change. Use linux_attach_fail_reason_string.
7184
7185 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7186 Walfred Tedeschi <walfred.tedeschi@intel.com>
7187
7188 * Makefile.in: Added rules to handle new files
7189 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7190 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7191 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7192 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7193 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7194 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7195 x32-avx512-linux.o.
7196 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7197 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7198 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7199 i386/x32-avx512.xml.
7200 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7201 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7202 i386/x32-avx512-linux.xml.
7203 * i387-fp.c (num_avx512_k_registers): New constant for number
7204 of K registers.
7205 (num_avx512_zmmh_low_registers): New constant for number of
7206 lower ZMM registers (0-15).
7207 (num_avx512_zmmh_high_registers): New constant for number of
7208 higher ZMM registers (16-31).
7209 (num_avx512_ymmh_registers): New contant for number of higher
7210 YMM registers (ymm16-31 added by avx521 on x86_64).
7211 (num_avx512_xmm_registers): New constant for number of higher
7212 XMM registers (xmm16-31 added by AVX512 on x86_64).
7213 (struct i387_xsave): Add space for AVX512 registers.
7214 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7215 Add code to handle AVX512 registers.
7216 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7217 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7218 prototypei from generated file.
7219 (tdesc_amd64_avx512_linux): Likewise.
7220 (init_registers_x32_avx512_linux): Likewise.
7221 (tdesc_x32_avx512_linux): Likewise.
7222 (init_registers_i386_avx512_linux): Likewise.
7223 (tdesc_i386_avx512_linux): Likewise.
7224 (x86_64_regmap): Add AVX512 registers.
7225 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7226 mask.
7227 (initialize_low_arch): Add code to initialize AVX512 registers.
7228
7229 2014-04-23 Pedro Alves <palves@redhat.com>
7230
7231 * mem-break.c (find_gdb_breakpoint_at): Make static.
7232 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7233
7234 2014-04-23 Pedro Alves <palves@redhat.com>
7235
7236 * i386-low.c: Don't include break-common.h here.
7237 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7238 prototype to take target_hw_bp_type as argument instead of a Z
7239 packet char.
7240 * i386-low.h: Include break-common.h here.
7241 (Z_packet_to_hw_type): Declare.
7242 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7243 prototypes.
7244 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7245 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7246 (x86_remove_point): Convert the packet number to a
7247 target_hw_bp_type before calling i386_low_remove_watchpoint.
7248 * win32-i386-low.c (i386_insert_point): Convert the packet number
7249 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7250 (i386_remove_point): Convert the packet number to a
7251 target_hw_bp_type before calling i386_low_remove_watchpoint.
7252
7253 2014-04-23 Pedro Alves <palves@redhat.com>
7254
7255 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7256
7257 2014-04-10 Pedro Alves <palves@redhat.com>
7258
7259 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7260 Check if the condition or command is NULL before checking if the
7261 breakpoint is known. On success, return true.
7262 * mem-break.h (add_breakpoint_condition): Document return.
7263 (add_breakpoint_commands): Add describing comment.
7264 * server.c (skip_to_semicolon): New function.
7265 (process_point_options): Use it.
7266
7267 2014-04-09 Pedro Alves <palves@redhat.com>
7268
7269 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7270 to lwpid_of.
7271
7272 2014-02-27 Pedro Alves <palves@redhat.com>
7273
7274 PR 12702
7275 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7276 macros.
7277 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7278 output.
7279 (last_thread_of_process_p): Take a PID argument instead of a
7280 thread pointer.
7281 (linux_wait_for_lwp): Delete.
7282 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7283 functions.
7284 (linux_low_filter_event): New function, party factored out from
7285 linux_wait_for_event.
7286 (linux_wait_for_event): Rename to ...
7287 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7288 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7289 sigsuspend. Check for zombie leaders.
7290 (linux_wait_for_event): Reimplement as wrapper around
7291 linux_wait_for_event_filtered.
7292 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7293 a normal or signal exit is seen, it's the whole process exiting.
7294 (wait_for_sigstop): No longer a for_each_inferior callback.
7295 Rewrite on top of linux_wait_for_event_filtered.
7296 (stop_all_lwps): Call wait_for_sigstop directly.
7297 * server.c (resume, handle_target_event): Handle
7298 TARGET_WAITKIND_NO_RESUMED.
7299
7300 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7301
7302 * win32-low.c (psapi_get_dll_name,
7303 * win32_CreateToolhelp32Snapshot): Delete.
7304 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7305 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7306 Delete.
7307 (handle_load_dll): Add function description.
7308 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7309
7310 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7311
7312 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7313 Add comment.
7314 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7315 base address when calling win32_add_one_solib.
7316 (handle_load_dll): Delete local variable load_addr.
7317 Remove 0x1000 offset applied to DLL base address when calling
7318 win32_add_one_solib.
7319 (handle_unload_dll): Add comment.
7320
7321 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7322
7323 * win32-low.c (win32_add_all_dlls): Renames
7324 win32_ensure_ntdll_loaded. Rewrite function documentation.
7325 Adjust implementation to always load all DLLs.
7326 Add 0x1000 offset to DLL base address when calling
7327 win32_add_one_solib.
7328 (child_initialization_done): New static global.
7329 (do_initial_child_stuff): Set child_initialization_done to
7330 zero during child initialization, and 1 after. Replace call
7331 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7332 Add comment.
7333 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7334 (handle_unload_dll): Add function documentation.
7335 (get_child_debug_event): Ignore load and unload DLL events
7336 during child initialization.
7337
7338 2014-02-20 Doug Evans <dje@google.com>
7339
7340 Remove global all_lwps.
7341 * inferiors.h (ptid_of): Move here from linux-low.h.
7342 (pid_of, lwpid_of): Ditto.
7343 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7344 parameter is a struct thread_info * now.
7345 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7346 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7347 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7348 directly.
7349 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7350 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7351 * linux-arm-low.c (update_registers_callback): Update, "entry"
7352 parameter is a struct thread_info * now.
7353 Fetch lwpid from current_inferior directly.
7354 (arm_insert_point): Pass &all_threads to find_inferior instead of
7355 &all_lwps.
7356 (arm_remove_point): Ditto.
7357 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7358 (arm_prepare_to_resume): Fetch pid from thread.
7359 (arm_read_description): Fetch lwpid from current_inferior directly.
7360 * linux-low.c (all_lwps): Delete.
7361 (delete_lwp): Delete call to remove_inferior.
7362 (handle_extended_wait): Fetch lwpid from thread.
7363 (add_lwp): Don't set lwp->entry.id. Remove call to
7364 add_inferior_to_list.
7365 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7366 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7367 (kill_one_lwp_callback): Ditto.
7368 (linux_kill): Don't dereference NULL pointer.
7369 Fetch ptid,lwpid from thread.
7370 (get_detach_signal): Fetch ptid from thread.
7371 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7372 Simplify call to regcache_invalidate_thread.
7373 (delete_lwp_callback): Update, "entry" parameter is a
7374 struct thread_info * now. Fetch pid from thread.
7375 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7376 (status_pending_p_callback): Update, "entry" parameter is a
7377 struct thread_info * now. Fetch ptid from thread.
7378 (find_lwp_pid): Update, "entry" parameter is a
7379 struct thread_info * now.
7380 (linux_wait_for_lwp): Fetch pid from thread.
7381 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7382 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7383 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7384 (dequeue_one_deferred_signal): Ditto.
7385 (cancel_breakpoint): Fetch ptid from current_inferior.
7386 (linux_wait_for_event): Pass &all_threads to find_inferior,
7387 not &all_lwps. Fetch ptid, lwpid from thread.
7388 (count_events_callback): Update, "entry" parameter is a
7389 struct thread_info * now.
7390 (select_singlestep_lwp_callback): Ditto.
7391 (select_event_lwp_callback): Ditto.
7392 (cancel_breakpoints_callback): Ditto.
7393 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7394 not &all_lwps.
7395 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7396 (unsuspend_one_lwp): Update, "entry" parameter is a
7397 struct thread_info * now.
7398 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7399 not &all_lwps.
7400 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7401 Fetch lwpid from thread, not lwp.
7402 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7403 Pass &all_threads to find_inferior, not &all_lwps.
7404 (send_sigstop): Fetch lwpid from thread, not lwp.
7405 (send_sigstop_callback): Update, "entry" parameter is a
7406 struct thread_info * now.
7407 (suspend_and_send_sigstop_callback): Ditto.
7408 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7409 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7410 struct thread_info * now.
7411 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7412 from thread, lwp.
7413 (lwp_running): Update, "entry" parameter is a
7414 struct thread_info * now.
7415 (stop_all_lwps): Fetch ptid from thread.
7416 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7417 (linux_resume_one_lwp): Fetch lwpid from thread.
7418 (linux_set_resume_request): Update, "entry" parameter is a
7419 struct thread_info * now. Fetch pid, lwpid from thread.
7420 (resume_status_pending_p): Update, "entry" parameter is a
7421 struct thread_info * now.
7422 (need_step_over_p): Ditto. Fetch lwpid from thread.
7423 (start_step_over): Fetch lwpid from thread.
7424 (linux_resume_one_thread): Update, "entry" parameter is a
7425 struct thread_info * now. Fetch lwpid from thread.
7426 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7427 (proceed_one_lwp): Update, "entry" parameter is a
7428 struct thread_info * now. Fetch lwpid from thread.
7429 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7430 struct thread_info * now.
7431 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7432 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7433 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7434 directly.
7435 (regsets_store_inferior_registers): Ditto.
7436 (fetch_register, store_register): Ditto.
7437 (linux_read_memory, linux_write_memory): Ditto.
7438 (linux_request_interrupt): Ditto.
7439 (linux_read_auxv): Ditto.
7440 (linux_xfer_siginfo): Ditto.
7441 (linux_qxfer_spu): Ditto.
7442 (linux_qxfer_libraries_svr4): Ditto.
7443 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7444 moved to inferiors.h.
7445 (get_lwp): Delete.
7446 (get_thread_lwp): Update.
7447 (struct lwp_info): Delete member "entry". Simplify comment for
7448 member "thread".
7449 (all_lwps): Delete.
7450 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7451 current_inferior directly.
7452 (update_watch_registers_callback): Update, "entry" parameter is a
7453 struct thread_info * now. Fetch pid from thread.
7454 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7455 (mips_insert_point): Fetch lwpid from current_inferior.
7456 Pass &all_threads to find_inferior, not &all_lwps.
7457 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7458 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7459 directly.
7460 (mips_stopped_data_address): Ditto.
7461 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7462 directly.
7463 * linux-tile-low.c (tile_arch_setup): Ditto.
7464 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7465 (update_debug_registers_callback): Update, "entry" parameter is a
7466 struct thread_info * now. Fetch pid from thread.
7467 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7468 Pass &all_threads to find_inferior, not &all_lwps.
7469 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7470 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7471 Pass &all_threads to find_inferior, not &all_lwps.
7472 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7473 (i386_dr_low_get_status): Ditto.
7474 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7475 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7476 (x86_linux_read_description): Ditto.
7477 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7478
7479 2014-02-20 Doug Evans <dje@google.com>
7480
7481 * inferiors.c (get_first_inferior): Fix buglet.
7482
7483 2014-02-19 Doug Evans <dje@google.com>
7484
7485 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7486 * inferiors.c (add_thread): Change result type to struct thread_info *.
7487 All callers updated.
7488 (add_lwp): Call add_thread here instead of in callers.
7489 All callers updated.
7490 * linux-low.h (get_lwp_thread): Rewrite.
7491 (struct lwp_info): New member "thread".
7492
7493 2014-02-19 Doug Evans <dje@google.com>
7494
7495 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7496 All callers updated.
7497
7498 2014-02-19 Doug Evans <dje@google.com>
7499
7500 * inferiors.c (add_thread): Fix whitespace.
7501
7502 2014-02-19 Doug Evans <dje@google.com>
7503
7504 * dll.c (clear_dlls): Replace accessing list implemention details
7505 with API function.
7506 * gdbthread.h (get_first_thread): Declare.
7507 * inferiors.c (for_each_inferior_with_data): New function.
7508 (get_first_thread): New function.
7509 (find_thread_ptid): Simplify.
7510 (get_first_inferior): New function.
7511 (clear_list): Delete.
7512 (one_inferior_p): New function.
7513 (clear_inferior_list): New function.
7514 (clear_inferiors): Update.
7515 * inferiors.h (for_each_inferior_with_data): Declare.
7516 (clear_inferior_list): Declare.
7517 (one_inferior_p): Declare.
7518 (get_first_inferior): Declare.
7519 * linux-low.c (linux_wait_for_event): Replace accessing list
7520 implemention details with API function.
7521 * server.c (target_running): Ditto.
7522 (accumulate_file_name_length): New function.
7523 (emit_dll_description): New function.
7524 (handle_qxfer_libraries): Replace accessing list implemention
7525 details with API function.
7526 (handle_qxfer_threads_worker): New function.
7527 (handle_qxfer_threads_proper): Replace accessing list implemention
7528 details with API function.
7529 (handle_query): Ditto.
7530 (visit_actioned_threads_callback_ftype): New typedef.
7531 (visit_actioned_threads_data): New struct.
7532 (visit_actioned_threads): Rewrite to be find_inferior callback.
7533 (resume): Call find_inferior.
7534 (handle_status): Replace accessing list implemention
7535 details with API function.
7536 (process_serial_event): Replace accessing list implemention details
7537 with API function.
7538 * target.c (set_desired_inferior): Replace accessing list implemention
7539 details with API function.
7540 * tracepoint.c (same_process_p): New function.
7541 (gdb_agent_about_to_close): Replace accessing list implemention
7542 details with API function.
7543 * win32-low.c (child_delete_thread): Replace accessing list
7544 implemention details with API function.
7545 (match_dll_by_basename): New function.
7546 (dll_is_loaded_by_basename): New function.
7547 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7548 details call to dll_is_loaded_by_basename.
7549
7550 2014-02-19 Doug Evans <dje@google.com>
7551
7552 * dll.h (struct dll_info): Add comment.
7553 * gdbthread.h (struct thread_info): Add comment.
7554 (current_ptid): Simplify.
7555 * inferiors.c (add_process): Update.
7556 (remove_process): Update.
7557 * inferiors.h (struct process_info): Rename member "head" to "entry".
7558 * linux-low.c (delete_lwp): Update.
7559 (add_lwp): Update.
7560 (last_thread_of_process_p): Update.
7561 (kill_one_lwp_callback, linux_kill): Update.
7562 (status_pending_p_callback): Update.
7563 (wait_for_sigstop): Update. Simplify read of ptid.
7564 (start_step_over): Update.
7565 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7566 (get_lwp_thread): Update.
7567 (struct lwp_info): Rename member "head" to "entry".
7568 * regcache.h (inferior_list_entry): Delete.
7569 * server.c (kill_inferior_callback): Update.
7570 (detach_or_kill_inferior_callback): Update.
7571 (print_started_pid): Update.
7572 (print_attached_pid): Update.
7573 (process_serial_event): Simplify read of ptid.
7574 * thread-db.c (thread_db_create_event): Update.
7575 (thread_db_get_tls_address): Update.
7576 * win32-low.c (current_inferior_ptid): Simplify.
7577
7578 2014-02-19 Tom Tromey <tromey@redhat.com>
7579
7580 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7581 argument.
7582 (target_supports_btrace): Update.
7583
7584 2014-02-14 Yao Qi <yao@codesourcery.com>
7585
7586 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7587 (rsp-low-ipa.o): New target.
7588
7589 2014-02-12 Tom Tromey <tromey@redhat.com>
7590
7591 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7592 convert_ascii_to_int.
7593 * regcache.c (registers_to_string): Likewise.
7594 * remote-utils.c (decode_M_packet): Likewise.
7595 * server.c (process_serial_event): Likewise.
7596
7597 2014-02-12 Tom Tromey <tromey@redhat.com>
7598
7599 * server.c (handle_query, handle_v_run): Use hex2bin, not
7600 unhexify.
7601 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7602
7603 2014-02-12 Tom Tromey <tromey@redhat.com>
7604
7605 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7606 convert_int_to_ascii.
7607 * regcache.c (registers_to_string, collect_register_as_string):
7608 Likewise.
7609 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7610 Likewise.
7611 * server.c (process_serial_event): Likewise.
7612 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7613 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7614
7615 2014-02-12 Tom Tromey <tromey@redhat.com>
7616
7617 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7618 bin2hex, not hexify.
7619 * tracepoint.c (cmd_qtstatus): Likewise.
7620
7621 2014-02-12 Tom Tromey <tromey@redhat.com>
7622
7623 * remote-utils.c (monitor_output): Pass explicit length to
7624 hexify.
7625
7626 2014-02-12 Tom Tromey <tromey@redhat.com>
7627
7628 * tracepoint.c: Include rsp-low.h.
7629 * server.c: Include rsp-low.h.
7630 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7631 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7632 declare.
7633 * remote-utils.c: Include rsp-low.h.
7634 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7635 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7636 (convert_int_to_ascii, convert_ascii_to_int): Move to
7637 common/rsp-low.c.
7638 * regcache.c: Include rsp-low.h.
7639 * ax.c: Include rsp-low.h.
7640 * Makefile.in (SFILES): Add common/rsp-low.c.
7641 (OBS): Add rsp-low.o.
7642 (rsp-low.o): New target.
7643
7644 2014-02-12 Tom Tromey <tromey@redhat.com>
7645
7646 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7647 Include print-utils.h.
7648 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7649 (plongest, thirty_two, phex_nz): Remove.
7650 * Makefile.in (SFILES): Add common/print-utils.c.
7651 (OBS): Add print-utils.o.
7652 (print-utils-ipa.o): New target.
7653 (print-utils.o): New target.
7654 (IPA_OBJS): Add print-utils-ipa.o.
7655
7656 2014-02-06 Tom Tromey <tromey@redhat.com>
7657
7658 * Makefile.in (SFILES): Fix indentation.
7659
7660 2014-02-05 Doug Evans <dje@google.com>
7661
7662 * linux-low.c (linux_wait_for_event): Improve comment.
7663 (linux_wait_1): Keep current_inferior in sync with event_child.
7664
7665 2014-01-22 Doug Evans <dje@google.com>
7666
7667 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7668
7669 2014-01-22 Doug Evans <dje@google.com>
7670
7671 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7672 * configure: Regenerate.
7673 * config.in: Regenerate.
7674 * Makefile.in (SFILES): Add debug.c.
7675 (OBS): Add debug.o.
7676 * debug.c: New file.
7677 * debug.h: New file.
7678 * linux-aarch64-low.c (*): Update all debugging printfs to use
7679 debug_printf instead of fprintf.
7680 * linux-arm-low.c (*): Ditto.
7681 * linux-cris-low.c (*): Ditto.
7682 * linux-crisv32-low.c (*): Ditto.
7683 * linux-m32r-low.c (*): Ditto.
7684 * linux-sparc-low.c (*): Ditto.
7685 * linux-x86.c (*): Ditto.
7686 * linux-low.c (*): Ditto.
7687 (linux_wait_1): Add calls to debug_enter, debug_exit.
7688 (linux_wait): Remove redundant debugging printf.
7689 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7690 (linux_resume, unstop_all_lwps): Ditto.
7691 * mem-break.c (*): Update all debugging printfs to use
7692 debug_printf instead of fprintf.
7693 * remote-utils.c (*): Ditto.
7694 * thread-db.c (*): Ditto.
7695 * server.c #include <ctype.h>, "gdb_vecs.h".
7696 (debug_threads): Moved to debug.c.
7697 (*): Update all debugging printfs to use debug_printf instead of
7698 fprintf.
7699 (start_inferior): Replace call to fflush with call to debug_flush.
7700 (monitor_show_help): Mention set debug-format.
7701 (parse_debug_format_options): New function.
7702 (handle_monitor_command): Handle "monitor set debug-format".
7703 (gdbserver_usage): Mention --debug-format.
7704 (main): Parse --debug-format.
7705 * server.h (debug_threads): Declaration moved to debug.h.
7706 #include "debug.h".
7707 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7708 trace_debug_1 that uses debug_printf.
7709 (tracepoint_look_up_symbols): Update all debugging printfs to use
7710 debug_printf instead of fprintf.
7711
7712 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7713
7714 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7715 sys/ptrace.h.
7716
7717 2014-01-17 Pedro Alves <palves@redhat.com>
7718
7719 PR build/16445
7720 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7721 defined after including gdb_proc_service.h.
7722
7723 2014-01-16 Doug Evans <dje@google.com>
7724
7725 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7726 (match_dll): Use it.
7727
7728 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7729
7730 * target.h (target_ops) <read_btrace>: Change parameters and
7731 return type to allow error reporting.
7732 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7733 trace reading errors on.
7734 * linux-low.c (linux_low_read_btrace): Pass trace reading
7735 errors on.
7736 (linux_low_disable_btrace): New.
7737
7738 2014-01-15 Doug Evans <dje@google.com>
7739
7740 * inferiors.c (thread_id_to_gdb_id): Delete.
7741 * inferiors.h (thread_id_to_gdb_id): Delete.
7742
7743 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7744
7745 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7746 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7747 versions.
7748
7749 2014-01-08 Pedro Alves <palves@redhat.com>
7750
7751 * server.c (handle_status): Don't discard previous queued stop
7752 replies or thread's pending status here.
7753 (main) <disconnection>: Do it here instead.
7754
7755 2014-01-08 Pedro Alves <palves@redhat.com>
7756
7757 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7758 * server.c (visit_actioned_threads, handle_pending_status): New
7759 function.
7760 (handle_v_cont): Factor out parts to ...
7761 (resume): ... this new function. If in all-stop, and a thread
7762 being resumed has a pending status, report it without actually
7763 resuming.
7764 (myresume): Adjust to use the new 'resume' function.
7765 (clear_pending_status_callback, set_pending_status_callback)
7766 (find_status_pending_thread_callback): New functions.
7767 (handle_status): Handle the case of multiple threads having
7768 interesting statuses to report. Report threads' real last signal
7769 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7770 with an interesting thread to report the status for, instead of
7771 always reporting the status of the first thread.
7772
7773 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7774
7775 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7776 * gdbreplay.c (gdbreplay_version): Likewise.
7777
7778 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7779
7780 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7781 iov.iov_len with the real length in use.
7782
7783 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7784
7785 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7786 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7787 for all targets that use win32-low.c.
7788 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7789 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7790
7791 2013-12-13 Pedro Alves <palves@redhat.com>
7792
7793 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7794 if equal to TARGET_WAITKIND_LOADED.
7795 * win32-low.c (cached_status): New static global.
7796 (win32_wait): Add declaration.
7797 (do_initial_child_stuff): Flush all initial pending debug events
7798 up to the initial breakpoint.
7799 (win32_wait): If CACHED_STATUS was set, return that instead
7800 of doing a real wait. Remove the code resuming the execution
7801 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7802 during the initial phase. Also remove the code changing
7803 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7804 TARGET_WAITKIND_STOPPED.
7805
7806 2013-12-11 Yao Qi <yao@codesourcery.com>
7807
7808 * notif.c (handle_notif_ack): Return 0 if no notification
7809 matches.
7810
7811 2013-11-20 Doug Evans <dje@google.com>
7812
7813 * linux-low.c (linux_set_resume_request): Fix comment.
7814
7815 2013-11-20 Doug Evans <dje@google.com>
7816
7817 * linux-low.c (resume_status_pending_p): Tweak comment.
7818
7819 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7820
7821 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7822 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7823 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7824 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7825 (srv_amd64_regobj): Add amd64-mpx.o.
7826 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7827 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7828 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7829 * i387-fp.c (num_pl_bnd_register) Added constant.
7830 (num_pl_bnd_cfg_registers) Added constant.
7831 (struct i387_xsave) Added reserved area and MPX fields.
7832 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7833 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7834 function.
7835 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7836 (init_registers_amd64_mpx_linux): Declare new function.
7837 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7838 (x86_64_regmap): Add MPX registers.
7839 (x86_linux_read_description): Add MPX case.
7840 (initialize_low_arch): Initialize MPX targets.
7841
7842 2013-11-18 Tom Tromey <tromey@redhat.com>
7843
7844 * configure: Rebuild.
7845 * configure.ac: Don't check for stdlib.h.
7846 * gdbreplay.c: Unconditionally include stdlib.h.
7847
7848 2013-11-18 Tom Tromey <tromey@redhat.com>
7849
7850 * config.in: Rebuild.
7851 * configure: Rebuild.
7852 * configure.ac: Don't use AC_HEADER_DIRENT.
7853
7854 2013-11-18 Tom Tromey <tromey@redhat.com>
7855
7856 * server.h: Don't check HAVE_STRING_H.
7857 * gdbreplay.c: Don't check HAVE_STRING_H.
7858 * configure: Rebuild.
7859
7860 2013-11-18 Tom Tromey <tromey@redhat.com>
7861
7862 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7863 LIBGNU.
7864
7865 2013-11-08 Tom Tromey <tromey@redhat.com>
7866
7867 * configure, config.in: Rebuild.
7868 * configure.ac: Remove unused configury.
7869
7870 2013-11-08 Tom Tromey <tromey@redhat.com>
7871
7872 * acinclude.m4: Include common.m4, codeset.m4.
7873 * configure, config.in: Rebuild.
7874 * configure.ac: Use GDB_AC_COMMON.
7875
7876 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7877
7878 * linux-s390-low.c (HWCAP_S390_TE): New define.
7879 (s390_arch_setup): Consider the TE field in the HWCAP for
7880 determining 'have_regset_tdb'.
7881
7882 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7883
7884 PR gdb/16014
7885 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7886 call to sizeof.
7887
7888 2013-10-02 Pedro Alves <palves@redhat.com>
7889
7890 * server.c (process_serial_event): Don't output "GDBserver
7891 exiting" if GDB is connected through stdio.
7892 * target.c (mywait): Likewise, be silent if GDB is connected
7893 through stdio.
7894
7895 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7896
7897 * lynx-low.c (lynx_add_threads_after_attach): New function.
7898 (lynx_attach): Remove call to add_thread. Add call to
7899 lynx_add_threads_after_attach instead.
7900
7901 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7902
7903 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7904 * config.in, configure: Regenerated.
7905
7906 2013-09-18 Yao Qi <yao@codesourcery.com>
7907
7908 PR server/15959
7909 * server.c (start_inferior): Clear 'resume_info'.
7910
7911 2013-09-16 Jiong Wang <jiwang@tilera.com>
7912
7913 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7914 for each register.
7915
7916 2013-09-16 Jiong Wang <jiwang@tilera.com>
7917
7918 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7919 linux-tile-low.o to srv_tgtobj.
7920
7921 2013-09-16 Will Newton <will.newton@linaro.org>
7922
7923 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7924 out regs.
7925
7926 2013-09-06 Pedro Alves <palves@redhat.com>
7927
7928 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7929 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7930 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7931 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7932 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7933 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7934
7935 2013-09-06 Pedro Alves <palves@redhat.com>
7936
7937 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7938 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7939
7940 2013-09-06 Pedro Alves <palves@redhat.com>
7941
7942 * linux-amd64-ipa.c: Include tracepoint.h.
7943 * linux-i386-ipa.c: Include tracepoint.h.
7944
7945 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7946
7947 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7948 (ps_get_thread_area): New function.
7949
7950 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7951
7952 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7953 (initialize_low_arch): Call init_registers_crisv32 rather than
7954 init_register_crisv32.
7955
7956 2013-09-05 Pedro Alves <palves@redhat.com>
7957
7958 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7959 to ...
7960 * hostio.h: ... this new file.
7961 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7962 win32-low.c: Include hostio.h.
7963
7964 2013-09-05 Pedro Alves <palves@redhat.com>
7965
7966 * server.h (gdb_client_data, handler_func, callback_handler_func)
7967 (delete_file_handler, add_file_handler, append_callback_event)
7968 (delete_callback_event, start_event_loop, initialize_event_loop):
7969 Move to event-loop.h and include it.
7970 * event-loop.h: New file.
7971
7972 2013-09-05 Pedro Alves <palves@redhat.com>
7973
7974 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7975 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7976 (loaded_dll, unloaded_dll): Move to ...
7977 * dll.h: ... this new file.
7978 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7979
7980 2013-09-05 Pedro Alves <palves@redhat.com>
7981
7982 * server.h (current_process, get_thread_process, all_processes)
7983 (add_inferior_to_list, for_each_inferior, current_inferior)
7984 (remove_inferior, add_process, remove_process, find_process_pid)
7985 (have_started_inferiors_p, have_attached_inferiors_p)
7986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7987 (clear_inferiors, find_inferior, find_inferior_id)
7988 (inferior_target_data, set_inferior_target_data)
7989 (inferior_regcache_data, set_inferior_regcache_data): Move to
7990 inferiors.h, and include it.
7991 * inferiors.h: New file.
7992
7993 2013-09-05 Pedro Alves <palves@redhat.com>
7994
7995 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7996 Move ...
7997 * ax.h: ... here.
7998
7999 2013-09-05 Pedro Alves <palves@redhat.com>
8000
8001 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8002 tracepoint.h.
8003 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8004 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8005 (handle_tracepoint_general_set, handle_tracepoint_query)
8006 (tracepoint_finished_step, tracepoint_was_hit)
8007 (release_while_stepping_state_list, current_traceframe)
8008 (in_readonly_region, traceframe_read_mem)
8009 (fetch_traceframe_registers, traceframe_read_sdata)
8010 (traceframe_read_info, struct fast_tpoint_collect_status)
8011 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8012 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8013 (supply_fast_tracepoint_registers)
8014 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8015 (ipa_tdesc, claim_trampoline_space)
8016 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8017 (agent_mem_read, agent_get_trace_state_variable_value)
8018 (agent_set_trace_state_variable_value, agent_tsv_read)
8019 (agent_mem_read_string, get_raw_reg_func_addr)
8020 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8021 * tracepoint.h: ... this new file.
8022
8023 2013-09-05 Pedro Alves <palves@redhat.com>
8024
8025 * server.h (perror_with_name, error, fatal, warning, paddress)
8026 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8027 include it.
8028 * utils.h: New file.
8029
8030 2013-09-05 Pedro Alves <palves@redhat.com>
8031
8032 * server.h (remote_debug, noack_mode, transport_is_reliable)
8033 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8034 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8035 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8036 (write_enn, initialize_async_io, enable_async_io)
8037 (disable_async_io, check_remote_input_interrupt_request)
8038 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8039 (dead_thread_notify, prepare_resume_reply)
8040 (decode_address_to_semicolon, decode_address, decode_m_packet)
8041 (decode_M_packet, decode_X_packet, decode_xfer_write)
8042 (decode_search_memory_packet, unhexify, hexify)
8043 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8044 (look_up_one_symbol, relocate_instruction)
8045 (monitor_output): Move to remote-utils.h, and include it.
8046 * remote-utils.h: New file.
8047
8048 2013-09-05 Pedro Alves <palves@redhat.com>
8049
8050 * server.h (_): Delete.
8051
8052 2013-09-02 Pedro Alves <palves@redhat.com>
8053
8054 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8055 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8056 allocated.
8057 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8058
8059 2013-09-02 Pierre Muller <muller@sourceware.org>
8060
8061 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8062 or WriteProcessMemory complete successfully and handle
8063 ERROR_PARTIAL_COPY error.
8064
8065 2013-09-02 Pedro Alves <palves@redhat.com>
8066
8067 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8068 error instead of EIO.
8069
8070 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8071
8072 PR server/15604
8073 * linux-low.c: Include filestuff.h.
8074 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8075 * lynx-low.c: Include filestuff.h.
8076 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8077 * server.c: Include filestuff.h.
8078 (main): Call notice_open_fds.
8079 * spu-low.c: Include filestuff.h.
8080 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8081
8082 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8083
8084 * Makefile.in: Explain why ../target and ../nat are not
8085 listed as include file search paths.
8086 (linux-waitpid.o): New object file rule.
8087 * configure.srv (srv_native_linux_obj): New variable.
8088 Replace all occurrences of linux native object files with
8089 $srv_native_linux_obj.
8090 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8091 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8092 (linux_enable_event_reporting): Remove declaration.
8093 (my_waitpid): Moved to common/linux-waitpid.c.
8094 (linux_wait_for_event): Pass ptid when calling
8095 linux_enable_event_reporting.
8096 (linux_supports_tracefork_flag): Remove.
8097 (linux_enable_event_reporting): Likewise.
8098 (linux_tracefork_grandchild): Remove.
8099 (STACK_SIZE): Moved to common/linux-ptrace.c.
8100 (linux_tracefork_child): Remove.
8101 (linux_test_for_tracefork): Remove.
8102 (linux_look_up_symbols): Call linux_supports_traceclone.
8103 (initialize_low): Remove call to linux_test_for_tracefork.
8104 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8105 common/linux-ptrace.h.
8106 (PTRACE_TYPE_ARG4): Likewise.
8107 Include linux-ptrace.h.
8108
8109 2013-08-21 Pedro Alves <palves@redhat.com>
8110
8111 * config.in: Renegerate.
8112
8113 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8114
8115 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8116 (SFILES): Remove $(srcdir)/common/target-common.c and
8117 add $(srcdir)/target/waitstatus.c.
8118 (OBS): Remove target-common.o and add waitstatus.o.
8119 (server_h): Remove $(srcdir)/../common/target-common.h and
8120 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8121 and $(srcdir)/../target/waitstatus.h.
8122 (target-common.o): Remove.
8123 (waitstatus.o): New target object file.
8124 * target.h: Do not include target-common.h and
8125 include target/resume.h, target/wait.h and
8126 target/waitstatus.h.
8127
8128 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8129
8130 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8131 to PTRACE_TYPE_ARG3.
8132 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8133 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8134 PTRACE_TYPE_ARG4.
8135 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8136 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8137
8138 2013-07-27 Jie Zhang <jie@codesourcery.com>
8139 Daniel Jacobowitz <dan@codesourcery.com>
8140 Yao Qi <yao@codesourcery.com>
8141
8142 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8143 (mips-linux-watch.o): New rule.
8144 (mips_linux_watch_h): New variable.
8145 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8146 srv_tgtobj.
8147 * linux-mips-low.c: Include mips-linux-watch.h.
8148 (struct arch_process_info, struct arch_lwp_info): New.
8149 (update_watch_registers_callback): New function.
8150 (mips_linux_new_process, mips_linux_new_thread) New functions.
8151 (mips_linux_prepare_to_resume, mips_insert_point): New
8152 functions.
8153 (mips_remove_point, mips_stopped_by_watchpoint): New
8154 functions.
8155 (rsp_bp_type_to_target_hw_bp_type): New function.
8156 (mips_stopped_data_address): New function.
8157 (the_low_target): Add watchpoint support functions.
8158
8159 2013-07-27 Yao Qi <yao@codesourcery.com>
8160
8161 * i386-low.c: Include break-common.h.
8162 (enum target_hw_bp_type): Remove.
8163
8164 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8165
8166 * Makefile.in (SFILES): /common/target-common.c.
8167 (OBS): Add target-common.o.
8168 (server_h): Add $(srcdir)/../common/target-common.h.
8169 (target-common.o): New target.
8170 * server.c (queue_stop_reply_callback): Free
8171 status string after use.
8172 * target.c (target_waitstatus_to_string): Remove.
8173 * target.h: Include target-common.h.
8174 (resume_kind): Likewise.
8175 (target_waitkind): Likewise.
8176 (target_waitstatus): Likewise.
8177 (TARGET_WNOHANG): Likewise.
8178
8179 2013-07-04 Yao Qi <yao@codesourcery.com>
8180
8181 * Makefile.in (host_alias): Use @host_noncanonical@.
8182 (target_alias): Use @target_noncanonical@.
8183 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8184 ACX_NONCANONICAL_HOST.
8185 * configure: Regenerated.
8186
8187 Revert:
8188 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8189
8190 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8191 * configure: Rebuild.
8192 * Makefile.in (version_host, version_target): Get from configure.
8193 (version.c): Use $(version_host) and $(version_target).
8194
8195 2013-07-03 Pedro Alves <palves@redhat.com>
8196
8197 * Makefile.in (config.status): Depend on development.sh.
8198 * acinclude.m4: Include libmcheck.m4.
8199 * configure: Regenerate.
8200
8201 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8202
8203 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8204 attribute inside the parentheses.
8205 (winapi_DebugSetProcessKillOnExit): Ditto.
8206 (winapi_DebugBreakProcess): Ditto.
8207 (winapi_GenerateConsoleCtrlEvent): Ditto.
8208
8209 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8210
8211 * notif.h (notif_event): Add a dummy member to avoid compiler
8212 errors.
8213
8214 2013-07-01 Pedro Alves <palves@redhat.com>
8215
8216 * hostio.c (HOSTIO_PATH_MAX): Define.
8217 (require_filename, handle_open, handle_unlink, handle_readlink):
8218 Use it.
8219
8220 2013-07-01 Pedro Alves <palves@redhat.com>
8221
8222 * server.h: Include "pathmax.h".
8223 * linux-low.c: Don't include sys/param.h.
8224 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8225 MAXPATHLEN.
8226 * win32-low.c: Don't include sys/param.h.
8227 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8228
8229 2013-07-01 Pedro Alves <palves@redhat.com>
8230
8231 * event-loop.c: Don't check HAVE_UNISTD_H before including
8232 <unistd.h>.
8233 * gdbreplay.c: Likewise.
8234 * remote-utils.c: Likewise.
8235 * server.c: Likewise.
8236 * configure.ac: Don't check for unistd.h.
8237 * configure: Regenerate.
8238
8239 2013-06-28 Tom Tromey <tromey@redhat.com>
8240
8241 * Makefile.in (version.c): Use version.in, not
8242 common/version.in.
8243
8244 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8245
8246 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8247 * configure: Rebuild.
8248 * Makefile.in (version_host, version_target): Get from configure.
8249 (version.c): Use $(version_host) and $(version_target).
8250
8251 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8252
8253 Fix trace-status to output user name without trailing colon.
8254 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8255
8256 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8257
8258 Fix trace-status to output proper start-time and stop-time.
8259 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8260 output start time and stop time in hex as gdb expects.
8261
8262 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8263
8264 * tracepoint.c (build_traceframe_info_xml): Output trace state
8265 variables present in the trace buffer.
8266
8267 2013-06-24 Tom Tromey <tromey@redhat.com>
8268
8269 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8270 create-version.sh.
8271 (version.o): Remove.
8272 * gdbreplay.c: Include version.h.
8273 (version, host_name): Don't declare.
8274 * server.h: Include version.h.
8275 (version, host_name): Don't declare.
8276
8277 2013-06-12 Pedro Alves <palves@redhat.com>
8278
8279 * linux-x86-low.c (linux_is_elf64): Delete global.
8280 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8281 with local linux_pid_exe_is_elf_64_file use.
8282
8283 2013-06-11 Pedro Alves <palves@redhat.com>
8284
8285 * linux-low.c (regset_disabled, disable_regset): New functions.
8286 (regsets_fetch_inferior_registers)
8287 (regsets_store_inferior_registers): Use them.
8288 (initialize_regsets_info); Don't allocate the disabled_regsets
8289 array here.
8290 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8291 comment.
8292
8293 2013-06-11 Pedro Alves <palves@redhat.com>
8294
8295 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8296 xmalloc.
8297
8298 2013-06-11 Pedro Alves <palves@redhat.com>
8299
8300 * linux-x86-low.c (initialize_low_arch): Call
8301 init_registers_x32_avx_linux.
8302
8303 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8304
8305 Fix compatibility with Android Bionic.
8306 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8307 it is not empty.
8308
8309 2013-06-07 Pedro Alves <palves@redhat.com>
8310
8311 PR server/14823
8312 * Makefile.in (OBS): Add tdesc.o.
8313 (IPA_OBJS): Add tdesc-ipa.o.
8314 (tdesc-ipa.o): New rule.
8315 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8316 interface.
8317 * linux-low.c (new_inferior): Delete.
8318 (disabled_regsets, num_regsets): Delete.
8319 (linux_add_process): Adjust to set the new per-process
8320 new_inferior flag.
8321 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8322 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8323 was a stop. When calling arch_setup, switch the current inferior
8324 to the thread that got an event.
8325 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8326 (regsets_fetch_inferior_registers)
8327 (regsets_store_inferior_registers): New regsets_info parameter.
8328 Adjust to use it.
8329 (linux_register_in_regsets): New regs_info parameter. Adjust to
8330 use it.
8331 (register_addr, fetch_register, store_register): New usrregs_info
8332 parameter. Adjust to use it.
8333 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8334 parameter regs_info. Adjust to use it.
8335 (linux_fetch_registers): Get the current inferior's regs_info, and
8336 adjust to use it.
8337 (linux_store_registers): Ditto.
8338 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8339 (initialize_low): Don't initialize the target_regsets here. Call
8340 initialize_low_arch.
8341 * linux-low.h (target_regsets): Delete declaration.
8342 (struct regsets_info): New.
8343 (struct usrregs_info): New.
8344 (struct regs_info): New.
8345 (struct process_info_private) <new_inferior>: New field.
8346 (struct linux_target_ops): Delete the num_regs, regmap, and
8347 regset_bitmap fields. New field regs_info.
8348 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8349 * i387-fp.c (num_xmm_registers): Delete.
8350 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8351 calls to new interface.
8352 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8353 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8354 Infer the number of xmm registers from the regcache's target
8355 description.
8356 * i387-fp.h (num_xmm_registers): Delete.
8357 * inferiors.c (add_thread): Don't install the thread's regcache
8358 here.
8359 * proc-service.c (gregset_info): Fetch the current inferior's
8360 regs_info. Adjust to use it.
8361 * regcache.c: Include tdesc.h.
8362 (register_bytes, reg_defs, num_registers)
8363 (gdbserver_expedite_regs): Delete.
8364 (get_thread_regcache): If the thread doesn't have a regcache yet,
8365 create one, instead of aborting gdbserver.
8366 (regcache_invalidate_one): Rename to ...
8367 (regcache_invalidate_thread): ... this.
8368 (regcache_invalidate_one): New.
8369 (regcache_invalidate): Only invalidate registers of the current
8370 process.
8371 (init_register_cache): Add target_desc parameter, and use it.
8372 (new_register_cache): Ditto. Assert the target description has a
8373 non zero registers_size.
8374 (regcache_cpy): Add assertions. Adjust.
8375 (realloc_register_cache, set_register_cache): Delete.
8376 (registers_to_string, registers_from_string): Adjust.
8377 (find_register_by_name, find_regno, find_register_by_number)
8378 (register_cache_size): Add target_desc parameter, and use it.
8379 (free_register_cache_thread, free_register_cache_thread_one)
8380 (regcache_release, register_cache_size): New.
8381 (register_size): Add target_desc parameter, and use it.
8382 (register_data, supply_register, supply_register_zeroed)
8383 (supply_regblock, supply_register_by_name, collect_register)
8384 (collect_register_as_string, collect_register_by_name): Adjust.
8385 * regcache.h (struct target_desc): Forward declare.
8386 (struct regcache) <tdesc>: New field.
8387 (init_register_cache, new_register_cache): Add target_desc
8388 parameter.
8389 (regcache_invalidate_thread): Declare.
8390 (regcache_invalidate_one): Delete declaration.
8391 (regcache_release): Declare.
8392 (find_register_by_number, register_cache_size, register_size)
8393 (find_regno): Add target_desc parameter.
8394 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8395 declarations.
8396 * remote-utils.c: Include tdesc.h.
8397 (outreg, prepare_resume_reply): Adjust.
8398 * server.c: Include tdesc.h.
8399 (gdbserver_xmltarget): Delete declaration.
8400 (get_features_xml, process_serial_event): Adjust.
8401 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8402 declare.
8403 (struct process_info) <tdesc>: New field.
8404 (ipa_tdesc): Declare.
8405 * tdesc.c: New file.
8406 * tdesc.h: New file.
8407 * tracepoint.c: Include tdesc.h.
8408 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8409 (get_context_regcache): Adjust to pass ipa_tdesc down.
8410 (do_action_at_tracepoint): Adjust to get the register cache size
8411 from the context regcache's description.
8412 (traceframe_walk_blocks): Adjust to get the register cache size
8413 from the current trace frame's description.
8414 (traceframe_get_pc): Adjust to get current trace frame's
8415 description and pass it down.
8416 (gdb_collect): Adjust to get the register cache size from the
8417 IPA's description.
8418 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8419 (gdbserver_xmltarget): Delete.
8420 (initialize_low_tracepoint): Set the ipa's target description.
8421 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8422 (initialize_low_tracepoint): Set the ipa's target description.
8423 * linux-x86-low.c: Include tdesc.h.
8424 [__x86_64__] (is_64bit_tdesc): New.
8425 (ps_get_thread_area, x86_get_thread_area): Use it.
8426 (i386_cannot_store_register): Rename to ...
8427 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8428 (i386_cannot_fetch_register): Rename to ...
8429 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8430 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8431 to new interface.
8432 (target_regsets): Rename to ...
8433 (x86_regsets): ... this.
8434 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8435 interface.
8436 (x86_siginfo_fixup): Use is_64bit_tdesc.
8437 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8438 (tdesc_x32_avx_linux, tdesc_x32_linux)
8439 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8440 Declare.
8441 (x86_linux_update_xmltarget): Delete.
8442 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8443 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8444 (AMD64_LINUX_USER64_CS): New.
8445 (x86_linux_read_description): New, based on
8446 x86_linux_update_xmltarget.
8447 (same_process_callback): New.
8448 (x86_arch_setup_process_callback): New.
8449 (x86_linux_update_xmltarget): New.
8450 (x86_regsets_info): New.
8451 (amd64_linux_regs_info): New.
8452 (i386_linux_usrregs_info): New.
8453 (i386_linux_regs_info): New.
8454 (x86_linux_regs_info): New.
8455 (x86_arch_setup): Reimplement.
8456 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8457 (x86_emit_ops): Ditto.
8458 (the_low_target): Adjust. Install x86_linux_regs_info,
8459 x86_cannot_fetch_register, and x86_cannot_store_register.
8460 (initialize_low_arch): New.
8461 * linux-ia64-low.c (tdesc_ia64): Declare.
8462 (ia64_fetch_register): Adjust.
8463 (ia64_usrregs_info, regs_info): New globals.
8464 (ia64_regs_info): New function.
8465 (the_low_target): Adjust.
8466 (initialize_low_arch): New function.
8467 * linux-sparc-low.c (tdesc_sparc64): Declare.
8468 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8469 Adjust.
8470 (sparc_arch_setup): New function.
8471 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8472 (the_low_target): Adjust.
8473 (initialize_low_arch): New function.
8474 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8475 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8476 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8477 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8478 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8479 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8480 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8481 (tdesc_powerpc_isa205_vsx64l): Declare.
8482 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8483 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8484 (ppc_set_pc, ppc_get_hwcap): Adjust.
8485 (ppc_usrregs_info): Forward declare.
8486 (!__powerpc64__) ppc_regmap_adjusted: New global.
8487 (ppc_arch_setup): Adjust to the current process'es target
8488 description.
8489 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8490 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8491 (ppc_store_evrregset): Adjust.
8492 (target_regsets): Rename to ...
8493 (ppc_regsets): ... this, and make static.
8494 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8495 (ppc_regs_info): New function.
8496 (the_low_target): Adjust.
8497 (initialize_low_arch): New function.
8498 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8499 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8500 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8501 (tdesc_s390x_linux64v2): Declare.
8502 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8503 (s390_fill_gregset, s390_store_last_break): Adjust.
8504 (target_regsets): Rename to ...
8505 (s390_regsets): ... this, and make static.
8506 (s390_get_pc, s390_set_pc): Adjust.
8507 (s390_get_hwcap): New target_desc parameter, and use it.
8508 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8509 (s390_arch_setup): Adjust to set the current process'es target
8510 description. Don't adjust the regmap.
8511 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8512 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8513 (regs_info_3264): New globals.
8514 (s390_regs_info): New function.
8515 (the_low_target): Adjust.
8516 (initialize_low_arch): New function.
8517 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8518 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8519 [__mips64] (init_registers_mips_linux)
8520 (init_registers_mips_dsp_linux): Delete defines.
8521 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8522 (have_dsp): New global.
8523 (mips_read_description): New, based on mips_arch_setup.
8524 (mips_arch_setup): Reimplement.
8525 (get_usrregs_info): New function.
8526 (mips_cannot_fetch_register, mips_cannot_store_register)
8527 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8528 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8529 (target_regsets): Rename to ...
8530 (mips_regsets): ... this, and make static.
8531 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8532 (dsp_regs_info, regs_info): New globals.
8533 (mips_regs_info): New function.
8534 (the_low_target): Adjust.
8535 (initialize_low_arch): New function.
8536 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8537 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8538 Declare.
8539 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8540 (arm_read_description): New, with bits factored from
8541 arm_arch_setup.
8542 (arm_arch_setup): Reimplement.
8543 (target_regsets): Rename to ...
8544 (arm_regsets): ... this, and make static.
8545 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8546 (arm_regs_info): New function.
8547 (the_low_target): Adjust.
8548 (initialize_low_arch): New function.
8549 * linux-m68k-low.c (tdesc_m68k): Declare.
8550 (target_regsets): Rename to ...
8551 (m68k_regsets): ... this, and make static.
8552 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8553 (m68k_regs_info): New function.
8554 (m68k_arch_setup): New function.
8555 (the_low_target): Adjust.
8556 (initialize_low_arch): New function.
8557 * linux-sh-low.c (tdesc_sharch): Declare.
8558 (target_regsets): Rename to ...
8559 (sh_regsets): ... this, and make static.
8560 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8561 (sh_regs_info, sh_arch_setup): New functions.
8562 (the_low_target): Adjust.
8563 (initialize_low_arch): New function.
8564 * linux-bfin-low.c (tdesc_bfin): Declare.
8565 (bfin_arch_setup): New function.
8566 (bfin_usrregs_info, regs_info): New globals.
8567 (bfin_regs_info): New function.
8568 (the_low_target): Adjust.
8569 (initialize_low_arch): New function.
8570 * linux-cris-low.c (tdesc_cris): Declare.
8571 (cris_arch_setup): New function.
8572 (cris_usrregs_info, regs_info): New globals.
8573 (cris_regs_info): New function.
8574 (the_low_target): Adjust.
8575 (initialize_low_arch): New function.
8576 * linux-cris-low.c (tdesc_crisv32): Declare.
8577 (cris_arch_setup): New function.
8578 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8579 (cris_regs_info): New function.
8580 (the_low_target): Adjust.
8581 (initialize_low_arch): New function.
8582 * linux-m32r-low.c (tdesc_m32r): Declare.
8583 (m32r_arch_setup): New function.
8584 (m32r_usrregs_info, regs_info): New globals.
8585 (m32r_regs_info): Adjust.
8586 (initialize_low_arch): New function.
8587 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8588 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8589 (tic6x_usrregs_info): Forward declare.
8590 (tic6x_read_description): New function, based on ...
8591 (tic6x_arch_setup): ... this. Reimplement.
8592 (target_regsets): Rename to ...
8593 (tic6x_regsets): ... this, and make static.
8594 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8595 (tic6x_regs_info): New function.
8596 (the_low_target): Adjust.
8597 (initialize_low_arch): New function.
8598 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8599 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8600 (target_regsets): Rename to ...
8601 (xtensa_regsets): ... this, and make static.
8602 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8603 globals.
8604 (xtensa_arch_setup, xtensa_regs_info): New functions.
8605 (the_low_target): Adjust.
8606 (initialize_low_arch): New function.
8607 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8608 (nios2_arch_setup): Set the current process'es tdesc.
8609 (target_regsets): Rename to ...
8610 (nios2_regsets): ... this.
8611 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8612 (nios2_regs_info): New function.
8613 (the_low_target): Adjust.
8614 (initialize_low_arch): New function.
8615 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8616 (aarch64_arch_setup): Set the current process'es tdesc.
8617 (target_regsets): Rename to ...
8618 (aarch64_regsets): ... this.
8619 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8620 (aarch64_regs_info): New function.
8621 (the_low_target): Adjust.
8622 (initialize_low_arch): New function.
8623 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8624 globals.
8625 (target_regsets): Rename to ...
8626 (tile_regsets): ... this.
8627 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8628 (tile_regs_info): New function.
8629 (tile_arch_setup): Set the current process'es tdesc.
8630 (the_low_target): Adjust.
8631 (initialize_low_arch): New function.
8632 * spu-low.c (tdesc_spu): Declare.
8633 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8634 * win32-arm-low.c (tdesc_arm): Declare.
8635 (arm_arch_setup): New function.
8636 (the_low_target): Install arm_arch_setup instead of
8637 init_registers_arm.
8638 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8639 (init_windows_x86): Rename to ...
8640 (i386_arch_setup): ... this. Set `win32_tdesc'.
8641 (the_low_target): Adjust.
8642 * win32-low.c (win32_tdesc): New global.
8643 (child_add_thread): Don't create the thread cache here.
8644 (do_initial_child_stuff): Set the new process'es tdesc.
8645 * win32-low.h (struct target_desc): Forward declare.
8646 (win32_tdesc): Declare.
8647 * lynx-i386-low.c (tdesc_i386): Declare global.
8648 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8649 * lynx-low.c (lynx_tdesc): New global.
8650 (lynx_add_process): Set the new process'es tdesc.
8651 * lynx-low.h (struct target_desc): Forward declare.
8652 (lynx_tdesc): Declare global.
8653 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8654 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8655 * nto-low.c (nto_tdesc): New global.
8656 (do_attach): Set the new process'es tdesc.
8657 * nto-low.h (struct target_desc): Forward declare.
8658 (nto_tdesc): Declare.
8659 * nto-x86-low.c (tdesc_i386): Declare.
8660 (nto_x86_arch_setup): Set `nto_tdesc'.
8661
8662 2013-06-04 Gary Benson <gbenson@redhat.com>
8663
8664 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8665 to qSupported response when appropriate.
8666 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8667 with nonzero-length annex.
8668 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8669 arguments supplied in annex.
8670
8671 2013-05-31 Doug Evans <dje@google.com>
8672
8673 PR server/15594
8674 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8675 64 bits in 64-cross-32 environment.
8676
8677 2013-05-28 Pedro Alves <palves@redhat.com>
8678
8679 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8680 (aarch64-without-fpu.c): Delete rule.
8681 * configure.srv (aarch64*-*-linux*): Remove references to
8682 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8683 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8684 declaration.
8685
8686 2013-05-24 Pedro Alves <palves@redhat.com>
8687
8688 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8689 instead of strchr/decode_address. Error if the range isn't split
8690 with a ','. Don't assume there's be a ':' in the action.
8691
8692 2013-05-23 Yao Qi <yao@codesourcery.com>
8693 Pedro Alves <palves@redhat.com>
8694
8695 * linux-low.c (lwp_in_step_range): New function.
8696 (linux_wait_1): If the thread was range stepping and stopped
8697 outside the stepping range, report the stop to GDB. Otherwise,
8698 continue stepping. Add range stepping debug output.
8699 (linux_set_resume_request): Copy the step range from the resume
8700 request to the lwp.
8701 (linux_supports_range_stepping): New.
8702 (linux_target_ops) <supports_range_stepping>: Set to
8703 linux_supports_range_stepping.
8704 * linux-low.h (struct linux_target_ops)
8705 <supports_range_stepping>: New field.
8706 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8707 * linux-x86-low.c (x86_supports_range_stepping): New.
8708 (the_low_target) <supports_range_stepping>: Set to
8709 x86_supports_range_stepping.
8710 * server.c (handle_v_cont): Handle 'r' action.
8711 (handle_v_requests): Append ";r" if the target supports range
8712 stepping.
8713 * target.h (struct thread_resume) <step_range_start,
8714 step_range_end>: New fields.
8715 (struct target_ops) <supports_range_stepping>:
8716 New field.
8717 (target_supports_range_stepping): New macro.
8718
8719 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8720
8721 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8722 confusion in comment.
8723
8724 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8725
8726 * lynx-low.c (struct process_info_private): New type.
8727 (lynx_add_process): New function.
8728 (lynx_create_inferior, lynx_attach): Replace calls to
8729 add_process by calls to lynx_add_process.
8730 (lynx_resume): If PTID is null, then try using
8731 current_process()->private->last_wait_event_ptid.
8732 Add comments.
8733 (lynx_clear_inferiors): Delete. The contents of that function
8734 has been inlined in lynx_mourn;
8735 (lynx_wait_1): Save the ptid in the process's private data.
8736 (lynx_mourn): Free the process' private data. Replace call
8737 to lynx_clear_inferiors by call to clear_inferiors.
8738
8739 2013-05-17 Yao Qi <yao@codesourcery.com>
8740
8741 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8742 the right place.
8743
8744 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8745
8746 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8747 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8748 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8749 PT_TEXT_END_ADDR guards. Update comments.
8750 (linux_target_op) <read_offsets>: Conditionally define to
8751 linux_read_offsets if the target is UCLIBC and if it defines
8752 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8753
8754 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8755 Andrew Jenner <andrew@codesourcery.com>
8756
8757 * Makefile.in (SFILES): Add linux-nios2-low.c.
8758 (clean): Add action to delete nios2-linux.c.
8759 (nios2-linux.c): New rule.
8760 * configure.srv: Add nios2*-*-linux*.
8761 * linux-nios2-low.c: New.
8762
8763 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8764
8765 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8766
8767 2013-04-25 Hui Zhu <hui@codesourcery.com>
8768
8769 PR gdb/15186
8770 * ax.c (ax_printf): Add fflush.
8771
8772 2013-04-22 Tom Tromey <tromey@redhat.com>
8773
8774 * Makefile.in (SFILES): Add filestuff.c.
8775 (OBS): Add filestuff.o.
8776 (filestuff.o): New target.
8777 * config.in, configure: Rebuild.
8778 * configure.ac: Check for fdwalk, pipe2.
8779
8780 2013-04-17 Pedro Alves <palves@redhat.com>
8781
8782 * configure.ac (USE_THREAD_DB): Delete variable.
8783 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8784 Don't AC_SUBST USE_THREAD_DB.
8785 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8786 * config.in, configure: Regenerate.
8787
8788 2013-04-16 Pedro Alves <palves@redhat.com>
8789
8790 * linux-low.h (struct lwp_info) <thread_known>: Move under
8791 the USE_THREAD_DB #ifdef.
8792
8793 2013-04-16 Pedro Alves <palves@redhat.com>
8794
8795 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8796 (linux-low.o): Delete rule.
8797 * linux-low.h: Always include "gdb_thread_db.h" instead of
8798 conditionally including thread_db.h.
8799 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8800 HAVE_THREAD_DB_H.
8801
8802 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8803
8804 * Makefile.in (install-only): Fix make install regression.
8805
8806 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8807
8808 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8809 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8810 installation.
8811 * gdbserver.1: Remove.
8812
8813 2013-03-22 Pedro Alves <palves@redhat.com>
8814
8815 * linux-low.c (handle_extended_wait): Don't call
8816 linux_enable_event_reporting.
8817
8818 2013-03-15 Tony Theodore <tonyt@logyst.com>
8819
8820 PR build/9098:
8821 * Makefile.in (SHELL): Use @SHELL@.
8822
8823 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8824
8825 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8826 compiler warning.
8827
8828 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8829
8830 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8831 Remove extraneous NULL element.
8832
8833 2013-03-13 Yao Qi <yao@codesourcery.com>
8834
8835 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8836 'V' block in trace frame.
8837
8838 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8839
8840 * target.h (struct target_ops): Add btrace ops.
8841 (target_supports_btrace): New macro.
8842 (target_enable_btrace): New macro.
8843 (target_disable_btrace): New macro.
8844 (target_read_btrace): New macro.
8845 * gdbthread.h (struct thread_info): Add btrace field.
8846 * server.c: Include btrace-common.h.
8847 (handle_btrace_general_set): New function.
8848 (handle_btrace_enable): New function.
8849 (handle_btrace_disable): New function.
8850 (handle_general_set): Call handle_btrace_general_set.
8851 (handle_qxfer_btrace): New function.
8852 (struct qxfer qxfer_packets[]): Add btrace entry.
8853 * inferiors.c (remove_thread): Disable btrace.
8854 * linux-low: Include linux-btrace.h.
8855 (linux_low_enable_btrace): New function.
8856 (linux_low_read_btrace): New function.
8857 (linux_target_ops): Add btrace ops.
8858 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8859 Add srv_linux_btrace=yes.
8860 (x86_64-*-linux*): Add linux-btrace.o.
8861 Add srv_linux_btrace=yes.
8862 * configure.ac: Define HAVE_LINUX_BTRACE.
8863 * config.in: Regenerated.
8864 * configure: Regenerated.
8865
8866 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8867
8868 * server.c (handle_qxfer): Preserve error message if -3 is
8869 returned.
8870 (qxfer): Document the -3 return value.
8871
8872 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8873
8874 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8875 (linux_btrace_h): New variable.
8876 (linux-btrace.o): New rule.
8877
8878 2013-03-08 Stan Shebs <stan@codesourcery.com>
8879 Hafiz Abid Qadeer <abidh@codesourcery.com>
8880
8881 * tracepoint.c (trace_buffer_size): New global.
8882 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8883 (init_trace_buffer): Change to one-argument function. Allocate
8884 trace buffer memory.
8885 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8886 handle QTBuffer:size packet.
8887 (cmd_bigqtbuffer_size): New function.
8888 (initialize_tracepoint): Call init_trace_buffer with
8889 DEFAULT_TRACE_BUFFER_SIZE.
8890 * server.c (handle_query): Add QTBuffer:size in the
8891 supported packets.
8892
8893 2013-03-07 Yao Qi <yao@codesourcery.com>
8894
8895 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8896 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8897 of -1.
8898 (cmd_qtsp): Adjust condition. Do post increment.
8899 Set cur_action and cur_step_action back to 0.
8900
8901 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8902
8903 PR server/15236
8904 * linux-low.c (linux_write_memory): Return early success if LEN is
8905 zero.
8906
8907 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8908
8909 * configure.srv: Add x86_64-*-cygwin* as target.
8910
8911 2013-02-28 Tom Tromey <tromey@redhat.com>
8912
8913 * configure.ac: Invoke AC_SYS_LARGEFILE.
8914 * configure, config.in: Rebuild.
8915
8916 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8917
8918 * win32-low.c: Throughout, fix format strings and casts of
8919 printf-like functions to avoid type related warnings on all
8920 platforms.
8921 (get_child_debug_event): Print dwDebugEventCode as hex since
8922 that's how it's usually documented.
8923
8924 2013-02-28 Yao Qi <yao@codesourcery.com>
8925
8926 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8927 pulongest.
8928
8929 2013-02-27 Jiong Wang <jiwang@tilera.com>
8930
8931 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8932 (reg-tilegx32.c): New rule.
8933 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8934 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8935 different register info initializer according to elf class.
8936 (init_registers_tilgx32): New function. The tilegx32 register info
8937 initializer.
8938 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8939 (tile_store_gregset): Likewise.
8940
8941 2013-02-27 Yao Qi <yao@codesourcery.com>
8942
8943 * server.c (process_point_options): Print debug message when
8944 debug_threads is true.
8945
8946 2013-02-26 Yao Qi <yao@codesourcery.com>
8947
8948 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8949
8950 2013-02-19 Pedro Alves <palves@redhat.com>
8951 Kai Tietz <ktietz@redhat.com>
8952
8953 PR gdb/15161
8954
8955 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8956 instead of strtoul to extract address from packet.
8957 (process_serial_event) <'z'>: Likewise.
8958
8959 2013-02-18 Yao Qi <yao@codesourcery.com>
8960
8961 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8962
8963 2013-02-14 Pedro Alves <palves@redhat.com>
8964
8965 Plug memory leak.
8966
8967 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8968 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8969
8970 2013-02-14 Pedro Alves <palves@redhat.com>
8971
8972 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8973
8974 2013-02-14 Pedro Alves <palves@redhat.com>
8975
8976 * tracepoint.c (save_string): Delete.
8977 (add_tracepoint_action): Use savestring instead of save_string.
8978
8979 2013-02-12 Pedro Alves <palves@redhat.com>
8980
8981 * linux-xtensa-low.c: Ditto.
8982 * xtensa-xtregs.c: Ditto.
8983
8984 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8985
8986 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8987 thread_db.
8988
8989 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8990
8991 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8992 aarch64_num_wp_regs and aarch64_num_bp_regs to
8993 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8994
8995 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8996
8997 * linux-aarch64-low.c (ps_get_thread_area): Replace
8998 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8999
9000 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9001 Marcus Shawcroft <marcus.shawcroft@arm.com>
9002 Nigel Stephens <nigel.stephens@arm.com>
9003 Yufeng Zhang <yufeng.zhang@arm.com>
9004
9005 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9006 (aarch64.c, aarch64-without-fpu.c): New targets.
9007 * configure.srv (aarch64*-*-linux*): New.
9008 * linux-aarch64-low.c: New file.
9009
9010 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9011
9012 * linux-low.c (handle_extended_wait, linux_create_inferior)
9013 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9014 (dequeue_one_deferred_signal, linux_resume_one_thread)
9015 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9016 (linux_tracefork_grandchild, linux_test_for_tracefork)
9017 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9018 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9019 where the argument is 0.
9020
9021 2013-01-25 Yao Qi <yao@codesourcery.com>
9022
9023 * event-loop.c: Include "queue.h".
9024 (gdb_event_p): New typedef.
9025 (struct gdb_event) <next_event>: Remove.
9026 (event_queue): Change to QUEUE(gdb_event_p).
9027 (async_queue_event): Remove.
9028 (gdb_event_xfree): New.
9029 (initialize_event_loop): New.
9030 (process_event): Use API from QUEUE.
9031 (wait_for_event): Likewise.
9032 * server.c (main): Call initialize_event_loop.
9033 * server.h (initialize_event_loop): Declare.
9034
9035 2013-01-18 Yao Qi <yao@codesourcery.com>
9036
9037 * ax.h (struct eval_agent_expr_context): New.
9038 (gdb_eval_agent_expr): Update declaration.
9039 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9040 TFRAME. Add new argument CTX.
9041 * server.h (struct eval_agent_expr_context): Declare.
9042 (agent_mem_read, agent_tsv_read): Update declaration.
9043 (agent_mem_read_string): Likewise.
9044 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9045 (add_traceframe_block): Add new argument TPOINT.
9046 Increase TPOINT->traceframe_usage.
9047 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9048 eval_tracepoint_agent_expr.
9049 (condition_true_at_tracepoint): Likewise.
9050 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9051 (agent_mem_read_string, agent_tsv_read): Likewise.
9052
9053 2013-01-16 Yao Qi <yao@codesourcery.com>
9054
9055 * linux-low.c (linux_resume_one_lwp): Don't check
9056 'lwp->bp_reinsert != 0'.
9057
9058 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9059 Pedro Alves <palves@redhat.com>
9060
9061 * lynx-low.c (ptrace_request_to_str): Define a temporary
9062 macro and use it to simplify this function's implementation.
9063
9064 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9065
9066 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9067 sets errno.
9068
9069 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9070
9071 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9072
9073 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9074
9075 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9076
9077 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9078
9079 * lynx-low.c (lynx_resume): Use the resume_info parameter
9080 to determine the ptid for the lynx_ptrace call, unless
9081 it is equal to minus_one_ptid, in which case we use the
9082 ptid of the current_inferior.
9083 (lynx_wait_1): After having received a thread create/exit
9084 event, resume the inferior's execution using the signaling
9085 thread's ptid, rather than the old ptid.
9086
9087 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9088
9089 * lynx-low.c (lynx_resume): Delete variable ret.
9090
9091 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9092
9093 * gdbreplay.c (gdbreplay_version): Update copyright year.
9094 * server.c (gdbserver_version): Likewise.
9095
9096 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9097
9098 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9099 new thread.
9100
9101 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9102
9103 * lynx-low.c (ptrace_request_to_str): Add handling for
9104 PTRACE_GETTRACESIG.
9105
9106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9107
9108 * lynx-low.c (lynx_attach): Delete variable new_process.
9109
9110 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9111
9112 * lynx-low.c (lynx_create_inferior): Delete variable
9113 new_process.
9114
9115 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9116
9117 * lynx-low.c (ptrace_request_to_str): Do not handle
9118 PTRACE_GETTHREADLIST if this macro does not exist.
9119
9120 2012-12-15 Yao Qi <yao@codesourcery.com>
9121
9122 * Makefile.in (OBS): Add notif.o.
9123 * notif.c, notif.h: New.
9124 * server.c: Include "notif.h".
9125 (struct vstop_notif) <next>: Remove.
9126 <base>: New field.
9127 (queue_stop_reply): Update.
9128 (push_event, send_next_stop_reply): Remove.
9129 (discard_queued_stop_replies): Update.
9130 (notif_stop): New variable.
9131 (handle_v_stopped): Remove.
9132 (handle_v_requests): Don't call handle_v_stopped. Call
9133 handle_ack_notif instead.
9134 (queue_stop_reply_callback): Call notif_event_enque instead
9135 of queue_stop_reply.
9136 (handle_status): Don't call send_next_stop_reply, call
9137 notif_write_event instead.
9138 (kill_inferior_callback): Likewise.
9139 (detach_or_kill_inferior_callback): Likewise.
9140 (main): Call initialize_notif.
9141 (process_serial_event): Call QUEUE_is_empty.
9142 (handle_target_event): Call notif_push instead of push event.
9143 * server.h (push_event): Remove declaration.
9144
9145 2012-12-10 Tom Tromey <tromey@redhat.com>
9146
9147 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9148 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9149 macros.
9150 (.c.o): Rewrite.
9151 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9152 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9153 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9154 (amd64-linux-ipa.o, ax.o): Rewrite.
9155 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9156 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9157 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9158 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9159 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9160 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9161 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9162 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9163 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9164 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9165 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9166 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9167 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9168 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9169 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9170 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9171 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9172 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9173 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9174 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9175 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9176 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9177 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9178 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9179 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9180 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9181 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9182 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9183 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9184 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9185 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9186 (reg-tilegx.o): Remove.
9187 (all_object_files): New macro.
9188 Include .deps files.
9189 * aclocal.m4, configure: Rebuild.
9190 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9191 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9192 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9193
9194 2012-12-05 Tom Tromey <tromey@redhat.com>
9195
9196 PR gdb/14917:
9197 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9198
9199 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9200
9201 * configure.ac: Check for linux/perf_event.h.
9202 * config.in: Regenerated.
9203 * configure: Regenerated.
9204
9205 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9206
9207 * hostio.c (handle_readlink): Decrease buffer size
9208 parameter passed to readlink by one byte.
9209
9210 2012-11-26 Yao Qi <yao@codesourcery.com>
9211
9212 * configure.ac (build_warnings): Append '-Wempty-body'.
9213 * configure: Regenerated.
9214 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9215 body.
9216
9217 2012-11-15 Pierre Muller <muller@sourceware.org>
9218
9219 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9220 * config.in: Regenerate.
9221 * configure: Regenerate.
9222 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9223 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9224 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9225 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9226 header.
9227 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9228 instead of <sys/wait.h> header.
9229 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9230
9231 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9232
9233 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9234 (various make rules): Remove -DGDBSERVER
9235
9236 2012-11-09 Yao Qi <yao@codesourcery.com>
9237
9238 * spu-low.c (current_ptid): Move it to ..
9239 * gdbthread.h: ... here. New.
9240 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9241 * server.c (myresume, process_serial_event): Likewise.
9242 * thread-db.c (thread_db_find_new_threads): Likewise.
9243 * tracepoint.c (run_inferior_command): Likewise.
9244
9245 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9246
9247 * server.c (handle_search_memory_1): Include access length in
9248 warning message.
9249
9250 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9251
9252 * linux-crisv32-low.c: Fix compile errors.
9253
9254 2012-09-04 Yao Qi <yao@codesourcery.com>
9255
9256 * tracepoint.c (cmd_qtsv): Adjust debug message.
9257 Don't check CUR_TPOINT.
9258
9259 2012-08-28 Yao Qi <yao@codesourcery.com>
9260
9261 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9262 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9263 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9264 Remove declarations of xmalloc, xreallloc, xstrdup and
9265 freeargv.
9266 * Makefile.in (libiberty_h): New.
9267 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9268 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9269
9270 2012-08-23 Yao Qi <yao@codesourcery.com>
9271
9272 * server.h: Remove declaration of 'xsnprintf'.
9273
9274 2012-08-22 Keith Seitz <keiths@redhat.com>
9275
9276 * server.h: Include build-gnulib-gbserver/config.h.
9277 * gdbreplay.c: Likewise.
9278
9279 2012-08-08 Doug Evans <dje@google.com>
9280
9281 * Makefile.in (SFILES): Add gdb_vecs.c.
9282 (OBS): Add gdb_vecs.o.
9283 (gdb_vecs_h, host_defs_h): New variables.
9284 (thread-db.o): Add $(gdb_vecs_h) dependency.
9285 (gdb_vecs.o): New rule.
9286 * thread-db.c: #include "gdb_vecs.h".
9287 (thread_db_load_search): Use a vector to iterate over path elements.
9288 Handle text appearing after "$pdir".
9289
9290 * configure.ac: Add check for strstr.
9291 * config.in: Regenerate.
9292 * configure: Regenerate.
9293
9294 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9295
9296 * hostio.c (handle_pread): If pread fails, fall back to attempting
9297 lseek/read.
9298 (handle_pwrite): Likewise for pwrite.
9299
9300 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9301
9302 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9303 between unsupported TYPE and unimplementable ADDR/LEN combination.
9304 (arm_insert_point): Act on new return value.
9305
9306 2012-07-31 Pedro Alves <palves@redhat.com>
9307
9308 * server.c (process_point_options): Only skip tokens if we find
9309 one that is unrecognized. Don't treat 'X' specially while
9310 skipping unrecognized tokens.
9311
9312 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9313
9314 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9315 to 4-byte-align HW breakpoint addresses for Thumb.
9316
9317 2012-07-27 Yao Qi <yao@codesourcery.com>
9318
9319 PR remote/14161.
9320
9321 * server.h: Declare gdb_agent_about_to_close.
9322 * target.c (kill_inferior): Include "agent.h".
9323 New. Send command 'kill'.
9324 * target.h (kill_inferior): Removed macro.
9325 * tracepoint.c (gdb_agent_about_to_close): New.
9326 (gdb_agent_helper_thread): Handle command 'close'.
9327 Wait endlessly until the inferior stops.
9328 Install gdb_agent_remove_socket to atexit hook.
9329 (agent_socket_name): New static variable.
9330 (gdb_agent_socket_init): Replace local variable 'name' with
9331 'agent_socket_name'.
9332 (gdb_agent_remove_socket): New.
9333
9334 2012-07-27 Yao Qi <yao@codesourcery.com>
9335
9336 * server.c (process_point_options): Stop at 'X' when parsing.
9337
9338 2012-07-19 Michael Eager <eager@eagercon.com>
9339
9340 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9341 to hw_execute.
9342 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9343 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9344 hardware breakpoint.
9345
9346 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9347
9348 * gdbserver/linux-low.c (initialize_low): Call
9349 linux_ptrace_init_warnings.
9350
9351 2012-07-02 Doug Evans <dje@google.com>
9352
9353 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9354 pointer to int.
9355
9356 2012-07-02 Stan Shebs <stan@codesourcery.com>
9357
9358 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9359 (ax.o): Add it to build rule.
9360 (ax-ipa.o): Ditto.
9361 (OBS): Add format.o.
9362 (IPA_OBS): Add format.o.
9363 * server.c (handle_query): Claim support for breakpoint commands.
9364 (process_point_options): Add command case.
9365 (process_serial_event): Leave running if there are printfs in
9366 effect.
9367 * mem-break.h (any_persistent_commands): Declare.
9368 (add_breakpoint_commands): Declare.
9369 (gdb_no_commands_at_breakpoint): Declare.
9370 (run_breakpoint_commands): Declare.
9371 * mem-break.c (struct point_command_list): New struct.
9372 (struct breakpoint): New field command_list.
9373 (any_persistent_commands): New function.
9374 (add_commands_to_breakpoint): New function.
9375 (add_breakpoint_commands): New function.
9376 (gdb_no_commands_at_breakpoint): New function.
9377 (run_breakpoint_commands): New function.
9378 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9379 locally.
9380 * ax.c: Include format.h.
9381 (ax_printf): New function.
9382 (gdb_eval_agent_expr): Add printf opcode.
9383
9384 2012-06-13 Yao Qi <yao@codesourcery.com>
9385
9386 * server.c (start_inferior): Remove duplicated writes to fields
9387 'last_resume_kind' and 'last_status' of 'current_inferior'.
9388
9389 2012-06-12 Yao Qi <yao@codesourcery.com>
9390 Pedro Alves <palves@redhat.com>
9391
9392 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9393 comment.
9394 * server.c (handle_v_cont): Extend comment.
9395
9396 2012-06-11 Yao Qi <yao@codesourcery.com>
9397
9398 * linux-low.c (linux_attach): Add 'static'.
9399
9400 2012-06-06 Yao Qi <yao@codesourcery.com>
9401
9402 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9403
9404 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9405
9406 Fix gcc -flto compilation warning.
9407 * server.c (main): Make variable multi_mode and attach volatile.
9408
9409 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9410
9411 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9412 if the platform doesn't know about it.
9413
9414 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9415
9416 * Makefile.in (SFILES): Add linux-tile-low.c.
9417 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9418 * configure.srv: Handle tilegx-*-linux*.
9419 * linux-tile-low.c: New file.
9420
9421 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9422
9423 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9424
9425 2012-05-24 Pedro Alves <palves@redhat.com>
9426
9427 PR gdb/7205
9428
9429 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9430
9431 2012-05-24 Pedro Alves <palves@redhat.com>
9432
9433 PR gdb/7205
9434
9435 Replace target_signal with gdb_signal throughout.
9436
9437 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9438
9439 * linux-low.c (linux_store_registers): Avoid the copying sequence
9440 when no data has been retrieved by ptrace.
9441
9442 2012-05-22 Will Deacon <will.deacon@arm.com>
9443
9444 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9445 Include asm/ptrace.h.
9446 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9447 already defined.
9448
9449 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9450
9451 * linux-low.c (linux_store_registers): Don't re-retrieve data
9452 with ptrace that has already been obtained from /proc. Always
9453 copy any data retrieved with ptrace to the buffer supplied.
9454
9455 2012-05-11 Yao Qi <yao@codesourcery.com>
9456 Pedro Alves <palves@redhat.com>
9457
9458 * linux-low.c (enum stopping_threads_kind): New.
9459 (stopping_threads): Change type to `enum stopping_threads_kind'.
9460 (handle_extended_wait): If stopping and suspending threads, leave
9461 the new_lwp suspended too.
9462 (linux_wait_for_event): Adjust.
9463 (stop_all_lwps): Set `stopping_threads' to
9464 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9465 whether we're suspending threads or just stopping them. Assert no
9466 recursion happens.
9467
9468 2012-04-29 Yao Qi <yao@codesourcery.com>
9469
9470 * server.h: Move some code to ...
9471 * gdbthread.h: ... here. New.
9472 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9473 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9474 (nto-low.o, win32-low.o): Likewise.
9475 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9476 * regcache.c, remote-utils.c, server.c: Likewise.
9477 * target.c, tracepoint.c, win32-low.c: Likewise.
9478
9479 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9480
9481 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9482 (PTRACE_ARG4_TYPE): Likewise.
9483 (PTRACE_XFER_TYPE): Likewise.
9484 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9485 ptrace to PTRACE_ARG3_TYPE.
9486 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9487 (PTRACE_ARG4_TYPE): Likewise.
9488 (PTRACE_XFER_TYPE): Likewise.
9489 (linux_detach_one_lwp): Cast fourth argument of
9490 ptrace to long then PTRACE_ARG4_TYPE.
9491 (regsets_fetch_inferior_registers): Cast third argument of
9492 ptrace to long then PTRACE_ARG3_TYPE.
9493 (regsets_store_inferior_registers): Likewise.
9494
9495 2012-04-20 Pedro Alves <palves@redhat.com>
9496
9497 * configure: Regenerate.
9498
9499 2012-04-19 Pedro Alves <palves@redhat.com>
9500
9501 * Makefile.in (GNULIB_BUILDDIR): New.
9502 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9503 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9504 (all, install-only, uninstall, clean-info, all-lib, clean): No
9505 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9506 (maintainer-clean realclean distclean): Use subdir_do.
9507 (subdir_do): New.
9508 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9509 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9510 * acinclude.m4: Include acx_configure_dir.m4.
9511 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9512 calls. Call AC_PROG_RANLIB. Configure gnulib using
9513 ACX_CONFIGURE_DIR.
9514 (GNULIB): New.
9515 (GNULIB_STDINT_H): Adjust.
9516 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9517 * gdbreplay.c: Include build-gnulib/config.h.
9518 * server.h: Likewise.
9519 * aclocal.m4: Regenerate.
9520 * config.in: Regenerate.
9521 * configure: Regenerate.
9522
9523 2012-04-19 Pedro Alves <palves@redhat.com>
9524
9525 * Makefile.in (LIBGNU, INCGNU): Adjust.
9526 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9527 (all, install-only, uninstall, clean-info, all-lib, clean)
9528 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9529 * configure.ac: Adjust AC_OUTPUT output.
9530 * aclocal.m4: Regenerate.
9531 * configure: Regenerate.
9532
9533 2012-04-19 Pedro Alves <palves@redhat.com>
9534
9535 * Makefile.in (generated_files): New.
9536 (server_h): Remove the explicit dependency on config.h, and depend
9537 on $generated_files.
9538
9539 2012-04-19 Pedro Alves <palves@redhat.com>
9540
9541 * Makefile.in (INCGNU): Add -Ignulib.
9542
9543 2012-04-19 Pedro Alves <palves@redhat.com>
9544
9545 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9546 (INCGNU): ... this, and spell out -I here.
9547 (GNULIB_LIB): Rename to ...
9548 (LIBGNU): ... this.
9549 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9550
9551 2012-04-19 Pedro Alves <palves@redhat.com>
9552
9553 * config.in: Regenerate.
9554
9555 2012-04-19 Pedro Alves <palves@redhat.com>
9556
9557 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9558 * server.h (memmem): Remove declaration.
9559 * config.in: Regenerate.
9560 * configure: Regenerate.
9561
9562 2012-04-19 Yao Qi <yao@codesourcery.com>
9563
9564 * Makefile.in (SFILES): Add common/vec.c.
9565 (OBS): Add vec.o.
9566 (vec.o): New rule.
9567
9568 2012-04-19 Yao Qi <yao@codesourcery.com>
9569
9570 * remote-utils.c (prepare_resume_reply): Replace with macro
9571 target_core_of_thread.
9572 * server.c (handle_qxfer_threads_proper): Likewise.
9573 * target.h (traget_core_of_thread): New macro.
9574
9575 2012-04-18 Pedro Alves <palves@redhat.com>
9576
9577 * aclocal.m4: Regenerate.
9578 * configure: Regenerate.
9579
9580 2012-04-16 Yao Qi <yao@codesourcery.com>
9581
9582 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9583 duplicated on address.
9584
9585 2012-04-16 Yao Qi <yao@codesourcery.com>
9586
9587 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9588 (struct tracepoint_action_ops) <send>: New field.
9589 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9590 (agent_expr_send, x_tracepoint_action_send): New.
9591 (l_tracepoint_action_send): New.
9592 (cmd_qtdp): Download and install tracepoint
9593 according to `use_agent'.
9594 (run_inferior_command): Add one more parameter `len'.
9595 Update callers.
9596 (tracepoint_send_agent): New.
9597 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9598
9599 2012-04-16 Yao Qi <yao@codesourcery.com>
9600
9601 * tracepoint.c (download_tracepoints): Moved to ...
9602 (cmd_qtstart): ... here.
9603
9604 2012-04-14 Yao Qi <yao@codesourcery.com>
9605
9606 * tracepoint.c: Include inttypes.h.
9607 (struct collect_memory_action): Use sized types.
9608 (struct tracepoint): Likewise.
9609 (cmd_qtdp, stop_tracing): Update print specifiers.
9610 (cmd_qtp, response_tracepoint): Likewise.
9611 (collect_data_at_tracepoint): Likewise.
9612 (collect_data_at_step): Likewise.
9613
9614 2012-04-14 Yao Qi <yao@codesourcery.com>
9615
9616 Import gnulib module inttypes.
9617 * aclocal.m4, config.in, configure: Regenerated.
9618
9619 2012-04-14 Yao Qi <yao@codesourcery.com>
9620
9621 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9622 Makefile and config.status at last.
9623
9624 2012-04-13 Yao Qi <yao@codesourcery.com>
9625
9626 * tracepoint.c: Include stdint.h unconditionally.
9627
9628 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9629
9630 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9631 on BFD_HAVE_SYS_PROCFS_TYPE.
9632 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9633 * configure: Regenerate.
9634 * config.in: Likewise.
9635
9636 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9637
9638 * Makefile.in (clean): Also remove x32.c x32-linux.c
9639 x32-avx.c x32-avx-linux.c.
9640 (x32.o): New target.
9641 (x32.c): Likewise.
9642 (x32-linux.o): Likewise.
9643 (x32-linux.c): Likewise.
9644 (x32-avx.o): Likewise.
9645 (x32-avx.c): Likewise.
9646 (x32-avx-linux.o): Likewise.
9647 (x32-avx-linux.c): Likewise.
9648
9649 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9650 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9651 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9652 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9653 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9654 i386/x32-avx-linux.xml.
9655
9656 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9657 (init_registers_x32_avx_linux): Likwise.
9658 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9659 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9660
9661 2012-04-13 Pedro Alves <palves@redhat.com>
9662
9663 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9664 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9665 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9666 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9667 the sub-make.
9668
9669 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9670
9671 * linux-x86-low.c (compat_x32_clock_t): New.
9672 (compat_x32_siginfo_t): Likewise.
9673 (compat_x32_siginfo_from_siginfo): Likewise.
9674 (siginfo_from_compat_x32_siginfo): Likewise.
9675 (linux_is_elf64): Likewise.
9676 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9677 and siginfo_from_compat_x32_siginfo for x32.
9678 (x86_arch_setup): Set linux_is_elf64.
9679
9680 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9681
9682 PR gdb/13969
9683 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9684 e_machine field.
9685 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9686 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9687 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9688 compatible with process.
9689
9690 2012-04-12 Yao Qi <yao@codesourcery.com>
9691
9692 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9693 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9694 (install-only, install-info, clean): Handle sub dir gnulib.
9695 (all-lib, am--refresh): New targets.
9696 (memmem.o): Remove target.
9697 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9698 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9699 (AC_REPLACE_FUNCS): Remove memmem.
9700 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9701 (AC_OUTPUT): Generate Makefile in gnulib/.
9702 * aclocal.m4, config.in, configure: Regenerated.
9703
9704 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9705
9706 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9707
9708 2012-04-05 Pedro Alves <palves@redhat.com>
9709
9710 -Werror=strict-aliasing
9711
9712 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9713 pointer.
9714
9715 2012-04-04 Pedro Alves <palves@redhat.com>
9716
9717 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9718 (sparc_store_gregset_from_stack, sparc_store_gregset)
9719 (sparc_breakpoint_at): Fix formatting.
9720
9721 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9722
9723 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9724 are available.
9725 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9726 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9727 * config.in: Regenerate.
9728 * configure: Likewise.
9729
9730 2012-03-29 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9733 Correct ptrace arguments.
9734
9735 2012-03-28 Pedro Alves <palves@redhat.com>
9736
9737 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9738 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9739 (IA64_FR1_REGNUM): New defines.
9740 (ia64_fetch_register): New.
9741 (the_low_target): Install it.
9742 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9743 field.
9744 * linux-low.c (linux_fetch_registers): Try the
9745 the_low_target.fetch_register hook first.
9746
9747 * linux-arm-low.c (the_low_target): Adjust.
9748 * linux-bfin-low.c (the_low_target): Adjust.
9749 * linux-cris-low.c (the_low_target): Adjust.
9750 * linux-crisv32-low.c (the_low_target): Adjust.
9751 * linux-m32r-low.c (the_low_target): Adjust.
9752 * linux-m68k-low.c (the_low_target): Adjust.
9753 * linux-mips-low.c (the_low_target): Adjust.
9754 * linux-ppc-low.c (the_low_target): Adjust.
9755 * linux-s390-low.c (the_low_target): Adjust.
9756 * linux-sh-low.c (the_low_target): Adjust.
9757 * linux-sparc-low.c (the_low_target): Adjust.
9758 * linux-tic6x-low.c (the_low_target): Adjust.
9759 * linux-x86-low.c (the_low_target): Adjust.
9760 * linux-xtensa-low.c (the_low_target): Adjust.
9761
9762 2012-03-26 Pedro Alves <palves@redhat.com>
9763
9764 * server.c (handle_qxfer_libraries): Don't bail early if
9765 the_target->qxfer_libraries_svr4 is not NULL.
9766
9767 2012-03-26 Pedro Alves <palves@redhat.com>
9768
9769 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9770
9771 2012-03-23 Pedro Alves <palves@redhat.com>
9772
9773 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9774 "library-list-svr4" element's start tag when the the DSO list is
9775 empty.
9776
9777 2012-03-23 Pedro Alves <palves@redhat.com>
9778
9779 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9780 a variable whose type size is the same as the inferior's pointer
9781 size.
9782
9783 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9784
9785 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9786 struct siginfo.
9787 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9788 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9789 * linux-low.h: Include <signal.h>.
9790 (struct siginfo): Remove forward declaration.
9791 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9792 struct siginfo.
9793
9794 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9795
9796 * .gitignore: Ignore more files.
9797
9798 2012-03-19 Pedro Alves <palves@redhat.com>
9799 Jan Kratochvil <jan.kratochvil@redhat.com>
9800
9801 * server.c (cont_thread, general_thread): Add describing comments.
9802 (start_inferior): Clear `cont_thread'.
9803 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9804 of a process.
9805
9806 2012-03-15 Yao Qi <yao@codesourcery.com>
9807
9808 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9809 handling to ...
9810 (cmd_qtdp): ... here.
9811
9812 2012-03-15 Yao Qi <yao@codesourcery.com>
9813
9814 * tracepoint.c (struct tracepoint_action_ops): New.
9815 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9816 (m_tracepoint_action_download): New.
9817 (r_tracepoint_action_download): New.
9818 (x_tracepoint_action_download): New.
9819 (l_tracepoint_action_download): New.
9820 (add_tracepoint_action): Install `action->ops' according type.
9821 (download_tracepoint_1): Move code `download' function pointer
9822 of various tracepoint_action_ops.
9823
9824 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9825
9826 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9827 linux_ptrace_attach_warnings.
9828
9829 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9830
9831 * Makefile.in (linux-ptrace.o): New.
9832 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9833 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9834 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9835 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9836 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9837 of these targets.
9838 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9839
9840 2012-03-08 Yao Qi <yao@codesourcery.com>
9841 Pedro Alves <palves@redhat.com>
9842
9843 Fix PR server/13392.
9844 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9845 offset of JMP insn.
9846 * tracepoint.c (remove_tracepoint): New.
9847 (cmd_qtdp): Call remove_tracepoint when failed to install.
9848
9849 2012-03-07 Pedro Alves <palves@redhat.com>
9850
9851 * linux-low.c (get_detach_signal): New.
9852 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9853 Pass on pending signals to PTRACE_DETACH. Check the result of the
9854 ptrace call.
9855 * server.c (program_signals, program_signals_p): New.
9856 (handle_general_set): Handle QProgramSignals.
9857 * server.h (program_signals, program_signals_p): Declare.
9858
9859 2012-03-05 Pedro Alves <palves@redhat.com>
9860 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9863 New comment why.
9864
9865 2012-03-03 Yao Qi <yao@codesourcery.com>
9866
9867 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9868 agent_look_up_symbols.
9869
9870 2012-03-03 Yao Qi <yao@codesourcery.com>
9871
9872 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9873 (linux-x86-low.o): Likewise.
9874 * server.h: Remove in_process_agent_loaded.
9875 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9876 common/agent.c.
9877 Update callers.
9878
9879 2012-03-03 Yao Qi <yao@codesourcery.com>
9880
9881 * tracepoint.c (gdb_agent_capability): New global.
9882 (in_process_agent_loaded_ust): Renamed to
9883 `in_process_agent_supports_ust'.
9884 Update callers.
9885 (in_process_agent_supports_ust): Call agent_capability_check.
9886 (clear_installed_tracepoints): Assert that agent supports
9887 agent.
9888
9889 2012-03-03 Yao Qi <yao@codesourcery.com>
9890
9891 * linux-low.c (linux_supports_agent): New.
9892 (linux_target_ops): Initialize field `supports_agent' with
9893 linux_supports_agent.
9894 * target.h (struct target_ops) <supports_agent>: New.
9895 (target_supports_agent): New macro.
9896 * server.c (handle_general_set): Handle packet 'QAgent'.
9897 (handle_query): Send `QAgent+'.
9898 * Makefile.in (server.o): Depends on agent.h.
9899
9900 2012-03-03 Yao Qi <yao@codesourcery.com>
9901
9902 * Makefile.in (OBS): Add agent.o.
9903 Add new rule for agent.o.
9904 Track dependence of tracepoint.c on agent.h.
9905 * tracepoint.c (run_inferior_command_1):
9906 (run_inferior_command): Call agent_run_command.
9907 (gdb_ust_connect_sync_socket): Deleted. Move it to
9908 common/agent.c.
9909 (resume_thread, stop_thread): Likewise.
9910 (gdb_ust_socket_init): Renamed to ...
9911 (gdb_agent_socket_init): ... New.
9912 (gdb_ust_thread): Renamed to ...
9913 (gdb_agent_helper_thread): ... New.
9914 (gdb_ust_init): Move some code to ...
9915 (gdb_agent_init): ... here. New.
9916 [HAVE_UST]: Call gdb_ust_init.
9917 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9918 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9919 * config.in, configure: Regenerated.
9920
9921 2012-03-02 Pedro Alves <palves@redhat.com>
9922
9923 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9924 * linux-low.c (struct simple_pid_list): New.
9925 (stopped_pids): New a struct simple_pid_list pointer.
9926 (add_to_pid_list, pull_pid_from_list): New.
9927 (handle_extended_wait): Don't assume the first signal new children
9928 report is SIGSTOP. Adjust call to pull_pid_from_list.
9929 (linux_wait_for_lwp): Adjust.
9930
9931 2012-03-02 Yao Qi <yao@codesourcery.com>
9932
9933 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9934 debug log.
9935
9936 2012-03-02 Yao Qi <yao@codesourcery.com>
9937
9938 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9939 `stop_pc' and `tpoint'. Update caller.
9940
9941 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9942
9943 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9944 * linux-low.c (use_linux_regsets): New macro.
9945 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9946 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9947 (linux_register_in_regsets): New function.
9948 (usr_fetch_inferior_registers): Skip registers covered by
9949 regsets.
9950 (usr_store_inferior_registers): Likewise.
9951 (usr_fetch_inferior_registers): New macro.
9952 (usr_store_inferior_registers): Likewise.
9953 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9954 (linux_store_registers): Likewise.
9955 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9956 prototype.
9957 (init_registers_mips64_dsp_linux): Likewise.
9958 (init_registers_mips_linux): New macro.
9959 (init_registers_mips_dsp_linux): Likewise.
9960 (mips_dsp_num_regs): Likewise.
9961 (DSP_BASE, DSP_CONTROL): New fallback macros.
9962 (mips_base_regs): New macro.
9963 (mips_regmap): Use it. Fix the size.
9964 (mips_dsp_regmap): New variable.
9965 (mips_dsp_regset_bitmap): Likewise.
9966 (mips_arch_setup): New function.
9967 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9968 than mips_regmap.
9969 (mips_cannot_store_register): Likewise.
9970 (the_low_target): Update .arch_setup, .num_regs and .regmap
9971 initializers. Add .regset_bitmap initializer.
9972 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9973 initializer.
9974 * linux-bfin-low.c (the_low_target): Likewise.
9975 * linux-cris-low.c (the_low_target): Likewise.
9976 * linux-crisv32-low.c (the_low_target): Likewise.
9977 * linux-ia64-low.c (the_low_target): Likewise.
9978 * linux-m32r-low.c (the_low_target): Likewise.
9979 * linux-m68k-low.c (the_low_target): Likewise.
9980 * linux-ppc-low.c (the_low_target): Likewise.
9981 * linux-s390-low.c (the_low_target): Likewise.
9982 * linux-sh-low.c (the_low_target): Likewise.
9983 * linux-sparc-low.c (the_low_target): Likewise.
9984 * linux-tic6x-low.c (the_low_target): Likewise.
9985 * linux-x86-low.c (the_low_target): Likewise.
9986 * linux-xtensa-low.c (the_low_target): Likewise.
9987 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9988 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9989 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9990 srv_xmlfiles.
9991 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9992 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9993
9994 2012-02-29 Yao Qi <yao@codesourcery.com>
9995 Pedro Alves <palves@redhat.com>
9996
9997 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9998 `step_over_finished' is true.
9999
10000 2012-02-27 Pedro Alves <palves@redhat.com>
10001
10002 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10003 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10004
10005 2012-02-27 Pedro Alves <palves@redhat.com>
10006
10007 PR server/9684
10008 * linux-low.c (pid_is_stopped): New.
10009 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10010
10011 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10012
10013 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10014 of conditions.
10015
10016 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10017
10018 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10019
10020 2012-02-24 Luis Machado <lgustavo@codesourcery>
10021
10022 * server.c (handle_query): Advertise support for target-side
10023 breakpoint condition evaluation.
10024 (process_point_options): New function.
10025 (process_serial_event): When inserting a breakpoint, check for
10026 a target-side condition that should be evaluated.
10027
10028 * mem-break.c: Include regcache.h and ax.h.
10029 (point_cond_list_t): New data structure.
10030 (breakpoint) <cond_list>: New field.
10031 (find_gdb_breakpoint_at): Make non-static.
10032 (delete_gdb_breakpoint_at): Clear any target-side
10033 conditions.
10034 (clear_gdb_breakpoint_conditions): New function.
10035 (add_condition_to_breakpoint): Likewise.
10036 (add_breakpoint_condition): Likewise.
10037 (gdb_condition_true_at_breakpoint): Likewise.
10038 (gdb_breakpoint_here): Return result directly instead
10039 of going through a local variable.
10040
10041 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10042 (clear_gdb_breakpoint_conditions): Likewise.
10043 (add_breakpoint_condition): Likewise.
10044 (gdb_condition_true_at_breakpoint): Likewise.
10045
10046 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10047 (need_step_over_p): Take target-side breakpoint condition into
10048 consideration.
10049
10050 2012-02-24 Luis Machado <lgustavo@codesourcery>
10051
10052 * server.h: Include tracepoint.h.
10053 (agent_mem_read, agent_get_trace_state_variable_value,
10054 agent_set_trace_state_variable_value,
10055 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10056 get_set_tsv_func_addr): New prototypes.
10057
10058 * ax.h: New include file.
10059 * ax.c: New source file.
10060
10061 * tracepoint.c: Include ax.h.
10062 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10063 agent_expr, eval_result_type): Move to ax.h.
10064 (parse_agent_expr): Rename to ...
10065 (gdb_parse_agent_expr): ... this, make it non-static and move
10066 to ax.h.
10067 (unparse_agent_expr) Rename to ...
10068 (gdb_unparse_agent_expr): ... this, make it non-static and move
10069 to ax.h.
10070 (eval_agent_expr): Rename to ...
10071 (eval_tracepoint_agent_expr): ... this.
10072 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10073 forward declarations.
10074 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10075 (agent_get_trace_state_variable_value): New function.
10076 (agent_set_trace_state_variable_value): New function.
10077 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10078 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10079 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10080 (condition_true_at_tracepoint): Likewise.
10081 (parse_agent_expr): Rename to ...
10082 (gdb_parse_agent_expr): ... this and move to ax.c.
10083 (unparse_agent_expr): Rename to ...
10084 (gdb_unparse_agent_expr): ... this and move to ax.c.
10085 (gdb_agent_op_name): Move to ax.c.
10086 (eval_agent_expr): Rename to ...
10087 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10088 and move to ax.c.
10089 (eval_tracepoint_agent_expr): New function.
10090 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10091 non-static.
10092 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10093 ax.c.
10094 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10095 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10096 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10097 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10098 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10099 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10100 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10101 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10102 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10103 (compile_bytecodes): Remove forward declaration.
10104 (is_goto_target): Move to ax.c.
10105 (compile_bytecodes): Move to ax.c and call
10106 agent_get_trace_state_variable_value (...) and
10107 agent_set_trace_state_variable_value (...).
10108
10109 * Makefile.in: Update ax.c and IPA dependencies.
10110
10111 2012-02-24 Pedro Alves <palves@redhat.com>
10112
10113 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10114 (cmd_bigqtbuffer_circular): ... this. Only handle
10115 'QTBuffer:circular:'.
10116 (handle_tracepoint_general_set): Adjust.
10117
10118 2012-02-16 Yao Qi <yao@codesourcery.com>
10119
10120 * inferiors.c: Move code to ...
10121 * dll.c: .... here. New.
10122 * server.h: Declare clear_dlls.
10123 * Makefile.in (SFILES): Add dll.c.
10124 (OBS): Add dll.o
10125 (dll.o): New rule.
10126
10127 2012-02-11 Yao Qi <yao@codesourcery.com>
10128
10129 * server.c: (handle_monitor_command): Add a new parameter
10130 `own_buf'.
10131 (handle_query): Update caller.
10132
10133 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10134
10135 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10136 * configure, config.in: Regenerate.
10137 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10138 is not defined.
10139
10140 2012-02-02 Pedro Alves <palves@redhat.com>
10141
10142 Try SIGKILL first, then PTRACE_KILL.
10143 * linux-low.c (linux_kill_one_lwp): New.
10144 (linux_kill_one_lwp): Rename to ...
10145 (kill_one_lwp_callback): ... this. Use the new
10146 linux_kill_one_lwp.
10147
10148 2012-02-02 Pedro Alves <palves@redhat.com>
10149
10150 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10151 inferior.
10152
10153 2012-01-27 Pedro Alves <palves@redhat.com>
10154
10155 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10156 (elf_64_file_p): Make static.
10157 (linux_pid_exe_is_elf_64_file): New.
10158 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10159 Delete declarations.
10160 (linux_pid_exe_is_elf_64_file): Declare.
10161 * linux-x86-low.c (x86_arch_setup): Use
10162 linux_pid_exe_is_elf_64_file.
10163
10164 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10165
10166 * linux-low.c (linux_wait_for_event_1): Rename to ...
10167 (linux_wait_for_event): ... here and merge it with former
10168 linux_wait_for_event - new variable wait_ptid, use it.
10169 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10170
10171 2012-01-23 Pedro Alves <palves@redhat.com>
10172
10173 * server.c (main): Avoid yet another case of infinite loop while
10174 detaching/killing after a longjmp.
10175
10176 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10177
10178 Code cleanup.
10179 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10180
10181 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10182
10183 * hostio.c (handle_readlink): New function.
10184 (handle_vFile): Call it to handle "vFile:readlink" packets.
10185
10186 2012-01-20 Pedro Alves <palves@redhat.com>
10187 Ulrich Weigand <ulrich.weigand@linaro.org>
10188
10189 * server.c (handle_v_requests): Only support vAttach and vRun to
10190 start multiple processes when in extended protocol mode.
10191
10192 2012-01-17 Pedro Alves <palves@redhat.com>
10193
10194 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10195 memalign plus mprotect to allocate the scratch buffer.
10196
10197 2012-01-13 Pedro Alves <palves@redhat.com>
10198
10199 * server.c (attach_inferior): Clear `cont_thread'.
10200
10201 2012-01-13 Pedro Alves <palves@redhat.com>
10202
10203 * server.c (main): Avoid infinite loop while detaching/killing
10204 after a longjmp.
10205
10206 2012-01-09 Doug Evans <dje@google.com>
10207
10208 * server.c (start_inferior): Set last_ptid in --wrapper case.
10209
10210 2012-01-06 Yao Qi <yao@codesourcery.com>
10211
10212 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10213 defined.
10214 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10215
10216 2012-01-04 Yao Qi <yao@codesourcery.com>
10217
10218 * tracepoint.c (cmd_qtdp): Print debug message
10219 for static tracepoint.
10220
10221 2012-01-04 Yao Qi <yao@codesourcery.com>
10222
10223 * tracepoint.c (trace_vdebug): Differentiate debug message
10224 between gdbserver and IPA.
10225
10226 2012-01-03 Yao Qi <yao@codesourcery.com>
10227
10228 * tracepoint.c (tracepoint_was_hit): Don't collect for
10229 static tracepoint.
10230
10231 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10232
10233 * terminal.h: Reformat copyright header.
10234
10235 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10236
10237 * server.c (gdbserver_version): Update copyright year.
10238 * gdbreplay.c (gdbreplay_version): Likewise.
10239
10240 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10241
10242 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10243
10244 Revert:
10245 2011-12-18 Hui Zhu <teawater@gmail.com>
10246 * linux-low.c (linux_create_inferior): Save return value to ret.
10247
10248 2011-12-18 Hui Zhu <teawater@gmail.com>
10249
10250 * linux-low.c (linux_create_inferior): Save return value to ret.
10251
10252 2011-12-16 Doug Evans <dje@google.com>
10253
10254 * linux-low.c (linux_create_inferior): If stdio connection,
10255 redirect stdin from /dev/null, stdout to stderr.
10256 * remote-utils.c (remote_is_stdio): New static global.
10257 (remote_connection_is_stdio): New function.
10258 (remote_prepare): Handle stdio connection.
10259 (remote_open): Ditto.
10260 (remote_close): Don't close stdin for stdio connections.
10261 (read_prim,write_prim): New functions. Replace all calls to
10262 read/write to these.
10263 * server.c (main): Watch for "-" argument. Move call to
10264 remote_prepare before start_inferior.
10265 * server.h (STDIO_CONNECTION_NAME): New macro.
10266 (remote_connection_is_stdio): Declare.
10267
10268 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10269 in debugging output.
10270
10271 2011-12-15 Yao Qi <yao@codesourcery.com>
10272
10273 * tracepoint.c: Include sys/syscall.h.
10274 (gdb_ust_thread): Remove preprocessor conditional.
10275
10276 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10277
10278 * linux-low.c (linux_detach_one_lwp): Call
10279 the_low_target.prepare_to_resume before detaching.
10280
10281 2011-12-14 Yao Qi <yao@codesourcery.com>
10282
10283 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10284 of write.
10285
10286 2011-12-14 Yao Qi <yao@codesourcery.com>
10287
10288 * i386-low.c (i386_low_stopped_data_address): Initialize local
10289 variable `control'.
10290
10291 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10292
10293 PR remote/13492
10294
10295 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10296 DR_CONTROL unless necessary. Extend comments.
10297 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10298 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10299
10300 2011-12-13 Yao Qi <yao@codesourcery.com>
10301
10302 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10303 macros.
10304 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10305
10306 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10307
10308 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10309 Print new debug message for such case.
10310
10311 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10312
10313 Fix overlapping memcpy.
10314 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10315 the read_inferior_memory transfer.
10316 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10317 write_inferior_memory transfer.
10318 (set_fast_tracepoint_jump): New variable buf. Use it for the
10319 read_inferior_memory and write_inferior_memory transfers.
10320 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10321 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10322 Use it for the write_inferior_memory transfer.
10323 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10324 buffers.
10325
10326 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10327
10328 * linux-low.c (fetch_register, store_register): Make code
10329 consistent, fix formatting.
10330
10331 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10332
10333 * linux-low.c (usr_store_inferior_registers): Factor out code
10334 to handle individual registers into...
10335 (store_register): ... this new function.
10336
10337 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10338
10339 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10340 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10341 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10342 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10343 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10344 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10345 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10346 (srv_xmlfiles): Add new XML files.
10347
10348 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10349 and <sys/uio.h>.
10350 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10351 (init_registers_s390_linux32v1): Add prototype.
10352 (init_registers_s390_linux32v2): Likewise.
10353 (init_registers_s390_linux64v1): Likewise.
10354 (init_registers_s390_linux64v2): Likewise.
10355 (init_registers_s390x_linux64v1): Likewise.
10356 (init_registers_s390x_linux64v2): Likewise.
10357 (s390_num_regs): Increment to 52.
10358 (s390_regmap): Add orig_r2 register.
10359 (s390_num_regs_3264): Increment to 68.
10360 (s390_regmap_3264): Add orig_r2 register.
10361 (s390_collect_ptrace_register): Handle orig_r2 register.
10362 (s390_supply_ptrace_register): Likewise.
10363 (s390_fill_last_break): New function.
10364 (s390_store_last_break): Likewise.
10365 (s390_fill_system_call): New function.
10366 (s390_store_system_call): Likewise.
10367 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10368 register sets.
10369 (s390_check_regset): New function.
10370 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10371 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10372 Update target_regsets for available register sets.
10373
10374 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10375 Jan Kratochvil <jan.kratochvil@redhat.com>
10376
10377 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10378 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10379 New.
10380 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10381 * linux-low.h (struct process_info_private): New member r_debug.
10382 * server.c (handle_qxfer_libraries): Call
10383 the_target->qxfer_libraries_svr4.
10384 (handle_qxfer_libraries_svr4): New function.
10385 (qxfer_packets): New entry "libraries-svr4".
10386 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10387 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10388 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10389 PACKET_qXfer_libraries_svr4.
10390
10391 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10392
10393 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10394 PSW address/mask between 8-byte and 16-byte formats.
10395 (s390_supply_ptrace_register): Likewise.
10396 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10397 basic addressing mode bit.
10398
10399 2011-11-24 Stan Shebs <stan@codesourcery.com>
10400
10401 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10402
10403 2011-11-17 Stan Shebs <stan@codesourcery.com>
10404
10405 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10406 (tracing_start_time): New global.
10407 (tracing_stop_time): New global.
10408 (tracing_user_name): New global.
10409 (tracing_notes): New global.
10410 (tracing_stop_note): New global.
10411 (cmd_qtstart): Set traceframe_usage, start_time.
10412 (stop_tracing): Set stop_time.
10413 (cmd_qtstatus): Report additional status.
10414 (cmd_qtp): New function.
10415 (handle_tracepoint_query): Call it.
10416 (cmd_qtnotes): New function.
10417 (handle_tracepoint_general_set): Call it.
10418 (get_timestamp): Rename from tsv_get_timestamp.
10419
10420 2011-11-14 Stan Shebs <stan@codesourcery.com>
10421 Kwok Cheung Yeung <kcy@codesourcery.com>
10422
10423 * linux-x86-low.c (small_jump_insn): New.
10424 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10425 trampoline and error message, build a trampoline and issue a small
10426 jump instruction to it.
10427 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10428 trampoline and error message.
10429 (x86_get_min_fast_tracepoint_insn_len): New.
10430 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10431 * linux-low.h (struct linux_target_ops): Add arguments to
10432 install_fast_tracepoint_jump_pad operation, add new operation.
10433 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10434 arguments.
10435 (linux_get_min_fast_tracepoint_insn_len): New function.
10436 (linux_target_op): Add new operation.
10437 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10438 (gdb_trampoline_buffer_end): Ditto.
10439 (gdb_trampoline_buffer_error): Ditto.
10440 (struct ipa_sym_addresses): Add fields for new IPA variables.
10441 (symbol_list): Add entries for new IPA variables.
10442 (struct tracepoint): Add fields to hold the address range of the
10443 trampoline used by the tracepoint.
10444 (trampoline_buffer_head): New static variable.
10445 (trampoline_buffer_tail): Ditto.
10446 (claim_trampoline_space): New function.
10447 (have_fast_tracepoint_trampoline_buffer): New function.
10448 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10449 structure.
10450 (install_fast_tracepoint): Ditto, also add error buffer argument.
10451 (cmd_qtminftpilen): New function.
10452 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10453 (fast_tracepoint_from_trampoline_address): New function.
10454 (fast_tracepoint_collecting): Handle trampoline as part of jump
10455 pad space.
10456 (set_trampoline_buffer_space): New function.
10457 (initialize_tracepoint): Initialize new IPA variables.
10458 * target.h (struct target_ops): Add arguments to
10459 install_fast_tracepoint_jump_pad operation, add new
10460 get_min_fast_tracepoint_insn_len operation.
10461 (target_get_min_fast_tracepoint_insn_len): New.
10462 (install_fast_tracepoint_jump_pad): Add arguments.
10463 * server.h (IPA_BUFSIZ): Define.
10464 * linux-i386-ipa.c: Include extra header files.
10465 (initialize_fast_tracepoint_trampoline_buffer): New function.
10466 (initialize_low_tracepoint): Call it.
10467 * server.h (set_trampoline_buffer_space): Declare.
10468 (claim_trampoline_space): Ditto.
10469 (have_fast_tracepoint_trampoline_buffer): Ditto.
10470
10471 2011-11-14 Yao Qi <yao@codesourcery.com>
10472
10473 * server.c (handle_query): Handle InstallInTrace for qSupported.
10474 * tracepoint.c (add_tracepoint): Sort list.
10475 (install_tracepoint, download_tracepoint): New.
10476 (cmd_qtdp): Call them to install and download tracepoints.
10477 (sort_tracepoints): Removed.
10478 (cmd_qtstart): Update.
10479
10480 2011-11-14 Yao Qi <yao@codesourcery.com>
10481
10482 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10483 * mem-break.h: Declare.
10484 * tracepoint.c (cmd_qtstart): Move some code to ...
10485 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10486 New.
10487 (download_tracepoints): Move some code to ...
10488 (download_tracepoint_1): ... here. New.
10489
10490 2011-11-08 Yao Qi <yao@codesourcery.com>
10491
10492 * remote-utils.c (relocate_instruction): A comment fix.
10493
10494 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10495
10496 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10497 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10498 dr_status_mirror and dr_control_mirror from debug_reg_state.
10499 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10500 (i386_initial_stuff): Remove use of deleted globals.
10501 (i386_get_thread_context, i386_set_thread_context,
10502 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10503 from debug_reg_state.
10504
10505 2011-11-05 Yao Qi <yao@codesourcery.com>
10506
10507 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10508 address as TPOINT's.
10509
10510 2011-11-02 Stan Shebs <stan@codesourcery.com>
10511
10512 * tracepoint.c (agent_mem_read_string): New function.
10513 (eval_agent_expr): Call it for tracenz.
10514 * server.c (handle_query): Report support for tracenz.
10515
10516 2011-11-02 Yao Qi <yao@codesourcery.com>
10517
10518 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10519
10520 2011-11-02 Yao Qi <yao@codesourcery.com>
10521
10522 * target.h: Fix a typo in comment.
10523
10524 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10525
10526 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10527 clobber the breakpoints' shadows with fast tracepoint jumps.
10528 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10529 * target.c (write_inferior_memory): Also pass MYADDR down to
10530 check_mem_write.
10531
10532 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10533
10534 * configure.ac: Check support for personality routine.
10535 * configure: Regenerate.
10536 * config.in: Likewise.
10537 * linux-low.c: Include <sys/personality.h>.
10538 Define ADDR_NO_RANDOMIZE if necessary.
10539 (linux_create_inferior): Disable address space randomization when
10540 forking inferior, if requested.
10541 (linux_supports_disable_randomization): New function.
10542 (linux_target_ops): Install it.
10543 * server.h (disable_randomization): Declare.
10544 * server.c (disable_randomization): New global variable.
10545 (handle_general_set): Handle QDisableRandomization.
10546 (handle_query): Likewise for qSupported.
10547 (main): Support --disable-randomization and --no-disable-randomization
10548 command line arguments.
10549 * target.h (struct target_ops): Add supports_disable_randomization.
10550 (target_supports_disable_randomization): New macro.
10551
10552 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10553
10554 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10555 ifdef check.
10556 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10557 [!PT_GETDSBT] (target_loadmap): New definition.
10558 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10559 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10560 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10561 and PT_GETDSBT to LINUX_LOADMAP.
10562 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10563 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10564
10565 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10566
10567 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10568 (arm_linux_hwbp_cap): New static variable.
10569 (arm_linux_get_hwbp_cap): Replace by ...
10570 (arm_linux_init_hwbp_cap): ... this new function.
10571 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10572 (arm_linux_get_hw_watchpoint_count): Likewise.
10573 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10574 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10575 (arm_prepare_to_resume): Use perror_with_name instead of error.
10576
10577 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10578
10579 * linux-arm-low.c: Include <signal.h>.
10580 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10581 (struct arm_linux_hwbp_cap): New data type.
10582 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10583 (struct arm_linux_hw_breakpoint): New data type.
10584 (MAX_BPTS, MAX_WPTS): Define.
10585 (struct arch_process_info, struct arch_lwp_info): New data types.
10586 (arm_linux_get_hwbp_cap): New function.
10587 (arm_linux_get_hw_breakpoint_count): Likewise.
10588 (arm_linux_get_hw_watchpoint_count): Likewise.
10589 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10590 (arm_hwbp_control_initialize): Likewise.
10591 (arm_hwbp_control_is_enabled): Likewise.
10592 (arm_hwbp_control_is_initialized): Likewise.
10593 (arm_hwbp_control_disable): Likewise.
10594 (arm_linux_hw_breakpoint_equal): Likewise.
10595 (arm_linux_hw_point_initialize): Likewise.
10596 (struct update_registers_data): New data structure.
10597 (update_registers_callback: New function.
10598 (arm_insert_point): Likewise.
10599 (arm_remove_point): Likewise.
10600 (arm_stopped_by_watchpoint): Likewise.
10601 (arm_stopped_data_address): Likewise.
10602 (arm_new_process): Likewise.
10603 (arm_new_thread): Likewise.
10604 (arm_prepare_to_resume): Likewise.
10605 (the_low_target): Register arm_insert_point, arm_remove_point,
10606 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10607 arm_new_thread, and arm_prepare_to_resume.
10608
10609 2011-09-15 Stan Shebs <stan@codesourcery.com>
10610
10611 * server.h (struct emit_ops): Add compare-goto fields.
10612 * tracepoint.c (gdb_agent_op_sizes): New table.
10613 (emit_eq_goto): New function.
10614 (emit_ne_goto): New function.
10615 (emit_lt_goto): New function.
10616 (emit_le_goto): New function.
10617 (emit_gt_goto): New function.
10618 (emit_ge_goto): New function.
10619 (is_goto_target): New function.
10620 (compile_bytecodes): Recognize special cases of compare-goto
10621 combinations and call specialized emitters for them.
10622 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10623 (amd64_emit_ne_goto): New function.
10624 (amd64_emit_lt_goto): New function.
10625 (amd64_emit_le_goto): New function.
10626 (amd64_emit_gt_goto): New function.
10627 (amd64_emit_ge_goto): New function.
10628 (amd64_emit_ops): Add the new functions.
10629 (i386_emit_eq_goto): New function.
10630 (i386_emit_ne_goto): New function.
10631 (i386_emit_lt_goto): New function.
10632 (i386_emit_le_goto): New function.
10633 (i386_emit_gt_goto): New function.
10634 (i386_emit_ge_goto): New function.
10635 (i386_emit_ops): Add the new functions.
10636
10637 2011-09-08 Stan Shebs <stan@codesourcery.com>
10638
10639 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10640 (i386_emit_epilogue): Restore %ebx.
10641
10642 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10643
10644 * server.c (step_thread): Remove definition.
10645 (process_serial_event): Don't handle Hs.
10646 * server.h (step_thread): Remove declaration.
10647 * target.c (set_desired_inferior): Remove use of step_thread.
10648
10649 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10650
10651 * linux-low.c: Include linux-procfs.h.
10652 (linux_attach_lwp_1): Update comments.
10653 (linux_attach): Scan for existing threads when attaching to a
10654 process that is the tgid.
10655 * Makefile.in: Update dependencies.
10656
10657 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10658
10659 * configure.srv: Add linux-procfs.o dependencies.
10660
10661 2011-08-14 Yao Qi <yao@codesourcery.com>
10662
10663 * target.h (struct target_ops): Fix indent.
10664 * win32-low.c (win32_target_ops): Fix comment.
10665
10666 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10667 Yao Qi <yao@codesourcery.com>
10668
10669 * Makefile.in (clean): Remove tic6x-*.c files.
10670 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10671 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10672 (tic6x-c64xp-linux.c): Likewise.
10673 * configure.srv: Add support for tic6x-*-uclinux.
10674 * linux-tic6x-low.c: New.
10675 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10676
10677 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10678 Yao Qi <yao@codesourcery.com>
10679
10680 * target.h (struct target_ops): Add read_loadmap.
10681 * linux-low.c (struct target_loadseg): New type.
10682 (struct target_loadmap): New type.
10683 (linux_read_loadmap): New function.
10684 (linux_target_ops): Add linux_read_loadmap.
10685 * server.c (handle_query): Support qXfer:fdpic:read packet.
10686 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10687 to NULL.
10688
10689 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10690
10691 * win32-low.c: Include <stdint.h>.
10692
10693 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10694
10695 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10696 to the inferior here.
10697 (i386_remove_aligned_watchpoint): Ditto.
10698 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10699 fit part of the watchpoint in the debug registers.
10700 (i386_update_inferior_debug_regs): New.
10701 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10702 registers, and only update the inferior on success.
10703 (i386_low_remove_watchpoint): Ditto.
10704
10705 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10706
10707 * linux-low.c (compare_ints, unique, list_threads, show_process,
10708 linux_core_of_thread): Delete.
10709 (linux_target_ops): Change linux_core_of_thread to
10710 linux_common_core_of_thread.
10711 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10712 * utils.c (malloc_failure): Change type of argument.
10713 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10714 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10715 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10716 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10717 (IPA_OBJS): Add common-utils-ipa.o.
10718 (ptid_h, linux_osdata_h): New macros.
10719 (server_h): Add common/common-utils.h, common/xml-utils.h,
10720 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10721 common/ptid.h.
10722 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10723 ptid.o, buffer.o): New rules.
10724 (linux-low.o): Add common/linux-osdata.h as a dependency.
10725 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10726 * configure.ac: Add AC_HEADER_DIRENT check.
10727 * config.in: Regenerate.
10728 * configure: Regenerate.
10729 * remote-utils.c (xml_escape_text): Delete.
10730 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10731 buffer_xml_printf): Move to common/buffer.c.
10732 * server.c (main): Remove call to initialize_inferiors.
10733 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10734 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10735 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10736 internal_error, gdb_assert, gdb_assert_fail): Delete.
10737 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10738 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10739 common/buffer.h.
10740 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10741 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10742 initialize_inferiors): Delete.
10743
10744 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10745
10746 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10747 symbol error.
10748
10749 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10750
10751 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10752 assertion.
10753 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10754
10755 2011-05-26 Yao Qi <yao@codesourcery.com>
10756
10757 * Makefile.in (thread-db.o): Track dependence to
10758 common/gdb_thread_db.h.
10759 * thread-db.c: include gdb_thread_db.h from right place.
10760
10761 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10762
10763 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10764 __FILE__ and __LINE__ to internal_error.
10765
10766 2011-05-13 Doug Evans <dje@google.com>
10767
10768 * thread-db.c (try_thread_db_load_from_sdir): New function.
10769 (try_thread_db_load_from_dir): New function.
10770 (thread_db_load_search): Handle $sdir, ignore $pdir.
10771 Remove trying of system directories if search of
10772 libthread-db-search-path fails, that is now done via $sdir.
10773
10774 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10775
10776 * server.c (handle_query): Add EnableDisableTracepoints to the list
10777 of supported features.
10778 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10779 tracepoints.
10780 (cmd_qtenable_disable): New.
10781 (cmd_qtstart): Install tracepoints even if disabled.
10782 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10783 receiving a QTEnable or QTDisable packet.
10784 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10785 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10786 tracepoints.
10787 (gdb_probe): Skip data collection if static tracepoint is disabled.
10788
10789 2011-05-10 Doug Evans <dje@google.com>
10790
10791 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10792
10793 2011-05-04 Doug Evans <dje@google.com>
10794
10795 * linux-low.c (linux_join): Skip process lookup.
10796 * spu-low.c (spu_join): Ditto.
10797 * server.c (join_inferiors_callback): Delete.
10798 (process_serial_event): For 'D' packet (detach) call join_inferior
10799 directly.
10800
10801 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10802
10803 * README: Don't mention xscale*-*-linux*.
10804 * configure.srv (xscale*-*-linux*): Don't handle target.
10805
10806 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10807
10808 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10809 casting pointers.
10810 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10811 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10812 (i386_emit_void_call_2): Likewise.
10813
10814 2011-04-26 Yao Qi <yao@codesourcery.com>
10815
10816 * linux-low.c: Move common macros to linux-ptrace.h.
10817 Include linux-ptrace.h.
10818 * Makefile.in (linux_ptrace_h): New.
10819 (linux-low.o): Depends on linux-ptrace.h.
10820
10821 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10822
10823 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10824 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10825 (remote_prepare): New function with most of the TCP code from ...
10826 (remote_open): ... here. Detect PORT here unconditionally. Move also
10827 setting transport_is_reliable.
10828 * server.c (run_once): New variable.
10829 (gdbserver_usage): Document it.
10830 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10831 the first run if RUN_ONCE.
10832 * server.h (run_once, remote_prepare): New declarations.
10833
10834 2011-04-19 Tom Tromey <tromey@redhat.com>
10835
10836 * win32-low.c (handle_load_dll): Remove duplicate "the".
10837
10838 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10839
10840 Remove support for old Cygwin 1.5 versions.
10841 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10842 function to avoid warning.
10843 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10844 warning.
10845
10846 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10847
10848 * gdbserver/server.h (Macro _): Define it if not available.
10849
10850 2011-03-14 Michael Snyder <msnyder@vmware.com>
10851
10852 * hostio.c (handle_close): Remove unnecessary null test.
10853
10854 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10855
10856 * Makefile.in (maintainer-clean realclean distclean): Remove
10857 "make ... subdir_do" command.
10858
10859 2011-03-10 Michael Snyder <msnyder@vmware.com>
10860
10861 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10862
10863 * server.c (handle_v_run): Free alloced buffer on early return.
10864
10865 2011-03-09 Yao Qi <yao@codesourcery.com>
10866
10867 Revert:
10868 2011-03-04 Yao Qi <yao@codesourcery.com>
10869
10870 * Makefile.in: Remove GNU make feature --directory.
10871
10872 2011-03-05 Yao Qi <yao@codesourcery.com>
10873
10874 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10875 (subdir_do): New make target. Copied from gdb/Makefile.
10876 (maintainer-clean, realclean, distclean, clean): Call corresponding
10877 make targets in common/Makefile.
10878
10879 2011-02-11 Yao Qi <yao@codesourcery.com>
10880
10881 * configure.ac: Call AC_PROG_RANLIB.
10882 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10883 * configure: Regenerate.
10884
10885 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10886
10887 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10888
10889 2011-03-06 Yao Qi <yao@codesourcery.com>
10890
10891 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10892
10893 2011-03-05 Yao Qi <yao@codesourcery.com>
10894
10895 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10896 (subdir_do): New make target. Copied from gdb/Makefile.
10897 (maintainer-clean, realclean, distclean, clean): Call corresponding
10898 make targets in common/Makefile.
10899
10900 2011-03-04 Yao Qi <yao@codesourcery.com>
10901
10902 * Makefile.in: Remove GNU make feature --directory.
10903
10904 2011-03-04 Michael Snyder <msnyder@vmware.com>
10905
10906 * server.c (queue_stop_reply): Call xmalloc not malloc.
10907
10908 2011-03-02 Michael Snyder <msnyder@vmware.com>
10909
10910 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10911
10912 2011-02-28 Michael Snyder <msnyder@vmware.com>
10913
10914 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10915 (cmd_qtframe): Ditto.
10916 (cmd_qtbuffer): Ditto.
10917 (cmd_bigqtbuffer): Ditto.
10918
10919 * utils.c (decimal2str): Initialize 'width' to nine, then
10920 don't mess with it.
10921
10922 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10923
10924 * hostio.c (require_data): Free *data, not data.
10925
10926 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10927
10928 * hostio.c (require_data): Use free, not xfree.
10929
10930 2011-02-27 Michael Snyder <msnyder@vmware.com>
10931
10932 * server.c (handle_query): Discard unused value.
10933
10934 * hostio.c (require_data): Free malloc memory before returning
10935 error.
10936
10937 2011-02-26 Michael Snyder <msnyder@vmware.com>
10938
10939 * linux-low.c (list_threads): Call closedir for dirent.
10940
10941 2011-02-27 Michael Snyder <msnyder@vmware.com>
10942
10943 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10944 a case statement falls through.
10945
10946 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10947
10948 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10949 in comparison.
10950
10951 2011-02-26 Michael Snyder <msnyder@vmware.com>
10952
10953 * utils.c (decimal2str): Eliminate dead code and dead param.
10954 (pulongest): Drop dead param from call to decimal2str.
10955 (plongest): Ditto.
10956
10957 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10958
10959 Revert the following patch (not approved yet):
10960 2011-02-21 Hui Zhu <teawater@gmail.com>
10961 * tracepoint.c (tp_printf): New function.
10962 (eval_agent_expr): Handle gdb_agent_op_printf.
10963
10964 2011-02-21 Hui Zhu <teawater@gmail.com>
10965
10966 * tracepoint.c (tp_printf): New function.
10967 (eval_agent_expr): Handle gdb_agent_op_printf.
10968
10969 2011-02-18 Tom Tromey <tromey@redhat.com>
10970
10971 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10972 (tracepoint.o): Likewise.
10973 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10974 (gdb_agent_op_names): Likewise.
10975
10976 2011-02-18 Tom Tromey <tromey@redhat.com>
10977
10978 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10979 gdb_agent_op_rot>: New constants.
10980 (gdb_agent_op_names): Add pick and roll.
10981 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10982 cases.
10983
10984 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10985
10986 * aclocal.m4: Regenerated with aclocal-1.11.1.
10987
10988 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10989
10990 * server.c (handle_qxfer_traceframe_info): New.
10991 (qxfer_packets): Register "traceframe-info".
10992 (handle_query): Report support for qXfer:traceframe-info:read+.
10993 * tracepoint.c (match_blocktype): New.
10994 (traceframe_find_block_type): Rename to ...
10995 (traceframe_walk_blocks): ... this. Add callback filter argument,
10996 and use it.
10997 (traceframe_find_block_type): New, reimplemented on top of
10998 traceframe_walk_blocks.
10999 (build_traceframe_info_xml): New.
11000 (traceframe_read_info): New.
11001 * server.h (traceframe_read_info): Declare.
11002
11003 2011-02-11 Yao Qi <yao@codesourcery.com>
11004
11005 * configure.ac: Call AC_PROG_RANLIB.
11006 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11007 * configure: Regenerate.
11008
11009 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11010
11011 * server.c (gdb_read_memory): Change return semantics to allow
11012 partial transfers.
11013 (handle_search_memory_1): Adjust.
11014 (process_serial_event) <'m' packet>: Handle partial transfers.
11015 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11016
11017 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11018
11019 * regcache.c (init_register_cache): Initialize
11020 regcache->register_status.
11021 (free_register_cache): Release regcache->register_status.
11022 (regcache_cpy): Copy register_status.
11023 (registers_to_string): Print 'x's for unavailable registers.
11024 (supply_register): Mark the register's status valid or
11025 unavailable, depending on whether a buffer was passed in or not.
11026 (supply_register_zeroed): New.
11027 (supply_regblock): Mark the registers' status valid or
11028 unavailable, depending on whether a buffer was passed in or not.
11029 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11030 (struct regcache): New `register_status' field.
11031 (supply_register_zeroed): Declare.
11032 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11033 supply_register_zeroed, rather than passing a NULL buffer to
11034 supply_register.
11035 * tracepoint.c (fetch_traceframe_registers): Update comment.
11036
11037 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11038
11039 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11040 buffer explicit.
11041
11042 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11043
11044 * server.h (decode_xfer_write): Change prototype.
11045 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11046 and don't extract the annex here.
11047 * server.c (decode_xfer_read): Remove `annex' parameter,
11048 and don't extract the annex here.
11049 (decode_xfer): New.
11050 (struct qxfer): New.
11051 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11052 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11053 (handle_qxfer_statictrace): New functions, abstracted out from
11054 handle_query, and made to use the struct qxfer interface.
11055 (handle_threads_qxfer_proper): Rename to ...
11056 (handle_qxfer_threads_proper): ... this.
11057 (handle_threads_qxfer): Rename to ...
11058 (handle_qxfer_threads): ... this. Adjust.
11059 (qxfer_packets): New array.
11060 (handle_qxfer): New function.
11061 (handle_query): Use handle_qxfer.
11062
11063 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11064
11065 * gdbreplay.c: Shorten lines of >= 80 columns.
11066 * linux-low.c: Ditto.
11067 * linux-ppc-low.c: Ditto.
11068 * linux-s390-low.c: Ditto.
11069 * linux-sparc-low.c: Ditto.
11070 * linux-x86-low.c: Ditto.
11071 * linux-xtensa-low.c: Ditto.
11072 * mem-break.c: Ditto.
11073 * nto-low.c: Ditto.
11074 * regcache.h: Ditto.
11075 * remote-utils.c: Ditto.
11076 * server.c: Ditto.
11077 * server.h: Ditto.
11078 * thread-db.c: Ditto.
11079 * tracepoint.c: Ditto.
11080 * utils.c: Ditto.
11081 * win32-low.h: Ditto.
11082
11083 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11084
11085 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11086 update.
11087
11088 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11089
11090 * server.c (gdbserver_version): Update copyright year in version
11091 output.
11092 * gdbreplay.c (gdbreplay_version): Ditto.
11093
11094 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11095
11096 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11097 * linux-bfin-low.c: New file.
11098 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11099 PT_DATA_ADDR for BFIN targets.
11100 * Makefile.in (SFILES): Add linux-bfin-low.c.
11101 (clean): Remove reg-bfin.c.
11102 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11103 * README: Mention supported Blackfin targets.
11104
11105 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11106
11107 * .gitignore: New file.
11108
11109 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11110
11111 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11112
11113 2010-10-22 Jie Zhang <jie@codesourcery.com>
11114
11115 * Makefile.in: Add FLAGS_TO_PASS variable.
11116 (install): Remove dependency of install-only and recursively
11117 invoke make for install-only.
11118
11119 2010-10-04 Doug Evans <dje@google.com>
11120
11121 * Makefile.in (uninstall): Use $(DESTDIR).
11122
11123 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11124
11125 PR gdb/11842
11126
11127 * linux-x86-low.c (compat_siginfo_from_siginfo)
11128 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11129 si_code is < 0. Check for si_code == SI_TIMER before checking for
11130 si_code < 0.
11131
11132 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11133
11134 * lynx-i386-low.c: New file.
11135 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11136
11137 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11138
11139 * lynx-low.c (ptrace_request_to_str): Remove handling for
11140 request values that have been removed in LynxOS 5.x.
11141
11142 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11143
11144 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11145 <ptrace.h>
11146
11147 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11148
11149 * configure.ac: Add --enable-inprocess-agent option.
11150 * configure: Rebuilt.
11151
11152 2010-09-06 Yao Qi <yao@codesourcery.com>
11153
11154 * linux-low.c (linux_kill): Remove unused variable.
11155 (linux_stabilize_threads): Likewise.
11156 * server.c (start_inferior): Likewise.
11157 (queue_stop_reply_callback): Likewise.
11158 * tracepoint.c (do_action_at_tracepoint): Likewise.
11159
11160 2010-09-06 Yao Qi <yao@codesourcery.com>
11161
11162 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11163 on return.
11164
11165 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11166
11167 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11168
11169 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11170
11171 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11172 "$(IPA_DEPFILES)".
11173
11174 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11175
11176 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11177 gdbserver/lynx-ppc-low.c: New files.
11178 * Makefile.in (lynx_low_h): New variable.
11179 (lynx-low.o, lynx-ppc-low.o): New rules.
11180 * configure.ac: On LynxOS, link with -lnetinet.
11181 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11182 * configure: regenerate.
11183
11184 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11185
11186 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11187 * configure.ac: Add check for vasprintf and vsnprintf.
11188 * configure, config.in: Regenerate.
11189 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11190
11191 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11192
11193 * gdbreplay.c: Move include of alloca.h up, next to include of
11194 malloc.h.
11195 * server.h: Add include of malloc.h.
11196 * mem-break.c: Remove include of malloc.h.
11197 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11198
11199 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11200
11201 * Makefile.in (memmem.o): Build with -Wno-error.
11202
11203 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11204
11205 * utils.c (xsnprintf): Make non-static.
11206 * server.h: Add xsnprintf declaration.
11207 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11208 replace calls to snprintf by calls to xsnprintf throughout.
11209
11210 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11211
11212 * configure.ac: Add configure check for alloca.
11213 * configure, config.in: Regenerate.
11214 * server.h: Include alloca.h if it exists.
11215 * gdbreplay.c: Include alloca.h if it exists.
11216
11217 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11218
11219 * linux-low.c (__SIGRTMIN): Define if not already defined.
11220 (linux_create_inferior): Check for __ANDROID__ rather than
11221 __SIGRTMIN.
11222 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11223 are already deferred.
11224 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11225 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11226 stopped and already has a pending signal to report.
11227 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11228 a pending signal to report or is moving out of a jump pad.
11229 (linux_init_signals): Check for __ANDROID__ rather than
11230 __SIGRTMIN.
11231
11232 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11233
11234 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11235 debug_threads check. Avoid a linear search when not doing debug
11236 output.
11237
11238 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11239
11240 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11241 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11242 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11243 (process_event): Change local fd's type to gdb_fildes_t.
11244 (create_file_handler): Adjust prototype.
11245 (delete_file_handler): Adjust prototype.
11246 (handle_file_event): Adjust prototype. Use pfildes.
11247 (create_file_event): Adjsut prototype.
11248 * remote-utils.c (remote_desc, listen_desc): Change type to
11249 gdb_fildes_t.
11250 * server.h: New gdb_fildes_t typedef.
11251 [USE_WIN32API]: Include winsock2.h.
11252 (delete_file_handler, add_file_handler): Adjust prototypes.
11253 (pfildes): Declare.
11254 * utils.c (pfildes): New.
11255
11256 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11257
11258 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11259 * configure: Regenerate.
11260
11261 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11262
11263 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11264 (linux_done_accessing_memory): ... this.
11265 (linux_target_ops): Adjust.
11266 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11267 * nto-low.c (nto_target_ops): Adjust comment.
11268 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11269 * spu-low.c (spu_target_ops): Adjust comment.
11270 * target.h (target_ops): Rename unprepare_to_access_memory field
11271 to done_accessing_memory.
11272 (unprepare_to_access_memory): Rename to ...
11273 (done_accessing_memory): ... this.
11274
11275 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11276
11277 * linux-low.c (linux_prepare_to_access_memory): New.
11278 (linux_unprepare_to_access_memory): New.
11279 (linux_target_ops): Install them.
11280 * server.c (read_memory): Rename to ...
11281 (gdb_read_memory): ... this. Use
11282 prepare_to_access_memory/prepare_to_access_memory.
11283 (write_memory): Rename to ...
11284 (gdb_write_memory): ... this. Use
11285 prepare_to_access_memory/prepare_to_access_memory.
11286 (handle_search_memory_1): Adjust.
11287 (process_serial_event): Adjust.
11288 * target.h (struct target_ops): New fields
11289 prepare_to_access_memory and unprepare_to_access_memory.
11290 (prepare_to_access_memory, unprepare_to_access_memory): New.
11291 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11292 prepare_to_access_memory/prepare_to_access_memory.
11293 * nto-low.c (nto_target_ops): Adjust.
11294 * spu-low.c (spu_target_ops): Adjust.
11295 * win32-low.c (win32_target_ops): Adjust.
11296
11297 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11298
11299 * Makefile.in (WARN_CFLAGS): Get it from configure.
11300 (WERROR_CFLAGS): New.
11301 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11302 * configure.ac: Introduce --enable-werror, which adds -Werror to
11303 the compiler command line. Enabled by default. Disable with
11304 --disable-werror. Add -Wdeclaration-after-statement
11305 Wpointer-arith and -Wformat-nonliteral to warning flags.
11306 * configure: Regenerate.
11307
11308 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11309
11310 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11311
11312 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11313
11314 * gdbreplay.c (remote_error): New.
11315 (gdbchar): New.
11316 (expect): Use gdbchar. Check for error reading from GDB.
11317 Clarify sync error output.
11318 (play): Check for errors writing to GDB.
11319 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11320 * remote-utils.c (getpkt): Check for errors writing to the remote
11321 descriptor.
11322
11323 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11324
11325 * linux-low.c (linux_wait_1): Move non-debugging code out of
11326 `debug_threads' control.
11327
11328 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11329
11330 * linux-low.c (linux_wait_1): Don't set last_status here.
11331 * server.c (push_event, queue_stop_reply_callback): Assert we're
11332 not pushing a TARGET_WAITKIND_IGNORE event.
11333 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11334 (myresume, handle_target_event): Set the thread's last_resume_kind
11335 and last_status from the target returned status.
11336
11337 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11338
11339 PR threads/10729
11340
11341 * linux-x86-low.c (update_debug_registers_callback): New.
11342 (i386_dr_low_set_addr): Use it.
11343 (i386_dr_low_get_addr): New.
11344 (i386_dr_low_set_control): Use update_debug_registers_callback.
11345 (i386_dr_low_get_control): New.
11346 (i386_dr_low_get_status): Adjust.
11347 * linux-low.c (linux_stop_lwp): New.
11348 * linux-low.h (linux_stop_lwp): Declare.
11349
11350 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11351 argument instead of a i386_debug_reg_state.
11352 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11353 a i386_debug_reg_state.
11354 (i386_insert_aligned_watchpoint): Adjust.
11355 (i386_remove_aligned_watchpoint): Adjust.
11356 (i386_low_stopped_data_address): Read the debug registers from the
11357 inferior instead of from the mirrors.
11358 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11359 (i386_dr_low_get_addr): Declare.
11360 (i386_dr_low_get_control): Declare.
11361 (i386_dr_low_get_status): Change prototype.
11362
11363 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11364 (i386_dr_low_get_addr): New.
11365 (i386_dr_low_get_control): New.
11366 (i386_dr_low_get_status): Adjust prototype. Return
11367 dr_status_mirror.
11368 (i386_initial_stuff): Clear dr_status_mirror and
11369 dr_control_mirror.
11370 (i386_get_thread_context): Adjust.
11371 (i386_set_thread_context): Adjust.
11372 (i386_thread_added): Adjust.
11373
11374 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11375
11376 * linux-low.h (linux_thread_area): Delete declaration.
11377
11378 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11379
11380 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11381 after its termination.
11382
11383 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11384
11385 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11386 (gdb_wants_all_stopped): Delete.
11387 (linux_wait_1): Don't call them.
11388 * server.c (handle_v_cont): Tag all threads as want-stopped.
11389 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11390 stopped as "client-wants-stopped".
11391
11392 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11393
11394 * Makefile.in (signals_h): New.
11395 (server_h): Depend on it.
11396 (server.o): Don't depend on $(signals_def).
11397 (signals.o): Depend on $(signals_def).
11398
11399 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11400
11401 * Makefile.in (signals_def): New.
11402 (server_h): Append include/gdb/signals.h and signals_def.
11403 (server.o): Append signals_def.
11404
11405 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11406
11407 * server.c (handle_target_event): Use target_signal_to_host for
11408 resume_info.sig initialization.
11409 * target.h (struct thread_resume) <sig>: New comment.
11410
11411 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11412
11413 * server.c (handle_query): strcpy() the returned string from paddress()
11414 instead of sprintf().
11415 * utils.c (paddress): Return phex_nz().
11416
11417 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11418
11419 * server.c (handle_v_cont): Call mourn_inferior if process
11420 just exited.
11421 (myresume): Likewise.
11422
11423 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11424
11425 Static tracepoints, and integration with UST.
11426
11427 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11428 * mem-break.c (uninsert_all_breakpoints)
11429 (reinsert_all_breakpoints): New.
11430 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11431 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11432 (gdb_agent_ust_loaded, helper_thread_id)
11433 (gdb_agent_helper_thread_id): New macros.
11434 (struct ipa_sym_addresses): Add addr_ust_loaded,
11435 addr_helper_thread_id, addr_cmd_buf.
11436 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11437 (in_process_agent_loaded_ust): New.
11438 (write_e_ust_not_loaded): New.
11439 (maybe_write_ipa_ust_not_loaded): New.
11440 (struct collect_static_trace_data_action): New.
11441 (enum tracepoint_type) <static_tracepoint>: New.
11442 (struct tracepoint) <handle>: Mention static tracepoints.
11443 (struct static_tracepoint_ctx): New.
11444 (CMD_BUF_SIZE): New.
11445 (add_tracepoint_action): Handle static tracepoint actions.
11446 (unprobe_marker_at): New.
11447 (clear_installed_tracepoints): Handle static tracepoints.
11448 (cmd_qtdp): Handle static tracepoints.
11449 (probe_marker_at): New.
11450 (cmd_qtstart): Handle static tracepoints.
11451 (response_tracepoint): Handle static tracepoints.
11452 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11453 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11454 (get_context_regcache): Handle static tracepoints.
11455 (do_action_at_tracepoint): Handle static tracepoint actions.
11456 (traceframe_find_block_type): Handle static trace data blocks.
11457 (traceframe_read_sdata): New.
11458 (download_tracepoints): Download static tracepoint actions.
11459 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11460 (GDB_PROBE_NAME): New.
11461 (ust_ops): New.
11462 (GET_UST_SYM): New.
11463 (USTF): New.
11464 (dlsym_ust): New.
11465 (ust_marker_to_static_tracepoint): New.
11466 (gdb_probe): New.
11467 (collect_ust_data_at_tracepoint): New.
11468 (gdb_ust_probe): New.
11469 (UNIX_PATH_MAX, SOCK_DIR): New.
11470 (gdb_ust_connect_sync_socket): New.
11471 (resume_thread, stop_thread): New.
11472 (run_inferior_command): New.
11473 (init_named_socket): New.
11474 (gdb_ust_socket_init): New.
11475 (cstr_to_hexstr): New.
11476 (next_st): New.
11477 (first_marker, next_marker): New.
11478 (response_ust_marker): New.
11479 (cmd_qtfstm, cmd_qtsstm): New.
11480 (unprobe_marker_at, probe_marker_at): New.
11481 (cmd_qtstmat, gdb_ust_thread): New.
11482 (gdb_ust_init): New.
11483 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11484 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11485 (ST_REGENTRY): New.
11486 (x86_64_st_collect_regmap): New.
11487 (X86_64_NUM_ST_COLLECT_GREGS): New.
11488 (AMD64_RIP_REGNUM): New.
11489 (supply_static_tracepoint_registers): New.
11490 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11491 (ST_REGENTRY): New.
11492 (i386_st_collect_regmap): New.
11493 (i386_NUM_ST_COLLECT_GREGS): New.
11494 (supply_static_tracepoint_registers): New.
11495 * server.c (handle_query): Handle qXfer:statictrace:read.
11496 <qSupported>: Report support for StaticTracepoints, and
11497 qXfer:statictrace:read features.
11498 * server.h (traceframe_read_sdata)
11499 (supply_static_tracepoint_registers): Declare.
11500 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11501 (unpack_varlen_hex): Include in IPA build.
11502 * Makefile.in (ustlibs, ustinc): New.
11503 (IPA_OBJS): Add remote-utils-ipa.o.
11504 ($(IPA_LIB)): Link -ldl and -lpthread.
11505 (UST_CFLAGS): New.
11506 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11507 * config.in, configure: Regenerate.
11508
11509 2010-06-20 Ian Lance Taylor <iant@google.com>
11510 Pedro Alves <pedro@codesourcery.com>
11511
11512 * linux-x86-low.c (always_true): Delete.
11513 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11514 trying to fool the compiler with always_true.
11515
11516 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11517
11518 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11519 conditions in gdbserver.
11520
11521 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11522
11523 * spu-low.c (spu_read_memory): Wrap around local store limit.
11524 (spu_write_memory): Likewise.
11525
11526 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11527
11528 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11529 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11530 LONGEST uses.
11531 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11532 uses.
11533 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11534 uses with LONGEST uses.
11535
11536 2010-06-14 Stan Shebs <stan@codesourcery.com>
11537 Pedro Alves <pedro@codesourcery.com>
11538
11539 Bytecode compiler.
11540
11541 * linux-x86-low.c: Include limits.h.
11542 (add_insns): New.
11543 (always_true): New.
11544 (EMIT_ASM): New.
11545 (EMIT_ASM32): New.
11546 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11547 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11548 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11549 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11550 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11551 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11552 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11553 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11554 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11555 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11556 (amd64_emit_void_call_2): New.
11557 (amd64_emit_ops): New.
11558 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11559 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11560 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11561 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11562 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11563 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11564 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11565 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11566 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11567 (i386_emit_stack_adjust, i386_emit_int_call_1)
11568 (i386_emit_void_call_2): New.
11569 (i386_emit_ops): New.
11570 (x86_emit_ops): New.
11571 (the_low_target): Install x86_emit_ops.
11572 * server.h (struct emit_ops): New.
11573 (get_raw_reg_func_addr): Declare.
11574 (current_insn_ptr, emit_error): Declare.
11575 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11576 (set_trace_state_variable_value): New defines.
11577 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11578 addr_get_trace_state_variable_value and
11579 addr_set_trace_state_variable_value.
11580 (symbol_list): New fields for get_raw_reg,
11581 get_trace_state_variable_value and set_trace_state_variable_value.
11582 (condfn): New typedef.
11583 (struct tracepoint): New field `compiled_cond'.
11584 (do_action_at_tracepoint): Clear compiled_cond.
11585 (get_trace_state_variable_value, set_trace_state_variable_value):
11586 Export in the IPA.
11587 (condition_true_at_tracepoint): If there's a compiled condition,
11588 run that.
11589 (current_insn_ptr, emit_error): New globals.
11590 (struct bytecode_address): New.
11591 (get_raw_reg_func_addr): New.
11592 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11593 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11594 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11595 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11596 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11597 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11598 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11599 (compile_tracepoint_condition, compile_bytecodes): New.
11600 * target.h (emit_ops): Forward declare.
11601 (struct target_ops): New field emit_ops.
11602 (target_emit_ops): New.
11603 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11604 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11605 * linux-low.c (linux_emit_ops): New.
11606 (linux_target_ops): Install it.
11607 * linux-low.h (struct linux_target_ops): New field emit_ops.
11608
11609 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11610
11611 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11612 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11613
11614 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11615 Stan Shebs <stan@codesourcery.com>
11616
11617 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11618 (all): Depend on $(extra_libraries).
11619 (install-only): Install the IPA.
11620 (IPA_OBJS, IPA_LIB): New.
11621 (clean): Remove the IPA lib.
11622 (IPAGENT_CFLAGS): New.
11623 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11624 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11625 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11626 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11627 * configure.ac: Check for atomic builtins support in the compiler.
11628 (IPA_DEPFILES, extra_libraries): Define.
11629 * configure.srv (ipa_obj): Add description.
11630 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11631 (i[34567]86-*-linux*): Set ipa_obj.
11632 (x86_64-*-linux*): Set ipa_obj.
11633 * linux-low.c (stabilizing_threads): New.
11634 (supports_fast_tracepoints): New.
11635 (linux_detach): Stabilize threads before detaching.
11636 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11637 the lwp is either not stabilizing, or is moving out of a jump pad.
11638 (linux_fast_tracepoint_collecting): New.
11639 (maybe_move_out_of_jump_pad): New.
11640 (enqueue_one_deferred_signal): New.
11641 (dequeue_one_deferred_signal): New.
11642 (linux_wait_for_event_1): If moving out of a jump pad, defer
11643 pending signals to later.
11644 (linux_stabilize_threads): New.
11645 (linux_wait_1): Check if threads need moving out of jump pads, and
11646 do it if so.
11647 (stuck_in_jump_pad_callback): New.
11648 (move_out_of_jump_pad_callback): New.
11649 (lwp_running): New.
11650 (linux_resume_one_lwp): Handle moving out of jump pads.
11651 (linux_set_resume_request): Dequeue deferred signals.
11652 (need_step_over_p): Also step over fast tracepoint jumps.
11653 (start_step_over): Also uninsert fast tracepoint jumps.
11654 (finish_step_over): Also reinsert fast tracepoint jumps.
11655 (linux_install_fast_tracepoint_jump): New.
11656 (linux_target_ops): Install linux_stabilize_threads and
11657 linux_install_fast_tracepoint_jump_pad.
11658 * linux-low.h (linux_target_ops) <get_thread_area,
11659 install_fast_tracepoint_jump_pad>: New fields.
11660 (struct lwp_info) <collecting_fast_tracepoint,
11661 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11662 (linux_get_thread_area): Declare.
11663 * linux-x86-low.c (jump_insn): New.
11664 (x86_get_thread_area): New.
11665 (append_insns): New.
11666 (push_opcode): New.
11667 (amd64_install_fast_tracepoint_jump_pad): New.
11668 (i386_install_fast_tracepoint_jump_pad): New.
11669 (x86_install_fast_tracepoint_jump_pad): New.
11670 (the_low_target): Install x86_get_thread_area and
11671 x86_install_fast_tracepoint_jump_pad.
11672 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11673 (struct fast_tracepoint_jump): New.
11674 (fast_tracepoint_jump_insn): New.
11675 (fast_tracepoint_jump_shadow): New.
11676 (find_fast_tracepoint_jump_at): New.
11677 (fast_tracepoint_jump_here): New.
11678 (delete_fast_tracepoint_jump): New.
11679 (set_fast_tracepoint_jump): New.
11680 (uninsert_fast_tracepoint_jumps_at): New.
11681 (reinsert_fast_tracepoint_jumps_at): New.
11682 (set_breakpoint_at): Use write_inferior_memory.
11683 (uninsert_raw_breakpoint): Use write_inferior_memory.
11684 (check_mem_read): Mask out fast tracepoint jumps.
11685 (check_mem_write): Mask out fast tracepoint jumps.
11686 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11687 (set_fast_tracepoint_jump): Declare.
11688 (delete_fast_tracepoint_jump)
11689 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11690 (reinsert_fast_tracepoint_jumps_at): Declare.
11691 * regcache.c: Don't compile many functions when building the
11692 in-process agent library.
11693 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11694 the register buffer in the heap.
11695 (free_register_cache): If the register buffer isn't owned by the
11696 regcache, don't free it.
11697 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11698 pre-existing register caches.
11699 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11700 type.
11701 (convert_ascii_to_int): : Constify `from' parameter type.
11702 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11703 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11704 the needed buffer in-place.
11705 (relocate_instruction): New.
11706 * server.c (handle_query) <qSymbols>: If the target supports
11707 tracepoints, give it a chance of looking up symbols. Report
11708 support for fast tracepoints.
11709 (handle_status): Stabilize threads.
11710 (process_serial_event): Adjust.
11711 * server.h (struct fast_tracepoint_jump): Forward declare.
11712 (struct process_info) <fast_tracepoint_jumps>: New field.
11713 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11714 (decode_X_packet, decode_M_packet): Adjust.
11715 (relocate_instruction): Declare.
11716 (in_process_agent_loaded): Declare.
11717 (tracepoint_look_up_symbols): Declare.
11718 (struct fast_tpoint_collect_status): Declare.
11719 (fast_tracepoint_collecting): Declare.
11720 (force_unlock_trace_buffer): Declare.
11721 (handle_tracepoint_bkpts): Declare.
11722 (initialize_low_tracepoint)
11723 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11724 * target.h (struct target_ops) <stabilize_threads,
11725 install_fast_tracepoint_jump_pad>: New fields.
11726 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11727 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11728 [HAVE_STDINT_H]: Include stdint.h.
11729 (trace_debug_1): Rename to ...
11730 (trace_vdebug): ... this.
11731 (trace_debug): Rename to ...
11732 (trace_debug_1): ... this. Add `level' parameter.
11733 (trace_debug): New.
11734 (ATTR_USED, ATTR_NOINLINE): New.
11735 (IP_AGENT_EXPORT): New.
11736 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11737 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11738 (about_to_request_buffer_space, trace_buffer_is_full)
11739 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11740 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11741 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11742 (traceframe_write_count, traceframes_created)
11743 (trace_state_variables)
11744 New renaming defines.
11745 (struct ipa_sym_addresses): New.
11746 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11747 (symbol_list): New.
11748 (ipa_sym_addrs): New.
11749 (all_tracepoint_symbols_looked_up): New.
11750 (in_process_agent_loaded): New.
11751 (write_e_ipa_not_loaded): New.
11752 (maybe_write_ipa_not_loaded): New.
11753 (tracepoint_look_up_symbols): New.
11754 (debug_threads) [IN_PROCESS_AGENT]: New.
11755 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11756 (UNKNOWN_SIDE_EFFECTS): New.
11757 (stop_tracing): New.
11758 (flush_trace_buffer): New.
11759 (stop_tracing_bkpt): New.
11760 (flush_trace_buffer_bkpt): New.
11761 (read_inferior_integer): New.
11762 (read_inferior_uinteger): New.
11763 (read_inferior_data_pointer): New.
11764 (write_inferior_data_pointer): New.
11765 (write_inferior_integer): New.
11766 (write_inferior_uinteger): New.
11767 (struct collect_static_trace_data_action): Delete.
11768 (enum tracepoint_type): New.
11769 (struct tracepoint) <type>: New field `type'.
11770 <actions_str, step_actions, step_actions_str>: Only include in
11771 GDBserver.
11772 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11773 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11774 (tracepoints): Use IP_AGENT_EXPORT.
11775 (last_tracepoint): Don't include in the IPA.
11776 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11777 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11778 (alloced_trace_state_variables): New.
11779 (trace_state_variables): Use IP_AGENT_EXPORT.
11780 (traceframe_t): Delete unused variable.
11781 (circular_trace_buffer): Don't include in the IPA.
11782 (trace_buffer_start): Delete.
11783 (struct trace_buffer_control): New.
11784 (trace_buffer_free): Delete.
11785 (struct ipa_trace_buffer_control): New.
11786 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11787 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11788 New.
11789 (trace_buffer_ctrl): New.
11790 (TRACE_BUFFER_CTRL_CURR): New.
11791 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11792 Reimplement as macros.
11793 (trace_buffer_wrap): Delete.
11794 (traceframe_write_count, traceframe_read_count)
11795 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11796 (struct tracepoint_hit_ctx) <type>: New field.
11797 (struct fast_tracepoint_ctx): New.
11798 (memory_barrier): New.
11799 (cmpxchg): New.
11800 (record_tracepoint_error): Update atomically in the IPA.
11801 (clear_inferior_trace_buffer): New.
11802 (about_to_request_buffer_space): New.
11803 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11804 updating the same buffer.
11805 (add_tracepoint): Default the tracepoint's type to trap
11806 tracepoint, and orig_size to -1.
11807 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11808 internal variables.
11809 (create_trace_state_variable): New parameter `gdb'. Handle it.
11810 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11811 (cmd_qtdp): Handle fast tracepoints.
11812 (cmd_qtdv): Adjust.
11813 (max_jump_pad_size): New.
11814 (gdb_jump_pad_head): New.
11815 (get_jump_space_head): New.
11816 (claim_jump_space): New.
11817 (sort_tracepoints): New.
11818 (MAX_JUMP_SIZE): New.
11819 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11820 IPA.
11821 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11822 support. Upload fast traceframes, and delete internal IPA
11823 breakpoints.
11824 (stop_tracing_handler): New.
11825 (flush_trace_buffer_handler): New.
11826 (cmd_qtstop): Upload fast tracepoints.
11827 (response_tracepoint): Handle fast tracepoints.
11828 (tracepoint_finished_step): Upload fast traceframes. Set the
11829 tracepoint hit context's tracepoint type.
11830 (handle_tracepoint_bkpts): New.
11831 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11832 type. Add comment about fast tracepoints.
11833 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11834 non-existing action_str field.
11835 (get_context_regcache): Handle fast tracepoints.
11836 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11837 to the regcache.
11838 (fast_tracepoint_from_jump_pad_address): New.
11839 (fast_tracepoint_from_ipa_tpoint_address): New.
11840 (collecting_t): New.
11841 (force_unlock_trace_buffer): New.
11842 (fast_tracepoint_collecting): New.
11843 (collecting): New.
11844 (gdb_collect): New.
11845 (write_inferior_data_ptr): New.
11846 (target_tp_heap): New.
11847 (target_malloc): New.
11848 (download_agent_expr): New.
11849 (UALIGN): New.
11850 (download_tracepoints): New.
11851 (download_trace_state_variables): New.
11852 (upload_fast_traceframes): New.
11853 (IPA_FIRST_TRACEFRAME): New.
11854 (IPA_NEXT_TRACEFRAME_1): New.
11855 (IPA_NEXT_TRACEFRAME): New.
11856 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11857 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11858 (gdb_jump_pad_buffer_end): New.
11859 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11860 (initialize_tracepoint): Adjust.
11861 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11862 buffer. Initialize the low module.
11863 * utils.c (PREFIX, TOOLNAME): New.
11864 (malloc_failure): Use PREFIX.
11865 (error): In the IPA, an error causes an exit.
11866 (fatal, warning): Use PREFIX.
11867 (internal_error): Use TOOLNAME.
11868 (NUMCELLS): Increase to 10.
11869 * configure, config.in: Regenerate.
11870
11871 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11872
11873 * server.c (handle_query) <qSupported>: Do two passes over the
11874 qSupported string to avoid nesting strtok.
11875
11876 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11877
11878 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11879 (CDEPS): New.
11880 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11881 -Wl,--dynamic-list.
11882 * configure: Regenerate.
11883 * proc-service.list: New.
11884
11885 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11886
11887 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11888 New comment.
11889
11890 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11891
11892 * gdbreplay.c (remote_open): Check error return from socket() call by
11893 its equality to -1 not by it being negative.
11894 * remote-utils.c (remote_open): Likewise.
11895
11896 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11897
11898 * config.h: Regenerate.
11899
11900 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11901
11902 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11903 doesn't provide PTRACE_GET_THREAD_AREA.
11904
11905 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11906
11907 * linux-m68k-low.c: Include <asm/ptrace.h>
11908 (ps_get_thread_area): Implement.
11909
11910 2010-05-03 Doug Evans <dje@google.com>
11911
11912 * event-loop.c (struct callback_event): New struct.
11913 (callback_list): New global.
11914 (append_callback_event, delete_callback_event): New functions.
11915 (process_callback): New function.
11916 (start_event_loop): Call it.
11917 * remote-utils.c (NOT_SCHEDULED): Define.
11918 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11919 moved out of readchar.
11920 (readchar): Rewrite. Call reschedule before returning.
11921 (reset_readchar): New function.
11922 (remote_close): Call it.
11923 (process_remaining, reschedule): New functions.
11924 * server.h (callback_handler_func): New typedef.
11925 (append_callback_event, delete_callback_event): Declare.
11926
11927 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11928
11929 * proc-service.c (ps_pglobal_lookup): Use
11930 thread_db_look_up_one_symbol.
11931 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11932 parameter. Use it instead of all_symbols_looked_up.
11933 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11934 field.
11935 (all_symbols_looked_up): Don't declare.
11936 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11937 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11938 field.
11939 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11940 Set all_symbols_looked_up here.
11941 (thread_db_look_up_one_symbol): New.
11942 (thread_db_get_tls_address): Adjust.
11943 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11944 thread_db object on the heap, and tentatively set it in the
11945 process structure.
11946 (thread_db_init): Don't set all_symbols_looked_up here.
11947 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11948
11949 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11950
11951 * linux-low.c (linux_kill, linux_detach): Adjust.
11952 (status_pending_p_callback): Remove redundant statement. Check
11953 for !TARGET_WAITIKIND_IGNORE, instead of
11954 TARGET_WAITKIND_STOPPED.
11955 (handle_tracepoints): Make sure LWP is locked. Adjust.
11956 (linux_wait_for_event_1): Adjust.
11957 (linux_cancel_breakpoints): New.
11958 (unsuspend_one_lwp): New.
11959 (unsuspend_all_lwps): New.
11960 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11961 (send_sigstop_callback): Change return type to int, add new
11962 `except' parameter and handle it.
11963 (suspend_and_send_sigstop_callback): New.
11964 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11965 pass them down. If SUSPEND, also increment the lwp's suspend
11966 count.
11967 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11968 (need_step_over_p): Don't consider suspended LWPs.
11969 (start_step_over): Adjust.
11970 (proceed_one_lwp): Change return type to int, add new `except'
11971 parameter and handle it.
11972 (unsuspend_and_proceed_one_lwp): New.
11973 (proceed_all_lwps): Use find_inferior instead of
11974 for_each_inferior.
11975 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11976 also decrement the suspend count of LWPs. Pass `except' down,
11977 instead of hacking its suspend count.
11978 (linux_pause_all): Add `freeze' parameter. Adjust.
11979 (linux_unpause_all): New.
11980 (linux_target_ops): Install linux_unpause_all.
11981 * server.c (handle_status): Adjust.
11982 * target.h (struct target_ops): New fields `unpause_all' and
11983 `cancel_breakpoints'. Add new parameter to `pause_all'.
11984 (pause_all): Add new `freeze' parameter.
11985 (unpause_all): New.
11986 (cancel_breakpoints): New.
11987 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11988 cancel breakpoints.
11989 (cmd_qtstart): Pause threads.
11990 (stop_tracing): Pause threads, and cancel breakpoints.
11991 * win32-low.c (win32_target_ops): Adjust.
11992
11993 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11994
11995 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11996 the inferior right away from here...
11997 (linux_wait_1): ... to here, and adjust to check the thread's
11998 last_resume_kind instead of the lwp's step or stop_expected flags.
11999
12000 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12001
12002 * README: Use consistent `GDB' and `GDBserver' spellings.
12003
12004 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12005
12006 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12007 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12008 (linux_detach_one_lwp): Assume the lwp is stopped.
12009 (any_thread_of): Delete.
12010 (linux_detach): Stop all lwps here. Don't blindly delete all
12011 breakpoints.
12012 (delete_lwp_callback): New.
12013 (linux_mourn): Delete all lwps of the process that is gone.
12014 (linux_wait_1): Don't delete the last lwp of the process here.
12015 * mem-break.h (mark_breakpoints_out): Declare.
12016 * mem-break.c (mark_breakpoints_out): New.
12017 (free_all_breakpoints): Use it.
12018 * server.c (handle_target_event): If the process is gone, mark
12019 breakpoints out.
12020 * thread-db.c (struct thread_db) <create_bp>: New field.
12021 (thread_db_enable_reporting): Fix prototype. Store a thread event
12022 breakpoint reference in the thread_db struct.
12023 (thread_db_load_search): Clear the thread_db object.
12024 (try_thread_db_load_1): Ditto.
12025 (switch_to_process): New.
12026 (disable_thread_event_reporting): Use it.
12027 (remove_thread_event_breakpoints): New.
12028 (thread_db_detach, thread_db_mourn): Use it.
12029
12030 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12031
12032 * linux-low.c (linux_enable_event_reporting): New.
12033 (linux_wait_for_event_1, handle_extended_wait): Use it.
12034
12035 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12036
12037 * linux-low.c (linux_kill_one_lwp, linux_kill)
12038 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12039 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12040 SIGSTOP even if the LWP is stopped.
12041 (send_sigstop_callback): New.
12042 (stop_all_lwps): Use send_sigstop_callback instead.
12043 (linux_resume_one_thread): Adjust.
12044 (proceed_one_lwp): Still proceed an LWP that the client has
12045 requested to stop, if we haven't reported it as stopped yet. Make
12046 sure that LWPs the client want stopped, have a pending SIGSTOP.
12047
12048 2010-04-26 Doug Evans <dje@google.com>
12049
12050 * server.c (handle_general_set): Make static.
12051
12052 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12053 Print received char after testing for error/eof instead of before.
12054 (input_interrupt): Tweak comment.
12055
12056 2010-04-23 Doug Evans <dje@google.com>
12057
12058 * server.c (start_inferior): Print inferior argv if --debug.
12059
12060 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12061
12062 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12063 * nto-x86-low.c: Include server.h
12064
12065 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12066
12067 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12068 be consistent with other sources of this directory.
12069 (init_registers_amd64): Correct name of source file of this function
12070 in the comment.
12071
12072 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12073
12074 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12075 64-bit executables.
12076
12077 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12078
12079 * win32-i386-low.c: Add 64-bit support.
12080 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12081 (init_registers_amd64): Declare.
12082 (mappings): Add 64-bit version of array.
12083 (init_windows_x86): New function.
12084 (the_low_target): Change init_arch field to init_windows_x86.
12085
12086 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12087
12088 * win32-low.c: Adapt to support also 64-bit architecture.
12089 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12090 (get_image_name): Use SIZE_T type for local variable `done'.
12091 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12092 (toolhelp_get_dll_name): Idem.
12093 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12094 Use uintptr_t typecast to avoid warning.
12095 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12096 (handle_exception): Use phex_nz to avoid warning.
12097 (win32_wait): Remove unused local variable `process'.
12098
12099 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12100
12101 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12102 `amd64-avx.o'.
12103
12104 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12105
12106 * configure.ac: Use `ws2_32' library for srv_mingw.
12107 * configure: Regenerate.
12108 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12109 * remote-utils.c: Likewise.
12110
12111 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12112
12113 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12114 if __x86_64__ is defined.
12115
12116 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12117
12118 * configure: Regenerate.
12119
12120 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12121
12122 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12123 * target.h (target_ops): New get_tib_address field.
12124 * win32-low.h (win32_thread_info): Add thread_local_base field.
12125 * win32-low.c (child_add_thread): Add tlb argument.
12126 Set thread_local_base field to TLB.
12127 (get_child_debug_event): Adapt to child_add_thread change.
12128 (win32_get_tib_address): New function.
12129 (win32_target_ops): Set get_tib_address field to
12130 win32_get_tib_address.
12131 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12132
12133 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12134
12135 * linux-low.c (linux_mourn): Also remove the process.
12136 * server.c (handle_target_event): Don't remove the process here.
12137 * nto-low.c (nto_mourn): New.
12138 (nto_target_ops): Install it.
12139 * spu-low.c (spu_mourn): New.
12140 (spu_target_ops): Install it.
12141 * win32-low.c (win32_mourn): New.
12142 (win32_target_ops): Install it.
12143
12144 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12145
12146 * server.h (buffer_xml_printf): Remove redundant `;'.
12147
12148 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12149
12150 * regcache.c (set_register_cache): Invalidate regcaches before
12151 changing the register cache layout.
12152 (regcache_invalidate_one): Allow a NULL regcache.
12153 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12154 regcaches before changing the register cache layout or the target
12155 regsets.
12156
12157 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12158
12159 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12160 variable warning on Linux/x86-64.
12161
12162 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12163
12164 GDBserver disconnected tracing support.
12165
12166 * linux-low.c (linux_remove_process): Delete.
12167 (add_lwp): Don't set last_resume_kind here.
12168 (linux_kill): Use `mourn'.
12169 (linux_detach): Use `thread_db_detach', and `mourn'.
12170 (linux_mourn): New.
12171 (linux_attach_lwp_1): Adjust comment.
12172 (linux_attach): last_resume_kind moved the thread_info; adjust.
12173 (status_pending_p_callback): Adjust.
12174 (linux_wait_for_event_1): Adjust.
12175 (count_events_callback, select_singlestep_lwp_callback)
12176 (select_event_lwp_callback, cancel_breakpoints_callback)
12177 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12178 (proceed_one_lwp): Adjust.
12179 (linux_async): Add debug output.
12180 (linux_thread_stopped): New.
12181 (linux_pause_all): New.
12182 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12183 linux_pause_all.
12184 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12185 (thread_db_free): Delete declaration.
12186 (thread_db_detach, thread_db_mourn): Declare.
12187 * thread-db.c (thread_db_init): Use thread_db_mourn.
12188 (thread_db_free): Delete, split in two.
12189 (disable_thread_event_reporting): New.
12190 (thread_db_detach): New.
12191 (thread_db_mourn): New.
12192
12193 * server.h (struct thread_info) <last_resume_kind>: New field.
12194 <attached>: Add comment.
12195 <gdb_detached>: New field.
12196 (handler_func): Change return type to int.
12197 (handle_serial_event, handle_target_event): Ditto.
12198 (gdb_connected): Declare.
12199 (tracing): Delete.
12200 (disconnected_tracing): Declare.
12201 (stop_tracing): Declare.
12202
12203 * server.c (handle_query) <qSupported>: Report support for
12204 disconnected tracing.
12205 (queue_stop_reply_callback): Account for running threads.
12206 (gdb_wants_thread_stopped): New.
12207 (gdb_wants_all_threads_stopped): New.
12208 (gdb_reattached_process): New.
12209 (handle_status): Clear the `gdb_detached' flag of all processes.
12210 In all-stop, stop all threads.
12211 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12212 (process_serial_event): If the remote connection breaks, or if an
12213 exit was forced with "monitor exit", force an event loop exit.
12214 Handle disconnected tracing on detach.
12215 (handle_serial_event): Adjust.
12216 (handle_target_event): If GDB isn't connected, forward events back
12217 to the inferior, unless the last process exited, in which case,
12218 exit gdbserver. Adjust interface.
12219
12220 * remote-utils.c (remote_open): Don't block in accept. Instead
12221 register an event loop source on the listen socket file
12222 descriptor. Refactor bits into ...
12223 (listen_desc): ... this new global.
12224 (gdb_connected): ... this new function.
12225 (enable_async_notification): ... this new function.
12226 (handle_accept_event): ... this new function.
12227 (remote_close): Clear remote_desc.
12228
12229 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12230
12231 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12232 New fields.
12233 (mourn_inferior): Define.
12234 (target_process_qsupported): Avoid the dangling else problem.
12235 (thread_stopped): Define.
12236 (pause_all): Define.
12237 (target_waitstatus_to_string): Declare.
12238 * target.c (target_waitstatus_to_string): New.
12239
12240 * tracepoint.c (tracing): Make extern.
12241 (disconnected_tracing): New.
12242 (stop_tracing): Make extern. Handle tracing stops due to GDB
12243 disconnecting.
12244 (cmd_qtdisconnected): New.
12245 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12246 (handle_tracepoint_general_set): Handle QTDisconnected.
12247
12248 * event-loop.c (event_handler_func): Change return type to int.
12249 (process_event): Bail out if the event handler wants the event
12250 loop to stop.
12251 (handle_file_event): Ditto.
12252 (start_event_loop): Bail out if the event handler wants the event
12253 loop to stop.
12254
12255 * nto-low.c (nto_target_ops): Adjust.
12256 * spu-low.c (spu_wait): Don't remove the process here.
12257 (spu_target_ops): Adjust.
12258 * win32-low.c (win32_wait): Don't remove the process here.
12259 (win32_target_ops): Adjust.
12260
12261 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12262
12263 * regcache.c (realloc_register_cache): Invalidate inferior's
12264 regcache before recreating it.
12265
12266 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12267
12268 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12269
12270 2010-04-09 Stan Shebs <stan@codesourcery.com>
12271 Pedro Alves <pedro@codesourcery.com>
12272
12273 * server.h (LONGEST): New.
12274 (struct thread_info) <while_stepping>: New field.
12275 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12276 Declare.
12277 (initialize_tracepoint, handle_tracepoint_general_set)
12278 (handle_tracepoint_query, tracepoint_finished_step)
12279 (tracepoint_was_hit, release_while_stepping_state_list):
12280 (current_traceframe): Declare.
12281 * server.c (handle_general_set): Handle tracepoint packets.
12282 (read_memory): New.
12283 (write_memory): New.
12284 (handle_search_memory_1): Use read_memory.
12285 (handle_query): Report support for conditional tracepoints, trace
12286 state variables, and tracepoint sources. Handle tracepoint
12287 queries.
12288 (main): Initialize the tracepoints module.
12289 (process_serial_event): Handle traceframe reads/writes.
12290
12291 * linux-low.c (handle_tracepoints): New.
12292 (linux_wait_1): Call it.
12293 (linux_resume_one_lwp): Handle while-stepping.
12294 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12295 (linux_target_ops): Install them.
12296 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12297 New field.
12298 * linux-x86-low.c (x86_supports_tracepoints): New.
12299 (the_low_target). Install it.
12300
12301 * mem-break.h (delete_breakpoint): Declare.
12302 * mem-break.c (delete_breakpoint): Make external.
12303
12304 * target.h (struct target_ops): Add `supports_tracepoints',
12305 `read_pc', and `write_pc' fields.
12306 (target_supports_tracepoints): Define.
12307 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12308 (phex_nz): New.
12309
12310 * regcache.h (struct regcache) <registers_owned>: New field.
12311 (init_register_cache, regcache_cpy): Declare.
12312 (regcache_read_pc, regcache_write_pc): Declare.
12313 (register_cache_size): Declare.
12314 (supply_regblock): Declare.
12315 * regcache.c (init_register_cache): New.
12316 (new_register_cache): Use it.
12317 (regcache_cpy): New.
12318 (register_cache_size): New.
12319 (supply_regblock): New.
12320 (regcache_read_pc, regcache_write_pc): New.
12321
12322 * tracepoint.c: New.
12323
12324 * Makefile.in (OBS): Add tracepoint.o.
12325 (tracepoint.o): New rule.
12326
12327 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12328
12329 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12330 (i386-mmx.o): New.
12331 (i386-mmx.c): Likewise.
12332 (i386-mmx-linux.o): Likewise.
12333 (i386-mmx-linux.c): Likewise.
12334
12335 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12336 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12337 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12338 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12339
12340 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12341 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12342 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12343
12344 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12345
12346 * Makefile.in (clean): Updated.
12347 (i386-avx.o): New.
12348 (i386-avx.c): Likewise.
12349 (i386-avx-linux.o): Likewise.
12350 (i386-avx-linux.c): Likewise.
12351 (amd64-avx.o): Likewise.
12352 (amd64-avx.c): Likewise.
12353 (amd64-avx-linux.o): Likewise.
12354 (amd64-avx-linux.c): Likewise.
12355
12356 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12357 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12358 (srv_amd64_regobj): Add amd64-avx.o.
12359 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12360 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12361 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12362 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12363 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12364 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12365 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12366
12367 * i387-fp.c: Include "i386-xstate.h".
12368 (i387_xsave): New.
12369 (i387_cache_to_xsave): Likewise.
12370 (i387_xsave_to_cache): Likewise.
12371 (x86_xcr0): Likewise.
12372
12373 * i387-fp.h (i387_cache_to_xsave): Likewise.
12374 (i387_xsave_to_cache): Likewise.
12375 (x86_xcr0): Likewise.
12376
12377 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12378 * linux-crisv32-low.c (target_regsets): Likewise.
12379 * linux-m68k-low.c (target_regsets): Likewise.
12380 * linux-mips-low.c (target_regsets): Likewise.
12381 * linux-ppc-low.c (target_regsets): Likewise.
12382 * linux-s390-low.c (target_regsets): Likewise.
12383 * linux-sh-low.c (target_regsets): Likewise.
12384 * linux-sparc-low.c (target_regsets): Likewise.
12385 * linux-xtensa-low.c (target_regsets): Likewise.
12386
12387 * linux-low.c: Include <sys/uio.h>.
12388 (regsets_fetch_inferior_registers): Support nt_type.
12389 (regsets_store_inferior_registers): Likewise.
12390 (linux_process_qsupported): New.
12391 (linux_target_ops): Add linux_process_qsupported.
12392
12393 * linux-low.h (regset_info): Add nt_type.
12394 (linux_target_ops): Add process_qsupported.
12395
12396 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12397 and <sys/uio.h>.
12398 (init_registers_i386_avx_linux): New.
12399 (init_registers_amd64_avx_linux): Likewise.
12400 (xmltarget_i386_linux_no_xml): Likewise.
12401 (xmltarget_amd64_linux_no_xml): Likewise.
12402 (PTRACE_GETREGSET): Likewise.
12403 (PTRACE_SETREGSET): Likewise.
12404 (x86_fill_xstateregset): Likewise.
12405 (x86_store_xstateregset): Likewise.
12406 (use_xml): Likewise.
12407 (x86_linux_update_xmltarget): Likewise.
12408 (x86_linux_process_qsupported): Likewise.
12409 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12410 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12411 init_registers_i386_linux here. Call
12412 x86_linux_update_xmltarget.
12413 (the_low_target): Add x86_linux_process_qsupported.
12414
12415 * server.c (handle_query): Call target_process_qsupported.
12416
12417 * target.h (target_ops): Add process_qsupported.
12418 (target_process_qsupported): New.
12419
12420 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12421
12422 * inferiors.c (add_thread): Set last_status kind to
12423 TARGET_WAITKIND_IGNORE.
12424 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12425 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12426 (linux_wait_1): Move `thread' local definition to block that uses
12427 it. Don't NULL initialize `event_child'.
12428 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12429 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12430 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12431
12432 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12433
12434 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12435 an extended waitstatus, or by a watchpoint.
12436 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12437 thread was stepping or has been stopped by a watchpoint.
12438
12439 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12440
12441 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12442 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12443 of another, then delete the previous, and validate all
12444 breakpoints.
12445 (validate_inserted_breakpoint): New.
12446 (delete_disabled_breakpoints): New.
12447 (validate_breakpoints): New.
12448 (check_mem_read): Validate breakpoints before trusting their
12449 shadow. Delete disabled breakpoints.
12450 (check_mem_write): Validate breakpoints before trusting they
12451 should be inserted. Delete disabled breakpoints.
12452 * mem-break.h (validate_breakpoints):
12453 * server.c (handle_query): Validate breakpoints when we see a
12454 qSymbol query.
12455
12456 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12457
12458 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12459 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12460 if we could tell there's a GDB breakpoint at stop_pc.
12461 (need_step_over_p): Don't do a step over if we find a GDB
12462 breakpoint at the resume PC.
12463
12464 * mem-break.c (struct raw_breakpoint): New.
12465 (enum bkpt_type): New type `gdb_breakpoint'.
12466 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12467 fields. New field `raw'.
12468 (find_raw_breakpoint_at): New.
12469 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12470 breakpoint instead.
12471 (set_breakpoint_at): Adjust.
12472 (delete_raw_breakpoint): New.
12473 (release_breakpoint): New.
12474 (delete_breakpoint): Rename to...
12475 (delete_breakpoint_1): ... this. Add proc parameter. Use
12476 release_breakpoint. Return ENOENT.
12477 (delete_breakpoint): Reimplement.
12478 (find_breakpoint_at): Delete.
12479 (find_gdb_breakpoint_at): New.
12480 (delete_breakpoint_at): Delete.
12481 (set_gdb_breakpoint_at): New.
12482 (delete_gdb_breakpoint_at): New.
12483 (gdb_breakpoint_here): New.
12484 (set_reinsert_breakpoint): Use release_breakpoint.
12485 (uninsert_breakpoint): Rename to ...
12486 (uninsert_raw_breakpoint): ... this.
12487 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12488 (reinsert_raw_breakpoint): Change parameter type to
12489 raw_breakpoint.
12490 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12491 instead.
12492 (check_breakpoints): Adjust. Use release_breakpoint.
12493 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12494 (breakpoint_inserted_here): Ditto.
12495 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12496 Don't trust the breakpoint's shadow if it is not inserted.
12497 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12498 (delete_all_breakpoints): Adjust.
12499 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12500 use delete_breakpoint_1.
12501
12502 * mem-break.h (breakpoints_supported): Delete declaration.
12503 (set_gdb_breakpoint_at): Declare.
12504 (gdb_breakpoint_here): Declare.
12505 (delete_breakpoint_at): Delete.
12506 (delete_gdb_breakpoint_at): Declare.
12507
12508 * server.h (struct raw_breakpoint): Forward declare.
12509 (struct process_info): New field `raw_breakpoints'.
12510
12511 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12512 breakpoints.
12513
12514 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12515
12516 * linux-low.c (status_pending_p_callback): Fix comment.
12517 (linux_wait_for_event_1): Move most of the internal breakpoint
12518 handling from here...
12519 (linux_wait_1): ... to here.
12520 (count_events_callback): New.
12521 (select_singlestep_lwp_callback): New.
12522 (select_event_lwp_callback): New.
12523 (cancel_breakpoints_callback): New.
12524 (select_event_lwp): New.
12525 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12526 priority to all LWPs that have had events that should be reported
12527 to the client. Cancel breakpoints when about to reporting the
12528 event to the client, not while stopping lwps. No longer cancel
12529 finished single-steps here.
12530 (cancel_finished_single_step): Delete.
12531 (cancel_finished_single_steps): Delete.
12532
12533 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12534
12535 * mem-break.c (enum bkpt_type): New.
12536 (struct breakpoint): New field `type'.
12537 (set_breakpoint_at): Change return type to struct breakpoint
12538 pointer. Set type to `other_breakpoint' by default.
12539 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12540 in the breakpoint list.
12541 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12542 (reinsert_breakpoint): Rename to ...
12543 (reinsert_raw_breakpoint): ... this.
12544 (reinsert_breakpoints_at): Adjust.
12545 * mem-break.h (struct breakpoint): Declare.
12546 (set_breakpoint_at): Change return type to struct breakpoint
12547 pointer.
12548
12549 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12550
12551 * server.c (handle_query): Assign, not compare.
12552
12553 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12554
12555 Teach linux gdbserver to step-over-breakpoints.
12556
12557 * linux-low.c (can_hardware_single_step): New.
12558 (supports_breakpoints): New.
12559 (handle_extended_wait): If stopping threads, read the stop pc of
12560 the new cloned LWP.
12561 (get_pc): New.
12562 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12563 low target doesn't support retrieving the PC.
12564 (add_lwp): Set last_resume_kind to resume_continue.
12565 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12566 (linux_attach): Don't clear stop_expected. Set the lwp's
12567 last_resume_kind to resume_stop.
12568 (linux_detach_one_lwp): Don't check for removed breakpoints.
12569 (check_removed_breakpoint): Delete.
12570 (status_pending_p): Rename to ...
12571 (status_pending_p_callback): ... this. Don't check for removed
12572 breakpoints. Don't consider threads that are stopped from GDB's
12573 perspective.
12574 (linux_wait_for_lwp): Always read the stop_pc here.
12575 (cancel_breakpoint): New.
12576 (step_over_bkpt): New global.
12577 (linux_wait_for_event_1): Implement stepping over breakpoints.
12578 (gdb_wants_lwp_stopped): New.
12579 (gdb_wants_all_stopped): New.
12580 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12581 single-step traps here. Store the thread's last reported target
12582 wait status.
12583 (send_sigstop): Don't clear stop_expected. Always set it,
12584 instead.
12585 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12586 (cancel_finished_single_step): New.
12587 (cancel_finished_single_steps): New.
12588 (wait_for_sigstop): Don't cancel finished single-step traps here.
12589 (linux_resume_one_lwp): Don't check for removed breakpoints.
12590 Don't set `step' on non-hardware step archs.
12591 (linux_set_resume_request): Ignore resume_stop requests if already
12592 stopping or stopped. Set the lwp's last_resume_kind.
12593 (resume_status_pending_p): Don't check for removed breakpoints.
12594 (need_step_over_p): New.
12595 (start_step_over): New.
12596 (finish_step_over): New.
12597 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12598 requests. Clear the thread's last reported target waitstatus.
12599 Don't use the `suspended' flag. Don't consider pending breakpoints.
12600 (linux_resume): Start a step-over if necessary.
12601 (proceed_one_lwp): New.
12602 (proceed_all_lwps): New.
12603 (unstop_all_lwps): New.
12604 * linux-low.h (struct lwp_info): Rewrite comment for the
12605 `suspended' flag. Add the `stop_pc' field. Delete the
12606 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12607 Add `'last_resume_kind' and `need_step_over' fields.
12608 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12609 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12610 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12611 (set_raw_breakpoint_at): New.
12612 (set_breakpoint_at): Rewrite to use it.
12613 (reinsert_breakpoint_handler): Delete.
12614 (set_reinsert_breakpoint): New.
12615 (reinsert_breakpoint_by_bp): Delete.
12616 (delete_reinsert_breakpoints): New.
12617 (uninsert_breakpoint): Rewrite.
12618 (uninsert_breakpoints_at): New.
12619 (reinsert_breakpoint): Rewrite.
12620 (reinsert_breakpoints_at): New.
12621 (check_breakpoints): Rewrite.
12622 (breakpoint_here): New.
12623 (breakpoint_inserted_here): New.
12624 (check_mem_read): Adjust.
12625 * mem-break.h (breakpoints_supported, breakpoint_here)
12626 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12627 (reinsert_breakpoint_by_bp): Delete declaration.
12628 (delete_reinsert_breakpoints): Declare.
12629 (reinsert_breakpoint): Delete declaration.
12630 (reinsert_breakpoints_at): Declare.
12631 (uninsert_breakpoint): Delete declaration.
12632 (uninsert_breakpoints_at): Declare.
12633 (check_breakpoints): Adjust prototype.
12634 * server.h: Adjust include order.
12635 (struct thread_info): Declare here. Add a `last_status' field.
12636
12637 2010-03-23 Michael Snyder <msnyder@vmware.com>
12638
12639 * server.c (crc32): New function.
12640 (handle_query): Add handling for 'qCRC:' request.
12641
12642 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12643
12644 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12645 lwp had been stopped by a watchpoint.
12646
12647 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12648
12649 * server.h (internal_error): Declare.
12650 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12651 * utils.c (internal_error): New function.
12652
12653 2010-03-15 Andreas Schwab <schwab@redhat.com>
12654
12655 * configure.srv: Fix typo setting srv_regobj.
12656
12657 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12658
12659 * linux-low.c (fetch_register): Avoid passing a non string literal
12660 format to `error'.
12661 (usr_store_inferior_registers): Ditto.
12662
12663 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12664
12665 * linux-low.c (linux_write_memory): Bail out early if peeking
12666 memory failed.
12667
12668 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12669
12670 * linux-low.h (struct lwp_info): New fields
12671 `stopped_by_watchpoint' and `stopped_data_address'.
12672 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12673 here, and cache them in the lwp object.
12674 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12675 directly.
12676 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12677 field.
12678 (linux_stopped_by_watchpoint): Rewrite.
12679 (linux_stopped_data_address): Rewrite.
12680
12681 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12682
12683 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12684 switching the current inferior, not before.
12685
12686 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12687
12688 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12689 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12690 i386-linux.c and amd64-linux.c.
12691 (reg-i386.o): Removed.
12692 (reg-i386.c): Likewise.
12693 (reg-i386-linux.o): Likewise.
12694 (reg-i386-linux.c): Likewise.
12695 (reg-x86-64.o): Likewise.
12696 (reg-x86-64.c): Likewise.
12697 (reg-x86-64-linux.o): Likewise.
12698 (reg-x86-64-linux.c): Likewise.
12699 (i386.o): New.
12700 (i386.c): Likewise.
12701 (i386-linux.o): Likewise.
12702 (i386-linux.c): Likewise.
12703 (amd64.o): Likewise.
12704 (amd64.c): Likewise.
12705 (amd64-linux.o): Likewise.
12706 (amd64-linux.c): Likewise.
12707
12708 * configure.srv (srv_i386_regobj): New.
12709 (srv_i386_linux_regobj): Likewise.
12710 (srv_amd64_regobj): Likewise.
12711 (srv_amd64_linux_regobj): Likewise.
12712 (srv_i386_32bit_xmlfiles): Likewise.
12713 (srv_i386_64bit_xmlfiles): Likewise.
12714 (srv_i386_xmlfiles): Likewise.
12715 (srv_amd64_xmlfiles): Likewise.
12716 (srv_i386_linux_xmlfiles): Likewise.
12717 (srv_amd64_linux_xmlfiles): Likewise.
12718 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12719 srv_xmlfiles to $srv_i386_xmlfiles.
12720 (i[34567]86-*-mingw32ce*): Likewise.
12721 (i[34567]86-*-mingw*): Likewise.
12722 (i[34567]86-*-nto*): Likewise.
12723 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12724 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12725 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12726 (x86_64-*-linux*): Likewise.
12727
12728 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12729 (init_registers_amd64_linux): New.
12730 (x86_arch_setup): Replace init_registers_x86_64_linux with
12731 init_registers_amd64_linux.
12732
12733 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12734
12735 * configure.ac: Check for libdl. If it is not available link against
12736 static libthread_db.
12737 * configure: Regenerate.
12738
12739 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12740
12741 PR9605
12742
12743 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12744 handing a read watchpoint.
12745 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12746
12747 2010-02-12 Doug Evans <dje@google.com>
12748
12749 * linux-low.c (linux_supports_tracefork_flag): Document.
12750 (linux_look_up_symbols): Add comment.
12751
12752 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12753
12754 * regcache.c (supply_register): Clear regcache if buf is NULL.
12755
12756 2010-02-02 Nicolas Roche <roche@sourceware.org>
12757 Joel Brobecker <brobecker@adacore.com>
12758
12759 * inferiors.c (find_inferior): Add function documentation.
12760 (unloaded_dll): Handle the case where the unloaded dll has not
12761 been previously registered in the dll list.
12762
12763 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12764
12765 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12766 (thumb2_breakpoint): New.
12767 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12768
12769 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12770
12771 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12772 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12773 breakpoints.
12774
12775 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12776
12777 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12778
12779 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12780
12781 * linux-s390-low.c (s390_collect_ptrace_register)
12782 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12783
12784 2010-01-21 Doug Evans <dje@google.com>
12785
12786 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12787 (PTRACE_ARG4_TYPE): New macro.
12788 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12789 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12790 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12791 (usr_store_inferior_registers): Ditto.
12792 (linux_read_memory, linux_write_memory): Ditto.
12793 (linux_test_for_tracefork): Ditto.
12794
12795 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12796 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12797
12798 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12799
12800 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12801 target.
12802
12803 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12804
12805 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12806 prototype to take a regcache. Adjust.
12807
12808 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12809
12810 * regcache.h (struct thread_info): Forward declare.
12811 (struct regcache): New.
12812 (new_register_cache): Adjust prototype.
12813 (get_thread_regcache): Declare.
12814 (free_register_cache): Adjust prototype.
12815 (registers_to_string, registers_from_string): Ditto.
12816 (supply_register, supply_register_by_name, collect_register)
12817 (collect_register_as_string, collect_register_by_name): Ditto.
12818 * regcache.c (struct inferior_regcache_data): Delete.
12819 (get_regcache): Rename to ...
12820 (get_thread_regcache): ... this. Adjust. Switch inferior before
12821 fetching registers.
12822 (regcache_invalidate_one): Adjust.
12823 (regcache_invalidate): Fix prototype.
12824 (new_register_cache): Return the new register cache.
12825 (free_register_cache): Change prototype.
12826 (realloc_register_cache): Adjust.
12827 (registers_to_string): Change prototype to take a regcache. Adjust.
12828 (registers_from_string): Ditto.
12829 (register_data): Ditto.
12830 (supply_register): Ditto.
12831 (supply_register_by_name): Ditto.
12832 (collect_register): Ditto.
12833 (collect_register_as_string): Ditto.
12834 (collect_register_by_name): Ditto.
12835 * server.c (process_serial_event): Adjust.
12836 * linux-low.h (regset_fill_func, regset_store_func): Change
12837 prototype.
12838 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12839 Change prototype.
12840 * linux-low.c (get_stop_pc): Adjust.
12841 (check_removed_breakpoint): Adjust.
12842 (linux_wait_for_event): Adjust.
12843 (linux_resume_one_lwp): Adjust.
12844 (fetch_register): Add regcache parameter. Adjust.
12845 (usr_store_inferior_registers): Ditto.
12846 (regsets_fetch_inferior_registers): Ditto.
12847 (regsets_store_inferior_registers): Ditto.
12848 (linux_fetch_registers, linux_store_registers): Ditto.
12849 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12850 regcache. Adjust.
12851 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12852 Ditto.
12853 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12854 prototype to take a regcache.
12855 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12856 * remote-utils.c (convert_ascii_to_int, outreg)
12857 (prepare_resume_reply): Change prototype to take a regcache.
12858 Adjust.
12859 * target.h (struct target_ops) <fetch_registers, store_registers>:
12860 Change prototype to take a regcache.
12861 (fetch_inferior_registers, store_inferior_registers): Change
12862 prototype to take a regcache. Adjust.
12863 * proc-service.c (ps_lgetregs): Adjust.
12864 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12865 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12866 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12867 take a regcache. Adjust.
12868 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12869 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12870 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12871 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12872 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12873 (cris_cannot_fetch_register):
12874 (cris_breakpoint_at): Change prototype to take a regcache.
12875 Adjust.
12876 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12877 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12878 to take a regcache. Adjust.
12879 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12880 Adjust.
12881 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12882 take a regcache. Adjust.
12883 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12884 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12885 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12886 * linux-mips-low.c (mips_get_pc):
12887 (mips_set_pc): Change prototype to take a regcache. Adjust.
12888 (mips_reinsert_addr): Adjust.
12889 (mips_collect_register): Change prototype to take a regcache.
12890 Adjust.
12891 (mips_supply_register):
12892 (mips_collect_register_32bit, mips_supply_register_32bit)
12893 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12894 (mips_store_fpregset): Ditto.
12895 * linux-ppc-low.c (ppc_supply_ptrace_register)
12896 (ppc_supply_ptrace_register): Ditto.
12897 (parse_spufs_run): Adjust.
12898 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12899 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12900 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12901 take a regcache. Adjust.
12902 * linux-s390-low.c (s390_collect_ptrace_register)
12903 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12904 (s390_set_pc): Change prototype to take a regcache. Adjust.
12905 (s390_arch_setup): Adjust.
12906 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12907 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12908 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12909 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12910 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12911 regcache. Adjust.
12912 (sparc_breakpoint_at): Adjust.
12913 * linux-xtensa-low.c (xtensa_fill_gregset):
12914 (xtensa_store_gregset):
12915 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12916 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12917 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12918 prototype to take a regcache. Adjust.
12919 * win32-arm-low.c (arm_fetch_inferior_register)
12920 (arm_store_inferior_register): Change prototype to take a
12921 regcache. Adjust.
12922 * win32-i386-low.c (i386_fetch_inferior_register)
12923 (i386_store_inferior_register): Change prototype to take a
12924 regcache. Adjust.
12925 * win32-low.c (child_fetch_inferior_registers)
12926 (child_store_inferior_registers): Change prototype to take a
12927 regcache. Adjust.
12928 (win32_wait): Adjust.
12929 (win32_fetch_inferior_registers): Change prototype to take a
12930 regcache. Adjust.
12931 (win32_store_inferior_registers): Adjust.
12932 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12933 store_inferior_register>: Change prototype to take a regcache.
12934
12935 2010-01-20 Doug Evans <dje@google.com>
12936
12937 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12938 #ifdef.
12939 (linux_wait_for_event1, linux_init_signals): Ditto.
12940 (W_STOPCODE): Provide definition if missing.
12941
12942 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12943
12944 * linux-low.c (linux_core_of_thread): New.
12945 (compare_ints, show_process, list_threads): New.
12946 (linux_qxfer_osdata): Report threads and cores.
12947 (linux_target_op): Register linux_core_of_thread.
12948 * remote-utils.c (prepare_resume_reply): Report the core.
12949 (buffer_xml_printf): Support %d specifier.
12950 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12951 New.
12952 (handle_query): Handle qXfer:threads. Announce availability
12953 thereof.
12954 * target.h (struct target_ops): New field core_of_thread.
12955
12956 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12957
12958 * Makefile.in (clean): Remove new generated files.
12959 (reg-s390.o, reg-s390.c): Remove rules.
12960 (reg-s390x.o, reg-s390x.c): Likewise.
12961 (s390-linux32.o, s390-linux32.c): Add rules.
12962 (s390-linux64.o, s390-linux64.c): Likewise.
12963 (s390x-linux64.o, s390x-linux64.c): Likewise.
12964 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12965 * linux-s390-low.c: Include <elf.h>.
12966 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12967 (init_registers_s390): Remove prototype.
12968 (init_registers_s390x): Likewise.
12969 (init_registers_s390_linux32): Add prototype.
12970 (init_registers_s390_linux64): Likewise.
12971 (init_registers_s390x_linux64): Likewise.
12972 (s390_num_regs_3264): New define.
12973 (s390_regmap_3264): New global variable.
12974 (s390_cannot_fetch_register): Remove obsolete check.
12975 (s390_cannot_store_register): Likewise.
12976 (s390_collect_ptrace_register): Handle upper/lower register halves.
12977 (s390_supply_ptrace_register): Likewise.
12978 (s390_fill_gregset): Update to register number changes.
12979 (s390_get_hwcap): New routine.
12980 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12981 Install appropriate regmap and register set.
12982
12983 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12984
12985 * server.c (gdbserver_version): Update copyright year to 2010.
12986 * gdbreplay.c (gdbreplay_version): Likewise.
12987
12988 2009-12-28 Doug Evans <dje@google.com>
12989
12990 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12991 elf/external.h. Include <elf.h> instead but only if necessary.
12992
12993 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12994
12995 * linux-low.c (linux_remove_process): Remove `detaching'
12996 parameter. Don't release/detach from thread_db here.
12997 (linux_kill): Release/detach from thread_db here, ...
12998 (linux_detach): ... and here, before actually detaching.
12999 (linux_wait_1): ... and here, when a process exits.
13000 * thread-db.c (any_thread_of): New.
13001 (thread_db_free): Switch the current inferior to a thread of the
13002 passed in process.
13003
13004 2009-12-21 Doug Evans <dje@google.com>
13005
13006 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13007
13008 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13009 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13010 warning ifndef __NR_tkill. Move setting of errno there too.
13011 Delete unnecessary resetting of errno after syscall.
13012 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13013
13014 * configure.ac: Check for dladdr.
13015 * config.in: Regenerate.
13016 * configure: Regenerate.
13017 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13018 (try_thread_db_load): Update.
13019
13020 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13021
13022 2009-12-18 Doug Evans <dje@google.com>
13023
13024 * event-loop.c: Include unistd.h if it exists.
13025
13026 * linux-low.c (my_waitpid): Move definition away from being in
13027 between linux_tracefork_child/linux_test_for_tracefork.
13028
13029 * gdb_proc_service.h (psaddr_t): Fix type.
13030 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13031 signature to match glibc.
13032
13033 2009-12-16 Doug Evans <dje@google.com>
13034
13035 * linux-low.c (linux_read_memory): Fix argument to read.
13036
13037 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13038
13039 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13040 events, don't leave current_inferior pointing at null.
13041
13042 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13043
13044 * win32-low.c (LOG): Delete.
13045 (OUTMSG): Output to stderr.
13046 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13047 on compile time LOG macro.
13048 (win32_wait): Fix debug output.
13049
13050 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13051
13052 * win32-low.c (win32_add_one_solib): If the dll name is
13053 "ntdll.dll", prepend the system directory to the dll path.
13054
13055 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13056
13057 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13058
13059 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13060 Vladimir Prus <vladimir@codesourcery.com>
13061
13062 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13063 * configure.ac: Check for __mcoldfire__ and set
13064 gdb_cv_m68k_is_coldfire.
13065 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13066 reg-cf.o and reg-m68k.o.
13067 * configure: Regenerated.
13068
13069 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13070
13071 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13072 Pass it to thread_db_free.
13073 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13074 proper `detaching' argument to linux_remove_process.
13075 * linux-low.h (thread_db_free): Add `detaching' parameter.
13076 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13077 to thread_db_free.
13078 (thread_db_free): Add `detaching' parameter. Only
13079 call td_ta_clear_event if detaching from process.
13080
13081 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13082
13083 * thread-db.c (thread_db_free): Fix typo.
13084
13085 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13086
13087 PR gdb/10838
13088 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13089
13090 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13091
13092 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13093 with an i686 compiler.
13094 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13095 needed.
13096 * configure: Rebuilt.
13097
13098 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13099
13100 PR gdb/10783
13101
13102 * server.c (handle_search_memory_1): Correct read_addr initialization
13103 in loop for searching subsequent chunks.
13104
13105 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13106
13107 * configure.ac: New --with-libthread-db option.
13108 * thread-db.c: Allow direct dependence on libthread_db.
13109 (thread_db_free): Adjust.
13110 * config.in: Regenerate.
13111 * configure: Likewise.
13112
13113 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13114
13115 PR gdb/10757
13116 * thread-db.c (attach_thread): New function.
13117 (maybe_attach_thread): Return success/failure.
13118 (find_new_threads_callback): Adjust.
13119 (thread_db_find_new_threads): Loop until no new threads.
13120
13121 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13122
13123 * proc-service.c (ps_lgetregs): Formatting.
13124
13125 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13126
13127 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13128 * configure.ac: Adjust.
13129 * linux-low.h (struct process_info_private): Move members to struct
13130 thread_db.
13131 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13132 * linux-low.c (linux_remove_process): Adjust.
13133 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13134 * server.c (handle_query): Move code ...
13135 (handle_monitor_command): ... here. New function.
13136 * target.h (struct target_ops): New member.
13137 * thread-db.c (struct thread_db): New.
13138 (libthread_db_search_path): New variable.
13139 (thread_db_create_event, thread_db_enable_reporting)
13140 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13141 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13142 (try_thread_db_load_1, dladdr_to_soname): New functions.
13143 (try_thread_db_load, thread_db_load_search): New functions.
13144 (thread_db_init): Search for libthread_db.
13145 (thread_db_free): New function.
13146 (thread_db_handle_monitor_command): Likewise.
13147 * config.in: Regenerate.
13148 * configure: Regenerate.
13149
13150 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13151
13152 * spu-low.c (spu_kill): Wait for inferior to terminate.
13153 Call clear_inferiors.
13154 (spu_detach): Call clear_inferiors.
13155
13156 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13157
13158 * aclocal.m4: Regenerate.
13159 * config.in: Likewise.
13160 * configure: Likewise.
13161
13162 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13163
13164 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13165 (parse_spufs_run): New function.
13166 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13167 (ppc_breakpoint_at): Handle SPU breakpoints.
13168
13169 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13170
13171 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13172 (SPUFS_MAGIC): Define.
13173 (spu_enumerate_spu_ids): New function.
13174 (linux_qxfer_spu): New function.
13175 (linux_target_ops): Install linux_qxfer_spu.
13176
13177 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13178
13179 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13180 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13181 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13182 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13183 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13184 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13185 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13186 (init_registers_powerpc_cell32l): Add prototype.
13187 (init_registers_powerpc_cell64l): Likewise.
13188 (ppc_arch_setup): Detect Cell/B.E. architecture.
13189
13190 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13191
13192 * Makefile.in (datarootdir): New variable.
13193
13194 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13195
13196 * linux-low.c (linux_write_memory): Update debugging output.
13197 * Makefile.in (clean): Add new descriptions.
13198 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13199 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13200 * configure.srv: Add new files for arm*-*-linux*.
13201 * linux-arm-low.c: Add new declarations.
13202 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13203 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13204 (HWCAP_VFPv3D16): New.
13205 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13206 instead of __IWMMXT__.
13207 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13208 (arm_arch_setup): New.
13209 (target_regsets): Remove #ifdef. Add VFP regset.
13210 (the_low_target): Use arm_arch_setup.
13211
13212 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13213
13214 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13215 the main thread again.
13216
13217 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13218
13219 Adding Neutrino gdbserver.
13220 * configure: Regenerated.
13221 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13222 * configure.srv (i[34567]86-*-nto*): New target.
13223 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13224 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13225 (nto_comctrl) [__QNX__]: New function.
13226 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13227
13228 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13229
13230 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13231 srv_tgtobj.
13232
13233 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13234 Pedro Alves <pedro@codesourcery.com>
13235
13236 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13237 don't support CONTEXT_EXTENDED_REGISTERS.
13238 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13239 (the_low_target): Install them.
13240 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13241 failing with ERROR_PIPE_NOT_CONNECTED.
13242
13243 2009-06-30 Doug Evans <dje@google.com>
13244 Pierre Muller <muller@ics.u-strasbg.fr>
13245
13246 Add h/w watchpoint support to x86-linux, win32-i386.
13247 * Makefile.in (SFILES): Add i386-low.c
13248 (i386_low_h): Define.
13249 (i386-low.o): Add dependencies.
13250 (linux-x86-low.o): Add i386-low.h dependency.
13251 (win32-i386-low.o): Ditto.
13252 * i386-low.c: New file.
13253 * i386-low.h: New file.
13254 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13255 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13256 * linux-low.c (linux_add_process): Initialize arch_private.
13257 (linux_remove_process): Free arch_private.
13258 (add_lwp): Initialize arch_private.
13259 (delete_lwp): Free arch_private.
13260 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13261 provided.
13262 * linux-low.h (process_info_private): New member arch_private.
13263 (lwp_info): New member arch_private.
13264 (linux_target_ops): New members new_process, new_thread,
13265 prepare_to_resume.
13266 (ptid_of): New macro.
13267 * linux-x86-low.c: Include stddef.h, i386-low.h.
13268 (arch_process_info): New struct.
13269 (arch_lwp_info): New struct.
13270 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13271 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13272 (i386_dr_low_get_status): New function.
13273 (x86_insert_point, x86_remove_point): New functions.
13274 (x86_stopped_by_watchpoint): New function.
13275 (x86_stopped_data_address): New function.
13276 (x86_linux_new_process, x86_linux_new_thread): New functions.
13277 (x86_linux_prepare_to_resume): New function.
13278 (the_low_target): Add entries for insert_point, remove_point,
13279 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13280 prepare_to_resume.
13281 * server.c (debug_hw_points): New global.
13282 (monitor_show_help): Document set debug-hw-points.
13283 (handle_query): Process "set debug-hw-points".
13284 * server.h (debug_hw_points): Declare.
13285 (paddress): Declare.
13286 * utils.c (NUMCELLS, CELLSIZE): New macros.
13287 (get_sell, xsnprintf, paddress): New functions.
13288 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13289 remove_point, stopped_by_watchpoint, stopped_data_address.
13290 * win32-i386-low.c: Include i386-low.h.
13291 (debug_reg_state): Replaces dr.
13292 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13293 (i386_dr_low_get_status): New function.
13294 (i386_insert_point, i386_remove_point): New functions.
13295 (i386_stopped_by_watchpoint): New function.
13296 (i386_stopped_data_address): New function.
13297 (i386_initial_stuff): Update.
13298 (get_thread_context,set_thread_context,i386_thread_added): Update.
13299 (the_low_target): Add entries for insert_point,
13300 remove_point, stopped_by_watchpoint, stopped_data_address.
13301 * win32-low.c (win32_insert_watchpoint): New function.
13302 (win32_remove_watchpoint): New function.
13303 (win32_stopped_by_watchpoint): New function.
13304 (win32_stopped_data_address): New function.
13305 (win32_target_ops): Add entries for insert_watchpoint,
13306 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13307 * win32-low.h (win32_target_ops): New members insert_point,
13308 remove_point, stopped_by_watchpoint, stopped_data_address.
13309
13310 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13311
13312 * server.c (process_serial_event): Re-return unsupported, not
13313 error, if the type isn't recognized. Re-allow supporting only
13314 insert or remove packets. Also call require_running for
13315 breakpoints. Add missing break statement to default case. Tidy.
13316 * target.h (struct target_ops): Rename insert_watchpoint to
13317 insert_point, and remove_watchpoint to remove_point.
13318
13319 * linux-low.h (struct linux_target_ops): Likewise.
13320 * linux-low.c (linux_insert_watchpoint): Rename to ...
13321 (linux_insert_point): ... this. Adjust.
13322 (linux_remove_watchpoint): Rename to ...
13323 (linux_remove_point): ... this. Adjust.
13324 (linux_target_ops): Adjust.
13325 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13326 (cris_insert_point): ... this.
13327 (cris_remove_watchpoint): Rename to ...
13328 (cris_remove_point): ... this.
13329 (the_low_target): Adjust.
13330
13331 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13332
13333 * server.c (handle_v_kill): Pass signal_pid to
13334 kill_inferior if multi_process is zero.
13335
13336 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13337
13338 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13339 * target.h (target_ops): Comment for *_watchpoint to make it clear
13340 the functions can get types '0' and '1'.
13341
13342 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13343
13344 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13345 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13346 * regcache.c (get_regcache): Likewise.
13347 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13348 * win32-low.c (child_fetch_inferior_registers): Remove check for
13349 regno 0.
13350
13351 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13352 Pedro Alves <pedro@codesourcery.com>
13353
13354 * target.h (struct target_ops) <supports_multi_process>: New
13355 callback.
13356 (target_supports_multi_process): New.
13357 * server.c (handle_query): Even if GDB reports support, only
13358 enable multi-process if the target also supports it. Report
13359 multi-process support only if the target backend supports it.
13360 * linux-low.c (linux_supports_multi_process): New function.
13361 (linux_target_ops): Install it as target_supports_multi_process
13362 callback.
13363
13364 2009-05-24 Doug Evans <dje@google.com>
13365
13366 Global renaming of find_thread_pid to find_thread_ptid.
13367 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13368 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13369 All callers updated.
13370
13371 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13372 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13373 directly.
13374
13375 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13376 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13377 (linux_resume_one_lwp): Ditto.
13378
13379 2009-05-23 Doug Evans <dje@google.com>
13380
13381 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13382 from struct inferior_list_entry * to struct lwp_info *.
13383 All callers updated.
13384
13385 2009-05-13 Doug Evans <dje@google.com>
13386
13387 * linux-x86-low.c: Don't include assert.h.
13388 (x86_siginfo_fixup): Use fatal, not assert.
13389 (x86_arch_setup): Fix comment.
13390
13391 2009-05-12 Doug Evans <dje@google.com>
13392
13393 Biarch support for i386/amd64 gdbserver.
13394 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13395 Add linux-x86-low.c.
13396 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13397 (linux-x86-low.o): Add.
13398 * linux-x86-64-low.c: Delete.
13399 * linux-i386-low.c: Delete.
13400 * linux-x86-low.c: New file.
13401 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13402 linux-x86-low.o.
13403 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13404 linux-x86-low.o.
13405 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13406 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13407 (linux_child_pid_to_exec_file): New function.
13408 (elf_64_header_p, elf_64_file_p): New functions.
13409 (siginfo_fixup): New function.
13410 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13411 give target a chance to convert layout.
13412 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13413 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13414
13415 2009-05-07 Doug Evans <dje@google.com>
13416
13417 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13418 (regsets_store_inferior_registers): Ditto.
13419
13420 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13421
13422 PR server/10048
13423
13424 * linux-low.c (must_set_ptrace_flags): Delete.
13425 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13426 of the global.
13427 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13428 `lwp->must_set_ptrace_flags' instead.
13429 (linux_wait_for_event_1): Set ptrace options here.
13430 (linux_wait_1): ... not here.
13431
13432 2009-04-30 Doug Evans <dje@google.com>
13433
13434 * inferiors.c (started_inferior_callback): New function.
13435 (attached_inferior_callback): New function.
13436 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13437 * server.c (print_started_pid, print_attached_pid): New functions.
13438 (detach_or_kill_for_exit): New function.
13439 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13440 * server.h (have_started_inferiors_p): Declare.
13441 (have_attached_inferiors_p): Declare.
13442
13443 * inferiors.c (remove_process): Fix memory leak, free process.
13444 * linux-low.c (linux_remove_process): New function.
13445 (linux_kill): Call it instead of remove_process.
13446 (linux_detach, linux_wait_1): Ditto.
13447
13448 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13449
13450 * configure.srv: Add x86 Windows CE target.
13451
13452 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13453
13454 * inferiors.c (get_thread_process): Make global.
13455 * server.h (get_thread_process): Add prototype.
13456 * thread-db.c (find_one_thread): Use get_thread_process
13457 instead of current_process.
13458 (thread_db_get_tls_address): Do not crash if called when
13459 thread layer is not yet initialized.
13460
13461 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13462
13463 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13464 * spu-low.c (current_tid): Rename to ...
13465 (current_ptid): ... this.
13466 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13467 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13468 ptid_get_lwp (current_ptid) instead of current_tid.
13469 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13470 instead of current_tid. Use find_process_pid to verify pid
13471 argument is valid. Pass proper argument to remove_process.
13472 (spu_thread_alive): Compare current_ptid instead of current_tid.
13473 (spu_resume): Likewise.
13474
13475 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13476
13477 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13478 variable.
13479
13480 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13481
13482 Implement the multiprocess extensions, and add linux multiprocess
13483 support.
13484
13485 * server.h (ULONGEST): Declare.
13486 (struct ptid, ptid_t): New.
13487 (minus_one_ptid, null_ptid): Declare.
13488 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13489 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13490 (struct inferior_list_entry): Change `id' type from unsigned from
13491 to ptid_t.
13492 (struct sym_cache, struct breakpoint, struct
13493 process_info_private): Forward declare.
13494 (struct process_info): Declare.
13495 (current_process): Declare.
13496 (all_processes): Declare.
13497 (initialize_inferiors): Declare.
13498 (add_thread): Adjust to use ptid_t.
13499 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13500 (add_process, remove_process, find_thread_pid): Declare.
13501 (find_inferior_id): Adjust to use ptid_t.
13502 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13503 (multi_process): Declare.
13504 (push_event): Adjust to use ptid_t.
13505 (read_ptid, write_ptid): Declare.
13506 (prepare_resume_reply): Adjust to use ptid_t.
13507 (clear_symbol_cache): Declare.
13508 * inferiors.c (all_processes): New.
13509 (null_ptid, minus_one_ptid): New.
13510 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13511 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13512 (add_thread): Change unsigned long to ptid. Remove gdb_id
13513 parameter. Adjust.
13514 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13515 (gdb_id_to_thread): Rename to ...
13516 (find_thread_pid): ... this. Change unsigned long to ptid.
13517 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13518 (loaded_dll, pull_pid_from_list): Adjust.
13519 (add_process, remove_process, find_process_pid)
13520 (get_thread_process, current_process, initialize_inferiors): New.
13521 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13522 (struct target_waitstatus) <related_pid>: Ditto.
13523 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13524 return type to int.
13525 (struct target_ops) <join>: Add `pid' argument.
13526 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13527 (struct target_ops) <wait>: Add `ptid' field. Change return type
13528 to ptid.
13529 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13530 (mywait): Add `ptid' argument. Change return type to ptid_t.
13531 (target_pid_to_str): Declare.
13532 * target.c (set_desired_inferior): Adjust to use ptids.
13533 (mywait): Add new `ptid' argument. Adjust.
13534 (target_pid_to_str): New.
13535 * mem-break.h (free_all_breakpoints): Declare.
13536 * mem-break.c (breakpoints): Delelete.
13537 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13538 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13539 to use per-process breakpoint list.
13540 (free_all_breakpoints): New.
13541 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13542 (symbol_cache, all_symbols_looked_up): Delete.
13543 (hexchars): New.
13544 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13545 read_ptid): New.
13546 (prepare_resume_reply): Change ptid argument's type from unsigned
13547 long to ptid_t. Adjust. Implement W;process and X;process.
13548 (free_sym_cache, clear_symbol_cache): New.
13549 (look_up_one_symbol): Adjust to per-process symbol cache. *
13550 * server.c (cont_thread, general_thread, step_thread): Change type
13551 to ptid_t.
13552 (attached): Delete.
13553 (multi_process): New.
13554 (last_ptid): Change type to ptid_t.
13555 (struct vstop_notif) <ptid>: Change type to ptid_t.
13556 (queue_stop_reply, push_event): Change `ptid' argument's type to
13557 ptid_t.
13558 (discard_queued_stop_replies): Add `pid' argument.
13559 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13560 changes. Don't reference the `attached' global.
13561 (attach_inferior): Adjust to mywait interface changes.
13562 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13563 features. Handle and report "multiprocess+". Handle
13564 "qAttached:PID".
13565 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13566 changes.
13567 (handle_v_kill): New.
13568 (handle_v_stopped): Adjust to use target_pid_to_str.
13569 (handle_v_requests): Allow multiple attaches and runs when
13570 multiprocess extensions are in effect. Handle "vKill".
13571 (myresume): Adjust to use ptids.
13572 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13573 (handle_status): Adjust to discard_queued_stop_replies interface
13574 change.
13575 (first_thread_of, kill_inferior_callback)
13576 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13577 (main): Call initialize_inferiors. Adjust to use ptids, killing
13578 and detaching from all inferiors. Handle multiprocess packet
13579 variants.
13580 * linux-low.h: Include gdb_proc_service.h.
13581 (struct process_info_private): New.
13582 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13583 <lwpid_of>: Use ptid_get_lwp.
13584 (get_lwp_thread): Adjust.
13585 (struct lwp_info): Add `dead' member.
13586 (find_lwp_pid): Declare.
13587 * linux-low.c (thread_db_active): Delete.
13588 (new_inferior): Adjust comment.
13589 (inferior_pid): Delete.
13590 (linux_add_process): New.
13591 (handle_extended_wait): Adjust.
13592 (add_lwp): Change unsigned long to ptid.
13593 (linux_create_inferior): Add process to processes table. Adjust
13594 to use ptids. Don't set new_inferior here.
13595 (linux_attach_lwp): Rename to ...
13596 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13597 it. Adjust to use ptids.
13598 (linux_attach_lwp): New.
13599 (linux_attach): Add process to processes table. Don't set
13600 new_inferior here.
13601 (struct counter): New.
13602 (second_thread_of_pid_p, last_thread_of_process_p): New.
13603 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13604 multiple processes.
13605 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13606 processes. Remove process from process table.
13607 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13608 to multiple processes.
13609 (any_thread_of): New.
13610 (linux_detach): Add `pid' argument, and handle it. Remove process
13611 from processes table.
13612 (linux_join): Add `pid' argument. Handle it.
13613 (linux_thread_alive): Change unsighed long argument to ptid_t.
13614 Consider dead lwps as not being alive.
13615 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13616 threads we're not interested in.
13617 (same_lwp, find_lwp_pid): New.
13618 (linux_wait_for_lwp): Change `pid' argument's type from int to
13619 ptid_t. Adjust.
13620 (linux_wait_for_event): Rename to ...
13621 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13622 from int to ptid_t. Adjust.
13623 (linux_wait_for_event): New.
13624 (linux_wait_1): Add `ptid' argument. Change return type to
13625 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13626 that exit from the process table.
13627 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13628 Adjust.
13629 (mark_lwp_dead): New.
13630 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13631 stopping all threads, mark its main lwp as dead.
13632 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13633 ptids.
13634 (fetch_register, usr_store_inferior_registers)
13635 (regsets_fetch_inferior_registers)
13636 (regsets_store_inferior_registers, linux_read_memory)
13637 (linux_write_memory): Inline `inferior_pid'.
13638 (linux_look_up_symbols): Adjust to use per-process
13639 `thread_db_active'.
13640 (linux_request_interrupt): Adjust to use ptids.
13641 (linux_read_auxv): Inline `inferior_pid'.
13642 (initialize_low): Don't reference thread_db_active.
13643 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13644 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13645 (ps_getpid): Return the pid of the current inferior.
13646 * thread-db.c (proc_handle, thread_agent): Delete.
13647 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13648 per-process data.
13649 (find_one_thread): Change argument type to ptid_t. Adjust to
13650 per-process data.
13651 (maybe_attach_thread): Adjust to per-process data and ptids.
13652 (thread_db_find_new_threads): Ditto.
13653 (thread_db_init): Ditto.
13654 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13655 processes table. Adjust to use ptids.
13656 (spu_kill, spu_detach): Adjust interface. Remove process from
13657 processes table.
13658 (spu_join, spu_thread_alive): Adjust interface.
13659 (spu_wait): Adjust interface. Remove process from processes
13660 table. Adjust to use ptids.
13661 * win32-low.c (current_inferior_tid): Delete.
13662 (current_inferior_ptid): New.
13663 (debug_event_ptid): New.
13664 (thread_rec): Take a ptid. Adjust.
13665 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13666 (child_delete_thread): Ditto.
13667 (do_initial_child_stuff): Add `attached' argument. Add process to
13668 processes table.
13669 (child_fetch_inferior_registers, child_store_inferior_registers):
13670 Adjust.
13671 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13672 (win32_attach): Pass 1 to do_initial_child_stuff.
13673 (win32_kill): Adjust interface. Remove process from processes
13674 table.
13675 (win32_detach): Ditto.
13676 (win32_join): Adjust interface.
13677 (win32_thread_alive): Take a ptid.
13678 (win32_resume): Adjust to use ptids.
13679 (get_child_debug_event): Ditto.
13680 (win32_wait): Adjust interface. Remove exiting process from
13681 processes table.
13682
13683 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13684
13685 Non-stop mode support.
13686
13687 * server.h (non_stop): Declare.
13688 (gdb_client_data, handler_func): Declare.
13689 (delete_file_handler, add_file_handler, start_event_loop):
13690 Declare.
13691 (handle_serial_event, handle_target_event, push_event)
13692 (putpkt_notif): Declare.
13693 * target.h (enum resume_kind): New.
13694 (struct thread_resume): Replace `step' field by `kind' field.
13695 (TARGET_WNOHANG): Define.
13696 (struct target_ops) <wait>: Add `options' argument.
13697 <supports_non_stop, async, start_non_stop>: New fields.
13698 (target_supports_non_stop, target_async): New.
13699 (start_non_stop): Declare.
13700 (mywait): Add `options' argument.
13701 * target.c (mywait): Add `options' argument. Print child exit
13702 notifications here.
13703 (start_non_stop): New.
13704 * server.c (non_stop, own_buf, mem_buf): New globals.
13705 (struct vstop_notif): New.
13706 (notif_queue): New global.
13707 (queue_stop_reply, push_event, discard_queued_stop_replies)
13708 (send_next_stop_reply): New.
13709 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13710 interface changes.
13711 (attach_inferior): In non-stop mode, don't wait for the target
13712 here.
13713 (handle_general_set): Handle QNonStop.
13714 (handle_query): When handling qC, return the current general
13715 thread, instead of the first thread of the list.
13716 (handle_query): If the backend supports non-stop mode, include
13717 QNonStop+ in the qSupported query response.
13718 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13719 and non-stop mode.
13720 (handle_v_attach, handle_v_run): Handle non-stop mode.
13721 (handle_v_stopped): New.
13722 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13723 (myresume): Adjust to use resume_kind. Handle non-stop.
13724 (queue_stop_reply_callback): New.
13725 (handle_status): Handle non-stop mode.
13726 (main): Clear non_stop flag on reconnection. Use the event-loop.
13727 Refactor serial protocol handling from here ...
13728 (process_serial_event): ... to this new function. When GDB
13729 selects any thread, select one here. In non-stop mode, wait until
13730 GDB acks all pending events before exiting.
13731 (handle_serial_event, handle_target_event): New.
13732 * remote-utils.c (remote_open): Install remote_desc in the event
13733 loop.
13734 (remote_close): Remove remote_desc from the event loop.
13735 (putpkt_binary): Rename to...
13736 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13737 (putpkt_binary): New as wrapper around putpkt_binary_1.
13738 (putpkt_notif): New.
13739 (prepare_resume_reply): In non-stop mode, don't change the
13740 general_thread.
13741 * event-loop.c: New.
13742 * Makefile.in (OBJ): Add event-loop.o.
13743 (event-loop.o): New rule.
13744
13745 * linux-low.h (pid_of): Moved here.
13746 (lwpid_of): New.
13747 (get_lwp_thread): Use lwpid_of.
13748 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13749 * linux-low.c (pid_of): Delete.
13750 (inferior_pid): Use lwpid_of.
13751 (linux_event_pipe): New.
13752 (target_is_async_p): New.
13753 (delete_lwp): New.
13754 (handle_extended_wait): Use lwpid_of.
13755 (add_lwp): Don't set lwpid field.
13756 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13757 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13758 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13759 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13760 first. Adjust to linux_wait_for_event interface changes. Use
13761 lwpid_of.
13762 (linux_detach): Don't delete the main lwp here.
13763 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13764 (status_pending_p): Don't consider explicitly suspended lwps.
13765 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13766 pointer. Add OPTIONS argument. Change return type to int. Use
13767 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13768 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13769 pointer. Add status pointer argument. Return a pid instead of a
13770 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13771 changes. In non-stop mode, don't switch to a random thread.
13772 (linux_wait): Rename to...
13773 (linux_wait_1): ... this. Add target_options argument, and handle
13774 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13775 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13776 clean exit and signal exit code. Don't stop all threads in
13777 non-stop mode. In all-stop mode, only stop all threads when
13778 reporting a stop to GDB. Handle explicit thread stop requests.
13779 (async_file_flush, async_file_mark): New.
13780 (linux_wait): New.
13781 (send_sigstop): Use lwpid_of.
13782 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13783 interface changes. In non-stop mode, don't switch to a random
13784 thread.
13785 (linux_resume_one_lwp): Use lwpid_of.
13786 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13787 (linux_resume_one_thread): ... this. Handle resume_stop. In
13788 non-stop mode, don't look for pending flag in all threads.
13789 (resume_status_pending_p): Don't consider explicitly suspended
13790 threads.
13791 (my_waitpid): Reimplement. Emulate __WALL.
13792 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13793 Use lwpid_of.
13794 (sigchld_handler, linux_supports_non_stop, linux_async)
13795 (linux_start_non_stop): New.
13796 (linux_target_ops): Register linux_supports_non_stop, linux_async
13797 and linux_start_non_stop.
13798 (initialize_low): Install SIGCHLD handler.
13799 * thread-db.c (thread_db_create_event, find_one_thread)
13800 (thread_db_get_tls_address): Use lwpid_of.
13801 * win32-low.c (win32_detach): Adjust to use resume_kind.
13802 (win32_wait): Add `options' argument.
13803 * spu-low.c (spu_resume): Adjust to use resume_kind.
13804 (spu_wait): Add `options' argument.
13805
13806 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13807
13808 Decouple target code from remote protocol.
13809
13810 * target.h (enum target_waitkind): New.
13811 (struct target_waitstatus): New.
13812 (struct target_ops) <wait>: Return an unsigned long. Take a
13813 target_waitstatus pointer instead of a char pointer.
13814 (mywait): Likewise.
13815 * target.c (mywait): Change prototype to return an unsigned long.
13816 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13817 * server.h (thread_from_wait, old_thread_from_wait): Delete
13818 declarations.
13819 (prepare_resume_reply): Change prototype to take a
13820 target_waitstatus.
13821 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13822 (last_status, last_ptid): New.
13823 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13824 pid instead of a signal.
13825 (attach_inferior): Remove "status" and "signal" parameters.
13826 Adjust.
13827 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13828 not as an address.
13829 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13830 (handle_v_requests, myresume): Remove "status" and "signal"
13831 parameters. Adjust.
13832 (handle_status): New.
13833 (main): Delete local `status'. Adjust.
13834 * remote-utils.c: Include target.h.
13835 (prepare_resume_reply): Change prototype to take a
13836 target_waitstatus. Adjust.
13837
13838 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13839 interface.
13840 * spu-low.c (spu_wait): Adjust.
13841 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13842 Delete.
13843 (win32_wait): Adjust.
13844
13845 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13846
13847 * target.h (struct thread_resume): Delete leave_stopped member.
13848 (struct target_ops): Add a `n' argument to the `resume' callback.
13849 * server.c (start_inferior): Adjust.
13850 (handle_v_cont, myresume): Adjust.
13851 * linux-low.c (check_removed_breakpoint): Adjust to resume
13852 interface change, and to removed leave_stopped field.
13853 (resume_ptr): Delete.
13854 (struct thread_resume_array): New.
13855 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13856 resume interface change.
13857 (linux_continue_one_thread, linux_queue_one_thread)
13858 (resume_status_pending_p): Check if the resume field is NULL
13859 instead of checking the leave_stopped member.
13860 (linux_resume): Adjust to the target resume interface change.
13861 * spu-low.c (spu_resume): Adjust to the target resume interface
13862 change.
13863 * win32-low.c (win32_detach, win32_resume): Ditto.
13864
13865 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13866
13867 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13868 flag.
13869 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13870 pending.
13871 (linux_continue_one_thread): Only preserve the stepping flag if
13872 there's a pending breakpoint.
13873
13874 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13875
13876 * server.c (main): After the inferior having exited, call
13877 remote_close before exiting gdbserver.
13878
13879 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13880
13881 Fix size of FPSCR in Power 7 processors.
13882 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13883 (PPC_FEATURE_HAS_DFP): New #define.
13884 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13885 size of the FPSCR.
13886
13887 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13888
13889 * server.c (handle_query) Whitespace and formatting.
13890
13891 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13892
13893 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13894 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13895 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13896 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13897 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13898 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13899 Makefile.in, configure.ac: Fix whitespace throughout.
13900 * configure: Regenerate.
13901
13902 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13903
13904 * inferiors.c (find_inferior): Make it safe for the callback
13905 function to delete the currently iterated inferior.
13906
13907 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13908
13909 * Makefile.in (linuw_low_h): Move higher.
13910 (thread-db.o): Depend on $(linux_low_h).
13911
13912 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13913
13914 Rename "process" to "lwp" throughout.
13915
13916 * linux-low.c (all_processes): Rename to...
13917 (all_lwps): ... this.
13918 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13919 (add_process): Rename to ...
13920 (add_lwp): ... this. Adjust.
13921 (linux_create_inferior): Adjust.
13922 (linux_attach_lwp): Adjust.
13923 (linux_attach): Adjust.
13924 (linux_kill_one_process): Rename to ...
13925 (linux_kill_one_lwp): ... this. Adjust.
13926 (linux_kill): Adjust.
13927 (linux_detach_one_process): Rename to ...
13928 (linux_detach_one_lwp): ... this. Adjust.
13929 (linux_detach): Adjust.
13930 (check_removed_breakpoint): Adjust.
13931 (status_pending_p): Adjust.
13932 (linux_wait_for_process): Rename to ...
13933 (linux_wait_for_lwp): ... this. Adjust.
13934 (linux_wait_for_event): Adjust.
13935 (send_sigstop): Adjust.
13936 (wait_for_sigstop): Adjust.
13937 (stop_all_processes): Rename to ...
13938 (stop_all_lwps): ... this.
13939 (linux_resume_one_process): Rename to ...
13940 (linux_resume_one_lwp): ... this. Adjust.
13941 (linux_set_resume_request, linux_continue_one_thread)
13942 (linux_queue_one_thread, resume_status_pending_p)
13943 (usr_store_inferior_registers, regsets_store_inferior_registers)
13944 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13945 Adjust.
13946 * linux-low.h (get_process): Rename to ...
13947 (get_lwp): ... this. Adjust.
13948 (get_thread_process): Rename to ...
13949 (get_thread_lwp): ... this. Adjust.
13950 (get_process_thread): Rename to ...
13951 (get_lwp_thread): ... this. Adjust.
13952 (struct process_info): Rename to ...
13953 (struct lwp_info): ... this.
13954 (all_processes): Rename to ...
13955 (all_lwps): ... this.
13956 * proc-service.c (ps_lgetregs): Adjust.
13957 * thread-db.c (thread_db_create_event, find_one_thread)
13958 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13959
13960 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13961
13962 * server.c (handle_query): Handle "qAttached".
13963
13964 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13965
13966 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13967 GPLv3, update license URL.
13968
13969 2009-03-01 Doug Evans <dje@google.com>
13970
13971 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13972 (server_h): Add gdb_signals.h.
13973 (signals.o): Update.
13974 * server.h (target_signal_from_host,target_signal_to_host_p)
13975 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13976
13977 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13978
13979 * remote-utils.c (getpkt): Also generate remote-debug
13980 information if noack_mode is set.
13981
13982 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13983
13984 * server.c (handle_query): Report qXfer:siginfo:read and
13985 qXfer:siginfo:write as supported and handle them.
13986 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13987 * linux-low.c (linux_xfer_siginfo): New.
13988 (linux_target_ops): Set it.
13989
13990 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13991
13992 * server.c (gdbserver_usage): Mention --remote-debug.
13993 (main): Accept '--remote-debug' switch.
13994
13995 2009-01-18 Doug Evans <dje@google.com>
13996
13997 * regcache.c (new_register_cache): No need to check result of xcalloc.
13998 * server.c (handle_search_memory): Back out calls to xmalloc,
13999 result is checked and error is returned to user upon failure.
14000 (handle_query): Ditto. Add more checks for result of malloc.
14001 (handle_v_cont): Check result of malloc, report error back to
14002 user upon failure.
14003 (handle_v_run): Ditto. Call freeargv.
14004 * server.h (freeargv): Declare.
14005 * utils.c (freeargv): New fn.
14006
14007 2009-01-15 Doug Evans <dje@google.com>
14008
14009 * gdbreplay.c (perror_with_name): Make arg const char *.
14010 * server.h (target_signal_to_name): Make return type const char *.
14011 * thread-db.c (thread_db_err_str): Make return type const char *.
14012 * utils.c (perror_with_name): Make arg const char *.
14013
14014 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14015
14016 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14017 when handling a EXIT_PROCESS_DEBUG_EVENT.
14018
14019 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14020
14021 * gdbreplay.c (gdbreplay_version): Update copyright year.
14022 * server.c (gdbserver_version): Likewise.
14023
14024 2009-01-05 Doug Evans <dje@google.com>
14025
14026 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14027 (handle_extended_wait): Improve comment.
14028
14029 2008-12-13 Doug Evans <dje@google.com>
14030
14031 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14032 * server.h (ATTR_MALLOC): New macro.
14033 (xmalloc,xcalloc,xstrdup): Declare.
14034 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14035 * inferiors.c: Ditto.
14036 * linux-low.c: Ditto.
14037 * mem-break.c: Ditto.
14038 * regcache.c: Ditto.
14039 * remote-utils.c: Ditto.
14040 * server.c: Ditto.
14041 * target.c: Ditto.
14042 * win32-low.c: Ditto.
14043
14044 2008-12-12 Doug Evans <dje@google.com>
14045
14046 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14047 in debugging printf.
14048
14049 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14050
14051 2008-12-09 Doug Evans <dje@google.com>
14052
14053 * linux-low.h (struct process_info): Delete member tid, unused.
14054 * thread-db.c (find_one_thread): Update.
14055 (maybe_attach_thread): Update.
14056
14057 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14058
14059 * target.h (struct target_ops): Add qxfer_osdata member.
14060 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14061 and dirent.h.
14062 (linux_qxfer_osdata): New functions.
14063 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14064 callback.
14065 * server.c (handle_query): Handle "qXfer:osdata:read:".
14066 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14067 (buffer_xml_printf): New functions.
14068 * server.h (struct buffer): New.
14069 (buffer_grow_str, buffer_grow_str0): New macros.
14070 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14071 (buffer_xml_printf): Declare.
14072
14073 2008-11-24 Doug Evans <dje@google.com>
14074
14075 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14076
14077 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14078
14079 * server.c (handle_v_run): Always use the supplied argument list.
14080
14081 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14082
14083 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14084 (xtensa_regmap_table): Add entry for scompare1.
14085
14086 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14087
14088 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14089 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14090 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14091 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14092 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14093 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14094 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14095 XML target descriptions.
14096 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14097 when inferior is running on an ISA 2.05 or later processor. Add
14098 special case to return offset for full 64-bit slot of FPSCR when
14099 in 32-bits.
14100
14101 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14102
14103 * Makefile.in (SFILES, clean): Added sparc64 files.
14104 (reg-sparc64.o, reg-sparc64.c): New.
14105 * configure.srv (sparc*-*-linux*): New configuration.
14106 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14107 syscall arguments for SPARC.
14108 (regsets_store_inferior_registers): Likewise.
14109 * linux-sparc-low.c: New file.
14110
14111 2008-10-21 Doug Evans <dje@google.com>
14112
14113 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14114 (READLINE_DIR,READLINE_DEP): Delete.
14115 (INTERNAL_CFLAGS): Update.
14116 (LINTFLAGS): Update.
14117
14118 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14119
14120 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14121 whole argv from the last run, not just argv[0].
14122
14123 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14124
14125 * regcache.c (new_register_cache): Return NULL if the register
14126 cache size isn't known yet.
14127 (free_register_cache): Avoid dereferencing a NULL regcache.
14128
14129 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * configure.srv: Merge MIPS and MIPS64.
14132
14133 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14134
14135 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14136
14137 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14138
14139 * Makefile.in: Add required vsx dependencies.
14140
14141 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14142 Declare init_registers_powerpc_vsx32l.
14143 Declare init_registers_powerpc_vsx64l.
14144 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14145 (ppc_arch_setup): Check for VSX in hwcap.
14146 (ppc_fill_vsxregset): New function.
14147 (ppc_store_vsxregset): New function.
14148 Add new VSX entry in regset_info target_regsets.
14149
14150 * configure.srv: Add new VSX dependencies.
14151
14152 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14153
14154 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14155 (remote_open): Set or clear transport_is_reliable.
14156 (putpkt_binary): Don't expect acks in noack mode.
14157 (getpkt): Don't send ack/nac in noack mode.
14158 * server.c (handle_general_set): Handle QStartNoAckMode.
14159 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14160 qSupported.
14161 (main): Reset noack_mode on every connection.
14162 * server.h (noack_mode): Declare.
14163
14164 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14165
14166 * Makefile.in (GDBREPLAY_OBS): New variable.
14167 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14168
14169 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14170 Daniel Jacobowitz <dan@codesourcery.com>
14171
14172 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14173 (usr_store_inferior_registers): Likewise.
14174 (regsets_store_inferior_registers): Likewise.
14175
14176 2008-07-31 Rolf Jansen <rj@surtec.com>
14177 Pedro Alves <pedro@codesourcery.com>
14178
14179 * configure.ac: Check for memmem declaration.
14180 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14181 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14182 (disable_packet_qfThreadInfo): Unconditionally compile.
14183 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14184 * configure, config.in: Regenerate.
14185
14186 2008-07-28 Doug Kwan <dougkwan@google.com>
14187
14188 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14189 (linux_write_memory): Remove declaration of errno.
14190
14191 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14192
14193 * linux-low.c (handle_extended_wait): Do not use "status"
14194 variable uninitialized.
14195
14196 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14197
14198 * server.c (handle_v_attach): Inhibit reporting dll changes.
14199
14200 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14201
14202 * remote-utils.c (prepare_resume_reply): If requested, don't
14203 output "thread:TID" in the T stop reply.
14204
14205 * server.c (disable_packet_vCont, disable_packet_Tthread)
14206 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14207 (handle_query): If requested, disable support for qC, qfThreadInfo
14208 and qsThreadInfo.
14209 (handle_v_requests): If requested, disable support for vCont.
14210 (gdbserver_show_disableable): New.
14211 (main): Handle --disable-packet and --disable-packet=LIST.
14212
14213 * server.h (disable_packet_vCont, disable_packet_Tthread)
14214 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14215
14216 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14217
14218 * server.c (gdbserver_usage): Mention --version.
14219
14220 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * Makefile.in (gdbreplay.o): New rule.
14223
14224 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14225
14226 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14227 message, not gdbserver.
14228
14229 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14230 Nathan Sidwell <nathan@codesourcery.com>
14231 Joseph Myers <joseph@codesourcery.com>
14232
14233 * acinclude.m4: Include ../../config/acx.m4.
14234 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14235 * configure, config.in: Regenerate.
14236 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14237 * server.c (gdbserver_version): Print PKGVERSION.
14238 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14239 (main): Adjust gdbserver_usage calls.
14240 * gdbreplay.c (version, host_name): Add declarations.
14241 (gdbreplay_version, gdbreplay_usage): New.
14242 (main): Accept --version and --help options.
14243
14244 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14245
14246 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14247 (arm_breakpoint_at): Handle Thumb.
14248 (the_low_target): Add comment.
14249
14250 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14251
14252 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14253
14254 2008-05-09 Doug Evans <dje@google.com>
14255
14256 * server.h (decode_search_memory_packet): Declare.
14257 * remote-utils.c (decode_search_memory_packet): New fn.
14258 * server.c (handle_search_memory_1): New fn.
14259 (handle_search_memory): New fn.
14260 (handle_query): Process qSearch:memory packets.
14261
14262 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14263
14264 * regcache.c (registers_length): Remove.
14265 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14266 full register packet.
14267 * regcache.h (registers_length): Remove prototype.
14268 * server.h (PBUFSIZ): Define to 16384.
14269
14270 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14271
14272 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14273 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14274 powerpc-64l.o, and powerpc-altivec64l.o.
14275 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14276 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14277 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14278 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14279 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14280 to srv_xmlfiles.
14281
14282 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14283 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14284 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14285 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14286 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14287 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14288 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14289 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14290 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14291 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14292 (clean): Update.
14293
14294 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14295 (init_registers_powerpc_32l): ... this new prototype.
14296 (init_registers_powerpc_32): Remove, replace by ...
14297 (init_registers_powerpc_altivec32l): ... this new prototype.
14298 (init_registers_powerpc_e500): Remove, replace by ...
14299 (init_registers_powerpc_e500l): ... this new prototype.
14300 (init_registers_ppc64): Remove, replace by ...
14301 (init_registers_powerpc_64l): ... this new prototype.
14302 (init_registers_powerpc_64): Remove, replace by ...
14303 (init_registers_powerpc_altivec64l): ... this new prototype.
14304 (ppc_num_regs): Set to 73.
14305 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14306 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14307 (ppc_cannot_store_register): Handle orig_r3 and trap.
14308 (ppc_arch_setup): Update init_registers_... calls.
14309 (ppc_fill_gregset): Handle orig_r3 and trap.
14310
14311 * inferiors.c (clear_inferiors): Reset current_inferior.
14312
14313 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14314
14315 * acinclude.m4: Add override.m4.
14316 * configure: Regenerate.
14317
14318 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14319
14320 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14321 initial call to init_register_ppc64.
14322
14323 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14324
14325 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14326 single powerpc*-*-linux* case.
14327 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14328
14329 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14330
14331 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14332 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14333 from reg_xmlfiles.
14334 * linux-ppc-low.c: Include <elf.h>.
14335 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14336 (ppc_hwcap): New global variable.
14337 (ppc_regmap): Remove __SPE__ #ifdef sections.
14338 (ppc_regmap_e500): New global variable.
14339 (ppc_cannot_store_register): Update __SPE__ special case.
14340 (ppc_get_hwcap): New function.
14341 (ppc_arch_setup): Use it to determine whether inferior supports
14342 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14343 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14344 Do not access registers if target does not support AltiVec.
14345 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14346 Do not access registers if target does not support SPE.
14347 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14348
14349 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14350
14351 * linux-low.c (disabled_regsets, num_regsets): New.
14352 (use_regsets_p): Delete.
14353 (linux_wait_for_process): Clear disabled_regsets.
14354 (regsets_fetch_inferior_registers): Check and set it.
14355 (regsets_store_inferior_registers): Likewise.
14356 (linux_fetch_registers, linux_store_registers): Do not use
14357 use_regsets_p.
14358 (initialize_low): Allocate disabled_regsets.
14359
14360 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * Makefile.in (LIBOBJS): New.
14363 (OBS): Use LIBOBJS.
14364 (memmem.o): New rule.
14365 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14366 * configure: Regenerated.
14367
14368 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14369
14370 * server.c (handle_query): Never return "unsupported" for
14371 qXfer:features:read queries.
14372
14373 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14374
14375 * server.c (get_features_xml): Fix inverted condition.
14376 (handle_query): Always support qXfer:feature:read.
14377
14378 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14379
14380 * server.c (wrapper_argv): New.
14381 (start_inferior): Handle wrapper_argv. If set, expect an extra
14382 trap.
14383 (gdbserver_usage): Document --wrapper.
14384 (main): Parse --wrapper.
14385
14386 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14387
14388 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14389 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14390 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14391 (ppc_set_pc): Likewise.
14392 (ppc_arch_setup): New function.
14393 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14394 of collect_register.
14395 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14396
14397 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14398
14399 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14400 instead of linux-ppc64-low.o.
14401 * linux-ppc64-low.c: Remove file.
14402 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14403 (linux-ppc64-low.o): Remove rule.
14404
14405 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14406 (init_registers_powerpc_64): Likewise.
14407 (ppc_regmap): Conditionally define depending on __powerpc64__.
14408 (ppc_cannot_store_register): Do not special-case "fpscr" when
14409 compiled on __powerpc64__.
14410 (ppc_collect_ptrace_register): New function.
14411 (ppc_supply_ptrace_register): New function.
14412 (ppc_breakpoint): Change type to "unsigned int".
14413 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14414 (the_low_target): Conditionally provide initializers for the
14415 arch_setup member depending on __powerpc64__. Install
14416 collect_ptrace_register and supply_ptrace_register members.
14417
14418 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14419
14420 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14421 * server.c (gdbserver_xmltarget): Define.
14422 (get_features_xml): Use it to replace "target.xml" and arch_string.
14423
14424 * configure.srv: Remove srv_xmltarget. Add XML files that were
14425 mentioned there to srv_xmlfiles instead. Remove conditional tests
14426 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14427 srv_xmlfiles and srv_regobj to include all possible choices.
14428 * configure.ac (srv_xmltarget): Remove.
14429 (srv_xmlfiles): Do not add "target.xml".
14430 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14431 checks for supplementary target information.
14432 * configure: Regenerate.
14433 * Makefile.in (XML_TARGET): Remove.
14434 (target.xml): Remove rule.
14435 (clean): Do not clean up target.xml.
14436 (.PRECIOUS): Do not mention target.xml.
14437
14438 * target.h (struct target_ops): Remove arch_string member.
14439 * linux-low.c (linux_arch_string): Remove.
14440 (linux_target_ops): Remove arch_string initializer.
14441 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14442 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14443 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14444 * spu-low.c (spu_arch_string): Remove.
14445 (spu_target_ops): Remove arch_string initializer.
14446 * win32-low.c (win32_arch_string): Remove.
14447 (win32_target_ops): Remove arch_string initializer.
14448 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14449 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14450 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14451
14452 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14453
14454 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14455 by collect_ptrace_register and supply_ptrace_register hooks.
14456 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14457 instead of checking for the_low_target.left_pad_xfer.
14458 (usr_store_inferior_registers): Use collect_ptrace_register callback
14459 instead of checking for the_low_target.left_pad_xfer.
14460
14461 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14462 (s390_supply_ptrace_register): Likewise.
14463 (s390_fill_gregset): Call s390_collect_ptrace_register.
14464 (the_low_target): Update.
14465
14466 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14467 (ppc_supply_ptrace_register): Likewise.
14468 (the_low_target): Update.
14469
14470 * linux-i386-low.c (the_low_target): Update.
14471 * linux-x86-64-low.c (the_low_target): Update.
14472
14473 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14474
14475 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14476 reg-s390.o and reg-s390x.o.
14477
14478 * linux-low.c (new_inferior): New global variable.
14479 (linux_create_inferior, linux_attach): Set it.
14480 (linux_wait_for_process): Call the_low_target.arch_setup after the
14481 target has stopped for the first time.
14482 (initialize_low): Do not call the_low_target.arch_setup.
14483
14484 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14485 (s390_set_pc): Likewise.
14486 (s390_arch_setup): New function.
14487 (the_low_target): Use s390_arch_setup as arch_setup routine.
14488
14489 * regcache.c (realloc_register_cache): New function.
14490 (set_register_cache): Call it for each existing regcache.
14491
14492 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14493
14494 * server.h (init_registers): Remove prototype.
14495
14496 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14497 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14498 instead of init_registers ().
14499 * linux-arm-low.c (init_registers_arm): Add prototype.
14500 (init_registers_arm_with_iwmmxt): Likewise.
14501 (the_low_target): Add initializer for arch_setup field.
14502 * linux-cris-low.c (init_registers_cris): Add prototype.
14503 (the_low_target): Add initializer for arch_setup field.
14504 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14505 (the_low_target): Add initializer for arch_setup field.
14506 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14507 (the_low_target): Add initializer for arch_setup field.
14508 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14509 (the_low_target): Add initializer for arch_setup field.
14510 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14511 (the_low_target): Add initializer for arch_setup field.
14512 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14513 (the_low_target): Add initializer for arch_setup field.
14514 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14515 (init_registers_mips64_linux): Likewise.
14516 (the_low_target): Add initializer for arch_setup field.
14517 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14518 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14519 (the_low_target): Add initializer for arch_setup field.
14520 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14521 (init_registers_powerpc_64): Likewise.
14522 (the_low_target): Add initializer for arch_setup field.
14523 * linux-s390-low.c (init_registers_s390): Add prototype.
14524 (init_registers_s390x): Likewise.
14525 (the_low_target): Add initializer for arch_setup field.
14526 * linux-sh-low.c (init_registers_sh): Add prototype.
14527 (the_low_target): Add initializer for arch_setup field.
14528 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14529 (the_low_target): Add initializer for arch_setup field.
14530 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14531 (the_low_target): Add initializer for arch_setup field.
14532
14533 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14534 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14535 instead of init_registers ().
14536 * win32-arm-low.c (init_registers_arm): Add prototype.
14537 (the_low_target): Add initializer for arch_setup field.
14538 * win32-i386-low.c (init_registers_i386): Add prototype.
14539 (the_low_target): Add initializer for arch_setup field.
14540
14541 * spu-low.c (init_registers_spu): Add prototype.
14542 (initialize_low): Call initialie_registers_spu () instead of
14543 initialize_registers ().
14544
14545 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14546
14547 * server.c (handle_v_requests): When handling the vRun and vAttach
14548 packets, if already debugging a process, don't kill it. Return an
14549 error instead.
14550
14551 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * server.c (handle_query): Correct length check.
14554
14555 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14556
14557 * win32-low.c (do_initial_child_stuff): Add process handle
14558 parameter. Set current_process_handle and current_process_id from the
14559 parameters. Clear globals.
14560 (win32_create_inferior): Don't set current_process_handle and
14561 current_process_id here. Instead pass them on the call to
14562 do_initial_child_stuff.
14563 (win32_attach): Likewise.
14564 (win32_clear_inferiors): New.
14565 (win32_kill): Don't close the current process handle or the
14566 current thread handle here. Instead call win32_clear_inferiors.
14567 (win32_detach): Don't open a new handle to the process. Call
14568 win32_clear_inferiors.
14569 (win32_join): Don't rely on current_process_handle; open a new
14570 handle using the process id.
14571 (win32_wait): Call win32_clear_inferiors when the inferior process
14572 has exited.
14573
14574 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * server.c (monitor_show_help): Add "exit".
14577
14578 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14579
14580 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14581 (clean): Add reg-xtensa.c.
14582 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14583 * configure.srv (xtensa*-*-linux*) New target.
14584 * linux-xtensa-low.c: New.
14585 * xtensa-xtregs.c: New.
14586
14587 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14588
14589 * hostio.c: Don't include errno.h.
14590 (errno_to_fileio_errno): Move to hostio-errno.
14591 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14592 error number outputting to the target->hostio_last_error callback.
14593 (hostio_packet_error): Use FILEIO_EINVAL directly.
14594 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14595 calls to hostio_error.
14596 * hostio-errno.c: New.
14597 * server.h (hostio_last_error_from_errno): Declare.
14598 * target.h (target_ops): Add hostio_last_error member.
14599 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14600 as hostio_last_error handler.
14601 * spu-low.c (spu_target_ops): Likewise.
14602 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14603 (wince_hostio_last_error): New functions.
14604 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14605 as hostio_last_error handler.
14606 (win32_target_ops) [!_WIN32_WCE]: Register
14607 hostio_last_error_from_errno as hostio_last_error handler.
14608 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14609 (hostio-errno.o): New rule.
14610 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14611 * configure.srv (srv_hostio_err_objs): New variable. Default to
14612 hostio-errno.o.
14613 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14614 * configure: Regenerate.
14615
14616 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14617
14618 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14619 (linux_kill, linux_detach): Clean up the process list.
14620 * remote-utils.c (remote_open): Improve port number parsing.
14621 (putpkt_binary, input_interrupt): Only send interrupts if the target
14622 is running.
14623 * server.c (extended_protocol): Make static.
14624 (attached): Define earlier.
14625 (exit_requested, response_needed, program_argv): New variables.
14626 (target_running): New.
14627 (start_inferior): Clear attached here.
14628 (attach_inferior): Set attached here.
14629 (require_running): Define.
14630 (handle_query): Use require_running and target_running. Implement
14631 "monitor exit".
14632 (handle_v_attach, handle_v_run): New.
14633 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14634 (gdbserver_usage): Update.
14635 (main): Redo argument parsing. Handle --debug and --multi. Handle
14636 --attach along with other options or after the port. Save
14637 program_argv. Support no initial program. Resynchronize
14638 communication with GDB after an error. Handle "monitor exit".
14639 Use require_running and target_running. Always allow the extended
14640 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14641 restart in extended mode.
14642 * README: Refer to the GDB manual. Update --attach usage.
14643
14644 2007-12-20 Andreas Schwab <schwab@suse.de>
14645
14646 * linux-low.c (STACK_SIZE): Define.
14647 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14648 (linux_test_for_tracefork): Likewise.
14649
14650 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * linux-low.c (linux_wait_for_event): Update messages. Do not
14653 reinsert auto-delete breakpoints.
14654 * mem-break.c (struct breakpoint): Change return type of handler to
14655 int.
14656 (set_breakpoint_at): Update handler type.
14657 (reinsert_breakpoint_handler): Return 1 instead of calling
14658 delete_breakpoint.
14659 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14660 setting a new one.
14661 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14662 * mem-break.h (set_breakpoint_at): Update handler type.
14663 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14664 * win32-low.c (auto_delete_breakpoint): New.
14665 (get_child_debug_event): Use it.
14666
14667 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * configure.ac: Check for pread and pwrite.
14670 * hostio.c (handle_pread): Fall back to lseek and read.
14671 (handle_pwrite): Fall back to lseek and write.
14672 * config.in, configure: Regenerated.
14673
14674 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14675
14676 * server.c (myresume): Add own_buf argument.
14677 (main): Update calls.
14678
14679 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14680
14681 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14682 * remote-utils.c (remote_open): Do not call disable_async_io.
14683 (block_async_io): Delete.
14684 (unblock_async_io): Make static.
14685 (initialize_async_io): New.
14686 * server.c (handle_v_cont): Handle async I/O here.
14687 (myresume): Likewise. Move other common resume tasks here...
14688 (main): ... from here. Call initialize_async_io. Disable async
14689 I/O before the main loop.
14690 * server.h (initialize_async_io): Declare.
14691 (block_async_io, unblock_async_io): Delete prototypes.
14692 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14693
14694 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14695
14696 * remote-utils.c (readchar): Allow binary data in received messages.
14697
14698 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14699
14700 * win32-low.c (attaching): New global.
14701 (win32_create_inferior): Clear the `attaching' global.
14702 (win32_attach): Set the `attaching' global.
14703 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14704 attaching. Only set a breakpoint at the entry point if not
14705 attaching.
14706
14707 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14708
14709 * server.c (main): Don't report dll events on the initial
14710 connection on attaches.
14711
14712 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14713
14714 * server.c (main): Relax numerical bases supported for the pid of
14715 the --attach command line argument.
14716
14717 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14718
14719 * win32-low.c (win32_attach): Call OpenProcess before
14720 DebugActiveProcess, not after. Add last error output to error
14721 call.
14722
14723 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14724
14725 * win32-low.c (win32_get_thread_context)
14726 (win32_set_thread_context): New functions.
14727 (thread_rec): Use win32_get_thread_context.
14728 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14729 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14730 field.
14731
14732 2007-12-03 Leo Zayas
14733 Pedro Alves <pedro_alves@portugalmail.pt>
14734
14735 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14736 global variables.
14737 (child_add_thread): Minor cleanup.
14738 (child_continue): Resume artificially suspended threads before
14739 calling ContinueDebugEvent.
14740 (suspend_one_thread): New.
14741 (fake_breakpoint_event): New.
14742 (get_child_debug_event): Change return type to int. Check here if
14743 gdb sent an interrupt request. If a soft interrupt was requested,
14744 fake a breakpoint event. Return 0 if there is no event to handle,
14745 and 1 otherwise.
14746 (win32_wait): Don't check here if gdb sent an interrupt request.
14747 Ensure there is a valid event to handle.
14748 (win32_request_interrupt): Add soft interruption method as last
14749 resort.
14750
14751 2007-12-03 Leo Zayas
14752 Pedro Alves <pedro_alves@portugalmail.pt>
14753
14754 * win32-low.h (win32_thread_info): Add descriptions to the
14755 structure members. Replace `suspend_count' counter by a
14756 `suspended' flag.
14757 * win32-low.c (thread_rec): Update condition of when to get the
14758 context from the inferior. Rely on ContextFlags being set if it
14759 has already been retrieved. Only suspend the inferior thread if
14760 we haven't already. Warn if that fails.
14761 (continue_one_thread): s/suspend_count/suspended/. Only call
14762 ResumeThread once. Warn if that fails.
14763
14764 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14765
14766 * win32-low.c (win32_wait): Don't read from the inferior when it
14767 has already exited.
14768
14769 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14770
14771 * Makefile.in (win32_low_h): New variable.
14772 (win32-low.o): Add dependency on $(win32_low_h).
14773 (win32-arm-low.o, win32-i386-low.o): New rules.
14774
14775 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * hostio.c: Correct copyright year.
14778
14779 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14780
14781 * Makefile.in (OBS): Add hostio.o.
14782 (hostio.o): New rule.
14783 * server.h (handle_vFile): Declare.
14784 * hostio.c: New file.
14785 * server.c (handle_v_requests): Take packet_len and new_packet_len
14786 for binary packets. Call handle_vFile.
14787 (main): Update call to handle_v_requests.
14788
14789 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * linux-low.c: Include <sched.h>.
14792
14793 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14794
14795 * linux-low.c (linux_tracefork_grandchild): New.
14796 (linux_tracefork_child): Use clone.
14797 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14798
14799 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14800
14801 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14802
14803 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14806
14807 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14808
14809 * inferiors.c (change_inferior_id): Delete.
14810 (add_pid_to_list, pull_pid_from_list): New.
14811 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14812 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14813 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14814 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14815 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14816 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14817 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14818 (using_threads): Always set to 1.
14819 (handle_extended_wait): New.
14820 (add_process): Do not set TID.
14821 (linux_create_inferior): Set must_set_ptrace_flags.
14822 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14823 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14824 (linux_thread_alive): Rename TID argument to LWPID.
14825 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14826 (linux_wait_for_event): Do not use TID or check using_threads. Update
14827 call to dead_thread_notify. Call handle_extended_wait.
14828 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14829 (send_sigstop): Delete sigstop_sent.
14830 (wait_for_sigstop): Avoid TID.
14831 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14832 (linux_test_for_tracefork): New.
14833 (linux_lookup_signals): Use thread_db_active and
14834 linux_supports_tracefork_flag.
14835 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14836 * linux-low.h (get_process_thread): Avoid TID.
14837 (struct process_ifo): Move thread_known and tid to the end. Remove
14838 sigstop_sent.
14839 (linux_attach_lwp, thread_db_init): Update prototypes.
14840 * server.h (change_inferior_id): Delete prototype.
14841 (add_pid_to_list, pull_pid_from_list): New prototypes.
14842 * thread-db.c (thread_db_use_events): New.
14843 (find_first_thread): Rename to...
14844 (find_one_thread): ...this. Update callers and messages. Do not
14845 call fatal. Check thread_db_use_events. Do not call
14846 change_inferior_id or new_thread_notify.
14847 (maybe_attach_thread): Update. Do not call new_thread_notify.
14848 (thread_db_init): Set thread_db_use_events. Check use_events.
14849 * utils.c (fatal, warning): Correct message prefix.
14850
14851 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14852
14853 * Makefile.in (clean): Remove new files.
14854 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14855 (powerpc-64.o, powerpc-64.c): New rules.
14856 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14857 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14858 with SPE.
14859 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14860 SPE targets.
14861 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14862 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14863 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14864 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14865 (target_regsets): Add AltiVec and SPE register sets.
14866 * configure.ac: Check for AltiVec and SPE.
14867 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14868 (ppc_fill_vrregset, ppc_store_vrregset): New.
14869 (target_regsets): Add AltiVec register set.
14870 * configure: Regenerated.
14871
14872 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * linux-low.c (O_LARGEFILE): Define.
14875 (linux_read_memory): Use /proc/PID/mem.
14876 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14877 * configure, config.in: Regenerated.
14878
14879 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14880
14881 * linux-low.c (linux_wait_for_event): Do not pass signals while
14882 single-stepping.
14883
14884 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14885
14886 * win32-low.c (create_process): New.
14887 (win32_create_inferior): Use create_process instead of
14888 CreateProcess. If create_process failed retry appending an ".exe"
14889 suffix. Store the GetLastError result immediatelly after
14890 create_process calls and use it on the call to error.
14891
14892 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14893
14894 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14895
14896 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14897
14898 * configure.ac: Switch license to GPLv3.
14899
14900 2007-08-01 Michael Snyder <msnyder@access-company.com>
14901
14902 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14903
14904 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14905
14906 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14907 typedef.
14908 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14909 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14910 CloseToolhelp32Snapshot.
14911 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14912 CloseToolhelp32Snapshot.
14913
14914 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14915
14916 * server.c (main): Check for inferior exit before main loop.
14917
14918 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14919
14920 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14921 instead of on tmp_desc.
14922
14923 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14924 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14927 (add_thread): Minor cleanups.
14928 (clear_inferiors): Move lower in the file. Clear the DLL
14929 list.
14930 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14931 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14932 (xml_escape_text): New.
14933 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14934 for qSupported.
14935 (handle_v_cont): Report errors.
14936 (gdbserver_version): Update.
14937 (main): Correct size of own_buf. Do not report initial DLL events.
14938 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14939 (unloaded_dll, xml_escape_text): New.
14940 * win32-low.c (enum target_waitkind): Update comments.
14941 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14942 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14943 (win32_EnumProcessModules, win32_GetModuleInformation)
14944 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14945 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14946 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14947 (win32_Module32First, win32_Module32Next, load_toolhelp)
14948 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14949 (get_child_debug_event): Handle DLL events.
14950 (win32_wait): Likewise.
14951
14952 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14955 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14956
14957 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14958
14959 * win32-low.c (handle_output_debug_string): Ignore event if not
14960 waiting.
14961
14962 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14963
14964 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14965
14966 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14967
14968 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14969
14970 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14971
14972 * inferiors.c (change_inferior_id): Add comment.
14973 * linux-low.c (check_removed_breakpoint): Add an early
14974 prototype. Improve debug output.
14975 (linux_attach): Doc update.
14976 (linux_detach_one_process, linux_detach): Clean up before releasing
14977 each process.
14978 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14979 * linux-low.h (struct process_info): Doc improvement.
14980 * mem-break.c (delete_all_breakpoints): New.
14981 * mem-break.h (delete_all_breakpoints): New prototype.
14982 * thread-db.c (find_first_thread): New.
14983 (thread_db_create_event): Call it instead of
14984 thread_db_find_new_threads. Clean up unused variables.
14985 (maybe_attach_thread): Remove first thread handling.
14986 (thread_db_find_new_threads): Use find_first_thread.
14987 (thread_db_get_tls_address): Likewise.
14988
14989 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * thread-db.c (thread_db_find_new_threads): Add prototype.
14992 (thread_db_create_event): Check for the main thread before adding
14993 a new thread.
14994 (maybe_attach_thread): Only enable event reporting if TID == 0.
14995 (thread_db_get_tls_address): Check for new threads.
14996
14997 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * linux-low.c (linux_create_inferior): Try execv before execvp.
15000 * spu-low.c (spu_create_inferior): Likewise.
15001
15002 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15003
15004 * linux-low.c (linux_create_inferior): Change execv to execvp.
15005 * spu-low.c (spu_create_inferior): Likewies.
15006
15007 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * Makefile.in (clean): Clean new files instead of deleted ones.
15010 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15011 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15012 rules.
15013 * configure.srv: Specify XML files and new regformats for MIPS and
15014 MIPS64 GNU/Linux.
15015 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15016 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15017 an entry for the restart register.
15018 (mips_cannot_fetch_register, mips_cannot_store_register)
15019 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15020 register names to match the XML descriptions.
15021 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15022 restart register instead of $0.
15023
15024 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15025 Markus Deuling <deuling@de.ibm.com>
15026
15027 * remote-utils.c (decode_xfer_write): New function.
15028 * server.h (decode_xfer_write): Add prototype.
15029 * server.c (handle_query): Add PACKET_LEN argument. Support
15030 qXfer:spu:read and qXfer:spu:write packets.
15031 (main): Pass packet_len to handle_query.
15032 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15033 * target.h (target_ops): Add qxfer_spu.
15034
15035 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15036
15037 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15038 accessing non-seekable spufs files.
15039
15040 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15041
15042 * server.c (handle_query): Add reply for qC packet.
15043
15044 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15045 Leo Zayas <lerele@champenstudios@com>
15046
15047 * server.h (check_remote_input_interrupt_request): New function.
15048 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15049 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15050 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15051 (check_remote_input_interrupt_request): New function.
15052 * server.h (check_remote_input_interrupt_request): Declare.
15053 * win32-low.c (winapi_DebugBreakProcess,
15054 winapi_GenerateConsoleCtrlEvent): New typedefs.
15055 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15056 to 250 ms.
15057 (win32_wait): Check for remote interrupt request
15058 with check_remote_input_interrupt_request.
15059 (win32_request_interrupt): New function.
15060 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15061
15062 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15063
15064 * win32-low.c (debug_registers_changed,
15065 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15066 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15067 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15068 (thread_rec): Get context using the low target.
15069 (child_add_thread): Call thread_added on the low target,
15070 which does the same thing.
15071 (regptr): Delete.
15072 (do_initial_child_stuff): Remove debug registers references.
15073 Set context using the low target. Resume threads after
15074 setting the contexts.
15075 (child_continue): Remove dead variable. Remove debug
15076 registers references.
15077 (child_fetch_inferior_registers): Go through the low target.
15078 (do_child_store_inferior_registers): Remove.
15079 (child_store_inferior_registers): Go through the low target.
15080 (win32_resume): Remove debug registers references.
15081 Set context using the low target.
15082 (handle_exception): Change return type to void. Don't record
15083 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15084 first chance exception.
15085 (get_child_debug_event): Change return type to void. Remove
15086 goto loop. Always return after waiting for debug event.
15087 (win32_wait): Convert to switch statement. Handle spurious
15088 events.
15089
15090 * win32-i386-low.c (debug_registers_changed,
15091 debug_registers_used): New.
15092 (initial_stuff): Rename to ...
15093 (i386_initial_stuff): ... this. Clear debug registers
15094 state variables.
15095 (store_debug_registers): Delete.
15096 (i386_get_thread_context): New.
15097 (load_debug_registers): Delete.
15098 (i386_set_thread_context): New.
15099 (i386_thread_added): New.
15100 (single_step): Rename to ...
15101 (i386_single_step): ... this.
15102 (do_fetch_inferior_registers): Rename to ...
15103 (i386_fetch_inferior_register): ... this.
15104 (i386_store_inferior_register): New.
15105 (the_low_target): Adapt to new interface.
15106
15107 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15108 (arm_get_thread_context): New.
15109 (arm_set_thread_context): New.
15110 (regptr): New.
15111 (do_fetch_inferior_registers): Rename to ...
15112 (arm_fetch_inferior_register): ... this.
15113 (arm_store_inferior_register): New.
15114 (arm_wince_breakpoint): Reimplement as unsigned long.
15115 (arm_wince_breakpoint_len): Define.
15116 (the_low_target): Adapt to new interface.
15117
15118 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15119 load_debug_registers. Add get_thread_context, set_thread_context,
15120 thread_added and store_inferior_register. Rename
15121 fetch_inferior_registers to fetch_inferior_register.
15122 (regptr): Remove declaration.
15123
15124 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15125
15126 * linux-low.c (linux_detach): Change return type to int. Return 0.
15127 * spu-low.c (spu_detach): Likewise.
15128
15129 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15130
15131 * target.h (target_ops): Change return type of detach to int.
15132 Add join.
15133 (join_inferior): New.
15134 * server.c (main): Don't skip detach support on mingw32.
15135 If the inferior doesn't support detaching return error.
15136 Call join_inferior instead of using waitpid.
15137 * linux-low.c (linux_join): New.
15138 (linux_target_op): Add linux_join.
15139 * spu-low.c (spu_join): New.
15140 (spu_target_ops): Add spu_join.
15141 * win32-low.c (win32_detach): Adapt to new interface.
15142 Reopen current_process_handle before detaching. Issue a child
15143 resume before detaching.
15144 (win32_join): New.
15145 (win32_target_op): Add win32_join.
15146
15147 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15148
15149 * win32-low.c (win32-attach): Fix return value.
15150 * target.h (target_ops): Describe ATTACH return values.
15151
15152 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15153
15154 * win32-low.c (GETPROCADDRESS): Define.
15155 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15156 (winapi_DebugSetProcessKillOnExit): Likewise.
15157 (win32_create_inferior): Force usage of ansi CreateProcessA.
15158 (win32_attach): Use GETPROCADDRESS.
15159 (win32_detach): Likewise.
15160
15161 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15162
15163 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15164
15165 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15166
15167 * win32-low.c: Commit leftover changes from 2007-03-29.
15168
15169 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15172 fields short instead of int. Add explicit padding.
15173 (i387_cache_to_fsave): Remove unnecessary casts.
15174 (i387_fsave_to_cache): Doc fix.
15175 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15176
15177 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15178
15179 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15180 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15181
15182 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15183
15184 * configure.srv (arm*-*-mingw32ce*): Move near the other
15185 arm targets.
15186
15187 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15188
15189 * configure.ac: Add errno checking.
15190 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15191 sys/file.h and malloc.h.
15192 (AC_CHECK_DECLS): Add perror.
15193 (srv_mingwce): Handle.
15194 * configure.srv (i[34567]86-*-cygwin*): Add
15195 win32-i386-low.o to srv_tgtobj.
15196 (i[34567]86-*-mingw*): Likewise.
15197 (arm*-*-mingw32ce*): Add case.
15198 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15199 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15200 [__MINGW32CE__] (strerror): New function.
15201 [__MINGW32CE__] (errno): Define to GetLastError.
15202 [__MINGW32CE__] (COUNTOF): New macro.
15203 (remote_open): Remove extra close call.
15204 * mem-break.c (delete_breakpoint_at): New function.
15205 * mem-break.h (delete_breakpoint_at): Declare.
15206 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15207 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15208 [USE_WIN32API] (read, write): Add char* casts.
15209 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15210 * server.h: Include wincecompat.h on Windows CE.
15211 [HAVE_ERRNO_H]: Check.
15212 (perror): Declare if not declared.
15213 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15214 (perror_with_name): Remove errno declaration.
15215 * wincecompat.h: New.
15216 * wincecompat.c: New.
15217 * win32-low.h: New.
15218 * win32-arm-low.c: New.
15219 * win32-i386-low.c: New.
15220 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15221 (OUTMSG2): Make it safe.
15222 (_T): New macro.
15223 (COUNTOF): New macro.
15224 (NUM_REGS): Get it from the low target.
15225 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15226 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15227 (thread_rec): Let low target handle debug registers.
15228 (child_add_thread): Likewise.
15229 (child_init_thread_list): Likewise.
15230 (continue_one_thread): Likewise.
15231 (regptr): New.
15232 (do_child_fetch_inferior_registers): Move to ...
15233 * win32-i386-low.c: ... here, and rename to ...
15234 (do_fetch_inferior_registers): ... this.
15235 * win32-low.c (child_fetch_inferior_registers):
15236 Go through the low target.
15237 (do_child_store_inferior_registers): Use regptr.
15238 (strwinerror): New function.
15239 (win32_create_inferior): Handle Windows CE.
15240 Use strwinerror instead of strerror on Windows error
15241 codes. Add program to the error output.
15242 Don't close the main thread handle on Windows CE.
15243 (win32_attach): Use coredll.dll on Windows CE.
15244 (win32_kill): Close current process and current
15245 thread handles.
15246 (win32_detach): Use coredll.dll on Windows CE.
15247 (win32_resume): Let low target handle debug registers, and
15248 step request.
15249 (handle_exception): Add/Remove initial breakpoint. Avoid
15250 non-existant WSTOPSIG on Windows CE.
15251 (win32_read_inferior_memory): Cast to remove warning.
15252 (win32_arch_string): Go through the low target.
15253 (initialize_low): Call set_breakpoint_data with the low
15254 target's breakpoint.
15255 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15256 FOP_REGNUM, mappings): Move to ...
15257 * win32-i386-low.c: ... here.
15258 * win32-low.c (win32_thread_info): Move to ...
15259 * win32-low.h: ... here.
15260 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15261 win32-arm-low.c and wincecompat.c.
15262 (all:): Add $EXEEXT.
15263 (install-only:): Likewise.
15264 (gdbserver:): Likewise.
15265 (gdbreplay:): Likewise.
15266 * config.in: Regenerate.
15267 * configure: Regenerate.
15268
15269 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15270
15271 * win32-low.c: Rename typedef thread_info to
15272 win32_thread_info throughout.
15273
15274 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15275
15276 * win32-i386-low.c: Rename to ...
15277 * win32-low.c: ... this.
15278 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15279 * Makefile.in: Likewise.
15280
15281 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15282
15283 * remote-utils.c (monitor_output): Constify msg parameter.
15284 * server.h (monitor_output): Likewise.
15285 * win32-i386-low.c (handle_output_debug_string): New.
15286 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15287 handle_output_debug_string.
15288 (get_child_debug_event): Likewise.
15289
15290 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15291
15292 * server.c (main): Correct strtoul check.
15293
15294 2007-03-27 Jon Ringle <jon@ringle.org>
15295
15296 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15297
15298 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15299
15300 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15301
15302 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15303
15304 * terminal.h: Check HAVE_SGTTY_H.
15305
15306 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15307
15308 * remote-utils.c (remote_open): Print out the assigned port number.
15309
15310 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15311
15312 * remote-utils.c (monitor_output): New function.
15313 * server.c (debug_threads): Define here.
15314 (monitor_show_help): New function.
15315 (handle_query): Handle qRcmd.
15316 (main): Do not handle 'd' packet.
15317 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15318 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15319 of debug_threads.
15320
15321 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15322
15323 * Makefile.in (EXEEXT): New.
15324 (clean): Use $(EXEEXT).
15325
15326 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15327
15328 * target.h (target_ops): Rename send_signal to request_interrupt,
15329 and remove enum target_signal parameter.
15330 * linux-low.c (linux_request_interrupt): Rename from
15331 linux_send_signal, and always send SIGINT.
15332 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15333 and always send SIGINT.
15334 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15335 of send_signal.
15336 (input_interrupt): Likewise.
15337
15338 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15339
15340 * server.c (get_features_xml): Check if target implemented
15341 arch_string.
15342 * win32-i386-low.c (win32_arch_string): New.
15343 (win32_target_ops): Add win32_arch_string as arch_string member.
15344
15345 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15346
15347 * spu-low.c (spu_arch_string): New.
15348 (spu_target_ops): Add spu_arch_string.
15349
15350 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15351
15352 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15353 * configure.ac: Do not check for terminal.h.
15354 * configure, config.in: Regenerated.
15355
15356 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15357
15358 * Makefile.in (OBS): Add $(XML_BUILTIN).
15359 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15360 (clean): Update.
15361 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15362 (arm-with-iwmmxt.c): New.
15363 * config.in, configure: Regenerate.
15364 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15365 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15366 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15367 (arm*-*-linux*): Add iWMMXt and regset support.
15368 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15369 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15370 (arm_store_wmmxregset, target_regsets): New.
15371 * server.c (get_features_xml): Take annex argument. Check builtin
15372 XML documents.
15373 (handle_query): Handle multiple annexes.
15374
15375 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15376
15377 * remote-utils.c [USE_WIN32API] (read, write): Define.
15378 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15379 write.
15380
15381 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15382
15383 * linux-i386-low.c (the_low_target): Set arch_string.
15384 * linux-x86-64-low.c (the_low_target): Likewise.
15385 * linux-low.c (linux_arch_string): New.
15386 (linux_target_ops): Add it.
15387 * linux-low.h (struct linux_target_ops): Add arch_string.
15388 * server.c (write_qxfer_response): Use const void * for DATA.
15389 (get_features_xml): New.
15390 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15391 * target.h (struct target_ops): Add arch_string method.
15392
15393 2007-01-03 Denis Pilat <denis.pilat@st.com>
15394 Daniel Jacobowitz <dan@codesourcery.com>
15395
15396 * linux-low.c (linux_kill): Handle being called with no threads.
15397 * win32-i386-low.c (win32_kill): Likewise.
15398 (get_child_debug_event): Clear current_process_handle.
15399
15400 2006-12-30 Denis PILAT <denis.pilat@st.com>
15401 Daniel Jacobowitz <dan@codesourcery.com>
15402
15403 * remote-utils.c (remote_open): Check the type of specified
15404 serial port devices before opening them.
15405 * server.c (main): Kill the inferior if an error occurs during
15406 the first remote_open.
15407
15408 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15409
15410 * README: Update supported targets.
15411
15412 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * Makefile.in (clean): Remove reg-mips64.c.
15415 (reg-mips64.c, reg-mips64.o): New rules.
15416 * configure.srv: Handle mips64. Include regset support for mips.
15417 * linux-mips-low.c (union mips_register): New.
15418 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15419 (mips_breakpoint, mips_breakpoint_at): Use int.
15420 (mips_collect_register, mips_supply_register)
15421 (mips_collect_register_32bit, mips_supply_register_32bit)
15422 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15423 (mips_store_fpregset, target_regsets): New.
15424 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15425
15426 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15427
15428 * configure.srv: Add target "spu*-*-*".
15429 * Makefile.in (clean): Remove reg-spu.c.
15430 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15431 * spu-low.c: New file.
15432
15433 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * configure.ac: Correct td_thr_tls_get_addr test.
15436 * configure: Regenerated.
15437
15438 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15439
15440 * linux-low.c (linux_wait_for_event): Reformat. Use the
15441 pass_signals array.
15442 * remote-utils.c (decode_address_to_semicolon): New.
15443 * server.c (pass_signals, handle_general_set): New.
15444 (handle_query): Mention QPassSignals for qSupported.
15445 (main): Call handle_general_set.
15446 * server.h (pass_signals, decode_address_to_semicolon): New.
15447
15448 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15449
15450 * server.c (handle_query): Correct error handling for read_auxv.
15451
15452 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15453
15454 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15455 and srv_linux_thread_db to yes.
15456 * linux-s390-low.c (s390_fill_gregset): New function.
15457 (target_regsets): Define data structure.
15458
15459 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15460
15461 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15462 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15463 * config.in, configure: Regenerated.
15464 * inferiors.c (gdb_id_to_thread): New function.
15465 (gdb_id_to_thread_id): Use it.
15466 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15467 * linux-low.h (struct process_info): Add th member.
15468 (thread_db_get_tls_address): New prototype.
15469 * remote-utils.c (decode_address): Make non-static.
15470 * server.c (handle_query): Handle qGetTLSAddr.
15471 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15472 * target.h (struct target_ops): Add get_tls_address.
15473 * thread-db.c (maybe_attach_thread): Save the thread handle.
15474 (thread_db_get_tls_address): New.
15475
15476 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15479 (linux_resume_one_process): Take a siginfo_t *. Update all
15480 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15481 (struct pending_signals): Add a siginfo_t.
15482 (linux_wait_for_process): Always set last_status.
15483 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15484 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15485 * linux-low.h (struct process_info): Add last_status.
15486
15487 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15488
15489 * remote-utils.c (try_rle): New function.
15490 (putpkt_binary): Use it.
15491
15492 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15495 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15496 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15497 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15498 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15499 point registers.
15500
15501 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15502
15503 * server.c (terminal_fd): New variable.
15504 (old_foreground_pgrp): Likewise.
15505 (restore_old_foreground_pgrp): New function.
15506 (start_inferior): Record the terminal file descriptor in terminal_fd
15507 and its original foreground group in old_foreground_pgrp. Register
15508 restore_old_foreground_pgrp with atexit().
15509
15510 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15511
15512 * server.c (handle_query): Correct qPart to qXfer.
15513
15514 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15515
15516 * configure.ac: Check for more headers which are missing on
15517 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15518 * configure.srv: Add Cygwin and mingw32.
15519 * remote-utils.c: Don't include headers unconditionally which
15520 are missing on mingw32. Include <winsock.h> for mingw32.
15521 (remote_open): Adjust for mingw32 support. Flush
15522 standard error after writing to it.
15523 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15524 (unblock_async_io, enable_async_io, disable_async_io)
15525 (readchar, getpkt): Update for Winsock support.
15526 (prepare_resume_reply): Expect a protocol signal number.
15527 * server.c: Disable <sys/wait.h> on mingw32.
15528 (start_inferior): Adjust for mingw32 support. Flush
15529 standard error after writing to it.
15530 (attach_inferior): Likewise. Use protocol signal
15531 numbers.
15532 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15533 and names.
15534 * win32-i386-low.c: New file.
15535 * Makefile.in (XM_CLIBS): Set.
15536 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15537 (win32-i386-low.o): New dependency rule.
15538 * linux-low.c (linux_wait): Use target signal numbers.
15539 * target.h (struct target_ops): Doc fix.
15540 * server.h (target_signal_to_name): New prototype.
15541 * gdbreplay.c: Don't include headers unconditionally which
15542 are missing on mingw32. Include <winsock.h> for mingw32.
15543 (remote_close, remote_open): Adjust for Winsock support.
15544 * configure, config.in: Regenerated.
15545
15546 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * server.c (decode_xfer_read, write_qxfer_response): New.
15549 (handle_query): Take a packet length argument. Handle
15550 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15551 the qSupported response.
15552 (main): Update call to handle_query.
15553
15554 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15557 (putpkt_binary): Renamed from putpkt and adjusted for binary
15558 data.
15559 (putpkt): New wrapper for putpkt_binary.
15560 (readchar): Don't mask off the high bit.
15561 (decode_X_packet): New function.
15562 * server.c (main): Call putpkt_binary if a handler sets the packet
15563 length. Save the length of the incoming packet. Handle 'X'.
15564 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15565
15566 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15567
15568 * server.c (handle_query): Handle qSupported.
15569
15570 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15571
15572 * remote-utils.c (all_symbols_looked_up): New variable.
15573 (look_up_one_symbol): Check it.
15574 * server.h (look_up_one_symbol): New declaration.
15575 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15576
15577 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * Makefile.in (linux-arm-low.o): Update dependencies.
15580 * linux-arm-low.c: Include "gdb_proc_service.h".
15581 (PTRACE_GET_THREAD_AREA): Define.
15582 (ps_get_thread_area): New function.
15583
15584 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15585
15586 * configure.srv (m68k*-*-uclinux*): New target.
15587 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15588 (linux_resume_one_process): Remove extraneous cast.
15589 (linux_read_offsets): New.
15590 (linux_target_op): Add linux_read_offsets on mmuless systems.
15591 * server.c (handle_query): Add qOffsets logic.
15592 * target.h (struct target_ops): Add read_offsets.
15593
15594 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15597 (PTRACE_GET_THREAD_AREA): Define.
15598 (ps_get_thread_area): New function.
15599 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15600 (linux-x86-64-low.o): Update.
15601
15602 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15603
15604 * configure.ac: Remove checks for prfpregset_t.
15605 * gdb_proc_service.h: New file.
15606 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15607 new "gdb_proc_service.h".
15608 * proc-service.c: Likewise.
15609 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15610 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15611 * Makefile.in (gdb_proc_service_h): Updated.
15612 * configure, config.in: Regenerated.
15613
15614 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15615
15616 * remote-utils.c (prepare_resume_reply): Move declaration
15617 of gdb_id_from_wait to the top of the block.
15618
15619 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * linux-low.c (regsets_store_inferior_registers): Read the regset
15622 from the target before filling it.
15623
15624 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * server.c (attach_inferior): Return SIGTRAP for a successful
15627 attach.
15628
15629 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * Makefile.in (OBS): Add version.o.
15632 (STAGESTUFF): Delete.
15633 (version.o): Add dependencies.
15634 (version.c): Replace rule.
15635 (clean): Remove version.c.
15636 * server.c (gdbserver_version): New.
15637 (gdbserver_usage): Use printf.
15638 (main): Handle --version and --help.
15639 * server.h (version, host_name): Add declarations.
15640
15641 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15642
15643 * linux-arm-low.c:
15644 * linux-arm-low.c:
15645 * inferiors.c:
15646 * i387-fp.h:
15647 * i387-fp.c:
15648 * gdbreplay.c:
15649 * regcache.c:
15650 * proc-service.c:
15651 * mem-break.h:
15652 * mem-break.c:
15653 * linux-x86-64-low.c:
15654 * linux-sh-low.c:
15655 * linux-s390-low.c:
15656 * linux-ppc64-low.c:
15657 * linux-ppc-low.c:
15658 * linux-mips-low.c:
15659 * linux-m68k-low.c:
15660 * linux-m32r-low.c:
15661 * linux-low.h:
15662 * linux-low.c:
15663 * linux-ia64-low.c:
15664 * linux-i386-low.c:
15665 * linux-crisv32-low.c:
15666 * thread-db.c:
15667 * terminal.h:
15668 * target.h:
15669 * target.c:
15670 * server.h:
15671 * server.c:
15672 * remote-utils.c:
15673 * regcache.h:
15674 * utils.c:
15675 * Makefile.in:
15676 * configure.ac:
15677 * gdbserver.1: Add (C) after Copyright. Update the FSF
15678 address.
15679
15680 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15681
15682 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15683 (arm_breakpoint_at): Recognize both breakpoints.
15684 (the_low_target): Use the correct breakpoint instruction.
15685
15686 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15687
15688 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15689 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15690 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15691 (the_low_target): Update.
15692
15693 2005-10-25 Andreas Schwab <schwab@suse.de>
15694
15695 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15696
15697 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15698 (ia64_num_regs): Reduce to 462.
15699
15700 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15701
15702 * acinclude.m4: Correct quoting.
15703 * aclocal.m4: Regenerated.
15704
15705 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15706 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15707 (thread_db_init): Call thread_db_err_str.
15708 * configure.ac: Check for TD_VERSION.
15709 * config.in, configure: Regenerated.
15710
15711 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15712
15713 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15714
15715 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15716
15717 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15718 is not available. Define HAVE_PTRACE_GETREGS if it is.
15719 * config.in, configure: Regenerated.
15720 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15721 * linux-i386-low.c, linux-m68k-low.c: Update to use
15722 HAVE_PTRACE_GETREGS.
15723 * linux-low.c (regsets_fetch_inferior_registers)
15724 (regsets_store_inferior_registers): Only return 0 if we processed
15725 GENERAL_REGS.
15726 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15727 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15728
15729 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15730
15731 * inferiors.c (struct thread_info): Add gdb_id.
15732 (add_thread): Add gdb_id argument.
15733 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15734 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15735 calls to add_thread.
15736 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15737 * server.c (handle_query): Use thread_to_gdb_id.
15738 (handle_v_cont, main): Use gdb_id_to_thread_id.
15739 * server.h (add_thread): Update prototype.
15740 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15741 prototypes.
15742
15743 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15746 left-padded registers.
15747 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15748 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15749
15750 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15751
15752 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15753 * configure: Regenerate.
15754 * config.in: Regenerate.
15755 * server.h (NEED_DECLARATION_STRERROR):
15756 Replace with !HAVE_DECL_STRERROR.
15757
15758 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15759
15760 * linux-low.c (linux_wait, linux_send_signal): Don't test
15761 an unsigned long variable for > 0 if it could be MAX_ULONG.
15762 * server.c (myresume): Likewise.
15763 * target.c (set_desired_inferior): Likewise.
15764
15765 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15766
15767 * configure.ac: Simplify and improve check for socklen_t.
15768 * configure, config.in: Regenerate.
15769
15770 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15771
15772 * acconfig.h: Remove.
15773 * configure.ac: Add a test for socklen_t. Use three-argument
15774 AC_DEFINE throughout.
15775 * config.in: Regenerated using autoheader 2.59.
15776 * configure: Regenerated.
15777
15778 * gdbreplay.c (socklen_t): Provide a default.
15779 (remote_open): Use socklen_t.
15780 * remote-utils.c (socklen_t): Provide a default.
15781 (remote_open): Use socklen_t.
15782 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15783 unsigned char.
15784
15785 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15786 char for buffers.
15787 * linux-low.c (linux_read_memory, linux_write_memory)
15788 (linux_read_auxv): Likewise.
15789 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15790 (check_mem_write): Likewise.
15791 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15792 Likewise.
15793 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15794 (registers_from_string, register_data): Likewise.
15795 * server.c (handle_query, main): Likewise.
15796 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15797 (decode_M_packet): Likewise.
15798 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15799 * target.h (struct target_ops): Update read_memory, write_memory,
15800 and read_auxv.
15801 (read_inferior_memory, write_inferior_memory): Update.
15802 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15803 to unsigned char *.
15804 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15805 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15806 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15807 linux-s390-low.c, linux-sh-low.c: Update for changes in
15808 read_inferior_memory and the_low_target->breakpoint.
15809
15810 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15811
15812 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15813 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15814 * configure.srv: Add powerpc64-*-linux*.
15815 * linux-ppc64-low.c: New file.
15816
15817 2005-05-23 Orjan Friberg <orjanf@axis.com>
15818
15819 * linux-cris-low.c: New file with support for CRIS.
15820 * linux-crisv32-low.c: Ditto for CRISv32.
15821 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15822 (clean): Add reg-cris.c and reg-crisv32.c.
15823 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15824 reg-crisv32.o, and reg-crisv32.c to make rules.
15825 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15826 recognized targets.
15827
15828 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15829
15830 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15831 of sizeof (PTRACE_XFER_TYPE).
15832 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15833
15834 2005-05-12 Orjan Friberg <orjanf@axis.com>
15835
15836 * target.h (struct target_ops): Add insert_watchpoint,
15837 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15838 pointers for hardware watchpoint support.
15839 * linux-low.h (struct linux_target_ops): Ditto.
15840 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15841 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15842 to linux_target_ops.
15843 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15844 reply packet.
15845 * server.c (main): Recognize 'Z' and 'z' packets.
15846
15847 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15848
15849 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15850 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15851 (the_low_target): Add new members.
15852
15853 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15854
15855 * proc-service.c (ps_lgetregs): Search all_processes instead of
15856 all_threads.
15857
15858 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15859
15860 * server.c (start_inferior): Change return type to int.
15861 (attach_inferior): Change sigptr to int *.
15862 (handle_v_cont, handle_v_requests): Change signal to int *.
15863 (main): Change signal to int.
15864
15865 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15866
15867 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15868 * configure.srv: Add m32r*-*-linux*.
15869 * linux-m32r-low.c: New file.
15870
15871 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15874
15875 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15878 Take unsigned long arguments for PIDs.
15879 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15880 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15881 (wait_for_sigstop, linux_resume_one_process)
15882 (regsets_fetch_inferior_registers, linux_send_signal)
15883 (linux_read_auxv): Likewise. Update the types of variables holding
15884 PIDs. Update format string specifiers.
15885 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15886 * remote-utils.c (prepare_resume_reply): Likewise.
15887 * server.c (cont_thread, general_thread, step_thread)
15888 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15889 unsigned long.
15890 (handle_query): Update format specifiers.
15891 (handle_v_cont, main): Use strtoul for thread IDs.
15892 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15893 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15894 (general_thread, step_thread, thread_from_wait)
15895 (old_thread_from_wait): Update.
15896 * target.h (struct thread_resume): Use unsigned long for THREAD.
15897 (struct target_ops): Use unsigned long for arguments to attach and
15898 thread_alive.
15899
15900 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15901
15902 * acinclude.m4: Include bfd/bfd.m4 directly.
15903 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15904 <agriffis@toolchain.org>.
15905 * aclocal.m4, configure: Regenerated.
15906
15907 2005-01-07 Andrew Cagney <cagney@gnu.org>
15908
15909 * configure.ac: Rename configure.in, require autoconf 2.59.
15910 * configure: Re-generate.
15911
15912 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15913
15914 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15915 LIBS when finished.
15916 * aclocal.m4: Regenerated.
15917 * configure: Regenerated.
15918
15919 2004-11-21 Andreas Schwab <schwab@suse.de>
15920
15921 * linux-m68k-low.c (m68k_num_gregs): Define.
15922 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15923 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15924 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15925 (m68k_breakpoint_at): New. Add to the_low_target.
15926
15927 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15928 srv_linux_thread_db to yes.
15929
15930 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15931
15932 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15933 (ARCH_SET_FS): Likewise.
15934 (ARCH_GET_FS): Likewise.
15935 (ARCH_GET_GS): Likewise.
15936
15937 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15938
15939 * linux-i386-low.c (ps_get_thread_area): New.
15940 * linux-x86-64-low.c (ps_get_thread_area): New.
15941 * linux-low.c: Include <sys/syscall.h>.
15942 (linux_kill_one_process): Don't kill the first thread here.
15943 (linux_kill): Kill the first thread here.
15944 (kill_lwp): New function.
15945 (send_sigstop, linux_send_signal): Use it.
15946 * proc-service.c: Clean up #ifdefs.
15947 (fpregset_info): Delete.
15948 (ps_lgetregs): Update and enable implementation.
15949 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15950 implementations.
15951 * remote-utils.c (struct sym_cache, symbol_cache): New.
15952 (input_interrupt): Print a clearer message.
15953 (async_io_enabled): New variable.
15954 (enable_async_io, disable_async_io): Use it. Update comments.
15955 (look_up_one_symbol): Use the symbol cache.
15956 * thread-db.c (thread_db_look_up_symbols): New function.
15957 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15958
15959 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15960
15961 * configure.in: Test for -rdynamic.
15962 * configure: Regenerated.
15963 * Makefile (INTERNAL_LDFLAGS): New.
15964 (gdbserver, gdbreplay): Use it.
15965
15966 2004-09-02 Andrew Cagney <cagney@gnu.org>
15967
15968 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15969
15970 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * linux-low.c (linux_wait): Clear all_processes list also.
15973
15974 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15975
15976 * linux-low.c: Include <errno.h>. Remove extern declaration of
15977 errno.
15978
15979 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15980
15981 * gdbreplay.c, server.h, utils.c: Update copyright years.
15982
15983 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15984
15985 * server.c (main): Print child status or termination signal from
15986 variable 'signal', not 'sig'.
15987
15988 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15989
15990 * linux-low.c (linux_read_memory): Change return type to
15991 int. Check for and return error from ptrace().
15992 * target.c (read_inferior_memory): Change return type to int. Pass
15993 back return status from the_target->read_memory().
15994 * target.h (struct target_ops): Adapt *read_memory() prototype.
15995 Update comment.
15996 (read_inferior_memory): Adapt prototype.
15997 * server.c (main): Return an error packet if
15998 read_inferior_memory() returns an error.
15999
16000 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16001
16002 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16003 Unify with other clean targets.
16004
16005 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * server.c (handle_v_cont): Call set_desired_inferior.
16008
16009 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16010
16011 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16012
16013 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16014
16015 * linux-low.c (linux_wait): Unblock async I/O.
16016 (linux_resume): Block and enable async I/O.
16017 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16018 * server.h (block_async_io, unblock_async_io): Add prototypes.
16019
16020 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16021
16022 * remote-utils.c (remote_open): Print a status notice after
16023 opening a TCP port.
16024 * server.c (attach_inferior): Print a status notice after
16025 attaching.
16026
16027 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16028
16029 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16030
16031 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16032
16033 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16034 error packet.
16035 * server.c, target.h: Update copyright years.
16036
16037 2004-02-25 Roland McGrath <roland@redhat.com>
16038
16039 * target.h (struct target_ops): New member `read_auxv'.
16040 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16041 * linux-low.c (linux_read_auxv): New function.
16042 (linux_target_ops): Initialize `read_auxv' member to that.
16043
16044 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16045
16046 Committed by Jim Blandy <jimb@redhat.com>.
16047
16048 * linux-s390-low.c (s390_num_regs): Update.
16049 (s390_regmap): Remove control registers. Use __s390x__ predefine
16050 instead of GPR_SIZE to distiguish s390 and s390x targets.
16051
16052 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16053
16054 * linux-low.c: Update copyright year.
16055 (check_removed_breakpoint): Clear pending_is_breakpoint.
16056 (linux_set_resume_request, linux_queue_one_thread)
16057 (resume_status_pending_p): New functions.
16058 (linux_continue_one_thread): Use process->resume.
16059 (linux_resume): Only resume threads if there are no pending events.
16060 * linux-low.h (struct process_info): Add resume request
16061 pointer.
16062
16063 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16064
16065 * regcache.c (new_register_cache): Clear the allocated register
16066 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16067
16068 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16069
16070 * linux-low.c (linux_resume): Take a struct thread_resume *
16071 argument.
16072 (linux_wait): Update call.
16073 (resume_ptr): New static variable.
16074 (linux_continue_one_thread): Renamed from
16075 linux_continue_one_process. Use resume_ptr.
16076 (linux_resume): Use linux_continue_one_thread.
16077 * server.c (handle_v_cont, handle_v_requests): New functions.
16078 (myresume): New function.
16079 (main): Handle 'v' case.
16080 * target.h (struct thread_resume): New type.
16081 (struct target_ops): Change argument of "resume" to struct
16082 thread_resume *.
16083 (myresume): Delete macro.
16084
16085 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16086
16087 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16088 (uninstall): Support DESTDIR.
16089
16090 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16091
16092 * configure.srv: Add xscale*linux copy of arm*linux entry.
16093
16094 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16095
16096 * linux-arm-low.c (arm_reinsert_addr): New function.
16097 (the_low_target): Add arm_reinsert_addr.
16098
16099 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16100
16101 * mem-break.c: Remove whitespace at end of file.
16102
16103 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16104
16105 * configure.in: Check whether we need to prototype strerror.
16106 * server.h: Optionally prototype strerror.
16107 * gdbreplay.c (perror_with_name): Use strerror.
16108 * linux-low.c (linux_attach_lwp): Use strerror.
16109 * utils.c (perror_with_name): Use strerror.
16110 * config.in, configure: Regenerated.
16111
16112 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16113
16114 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16115 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16116
16117 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * Makefile.in (SFILES): Update.
16120 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16121 low-sun3.c: Remove files.
16122
16123 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16124
16125 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16126 (linux_detach_one_process, linux_detach): New functions.
16127 (linux_target_ops): Add linux_detach.
16128 * server.c (main): Handle 'D' packet.
16129 * target.h (struct target_ops): Add "detach" member.
16130 (detach_inferior): Define.
16131
16132 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16133
16134 From Kelley Cook <kelleycook@wideopenwest.com>:
16135 * configure.srv: Accept i[34567]86 variants.
16136
16137 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16138
16139 * linux-low.c (linux_wait_for_event): Correct comment typos.
16140 (linux_resume_one_process): Call check_removed_breakpoint.
16141 (linux_send_signal): New function.
16142 (linux_target_ops): Add linux_send_signal.
16143 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16144 of kill.
16145 * target.h (struct target_ops): Add send_signal.
16146
16147 2003-05-29 Jim Blandy <jimb@redhat.com>
16148
16149 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16150 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16151 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16152 away part of the register's value.
16153
16154 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16155
16156 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16157 (linux_wait_for_event, linux_init_signals): Likewise.
16158
16159 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16160
16161 * configure.in: Check for stdlib.h.
16162 * configure: Regenerated.
16163 * config.in: Regenerated.
16164
16165 2003-01-04 Andreas Schwab <schwab@suse.de>
16166
16167 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16168
16169 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16170
16171 * Makefile.in: Remove obsolete code.
16172
16173 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16174
16175 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16176 defined(PT_FPR0_HI).
16177
16178 2002-11-17 Stuart Hughes <seh@zee2.com>
16179
16180 * linux-arm-low.c (arm_num_regs): Increase.
16181 (arm_regmap): Include status register.
16182
16183 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16184
16185 * linux-low.c (register_addr): Remove incorrect -1 check.
16186
16187 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16188
16189 * linux-low.c (linux_create_inferior): Call setpgid. Return
16190 the new PID.
16191 (unstopped_p, linux_signal_pid): Remove.
16192 (linux_target_ops): Remove linux_signal_pid.
16193 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16194 global instead of target method.
16195 * target.h (struct target_ops): Remove signal_pid. Update comment
16196 for create_inferior.
16197 * server.c (signal_pid): New variable.
16198 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16199 gdbserver. Set the child to be the foreground process group.
16200 (attach_inferior): Set signal_pid.
16201
16202 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16203
16204 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16205
16206 2002-08-20 Jim Blandy <jimb@redhat.com>
16207
16208 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16209 default for this.
16210
16211 2002-08-01 Andrew Cagney <cagney@redhat.com>
16212
16213 * Makefile.in: Make chill references obsolete.
16214
16215 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16216
16217 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16218 * configure: Regenerate.
16219 * config.in: Regenerate.
16220
16221 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16222
16223 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16224 (perror_with_name, remote_close, remote_open, expect, play): Static.
16225
16226 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16227
16228 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16229 byte offsets instead of an array of indexes.
16230 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16231
16232 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16233
16234 * regcache.c: Add comment.
16235
16236 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16237
16238 * thread-db.c: New file.
16239 * proc-service.c: New file.
16240 * acinclude.m4: New file.
16241 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16242 proc-service.o, and thread-db.o.
16243 (linux-low.o): Add USE_THREAD_DB.
16244 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16245 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16246 * aclocal.m4: Regenerated.
16247 * config.in: Regenerated.
16248 * configure: Regenerated.
16249 * configure.in: Check for proc_service.h, sys/procfs.h,
16250 thread_db.h, and linux/elf.h headrs.
16251 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16252 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16253 Check for -lthread_db and thread support.
16254 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16255 PowerPC, and SuperH.
16256 * i387-fp.c: Constify arguments.
16257 * i387-fp.h: Likewise.
16258 * inferiors.c: (struct thread_info): Renamed from
16259 `struct inferior_info'. Remove PID member. Use generic inferior
16260 list header. All uses updated.
16261 (inferiors, signal_pid): Removed.
16262 (all_threads): New variable.
16263 (get_thread): Define.
16264 (add_inferior_to_list): New function.
16265 (for_each_inferior): New function.
16266 (change_inferior_id): New function.
16267 (add_inferior): Removed.
16268 (remove_inferior): New function.
16269 (add_thread): New function.
16270 (free_one_thread): New function.
16271 (remove_thread): New function.
16272 (clear_inferiors): Use for_each_inferior and free_one_thread.
16273 (find_inferior): New function.
16274 (find_inferior_id): New function.
16275 (inferior_target_data): Update argument type.
16276 (set_inferior_target_data): Likewise.
16277 (inferior_regcache_data): Likewise.
16278 (set_inferior_regcache_data): Likewise.
16279 * linux-low.c (linux_bp_reinsert): Remove.
16280 (all_processes, stopping_threads, using_thrads)
16281 (struct pending_signals, debug_threads, pid_of): New.
16282 (inferior_pid): Replace with macro.
16283 (struct inferior_linux_data): Remove.
16284 (get_stop_pc, add_process): New functions.
16285 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16286 Use add_process and add_thread.
16287 (linux_attach_lwp): New function, based on old linux_attach. Use
16288 add_process and add_thread. Set stop_expected for new threads.
16289 (linux_attach): New function.
16290 (linux_kill_one_process): New function.
16291 (linux_kill): Kill all LWPs.
16292 (linux_thread_alive): Use find_inferior_id.
16293 (check_removed_breakpoints, status_pending_p): New functions.
16294 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16295 Update. Use WNOHANG. Wait for cloned processes also. Update process
16296 struct for the found process.
16297 (linux_wait_for_event): New function.
16298 (linux_wait): Use it. Support LWPs.
16299 (send_sigstop, wait_for_sigstop, stop_all_processes)
16300 (linux_resume_one_process, linux_continue_one_process): New functions.
16301 (linux_resume): Support LWPs.
16302 (REGISTER_RAW_SIZE): Remove.
16303 (fetch_register): Use register_size instead. Call supply_register.
16304 (usr_store_inferior_registers): Likewise. Call collect_register.
16305 Fix recursive case.
16306 (regsets_fetch_inferior_registers): Improve error message.
16307 (regsets_store_inferior_registers): Add debugging.
16308 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16309 (unstopped_p, linux_signal_pid): New functions.
16310 (linux_target_ops): Add linux_signal_pid.
16311 (linux_init_signals): New function.
16312 (initialize_low): Call it. Initialize using_threads.
16313 * regcache.c (inferior_regcache_data): Add valid
16314 flag.
16315 (get_regcache): Fetch registers lazily. Add fetch argument
16316 and update all callers.
16317 (regcache_invalidate_one, regcache_invalidate): New
16318 functions.
16319 (new_register_cache): Renamed from create_register_cache.
16320 Return the new regcache.
16321 (free_register_cache): Change argument to a void *.
16322 (registers_to_string, registers_from_string): Call get_regcache
16323 with fetch flag set.
16324 (register_data): Make static. Pass fetch flag to get_regcache.
16325 (supply_register): Call get_regcache with fetch flag clear.
16326 (collect_register): Call get_regcache with fetch flag set.
16327 (collect_register_as_string): New function.
16328 * regcache.h: Update.
16329 * remote-utils.c (putpkt): Flush after debug output and use
16330 stderr.
16331 Handle input interrupts while waiting for an ACK.
16332 (input_interrupt): Use signal_pid method.
16333 (getpkt): Flush after debug output and use stderr.
16334 (outreg): Use collect_register_as_string.
16335 (new_thread_notify, dead_thread_notify): New functions.
16336 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16337 and general_thread.
16338 (look_up_one_symbol): Flush after debug output.
16339 * server.c (step_thread, server_waiting): New variables.
16340 (start_inferior): Don't use signal_pid. Update call to mywait.
16341 (attach_inferior): Update call to mywait.
16342 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16343 (main): Don't fetch/store registers explicitly. Use
16344 set_desired_inferior. Support proposed ``Hs'' packet. Update
16345 calls to mywait.
16346 * server.h: Update.
16347 (struct inferior_list, struct_inferior_list_entry): New.
16348 * target.c (set_desired_inferior): New.
16349 (write_inferior_memory): Constify.
16350 (mywait): New function.
16351 * target.h: Update.
16352 (struct target_ops): New signal_pid method.
16353 (mywait): Removed macro, added prototype.
16354
16355 * linux-low.h (regset_func): Removed.
16356 (regset_fill_func, regset_store_func): New.
16357 (enum regset_type): New.
16358 (struct regset_info): Add type field. Use new operation types.
16359 (struct linux_target_ops): stop_pc renamed to get_pc.
16360 Add decr_pc_after_break and breakpoint_at.
16361 (get_process, get_thread_proess, get_process_thread)
16362 (strut process_info, all_processes, linux_attach_lwp)
16363 (thread_db_init): New.
16364
16365 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16366 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16367 (the_low_target): Add new members.
16368 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16369 (i386_store_fpxregset): Constify.
16370 (target_regsets): Add new kind identifier.
16371 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16372 (i386_set_pc): Add debugging.
16373 (i386_breakpoint_at): New function.
16374 (the_low_target): Add new members.
16375 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16376 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16377 (mips_breakpoint_at): New.
16378 (the_low_target): Add new members.
16379 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16380 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16381 (the_low_target): Add new members.
16382 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16383 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16384 (the_low_target): Add new members.
16385 * linux-x86-64-low.c (target_regsets): Add new kind
16386 identifier.
16387
16388 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16389
16390 From Martin Pool <mbp@samba.org>:
16391 * server.c (gdbserver_usage): New function.
16392 (main): Call it.
16393
16394 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16395
16396 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16397 stop_at -> stop_pc.
16398
16399 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16400
16401 * Makefile.in: Remove obsolete code.
16402
16403 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16404
16405 * linux-low.c (regsets_fetch_inferior_registers),
16406 (regsets_store_inferior_registers): Removed cast to int from
16407 ptrace() calls.
16408 * regcache.h: Added declaration of struct inferior_info.
16409
16410 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16411
16412 * inferiors.c (struct inferior_info): Add regcache_data.
16413 (add_inferior): Call create_register_cache.
16414 (clear_inferiors): Call free_register_cache.
16415 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16416 * regcache.c (struct inferior_regcache_data): New.
16417 (registers): Remove.
16418 (get_regcache): New function.
16419 (create_register_cache, free_register_cache): New functions.
16420 (set_register_cache): Don't initialize the register cache here.
16421 (registers_to_string, registers_from_string, register_data): Call
16422 get_regcache.
16423 * regcache.h: Add prototypes.
16424 * server.h: Likewise.
16425
16426 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16427
16428 * mem-break.c: New file.
16429 * mem-break.h: New file.
16430 * Makefile.in: Add mem-break.o rule; update server.h
16431 dependencies.
16432 * inferiors.c (struct inferior_info): Add target_data
16433 member.
16434 (clear_inferiors): Free target_data member if set.
16435 (inferior_target_data, set_inferior_target_data): New functions.
16436 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16437 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16438 * linux-low.c (linux_bp_reinsert): New variable.
16439 (struct inferior_linux_data): New.
16440 (linux_create_inferior): Use set_inferior_target_data.
16441 (linux_attach): Likewise. Call add_inferior.
16442 (linux_wait_for_one_inferior): New function.
16443 (linux_wait): Call it.
16444 (linux_write_memory): Add const.
16445 (initialize_low): Call set_breakpoint_data.
16446 * linux-low.h (struct linux_target_ops): Add breakpoint
16447 handling members.
16448 * server.c (attach_inferior): Remove extra add_inferior
16449 call.
16450 * server.h: Include mem-break.h. Update inferior.c
16451 prototypes.
16452 * target.c (read_inferior_memory)
16453 (write_inferior_memory): New functions.
16454 * target.h (read_inferior_memory)
16455 (write_inferior_memory): Change macros to prototypes.
16456 (struct target_ops): Update comments. Add const to write_memory
16457 definition.
16458
16459 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16460
16461 * linux-low.c (usr_store_inferior_registers): Support
16462 registers which are allowed to fail to store.
16463 * linux-low.h (linux_target_ops): Likewise.
16464 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16465 (ppc_cannot_store_register): FPSCR may not be storable.
16466
16467 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16468
16469 * server.h: Include <string.h> if HAVE_STRING_H.
16470 * ChangeLog: Correct paths in last ChangeLog entry.
16471
16472 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16473
16474 * linux-low.h: Remove obsolete prototypes.
16475 (struct linux_target_ops): New.
16476 (extern the_low_target): New.
16477 * linux-low.c (num_regs, regmap): Remove declarations.
16478 (register_addr): Use the_low_target explicitly.
16479 (fetch_register): Likewise.
16480 (usr_fetch_inferior_registers): Likewise.
16481 (usr_store_inferior_registers): Likewise.
16482 * linux-arm-low.c (num_regs): Remove.
16483 (arm_num_regs): Define.
16484 (arm_regmap): Renamed from regmap, made static.
16485 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16486 made static.
16487 (arm_cannot_store_register): Renamed from cannot_store_register,
16488 made static.
16489 (the_low_target): New.
16490 * linux-i386-low.c (num_regs): Remove.
16491 (i386_num_regs): Define.
16492 (i386_regmap): Renamed from regmap, made static.
16493 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16494 made static.
16495 (i386_cannot_store_register): Renamed from cannot_store_register,
16496 made static.
16497 (the_low_target): New.
16498 * linux-ia64-low.c (num_regs): Remove.
16499 (ia64_num_regs): Define.
16500 (ia64_regmap): Renamed from regmap, made static.
16501 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16502 made static.
16503 (ia64_cannot_store_register): Renamed from cannot_store_register,
16504 made static.
16505 (the_low_target): New.
16506 * linux-m68k-low.c (num_regs): Remove.
16507 (m68k_num_regs): Define.
16508 (m68k_regmap): Renamed from regmap, made static.
16509 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16510 made static.
16511 (m68k_cannot_store_register): Renamed from cannot_store_register,
16512 made static.
16513 (the_low_target): New.
16514 * linux-mips-low.c (num_regs): Remove.
16515 (mips_num_regs): Define.
16516 (mips_regmap): Renamed from regmap, made static.
16517 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16518 made static.
16519 (mips_cannot_store_register): Renamed from cannot_store_register,
16520 made static.
16521 (the_low_target): New.
16522 * linux-ppc-low.c (num_regs): Remove.
16523 (ppc_num_regs): Define.
16524 (ppc_regmap): Renamed from regmap, made static.
16525 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16526 made static.
16527 (ppc_cannot_store_register): Renamed from cannot_store_register,
16528 made static.
16529 (the_low_target): New.
16530 * linux-s390-low.c (num_regs): Remove.
16531 (s390_num_regs): Define.
16532 (s390_regmap): Renamed from regmap, made static.
16533 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16534 made static.
16535 (s390_cannot_store_register): Renamed from cannot_store_register,
16536 made static.
16537 (the_low_target): New.
16538 * linux-sh-low.c (num_regs): Remove.
16539 (sh_num_regs): Define.
16540 (sh_regmap): Renamed from regmap, made static.
16541 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16542 made static.
16543 (sh_cannot_store_register): Renamed from cannot_store_register,
16544 made static.
16545 (the_low_target): New.
16546 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16547 (the_low_target): New.
16548
16549 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16550
16551 * Makefile.in: Add stamp-h target.
16552 * configure.in: Create stamp-h.
16553 * configure: Regenerated.
16554
16555 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16556
16557 * inferiors.c: New file.
16558 * target.c: New file.
16559 * target.h: New file.
16560 * Makefile.in: Add target.o and inferiors.o. Update
16561 dependencies.
16562 * linux-low.c (inferior_pid): New static variable,
16563 moved from server.c.
16564 (linux_create_inferior): Renamed from create_inferior.
16565 Call add_inferior. Return 0 on success instead of a PID.
16566 (linux_attach): Renamed from myattach.
16567 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16568 (linux_thread_alive): Renamed from mythread_alive.
16569 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16570 child dies.
16571 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16572 (regsets_store_inferior_registers): Correct error message.
16573 Add missing ``return 0''.
16574 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16575 (linux_store_registers): Renamed from store_inferior_registers.
16576 (linux_read_memory): Renamed from read_inferior_memory.
16577 (linux_write_memory): Renamed from write_inferior_memory.
16578 (linux_target_ops): New structure.
16579 (initialize_low): Call set_target_ops ().
16580 * remote-utils.c (unhexify): New function.
16581 (hexify): New function.
16582 (input_interrupt): Send signals to ``signal_pid''.
16583 * server.c (inferior_pid): Remove.
16584 (start_inferior): Update create_inferior call.
16585 (attach_inferior): Call add_inferior.
16586 (handle_query): New function.
16587 (main): Call handle_query for `q' packets.
16588 * server.h: Include "target.h". Remove obsolete prototypes.
16589 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16590
16591 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16592
16593 * Makefile.in: Add WARN_CFLAGS. Update configury
16594 dependencies.
16595 * configure.in: Check for <string.h>
16596 * configure: Regenerate.
16597 * config.in: Regenerate.
16598 * gdbreplay.c: Include needed system headers.
16599 (remote_open): Remove strchr prototype.
16600 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16601 * regcache.c (supply_register): Change buf argument to const void *.
16602 (supply_register_by_name): Likewise.
16603 (collect_register): Change buf argument to void *.
16604 (collect_register_by_name): Likewise.
16605 * regcache.h: Add missing prototypes.
16606 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16607 * server.c (handle_query): New function.
16608 (attached): New static variable, moved out of main.
16609 (main): Quiet longjmp clobber warnings.
16610 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16611 * utils.c (error): Remove NORETURN.
16612 (fatal): Likewise.
This page took 0.356584 seconds and 3 git commands to generate.