Make gdbreplay use more common routines
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-06-08 Pedro Alves <palves@redhat.com>
2
3 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4 common/common-exceptions.o, common/common-utils.o,
5 common/errors.o, common/print-utils.o and utils.o.
6 * gdbreplay.c: Include "common-defs.h" instead of the two
7 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
8 string.h or alloca.h.
9 (perror_with_name): Delete.
10 (remote_open): Use xstrdup instead of strdup.
11 (main): Rename to ...
12 (captured_main): ... this.
13 (main): New.
14
15 2018-06-08 Tom Tromey <tom@tromey.com>
16
17 * linux-low.c (linux_low_read_btrace): Update.
18
19 2018-06-04 Stan Cox <scox@redhat.com>
20
21 * server.h (struct client_state): New.
22 * server.c (cont_thread, general_thread, multi_process)
23 (report_fork_events, report_vfork_events, report_exec_events)
24 (report_thread_events, swbreak_feature, hwbreak_feature)
25 (vCont_supported, disable_randomization, pass_signals)
26 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
27 Moved to client_state.
28 * remote-utils.c (remote_debug, noack_mode)
29 (transport_is_reliable): Moved to client_state.
30 * tracepoint.c (current_traceframe): Moved to client_state.
31
32 Update all callers.
33 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
34 linux-low.c, remote-utils.h, target.c: Use client_state.
35
36 2018-05-31 Alan Hayward <alan.hayward@arm.com>
37
38 * configure.srv: Add new c/h file.
39
40 2018-05-31 Alan Hayward <alan.hayward@arm.com>
41
42 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
43 null VQ.
44
45 2018-05-25 Maciej W. Rozycki <macro@mips.com>
46
47 * gdb.arch/mips-fpregset-core.exp: New test.
48 * gdb.arch/mips-fpregset-core.c: New test source.
49
50 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
51
52 PR server/23198
53 * hostio.c (require_int): Do not report overflow for integers
54 between 0xfffffff and 0x7fffffff.
55
56 2018-05-22 Maciej W. Rozycki <macro@mips.com>
57
58 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
59 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
60 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
61 functions.
62 (the_low_target): Wire them.
63
64 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
65
66 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
67 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
68 mode. Call collect_register_by_name with vscr using
69 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
70 (ppc_store_vrregset): Add and set vscr_offset variable as in
71 ppc_fill_vrregset. Call supply_register_by_name with vscr using
72 vscr_offset.
73
74 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
75
76 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
77 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
78 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
79
80 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
81
82 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
83 (ppc_store_vsxregset): Likewise.
84 (ppc_fill_vrregset): Likewise.
85 (ppc_store_vrregset): Likewise.
86 (ppc_fill_evrregset): Likewise.
87 (ppc_store_evrregset): Likewise.
88 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
89 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
90 needed.
91
92 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
93
94 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
95 wordsize of the inferior. Call ppc_linux_target_wordsize.
96
97 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
98
99 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
100 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
101 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
102 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
103 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
104 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
105 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
106 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
107 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
108 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
109 (tdesc_powerpc_e500l): Remove.
110 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
111 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
112 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
113 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
114 linux-ppc-tdesc.h.
115 (ppc_arch_setup): Remove target description matching code. Fill a
116 ppc_linux_features struct and call ppc_linux_match_description
117 with it.
118
119 2018-05-22 Maciej W. Rozycki <macro@mips.com>
120
121 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
122 width of the requested register exceeds the width of the
123 `ptrace' data type.
124 (mips_cannot_store_register): Likewise.
125
126 2018-05-21 Maciej W. Rozycki <macro@mips.com>
127
128 * linux-mips-low.c (mips_fetch_register): New function. Update
129 preceding comment.
130 (mips_store_gregset): Supply 0 rather than $restart for $zero.
131 (the_low_target): Wire `mips_fetch_register'.
132
133 2018-05-10 Joel Brobecker <brobecker@adacore.com>
134
135 * lynx-i386-low.c (LYNXOS_178): New macro.
136 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
137 the layout on LynxOS-178.
138 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
139 handle floating point registers that are not supported by
140 LynxOS-178.
141
142 2018-05-10 Tom Tromey <tom@tromey.com>
143
144 * configure: Rebuild.
145
146 2018-05-10 Joel Brobecker <brobecker@adacore.com>
147
148 PR server/23158:
149 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
150 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
151 Use it to set the expedite_regs field in the given tdesc.
152 * x86-tdesc.h: New file.
153 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
154 Adjust following the addition of the new expedite_regs parameter
155 to init_target_desc.
156 * linux-tic6x-low.c (tic6x_read_description): Likewise.
157 * linux-x86-tdesc.c: #include "x86-tdesc.h".
158 (i386_linux_read_description, amd64_linux_read_description):
159 Adjust following the addition of the new expedite_regs parameter
160 to init_target_desc.
161 * lynx-i386-low.c: #include "x86-tdesc.h".
162 (lynx_i386_arch_setup): Adjust following the addition of the new
163 expedite_regs parameter to init_target_desc.
164 * nto-x86-low.c: #include "x86-tdesc.h".
165 (nto_x86_arch_setup): Adjust following the addition of the new
166 expedite_regs parameter to init_target_desc.
167 * win32-i386-low.c: #include "x86-tdesc.h".
168 (i386_arch_setup): Adjust following the addition of the new
169 expedite_regs parameter to init_target_desc.
170
171 2018-05-10 Joel Brobecker <brobecker@adacore.com>
172
173 PR server/23158:
174 * win32-low.c (win32_create_inferior): Add call to my_wait
175 setting last_status global.
176
177 2018-05-10 Joel Brobecker <brobecker@adacore.com>
178
179 PR server/23158:
180 * win32-low.c (create_process): Only call gdb_tilde_expand if
181 inferior_cwd is not NULL.
182
183 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
184
185 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
186 registers to the cache if their values have changed.
187 (i387_xsave_to_cache): Provide default values for x87 control
188 registers when these features are available, but disabled.
189 * regcache.c (supply_register_by_name_zeroed): New function.
190 * regcache.h (supply_register_by_name_zeroed): Declare new
191 function.
192
193 2018-05-07 Tom Tromey <tom@tromey.com>
194
195 * configure: Rebuild.
196
197 2018-05-04 Tom Tromey <tom@tromey.com>
198
199 * configure: Rebuild.
200
201 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
202 Pedro Alves <palves@redhat.com>
203
204 * linux-aarch64-low.c (aarch64_stopped_data_address):
205 Likewise.
206
207 2018-04-27 Tom Tromey <tom@tromey.com>
208
209 * configure: Rebuild.
210
211 2018-04-23 Tom Tromey <tom@tromey.com>
212
213 * configure: Rebuild.
214
215 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
216
217 * Makefile.in (depcomp): Add "..".
218 (all_deps_files): New and use it.
219
220 2018-04-18 Alan Hayward <alan.hayward@arm.com>
221
222 * configure.srv (aarch64*-*-linux*): Don't include xml.
223 (i[34567]86-*-cygwin*): Likewise.
224 (i[34567]86-*-linux*): Likewise.
225 (i[34567]86-*-lynxos*): Likewise.
226 (i[34567]86-*-mingw32ce*): Likewise.
227 (i[34567]86-*-mingw*): Likewise.
228 (i[34567]86-*-nto*): Likewise.
229 (tic6x-*-uclinux): Likewise.
230 (x86_64-*-linux*): Likewise.
231 (x86_64-*-mingw*): Likewise.
232 (x86_64-*-cygwin*): Likewise.
233
234 2018-04-18 Alan Hayward <alan.hayward@arm.com>
235
236 * tdesc.c: Remove xml parameter.
237
238 2018-04-18 Alan Hayward <alan.hayward@arm.com>
239
240 * server.c (get_features_xml): Remove cast.
241 * tdesc.c (void target_desc::accept): Fill in function.
242 (tdesc_get_features_xml): Remove old xml creation.
243 (print_xml_feature::visit_pre): Add xml vistor.
244 * tdesc.h (struct target_desc): Make xmltarget mutable.
245 (tdesc_get_features_xml): Remove declaration.
246
247 2018-04-18 Alan Hayward <alan.hayward@arm.com>
248
249 * tdesc.c (tdesc_architecture_name): Add new function.
250 (tdesc_osabi_name): Likewise.
251 (tdesc_get_features_xml): Use new functions.
252
253 2018-04-18 Alan Hayward <alan.hayward@arm.com>
254
255 * tdesc.c (tdesc_create_flags): Remove.
256 (tdesc_add_flag): Likewise.
257 (tdesc_named_type): Likewise.
258 (tdesc_create_union): Likewise.
259 (tdesc_create_struct): Likewise.
260 (tdesc_create_vector): Likewise.
261 (tdesc_add_bitfield): Likewise.
262 (tdesc_add_field): Likewise.
263 (tdesc_set_struct_size): Likewise.
264
265 2018-04-18 Alan Hayward <alan.hayward@arm.com>
266
267 * tdesc.c (~target_desc): Remove implictly deleted items.
268 (init_target_desc): Iterate all features.
269 (tdesc_get_features_xml): Use vector.
270 (tdesc_create_feature): Create feature.
271 * tdesc.h (tdesc_feature) Remove
272 (target_desc): Add features.
273
274 2018-04-18 Alan Hayward <alan.hayward@arm.com>
275
276 * Makefile.in: Add common/tdesc.c
277 * tdesc.c (init_target_desc): init all reg_defs from register
278 vector.
279 (tdesc_create_reg): Create tdesc_reg.
280 * tdesc.h (tdesc_feature): Add register vector.
281
282 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
283
284 * tdesc.h (struct target_desc) <features>: Change type to
285 std::vector<std::string>.
286 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
287 changes.
288 (tdesc_get_features_xml): Likewise.
289 (tdesc_create_feature): Likewise.
290
291 2018-03-26 Alan Hayward <alan.hayward@arm.com>
292
293 * regcache.c (find_register_by_number): Return a ref.
294 (find_regno): Use references.
295 (register_size): Likewise.
296 (register_data): Likewise.
297 * tdesc.c (target_desc::~target_desc): Remove free calls.
298 (target_desc::operator==): Use std::vector compare.
299 (init_target_desc): Use reference.
300 (tdesc_create_reg): Use reg constructors.
301 * tdesc.h (struct target_desc): Replace pointer with object.
302
303 2018-03-23 Alan Hayward <alan.hayward@arm.com>
304
305 * regcache.c (find_register_by_number): Make static.
306 (find_regno): Use find_register_by_number
307 * regcache.h (struct reg): Remove declaration.
308
309 2018-03-23 Alan Hayward <alan.hayward@arm.com>
310
311 * tdesc.c (target_desc::~target_desc): Move to here.
312 (target_desc::operator==): Likewise.
313 * tdesc.h (target_desc::~target_desc): Move from here.
314 (target_desc::operator==): Likewise.
315
316 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
317
318 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
319
320 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
321
322 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
323 S390_TDESC_GS.
324 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
325 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
326 and init_registers_s390_gs_linux64.
327
328 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
329
330 * linux-s390-low.c (s390_fill_gs): Remove function.
331 (s390_fill_gsbc): Remove function.
332 (s390_regsets): Set fill functions for the guarded storage regsets
333 to NULL.
334
335 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
336
337 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
338 the word size. Add comment.
339 (s390_get_wordsize): New function.
340 (s390_arch_setup): No longer select a temporary tdesc to fetch the
341 pswm with it. Instead, use s390_get_wordsize to determine the
342 word size first and derive the correct tdesc from that directly.
343
344 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * Makefile.in: Include silent-rules.mk.
347 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
348 (COMPILE): Add ECHO_CXX.
349 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
350 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
351 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
352 (version-generated.c): Add ECHO_GEN.
353 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
354 (IPAGENT_COMPILE): Add ECHO_CXX.
355 (%-generated.c): Add ECHO_REGDAT.
356
357 2018-03-14 Tom Tromey <tom@tromey.com>
358
359 PR cli/14977:
360 * ax.c (ax_printf): Special case for NULL.
361
362 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
363
364 * linux-low.c (linux_qxfer_libraries_svr4): Use
365 xml_escape_text_append.
366
367 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
370
371 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * server.c (handle_general_set): Remove unnecessary xstrdup.
374
375 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * server.c (parse_debug_format_options): Adjust to
378 delim_string_to_char_ptr_vec changes.
379 * thread-db.c (thread_db_load_search): Adjust to
380 dirnames_to_char_ptr_vec changes.
381
382 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
383
384 * target.h (target_enable_btrace, target_disable_btrace)
385 (target_read_btrace, target_read_btrace_conf): Turn macro into
386 inline function. Throw error if target method is not defined.
387 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
388 check for btrace target method. Be prepared to handle exceptions
389 from btrace target methods.
390
391 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * server.c (captured_main): Change order of error message printed
394 when the current working directory cannot be found.
395
396 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
397
398 * server.c: Include "filenames.h" and "pathstuff.h".
399 (program_name): Delete variable.
400 (program_path): New anonymous class.
401 (get_exec_wrapper): Use "program_path" instead of
402 "program_name".
403 (handle_v_run): Likewise.
404 (captured_main): Likewise.
405 (process_serial_event): Likewise.
406
407 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
408
409 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
410 (OBJS): Add "pathstuff.o".
411 * server.c (current_directory): New global variable.
412 (captured_main): Initialize "current_directory".
413
414 2018-02-26 Alan Hayward <alan.hayward@arm.com>
415
416 * tdesc.c: Use common/tdesc.h.
417 * tdesc.h: Likewise.
418
419 2018-02-20 Alan Hayward <alan.hayward@arm.com>
420 Simon Marchi <simon.marchi@ericsson.com>
421
422 * Makefile.in: Switch order of make rules.
423
424 2018-02-19 Alan Hayward <alan.hayward@arm.com>
425
426 * Makefile.in: Add common directory in build.
427 * configure.ac: Add common reference.
428 * configure: Regenerate.
429
430 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
431
432 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
433 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
434 * spu-low.c (spu_target_ops): Likewise.
435 * win32-low.c (win32_target_ops): Likewise.
436 * server.c (supported_btrace_packets): Report packets unconditionally.
437 * target.h (target_ops) <supports_btrace>: Remove.
438 (target_supports_btrace): Remove.
439
440 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
441
442 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
443 (handle_btrace_disable): Change return type to void. Use exceptions
444 to report errors.
445 (handle_btrace_general_set): Catch exception and copy message to
446 return message.
447
448 2018-02-08 Tom Tromey <tom@tromey.com>
449
450 * linux-low.c (install_software_single_step_breakpoints): Use
451 make_scoped_restore.
452 * inferiors.c (make_cleanup_restore_current_thread): Remove.
453 (do_restore_current_thread_cleanup): Remove.
454 * gdbthread.h (make_cleanup_restore_current_thread): Don't
455 declare.
456
457 2018-02-08 Tom Tromey <tom@tromey.com>
458
459 * mem-break.c (set_raw_breakpoint_at): Use
460 gdb::unique_xmalloc_ptr.
461
462 2018-01-30 Pedro Alves <palves@redhat.com>
463
464 PR gdb/13211
465 * target.c (target_terminal::terminal_state): Rename to ...
466 (target_terminal::m_terminal_state): ... this.
467
468 2018-01-19 James Clarke <jrtc27@jrtc27.com>
469
470 * linux-low.c (handle_extended_wait): Surround call to
471 thread_db_notice_clone with #ifdef USE_THREAD_DB.
472
473 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
474
475 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
476 linux_ptrace_attach_fail_reason_string now returning an
477 std::string.
478 (linux_attach): Likewise.
479 * thread-db.c (attach_thread): Likewise.
480
481 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
482
483 PR gdb/21559
484 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
485 checking for fs_base/gs_base fields in struct user_regs_struct.
486 * configure: Regenerate.
487
488 2018-01-16 Yao Qi <yao.qi@linaro.org>
489
490 PR gdb/18749
491 * linux-low.c (fetch_register): Call supply_register instead of
492 error.
493
494 2018-01-08 Yao Qi <yao.qi@linaro.org>
495 Simon Marchi <simon.marchi@ericsson.com>
496
497 * Makefile.in (OBS): Remove selftest.o.
498 * configure.ac: Set srv_selftest_objs if $development is true.
499 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
500 * configure: Re-generated.
501 * server.c (captured_main): Wrap variable selftest_filter with
502 GDB_SELF_TEST.
503
504 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
505
506 * server.c (parse_debug_format_options): Return std::string.
507 (handle_monitor_command, captured_main): Adjust.
508
509 2018-01-05 Pedro Alves <palves@redhat.com>
510
511 PR gdb/18653
512 * server.c (captured_main): Pass quiet=false to
513 save_original_signals_state.
514
515 2018-01-01 Joel Brobecker <brobecker@adacore.com>
516
517 * gdbreplay.c (gdbreplay_version): Update copyright year in
518 version message.
519 * server.c (gdbserver_version): Likewise.
520
521 2017-12-08 Tom Tromey <tom@tromey.com>
522
523 * ax.c (ax_printf): Update.
524
525 2017-12-07 Yao Qi <yao.qi@linaro.org>
526
527 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
528 aarch64_linux_read_description.
529 * linux-amd64-ipa.c (idx2mask): New array.
530 (get_ipa_tdesc): Move idx2mask out.
531 (initialize_low_tracepoint): Initialize target descriptions.
532 * linux-i386-ipa.c (idx2mask): New array.
533 (get_ipa_tdesc): Move idx2mask out.
534 (initialize_low_tracepoint): Initialize target descriptions.
535
536 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
537
538 * tdesc.c (struct tdesc_type): Change return type.
539 (tdesc_add_flag): Change parameter type.
540 (tdesc_add_bitfield): Likewise.
541 (tdesc_add_field): Likewise.
542 (tdesc_set_struct_size): Likewise.
543
544 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
545
546 * regcache.c (registers_to_string): Remove unused variable.
547
548 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
549
550 * inferiors.c (for_each_inferior_with_data): Remove.
551 * inferiors.h (for_each_inferior_with_data): Remove.
552 * server.c (handle_qxfer_threads_worker): Change parameter type.
553 (handle_qxfer_threads_proper): Use for_each_thread.
554
555 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
556
557 * inferiors.c (for_each_inferior): Remove.
558 (clear_inferiors): Use for_each_thread.
559 * inferiors.h (for_each_inferior): Remove.
560 * linux-low.c (linux_wait_for_event_filtered): Use
561 for_each_thread.
562 (linux_stabilize_threads): Likewise.
563 * regcache.c (regcache_release): Likewise.
564 * server.c (gdb_wants_all_threads_stopped): Likewise.
565 (clear_pending_status_callback): Remove.
566 (handle_status): Use for_each_thread.
567 (captured_main): Likewise.
568 * win32-low.c (child_init_thread_list): Likewise.
569 (win32_clear_inferiors): Likewise.
570 (fake_breakpoint_event): Likewise.
571
572 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * inferiors.h (find_inferior): Remove.
575 * inferiors.c (find_inferior): Remove.
576
577 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
578
579 * linux-low.c (resume_status_pending_p): Update comment.
580 (need_step_over_p): Update comment.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-low.c (proceed_one_lwp): Return void, change parameter
585 type.
586 (unsuspend_and_proceed_one_lwp): Likewise.
587 (proceed_all_lwps): Use for_each_thread.
588 (unstop_all_lwps): Likewise.
589
590 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
591
592 * linux-low.c (linux_resume_one_thread): Return void, take
593 parameter directly.
594 (linux_resume): Use for_each_thread.
595
596 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
597
598 * linux-low.c (send_sigstop_callback): Return void, change
599 parameter type. Rename to...
600 (send_sigstop): ... this.
601 (suspend_and_send_sigstop_callback): Return void, change parameter
602 type. Rename to...
603 (suspend_and_send_sigstop): ... this.
604 (stop_all_lwps): Use for_each_thread.
605
606 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * linux-low.c (lwp_running): Return bool, remove unused
609 argument.
610 (linux_stabilize_threads): Use find_thread.
611
612 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * linux-low.c (select_singlestep_lwp_callback): Remove.
615 (count_events_callback): Remove.
616 (select_event_lwp_callback): Remove.
617 (select_event_lwp): Use find_thread/for_each_thread.
618
619 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
620
621 * linux-low.c (not_stopped_callback): Return bool, take filter
622 argument directly.
623 (linux_wait_for_event_filtered): Use find_thread.
624 (linux_wait_1): Likewise.
625
626 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
627
628 * linux-low.c (same_lwp): Remove.
629 (find_lwp_pid): Use find_thread.
630
631 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
632
633 * linux-low.c (delete_lwp_callback): Remove.
634 (linux_mourn): Use for_each_thread.
635
636 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
637
638 * linux-low.c (linux_detach_lwp_callback): Return void, remove
639 args parameter, don't check for pid.
640 (linux_detach): Use for_each_thread.
641
642 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
643
644 * linux-low.c (struct counter): Remove.
645 (second_thread_of_pid_p): Remove.
646 (last_thread_of_process_p): Use find_thread.
647
648 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
649
650 * inferiors.c (find_inferior_in_random): Remove.
651 * inferiors.h (find_inferior_in_random): Remove.
652 * linux-low.c (status_pending_p_callback): Return bool, accept
653 parameter ptid directly.
654 (linux_wait_for_event_filtered): Use find_thread_in_random.
655 (linux_wait_1): Likewise.
656
657 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
658
659 * inferiors.c (find_inferior_id): Remove.
660 (find_thread_ptid): Move implemention from find_inferior_id to
661 here.
662 * inferiors.h (find_inferior_id): Remove.
663 * server.c (handle_status): Use find_thread_ptid.
664 (process_serial_event): Likewise.
665 * thread-db.c (find_one_thread): Likewise.
666 (thread_db_thread_handle): Likewise.
667 * win32-low.c (thread_rec): Likewise.
668 (child_delete_thread): Likewise.
669 (win32_thread_alive): Likewise.
670 (get_child_debug_event): Likewise.
671
672 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
673
674 * linux-mips-low.c (update_watch_registers_callback): Return
675 void, remove pid_p parameter, don't check for pid.
676 (mips_insert_point, mips_remove_point): Use for_each_thread.
677
678 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
679
680 * lynx.low (lynx_delete_thread_callback): Remove.
681 (lynx_mourn): Use for_each_thread.
682
683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * regcache.c (regcache_invalidate_one): Remove.
686 (regcache_invalidate_pid): use for_each_thread.
687
688 2017-11-26 Tom Tromey <tom@tromey.com>
689
690 * linux-low.c (linux_create_inferior): Update.
691
692 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
693
694 * spu-low.c (spu_create_inferior): Fix typo in argument name.
695
696 2017-11-24 Alan Hayward <alan.hayward@arm.com>
697
698 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
699 * linux-aarch64-low.c (initialize_low_arch): Call init func.
700 * linux-aarch64-tdesc-selftest.c: New file.
701 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
702
703 2017-11-24 Alan Hayward <alan.hayward@arm.com>
704
705 * configure.srv: Add new file.
706 * linux-aarch64-low.c (initialize_low_arch): Call init func.
707 * linux-aarch64-tdesc-selftest.c: New file.
708 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
709
710 2017-11-24 Alan Hayward <alan.hayward@arm.com>
711
712 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
713 * linux-aarch64-low.c (initialize_low_arch): Remove init.
714 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
715
716 2017-11-24 Alan Hayward <alan.hayward@arm.com>
717
718 * configure.srv: Add new files.
719 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
720 aarch64_linux_read_description.
721 * linux-aarch64-low.c (aarch64_linux_read_description):
722 Merge with aarch64_arch_setup.
723 (aarch64_arch_setup): Call aarch64_linux_read_description.
724 * linux-aarch64-tdesc.c: New file.
725 * linux-aarch64-tdesc.h: New file.
726
727 2017-11-24 Yao Qi <yao.qi@linaro.org>
728
729 * configure.srv: Set $srv_regobj for tic6x-linux.
730 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
731 (tic6x_read_description): Move some code to tic6x_arch_setup.
732 (tic6x_tdesc_test): New function.
733 (initialize_low_arch): Call selftests::register_test.
734
735 2017-11-22 Yao Qi <yao.qi@linaro.org>
736
737 * remote-utils.c (prepare_resume_reply): Use memcpy.
738
739 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
740
741 * linux-low.c (kill_one_lwp_callback): Return void, take
742 argument directly, don't filter on pid.
743 (linux_kill): Use for_each_thread.
744
745 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
746
747 * linux-low.c (need_step_over_p): Return bool, remove dummy
748 argument.
749 (linux_resume, proceed_all_lwps): Use find_thread.
750
751 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
752
753 * linux-low.c (resume_status_pending_p): Return bool, remove
754 flag_p argument.
755 (linux_resume): Use find_thread.
756
757 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
758
759 * linux-low.c (struct thread_resume_array): Remove.
760 (linux_set_resume_request): Return void, take arguments
761 directly.
762 (linux_resume): Use for_each_thread.
763
764 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
765
766 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
767 return bool, remove data argument.
768 (linux_stabilize_threads): Use find_thread.
769
770 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
771
772 * linux-low.c (unsuspend_one_lwp): Remove.
773 (unsuspend_all_lwps): Use for_each_thread, inline code from
774 unsuspend_one_lwp.
775
776 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
777
778 * gdbthread.h (find_thread): Add overload with ptid_t filter.
779 * linux-low.c (struct iterate_over_lwps_args): Remove.
780 (iterate_over_lwps_filter): Remove.
781 (iterate_over_lwps): Use find_thread.
782
783 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
784
785 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
786 (linux_handle_new_gdb_connection): Use for_each_thread, inline
787 code from reset_lwp_ptrace_options_callback.
788
789 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
790
791 * linux-arm-low.c (struct update_registers_data): Remove.
792 (update_registers_callback): Return void, take arguments
793 directly, don't check thread's pid.
794 (arm_insert_point, arm_remove_point): Use for_each_thread.
795
796 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
797
798 * win32-low.c (continue_one_thread): Return void, take argument
799 directly.
800 (child_continue): Use for_each_thread.
801
802 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
803
804 * win32-i386-low.c (update_debug_registers_callback): Rename
805 to ...
806 (update_debug_registers): ... this, return void, remove pid_p arg.
807 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
808
809 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * inferiors.h (struct process_info): Add constructor, initialize
812 fields..
813 <syscalls_to_catch>: Change type to std::vector<int>.
814 * inferiors.c (add_process): Allocate process_info with new.
815 (remove_process): Free process_info with delete.
816 * linux-low.c (handle_extended_wait): Adjust.
817 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
818 * server.c (handle_general_set): Adjust.
819
820 2017-11-16 Pedro Alves <palves@redhat.com>
821
822 * remote-utils.c (remote_close): Block SIGIO signals instead of
823 uninstalling the SIGIO handler.
824
825 2017-11-16 Alan Hayward <alan.hayward@arm.com>
826
827 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
828
829 2017-11-16 Yao Qi <yao.qi@linaro.org>
830
831 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
832 (tic6x_store_gregset): Likewise.
833 (tic6x_usrregs_info): Move it up.
834
835 2017-11-15 Alan Hayward <alan.hayward@arm.com>
836
837 * Makefile.in: Update arch rules.
838 * configure.srv: Explicitly mark arch/ files.
839
840 2017-11-13 Andreas Schwab <schwab@suse.de>
841
842 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
843 function.
844 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
845
846 2017-11-06 Pedro Alves <palves@redhat.com>
847
848 * config.in, configure: Regenerate.
849
850 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
851
852 * target.c (struct thread_search): Remove.
853 (thread_search_callback): Remove.
854 (prepare_to_access_memory): Use for_each_thread instead of
855 find_inferior. Inline code from thread_search_callback.
856
857 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
858
859 * server.c (struct visit_actioned_threads_data): Remove.
860 (visit_actioned_threads): Change prototype to take arguments
861 directly.
862 (resume): Use find_thread instead of find_inferior.
863
864 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
865
866 * server.c (queue_stop_reply_callback): Change prototype, return
867 void.
868 (find_status_pending_thread_callback): Remove.
869 (handle_status): Replace find_inferior with find_thread and
870 for_each_thread.
871
872 2017-10-25 Alan Hayward <alan.hayward@arm.com>
873
874 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
875 with REGNO.
876 (aarch64_store_gregset): Likewise.
877 (aarch64_fill_fpregset): Likewise.
878 (aarch64_store_fpregset): Likewise.
879
880 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
881
882 * gdbthread.h (find_thread, for_each_thread): New functions.
883 * inferiors.c (thread_of_pid): Remove.
884 (find_any_thread_of_pid): Use find_thread.
885 * linux-low.c (num_lwps): Use for_each_thread.
886
887 2017-10-17 Yao Qi <yao.qi@linaro.org>
888
889 * Makefile.in: Remove one rule.
890 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
891
892 2017-10-17 Yao Qi <yao.qi@linaro.org>
893
894 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
895 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
896
897 2017-10-17 Yao Qi <yao.qi@linaro.org>
898
899 * configure.srv: Rename arm.o with arch/arm.o.
900
901 2017-10-17 Yao Qi <yao.qi@linaro.org>
902
903 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
904 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
905 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
906 (arch-i386.o, arch-amd64.o): Remove rules.
907 (arch/%.o): New rule.
908 Update POSTCOMPILE and COMPILE.pre.
909 * configure.ac: Invoke AC_CONFIG_COMMANDS.
910 * configure: Re-generated.
911 * configure.srv: Replace arch-i386.o with arch/i386.o.
912 Replace arch-amd64.o with arch/amd64.o.
913
914 2017-10-16 Yao Qi <yao.qi@linaro.org>
915
916 * configure: Regenerated.
917
918 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
919
920 * inferiors.h: (struct inferior_list): Remove.
921 (struct inferior_list_entry); Remove.
922 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
923 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
924 get_first_inferior): Remove.
925 (for_each_inferior, for_each_inferior_with_data, find_inferior,
926 find_inferior_id, find_inferior_in_random): Change signature.
927 * inferiors.c (all_threads): Change type to
928 std::list<thread_info *>.
929 (get_thread): Remove macro.
930 (find_inferior, find_inferior_id): Change signature, implement
931 using find_thread.
932 (find_inferior_in_random): Change signature, implement using
933 find_thread_in_random.
934 (for_each_inferior, for_each_inferior_with_data): Change
935 signature, implement using for_each_thread.
936 (add_inferior_to_list, remove_inferior): Remove.
937 (add_thread, get_first_thread, thread_of_pid,
938 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
939 (get_first_inferior, one_inferior_p, clear_inferior_list):
940 Remove.
941 (clear_inferiors, get_thread_process): Update.
942 * gdbthread.h: Include <list>.
943 (struct thread_info) <entry>: Remove field.
944 <id>: New field.
945 (all_threads): Change type to std::list<thread_info *>.
946 (get_first_inferior): Add doc.
947 (find_thread, for_each_thread, find_thread_in_random): New
948 functions.
949 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
950 * linux-arm-low.c (update_registers_callback): Update.
951 * linux-low.c (second_thread_of_pid_p): Update.
952 (kill_one_lwp_callback, linux_detach_lwp_callback,
953 delete_lwp_callback, status_pending_p_callback, same_lwp,
954 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
955 iterate_over_lwps, not_stopped_callback,
956 resume_stopped_resumed_lwps, count_events_callback,
957 select_singlestep_lwp_callback, select_event_lwp_callback,
958 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
959 suspend_and_send_sigstop_callback, wait_for_sigstop,
960 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
961 lwp_running, linux_set_resume_request, resume_status_pending_p,
962 need_step_over_p, start_step_over, linux_resume_one_thread,
963 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
964 reset_lwp_ptrace_options_callback): Update.
965 * linux-mips-low.c (update_watch_registers_callback): Update.
966 * regcache.c (regcache_invalidate_one, regcache_invalidate):
967 Update.
968 (free_register_cache_thread_one): Remove.
969 (regcache_release): Update.
970 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
971 handle_qxfer_threads_worker): Update.
972 (handle_query): Update, use list iterator.
973 (visit_actioned_threads, handle_pending_status,
974 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
975 clear_pending_status_callback, set_pending_status_callback,
976 find_status_pending_thread_callback, handle_status,
977 process_serial_event): Update.
978 * target.c (thread_search_callback): Update.
979 * thread-db.c (thread_db_get_tls_address): Update.
980 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
981 Update.
982 * win32-i386-low.c (update_debug_registers_callback): Update.
983 * win32-low.c (delete_thread_info, child_delete_thread,
984 continue_one_thread, suspend_one_thread,
985 get_child_debug_event): Adjust.
986
987 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
988
989 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
990 * inferiors.h: Include <list>.
991 (struct process_info) <entry>: Remove field.
992 <pid>: New field.
993 (pid_of): Change macro to function.
994 (ptid_of, lwpid_of): Remove macro.
995 (all_processes): Change type to std::list<process_info *>.
996 (ALL_PROCESSES): Remove macro.
997 (for_each_process, find_process): New function.
998 * inferiors.c (all_processes): Change type to
999 std::list<process_info *>.
1000 (find_thread_process): Adjust.
1001 (add_process): Likewise.
1002 (remove_process): Likewise.
1003 (find_process_pid): Likewise.
1004 (get_first_process): Likewise.
1005 (started_inferior_callback): Remove.
1006 (have_started_inferiors_p): Adjust.
1007 (attached_inferior_callback): Remove.
1008 (have_attached_inferiors_p): Adjust.
1009 * linux-low.c (check_zombie_leaders): Likewise.
1010 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1011 (x86_linux_update_xmltarget): Adjust.
1012 * server.c (handle_query): Likewise.
1013 (gdb_reattached_process): Remove.
1014 (handle_status): Adjust.
1015 (kill_inferior_callback): Likewise.
1016 (detach_or_kill_inferior): Remove.
1017 (print_started_pid): Likewise.
1018 (print_attached_pid): Likewise.
1019 (detach_or_kill_for_exit): Update.
1020 (process_serial_event): Likewise.
1021 * linux-arm-low.c (arm_new_fork): Likewise.
1022
1023 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1024
1025 * dll.h: Include <list>.
1026 (struct dll_info): Add constructor.
1027 <entry>: Remove field.
1028 (all_dlls): Change type to std::list<dll_info>.
1029 * dll.c: Include <algorithm>.
1030 (get_dll): Remove macro.
1031 (all_dlls): Change type to std::list<dll_info *>.
1032 (free_one_dll): Remove.
1033 (match_dll): Likewise.
1034 (loaded_dll): Adjust.
1035 (unloaded_dll): Adjust to all_dlls type change, use
1036 std::find_if. Inline code from match_dll.
1037 (clear_dlls): Adjust to all_dlls type change.
1038 * server.c (emit_dll_description): Remove.
1039 (handle_qxfer_libraries): Adjust to all_dlls type change,
1040 integrate emit_dll_description's functionality.
1041
1042 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * linux-low.h (struct linux_target_ops) <delete_process>: New
1045 field.
1046 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1047 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1048 (struct linux_target_ops): Add delete_process callback.
1049 * linux-arm-low.c (arm_delete_process): New.
1050 (struct linux_target_ops): Add delete_process callback.
1051 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1052 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1053 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1054 * linux-mips-low.c (mips_linux_delete_process): New.
1055 (struct linux_target_ops): Add delete_process callback.
1056 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1057 * linux-s390-low.c (struct linux_target_ops): Likewise.
1058 * linux-sh-low.c (struct linux_target_ops): Likewise.
1059 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1060 * linux-tile-low.c (struct linux_target_ops): Likewise.
1061 * linux-x86-low.c (x86_linux_delete_process): New.
1062 (struct linux_target_ops): Add delete_process callback.
1063 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1064
1065 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1066
1067 * linux-aarch64-low.c (the_low_target): Add thread delete
1068 callback.
1069 * linux-arm-low.c (arm_delete_thread): New function.
1070 (the_low_target): Add thread delete callback.
1071 * linux-bfin-low.c (the_low_target): Likewise.
1072 * linux-crisv32-low.c (the_low_target): Likewise.
1073 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1074 set.
1075 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1076 field.
1077 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1078 * linux-mips-low.c (mips_linux_delete_thread): New function.
1079 (the_low_target): Add thread delete callback.
1080 * linux-ppc-low.c (the_low_target): Likewise.
1081 * linux-s390-low.c (the_low_target): Likewise.
1082 * linux-sh-low.c (the_low_target): Likewise.
1083 * linux-tic6x-low.c (the_low_target): Likewise.
1084 * linux-tile-low.c (the_low_target): Likewise.
1085 * linux-x86-low.c (the_low_target): Likewise.
1086 * linux-xtensa-low.c (the_low_target): Likewise.
1087
1088 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1089
1090 * win32-low.c: Include "common-inferior.h".
1091
1092 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1093
1094 * inferiors.c (set_inferior_cwd): New function.
1095 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1096 (handle_query): Inform that QSetWorkingDir is supported.
1097 * win32-low.c (create_process): Pass the inferior's cwd to
1098 CreateProcess.
1099
1100 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1101
1102 * inferiors.c (current_inferior_cwd): New global variable.
1103 (get_inferior_cwd): New function.
1104 * inferiors.h (struct process_info) <cwd>: New field.
1105
1106 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1107
1108 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1109 (OBS): Add gdb_tilde_expand.o.
1110
1111 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1112
1113 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1114 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1115
1116 2017-09-29 Pedro Alves <palves@redhat.com>
1117
1118 * ax.c (gdb_parse_agent_expr): Constify.
1119 * ax.h (gdb_parse_agent_expr): Constify.
1120 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1121 Constify.
1122 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1123 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1124 * remote-utils.h (read_ptid): Constify.
1125 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1126 (process_point_options, process_serial_event): Constify.
1127 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1128 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1129 (cmd_qtbuffer): Constify.
1130
1131 2017-09-29 Pedro Alves <palves@redhat.com>
1132
1133 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1134 fails.
1135
1136 2017-09-29 Pedro Alves <palves@redhat.com>
1137
1138 * linux-low.c (handle_extended_wait): Pass parent thread instead
1139 of process to thread_db_notice_clone.
1140 * linux-low.h (thread_db_notice_clone): Replace parent process
1141 parameter with parent thread parameter.
1142 * thread-db.c (find_one_thread): Add comment.
1143 (thread_db_notice_clone): Replace parent process parameter with
1144 parent thread parameter. Temporarily switch to the parent thread.
1145
1146 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1147
1148 * gdbthread.h: Include "common-gdbthread.h".
1149 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1150 "if" when validating the ptid.
1151 * remote-utils.c: Include "gdbthread.h".
1152 (prepare_resume_reply): Use "switch_to_thread".
1153 * target.c (done_accessing_memory): Likewise.
1154
1155 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1156
1157 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1158 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1159 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1160 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1161 s390x-gs-linux64-ipa.o to ipa_obj.
1162 * linux-s390-low.c (HWCAP_S390_GS): New define.
1163 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1164 New functions.
1165 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1166 (s390_arch_setup): Check for guarded-storage support and choose
1167 appropriate tdesc.
1168 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1169 init_registers_s390x_gs_linux64.
1170 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1171 enum value.
1172 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1173 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1174
1175 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1176
1177 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1178
1179 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1180
1181 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1182 (thread_db_thread_handle): Declare.
1183 * linux-low.c (linux_target_ops): Initialize thread_handle.
1184 * server.c (handle_qxfer_threads_worker): Add support for
1185 "handle" attribute.
1186 * target.h (struct target_ops): Add new function pointer,
1187 thread_handle.
1188 (target_thread_handle): Define.
1189 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1190 field in lwp.
1191 (thread_db_thread_handle): New function.
1192
1193 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1194
1195 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1196 * linux-low.h (thread_db_notice_clone): Declare.
1197 * thread-db.c (thread_db_notice_clone): New function.
1198
1199 2017-09-21 Pedro Alves <palves@redhat.com>
1200
1201 * server.c (gdb_read_memory, handle_status, process_serial_event)
1202 (handle_serial_event, handle_target_event): Adjust to
1203 set_desired_thread prototype change.
1204 * target.c (set_desired_thread): Remove 'use_general' parameter
1205 and adjust.
1206 * target.h (set_desired_thread): Remove 'use_general' parameter.
1207
1208 2017-09-20 Tom Tromey <tom@tromey.com>
1209
1210 * target.c (target_terminal::terminal_state): Define.
1211 (target_terminal::init): Rename from target_terminal_init.
1212 (target_terminal::inferior): Rename from
1213 target_terminal_inferior.
1214 (target_terminal::ours): Rename from target_terminal_ours.
1215 (target_terminal::ours_for_output, target_terminal::info): New.
1216
1217 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * server.c (accumulate_file_name_length): Remove.
1220 (emit_dll_description): Adjust to std::string change.
1221 (handle_qxfer_libraries): Use std::string to hold document.
1222
1223 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1224
1225 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1226 return type of xml_escape_text.
1227 * server.c (emit_dll_description): Likewise.
1228
1229 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1230
1231 * server.c (captured_main): Accept argument for --selftest.
1232 Update run_tests call.
1233 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1234 when registering selftests.
1235
1236 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1237
1238 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1239 instead of "VEC" for "target_desc.reg_defs".
1240 (regcache_cpy): Likewise.
1241 (registers_to_string): Likewise.
1242 (registers_from_string): Likewise.
1243 (find_regno): Likewise.
1244 (supply_regblock): Likewise.
1245 (regcache_raw_read_unsigned): Likewise.
1246 * tdesc.c (init_target_desc): Likewise.
1247 (tdesc_create_reg): Likewise.
1248 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1249 (struct target_desc) <reg_defs>: Convert to "std::vector".
1250 (target_desc): Do not initialize "reg_defs".
1251 (~target_desc): Update code to use "std::vector" instead of "VEC"
1252 for "target_desc.reg_defs".
1253 (operator==): Likewise.
1254
1255 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * inferiors.h (thread_to_gdb_id): Remove.
1258 * inferiors.c (thread_to_gdb_id): Remove.
1259 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1260 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1261 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1262 Likewise.
1263 * nto-low.c (nto_fetch_registers, nto_store_registers,
1264 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1265
1266 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * inferiors.h (gdb_id_to_thread_id): Remove.
1269 * inferiors.c (gdb_id_to_thread_id): Remove.
1270 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1271 removal. Move pid declaration closer to where it's used.
1272
1273 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1274
1275 * server.c (handle_detach): New function.
1276 (process_serial_event): Move code out, call handle_detach.
1277
1278 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * server.c (require_running): Rename to ...
1281 (require_running_or_return): ... this ...
1282 (require_running_or_break): ... and this.
1283 (handle_query, process_serial_event): Adjust.
1284
1285 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1286
1287 * linux-low.c (linux_set_resume_request): Remove unused
1288 variables.
1289
1290 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1291
1292 * server.c (first_thread_of): Remove.
1293 (process_serial_event): Replace usage of first_thread_of with
1294 find_any_thread_of_pid.
1295 * tracepoint.c (same_process_p): Remove.
1296 (gdb_agent_about_to_close): Replace usage of same_process_p with
1297 find_any_thread_of_pid.
1298 * linux-x86-low.c (same_process_callback): Remove.
1299 (x86_arch_setup_process_callback): Replace usage of
1300 same_process_callback with find_any_thread_of_pid.
1301 * thread-db.c (any_thread_of): Remove.
1302 (switch_to_process): Replace usage of any_thread_of with
1303 find_any_thread_of_pid.
1304 * inferiors.c (thread_pid_matches_callback): Remove.
1305 (find_thread_process): Adjust to use find_any_thread_of_pid.
1306
1307 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1308
1309 * regcache.c (get_thread_regcache): Guard calls to "memset"
1310 with "!VEC_empty".
1311
1312 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1313
1314 * linux-low.c (handle_extended_wait): Use
1315 "allocate_target_description" instead of "XNEW".
1316 * linux-x86-low.c (initialize_low_arch): Likewise.
1317
1318 2017-09-05 Yao Qi <yao.qi@linaro.org>
1319
1320 * configure.srv (srv_i386_regobj): Remove.
1321 (srv_amd64_regobj): Remove.
1322 (srv_regobj): Set it to "" for x86 non-linux targets.
1323 * linux-x86-tdesc.c (i386_linux_read_description):
1324 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1325 (init_registers_i386): Remove the declaration.
1326 (tdesc_i386): Remove the declaration.
1327 (lynx_i386_arch_setup): Call i386_create_target_description.
1328 * nto-x86-low.c: Likewise.
1329 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1330 [!__x86_64__]: include arch/i386.h.
1331 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1332
1333 2017-09-05 Yao Qi <yao.qi@linaro.org>
1334
1335 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1336 i386/amd64-XXX-linux from it.
1337
1338 2017-09-05 Yao Qi <yao.qi@linaro.org>
1339
1340 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1341 false.
1342 (ipa_amd64_linux_regobj): Remove.
1343 (ipa_x32_linux_regobj): Remove.
1344
1345 2017-09-05 Yao Qi <yao.qi@linaro.org>
1346
1347 * Makefile.in (arch-amd64.o): New rule.
1348 * configure.srv: Append arch-amd64.o.
1349 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1350 (get_ipa_tdesc): Call amd64_linux_read_description.
1351 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1352 and init_registers_amd64_XXX.
1353 * linux-x86-low.c (x86_linux_read_description): Call
1354 amd64_linux_read_description.
1355 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1356 (initialize_low_arch): Don't call init_registers_x32_XXX and
1357 init_registers_amd64_XXX.
1358 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1359 and tdesc_amd64_XXX.
1360 [__x86_64__] (amd64_tdesc_test): New function.
1361 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1362 and init_registers_amd64_XXX.
1363 * linux-x86-tdesc.c: Include arch/amd64.h.
1364 (xcr0_to_tdesc_idx): New function.
1365 (i386_linux_read_description): New function.
1366 (amd64_get_ipa_tdesc_idx): New function.
1367 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1368 (amd64_get_ipa_tdesc): Declare.
1369
1370 2017-09-05 Yao Qi <yao.qi@linaro.org>
1371
1372 * configure.srv (srv_i386_linux_xmlfiles): Remove
1373 i386/i386-XXX-linux.xml from it.
1374
1375 2017-09-05 Yao Qi <yao.qi@linaro.org>
1376
1377 * configure.srv: Set srv_i386_linux_regobj empty if $development
1378 is false.
1379 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1380 initialize_low_tdesc.
1381 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1382 with #if initialize_low_tdesc.
1383 * linux-x86-tdesc-selftest.c: New file.
1384 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1385
1386 2017-09-05 Yao Qi <yao.qi@linaro.org>
1387
1388 * Makefile.in (arch-i386.o): New rule.
1389 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1390 (x86_64-*-linux*): Likewise.
1391 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1392 include arch/i386.h.
1393 (i386_linux_read_description): Remove code and call
1394 i386_create_target_description.
1395 * tdesc.c (allocate_target_description): New function.
1396 * tdesc.h (set_tdesc_architecture): Remove declaration.
1397 (set_tdesc_osabi): Likewise.
1398
1399 2017-09-05 Yao Qi <yao.qi@linaro.org>
1400
1401 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1402 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1403 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1404 .xmltarget.
1405 * server.c (get_features_xml): Call tdesc_get_features_xml.
1406 * tdesc.c (set_tdesc_architecture): New function.
1407 (set_tdesc_osabi): New function.
1408 (tdesc_get_features_xml): New function.
1409 (tdesc_create_feature): Add an argument.
1410 * tdesc.h (struct target_desc) <features>: New field.
1411 <arch, osabi>: New field.
1412 (~target_desc): xfree features, arch, and osabi.
1413 (target_desc::oerator==): Don't compare .xmltarget.
1414 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1415 (set_tdesc_osabi): Likewise.
1416 (tdesc_get_features_xml): Likewise.
1417
1418 2017-09-05 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-x86-tdesc.c: Include selftest.h.
1421 (i386_tdesc_test): New function.
1422 (initialize_low_tdesc): Call selftests::register_test.
1423 * tdesc.h: Include regdef.h.
1424 (target_desc): Override operator == and !=.
1425
1426 2017-09-05 Yao Qi <yao.qi@linaro.org>
1427
1428 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1429 (ipa_obj): Likewise.
1430 * linux-i386-ipa.c: Include common/x86-xstate.h
1431 (get_ipa_tdesc): Call i386_linux_read_description.
1432 (initialize_low_tracepoint): Don't call init_registers_XXX
1433 functions, call initialize_low_tdesc instead.
1434 * linux-x86-low.c (x86_linux_read_description): Call
1435 i386_linux_read_description.
1436 (initialize_low_arch): Don't call init_registers_i386_XXX
1437 functions, call initialize_low_tdesc.
1438 * linux-x86-tdesc.c: New file.
1439 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1440 (i386_get_ipa_tdesc_idx): Declare.
1441 (i386_get_ipa_tdesc): Declare.
1442 (initialize_low_tdesc): Declare.
1443
1444 2017-09-05 Yao Qi <yao.qi@linaro.org>
1445
1446 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1447 instead of 0.
1448
1449 2017-09-05 Yao Qi <yao.qi@linaro.org>
1450
1451 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1452 * regcache.c (get_thread_regcache): Use VEC_length.
1453 (init_register_cache): Likewise.
1454 (regcache_cpy): Likewise.
1455 (registers_to_string): Iterate reg_defs via VEC_iterate.
1456 (find_regno): Likewise.
1457 (find_register_by_number): Use VEC_index.
1458 (register_size): Call find_register_by_number.
1459 (register_data): Call find_register_by_number.
1460 (supply_regblock): Use VEC_length.
1461 (regcache_raw_read_unsigned): Likewise.
1462 * tdesc.c (init_target_desc): Iterate reg_defs via
1463 VEC_iterate.
1464 (default_description): Update initializer.
1465 (copy_target_description): Don't update field num_registers.
1466 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1467 <num_registers>: Remove.
1468
1469 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1470
1471 * Makefile.in (.SECONDARY): Define target.
1472
1473 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * linux-low.c (linux_wait_1): Adjust.
1476 * server.c (queue_stop_reply_callback): Adjust.
1477
1478 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1479
1480 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1481 QEnvironmentUnset and QEnvironmentReset packets.
1482 (handle_query): Inform remote that QEnvironmentHexEncoded,
1483 QEnvironmentUnset and QEnvironmentReset are supported.
1484
1485 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1486
1487 * inferiors.h (inferior_target_data): Rename to ...
1488 (thread_target_data): ... this.
1489 (inferior_regcache_data): Rename to ...
1490 (thread_regcache_data): ... this.
1491 (set_inferior_regcache_data): Rename to ...
1492 (set_thread_regcache_data): ... this.
1493 * inferiors.c (inferior_target_data): Rename to ...
1494 (thread_target_data): ... this.
1495 (inferior_regcache_data): Rename to ...
1496 (thread_regcache_data): ... this.
1497 (set_inferior_regcache_data): Rename to ...
1498 (set_thread_regcache_data): ... this.
1499 (free_one_thread): Update.
1500 * linux-low.h (get_thread_lwp): Update.
1501 * regcache.c (get_thread_regcache): Update.
1502 (regcache_invalidate_thread): Update.
1503 (free_register_cache_thread): Update.
1504 * win32-i386-low.c (update_debug_registers_callback): Update.
1505 (win32_get_current_dr): Update.
1506 * win32-low.c (thread_rec): Update.
1507 (delete_thread_info): Update.
1508 (continue_one_thread): Update.
1509 (suspend_one_thread): Update.
1510
1511 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * inferiors.c (set_inferior_target_data): Remove.
1514 * inferiors.h (set_inferior_target_data): Remove.
1515
1516 2017-08-18 Yao Qi <yao.qi@linaro.org>
1517
1518 * Makefile.in (OBS): Add selftest.o.
1519 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1520 * configure, config.in: Re-generated.
1521 * server.c: Include common/sefltest.h.
1522 (captured_main): Handle option --selftest.
1523
1524 2017-08-09 Yao Qi <yao.qi@linaro.org>
1525
1526 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1527 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1528 i386-avx-mpx.o and i386-mmx.o.
1529 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1530 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1531 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1532 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1533 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1534 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1535 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1536 i386/amd64-avx-mpx.xml.
1537
1538 2017-08-09 Yao Qi <yao.qi@linaro.org>
1539
1540 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1541 and x32-avx-avx512.o.
1542 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1543 i386/x32-avx-avx512.xml.
1544
1545 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * tracepoint.h (enum class fast_tpoint_collect_result): New
1548 enumeration.
1549 (fast_tracepoint_collecting): Change return type to
1550 fast_tpoint_collect_result.
1551 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1552 * linux-low.h: Include tracepoint.h.
1553 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1554 fast_tpoint_collect_result.
1555 * linux-low.c (handle_tracepoints): Adjust.
1556 (linux_fast_tracepoint_collecting): Change return type to
1557 fast_tpoint_collect_result.
1558 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1559 linux_wait_1, stuck_in_jump_pad_callback,
1560 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1561 proceed_one_lwp): Adjust to type change.
1562
1563 2017-07-10 Yao Qi <yao.qi@linaro.org>
1564
1565 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1566
1567 2017-06-29 Yao Qi <yao.qi@linaro.org>
1568
1569 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1570 Remove.
1571 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1572
1573 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1576
1577 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1578
1579 * linux-low.c (linux_create_inferior): Adjust code to access the
1580 environment information via 'gdb_environ' class.
1581 * lynx-low.c (lynx_create_inferior): Likewise.
1582 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1583 (get_environ): Return a pointer to 'our_environ'.
1584 (captured_main): Initialize 'our_environ'.
1585 * server.h (get_environ): Adjust prototype.
1586 * spu-low.c (spu_create_inferior): Adjust code to access the
1587 environment information via 'gdb_environ' class.
1588
1589 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1590
1591 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1592 usage of "register" keyword.
1593
1594 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * configure: Re-generate.
1597
1598 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1599
1600 * configure: Re-generate.
1601
1602 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * Makefile.in (COMPILE.pre): Add "-x c++".
1605
1606 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1607
1608 * fork-child.c: Conditionally include <signal.h>.
1609
1610 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * server.c (handle_general_set): Handle new packet
1613 "QStartupWithShell".
1614 (handle_query): Add "QStartupWithShell" to the list of supported
1615 packets.
1616 (gdbserver_usage): Add help text explaining the
1617 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1618 options.
1619 (captured_main): Recognize and act upon the presence of the new
1620 CLI options.
1621
1622 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1623 Pedro Alves <palves@redhat.com>
1624
1625 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1626 * configure: Regenerate.
1627 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1628 "fork-inferior.o".
1629 (i[34567]86-*-lynxos*): Likewise.
1630 (spu*-*-*): Likewise.
1631 * fork-child.c: New file.
1632 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1633 and "environ.h".
1634 (linux_ptrace_fun): New function.
1635 (linux_create_inferior): Adjust function prototype to reflect
1636 change on "target.h". Adjust function code to use
1637 "fork_inferior".
1638 (linux_request_interrupt): Delete "signal_pid".
1639 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1640 (lynx_ptrace_fun): New function.
1641 (lynx_create_inferior): Adjust function prototype to reflect
1642 change on "target.h". Adjust function code to use
1643 "fork_inferior".
1644 * nto-low.c (nto_create_inferior): Adjust function prototype and
1645 code to reflect change on "target.h". Update comments.
1646 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1647 "common-terminal.h" and "environ.h".
1648 (terminal_fd): Moved to fork-child.c.
1649 (old_foreground_pgrp): Likewise.
1650 (restore_old_foreground_pgrp): Likewise.
1651 (last_status): Make it global.
1652 (last_ptid): Likewise.
1653 (our_environ): New variable.
1654 (startup_with_shell): Likewise.
1655 (program_name): Likewise.
1656 (program_argv): Rename to...
1657 (program_args): ...this.
1658 (wrapper_argv): New variable.
1659 (start_inferior): Delete function.
1660 (get_exec_wrapper): New function.
1661 (get_exec_file): Likewise.
1662 (get_environ): Likewise.
1663 (prefork_hook): Likewise.
1664 (post_fork_inferior): Likewise.
1665 (postfork_hook): Likewise.
1666 (postfork_child_hook): Likewise.
1667 (handle_v_run): Update code to deal with arguments coming from the
1668 remote host. Update calls from "start_inferior" to
1669 "create_inferior".
1670 (captured_main): Likewise. Initialize environment variable. Call
1671 "have_job_control".
1672 * server.h (post_fork_inferior): New prototype.
1673 (get_environ): Likewise.
1674 (last_status): Declare.
1675 (last_ptid): Likewise.
1676 (signal_pid): Likewise.
1677 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1678 (spu_ptrace_fun): New function.
1679 (spu_create_inferior): Adjust function prototype to reflect change
1680 on "target.h". Adjust function code to use "fork_inferior".
1681 * target.c (target_terminal_init): New function.
1682 (target_terminal_inferior): Likewise.
1683 (target_terminal_ours): Likewise.
1684 * target.h: Include <vector>.
1685 (struct target_ops) <create_inferior>: Update prototype.
1686 (create_inferior): Update macro.
1687 * utils.c (gdb_flush_out_err): New function.
1688 * win32-low.c (win32_create_inferior): Adjust function prototype
1689 and code to reflect change on "target.h".
1690
1691 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1692
1693 * inferiors.c (switch_to_thread): New function.
1694
1695 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1696
1697 * Makefile.in (SFILE): Add "common/job-control.c".
1698 (OBS): Add "job-control.o".
1699
1700 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1701
1702 * Makefile: Remove "@host_makefile_frag@".
1703
1704 2017-05-05 Pedro Alves <palves@redhat.com>
1705
1706 * configure: Regenerate.
1707
1708 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * configure: Regenerate.
1711
1712 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1713
1714 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1715 software_single_step change of return type to
1716 std::vector<CORE_ADDR>.
1717 * linux-low.c (install_software_single_step_breakpoints):
1718 Likewise.
1719 * linux-low.h (install_software_single_step_breakpoints):
1720 Likewise.
1721
1722 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1723
1724 * remote-utils.c: Include "gdb_termios.h" instead of
1725 "terminal.h".
1726 * terminal.h: Delete file.
1727
1728 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1729
1730 * server.c: Include <vector>.
1731 <program_argv, wrapper_argv>: Convert to std::vector.
1732 (start_inferior): Rewrite function to use C++.
1733 (handle_v_run): Likewise. Update code that calculates the argv
1734 based on the vRun packet; use C++.
1735 (captured_main): Likewise.
1736
1737 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * server.c (handle_v_cont): Initialize thread_resume::thread
1740 with null_ptid.
1741
1742 2017-04-05 Pedro Alves <palves@redhat.com>
1743
1744 * configure: Regenerate.
1745
1746 2017-04-05 Pedro Alves <palves@redhat.com>
1747
1748 * gdbreplay.c (sync_error): Constify.
1749 * linux-x86-low.c (push_opcode): Constify.
1750
1751 2017-04-05 Pedro Alves <palves@redhat.com>
1752
1753 * win32-low.c (get_child_debug_event)
1754 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1755 Report TARGET_WAITKIND_SPURIOUS instead.
1756
1757 2017-04-05 Pedro Alves <palves@redhat.com>
1758
1759 * remote-utils.c (remote_prepare, remote_open): Constify.
1760 * remote-utils.h (remote_prepare, remote_open): Constify.
1761 * server.c (captured_main): Constify 'port' handling.
1762
1763 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1764
1765 * Makefile.in (clean): Clear .deps.
1766
1767 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * .gitignore: Remove generated files, replace with wildcard.
1770 * (clean): Replace removal of generated files with wildcard.
1771 (version.c): Replace with...
1772 (version-generated.c): ...this.
1773 (xml-builtin.c): Replace with...
1774 (xml-builtin-generated.c): ...this.
1775 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1776 (%.c: *regformats*): Replace with...
1777 (%-generated.c: *regformats*): ...this.
1778
1779 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1780
1781 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1782 (xtensa_fill_gregset): Call collect_register_by_name for
1783 threadptr register.
1784 (xtensa_store_gregset): Call supply_register_by_name for
1785 threadptr register.
1786
1787 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1788
1789 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1790 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1791 (xtensa_store_gregset): Call supply_register for all registers in
1792 a0_regnum..a0_regnum + C0_NREGS range.
1793
1794 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1795
1796 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1797 (ax-ipa.o: ax.c): Remove.
1798 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1799 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1800 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1801 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1802 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1803
1804 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1807 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1808 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1809 (errors-ipa.o: ../common/errors.c): Remove.
1810 (format-ipa.o: ../common/format.c): Remove.
1811 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1812
1813 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1814
1815 * Makefile.in (%-ipa.o: %.c): New rule.
1816 (tracepoint-ipa.o: tracepoint.c): Remove.
1817 (utils-ipa.o: utils.c): Remove.
1818 (remote-utils-ipa.o: remote-utils.c): Remove.
1819 (regcache-ipa.o: regcache.c): Remove.
1820 (i386-linux-ipa.o: i386-linux.c): Remove.
1821 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1822 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1823 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1824 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1825 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1826 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1827 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1828 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1829 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1830 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1831 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1832 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1833 (aarch64-ipa.o: aarch64.c): Remove.
1834 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1835 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1836 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1837 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1838 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1839 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1840 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1841 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1842 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1843 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1844 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1845 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1846 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1847 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1848 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1849 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1850 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1851 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1852 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1853 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1854 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1855 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1856 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1857 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1858 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1859 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1860 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1861 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1862 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1863 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1864 (tdesc-ipa.o: tdesc.c): Remove.
1865 (x32-linux-ipa.o: x32-linux.c): Remove.
1866 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1867 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1868
1869 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1870
1871 * Makefile.in (%.o: ../arch/%.c): New rule.
1872 (arm.o: ../arch/arm.c): Remove.
1873 (arm-linux.o: ../arch/arm-linux.c): Remove.
1874 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1875 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1876
1877 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * Makefile.in (%.o: ../nat/%.c): New rule.
1880 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1881 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1882 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1883 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1884 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1885 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1886 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1887 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1888 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1889 (linux-personality.o: ../nat/linux-personality.c): Remove.
1890 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1891 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1892 (x86-linux.o: ../nat/x86-linux.c): Remove.
1893 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1894 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1895
1896 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1897
1898 * Makefile.in (%.o: ../common/%.c): New rule.
1899 (signals.o: ../common/signals.c): Remove.
1900 (print-utils.o: ../common/print-utils.c): Remove.
1901 (rsp-low.o: ../common/rsp-low.c): Remove.
1902 (common-utils.o: ../common/common-utils.c): Remove.
1903 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1904 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1905 (vec.o: ../common/vec.c): Remove.
1906 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1907 (xml-utils.o: ../common/xml-utils.c): Remove.
1908 (ptid.o: ../common/ptid.c): Remove.
1909 (buffer.o: ../common/buffer.c): Remove.
1910 (format.o: ../common/format.c): Remove.
1911 (filestuff.o: ../common/filestuff.c): Remove.
1912 (agent.o: ../common/agent.c): Remove.
1913 (errors.o: ../common/errors.c): Remove.
1914 (environ.o: ../common/environ.c): Remove.
1915 (common-debug.o: ../common/common-debug.c): Remove.
1916 (cleanups.o: ../common/cleanups.c): Remove.
1917 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1918 (fileio.o: ../common/fileio.c): Remove.
1919 (common-regcache.o: ../common/common-regcache.c): Remove.
1920 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1921 (new-op.o: ../common/new-op.c): Remove.
1922 (btrace-common.o: ../common/btrace-common.c): Remove.
1923
1924 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1925
1926 * Makefile.in (%.o: ../target/%.c): New rule.
1927 (waitstatus.o: ../target/waitstatus.c): Remove.
1928
1929 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * Makefile.in
1932 (%.c: ../regformats/%.dat,
1933 (%.c: ../regformats/arm/%.dat,
1934 (%.c: ../regformats/i386/%.dat,
1935 (%.c: ../regformats/rs6000/%.dat): New rules.
1936 (aarch64.c): Remove.
1937 (reg-arm.c): Remove.
1938 (arm-with-iwmmxt.c): Remove.
1939 (arm-with-vfpv2.c): Remove.
1940 (arm-with-vfpv3.c): Remove.
1941 (arm-with-neon.c): Remove.
1942 (reg-bfin.c): Remove.
1943 (reg-cris.c): Remove.
1944 (reg-crisv32.c): Remove.
1945 (i386.c): Remove.
1946 (i386-linux.c): Remove.
1947 (i386-avx.c): Remove.
1948 (i386-avx-linux.c): Remove.
1949 (i386-avx-avx512.c): Remove.
1950 (i386-avx-avx512-linux.c): Remove.
1951 (i386-mpx.c): Remove.
1952 (i386-mpx-linux.c): Remove.
1953 (i386-avx-mpx-avx512-pku.c): Remove.
1954 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1955 (i386-avx-mpx.c): Remove.
1956 (i386-avx-mpx-linux.c): Remove.
1957 (i386-mmx.c): Remove.
1958 (i386-mmx-linux.c): Remove.
1959 (reg-ia64.c): Remove.
1960 (reg-m32r.c): Remove.
1961 (reg-m68k.c): Remove.
1962 (reg-cf.c): Remove.
1963 (mips-linux.c): Remove.
1964 (mips-dsp-linux.c): Remove.
1965 (mips64-linux.c): Remove.
1966 (mips64-dsp-linux.c): Remove.
1967 (nios2-linux.c): Remove.
1968 (powerpc-32.c): Remove.
1969 (powerpc-32l.c): Remove.
1970 (powerpc-altivec32l.c): Remove.
1971 (powerpc-cell32l.c): Remove.
1972 (powerpc-vsx32l.c): Remove.
1973 (powerpc-isa205-32l.c): Remove.
1974 (powerpc-isa205-altivec32l.c): Remove.
1975 (powerpc-isa205-vsx32l.c): Remove.
1976 (powerpc-e500l.c): Remove.
1977 (powerpc-64l.c): Remove.
1978 (powerpc-altivec64l.c): Remove.
1979 (powerpc-cell64l.c): Remove.
1980 (powerpc-vsx64l.c): Remove.
1981 (powerpc-isa205-64l.c): Remove.
1982 (powerpc-isa205-altivec64l.c): Remove.
1983 (powerpc-isa205-vsx64l.c): Remove.
1984 (s390-linux32.c): Remove.
1985 (s390-linux32v1.c): Remove.
1986 (s390-linux32v2.c): Remove.
1987 (s390-linux64.c): Remove.
1988 (s390-linux64v1.c): Remove.
1989 (s390-linux64v2.c): Remove.
1990 (s390-te-linux64.c): Remove.
1991 (s390-vx-linux64.c): Remove.
1992 (s390-tevx-linux64.c): Remove.
1993 (s390x-linux64.c): Remove.
1994 (s390x-linux64v1.c): Remove.
1995 (s390x-linux64v2.c): Remove.
1996 (s390x-te-linux64.c): Remove.
1997 (s390x-vx-linux64.c): Remove.
1998 (s390x-tevx-linux64.c): Remove.
1999 (tic6x-c64xp-linux.c): Remove.
2000 (tic6x-c64x-linux.c): Remove.
2001 (tic6x-c62x-linux.c): Remove.
2002 (reg-sh.c): Remove.
2003 (reg-sparc64.c): Remove.
2004 (reg-spu.c): Remove.
2005 (amd64.c): Remove.
2006 (amd64-linux.c): Remove.
2007 (amd64-avx.c): Remove.
2008 (amd64-avx-linux.c): Remove.
2009 (amd64-avx-avx512.c): Remove.
2010 (amd64-avx-avx512-linux.c): Remove.
2011 (amd64-mpx.c): Remove.
2012 (amd64-mpx-linux.c): Remove.
2013 (amd64-avx-mpx-avx512-pku.c): Remove.
2014 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2015 (amd64-avx-mpx.c): Remove.
2016 (amd64-avx-mpx-linux.c): Remove.
2017 (x32.c): Remove.
2018 (x32-linux.c): Remove.
2019 (x32-avx.c): Remove.
2020 (x32-avx-linux.c): Remove.
2021 (x32-avx-avx512.c): Remove.
2022 (x32-avx-avx512-linux.c): Remove.
2023 (reg-xtensa.c): Remove.
2024 (reg-tilegx.c): Remove.
2025 (reg-tilegx32.c): Remove.
2026
2027 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2028
2029 * Makefile.in (SFILES): Add "common/environ.c".
2030 (OBJS): Add "common/environ.h".
2031
2032 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2033
2034 * configure.ac: Check if the fs_base and gs_base members of
2035 `struct user_regs_struct' exist.
2036 * config.in: Regenerated.
2037 * configure: Likewise.
2038
2039 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2040
2041 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2042 target_read_memory.
2043 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2044 (get_next_pcs_syscall_next_pc): Likewise.
2045
2046 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2047
2048 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2049 * nto-x86-low.c: Likewise.
2050
2051 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * Makefile.in: Include disable-implicit-rules.mk.
2054
2055 2016-11-23 Pedro Alves <palves@redhat.com>
2056
2057 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2058 (debug_vprintf): Use std::chrono::steady_clock instead of
2059 gettimeofday. Use '.' instead of ':'.
2060 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2061 (get_timestamp): Use std::chrono::steady_clock instead of
2062 gettimeofday.
2063
2064 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2065
2066 * Makefile.in: Fix whitespace formatting.
2067
2068 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2069
2070 * Makefile.in (SFILES, OBS): Flatten list and order
2071 alphabetically.
2072
2073 2016-11-23 Pedro Alves <palves@redhat.com>
2074
2075 * event-loop.c (handle_file_event): Use warning.
2076 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2077 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2078 Use warning.
2079
2080 2016-11-23 Pedro Alves <palves@redhat.com>
2081
2082 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2083 output.
2084 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2085 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2086 debug_printf and debug_flush for debug output.
2087 * server.c (handle_general_set): Likewise.
2088 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2089 output.
2090
2091 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2092
2093 * Makefile.in (.c.o): Replace rule with ...
2094 (%.o: %.c): ... this one.
2095
2096 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2097
2098 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2099 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2100 make.
2101 * configure.ac: Remove checks for the make program.
2102 * configure: Re-generate.
2103
2104 2016-10-28 Pedro Alves <palves@redhat.com>
2105
2106 * Makefile.in (CXX_DIALECT): Get from configure.
2107 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2108 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2109 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2110 * config.in: Regenerate.
2111 * configure: Regenerate.
2112
2113 2016-10-27 Yao Qi <yao.qi@linaro.org>
2114
2115 * linux-low.c (linux_supports_range_stepping): Return true if
2116 can_software_single_step return true.
2117
2118 2016-10-27 Yao Qi <yao.qi@linaro.org>
2119
2120 * inferiors.c (find_inferior_in_random): New function.
2121 * inferiors.h (find_inferior_in_random): Declare.
2122 * linux-low.c (linux_wait_for_event_filtered): Call
2123 find_inferior_in_random instead of find_inferior.
2124
2125 2016-10-27 Yao Qi <yao.qi@linaro.org>
2126
2127 * linux-low.c (linux_wait_1): If single-step breakpoints are
2128 inserted, remove them.
2129
2130 2016-10-26 Pedro Alves <palves@redhat.com>
2131
2132 * linux-low.c (handle_extended_wait): Link parent/child fork
2133 threads.
2134 (linux_wait_1): Unlink them.
2135 (linux_set_resume_request): Ignore resume requests for
2136 already-resumed and unhandled fork child threads.
2137 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2138 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2139 New functions.
2140 (handle_v_requests) <vCont>: Don't call require_running.
2141 * server.h (in_queued_stop_replies): New declaration.
2142
2143 2016-10-24 Yao Qi <yao.qi@linaro.org>
2144
2145 PR server/20733
2146 * linux-aarch64-low.c (append_insns): Cast the return value to
2147 'uint32_t *'.
2148
2149 2016-10-10 Yao Qi <yao.qi@linaro.org>
2150
2151 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2152
2153 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2154
2155 * target.c (target_supports_multi_process): New function, moved
2156 from...
2157 * target.h (target_supports_multi_process): ... here. Remove
2158 macro.
2159
2160 2016-10-05 Tom Tromey <tom@tromey.com>
2161
2162 PR remote/20655:
2163 * tracepoint.c (handle_tracepoint_bkpts): Check
2164 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2165
2166 2016-10-05 Yao Qi <yao.qi@linaro.org>
2167
2168 * configure.srv: Update the path of arm-*.xml files.
2169
2170 2016-10-05 Terry Guo <terry.guo@arm.com>
2171 Yao Qi <yao.qi@linaro.org>
2172
2173 * Makefile.in: Adjust the path of rules.
2174 * configure.srv: Update the path of xml files.
2175 * regformats/arm-with-iwmmxt.dat: Regenerated.
2176 * regformats/arm-with-neon.dat: Likewise.
2177 * regformats/arm-with-vfpv2.dat: Likewise.
2178 * regformats/arm-with-vfpv3.dat Likewise.
2179
2180 2016-09-30 Yao Qi <yao.qi@linaro.org>
2181
2182 PR gdbserver/20627
2183 * target.c (target_stop_and_wait): Don't call
2184 target_continue_no_signal, use resume_stop instead.
2185
2186 2016-09-26 Yao Qi <yao.qi@linaro.org>
2187
2188 * linux-low.c (linux_wait_1): Call debug_exit.
2189
2190 2016-09-23 Pedro Alves <palves@redhat.com>
2191
2192 * Makefile.in (SFILES): Add common/new-op.c.
2193 (OBS): Add common/new-op.o.
2194 (new-op.o): New rule.
2195
2196 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2197
2198 * .gitinore: Ignore more files.
2199
2200 2016-09-21 Yao Qi <yao.qi@linaro.org>
2201
2202 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2203 23.
2204
2205 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2206
2207 * server.c (start_inferior): Call target_mourn_inferior instead of
2208 mourn_inferior; pass ptid_t argument to it.
2209 (resume): Likewise.
2210 (handle_target_event): Likewise.
2211 * target.c (target_mourn_inferior): New function.
2212 * target.h (mourn_inferior): Delete macro.
2213
2214 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2215
2216 * linux-low.c (lwp_is_stepping): New function.
2217
2218 2016-09-06 Carl Love <cel@us.ibm.com>
2219
2220 * server.c (start_inferior): Fixed comment, requested comment change
2221 didn't get updated correctly. Removed reference to ptrace () call as
2222 it is only true on Linux systems.
2223
2224 2016-09-06 Carl Love <cel@us.ibm.com>
2225
2226 * server.c (start_inferior): Do not call
2227 function target_post_create_inferior () if the
2228 inferior process has already exited.
2229
2230 2016-09-05 Pedro Alves <palves@redhat.com>
2231
2232 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2233 (COMPILE.pre, CC_LD): Use CXX directly.
2234 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2235 * acinclude.m4: Don't include build-with-cxx.m4.
2236 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2237 * configure: Regenerate.
2238
2239 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2240
2241 PR gdb/19495
2242 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2243 call writing data to own_buf.
2244
2245 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2246
2247 * target.c (mywait): Call target_wait instead of
2248 the_target->wait.
2249 (target_wait): New function.
2250
2251 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2252
2253 * server.c (start_inferior): New variable 'ptid'. Replace calls
2254 to the_target->resume by target_continue{,_no_signal}, depending
2255 on the case.
2256 * target.c (target_stop_and_wait): Call target_continue_no_signal
2257 instead of the_target->resume.
2258 (target_continue): New function.
2259
2260 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2261
2262 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2263
2264 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2265
2266 PR server/20491
2267 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2268 ps_prochandle.
2269 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2270 * linux-arm-low.c (ps_get_thread_area): Likewise.
2271 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2272 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2273 * linux-mips-low.c (ps_get_thread_area): Likewise.
2274 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2275 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2276 * linux-x86-low.c (ps_get_thread_area): Likewise.
2277 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2278
2279 2016-08-19 Pedro Alves <palves@redhat.com>
2280
2281 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2282
2283 2016-08-19 Pedro Alves <palves@redhat.com>
2284
2285 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2286 comment. Use memcpy instead of casting through unsigned long.
2287
2288 2016-08-19 Pedro Alves <palves@redhat.com>
2289
2290 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2291 allocating around 0x80000000.
2292
2293 2016-08-19 Pedro Alves <palves@redhat.com>
2294
2295 PR gdb/20415
2296 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2297 (x32-avx512-linux-ipa.o): New rules.
2298 * configure.ac (x86_64-*-linux*): New x32 check.
2299 * configure.srv (ipa_x32_linux_regobj): New.
2300 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2301 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2302 descriptions.
2303 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2304 descriptions.
2305 * configure: Regenerate.
2306
2307 2016-08-09 Pedro Alves <palves@redhat.com>
2308
2309 PR gdb/18653
2310 * Makefile.in (OBS): Add signals-state-save-restore.o.
2311 (signals-state-save-restore.o): New rule.
2312 * config.in: Regenerate.
2313 * configure: Regenerate.
2314 * linux-low.c: Include "signals-state-save-restore.h".
2315 (linux_create_inferior): Call
2316 restore_original_signals_state.
2317 * server.c: Include "dispositions-save-restore.h".
2318 (captured_main): Call save_original_signals_state.
2319
2320 2016-08-05 Pedro Alves <palves@redhat.com>
2321
2322 * configure: Regenerate.
2323
2324 2016-08-04 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-low.c (regsets_fetch_inferior_registers): Check
2327 errno is ESRCH or not.
2328
2329 2016-08-02 Yao Qi <yao.qi@linaro.org>
2330
2331 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2332 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2333 (thread_db_load_search): Update.
2334 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2335 td_ta_set_event and td_ta_event_getmsg.
2336
2337 2016-07-26 Pedro Alves <palves@redhat.com>
2338
2339 PR server/20414
2340 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2341 of unsigned long for 64-bit registers and use uint32_t instead of
2342 unsigned int for 32-bit registers.
2343
2344 2016-07-26 Pedro Alves <palves@redhat.com>
2345
2346 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2347 to 'ptrace'.
2348
2349 2016-07-21 Tom Tromey <tom@tromey.com>
2350
2351 * configure: Rebuild.
2352
2353 2016-07-21 Yao Qi <yao.qi@linaro.org>
2354
2355 * mem-break.c (find_gdb_breakpoint): Cast bp to
2356 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2357
2358 2016-07-21 Yao Qi <yao.qi@linaro.org>
2359
2360 * server.c (handle_v_requests): Support s and S actions
2361 if target_supports_software_single_step return true.
2362
2363 2016-07-21 Yao Qi <yao.qi@linaro.org>
2364
2365 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2366 is resume_step, call maybe_hw_step.
2367 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2368 and unstop them.
2369 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2370 breakpoints or not.
2371 (proceed_one_lwp): If resume request is resume_step, install
2372 reinsert breakpoints and call maybe_hw_step.
2373
2374 2016-07-21 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-low.c (proceed_one_lwp): Declare.
2377 (linux_resume_one_thread): Remove local variable 'step'.
2378 Lift code enqueue signal. Call proceed_one_lwp instead of
2379 linux_resume_one_lwp.
2380
2381 2016-07-21 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (linux_resume_one_thread): Call
2384 enqueue_pending_signal.
2385
2386 2016-07-21 Yao Qi <yao.qi@linaro.org>
2387
2388 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2389 * inferiors.c (do_restore_current_thread_cleanup): New function.
2390 (make_cleanup_restore_current_thread): Likewise.
2391 * linux-low.c (install_software_single_step_breakpoints): Call
2392 make_cleanup_restore_current_thread. Switch current_thread to
2393 thread.
2394
2395 2016-07-21 Yao Qi <yao.qi@linaro.org>
2396
2397 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2398 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2399 (clone_one_breakpoint): Likewise.
2400 (delete_reinsert_breakpoints): Change parameter to thread.
2401 Callers updated.
2402 (has_reinsert_breakpoints): Likewise.
2403 (uninsert_reinsert_breakpoints): Likewise.
2404 (reinsert_reinsert_breakpoints): Likewise.
2405 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2406 (delete_reinsert_breakpoints): Likewise.
2407 (reinsert_reinsert_breakpoints): Likewise.
2408 (uninsert_reinsert_breakpoints): Likewise.
2409 (has_reinsert_breakpoints): Likewise.
2410
2411 2016-07-21 Yao Qi <yao.qi@linaro.org>
2412
2413 * inferiors.c (get_thread_process): Make parameter const.
2414 * inferiors.h (get_thread_process): Update declaration.
2415 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2416 Add new parameters child_thread and parent_thread. Callers
2417 updated.
2418 * mem-break.h (clone_all_breakpoints): Update declaration.
2419
2420 2016-07-21 Yao Qi <yao.qi@linaro.org>
2421
2422 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2423 <command_list, handler>: Remove.
2424 (struct gdb_breakpoint): New.
2425 (struct other_breakpoint): New.
2426 (struct reinsert_breakpoint): New.
2427 (is_gdb_breakpoint): New function.
2428 (any_persistent_commands): Update command_list if
2429 is_gdb_breakpoint returns true.
2430 (set_breakpoint): Create breakpoints according to their types.
2431 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2432 (set_gdb_breakpoint_1): Likewise.
2433 (set_gdb_breakpoint): Likewise.
2434 (clear_breakpoint_conditions): Change parameter type to
2435 'struct gdb_breakpoint *'.
2436 (clear_breakpoint_commands): Likewise.
2437 (clear_breakpoint_conditions_and_commands): Likewise.
2438 (add_condition_to_breakpoint): Likewise.
2439 (add_breakpoint_condition): Likewise.
2440 (add_commands_to_breakpoint): Likewise.
2441 (check_breakpoints): Check other_breakpoint.
2442 (clone_one_breakpoint): Clone breakpopint according to its type.
2443 * mem-break.h (struct gdb_breakpoint): Declare.
2444 (set_gdb_breakpoint): Update declaration.
2445 (clear_breakpoint_conditions_and_commands): Likewise.
2446 (add_breakpoint_condition): Likewise.
2447 (add_breakpoint_commands): Likewise.
2448 * server.c (process_point_options): Change parameter type to
2449 'struct gdb_breakpoint *'.
2450
2451 2016-07-21 Yao Qi <yao.qi@linaro.org>
2452
2453 * mem-break.c (set_breakpoint_at): Rename it to ...
2454 (set_breakpoint_type_at): ... it.
2455 (set_breakpoint_at): Call set_breakpoint_type_at.
2456 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2457 * mem-break.h (set_breakpoint_at): Update comments.
2458
2459 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2460
2461 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2462 to buf parameter.
2463 (nios2_store_gregset): Likewise.
2464
2465 2016-07-01 Pedro Alves <palves@redhat.com>
2466 Antoine Tremblay <antoine.tremblay@ericsson.com>
2467
2468 * linux-low.c: Change interface to take the target lwp_info
2469 pointer directly and return void. Handle detaching from a zombie
2470 thread.
2471 (linux_detach_lwp_callback): New function.
2472 (linux_detach): Detach from the leader thread after detaching from
2473 the clone threads.
2474
2475 2016-06-28 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2478 for variable new_offset.
2479 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2480 (aarch64_ftrace_insn_reloc_cb): Likewise.
2481 (aarch64_ftrace_insn_reloc_tb): Likewise.
2482 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2483 PRIx64 instead of PRIx32.
2484
2485 2016-06-28 Yao Qi <yao.qi@linaro.org>
2486
2487 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2488 (the_low_target): Install arm_get_syscall_trapinfo.
2489
2490 2016-06-28 Yao Qi <yao.qi@linaro.org>
2491
2492 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2493 function.
2494 (the_low_target): Install aarch64_get_syscall_trapinfo.
2495
2496 2016-06-28 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2499 Callers updated.
2500 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2501 Remove parameter sysno.
2502 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2503 sysret.
2504
2505 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2506
2507 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2508 (s390_emit_ne_goto): Likewise.
2509 (s390_emit_lt_goto): Likewise.
2510 (s390_emit_le_goto): Likewise.
2511 (s390_emit_gt_goto): Likewise.
2512 (s390_emit_ge_goto): Likewise.
2513 (s390x_emit_eq_goto): Likewise.
2514 (s390x_emit_ne_goto): Likewise.
2515 (s390x_emit_lt_goto): Likewise.
2516 (s390x_emit_le_goto): Likewise.
2517 (s390x_emit_gt_goto): Likewise.
2518 (s390x_emit_ge_goto): Likewise.
2519 (s390_emit_ops_impl): Mark variable static.
2520 (s390x_emit_ops): Likewise.
2521
2522 2016-06-17 Yao Qi <yao.qi@linaro.org>
2523
2524 * linux-low.c (handle_extended_wait): Call
2525 uninsert_reinsert_breakpoints for the parent process. Remove
2526 reinsert breakpoints from the child process. Reinsert them to
2527 the parent process when vfork is done.
2528 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2529 (reinsert_reinsert_breakpoints): New function.
2530 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2531 (reinsert_reinsert_breakpoints): Declare.
2532
2533 2016-06-17 Yao Qi <yao.qi@linaro.org>
2534
2535 * linux-low.c (handle_extended_wait): If the parent is doing
2536 step-over, remove the reinsert breakpoints from the forked child.
2537
2538 2016-06-17 Yao Qi <yao.qi@linaro.org>
2539
2540 * linux-low.c (unsuspend_all_lwps): Declare.
2541 (linux_low_filter_event): If thread exited, call finish_step_over.
2542 If step-over is finished, unsuspend other threads.
2543
2544 2016-06-17 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-low.c (linux_resume_one_lwp_throw): Assert
2547 has_reinsert_breakpoints returns false.
2548 * mem-break.c (delete_disabled_breakpoints): Assert
2549 bp type isn't reinsert_breakpoint.
2550
2551 2016-06-17 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-low.c (maybe_hw_step): New function.
2554 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2555 (finish_step_over): Switch current_thread to lwp temporarily,
2556 and assert has_reinsert_breakpoints returns true.
2557 (proceed_one_lwp): Call maybe_hw_step.
2558 * mem-break.c (has_reinsert_breakpoints): New function.
2559 * mem-break.h (has_reinsert_breakpoints): Declare.
2560
2561 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2562
2563 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2564
2565 2016-05-17 Yao Qi <yao.qi@linaro.org>
2566
2567 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2568 instead of find_inferior.
2569
2570 2016-05-05 Yao Qi <yao.qi@linaro.org>
2571
2572 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2573 Initialize res to zero.
2574
2575 2016-05-05 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2578 to uint32_t.
2579
2580 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2581
2582 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2583 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2584 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2585
2586 2016-04-28 Par Olsson <par.olsson@windriver.com>
2587 Simon Marchi <simon.marchi@ericsson.com>
2588
2589 * tracepoint.c (write_inferior_int8): New function.
2590 (cmd_qtenable_disable): Write enable flag using
2591 write_inferior_int8.
2592
2593 2016-04-25 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2596 (need_step_over_p): Return zero if the LWP has pending signals
2597 can be delivered on software single step target.
2598
2599 2016-04-25 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2602 return instead of error.
2603
2604 2016-04-22 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2607 to 23.
2608
2609 2016-04-22 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2612 signal when stepping over breakpoint with software single
2613 step.
2614
2615 2016-04-21 Pedro Alves <palves@redhat.com>
2616
2617 * linux-s390-low.c (s390_collect_ptrace_register)
2618 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2619 add casts.
2620 (s390_check_regset): Use void * instead of gdb_byte *.
2621
2622 2016-04-20 Pedro Alves <palves@redhat.com>
2623
2624 * configure: Renegerate.
2625
2626 2016-04-20 Yao Qi <yao.qi@linaro.org>
2627
2628 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2629 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2630 number 16.
2631 (arm_store_gregset): Likewise.
2632
2633 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2634
2635 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2636 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2637 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2638 (amd64-avx-mpx-linux.c): New rules.
2639 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2640 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2641 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2642 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2643 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2644 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2645 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2646 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2647 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2648 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2649 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2650 * linux-x86-low.c (x86_linux_read_description): Add case for
2651 X86_XSTATE_AVX_MPX_MASK.
2652 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2653 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2654 init_registers_i386_avx_mpx_linux.
2655 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2656 (initialize_low_tracepoint): Call
2657 init_registers_i386_avx_mpx_linux.
2658 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2659 (initialize_low_tracepoint): Call
2660 init_registers_amd64_avx_mpx_linux.
2661 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2662 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2663 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2664 declarations.
2665
2666 2016-04-18 Pedro Alves <palves@redhat.com>
2667
2668 * configure: Regenerate.
2669
2670 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2671
2672 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2673 (aarch64_emit_sub): Likewise.
2674
2675 2016-04-12 Pedro Alves <palves@redhat.com>
2676
2677 * utils.c (prepare_to_throw_exception): Delete.
2678
2679 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2680
2681 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2682
2683 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2684
2685 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2686
2687 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2688
2689 * linux-aarch64-ipa.c: Add <elf.h> include.
2690 * linux-ppc-ipa.c: Add <elf.h> include.
2691 * linux-s390-ipa.c: Add <elf.h> include.
2692
2693 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2694
2695 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2696 (get_raw_reg_ptr): Likewise.
2697 (get_trace_state_variable_value_ptr): Likewise.
2698 (set_trace_state_variable_value_ptr): Likewise.
2699 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2700 char *.
2701
2702 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2703 Marcin Kościelnicki <koriakin@0x04.net>
2704
2705 PR/17221
2706 * linux-ppc-low.c (emit_insns): New function.
2707 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2708 (ppc_emit_prologue): New function.
2709 (ppc_emit_epilogue): New function.
2710 (ppc_emit_add): New function.
2711 (ppc_emit_sub): New function.
2712 (ppc_emit_mul): New function.
2713 (ppc_emit_lsh): New function.
2714 (ppc_emit_rsh_signed): New function.
2715 (ppc_emit_rsh_unsigned): New function.
2716 (ppc_emit_ext): New function.
2717 (ppc_emit_zero_ext): New function.
2718 (ppc_emit_log_not): New function.
2719 (ppc_emit_bit_and): New function.
2720 (ppc_emit_bit_or): New function.
2721 (ppc_emit_bit_xor): New function.
2722 (ppc_emit_bit_not): New function.
2723 (ppc_emit_equal): New function.
2724 (ppc_emit_less_signed): New function.
2725 (ppc_emit_less_unsigned): New function.
2726 (ppc_emit_ref): New function.
2727 (ppc_emit_const): New function.
2728 (ppc_emit_reg): New function.
2729 (ppc_emit_pop): New function.
2730 (ppc_emit_stack_flush): New function.
2731 (ppc_emit_swap): New function.
2732 (ppc_emit_stack_adjust): New function.
2733 (ppc_emit_call): New function.
2734 (ppc_emit_int_call_1): New function.
2735 (ppc_emit_void_call_2): New function.
2736 (ppc_emit_if_goto): New function.
2737 (ppc_emit_goto): New function.
2738 (ppc_emit_eq_goto): New function.
2739 (ppc_emit_ne_goto): New function.
2740 (ppc_emit_lt_goto): New function.
2741 (ppc_emit_le_goto): New function.
2742 (ppc_emit_gt_goto): New function.
2743 (ppc_emit_ge_goto): New function.
2744 (ppc_write_goto_address): New function.
2745 (ppc_emit_ops_impl): New static variable.
2746 (ppc64v1_emit_prologue): New function.
2747 (ppc64v2_emit_prologue): New function.
2748 (ppc64_emit_epilogue): New function.
2749 (ppc64_emit_add): New function.
2750 (ppc64_emit_sub): New function.
2751 (ppc64_emit_mul): New function.
2752 (ppc64_emit_lsh): New function.
2753 (ppc64_emit_rsh_signed): New function.
2754 (ppc64_emit_rsh_unsigned): New function.
2755 (ppc64_emit_ext): New function.
2756 (ppc64_emit_zero_ext): New function.
2757 (ppc64_emit_log_not): New function.
2758 (ppc64_emit_bit_and): New function.
2759 (ppc64_emit_bit_or): New function.
2760 (ppc64_emit_bit_xor): New function.
2761 (ppc64_emit_bit_not): New function.
2762 (ppc64_emit_equal): New function.
2763 (ppc64_emit_less_signed): New function.
2764 (ppc64_emit_less_unsigned): New function.
2765 (ppc64_emit_ref): New function.
2766 (ppc64_emit_const): New function.
2767 (ppc64v1_emit_reg): New function.
2768 (ppc64v2_emit_reg): New function.
2769 (ppc64_emit_pop): New function.
2770 (ppc64_emit_stack_flush): New function.
2771 (ppc64_emit_swap): New function.
2772 (ppc64v1_emit_call): New function.
2773 (ppc64v2_emit_call): New function.
2774 (ppc64v1_emit_int_call_1): New function.
2775 (ppc64v2_emit_int_call_1): New function.
2776 (ppc64v1_emit_void_call_2): New function.
2777 (ppc64v2_emit_void_call_2): New function.
2778 (ppc64_emit_if_goto): New function.
2779 (ppc64_emit_eq_goto): New function.
2780 (ppc64_emit_ne_goto): New function.
2781 (ppc64_emit_lt_goto): New function.
2782 (ppc64_emit_le_goto): New function.
2783 (ppc64_emit_gt_goto): New function.
2784 (ppc64_emit_ge_goto): New function.
2785 (ppc64v1_emit_ops_impl): New static variable.
2786 (ppc64v2_emit_ops_impl): New static variable.
2787 (ppc_emit_ops): New function.
2788 (linux_low_target): Wire in ppc_emit_ops.
2789
2790 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2791 Marcin Kościelnicki <koriakin@0x04.net>
2792
2793 PR/17221
2794 * Makefile.in: Add powerpc-*-ipa.o
2795 * configure.srv: Add ipa_obj for powerpc*-linux.
2796 * linux-ppc-ipa.c: New file.
2797 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2798 includes.
2799 (PPC_FIELD): New macro.
2800 (PPC_SEXT): New macro.
2801 (PPC_OP6): New macro.
2802 (PPC_BO): New macro.
2803 (PPC_LI): New macro.
2804 (PPC_BD): New macro.
2805 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2806 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2807 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2808 (ppc_get_thread_area): New function.
2809 (is_elfv2_inferior): New function.
2810 (gen_ds_form): New function.
2811 (GEN_STD): New macro.
2812 (GEN_STDU): New macro.
2813 (GEN_LD): New macro.
2814 (GEN_LDU): New macro.
2815 (gen_d_form): New function.
2816 (GEN_ADDI): New macro.
2817 (GEN_ADDIS): New macro.
2818 (GEN_LI): New macro.
2819 (GEN_LIS): New macro.
2820 (GEN_ORI): New macro.
2821 (GEN_ORIS): New macro.
2822 (GEN_LWZ): New macro.
2823 (GEN_STW): New macro.
2824 (GEN_STWU): New macro.
2825 (gen_xfx_form): New function.
2826 (GEN_MFSPR): New macro.
2827 (GEN_MTSPR): New macro.
2828 (GEN_MFCR): New macro.
2829 (GEN_MTCR): New macro.
2830 (GEN_SYNC): New macro.
2831 (GEN_LWSYNC): New macro.
2832 (gen_x_form): New function.
2833 (GEN_OR): New macro.
2834 (GEN_MR): New macro.
2835 (GEN_LWARX): New macro.
2836 (GEN_STWCX): New macro.
2837 (GEN_CMPW): New macro.
2838 (gen_md_form): New function.
2839 (GEN_RLDICL): New macro.
2840 (GEN_RLDICR): New macro.
2841 (gen_i_form): New function.
2842 (GEN_B): New macro.
2843 (GEN_BL): New macro.
2844 (gen_b_form): New function.
2845 (GEN_BNE): New macro.
2846 (GEN_LOAD): New macro.
2847 (GEN_STORE): New macro.
2848 (gen_limm): New function.
2849 (gen_atomic_xchg): New function.
2850 (gen_call): New function.
2851 (ppc_relocate_instruction): New function.
2852 (ppc_install_fast_tracepoint_jump_pad): New function.
2853 (ppc_get_min_fast_tracepoint_insn_len): New function.
2854 (ppc_get_ipa_tdesc_idx): New function.
2855 (the_low_target): Wire in the new functions.
2856 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2857 tdescs.
2858 * linux-ppc-tdesc.h: New file.
2859
2860 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2861
2862 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2863 (alloc_jump_pad_buffer): New function.
2864 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2865 (alloc_jump_pad_buffer): New function.
2866 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2867 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2868 (alloc_jump_pad_buffer): New function.
2869 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2870 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2871 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2872 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2873
2874 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2875
2876 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2877 * linux-amd64-ipa.c: Likewise.
2878 * linux-i386-ipa.c: Likewise.
2879 * linux-s390-ipa.c: Likewise.
2880 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2881 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2882 set_trace_state_variable_value_ptr.
2883 (struct ipa_sym_addresses): Likewise.
2884 (symbol_list): Likewise.
2885 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2886 accessing gdb_collect directly.
2887 (gdb_collect_ptr_type): New typedef.
2888 (get_raw_reg_ptr_type): New typedef.
2889 (get_trace_state_variable_value_ptr_type): New typedef.
2890 (set_trace_state_variable_value_ptr_type): New typedef.
2891 (gdb_collect_ptr): New global.
2892 (get_raw_reg_ptr): New global.
2893 (get_trace_state_variable_value_ptr): New global.
2894 (set_trace_state_variable_value_ptr): New global.
2895 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2896 accessing get_raw_reg directly.
2897 (get_get_tsv_func_addr): Likewise for
2898 get_trace_state_variable_value_ptr.
2899 (get_set_tsv_func_addr): Likewise for
2900 set_trace_state_variable_value_ptr.
2901 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2902
2903 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2904
2905 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2906
2907 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2908
2909 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2910 packets.
2911 (relocate_instruction): Remove own_buf.
2912 * server.c (own_buf): Make global.
2913 (handle_v_requests): Make global.
2914 * server.h (own_buf): New declaration.
2915 (handle_v_requests): New prototype.
2916
2917 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2918
2919 PR 18377
2920 * linux-s390-low.c (add_insns): New function.
2921 (s390_emit_prologue): New function.
2922 (s390_emit_epilogue): New function.
2923 (s390_emit_add): New function.
2924 (s390_emit_sub): New function.
2925 (s390_emit_mul): New function.
2926 (s390_emit_lsh): New function.
2927 (s390_emit_rsh_signed): New function.
2928 (s390_emit_rsh_unsigned): New function.
2929 (s390_emit_ext): New function.
2930 (s390_emit_log_not): New function.
2931 (s390_emit_bit_and): New function.
2932 (s390_emit_bit_or): New function.
2933 (s390_emit_bit_xor): New function.
2934 (s390_emit_bit_not): New function.
2935 (s390_emit_equal): New function.
2936 (s390_emit_less_signed): New function.
2937 (s390_emit_less_unsigned): New function.
2938 (s390_emit_ref): New function.
2939 (s390_emit_if_goto): New function.
2940 (s390_emit_goto): New function.
2941 (s390_write_goto_address): New function.
2942 (s390_emit_litpool): New function.
2943 (s390_emit_const): New function.
2944 (s390_emit_call): New function.
2945 (s390_emit_reg): New function.
2946 (s390_emit_pop): New function.
2947 (s390_emit_stack_flush): New function.
2948 (s390_emit_zero_ext): New function.
2949 (s390_emit_swap): New function.
2950 (s390_emit_stack_adjust): New function.
2951 (s390_emit_set_r2): New function.
2952 (s390_emit_int_call_1): New function.
2953 (s390_emit_void_call_2): New function.
2954 (s390_emit_eq_goto): New function.
2955 (s390_emit_ne_goto): New function.
2956 (s390_emit_lt_goto): New function.
2957 (s390_emit_le_goto): New function.
2958 (s390_emit_gt_goto): New function.
2959 (s390_emit_ge_goto): New function.
2960 (s390x_emit_prologue): New function.
2961 (s390x_emit_epilogue): New function.
2962 (s390x_emit_add): New function.
2963 (s390x_emit_sub): New function.
2964 (s390x_emit_mul): New function.
2965 (s390x_emit_lsh): New function.
2966 (s390x_emit_rsh_signed): New function.
2967 (s390x_emit_rsh_unsigned): New function.
2968 (s390x_emit_ext): New function.
2969 (s390x_emit_log_not): New function.
2970 (s390x_emit_bit_and): New function.
2971 (s390x_emit_bit_or): New function.
2972 (s390x_emit_bit_xor): New function.
2973 (s390x_emit_bit_not): New function.
2974 (s390x_emit_equal): New function.
2975 (s390x_emit_less_signed): New function.
2976 (s390x_emit_less_unsigned): New function.
2977 (s390x_emit_ref): New function.
2978 (s390x_emit_if_goto): New function.
2979 (s390x_emit_const): New function.
2980 (s390x_emit_call): New function.
2981 (s390x_emit_reg): New function.
2982 (s390x_emit_pop): New function.
2983 (s390x_emit_stack_flush): New function.
2984 (s390x_emit_zero_ext): New function.
2985 (s390x_emit_swap): New function.
2986 (s390x_emit_stack_adjust): New function.
2987 (s390x_emit_int_call_1): New function.
2988 (s390x_emit_void_call_2): New function.
2989 (s390x_emit_eq_goto): New function.
2990 (s390x_emit_ne_goto): New function.
2991 (s390x_emit_lt_goto): New function.
2992 (s390x_emit_le_goto): New function.
2993 (s390x_emit_gt_goto): New function.
2994 (s390x_emit_ge_goto): New function.
2995 (s390_emit_ops): New function.
2996 (struct linux_target_ops): Fill in emit_ops hook.
2997
2998 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2999
3000 PR 18377
3001 * Makefile.in: Add s390 IPA files.
3002 * configure.srv: Build IPA for s390.
3003 * linux-s390-ipa.c: New file.
3004 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3005 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3006 (tdesc_s390_linux32): Likewise.
3007 (init_registers_s390_linux32v1): Likewise.
3008 (tdesc_s390_linux32v1): Likewise.
3009 (init_registers_s390_linux32v2): Likewise.
3010 (tdesc_s390_linux32v2): Likewise.
3011 (init_registers_s390_linux64): Likewise.
3012 (tdesc_s390_linux64): Likewise.
3013 (init_registers_s390_linux64v1): Likewise.
3014 (tdesc_s390_linux64v1): Likewise.
3015 (init_registers_s390_linux64v2): Likewise.
3016 (tdesc_s390_linux64v2): Likewise.
3017 (init_registers_s390_te_linux64): Likewise.
3018 (tdesc_s390_te_linux64): Likewise.
3019 (init_registers_s390_vx_linux64): Likewise.
3020 (tdesc_s390_vx_linux64): Likewise.
3021 (init_registers_s390_tevx_linux64): Likewise.
3022 (tdesc_s390_tevx_linux64): Likewise.
3023 (init_registers_s390x_linux64): Likewise.
3024 (tdesc_s390x_linux64): Likewise.
3025 (init_registers_s390x_linux64v1): Likewise.
3026 (tdesc_s390x_linux64v1): Likewise.
3027 (init_registers_s390x_linux64v2): Likewise.
3028 (tdesc_s390x_linux64v2): Likewise.
3029 (init_registers_s390x_te_linux64): Likewise.
3030 (tdesc_s390x_te_linux64): Likewise.
3031 (init_registers_s390x_vx_linux64): Likewise.
3032 (tdesc_s390x_vx_linux64): Likewise.
3033 (init_registers_s390x_tevx_linux64): Likewise.
3034 (tdesc_s390x_tevx_linux64): Likewise.
3035 (have_hwcap_s390_vx): New static variable.
3036 (s390_arch_setup): Fill have_hwcap_s390_vx.
3037 (s390_get_thread_area): New function.
3038 (s390_ft_entry_gpr_esa): New const.
3039 (s390_ft_entry_gpr_zarch): New const.
3040 (s390_ft_entry_misc): New const.
3041 (s390_ft_entry_fr): New const.
3042 (s390_ft_entry_vr): New const.
3043 (s390_ft_main_31): New const.
3044 (s390_ft_main_64): New const.
3045 (s390_ft_exit_fr): New const.
3046 (s390_ft_exit_vr): New const.
3047 (s390_ft_exit_misc): New const.
3048 (s390_ft_exit_gpr_esa): New const.
3049 (s390_ft_exit_gpr_zarch): New const.
3050 (append_insns): New function.
3051 (s390_relocate_instruction): New function.
3052 (s390_install_fast_tracepoint_jump_pad): New function.
3053 (s390_get_min_fast_tracepoint_insn_len): New function.
3054 (s390_get_ipa_tdesc_idx): New function.
3055 (struct linux_target_ops): Wire in the above functions.
3056 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3057 * linux-s390-tdesc.h: New file.
3058
3059 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3060
3061 * linux-s390-low.c (s390_supports_tracepoints): New function.
3062 (struct linux_target_ops): Fill supports_tracepoints hook.
3063
3064 2016-03-18 Yao Qi <yao.qi@linaro.org>
3065
3066 * linux-low.c (lwp_signal_can_be_delivered): New function.
3067 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3068
3069 2016-03-18 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3072 0 if signal is enqueued. Remove 'signal' from one debugging
3073 message. Move one debugging message to some lines below.
3074 Remove code setting 'signal' to 0.
3075
3076 2016-03-18 Yao Qi <yao.qi@linaro.org>
3077
3078 * linux-low.c (linux_low_filter_event): Remove redundant
3079 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3080
3081 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3082
3083 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3084 (struct linux_target_ops): Wire in the above.
3085
3086 2016-03-03 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-low.c: Update comments to start_step_over.
3089
3090 2016-03-03 Yao Qi <yao.qi@linaro.org>
3091
3092 PR server/19736
3093 * linux-low.c (handle_extended_wait): Set child suspended
3094 if event_lwp->bp_reinsert isn't zero.
3095
3096 2016-03-02 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3099 enqueue_pending_signal.
3100
3101 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3102
3103 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3104 is actually loaded.
3105
3106 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3107
3108 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3109 (s390_regmap_3264) [!__s390x__]: New global.
3110 (s390_collect_ptrace_register): Skip map entries containing -1.
3111 (s390_supply_ptrace_register): Ditto.
3112 (s390_fill_gprs_high): New function.
3113 (s390_store_gprs_high): New function.
3114 (s390_regsets): Add NT_S390_HIGH_GPRS.
3115 (s390_get_hwcap): Enable on 31-bit.
3116 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3117 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3118 Detect NT_S390_HIGH_GPRS.
3119 (s390_usrregs_info_3264): Enable on 31-bit.
3120 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3121 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3122
3123 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3124
3125 PR gdb/13808
3126 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3127 * configure.srv: Ditto.
3128 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3129 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3130 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3131 (init_registers_amd64_linux): Remove prototype.
3132 (tdesc_amd64_linux): Remove declaration.
3133 (get_ipa_tdesc): New function.
3134 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3135 initialize remaining tdescs.
3136 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3137 (init_registers_i386_linux): Remove prototype.
3138 (tdesc_i386_linux): Remove declaration.
3139 (get_ipa_tdesc): New function.
3140 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3141 initialize remaining tdescs.
3142 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3143 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3144 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3145 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3146 (x86_get_ipa_tdesc_idx): New function.
3147 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3148 * linux-x86-tdesc.h: New file.
3149 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3150 (target_get_ipa_tdesc_idx): New macro.
3151 * tracepoint.c (ipa_tdesc_idx): New macro.
3152 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3153 (symbol_list): Add ipa_tdesc_idx.
3154 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3155 (ipa_tdesc): Remove.
3156 (ipa_tdesc_idx): New variable.
3157 (get_context_regcache): Use get_ipa_tdesc.
3158 (gdb_collect): Ditto.
3159 (gdb_probe): Ditto.
3160 * tracepoint.h (get_ipa_tdesc): New prototype.
3161 (ipa_tdesc): Remove.
3162
3163 2016-02-24 Pedro Alves <palves@redhat.com>
3164
3165 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3166 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3167 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3168 Factor out common code between the USE_SIGTRAP_SIGINFO and
3169 !USE_SIGTRAP_SIGINFO blocks.
3170 (linux_low_filter_event): Call save_stop_reason instead of
3171 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3172 Update comments.
3173 (linux_wait_1): Update comments.
3174
3175 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3176
3177 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3178 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3179 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3180 ppc_insert_point, ppc_remove_point.
3181
3182 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3183
3184 * linux-s390-low.c (s390_supports_z_point_type): New function.
3185 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3186
3187 2016-02-16 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3190 PC. Get pc from regcache_read_pc.
3191
3192 2016-02-12 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3195 or linux_get_pc_32bit.
3196 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3197
3198 2016-02-12 Yao Qi <yao.qi@linaro.org>
3199
3200 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3201 arm_linux_get_next_pcs_fixup.
3202
3203 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3204
3205 * tracepoint.c (x_tracepoint_action_download): Change
3206 write_inferior_data_ptr to write_inferior_data_pointer.
3207 (cmd_qtstart): Likewise.
3208 (write_inferior_data_ptr): Remove.
3209 (download_agent_expr): Change write_inferior_data_ptr to
3210 write_inferior_data_pointer.
3211 (download_tracepoint_1): Likewise.
3212 (download_tracepoint): Likewise.
3213 (download_trace_state_variables): Likewise.
3214
3215 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3216 Marcin Kościelnicki <koriakin@0x04.net>
3217
3218 * tracepoint.c (struct tracepoint_action_ops): Remove.
3219 (struct tracepoint_action): Remove ops.
3220 (m_tracepoint_action_download, r_tracepoint_action_download)
3221 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3222 size and offset accordingly.
3223 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3224 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3225 (tracepoint_action_send, tracepoint_action_download): New functions.
3226 Helpers for trace action handlers.
3227 (add_tracepoint_action): Remove setup actions ops.
3228 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3229
3230 2016-02-10 Yao Qi <yao.qi@linaro.org>
3231
3232 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3233
3234 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3235
3236 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3237 to AC_OUTPUT.
3238 * configure: Regenerate.
3239
3240 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3241
3242 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3243 void * to gdb_byte *.
3244 * linux-low.c (siginfo_fixup): Likewise.
3245 (linux_xfer_siginfo): Likewise.
3246 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3247 Likewise.
3248 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3249
3250 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3251
3252 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3253 to srv_tgtobj.
3254 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3255 to srv_tgtobj.
3256 * linux-x86-low.c [__x86_64__]: Include
3257 "nat/amd64-linux-siginfo.h".
3258 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3259 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3260 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3261 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3262 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3263 (cpt_si_fd, si_timerid, si_overrun): Move from
3264 nat/amd64-linux-siginfo.c.
3265 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3266
3267 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * server.c (skip_to_semicolon): Remove.
3270 (process_point_options): Use strchrnul instead of
3271 skip_to_semicolon.
3272
3273 2016-01-26 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3276 * linux-low.c (install_software_single_step_breakpoints): Don't
3277 call regcache_read_pc.
3278 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3279 argument pc.
3280
3281 2016-01-26 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-low.c (install_software_single_step_breakpoints): Call
3284 regcache_read_pc instead of get_pc.
3285
3286 2016-01-26 Yao Qi <yao.qi@linaro.org>
3287
3288 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3289 (unblock_async_io): Rename to ...
3290 (block_unblock_async_io): ... it. New function.
3291 (enable_async_io): Don't install SIGIO handler. Unblock it
3292 instead.
3293 (disable_async_io): Don't ignore SIGIO. Block it instead.
3294 (initialize_async_io): Install SIGIO handler. Don't call
3295 unblock_async_io.
3296
3297 2016-01-26 Yao Qi <yao.qi@linaro.org>
3298
3299 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3300 first character is '\003', call *the_target->request_interrupt.
3301
3302 2016-01-25 Yao Qi <yao.qi@linaro.org>
3303
3304 * remote-utils.c (new_thread_notify): Remove.
3305 (dead_thread_notify): Likewise.
3306 * remote-utils.h (new_thread_notify): Remove declaration.
3307 (dead_thread_notify): Likewise.
3308
3309 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3310
3311 * gdb.trace/pending.exp: Fix expected message on continue.
3312
3313 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3314
3315 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3316 it works properly on big-endian machines where sizeof (CORE_ADDR)
3317 != sizeof (void *).
3318
3319 2016-01-21 Pedro Alves <palves@redhat.com>
3320
3321 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3322 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3323 * configure: Regenerate.
3324
3325 2016-01-21 Yao Qi <yao.qi@linaro.org>
3326
3327 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3328 is_thumb and set it according to CPSR saved on the stack.
3329 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3330 arm_sigreturn_next_pc.
3331
3332 2016-01-18 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-low.c (linux_set_pc_64bit): New function.
3335 (linux_get_pc_64bit): New function.
3336 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3337 Declare.
3338 * linux-sparc-low.c (debug_threads): Remove declaration.
3339 (sparc_get_pc): Remove.
3340 (the_low_target): Use linux_get_pc_64bit instead of
3341 sparc_get_pc.
3342 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3343 (the_low_target): Use linux_get_pc_64bit and
3344 linux_set_pc_64bit.
3345
3346 2016-01-18 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-arm-low.c (debug_threads): Remove declaration.
3349 (arm_get_pc, arm_set_pc): Remove.
3350 (the_low_target): Use linux_get_pc_32bit and
3351 linux_set_pc_32bit.
3352 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3353 (the_low_target): Use linux_get_pc_32bit and
3354 linux_set_pc_32bit.
3355 * linux-cris-low.c (debug_threads): Remove declaration.
3356 (cris_get_pc, cris_set_pc,): Remove.
3357 (the_low_target): Use linux_get_pc_32bit and
3358 linux_set_pc_32bit.
3359 * linux-crisv32-low.c (debug_threads): Remove declaration.
3360 (cris_get_pc, cris_set_pc): Remove.
3361 (the_low_target): Use linux_get_pc_32bit and
3362 linux_set_pc_32bit.
3363 * linux-low.c: Include inttypes.h.
3364 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3365 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3366 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3367 (the_low_target): Use linux_get_pc_32bit and
3368 linux_set_pc_32bit.
3369 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3370 (the_low_target): Use linux_get_pc_32bit and
3371 linux_set_pc_32bit.
3372 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3373 (the_low_target): Use linux_get_pc_32bit and
3374 linux_set_pc_32bit.
3375 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3376 (the_low_target): Use linux_get_pc_32bit and
3377 linux_set_pc_32bit.
3378 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3379 (the_low_target): Use linux_get_pc_32bit and
3380 linux_set_pc_32bit.
3381
3382 2016-01-18 Gary Benson <gbenson@redhat.com>
3383
3384 * configure.ac (AC_FUNC_FORK): New check.
3385 * config.in: Regenerate.
3386 * configure: Likewise.
3387
3388 2016-01-14 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3391 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3392 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3393 arm_get_next_pcs_ctor.
3394
3395 2016-01-12 Josh Stone <jistone@redhat.com>
3396 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3397
3398 * inferiors.h: Include "gdb_vecs.h".
3399 (struct process_info): Add syscalls_to_catch.
3400 * inferiors.c (remove_process): Free syscalls_to_catch.
3401 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3402 syscall_return stops.
3403 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3404 * server.c (handle_general_set): Handle QCatchSyscalls.
3405 (handle_query): Report support for QCatchSyscalls.
3406 * target.h (struct target_ops): Add supports_catch_syscall.
3407 (target_supports_catch_syscall): New macro.
3408 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3409 (struct lwp_info): Add syscall_state.
3410 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3411 Maintain syscall_state and syscalls_to_catch across exec.
3412 (get_syscall_trapinfo): New function, proxy to the_low_target.
3413 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3414 (linux_low_filter_event): Toggle syscall_state entry/return for
3415 syscall traps, and set it ignored for all others.
3416 (gdb_catching_syscalls_p): New function.
3417 (gdb_catch_this_syscall_p): New function.
3418 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3419 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3420 (linux_supports_catch_syscall): New function.
3421 (linux_target_ops): Install it.
3422 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3423 (the_low_target): Install it.
3424
3425 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3426
3427 * acinclude.m4: Include new ../warning.m4 file.
3428 * configure: Regenerated.
3429 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3430
3431 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3432
3433 * ax.c (is_goto_target): Mark static.
3434 * linux-low.c (register_addr): Likewise.
3435 (linux_fetch_registers, linux_store_registers): Likewise.
3436 * mem-break.c (any_persistent_commands): Fix old prototype.
3437 (add_commands_to_breakpoint): Mark static.
3438 * regcache.c (find_register_by_name): Delete unused func.
3439 * remote-utils.c (hex_or_minus_one): Mark static.
3440 * server.c (monitor_show_help): Mark static.
3441 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3442 handle_v_requests): Likewise.
3443
3444 2016-01-12 Pedro Alves <palves@redhat.com>
3445
3446 Remove use of the registered trademark symbol throughout.
3447
3448 2016-01-08 Yao Qi <yao.qi@linaro.org>
3449
3450 * remote-utils.c (getpkt): If c is '\003', call target hook
3451 request_interrupt.
3452
3453 2016-01-06 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3456 linux-aarch32-low.c.
3457 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3458 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3459 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3460 (thumb2_breakpoint): Declare.
3461 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3462 linux-aarch32-low.h.
3463 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3464 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3465 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3466
3467 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3468
3469 * gdbreplay.c (gdbreplay_version): Change copyright year in
3470 version message.
3471 * server.c (gdbserver_version): Likewise.
3472
3473 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3474
3475 * server.c (crc32_table): Delete.
3476 (crc32): Use libiberty's xcrc32 function.
3477
3478 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3479
3480 * lynx-low.c (lynx_delete_thread_callback): New function.
3481 (lynx_mourn): Properly delete our process and all of its
3482 threads. Remove call to clear_inferiors.
3483
3484 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3485
3486 * target.c (thread_search_callback): Add check that
3487 the thread_stopped target callback is not NULL before
3488 calling it.
3489
3490 2015-12-21 Yao Qi <yao.qi@linaro.org>
3491
3492 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3493 arm breakpoint.
3494
3495 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3496
3497 * server.c (handle_query): Call target_supports_software_single_step.
3498
3499 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3500
3501 * linux-low.c (single_step): New function.
3502 (linux_resume_one_lwp_throw): Call single_step.
3503 (start_step_over): Likewise.
3504
3505 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3506
3507 * Makefile.in (SFILES): Append arch/arm-linux.c,
3508 arch/arm-get-next-pcs.c.
3509 (arm-linux.o): New rule.
3510 (arm-get-next-pcs.o): New rule.
3511 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3512 arm-linux.o.
3513 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3514 to linux-aarch32-low.c.
3515 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3516 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3517 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3518 (thumb2_breakpoint_len): Likewise.
3519 (arm_is_thumb_mode): Make non-static.
3520 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3521 from linux-aarch32-low.c.
3522 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3523 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3524 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3525 (thumb2_breakpoint_len): Likewise.
3526 (arm_is_thumb_mode): New declaration.
3527 * linux-arm-low.c: Include arch/arm-linux.h
3528 aarch/arm-get-next-pcs.h, sys/syscall.h.
3529 (get_next_pcs_ops): New struct.
3530 (get_next_pcs_addr_bits_remove): New function.
3531 (get_next_pcs_is_thumb): New function.
3532 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3533 (arm_sigreturn_next_pc): Likewise.
3534 (get_next_pcs_syscall_next_pc): Likewise.
3535 (arm_gdbserver_get_next_pcs): Likewise.
3536 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3537 Initialize.
3538 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3539 * server.h: Include gdb_vecs.h.
3540
3541 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3542
3543 * Makefile.in (SFILES): Append common/common-regcache.c.
3544 (OBS): Append common-regcache.o.
3545 (common-regcache.o): New rule.
3546 * regcache.c (init_register_cache): Initialize cache to
3547 REG_UNAVAILABLE.
3548 (regcache_raw_read_unsigned): New function.
3549 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3550 register_status enum.
3551
3552 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3553
3554 * linux-aarch64-low.c (the_low_targets): Rename
3555 breakpoint_reinsert_addr to get_next_pcs.
3556 * linux-arm-low.c (the_low_targets): Likewise.
3557 * linux-bfin-low.c (the_low_targets): Likewise.
3558 * linux-cris-low.c (the_low_targets): Likewise.
3559 * linux-crisv32-low.c (the_low_targets): Likewise.
3560 * linux-low.c (can_software_single_step): Likewise.
3561 (install_software_single_step_breakpoints): New function.
3562 (start_step_over): Use install_software_single_step_breakpoints.
3563 * linux-low.h: New CORE_ADDR vector.
3564 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3565 get_next_pcs.
3566 * linux-mips-low.c (the_low_targets): Likewise.
3567 * linux-nios2-low.c (the_low_targets): Likewise.
3568 * linux-sparc-low.c (the_low_targets): Likewise.
3569
3570 2015-12-17 Pedro Alves <palves@redhat.com>
3571
3572 * linux-low.c (linux_kill_one_lwp): Remove references to
3573 LinuxThreads.
3574 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3575 to 'kill'.
3576 (linux_init_signals): Delete.
3577 (initialize_low): Adjust.
3578 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3579
3580 2015-12-16 Pedro Alves <palves@redhat.com>
3581
3582 * configure.ac (compiler warning flags): When testing a
3583 -Wno-foo option, check whether -Wfoo works instead.
3584 * configure: Regenerate.
3585
3586 2015-12-11 Don Breazeal <donb@codesourcery.com>
3587
3588 * server.c (process_serial_event): Don't exit from gdbserver
3589 in remote mode if there are still active inferiors.
3590
3591 2015-12-11 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3594 arm_breakpoint_at if the process is 32-bit.
3595
3596 2015-12-11 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3599 arm breakpoint.
3600
3601 2015-12-07 Yao Qi <yao.qi@linaro.org>
3602
3603 * configure.srv: Append arm.o to srv_tgtobj for
3604 aarch64*-*-linux* target.
3605 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3606 from linux-arm-low.c.
3607 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3608 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3609 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3610 (thumb2_breakpoint_len): Likewise.
3611 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3612 (arm_breakpoint_kinds): Likewise.
3613 (arm_breakpoint_kind_from_pc): Likewise.
3614 (arm_sw_breakpoint_from_kind): Likewise.
3615 (arm_breakpoint_kind_from_current_state): Likewise.
3616 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3617 (arm_sw_breakpoint_from_kind): Declare.
3618 (arm_breakpoint_kind_from_current_state): Declare.
3619 (arm_breakpoint_at): Declare.
3620 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3621 arm_sw_breakpoint_from_kind if process is 32-bit.
3622 (aarch64_breakpoint_kind_from_pc): New function.
3623 (aarch64_breakpoint_kind_from_current_state): New function.
3624 (the_low_target): Initialize fields breakpoint_kind_from_pc
3625 and breakpoint_kind_from_current_state.
3626 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3627 linux-aarch32-low.c.
3628 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3629 (arm_breakpoint, arm_breakpoint_len): Likewise.
3630 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3631 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3632 (arm_is_thumb_mode): Likewise.
3633 (arm_breakpoint_at): Likewise.
3634 (arm_breakpoint_kind_from_pc): Likewise.
3635 (arm_sw_breakpoint_from_kind): Likewise.
3636 (arm_breakpoint_kind_from_current_state): Likewise.
3637
3638 Revert:
3639 2015-08-04 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3642 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3643 * server.c (extended_protocol): Remove "static".
3644 * server.h (extended_protocol): Declare it.
3645
3646 2015-12-04 Josh Stone <jistone@redhat.com>
3647
3648 * target.h (struct target_ops) <arch_setup>: Rename to ...
3649 (struct target_ops) <post_create_inferior>: ... this.
3650 (target_arch_setup): Rename to ...
3651 (target_post_create_inferior): ... this, calling post_create_inferior.
3652 * server.c (start_inferior): Update target_arch_setup calls to
3653 target_post_create_inferior.
3654 * linux-low.c (linux_low_ptrace_options): Forward declare.
3655 (linux_arch_setup): Update its comment for general use.
3656 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3657 (struct linux_target_ops): Use linux_post_create_inferior.
3658 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3659 to post_create_inferior.
3660 * nto-low.c (struct nto_target_ops): Likewise.
3661 * spu-low.c (struct spu_target_ops): Likewise.
3662 * win32-low.c (struct win32_target_ops): Likewise.
3663
3664 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3665
3666 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3667
3668 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3669
3670 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3671 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3672 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3673 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3674 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3675 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3676 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3677 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3678 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3679 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3680 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3681 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3682
3683 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3684
3685 * linux-low.c (linux_look_up_symbols): Don't call
3686 linux_supports_traceclone.
3687 * linux-low.h (thread_db_init): Remove use_events argument.
3688 * thread-db.c (thread_db_use_event): Remove global variable.
3689 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3690 (struct thread_db) <td_create_bp>: Remove field.
3691 (thread_db_create_event): Remove function.
3692 (thread_db_enable_reporting): Likewise.
3693 (find_one_thread): Don't check for thread_db_use_events.
3694 (attach_thread): Likewise.
3695 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3696 (try_thread_db_load_1): Don't check for thread_db_use_events.
3697 (thread_db_init): Remove use_events argument and thread events
3698 handling.
3699 (remove_thread_event_breakpoints): Remove function.
3700 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3701
3702 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3703
3704 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3705 New function.
3706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3707 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3708 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3709 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3710 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3711 Initialize.
3712 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3713 New function.
3714 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3715 * linux-low.c (can_hardware_single_step): Use
3716 supports_hardware_single_step.
3717 (can_software_single_step): New function.
3718 (start_step_over): Call can_software_single_step.
3719 (linux_supports_hardware_single_step): New function.
3720 (struct target_ops) <supports_software_single_step>: Initialize.
3721 * linux-low.h (struct linux_target_ops)
3722 <supports_hardware_single_step>: Initialize.
3723 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3724 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3725 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3726 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3727 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3728 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3729 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3730 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3731 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3732 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3733 Initialize.
3734 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3735 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3736 Initialize.
3737 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3738 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3739 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3740 New function.
3741 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3742 * target.h (struct target_ops): <supports_software_single_step>:
3743 New field.
3744 (target_supports_software_single_step): New macro.
3745
3746 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3747
3748 * linux-low.c (linux_wait_1): Fix pc advance condition.
3749 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3750 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3751
3752 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3753
3754 * linux-arm-low.c (arm_is_thumb_mode): New function.
3755 (arm_breakpoint_at): Use arm_is_thumb_mode.
3756 (arm_breakpoint_kind_from_current_state): New function.
3757 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3758 Initialize.
3759 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3760 (linux_breakpoint_kind_from_current_state): New function.
3761 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3762 * linux-low.h (struct linux_target_ops)
3763 <breakpoint_kind_from_current_state>: New field.
3764 * target.h (struct target_ops): Likewise.
3765 (target_breakpoint_kind_from_current_state): New macro.
3766
3767 2015-11-30 Pedro Alves <palves@redhat.com>
3768
3769 * linux-low.c (linux_resume): Wake up the event loop before
3770 returning.
3771
3772 2015-11-30 Pedro Alves <palves@redhat.com>
3773
3774 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3775 check.
3776 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3777 to -1.
3778 * target.c (struct thread_search): New structure.
3779 (thread_search_callback): New function.
3780 (prev_general_thread): New global.
3781 (prepare_to_access_memory, done_accessing_memory): New functions.
3782 * target.h (prepare_to_access_memory, done_accessing_memory):
3783 Replace macros with function declarations.
3784
3785 2015-11-30 Pedro Alves <palves@redhat.com>
3786
3787 PR 14618
3788 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3789 report TARGET_WAITKIND_NO_RESUMED.
3790 * remote-utils.c (prepare_resume_reply): Handle
3791 TARGET_WAITKIND_NO_RESUMED.
3792 * server.c (report_no_resumed): New global.
3793 (handle_query) <qSupported>: Handle "no-resumed+". Report
3794 "no-resumed+" support.
3795 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3796 return error if the client doesn't support no-resumed events.
3797 (push_stop_notification): New function.
3798 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3799 events if the client supports them.
3800
3801 2015-11-30 Pedro Alves <palves@redhat.com>
3802
3803 * linux-low.c (thread_still_has_status_pending_p): Don't check
3804 vCont;t here.
3805 (lwp_resumed): New function.
3806 (status_pending_p_callback): Return early if the LWP is not
3807 supposed to be resumed.
3808
3809 2015-11-30 Pedro Alves <palves@redhat.com>
3810
3811 * linux-low.c (handle_extended_wait): Assert that the LWP's
3812 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3813 thread create events, leave the new child's status pending.
3814 (linux_low_filter_event): If GDB wants to hear about thread exit
3815 events, leave the LWP marked dead and don't delete it.
3816 (linux_wait_for_event_filtered): Don't check for thread exit.
3817 (filter_exit_event): New function.
3818 (linux_wait_1): Use it, when returning an exit event.
3819 (linux_resume_one_lwp_throw): Assert that the LWP's
3820 waitstatus is TARGET_WAITKIND_IGNORE.
3821 * remote-utils.c (prepare_resume_reply): Handle
3822 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3823 * server.c (report_thread_events): New global.
3824 (handle_general_set): Handle QThreadEvents.
3825 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3826 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3827 TARGET_WAITKIND_THREAD_EXITED.
3828 * server.h (report_thread_events): Declare.
3829
3830 2015-11-30 Pedro Alves <palves@redhat.com>
3831
3832 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3833 the thread's last_resume_kind was resume_stop.
3834
3835 2015-11-30 Pedro Alves <palves@redhat.com>
3836
3837 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3838 before returning.
3839
3840 2015-11-30 Pedro Alves <palves@redhat.com>
3841
3842 * server.c (handle_v_requests): Handle vCtrlC.
3843
3844 2015-11-30 Pedro Alves <palves@redhat.com>
3845
3846 * gdbthread.h (find_any_thread_of_pid): Declare.
3847 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3848 functions.
3849 * server.c (handle_query): If current_thread is NULL, look for
3850 another thread of the selected process.
3851
3852 2015-11-26 Daniel Colascione <dancol@dancol.org>
3853 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3856 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3857 name in reply.
3858 * target.h (struct target_ops) <thread_name>: New field.
3859 (target_thread_name): New macro.
3860
3861 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3862
3863 * regcache.h (regcache_invalidate_pid): Add declaration.
3864 * regcache.c (regcache_invalidate_pid): New function, extracted
3865 from regcache_invalidate.
3866 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3867 Add trivial documentation comment.
3868 * lynx-low.c: Use regcache_invalidate_pid instead of
3869 regcache_invalidate.
3870
3871 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3872
3873 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3874 and Elf64_auxv_t if the target is Android.
3875
3876 2015-11-22 Doug Evans <xdje42@gmail.com>
3877
3878 * target.h: #include <sys/types.h>.
3879
3880 2015-11-19 Pedro Alves <palves@redhat.com>
3881
3882 * linux-low.c (linux_process_qsupported): Change prototype.
3883 Adjust.
3884 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3885 Change prototype.
3886 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3887 and adjust to loop over all features.
3888 * server.c (handle_query) <qSupported>: Adjust to call
3889 target_process_qsupported once, passing it a vector of unprocessed
3890 features.
3891 * target.h (struct target_ops) <process_qsupported>: Change
3892 prototype.
3893 (target_process_qsupported): Adjust.
3894
3895 2015-11-19 Pedro Alves <palves@redhat.com>
3896
3897 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3898 mode.
3899 * configure: Regenerate.
3900
3901 2015-11-19 Pedro Alves <palves@redhat.com>
3902
3903 * configure: Regenerate.
3904
3905 2015-11-19 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3908 type to uint32_t.
3909
3910 2015-11-19 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3913 (struct aarch64_operand): Move enum out.
3914
3915 2015-11-19 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3918 struct user_fpsimd_state *.
3919 (aarch64_store_fpregset): Likewise.
3920
3921 2015-11-19 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3924 struct user_pt_regs *.
3925 (aarch64_store_gregset): Likewise.
3926
3927 2015-11-18 Pedro Alves <palves@redhat.com>
3928
3929 * Makefile.in (all_object_files): Add $IPA_OBJS.
3930
3931 2015-11-17 Pedro Alves <palves@redhat.com>
3932
3933 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3934 GDB_SIGNAL_0 and gdb_signal_to_string.
3935
3936 2015-11-17 Pedro Alves <palves@redhat.com>
3937
3938 * win32-low.c (handle_output_debug_string): Remove parameter.
3939 (win32_kill): Remove our_status local and adjust call to
3940 handle_output_debug_string.
3941 (get_child_debug_event): Adjust call to
3942 handle_output_debug_string.
3943
3944 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3945
3946 * linux-mips-low.c (mips_fill_gregset): Add cast.
3947 (mips_store_gregset): Likewise.
3948 (mips_fill_fpregset): Likewise.
3949 (mips_store_fpregset): Likewise.
3950
3951 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3952
3953 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3954 priv.
3955
3956 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3957
3958 * linux-mips-low.c (mips_linux_new_thread): Change type of
3959 watch_type to enum target_hw_bp_type.
3960
3961 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3962
3963 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3964 Change return type to arm_hwbp_type.
3965
3966 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3967
3968 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3969 (arm_store_gregset): Likewise.
3970 * linux-arm-low.c (arm_get_hwcap): Likewise.
3971 (arm_read_description): Likewise.
3972
3973 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3974
3975 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3976
3977 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3978
3979 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3980 (ppc_fill_vsxregset): Likewise.
3981 (ppc_store_vsxregset): Likewise.
3982 (ppc_fill_vrregset): Likewise.
3983 (ppc_store_vrregset): Likewise.
3984 (ppc_fill_evrregset): Likewise.
3985 (ppc_store_evrregset): Likewise.
3986
3987 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3988
3989 * linux-ppc-low.c (ppc_usrregs_info): Remove
3990 forward-declaration.
3991 (ppc_arch_setup): Move lower in file.
3992
3993 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3996 (ps_pdwrite): Likewise.
3997
3998 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3999
4000 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4001 to after assert checks.
4002
4003 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4004
4005 * proc-service.c (ps_pdread): Add/adjust casts.
4006 (ps_pdwrite): Add/adjust casts.
4007
4008 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4009
4010 * server.c (handle_search_memory_1): Cast return value of
4011 memmem.
4012
4013 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4014
4015 * server.c (write_qxfer_response): Change type of data to
4016 gdb_byte *.
4017
4018 2015-10-29 Pedro Alves <palves@redhat.com>
4019
4020 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4021
4022 2015-10-29 Pedro Alves <palves@redhat.com>
4023
4024 * tracepoint.c (clear_installed_tracepoints): Add casts.
4025
4026 2015-10-29 Pedro Alves <palves@redhat.com>
4027
4028 * server.c (handle_v_cont, process_serial_event): Add enum
4029 gdb_signal casts to signal parsing code.
4030
4031 2015-10-29 Pedro Alves <palves@redhat.com>
4032
4033 * linux-low.h (NULL_REGSET): Define.
4034 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4035 * linux-arm-low.c (arm_regsets): Likewise.
4036 * linux-crisv32-low.c (cris_regsets): Likewise.
4037 * linux-m68k-low.c (m68k_regsets): Likewise.
4038 * linux-mips-low.c (mips_regsets): Likewise.
4039 * linux-nios2-low.c (nios2_regsets): Likewise.
4040 * linux-ppc-low.c (ppc_regsets): Likewise.
4041 * linux-s390-low.c (s390_regsets): Likewise.
4042 * linux-sh-low.c (sh_regsets): Likewise.
4043 * linux-sparc-low.c (sparc_regsets): Likewise.
4044 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4045 * linux-tile-low.c (tile_regsets): Likewise.
4046 * linux-x86-low.c (x86_regsets): Likewise.
4047 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4048
4049 2015-10-29 Pedro Alves <palves@redhat.com>
4050
4051 * linux-low.h (NULL_REGSET): Define.
4052 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4053 * linux-arm-low.c (arm_regsets): Likewise.
4054 * linux-crisv32-low.c (cris_regsets): Likewise.
4055 * linux-m68k-low.c (m68k_regsets): Likewise.
4056 * linux-mips-low.c (mips_regsets): Likewise.
4057 * linux-nios2-low.c (nios2_regsets): Likewise.
4058 * linux-ppc-low.c (ppc_regsets): Likewise.
4059 * linux-s390-low.c (s390_regsets): Likewise.
4060 * linux-sh-low.c (sh_regsets): Likewise.
4061 * linux-sparc-low.c (sparc_regsets): Likewise.
4062 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4063 * linux-tile-low.c (tile_regsets): Likewise.
4064 * linux-x86-low.c (x86_regsets): Likewise.
4065 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4066
4067 2015-10-26 Doug Evans <dje@google.com>
4068
4069 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4070
4071 2015-10-26 Doug Evans <dje@google.com>
4072
4073 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4074
4075 2015-10-26 Doug Evans <dje@google.com>
4076
4077 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4078 for debug_printf.
4079 (attach_thread, find_new_threads_callback): Ditto.
4080
4081 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4082
4083 * mem-break.h (set_breakpoint_data): Remove.
4084
4085 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4086
4087 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4088 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4089 (initialize_low): Remove set_breakpoint_data call.
4090 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4091 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4092 (initialize_low): Remove set_breakpoint_data call.
4093 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4094 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4095 (initialize_low): Remove set_breakpoint_data call.
4096
4097 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4098
4099 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4100 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4101 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4102 * target.h (target_breakpoint_kind_from_pc): New macro.
4103
4104 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4105
4106 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4107 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4108 the default breakpoint kind.
4109
4110 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4111
4112 * linux-arm-low.c (arm_supports_z_point_type): Add software
4113 breakpoint support.
4114
4115 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4116
4117 * linux-arm-low.c: Refactor breakpoint definitions.
4118 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4119 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4120
4121 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4122
4123 * Makefile.in: Add arm.c/o.
4124 * configure.srv: Likewise.
4125 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4126 (arm_breakpoint_kind_from_pc): New function.
4127 (arm_sw_breakpoint_from_kind): Return proper kind.
4128 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4129
4130 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4131
4132 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4133 removal.
4134 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4135 (struct raw_breakpoint) <size>: Remove.
4136 (struct raw_breakpoint) <kind>: Add.
4137 (bp_size): New function.
4138 (bp_opcode): Likewise.
4139 (find_raw_breakpoint_at): Adjust for kind.
4140 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4141 (remove_memory_breakpoint): Adjust for kind call bp_size.
4142 (set_raw_breakpoint_at): Adjust for kind.
4143 (set_breakpoint): Likewise.
4144 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4145 (delete_raw_breakpoint): Adjust for kind.
4146 (delete_breakpoint): Likewise.
4147 (find_gdb_breakpoint): Likewise.
4148 (set_gdb_breakpoint_1): Likewise.
4149 (set_gdb_breakpoint): Likewise.
4150 (delete_gdb_breakpoint_1): Likewise.
4151 (delete_gdb_breakpoint): Likewise.
4152 (uninsert_raw_breakpoint): Likewise.
4153 (reinsert_raw_breakpoint): Likewise.
4154 (set_breakpoint_data): Remove.
4155 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4156 (check_mem_read): Adjust for kind call bp_size.
4157 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4158 (clone_one_breakpoint): Adjust for kind.
4159 * mem-break.h (set_gdb_breakpoint): Likewise.
4160 (delete_gdb_breakpoint): Likewise.
4161 * server.c (process_serial_event): Likewise.
4162
4163 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4164
4165 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4166 (struct linux_target_ops) <breakpoint>: Remove.
4167 (struct linux_target_ops) <breakpoint_len>: Remove.
4168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4170 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4171 (arm_sw_breakpoint_from_kind): New function.
4172 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4173 (struct linux_target_ops) <breakpoint>: Remove.
4174 (struct linux_target_ops) <breakpoint_len>: Remove.
4175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4177 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4178 (struct linux_target_ops) <breakpoint>: Remove.
4179 (struct linux_target_ops) <breakpoint_len>: Remove.
4180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4182 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4183 (struct linux_target_ops) <breakpoint>: Remove.
4184 (struct linux_target_ops) <breakpoint_len>: Remove.
4185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4187 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4188 and sw_breakpoint_from_kind to increment the pc.
4189 (linux_breakpoint_kind_from_pc): New function.
4190 (linux_sw_breakpoint_from_kind): New function.
4191 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4192 (initialize_low): Call breakpoint_kind_from_pc and
4193 sw_breakpoint_from_kind to replace breakpoint_data/len.
4194 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4195 New field.
4196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4197 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4198 (struct linux_target_ops) <breakpoint>: Remove.
4199 (struct linux_target_ops) <breakpoint_len>: Remove.
4200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4202 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4203 (struct linux_target_ops) <breakpoint>: Remove.
4204 (struct linux_target_ops) <breakpoint_len>: Remove.
4205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4207 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4208 (struct linux_target_ops) <breakpoint>: Remove.
4209 (struct linux_target_ops) <breakpoint_len>: Remove.
4210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4212 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4213 (struct linux_target_ops) <breakpoint>: Remove.
4214 (struct linux_target_ops) <breakpoint_len>: Remove.
4215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4217 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4218 (struct linux_target_ops) <breakpoint>: Remove.
4219 (struct linux_target_ops) <breakpoint_len>: Remove.
4220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4222 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4223 (struct linux_target_ops) <breakpoint>: Remove.
4224 (struct linux_target_ops) <breakpoint_len>: Remove.
4225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4227 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4228 (struct linux_target_ops) <breakpoint>: Remove.
4229 (struct linux_target_ops) <breakpoint_len>: Remove.
4230 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4232 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4233 (struct linux_target_ops) <breakpoint>: Remove.
4234 (struct linux_target_ops) <breakpoint_len>: Remove.
4235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4237 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4238 (struct linux_target_ops) <breakpoint>: Remove.
4239 (struct linux_target_ops) <breakpoint_len>: Remove.
4240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4242 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4243 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4244 (struct linux_target_ops) <breakpoint>: Remove.
4245 (struct linux_target_ops) <breakpoint_len>: Remove.
4246 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4247 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4248 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4249 (struct linux_target_ops) <breakpoint>: Remove.
4250 (struct linux_target_ops) <breakpoint_len>: Remove.
4251 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4252 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4253
4254 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4255
4256 * linux-cris-low.c (cris_get_pc): Remove void arg.
4257
4258 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4259
4260 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4261 variable name.
4262
4263 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4264
4265 * inferiors.c (thread_pid_matches_callback): New function.
4266 (find_thread_process): New function.
4267 (remove_thread): Reset current_thread.
4268 (remove_process): Assert threads have been removed first.
4269
4270 2015-10-15 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4273 if it is 3.
4274 (aarch64_remove_point): Likewise.
4275 * regcache.c (regcache_register_size): New function.
4276
4277 2015-10-12 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch64-low.c: Update all callers as emit_load_store
4280 is renamed to aarch64_emit_load_store.
4281
4282 2015-10-12 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c: Update all callers of function renaming
4285 from emit_insn to aarch64_emit_insn.
4286
4287 2015-10-12 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4290 arch/aarch64-insn.h.
4291 (struct aarch64_memory_operand): Likewise.
4292 (ENCODE): Likewise.
4293 (emit_insn): Move to arch/aarch64-insn.c.
4294 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4295 (emit_load_store): Move to arch/aarch64-insn.c.
4296 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4297 (can_encode_int32): Remove.
4298
4299 2015-10-12 Yao Qi <yao.qi@linaro.org>
4300
4301 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4302 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4303 (aarch64_relocate_instruction): Likewise.
4304 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4305 (struct aarch64_insn_visitor): Likewise.
4306
4307 2015-10-12 Yao Qi <yao.qi@linaro.org>
4308
4309 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4310 (struct aarch64_insn_visitor): New.
4311 (struct aarch64_insn_relocation_data): New.
4312 (aarch64_ftrace_insn_reloc_b): New function.
4313 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4314 (aarch64_ftrace_insn_reloc_cb): Likewise.
4315 (aarch64_ftrace_insn_reloc_tb): Likewise.
4316 (aarch64_ftrace_insn_reloc_adr): Likewise.
4317 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4318 (aarch64_ftrace_insn_reloc_others): Likewise.
4319 (visitor): New.
4320 (aarch64_relocate_instruction): Use visitor.
4321
4322 2015-10-12 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4325 int. Add argument buf.
4326 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4327 aarch64_relocate_instruction.
4328
4329 2015-10-12 Yao Qi <yao.qi@linaro.org>
4330
4331 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4332 argument insn. Remove local variable insn. Don't call
4333 target_read_uint32.
4334 (aarch64_install_fast_tracepoint_jump_pad): Call
4335 target_read_uint32.
4336
4337 2015-09-30 Yao Qi <yao.qi@linaro.org>
4338
4339 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4340 (emit_load_store_pair): Likewise.
4341
4342 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4343
4344 * dll.c (match_dll): Add cast(s).
4345 (unloaded_dll): Likewise.
4346 * linux-low.c (second_thread_of_pid_p): Likewise.
4347 (delete_lwp_callback): Likewise.
4348 (count_events_callback): Likewise.
4349 (select_event_lwp_callback): Likewise.
4350 (linux_set_resume_request): Likewise.
4351 * server.c (accumulate_file_name_length): Likewise.
4352 (emit_dll_description): Likewise.
4353 (handle_qxfer_threads_worker): Likewise.
4354 (visit_actioned_threads): Likewise.
4355 * thread-db.c (any_thread_of): Likewise.
4356 * tracepoint.c (same_process_p): Likewise.
4357 (match_blocktype): Likewise.
4358 (build_traceframe_info_xml): Likewise.
4359
4360 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4361
4362 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4363 assignment.
4364 (gdb_unparse_agent_expr): Likewise.
4365 * hostio.c (require_data): Likewise.
4366 (handle_pread): Likewise.
4367 * linux-low.c (disable_regset): Likewise.
4368 (fetch_register): Likewise.
4369 (store_register): Likewise.
4370 (get_dynamic): Likewise.
4371 (linux_qxfer_libraries_svr4): Likewise.
4372 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4373 (set_fast_tracepoint_jump): Likewise.
4374 (uninsert_fast_tracepoint_jumps_at): Likewise.
4375 (reinsert_fast_tracepoint_jumps_at): Likewise.
4376 (validate_inserted_breakpoint): Likewise.
4377 (clone_agent_expr): Likewise.
4378 * regcache.c (init_register_cache): Likewise.
4379 * remote-utils.c (putpkt_binary_1): Likewise.
4380 (decode_M_packet): Likewise.
4381 (decode_X_packet): Likewise.
4382 (look_up_one_symbol): Likewise.
4383 (relocate_instruction): Likewise.
4384 (monitor_output): Likewise.
4385 * server.c (handle_search_memory): Likewise.
4386 (handle_qxfer_exec_file): Likewise.
4387 (handle_qxfer_libraries): Likewise.
4388 (handle_qxfer): Likewise.
4389 (handle_query): Likewise.
4390 (handle_v_cont): Likewise.
4391 (handle_v_run): Likewise.
4392 (captured_main): Likewise.
4393 * target.c (write_inferior_memory): Likewise.
4394 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4395 * tracepoint.c (init_trace_buffer): Likewise.
4396 (add_tracepoint_action): Likewise.
4397 (add_traceframe): Likewise.
4398 (add_traceframe_block): Likewise.
4399 (cmd_qtdpsrc): Likewise.
4400 (cmd_qtdv): Likewise.
4401 (cmd_qtstatus): Likewise.
4402 (response_source): Likewise.
4403 (response_tsv): Likewise.
4404 (cmd_qtnotes): Likewise.
4405 (gdb_collect): Likewise.
4406 (initialize_tracepoint): Likewise.
4407
4408 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4409
4410 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4411 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4412 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4413 <NOP>: New.
4414 (enum aarch64_condition_codes): New enum.
4415 (w0): New static global.
4416 (fp): Likewise.
4417 (lr): Likewise.
4418 (struct aarch64_memory_operand) <type>: New
4419 MEMORY_OPERAND_POSTINDEX type.
4420 (postindex_memory_operand): New helper function.
4421 (emit_ret): New function.
4422 (emit_load_store_pair): New function, factored out of emit_stp
4423 with support for MEMORY_OPERAND_POSTINDEX.
4424 (emit_stp): Rewrite using emit_load_store_pair.
4425 (emit_ldp): New function.
4426 (emit_load_store): Likewise.
4427 (emit_ldr): Mention post-index instruction in comment.
4428 (emit_ldrh): New function.
4429 (emit_ldrb): New function.
4430 (emit_ldrsw): Mention post-index instruction in comment.
4431 (emit_str): Likewise.
4432 (emit_subs): New function.
4433 (emit_cmp): Likewise.
4434 (emit_and): Likewise.
4435 (emit_orr): Likewise.
4436 (emit_orn): Likewise.
4437 (emit_eor): Likewise.
4438 (emit_mvn): Likewise.
4439 (emit_lslv): Likewise.
4440 (emit_lsrv): Likewise.
4441 (emit_asrv): Likewise.
4442 (emit_mul): Likewise.
4443 (emit_sbfm): Likewise.
4444 (emit_sbfx): Likewise.
4445 (emit_ubfm): Likewise.
4446 (emit_ubfx): Likewise.
4447 (emit_csinc): Likewise.
4448 (emit_cset): Likewise.
4449 (emit_nop): Likewise.
4450 (emit_ops_insns): New helper function.
4451 (emit_pop): Likewise.
4452 (emit_push): Likewise.
4453 (aarch64_emit_prologue): New function.
4454 (aarch64_emit_epilogue): Likewise.
4455 (aarch64_emit_add): Likewise.
4456 (aarch64_emit_sub): Likewise.
4457 (aarch64_emit_mul): Likewise.
4458 (aarch64_emit_lsh): Likewise.
4459 (aarch64_emit_rsh_signed): Likewise.
4460 (aarch64_emit_rsh_unsigned): Likewise.
4461 (aarch64_emit_ext): Likewise.
4462 (aarch64_emit_log_not): Likewise.
4463 (aarch64_emit_bit_and): Likewise.
4464 (aarch64_emit_bit_or): Likewise.
4465 (aarch64_emit_bit_xor): Likewise.
4466 (aarch64_emit_bit_not): Likewise.
4467 (aarch64_emit_equal): Likewise.
4468 (aarch64_emit_less_signed): Likewise.
4469 (aarch64_emit_less_unsigned): Likewise.
4470 (aarch64_emit_ref): Likewise.
4471 (aarch64_emit_if_goto): Likewise.
4472 (aarch64_emit_goto): Likewise.
4473 (aarch64_write_goto_address): Likewise.
4474 (aarch64_emit_const): Likewise.
4475 (aarch64_emit_call): Likewise.
4476 (aarch64_emit_reg): Likewise.
4477 (aarch64_emit_pop): Likewise.
4478 (aarch64_emit_stack_flush): Likewise.
4479 (aarch64_emit_zero_ext): Likewise.
4480 (aarch64_emit_swap): Likewise.
4481 (aarch64_emit_stack_adjust): Likewise.
4482 (aarch64_emit_int_call_1): Likewise.
4483 (aarch64_emit_void_call_2): Likewise.
4484 (aarch64_emit_eq_goto): Likewise.
4485 (aarch64_emit_ne_goto): Likewise.
4486 (aarch64_emit_lt_goto): Likewise.
4487 (aarch64_emit_le_goto): Likewise.
4488 (aarch64_emit_gt_goto): Likewise.
4489 (aarch64_emit_ge_got): Likewise.
4490 (aarch64_emit_ops_impl): New static global variable.
4491 (aarch64_emit_ops): New target function, return
4492 &aarch64_emit_ops_impl.
4493 (struct linux_target_ops): Install it.
4494
4495 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4496
4497 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4498 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4499 aarch64-ipa.o.
4500 * linux-aarch64-ipa.c: New file.
4501 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4502 and endian.h.
4503 (aarch64_get_thread_area): New target method.
4504 (extract_signed_bitfield): New helper function.
4505 (aarch64_decode_ldr_literal): New function.
4506 (enum aarch64_opcodes): New enum.
4507 (struct aarch64_register): New struct.
4508 (struct aarch64_operand): New struct.
4509 (x0): New static global.
4510 (x1): Likewise.
4511 (x2): Likewise.
4512 (x3): Likewise.
4513 (x4): Likewise.
4514 (w2): Likewise.
4515 (ip0): Likewise.
4516 (sp): Likewise.
4517 (xzr): Likewise.
4518 (aarch64_register): New helper function.
4519 (register_operand): Likewise.
4520 (immediate_operand): Likewise.
4521 (struct aarch64_memory_operand): New struct.
4522 (offset_memory_operand): New helper function.
4523 (preindex_memory_operand): Likewise.
4524 (enum aarch64_system_control_registers): New enum.
4525 (ENCODE): New macro.
4526 (emit_insn): New helper function.
4527 (emit_b): New function.
4528 (emit_bcond): Likewise.
4529 (emit_cb): Likewise.
4530 (emit_tb): Likewise.
4531 (emit_blr): Likewise.
4532 (emit_stp): Likewise.
4533 (emit_ldp_q_offset): Likewise.
4534 (emit_stp_q_offset): Likewise.
4535 (emit_load_store): Likewise.
4536 (emit_ldr): Likewise.
4537 (emit_ldrsw): Likewise.
4538 (emit_str): Likewise.
4539 (emit_ldaxr): Likewise.
4540 (emit_stxr): Likewise.
4541 (emit_stlr): Likewise.
4542 (emit_data_processing_reg): Likewise.
4543 (emit_data_processing): Likewise.
4544 (emit_add): Likewise.
4545 (emit_sub): Likewise.
4546 (emit_mov): Likewise.
4547 (emit_movk): Likewise.
4548 (emit_mov_addr): Likewise.
4549 (emit_mrs): Likewise.
4550 (emit_msr): Likewise.
4551 (emit_sevl): Likewise.
4552 (emit_wfe): Likewise.
4553 (append_insns): Likewise.
4554 (can_encode_int32_in): New helper function.
4555 (aarch64_relocate_instruction): New function.
4556 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4557 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4558 (struct linux_target_ops): Install aarch64_get_thread_area,
4559 aarch64_install_fast_tracepoint_jump_pad and
4560 aarch64_get_min_fast_tracepoint_insn_len.
4561
4562 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4563
4564 * Makefile.in (aarch64-insn.o): New rule.
4565 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4566
4567 2015-09-21 Yao Qi <yao.qi@linaro.org>
4568
4569 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4570
4571 2015-09-21 Yao Qi <yao.qi@linaro.org>
4572
4573 * tracepoint.c (max_jump_pad_size): Remove.
4574
4575 2015-09-18 Yao Qi <yao.qi@linaro.org>
4576
4577 * linux-aarch64-low.c: Don't include sys/uio.h.
4578 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4579
4580 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4581
4582 * tracepoint.c (eval_result_type): Change prototype.
4583 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4584
4585 2015-09-15 Pedro Alves <palves@redhat.com>
4586
4587 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4588 Check whether to report exec events instead of checking whether
4589 multiprocess is enabled.
4590
4591 2015-09-15 Pedro Alves <palves@redhat.com>
4592
4593 PR remote/18965
4594 * remote-utils.c (prepare_resume_reply): Merge
4595 TARGET_WAITKIND_VFORK_DONE switch case with the
4596 TARGET_WAITKIND_FORKED case.
4597
4598 2015-09-15 Yao Qi <yao.qi@linaro.org>
4599
4600 * server.c (handle_query): Check string comparison using
4601 "else if" instead of "if".
4602
4603 2015-09-15 Yao Qi <yao.qi@linaro.org>
4604
4605 * server.c (vCont_supported): New global variable.
4606 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4607 matches. Append ";vContSupported+" to own_buf.
4608 (handle_v_requests): Append ";s;S" to own_buf if target supports
4609 hardware single step or vCont_supported is false.
4610 (capture_main): Set vCont_supported to zero.
4611
4612 2015-09-15 Yao Qi <yao.qi@linaro.org>
4613
4614 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4615 it to ...
4616 (linux_supports_hardware_single_step): ... New function.
4617 (linux_target_ops): Update.
4618 * lynx-low.c (lynx_target_ops): Set field
4619 supports_hardware_single_step to target_can_do_hardware_single_step.
4620 * nto-low.c (nto_target_ops): Likewise.
4621 * spu-low.c (spu_target_ops): Likewise.
4622 * win32-low.c (win32_target_ops): Likewise.
4623 * target.c (target_can_do_hardware_single_step): New function.
4624 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4625 Remove. <supports_hardware_single_step>: New field.
4626 (target_supports_conditional_breakpoints): Remove.
4627 (target_supports_hardware_single_step): New macro.
4628 (target_can_do_hardware_single_step): Declare.
4629 * server.c (handle_query): Use target_supports_hardware_single_step
4630 instead of target_supports_conditional_breakpoints.
4631
4632 2015-09-15 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4635 function.
4636 (struct linux_target_ops the_low_target): Install
4637 aarch64_linux_siginfo_fixup.
4638
4639 2015-09-11 Don Breazeal <donb@codesourcery.com>
4640 Luis Machado <lgustavo@codesourcery.com>
4641
4642 * linux-low.c (linux_mourn): Static declaration.
4643 (linux_arch_setup): Move in front of
4644 handle_extended_wait.
4645 (linux_arch_setup_thread): New function.
4646 (handle_extended_wait): Handle exec events. Call
4647 linux_arch_setup_thread. Make event_lwp argument a
4648 pointer-to-a-pointer.
4649 (check_zombie_leaders): Do not check stopped threads.
4650 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4651 (linux_low_filter_event): Add lwp and thread for exec'ing
4652 non-leader thread if leader thread has been deleted.
4653 Refactor code into linux_arch_setup_thread and call it.
4654 Pass child lwp pointer by reference to handle_extended_wait.
4655 (linux_wait_for_event_filtered): Update comment.
4656 (linux_wait_1): Prevent clobbering exec event status.
4657 (linux_supports_exec_events): New function.
4658 (linux_target_ops) <supports_exec_events>: Initialize new member.
4659 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4660 new member.
4661 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4662 * server.c (report_exec_events): New global variable.
4663 (handle_query): Handle qSupported query for exec-events feature.
4664 (captured_main): Initialize report_exec_events.
4665 * server.h (report_exec_events): Declare new global variable.
4666 * target.h (struct target_ops) <supports_exec_events>: New
4667 member.
4668 (target_supports_exec_events): New macro.
4669 * win32-low.c (win32_target_ops) <supports_exec_events>:
4670 Initialize new member.
4671
4672 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4673
4674 * linux-low.c (linux_low_enable_btrace): Remove.
4675 (linux_target_ops): Replace linux_low_enable_btrace with
4676 linux_enable_btrace.
4677
4678 2015-09-03 Yao Qi <yao.qi@linaro.org>
4679
4680 * linux-aarch64-low.c (aarch64_insert_point): Call
4681 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4682 returns true.
4683
4684 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4685
4686 * linux-low.c (check_stopped_by_breakpoint): Use
4687 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4688
4689 2015-08-27 Pedro Alves <palves@redhat.com>
4690
4691 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4692
4693 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4694
4695 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4696 the XNEW-family equivalent.
4697 (compile_bytecodes): Likewise.
4698 * dll.c (loaded_dll): Likewise.
4699 * event-loop.c (append_callback_event): Likewise.
4700 (create_file_handler): Likewise.
4701 (create_file_event): Likewise.
4702 * hostio.c (handle_open): Likewise.
4703 * inferiors.c (add_thread): Likewise.
4704 (add_process): Likewise.
4705 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4706 * linux-arm-low.c (arm_new_process): Likewise.
4707 (arm_new_thread): Likewise.
4708 * linux-low.c (add_to_pid_list): Likewise.
4709 (linux_add_process): Likewise.
4710 (handle_extended_wait): Likewise.
4711 (add_lwp): Likewise.
4712 (enqueue_one_deferred_signal): Likewise.
4713 (enqueue_pending_signal): Likewise.
4714 (linux_resume_one_lwp_throw): Likewise.
4715 (linux_resume_one_thread): Likewise.
4716 (linux_read_memory): Likewise.
4717 (linux_write_memory): Likewise.
4718 * linux-mips-low.c (mips_linux_new_process): Likewise.
4719 (mips_linux_new_thread): Likewise.
4720 (mips_add_watchpoint): Likewise.
4721 * linux-x86-low.c (initialize_low_arch): Likewise.
4722 * lynx-low.c (lynx_add_process): Likewise.
4723 * mem-break.c (set_raw_breakpoint_at): Likewise.
4724 (set_breakpoint): Likewise.
4725 (add_condition_to_breakpoint): Likewise.
4726 (add_commands_to_breakpoint): Likewise.
4727 (clone_agent_expr): Likewise.
4728 (clone_one_breakpoint): Likewise.
4729 * regcache.c (new_register_cache): Likewise.
4730 * remote-utils.c (look_up_one_symbol): Likewise.
4731 * server.c (queue_stop_reply): Likewise.
4732 (start_inferior): Likewise.
4733 (queue_stop_reply_callback): Likewise.
4734 (handle_target_event): Likewise.
4735 * spu-low.c (fetch_ppc_memory): Likewise.
4736 (store_ppc_memory): Likewise.
4737 * target.c (set_target_ops): Likewise.
4738 * thread-db.c (thread_db_load_search): Likewise.
4739 (try_thread_db_load_1): Likewise.
4740 * tracepoint.c (add_tracepoint): Likewise.
4741 (add_tracepoint_action): Likewise.
4742 (create_trace_state_variable): Likewise.
4743 (cmd_qtdpsrc): Likewise.
4744 (cmd_qtro): Likewise.
4745 (add_while_stepping_state): Likewise.
4746 * win32-low.c (child_add_thread): Likewise.
4747 (get_image_name): Likewise.
4748
4749 2015-08-25 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4752
4753 2015-08-25 Yao Qi <yao.qi@linaro.org>
4754
4755 * Makefile.in (aarch64-linux.o): New rule.
4756 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4757 srv_tgtobj.
4758 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4759 (aarch64_init_debug_reg_state): Make it extern.
4760 (aarch64_linux_prepare_to_resume): Remove.
4761
4762 2015-08-25 Yao Qi <yao.qi@linaro.org>
4763
4764 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4765 lwp_arch_private_info and ptid_of_lwp.
4766
4767 2015-08-25 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4770 Find proc_info by find_process_pid. All callers updated.
4771
4772 2015-08-25 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4775 Remove.
4776 (debug_reg_change_callback): Remove.
4777 (aarch64_notify_debug_reg_change): Remove.
4778
4779 2015-08-25 Yao Qi <yao.qi@linaro.org>
4780
4781 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4782 Call current_lwp_ptid.
4783
4784 2015-08-25 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-aarch64-low.c (debug_reg_change_callback): Use
4787 debug_printf.
4788
4789 2015-08-25 Yao Qi <yao.qi@linaro.org>
4790
4791 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4792
4793 2015-08-25 Yao Qi <yao.qi@linaro.org>
4794
4795 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4796
4797 2015-08-25 Yao Qi <yao.qi@linaro.org>
4798
4799 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4800 the code.
4801
4802 2015-08-25 Yao Qi <yao.qi@linaro.org>
4803
4804 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4805 Remove.
4806 (debug_reg_change_callback): Remove argument entry and add argument
4807 lwp. Remove local variable thread. Don't print thread id in the
4808 debugging output. Don't check whether pid of thread equals to pid.
4809 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4810 iterate_over_lwps instead find_inferior.
4811
4812 2015-08-24 Pedro Alves <palves@redhat.com>
4813
4814 * inferiors.c (get_first_process): New function.
4815 * inferiors.h (get_first_process): New declaration.
4816 * remote-utils.c (read_ptid): Default to the first process in the
4817 list, instead of to the current thread's process.
4818
4819 2015-08-24 Pedro Alves <palves@redhat.com>
4820
4821 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4822 * event-loop.c: Likewise.
4823 * remote-utils.c: Likewise.
4824 * tracepoint.c: Likewise.
4825
4826 2015-08-24 Pedro Alves <palves@redhat.com>
4827
4828 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4829 ptid_get_lwp.
4830
4831 2015-08-21 Pedro Alves <palves@redhat.com>
4832
4833 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4834 instead of literal 1.
4835
4836 2015-08-21 Pedro Alves <palves@redhat.com>
4837
4838 * tdesc.c (default_description): Explicitly zero-initialize.
4839
4840 2015-08-21 Pedro Alves <palves@redhat.com>
4841
4842 PR gdb/18749
4843 * inferiors.c (remove_thread): Discard any pending stop reply for
4844 this thread.
4845 * server.c (remove_all_on_match_pid): Rename to ...
4846 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4847 instead of a pid.
4848 (discard_queued_stop_replies): Change parameter to a ptid. Now
4849 extern.
4850 (handle_v_kill, kill_inferior_callback, captured_main)
4851 (process_serial_event): Adjust.
4852 * server.h (discard_queued_stop_replies): Declare.
4853
4854 2015-08-21 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (wait_for_sigstop): Always switch to no thread
4857 selected if the previously current thread dies.
4858 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4859 process instead of the current thread's.
4860 * remote-utils.c (input_interrupt): Don't check if there's no
4861 current thread.
4862 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4863 current thread to the general thread fails, error out.
4864 (handle_qxfer_auxv, handle_qxfer_libraries)
4865 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4866 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4867 (handle_query): Check if there's a thread selected instead of
4868 checking whether there's any thread in the thread list.
4869 (handle_qxfer_threads, handle_qxfer_btrace)
4870 (handle_qxfer_btrace_conf): Don't error out early if there's no
4871 thread in the thread list.
4872 (handle_v_cont, myresume): Don't set the current thread to the
4873 continue thread.
4874 (process_serial_event) <Hg handling>: Also set thread_id if the
4875 previous general thread is still alive.
4876 (process_serial_event) <g/G handling>: If setting the current
4877 thread to the general thread fails, error out.
4878 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4879 thread's lwp instead of the current thread's.
4880 * target.c (set_desired_thread): If the desired thread was not
4881 found, leave the current thread pointing to NULL. Return an int
4882 (boolean) indicating success.
4883 * target.h (set_desired_thread): Change return type to int.
4884
4885 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4886
4887 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4888 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4889 #includes.
4890 (ps_get_thread_area): New function.
4891
4892 2015-08-19 Gary Benson <gbenson@redhat.com>
4893
4894 * hostio.c (handle_pread): Do not attempt to read more data
4895 than hostio_reply_with_data can fit in a packet.
4896
4897 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4898
4899 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4900
4901 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4902
4903 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4904
4905 2015-08-06 Pedro Alves <palves@redhat.com>
4906
4907 * tracepoint.c (expr_eval_result): Now an int.
4908
4909 2015-08-06 Pedro Alves <palves@redhat.com>
4910
4911 * gdbthread.h (struct regcache): Forward declare.
4912 (struct thread_info) <regcache_data>: Now a struct regcache
4913 pointer.
4914 * inferiors.c (inferior_regcache_data)
4915 (set_inferior_regcache_data): Now work with struct regcache
4916 pointers.
4917 * inferiors.h (struct regcache): Forward declare.
4918 (inferior_regcache_data, set_inferior_regcache_data): Now work
4919 with struct regcache pointers.
4920 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4921 (free_register_cache_thread): Remove struct regcache pointer
4922 casts.
4923
4924 2015-08-06 Pedro Alves <palves@redhat.com>
4925
4926 * server.c (captured_main): On error, print the exception message
4927 to stderr, and if run_once is set, throw a quit.
4928
4929 2015-08-06 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4932 the current thread.
4933
4934 2015-08-06 Pedro Alves <palves@redhat.com>
4935
4936 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4937 reading beyond the passed in buffer length.
4938
4939 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4940
4941 * tracepoint.c (symbol_list) <required>: Remove.
4942
4943 2015-08-06 Pedro Alves <palves@redhat.com>
4944
4945 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4946 count if stopping and suspending threads.
4947 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4948 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4949 (linux_detach): Complete an ongoing step-over.
4950 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4951 throughout.
4952 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4953 (linux_wait_1): If passing a signal to the inferior after
4954 finishing a step-over, unsuspend and re-resume all lwps. If we
4955 see a single-step event but the thread should be continuing, don't
4956 pass the trap to gdb.
4957 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4958 internal_error instead of gdb_assert.
4959 (enqueue_pending_signal): New function.
4960 (check_ptrace_stopped_lwp_gone): Add debug output.
4961 (start_step_over): Use internal_error instead of gdb_assert.
4962 (complete_ongoing_step_over): New function.
4963 (linux_resume_one_thread): Don't resume a suspended thread.
4964 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4965 it stepping.
4966
4967 2015-08-06 Pedro Alves <palves@redhat.com>
4968
4969 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4970 (linux_thread_alive): Use lwp_is_marked_dead.
4971 (extended_event_reported): Delete.
4972 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4973 instead of extended_event_reported.
4974 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4975 as well.
4976 (lwp_is_marked_dead): New function.
4977 (lwp_running): Use lwp_is_marked_dead.
4978 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4979 comment.
4980
4981 2015-08-06 Pedro Alves <palves@redhat.com>
4982
4983 * linux-low.c (linux_wait_1): Move fork event output out of the
4984 !report_to_gdb check. Pass event_child->waitstatus to
4985 target_waitstatus_to_string instead of ourstatus.
4986
4987 2015-08-04 Yao Qi <yao.qi@linaro.org>
4988
4989 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4990 if current_thread is 32 bit.
4991
4992 2015-08-04 Yao Qi <yao.qi@linaro.org>
4993
4994 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4995 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4996 * server.c (extended_protocol): Remove "static".
4997 * server.h (extended_protocol): Declare it.
4998
4999 2015-08-04 Yao Qi <yao.qi@linaro.org>
5000
5001 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5002 both aarch64 and aarch32.
5003 (aarch64_set_pc): Likewise.
5004
5005 2015-08-04 Yao Qi <yao.qi@linaro.org>
5006
5007 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5008 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5009 arm-with-neon.xml to srv_xmlfiles.
5010 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5011 (is_64bit_tdesc): New function.
5012 (aarch64_linux_read_description): New function.
5013 (aarch64_arch_setup): Call aarch64_linux_read_description.
5014 (regs_info): Rename to regs_info_aarch64.
5015 (aarch64_regs_info): Return right regs_info.
5016 (initialize_low_arch): Call initialize_low_arch_aarch32.
5017
5018 2015-08-04 Yao Qi <yao.qi@linaro.org>
5019
5020 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5021 * linux-aarch32-low.c: New file.
5022 * linux-aarch32-low.h: New file.
5023 * linux-arm-low.c (arm_fill_gregset): Move it to
5024 linux-aarch32-low.c.
5025 (arm_store_gregset): Likewise.
5026 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5027 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5028 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5029 (regs_info): Rename to regs_info_arm.
5030 (arm_regs_info): Return regs_info_aarch32 if
5031 have_ptrace_getregset is 1 and target description is
5032 arm_with_neon or arm_with_vfpv3.
5033 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5034 Call initialize_low_arch_aarch32 instead.
5035
5036 2015-08-04 Yao Qi <yao.qi@linaro.org>
5037
5038 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5039 * linux-low.c: ... here.
5040 * linux-low.h (have_ptrace_getregset): Declare it.
5041
5042 2015-08-04 Pedro Alves <palves@redhat.com>
5043
5044 * thread-db.c (struct thread_db): Use new typedefs.
5045 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5046 CHK calls.
5047 (disable_thread_event_reporting): Cast result of dlsym to
5048 destination function pointer type.
5049 (thread_db_mourn): Use td_ta_delete_ftype.
5050
5051 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5052
5053 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5054 arch variant.
5055 (CDX_BREAKPOINT): Define for R2.
5056 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5057 (the_low_target): Add comments.
5058
5059 2015-07-30 Yao Qi <yao.qi@linaro.org>
5060
5061 * linux-arm-low.c (arm_hwcap): Remove it.
5062 (arm_read_description): New local variable arm_hwcap. Don't
5063 set arm_hwcap to zero.
5064
5065 2015-07-30 Yao Qi <yao.qi@linaro.org>
5066
5067 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5068 Use regcache->tdesc instead.
5069 (arm_store_wmmxregset): Likewise.
5070 (arm_fill_vfpregset): Likewise.
5071 (arm_store_vfpregset): Likewise.
5072
5073 2015-07-30 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-arm-low.c: Include arch/arm.h.
5076 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5077 (arm_store_gregset): Likewise.
5078
5079 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5080
5081 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5082 ptrace's 4th parameter.
5083
5084 2015-07-27 Yao Qi <yao.qi@linaro.org>
5085
5086 * configure.srv (case aarch64*-*-linux*): Don't set
5087 srv_linux_usrregs.
5088
5089 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5090
5091 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5092 sys/ptrace.h.
5093 * linux-arm-low.c: Likewise.
5094 * linux-cris-low.c: Likewise.
5095 * linux-crisv32-low.c: Likewise.
5096 * linux-low.c: Likewise.
5097 * linux-m68k-low.c: Likewise.
5098 * linux-mips-low.c: Likewise.
5099 * linux-nios2-low.c: Likewise.
5100 * linux-s390-low.c: Likewise.
5101 * linux-sparc-low.c: Likewise.
5102 * linux-tic6x-low.c: Likewise.
5103 * linux-tile-low.c: Likewise.
5104 * linux-x86-low.c: Likewise.
5105
5106 2015-07-24 Pedro Alves <palves@redhat.com>
5107
5108 * config.in: Regenerate.
5109 * configure: Regenerate.
5110
5111 2015-07-24 Pedro Alves <palves@redhat.com>
5112
5113 * acinclude.m4: Include ../ptrace.m4.
5114 * configure.ac: Call GDB_AC_PTRACE.
5115 * config.in, configure: Regenerate.
5116
5117 2015-07-24 Yao Qi <yao.qi@linaro.org>
5118
5119 * linux-low.c (linux_create_inferior): Remove setting to
5120 proc->priv->new_inferior.
5121 (linux_attach): Likewise.
5122 (linux_low_filter_event): Likewise.
5123 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5124
5125 2015-07-24 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-low.c (linux_arch_setup): New function.
5128 (linux_low_filter_event): If proc->tdesc is NULL and
5129 proc->attached is true, call the_low_target.arch_setup.
5130 Otherwise, keep status pending, and return.
5131 (linux_resume_one_lwp_throw): Don't call get_pc if
5132 thread->while_stepping isn't NULL. Don't call
5133 get_thread_regcache if proc->tdesc is NULL.
5134 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5135 (linux_target_ops): Install arch_setup.
5136 * server.c (start_inferior): Call the_target->arch_setup.
5137 * target.h (struct target_ops) <arch_setup>: New field.
5138 (target_arch_setup): New marco.
5139 * lynx-low.c (lynx_target_ops): Update.
5140 * nto-low.c (nto_target_ops): Update.
5141 * spu-low.c (spu_target_ops): Update.
5142 * win32-low.c (win32_target_ops): Update.
5143
5144 2015-07-24 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-low.c (linux_add_process): Don't set
5147 proc->priv->new_inferior.
5148 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5149 (linux_attach): Likewise.
5150
5151 2015-07-24 Yao Qi <yao.qi@linaro.org>
5152
5153 * server.c (start_inferior): Code refactor.
5154
5155 2015-07-24 Yao Qi <yao.qi@linaro.org>
5156
5157 * server.c (process_serial_event): Set general_thread.
5158
5159 2015-07-21 Yao Qi <yao.qi@linaro.org>
5160
5161 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5162 aarch64_linux_get_debug_reg_capacity.
5163
5164 2015-07-17 Yao Qi <yao.qi@linaro.org>
5165
5166 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5167 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5168 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5169 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5170 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5171 (AARCH64_HWP_ALIGNMENT): Likewise.
5172 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5173 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5174 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5175 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5176 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5177 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5178 (struct aarch64_debug_reg_state): Likewise.
5179 (struct arch_lwp_info): Likewise.
5180 (aarch64_align_watchpoint): Likewise.
5181 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5182 (aarch64_watchpoint_length): Likewise.
5183 (aarch64_point_encode_ctrl_reg): Likewise
5184 (aarch64_point_is_aligned): Likewise.
5185 (aarch64_align_watchpoint): Likewise.
5186 (aarch64_linux_set_debug_regs):
5187 (aarch64_dr_state_insert_one_point): Likewise.
5188 (aarch64_dr_state_remove_one_point): Likewise.
5189 (aarch64_handle_breakpoint): Likewise.
5190 (aarch64_handle_aligned_watchpoint): Likewise.
5191 (aarch64_handle_unaligned_watchpoint): Likewise.
5192 (aarch64_handle_watchpoint): Likewise.
5193
5194 2015-07-17 Yao Qi <yao.qi@linaro.org>
5195
5196 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5197 and don't aarch64_get_debug_reg_state. All callers update.
5198 (aarch64_handle_aligned_watchpoint): Likewise.
5199 (aarch64_handle_unaligned_watchpoint): Likewise.
5200 (aarch64_handle_watchpoint): Likewise.
5201 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5202 (aarch64_remove_point): Likewise.
5203
5204 2015-07-17 Yao Qi <yao.qi@linaro.org>
5205
5206 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5207 debug_printf.
5208 (aarch64_handle_unaligned_watchpoint): Likewise.
5209
5210 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5211
5212 Revert the previous 3 commits:
5213 Move gdb_regex* to common/
5214 Move linux_find_memory_regions_full & co.
5215 gdbserver build-id attribute generator
5216
5217 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5218 Jan Kratochvil <jan.kratochvil@redhat.com>
5219
5220 gdbserver build-id attribute generator.
5221 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5222 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5223 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5224 (find_phdr): New.
5225 (get_dynamic): Use find_pdhr to traverse program headers.
5226 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5227 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5228 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5229 (get_hex_build_id): New.
5230 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5231 to reply XML document.
5232
5233 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5234 Jan Kratochvil <jan.kratochvil@redhat.com>
5235
5236 * target.c: Include target/target-utils.h and fcntl.h.
5237 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5238 (target_fileio_read_stralloc): New functions.
5239
5240 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5241
5242 * Makefile.in (OBS): Add gdb_regex.o.
5243 (gdb_regex.o): New.
5244 * config.in: Rebuilt.
5245 * configure: Rebuilt.
5246
5247 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5248 Jan Kratochvil <jan.kratochvil@redhat.com>
5249
5250 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5251 * Makefile.in (OBS): Add target-utils.o.
5252 (linux-maps.o, target-utils.o): New.
5253 * configure.srv (srv_linux_obj): Add linux-maps.o.
5254
5255 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5256
5257 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5258 function, return 1.
5259 (the_low_target): Install it.
5260
5261 2015-07-14 Pedro Alves <palves@redhat.com>
5262
5263 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5264 Instead, ignore ECHILD, and throw an error for other errnos.
5265
5266 2015-07-10 Pedro Alves <palves@redhat.com>
5267
5268 * event-loop.c (struct callback_event) <data>: Change type to
5269 gdb_client_data instance instead of gdb_client_data pointer.
5270 (append_callback_event): Adjust.
5271
5272 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5273
5274 * linux-aarch64-low.c: Add comments for each linux_target_ops
5275 method. Remove comments already covered in target_ops and
5276 linux_target_ops definitions.
5277 (the_low_target): Add comments for each unimplemented method.
5278
5279 2015-07-09 Yao Qi <yao.qi@linaro.org>
5280
5281 * linux-aarch64-low.c (aarch64_regmap): Remove.
5282 (aarch64_usrregs_info): Remove.
5283 (regs_info): Set field usrregs to NULL.
5284
5285 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5286
5287 * linux-low.c: Include "rsp-low.h"
5288 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5289 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5290 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5291 (handle_btrace_enable_pt): New.
5292 (handle_btrace_general_set): Support "pt".
5293 (handle_btrace_conf_general_set): Support "pt:size".
5294
5295 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5296
5297 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5298 Z_PACKET_SW_BP.
5299
5300 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5301
5302 * linux-aarch64-low.c: Remove comment about endianness.
5303 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5304 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5305 memcmp.
5306
5307 2015-06-24 Gary Benson <gbenson@redhat.com>
5308
5309 * linux-i386-ipa.c (stdint.h): Do not include.
5310 * lynx-i386-low.c (stdint.h): Likewise.
5311 * lynx-ppc-low.c (stdint.h): Likewise.
5312 * mem-break.c (stdint.h): Likewise.
5313 * thread-db.c (stdint.h): Likewise.
5314 * tracepoint.c (stdint.h): Likewise.
5315 * win32-low.c (stdint.h): Likewise.
5316
5317 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5318
5319 * server.c (write_qxfer_response): Update call to
5320 remote_escape_output.
5321
5322 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5323 Jan Kratochvil <jan.kratochvil@redhat.com>
5324
5325 Merge multiple hex conversions.
5326 * gdbreplay.c (tohex): Rename to 'fromhex'.
5327 (logchar): Use fromhex.
5328
5329 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5330
5331 * server.c (handle_qxfer_libraries): Set `version' attribute for
5332 <library-list>.
5333
5334 2015-06-10 Gary Benson <gbenson@redhat.com>
5335
5336 * target.h (struct target_ops) <multifs_open>: New field.
5337 <multifs_unlink>: Likewise.
5338 <multifs_readlink>: Likewise.
5339 * linux-low.c (nat/linux-namespaces.h): New include.
5340 (linux_target_ops): Initialize the_target->multifs_open,
5341 the_target->multifs_unlink and the_target->multifs_readlink.
5342 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5343 * hostio.c (hostio_fs_pid): New static variable.
5344 (hostio_handle_new_gdb_connection): New function.
5345 (handle_setfs): Likewise.
5346 (handle_open): Use the_target->multifs_open as appropriate.
5347 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5348 (handle_readlink): Use the_target->multifs_readlink as
5349 appropriate.
5350 (handle_vFile): Handle vFile:setfs packets.
5351 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5352 after target_handle_new_gdb_connection.
5353
5354 2015-06-10 Gary Benson <gbenson@redhat.com>
5355
5356 * configure.ac (AC_CHECK_FUNCS): Add setns.
5357 * config.in: Regenerate.
5358 * configure: Likewise.
5359 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5360 (linux-namespaces.o): New rule.
5361 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5362
5363 2015-06-09 Gary Benson <gbenson@redhat.com>
5364
5365 * hostio.c (handle_open): Process mode argument with
5366 fileio_to_host_mode.
5367
5368 2015-06-01 Yao Qi <yao.qi@linaro.org>
5369
5370 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5371 * linux-x86-low.c: Likewise.
5372
5373 2015-05-28 Don Breazeal <donb@codesourcery.com>
5374
5375 * linux-low.c (handle_extended_wait): Initialize
5376 thread_info.last_resume_kind for new fork children.
5377
5378 2015-05-15 Pedro Alves <palves@redhat.com>
5379
5380 * target.h (target_handle_new_gdb_connection): Rewrite using if
5381 wrapped in do/while.
5382
5383 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5384
5385 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5386 * configure, config.in: Regenerate.
5387 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5388 Declare typedef.
5389
5390 2015-05-12 Don Breazeal <donb@codesourcery.com>
5391
5392 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5393 PTRACE_EVENT_VFORK_DONE.
5394 (linux_low_ptrace_options, extended_event_reported): Add vfork
5395 events.
5396 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5397 and "vforkdone" for RSP 'T' Stop Reply Packet.
5398 * server.h (report_vfork_events): Declare
5399 global variable.
5400
5401 2015-05-12 Don Breazeal <donb@codesourcery.com>
5402
5403 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5404 (the_low_target) <new_fork>: Initialize new member.
5405 * linux-arm-low.c (arm_new_fork): New function.
5406 (the_low_target) <new_fork>: Initialize new member.
5407 * linux-low.c (handle_extended_wait): Call new target function
5408 new_fork.
5409 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5410 * linux-mips-low.c (mips_add_watchpoint): New function
5411 extracted from mips_insert_point.
5412 (the_low_target) <new_fork>: Initialize new member.
5413 (mips_linux_new_fork): New function.
5414 (mips_insert_point): Call mips_add_watchpoint.
5415 * linux-x86-low.c (x86_linux_new_fork): New function.
5416 (the_low_target) <new_fork>: Initialize new member.
5417
5418 2015-05-12 Don Breazeal <donb@codesourcery.com>
5419
5420 * linux-low.c (handle_extended_wait): Implement return value,
5421 rename argument 'event_child' to 'event_lwp', handle
5422 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5423 (linux_low_ptrace_options): New function.
5424 (linux_low_filter_event): Call linux_low_ptrace_options,
5425 use different argument fo linux_enable_event_reporting,
5426 use return value from handle_extended_wait.
5427 (extended_event_reported): New function.
5428 (linux_wait_1): Call extended_event_reported and set
5429 status to report fork events.
5430 (linux_write_memory): Add pid to debug message.
5431 (reset_lwp_ptrace_options_callback): New function.
5432 (linux_handle_new_gdb_connection): New function.
5433 (linux_target_ops): Initialize new structure member.
5434 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5435 * lynx-low.c: Initialize new structure member.
5436 * remote-utils.c (prepare_resume_reply): Implement stop reason
5437 "fork" for "T" stop message.
5438 * server.c (handle_query): Call handle_new_gdb_connection.
5439 * server.h (report_fork_events): Declare global flag.
5440 * target.h (struct target_ops) <handle_new_gdb_connection>:
5441 New member.
5442 (target_handle_new_gdb_connection): New macro.
5443 * win32-low.c: Initialize new structure member.
5444
5445 2015-05-12 Don Breazeal <donb@codesourcery.com>
5446
5447 * mem-break.c (APPEND_TO_LIST): Define macro.
5448 (clone_agent_expr): New function.
5449 (clone_one_breakpoint): New function.
5450 (clone_all_breakpoints): New function.
5451 * mem-break.h: Declare new functions.
5452
5453 2015-05-12 Don Breazeal <donb@codesourcery.com>
5454
5455 * linux-low.c (linux_supports_fork_events): New function.
5456 (linux_supports_vfork_events): New function.
5457 (linux_target_ops): Initialize new structure members.
5458 (initialize_low): Call linux_check_ptrace_features.
5459 * lynx-low.c (lynx_target_ops): Initialize new structure
5460 members.
5461 * server.c (report_fork_events, report_vfork_events):
5462 New global flags.
5463 (handle_query): Add new features to qSupported packet and
5464 response.
5465 (captured_main): Initialize new global variables.
5466 * target.h (struct target_ops) <supports_fork_events>:
5467 New member.
5468 <supports_vfork_events>: New member.
5469 (target_supports_fork_events): New macro.
5470 (target_supports_vfork_events): New macro.
5471 * win32-low.c (win32_target_ops): Initialize new structure
5472 members.
5473
5474 2015-05-12 Gary Benson <gbenson@redhat.com>
5475
5476 * server.c (handle_qxfer_exec_file): Use current process
5477 if annex is empty.
5478
5479 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5480
5481 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5482 Remove HAVE_PTRACE_GETREGS conditionals.
5483 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5484 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5485
5486 2015-05-08 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-low.c (linux_supports_conditional_breakpoints): New
5489 function.
5490 (linux_target_ops): Install new target method.
5491 * lynx-low.c (lynx_target_ops): Install NULL hook for
5492 supports_conditional_breakpoints.
5493 * nto-low.c (nto_target_ops): Likewise.
5494 * spu-low.c (spu_target_ops): Likewise.
5495 * win32-low.c (win32_target_ops): Likewise.
5496 * server.c (handle_query): Check
5497 target_supports_conditional_breakpoints.
5498 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5499 New field.
5500 (target_supports_conditional_breakpoints): New macro.
5501
5502 2015-05-06 Pedro Alves <palves@redhat.com>
5503
5504 PR server/18081
5505 * server.c (start_inferior): If the process exits, mourn it.
5506
5507 2015-04-21 Gary Benson <gbenson@redhat.com>
5508
5509 * hostio.c (fileio_open_flags_to_host): Factored out to
5510 fileio_to_host_openflags in common/fileio.c. Single use
5511 updated.
5512
5513 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5514
5515 * linux-xtensa-low.c (xtensa_fill_gregset)
5516 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5517 XCHAL_HAVE_LOOP.
5518
5519 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5520
5521 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5522 (regs_info): Replace usrregs pointer with NULL.
5523
5524 2015-04-17 Gary Benson <gbenson@redhat.com>
5525
5526 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5527 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5528 * server.c (handle_qxfer_exec_file): New function.
5529 (qxfer_packets): Add exec-file entry.
5530 (handle_query): Report qXfer:exec-file:read as supported packet.
5531
5532 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5533
5534 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5535
5536 2015-04-09 Gary Benson <gbenson@redhat.com>
5537
5538 * hostio-errno.c (errno_to_fileio_error): Remove function.
5539 Update caller to use remote_fileio_to_fio_error.
5540
5541 2015-04-09 Yao Qi <yao.qi@linaro.org>
5542
5543 * linux-low.c (linux_insert_point): Call
5544 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5545 (linux_remove_point): Call remove_memory_breakpoint if type is
5546 raw_bkpt_type_sw.
5547 * linux-x86-low.c (x86_insert_point): Don't call
5548 insert_memory_breakpoint.
5549 (x86_remove_point): Don't call remove_memory_breakpoint.
5550
5551 2015-04-01 Pedro Alves <palves@redhat.com>
5552 Cleber Rosa <crosa@redhat.com>
5553
5554 * server.c (gdbserver_usage): Reorganize and extend the usage
5555 message.
5556
5557 2015-03-24 Pedro Alves <palves@redhat.com>
5558
5559 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5560 output. Also dump TRAP_TRACE.
5561 (linux_low_filter_event): In debug output, distinguish a
5562 resume_stop SIGSTOP from a delayed SIGSTOP.
5563
5564 2015-03-24 Gary Benson <gbenson@redhat.com>
5565
5566 * linux-x86-low.c (x86_linux_new_thread): Moved to
5567 nat/x86-linux.c.
5568 (x86_linux_prepare_to_resume): Likewise.
5569
5570 2015-03-24 Gary Benson <gbenson@redhat.com>
5571
5572 * Makefile.in (x86-linux-dregs.o): New rule.
5573 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5574 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5575 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5576 (x86_linux_dr_get): Likewise.
5577 (x86_linux_dr_set): Likewise.
5578 (update_debug_registers_callback): Likewise.
5579 (x86_linux_dr_set_addr): Likewise.
5580 (x86_linux_dr_get_addr): Likewise.
5581 (x86_linux_dr_set_control): Likewise.
5582 (x86_linux_dr_get_control): Likewise.
5583 (x86_linux_dr_get_status): Likewise.
5584 (x86_linux_update_debug_registers): Likewise.
5585
5586 2015-03-24 Gary Benson <gbenson@redhat.com>
5587
5588 * linux-x86-low.c (x86_linux_update_debug_registers):
5589 New function, factored out from...
5590 (x86_linux_prepare_to_resume): ...this.
5591
5592 2015-03-24 Gary Benson <gbenson@redhat.com>
5593
5594 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5595 (x86_linux_dr_set): Likewise.
5596 (update_debug_registers_callback): Likewise.
5597 (x86_linux_dr_set_addr): Likewise.
5598 (x86_linux_dr_get_addr): Likewise.
5599 (x86_linux_dr_set_control): Likewise.
5600 (x86_linux_dr_get_control): Likewise.
5601 (x86_linux_dr_get_status): Likewise.
5602 (x86_linux_prepare_to_resume): Likewise.
5603
5604 2015-03-24 Gary Benson <gbenson@redhat.com>
5605
5606 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5607 Use perror_with_name. Pass string through gettext.
5608 (x86_linux_dr_set): Likewise.
5609
5610 2015-03-24 Gary Benson <gbenson@redhat.com>
5611
5612 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5613 (x86_linux_dr_set_addr): ...this.
5614 (x86_dr_low_get_addr): Rename to...
5615 (x86_linux_dr_get_addr): ...this.
5616 (x86_dr_low_set_control): Rename to...
5617 (x86_linux_dr_set_control): ...this.
5618 (x86_dr_low_get_control): Rename to...
5619 (x86_linux_dr_get_control): ...this.
5620 (x86_dr_low_get_status): Rename to...
5621 (x86_linux_dr_get_status): ...this.
5622 (x86_dr_low): Update with new function names.
5623
5624 2015-03-24 Gary Benson <gbenson@redhat.com>
5625
5626 * Makefile.in (x86-linux.o): New rule.
5627 * configure.srv: Add x86-linux.o to relevant targets.
5628 * linux-low.c (lwp_set_arch_private_info): New function.
5629 (lwp_arch_private_info): Likewise.
5630 * linux-x86-low.c: Include nat/x86-linux.h.
5631 (arch_lwp_info): Removed structure.
5632 (update_debug_registers_callback):
5633 Use lwp_set_debug_registers_changed.
5634 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5635 and lwp_set_debug_registers_changed.
5636 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5637
5638 2015-03-24 Gary Benson <gbenson@redhat.com>
5639
5640 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5641 * linux-arm-low.c (arm_new_thread): Likewise.
5642 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5643 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5644 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5645 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5646
5647 2015-03-24 Gary Benson <gbenson@redhat.com>
5648
5649 * linux-low.c (ptid_of_lwp): New function.
5650 (lwp_is_stopped): Likewise.
5651 (lwp_stop_reason): Likewise.
5652 * linux-x86-low.c (update_debug_registers_callback):
5653 Use lwp_is_stopped.
5654 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5655 lwp_stop_reason.
5656
5657 2015-03-24 Gary Benson <gbenson@redhat.com>
5658
5659 * linux-low.h (linux_stop_lwp): Remove declaration.
5660
5661 2015-03-24 Gary Benson <gbenson@redhat.com>
5662
5663 * linux-low.h: Include nat/linux-nat.h.
5664 * linux-low.c (iterate_over_lwps_args): New structure.
5665 (iterate_over_lwps_filter): New function.
5666 (iterate_over_lwps): Likewise.
5667 * linux-x86-low.c (update_debug_registers_callback):
5668 Update signature to what iterate_over_lwps expects.
5669 Remove PID check that iterate_over_lwps now performs.
5670 (x86_dr_low_set_addr): Use iterate_over_lwps.
5671 (x86_dr_low_set_control): Likewise.
5672
5673 2015-03-24 Gary Benson <gbenson@redhat.com>
5674
5675 * linux-x86-low.c (x86_debug_reg_state): New function.
5676 (x86_linux_prepare_to_resume): Use the above.
5677
5678 2015-03-24 Gary Benson <gbenson@redhat.com>
5679
5680 * linux-low.c (current_lwp_ptid): New function.
5681 * linux-x86-low.c: Include nat/linux-nat.h.
5682 (x86_dr_low_get_addr): Use current_lwp_ptid.
5683 (x86_dr_low_get_control): Likewise.
5684 (x86_dr_low_get_status): Likewise.
5685
5686 2015-03-20 Pedro Alves <palves@redhat.com>
5687
5688 * tracepoint.c (cmd_qtstatus): Make "str" const.
5689
5690 2015-03-20 Pedro Alves <palves@redhat.com>
5691
5692 * server.c (handle_general_set): Make "req_str" const.
5693
5694 2015-03-19 Pedro Alves <palves@redhat.com>
5695
5696 * linux-low.c (linux_resume_one_lwp): Rename to ...
5697 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5698 instead call perror_with_name.
5699 (check_ptrace_stopped_lwp_gone): New function.
5700 (linux_resume_one_lwp): Reimplement as wrapper around
5701 linux_resume_one_lwp_throw that swallows errors if the LWP is
5702 gone.
5703
5704 2015-03-19 Pedro Alves <palves@redhat.com>
5705
5706 * linux-low.c (count_events_callback, select_event_lwp_callback):
5707 No longer check whether the thread has resume_stop as last resume
5708 kind.
5709
5710 2015-03-19 Pedro Alves <palves@redhat.com>
5711
5712 * linux-low.c (count_events_callback, select_event_lwp_callback):
5713 Use the lwp's status_pending_p field, not the thread's.
5714
5715 2015-03-19 Pedro Alves <palves@redhat.com>
5716
5717 * linux-low.c (select_event_lwp_callback): Update comments to
5718 no longer mention SIGTRAP.
5719
5720 2015-03-18 Gary Benson <gbenson@redhat.com>
5721
5722 * server.c (handle_query): Do not report vFile:fstat as supported.
5723
5724 2015-03-11 Gary Benson <gbenson@redhat.com>
5725
5726 * hostio.c (sys/types.h): New include.
5727 (sys/stat.h): Likewise.
5728 (common-remote-fileio.h): Likewise.
5729 (handle_fstat): New function.
5730 (handle_vFile): Handle vFile:fstat packets.
5731
5732 2015-03-11 Gary Benson <gbenson@redhat.com>
5733
5734 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5735 struct stat.st_blocks and struct stat.st_blksize.
5736 * configure: Regenerate.
5737 * config.in: Likewise.
5738 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5739 (OBS): Add common-remote-fileio.o.
5740 (common-remote-fileio.o): New rule.
5741
5742 2015-03-09 Pedro Alves <palves@redhat.com>
5743
5744 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5745 'struct sockaddr' pointer in 'accept' call.
5746
5747 2015-03-09 Pedro Alves <palves@redhat.com>
5748
5749 Revert:
5750 2015-03-07 Pedro Alves <palves@redhat.com>
5751 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5752 or <winsock2.h> here. Instead include "gdb_socket.h".
5753 (remote_open): Use union gdb_sockaddr_u.
5754 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5755 or <winsock2.h> here. Instead include "gdb_socket.h".
5756 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5757 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5758 or <sys/un.h>.
5759 (init_named_socket, gdb_agent_helper_thread): Use union
5760 gdb_sockaddr_u.
5761
5762 2015-03-07 Pedro Alves <palves@redhat.com>
5763
5764 * configure.ac (build_warnings): Move
5765 -Wdeclaration-after-statement to the C-specific set.
5766 * configure: Regenerate.
5767
5768 2015-03-07 Pedro Alves <palves@redhat.com>
5769
5770 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5771 or <winsock2.h> here. Instead include "gdb_socket.h".
5772 (remote_open): Use union gdb_sockaddr_u.
5773 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5774 or <winsock2.h> here. Instead include "gdb_socket.h".
5775 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5776 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5777 or <sys/un.h>.
5778 (init_named_socket, gdb_agent_helper_thread): Use union
5779 gdb_sockaddr_u.
5780
5781 2015-03-07 Pedro Alves <palves@redhat.com>
5782
5783 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5784 instead.
5785
5786 2015-03-06 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-aarch64-low.c (aarch64_insert_point): Use
5789 show_debug_regs as a boolean.
5790 (aarch64_remove_point): Likewise.
5791
5792 2015-03-05 Pedro Alves <palves@redhat.com>
5793
5794 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5795 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5796 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5797 * nto-low.c (nto_target_ops): Likewise.
5798 * spu-low.c (spu_target_ops): Likewise.
5799 * win32-low.c (win32_target_ops): Likewise.
5800
5801 2015-03-04 Pedro Alves <palves@redhat.com>
5802
5803 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5804 Decide whether a breakpoint triggered based on the SIGTRAP's
5805 siginfo.si_code.
5806 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5807 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5808 (linux_low_filter_event): Check for breakpoints before checking
5809 watchpoints.
5810 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5811 siginfo.si_code.
5812 (linux_stopped_by_sw_breakpoint)
5813 (linux_supports_stopped_by_sw_breakpoint)
5814 (linux_stopped_by_hw_breakpoint)
5815 (linux_supports_stopped_by_hw_breakpoint): New functions.
5816 (linux_target_ops): Install new target methods.
5817
5818 2015-03-04 Pedro Alves <palves@redhat.com>
5819
5820 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5821 * server.c (swbreak_feature, hwbreak_feature): New globals.
5822 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5823 (captured_main): Clear swbreak_feature and hwbreak_feature.
5824 * server.h (swbreak_feature, hwbreak_feature): Declare.
5825 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5826 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5827 supports_stopped_by_hw_breakpoint>: New fields.
5828 (target_supports_stopped_by_sw_breakpoint)
5829 (target_stopped_by_sw_breakpoint)
5830 (target_supports_stopped_by_hw_breakpoint)
5831 (target_stopped_by_hw_breakpoint): Declare.
5832
5833 2015-03-04 Pedro Alves <palves@redhat.com>
5834
5835 enum lwp_stop_reason -> enum target_stop_reason
5836 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5837 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5838 (linux_wait_1, stuck_in_jump_pad_callback)
5839 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5840 (linux_stopped_by_watchpoint):
5841 * linux-low.h (enum lwp_stop_reason): Delete.
5842 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5843 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5844
5845 2015-03-04 Yao Qi <yao.qi@linaro.org>
5846
5847 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5848
5849 2015-03-03 Gary Benson <gbenson@redhat.com>
5850
5851 * hostio.c (handle_vFile): Fix prefix lengths.
5852
5853 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5854
5855 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5856 ptr_bits.
5857
5858 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5859
5860 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5861 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5862 (clean): Add "rm -f" for above C files.
5863 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5864 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5865 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5866 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5867 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5868 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5869 (init_registers_s390x_vx_linux64)
5870 (init_registers_s390x_tevx_linux64)
5871 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5872 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5873 declarations.
5874 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5875 (s390_store_vxrs_high): New functions.
5876 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5877 NT_S390_VXRS_HIGH.
5878 (s390_arch_setup): Add logic for selecting one of the new target
5879 descriptions. Activate the new vector regsets if applicable.
5880 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5881 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5882 and init_registers_s390x_tevx_linux64.
5883
5884 2015-03-01 Pedro Alves <palves@redhat.com>
5885
5886 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5887 parameter.
5888
5889 2015-02-27 Pedro Alves <palves@redhat.com>
5890
5891 * linux-x86-low.c (u_debugreg_offset): New function.
5892 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5893
5894 2015-02-27 Pedro Alves <palves@redhat.com>
5895
5896 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5897 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5898 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5899 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5900 (ps_lsetfpregs, ps_getpid)
5901 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5902 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5903 (ps_lsetxregs, ps_plog): Declare.
5904
5905 2015-02-27 Pedro Alves <palves@redhat.com>
5906
5907 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5908 IP_AGENT_EXPORT_FUNC.
5909 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5910 IP_AGENT_EXPORT_FUNC.
5911 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5912 (IP_AGENT_EXPORT): Delete.
5913 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5914 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5915 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5916 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5917 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5918 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5919 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5920 (traceframe_read_count, traceframe_write_count)
5921 (traceframes_created, trace_state_variables, get_raw_reg)
5922 (get_trace_state_variable_value, set_trace_state_variable_value)
5923 (ust_loaded, helper_thread_id, cmd_buf): Use
5924 IPA_SYM_EXPORTED_NAME.
5925 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5926 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5927 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5928 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5929 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5930 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5931 EXTERN_C_PUSH/EXTERN_C_POP.
5932 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5933 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5934 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5935 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5936 (traceframe_write_count, traceframe_read_count)
5937 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5938 (about_to_request_buffer_space, get_trace_state_variable_value)
5939 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5940 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5941 EXTERN_C_PUSH/EXTERN_C_POP.
5942 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5943 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5944 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5945 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5947 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5948 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5949 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5950 Define.
5951 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5952 (IP_AGENT_EXPORT_VAR_DECL): Define.
5953 (tracing): Declare.
5954 (gdb_agent_get_raw_reg): Declare.
5955
5956 2015-02-27 Tom Tromey <tromey@redhat.com>
5957 Pedro Alves <palves@redhat.com>
5958
5959 Rename symbols whose names are reserved C++ keywords throughout.
5960
5961 2015-02-27 Pedro Alves <palves@redhat.com>
5962
5963 * Makefile.in (COMPILER): New, get it from autoconf.
5964 (CXX): Get from autoconf instead.
5965 (COMPILE.pre): Use COMPILER.
5966 (CC-LD): Rename to ...
5967 (CC_LD): ... this. Use COMPILER.
5968 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5969 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5970 * acinclude.m4: Include build-with-cxx.m4.
5971 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5972 Disable -Werror by default if building in C++ mode.
5973 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5974 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5975 the C++ compiler. Save/restore CXXFLAGS too.
5976 * configure: Regenerate.
5977
5978 2015-02-27 Pedro Alves <palves@redhat.com>
5979
5980 * acinclude.m4: Include libiberty.m4.
5981 * configure.ac: Call libiberty_INIT.
5982 * config.in, configure: Regenerate.
5983
5984 2015-02-26 Pedro Alves <palves@redhat.com>
5985
5986 * linux-low.c (linux_wait_1): When incrementing the PC past a
5987 program breakpoint always use the_low_target.breakpoint_len as
5988 increment, rather than the maximum between that and
5989 the_low_target.decr_pc_after_break.
5990
5991 2015-02-23 Pedro Alves <palves@redhat.com>
5992
5993 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5994 thread was doing a step-over; always adjust the PC if
5995 we stepped over a permanent breakpoint.
5996 (linux_wait_1): If we stepped over breakpoint that was on top of a
5997 permanent breakpoint, manually advance the PC past it.
5998
5999 2015-02-23 Pedro Alves <palves@redhat.com>
6000
6001 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6002 modes.
6003 (x86_fill_gregset, x86_store_gregset): Use it when handling
6004 $orig_eax.
6005
6006 2015-02-20 Pedro Alves <palves@redhat.com>
6007
6008 * thread-db.c: Include "nat/linux-procfs.h".
6009 (thread_db_init): Skip listing new threads if the kernel supports
6010 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6011
6012 2015-02-20 Pedro Alves <palves@redhat.com>
6013
6014 * linux-low.c (status_pending_p_callback): Use ptid_match.
6015
6016 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6017
6018 PR breakpoints/16812
6019 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6020 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6021 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6022
6023 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6024
6025 PR breakpoints/15956
6026 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6027
6028 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6029
6030 * linux-low.c (linux_low_btrace_conf): Print size.
6031 * server.c (handle_btrace_conf_general_set): New.
6032 (hanle_general_set): Call handle_btrace_conf_general_set.
6033 (handle_query): Report Qbtrace-conf:bts:size as supported.
6034
6035 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6036
6037 * linux-low.c (linux_low_enable_btrace): Update parameters.
6038 (linux_low_btrace_conf): New.
6039 (linux_target_ops)<to_btrace_conf>: Initialize.
6040 * server.c (current_btrace_conf): New.
6041 (handle_btrace_enable): Rename to ...
6042 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6043 to target_enable_btrace. Update comment. Update users.
6044 (handle_qxfer_btrace_conf): New.
6045 (qxfer_packets): Add btrace-conf entry.
6046 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6047 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6048 (target_ops)<read_btrace_conf>: New.
6049 (target_enable_btrace): Update parameters.
6050 (target_read_btrace_conf): New.
6051
6052 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6053
6054 * server.c (handle_btrace_general_set): Remove call to
6055 target_supports_btrace.
6056 (supported_btrace_packets): New.
6057 (handle_query): Call supported_btrace_packets.
6058 * target.h: include btrace-common.h.
6059 (btrace_target_info): Removed.
6060 (supports_btrace, target_supports_btrace): Update parameters.
6061
6062 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6063
6064 * Makefile.in (SFILES): Add common/btrace-common.c.
6065 (OBS): Add common/btrace-common.o.
6066 (btrace-common.o): Add build rules.
6067 * linux-low: Include btrace-common.h.
6068 (linux_low_read_btrace): Use struct btrace_data. Call
6069 btrace_data_init and btrace_data_fini.
6070
6071 2015-02-06 Pedro Alves <palves@redhat.com>
6072
6073 * thread-db.c (find_new_threads_callback): Add debug output.
6074
6075 2015-02-04 Pedro Alves <palves@redhat.com>
6076
6077 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6078 (resume_stopped_resumed_lwps): New function.
6079 (linux_wait_for_event_filtered): Use it.
6080
6081 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6082
6083 * Makefile.in (SFILES): Add linux-personality.c.
6084 (linux-personality.o): New rule.
6085 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6086 list of objects to be built.
6087 * linux-low.c: Include nat/linux-personality.h.
6088 (linux_create_inferior): Remove code to disable address space
6089 randomization (moved to ../nat/linux-personality.c). Create
6090 cleanup to disable address space randomization.
6091
6092 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6093
6094 * Makefile.in (posix-strerror.o): New rule.
6095 (mingw-strerror.o): Likewise.
6096 * configure: Regenerated.
6097 * configure.ac: Source file ../common/common.host. Initialize new
6098 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6099
6100 2015-01-14 Yao Qi <yao@codesourcery.com>
6101
6102 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6103 (ppc-linux.o): New rule.
6104 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6105 * configure.ac: AC_CHECK_FUNCS(getauxval).
6106 * config.in: Re-generated.
6107 * configure: Re-generated.
6108 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6109 ppc64_64bit_inferior_p
6110
6111 2015-01-14 Yao Qi <yao@codesourcery.com>
6112
6113 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6114 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6115 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6116 (PT_ORIG_R3, PT_TRAP): Likewise.
6117 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6118 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6119 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6120
6121 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6122
6123 * i387-fp.c (i387_cache_to_xsave): In look over
6124 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6125 zmmh_low_space field by use of zmmh_high_space.
6126
6127 2015-01-09 Pedro Alves <palves@redhat.com>
6128
6129 * linux-low.c (step_over_bkpt): Move higher up in the file.
6130 (handle_extended_wait): Don't store the stop_pc here.
6131 (get_stop_pc): Adjust comments and rename to ...
6132 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6133 stopped for a software breakpoint or hardware breakpoint.
6134 (thread_still_has_status_pending_p): New function.
6135 (status_pending_p_callback): Use
6136 thread_still_has_status_pending_p. If the event is no longer
6137 interesting, resume the LWP.
6138 (handle_tracepoints): Add assert.
6139 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6140 (wstatus_maybe_breakpoint): New function.
6141 (cancel_breakpoint): Delete function.
6142 (check_stopped_by_watchpoint): New function, factored out from
6143 linux_low_filter_event.
6144 (lp_status_maybe_breakpoint): Delete function.
6145 (linux_low_filter_event): Remove filter_ptid argument.
6146 Leave thread group exits pending here. Store the LWP's stop PC.
6147 Always leave events pending.
6148 (linux_wait_for_event_filtered): Pull all events out of the
6149 kernel, and leave them all pending.
6150 (count_events_callback, select_event_lwp_callback): Consider all
6151 events.
6152 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6153 (select_event_lwp): Only give preference to the stepping LWP in
6154 all-stop mode. Adjust comments.
6155 (ignore_event): New function.
6156 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6157 references to cancel_breakpoints. Adjust to renames. Also give
6158 equal priority to all LWPs that have had events in non-stop mode.
6159 If reporting a software breakpoint event, unadjust the LWP's PC.
6160 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6161 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6162 Adjust.
6163 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6164 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6165 (linux_stopped_by_watchpoint): Adjust.
6166 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6167 * linux-low.h (enum lwp_stop_reason): New.
6168 (struct lwp_info) <stop_pc>: Adjust comment.
6169 <stopped_by_watchpoint>: Delete field.
6170 <stop_reason>: New field.
6171 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6172 * mem-break.c (software_breakpoint_inserted_here)
6173 (hardware_breakpoint_inserted_here): New function.
6174 * mem-break.h (software_breakpoint_inserted_here)
6175 (hardware_breakpoint_inserted_here): Declare.
6176 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6177 (cancel_breakpoints): Delete.
6178 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6179 (upload_fast_traceframes): Remove references to
6180 cancel_breakpoints.
6181
6182 2015-01-09 Pedro Alves <palves@redhat.com>
6183
6184 * thread-db.c (find_new_threads_callback): Ignore thread if the
6185 kernel thread ID is -1.
6186
6187 2015-01-09 Pedro Alves <palves@redhat.com>
6188
6189 * linux-low.c (linux_attach_fail_reason_string): Move to
6190 nat/linux-ptrace.c, and rename.
6191 (linux_attach_lwp): Update comment.
6192 (attach_proc_task_lwp_callback): New function.
6193 (linux_attach): Adjust to rename and use
6194 linux_proc_attach_tgid_threads.
6195 (linux_attach_fail_reason_string): Delete declaration.
6196
6197 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6198
6199 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6200 * server.c (gdbserver_version): Likewise.
6201
6202 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6203
6204 * remote-utils.c: Include ctype.h.
6205 (input_interrupt): Explicitly handle the case when the char
6206 received is the NUL byte. Improve the printing of non-ASCII
6207 characters.
6208
6209 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6210
6211 * linux-low.c (linux_low_filter_event): Update call to
6212 linux_enable_event_reporting following the addition of
6213 a new parameter to that function.
6214
6215 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6216
6217 PR server/17457
6218 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6219 (AARCH64_FPCR_REGNO): Likewise.
6220 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6221 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6222 (aarch64_store_fpregset): Likewise.
6223
6224 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6225
6226 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6227 Remove FIXME comment about assumption about N.
6228
6229 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6230
6231 * configure.ac: If large-file support is disabled in GDBserver,
6232 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6233 * configure: Regenerate.
6234
6235 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6236
6237 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6238 warning upon ENODATA from ptrace.
6239 * linux-s390-low.c (s390_store_tdb): New.
6240 (s390_regsets): Add regset for NT_S390_TDB.
6241
6242 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6243
6244 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6245 without a fill_function.
6246 * linux-s390-low.c (s390_fill_last_break): Remove.
6247 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6248 (s390_arch_setup): Use regset's size instead of fill_function for
6249 loop end condition.
6250
6251 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6252
6253 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6254 the regset's store function when ptrace returned an error.
6255 * regcache.c (get_thread_regcache): Invalidate register cache
6256 before fetching inferior's registers.
6257
6258 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6259
6260 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6261 while-loop as for-loop.
6262 (regsets_store_inferior_registers): Likewise.
6263
6264 2014-11-28 Yao Qi <yao@codesourcery.com>
6265
6266 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6267 * config.in, configure: Re-generate.
6268 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6269 is defined.
6270
6271 2014-11-21 Yao Qi <yao@codesourcery.com>
6272
6273 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6274 (AC_CHECK_HEADERS): Remove malloc.h.
6275 * configure: Re-generated.
6276 * config.in: Re-generated.
6277 * server.h: Don't include alloca.h and malloc.h.
6278 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6279 Don't include malloc.h.
6280
6281 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6282
6283 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6284 corresponding ERRNO check in same block.
6285
6286 2014-11-12 Pedro Alves <palves@redhat.com>
6287
6288 * server.c (cont_thread): Update comment.
6289 (start_inferior, attach_inferior): No longer clear cont_thread.
6290 (handle_v_cont): No longer set cont_thread.
6291 (captured_main): Clear cont_thread each time a GDB connects.
6292
6293 2014-11-12 Pedro Alves <palves@redhat.com>
6294
6295 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6296 thread, and don't resume all threads if the Hc thread has exited.
6297
6298 2014-11-12 Pedro Alves <palves@redhat.com>
6299
6300 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6301 the process group instead of to a specific LWP.
6302
6303 2014-10-15 Pedro Alves <palves@redhat.com>
6304
6305 PR server/17487
6306 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6307 parameter.
6308 (arm_set_thread_context): Delete.
6309 (the_low_target): Adjust.
6310 * win32-i386-low.c (debug_registers_changed)
6311 (debug_registers_used): Delete.
6312 (update_debug_registers_callback): New function.
6313 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6314 needing to update their debug registers.
6315 (win32_get_current_dr): New function.
6316 (x86_dr_low_get_addr, x86_dr_low_get_control)
6317 (x86_dr_low_get_status): Fetch the debug register from the thread
6318 record's context.
6319 (i386_initial_stuff): Adjust.
6320 (i386_get_thread_context): Remove current_event parameter. Don't
6321 clear debug_registers_changed nor copy DR values to
6322 debug_reg_state.
6323 (i386_set_thread_context): Delete.
6324 (i386_prepare_to_resume): New function.
6325 (i386_thread_added): Mark the thread as needing to update irs
6326 debug registers.
6327 (the_low_target): Remove i386_set_thread_context and install
6328 i386_prepare_to_resume.
6329 * win32-low.c (win32_get_thread_context): Adjust.
6330 (win32_set_thread_context): Use SetThreadContext
6331 directly.
6332 (win32_prepare_to_resume): New function.
6333 (win32_require_context): New function, factored out from ...
6334 (thread_rec): ... this.
6335 (continue_one_thread): Call win32_prepare_to_resume on each thread
6336 we're about to continue.
6337 (win32_resume): Call win32_prepare_to_resume on the event thread.
6338 * win32-low.h (struct win32_thread_info)
6339 <debug_registers_changed>: New field.
6340 (struct win32_target_ops): Change prototype of set_thread_context,
6341 delete set_thread_context and add prepare_to_resume.
6342 (win32_require_context): New declaration.
6343
6344 2014-10-08 Gary Benson <gbenson@redhat.com>
6345
6346 * server.h: Do not include common-exceptions.h.
6347
6348 2014-10-08 Gary Benson <gbenson@redhat.com>
6349
6350 * server.h: Do not include cleanups.h.
6351
6352 2014-09-30 James Hogan <james.hogan@imgtec.com>
6353
6354 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6355 mips64-dsp-linux.c.
6356
6357 2014-09-23 Yao Qi <yao@codesourcery.com>
6358
6359 * linux-low.c (lp_status_maybe_breakpoint): New function.
6360 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6361 (count_events_callback): Likewise.
6362 (select_event_lwp_callback): Likewise.
6363 (cancel_breakpoints_callback): Likewise.
6364
6365 2014-09-19 Don Breazeal <donb@codesourcery.com>
6366
6367 * linux-low.c (handle_extended_wait): Call
6368 linux_ptrace_get_extended_event.
6369 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6370 linux_is_extended_waitstatus.
6371
6372 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6373
6374 * Makefile.in (CPPFLAGS): Define.
6375 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6376 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6377
6378 2014-09-16 Gary Benson <gbenson@redhat.com>
6379
6380 * inferiors.h (current_inferior): Renamed as...
6381 (current_thread): New variable. All uses updated.
6382 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6383 (maybe_move_out_of_jump_pad): Likewise.
6384 (cancel_breakpoint): Likewise.
6385 (linux_low_filter_event): Likewise.
6386 (wait_for_sigstop): Likewise.
6387 (linux_resume_one_lwp): Likewise.
6388 (need_step_over_p): Likewise.
6389 (start_step_over): Likewise.
6390 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6391 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6392 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6393 and save_inferior as saved_thread.
6394 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6395 saved_thread.
6396 (regcache_invalidate_thread): Likewise.
6397 * remote-utils.c (prepare_resume_reply): Likewise.
6398 * thread-db.c (thread_db_get_tls_address): Likewise.
6399 (disable_thread_event_reporting): Likewise.
6400 (remove_thread_event_breakpoints): Likewise.
6401 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6402 as saved_thread.
6403 * target.h (set_desired_inferior): Renamed as...
6404 (set_desired_thread): New declaration. All uses updated.
6405 * server.c (myresume): Updated comment to reference thread instead
6406 of inferior.
6407 (handle_serial_event): Likewise.
6408 (handle_target_event): Likewise.
6409
6410 2014-09-12 Tom Tromey <tromey@redhat.com>
6411 Gary Benson <gbenson@redhat.com>
6412
6413 * regcache.h: Include common-regcache.h.
6414 (regcache_read_pc): Don't declare.
6415 * regcache.c (get_thread_regcache_for_ptid): New function.
6416
6417 2014-09-11 Tom Tromey <tromey@redhat.com>
6418 Gary Benson <gbenson@redhat.com>
6419
6420 * symbol.c: New file.
6421 * Makefile.in (SFILES): Add symbol.c.
6422 (OBS): Add symbol.o.
6423
6424 2014-09-11 Gary Benson <gbenson@redhat.com>
6425
6426 * target.c (target_stop_ptid, target_continue_ptid): New
6427 functions.
6428
6429 2014-09-11 Tom Tromey <tromey@redhat.com>
6430 Gary Benson <gbenson@redhat.com>
6431
6432 * target.h: Include target/target.h.
6433 * target.c (target_read_memory, target_read_uint32)
6434 (target_write_memory): New functions.
6435
6436 2014-09-11 Gary Benson <gbenson@redhat.com>
6437
6438 * server.h (debug_hw_points): Don't declare.
6439 * server.c (debug_hw_points): Don't define. Replace all uses
6440 with show_debug_regs.
6441 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6442 all uses with show_debug_regs.
6443
6444 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6445
6446 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6447 endianness into account.
6448 (ppc_supply_ptrace_register): Likewise.
6449
6450 2014-09-03 James Hogan <james.hogan@imgtec.com>
6451
6452 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6453 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6454
6455 2014-09-03 Gary Benson <gbenson@redhat.com>
6456
6457 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6458 ALL_DEBUG_ADDRESS_REGISTERS.
6459
6460 2014-09-02 Gary Benson <gbenson@redhat.com>
6461
6462 * i386-low.h: Renamed as...
6463 * x86-low.h: New file. All type, function and variable name
6464 prefixes changed from "i386_" to "x86_". All references updated.
6465 * i386-low.c: Renamed as...
6466 * x86-low.c: New file. All type, function and variable name
6467 prefixes changed from "i386_" to "x86_". All references updated.
6468
6469 2014-09-02 Gary Benson <gbenson@redhat.com>
6470
6471 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6472 (x86_linux_new_thread): Likewise.
6473
6474 2014-08-29 Gary Benson <gbenson@redhat.com>
6475
6476 * server.h (setjmp.h): Do not include.
6477 (toplevel): Do not declare.
6478 (common-exceptions.h): Include.
6479 (cleanups.h): Likewise.
6480 * server.c (toplevel): Do not define.
6481 (exit_code): New static global.
6482 (detach_or_kill_for_exit_cleanup): New function.
6483 (main): New function. Original main renamed to...
6484 (captured_main): New function.
6485 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6486
6487 2014-08-29 Gary Benson <gbenson@redhat.com>
6488
6489 * Makefile.in (SFILES): Add common/common-exceptions.c.
6490 (OBS): Add common-exceptions.o.
6491 (common-exceptions.o): New rule.
6492 * utils.c (prepare_to_throw_exception): New function.
6493
6494 2014-08-29 Gary Benson <gbenson@redhat.com>
6495
6496 * config.in: Regenerate.
6497 * configure: Likewise.
6498
6499 2014-08-29 Gary Benson <gbenson@redhat.com>
6500
6501 * Makefile.in (SFILES): Add common/cleanups.c.
6502 (OBS): cleanups.o.
6503 (cleanups.o): New rule.
6504
6505 2014-08-29 Gary Benson <gbenson@redhat.com>
6506
6507 * utils.c (internal_vwarning): New function.
6508
6509 2014-08-28 Gary Benson <gbenson@redhat.com>
6510
6511 * utils.h (fatal): Remove declaration.
6512 * utils.c (fatal): Remove function.
6513
6514 2014-08-28 Gary Benson <gbenson@redhat.com>
6515
6516 * tracepoint.c (gdb_agent_init): Replace fatal with
6517 perror_with_name.
6518 (initialize_tracepoint): Likewise.
6519
6520 2014-08-28 Gary Benson <gbenson@redhat.com>
6521
6522 * remote-utils.c (remote_prepare): Replace fatal with error.
6523
6524 2014-08-28 Gary Benson <gbenson@redhat.com>
6525
6526 * linux-low.c (linux_async): Replace fatal with warning.
6527 Tidy up and return.
6528 (linux_start_non_stop): Return -1 if linux_async failed.
6529
6530 2014-08-28 Gary Benson <gbenson@redhat.com>
6531
6532 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6533 gdb_assert.
6534 (i386_dr_low_get_addr): Remove vague comment.
6535 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6536 gdb_assert.
6537
6538 2014-08-28 Gary Benson <gbenson@redhat.com>
6539
6540 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6541 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6542 internal_error.
6543 (linux_resume_one_lwp): Likewise.
6544 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6545 gdb_assert.
6546 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6547 with internal_error.
6548 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6549 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6550 (find_register_by_name): Replace fatal with internal_error.
6551 (find_regno): Likewise.
6552 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6553 * thread-db.c (thread_db_create_event): Likewise.
6554 (thread_db_load_search): Likewise.
6555 (try_thread_db_load_1): Likewise.
6556 * tracepoint.c (get_jump_space_head): Replace fatal with
6557 internal_error.
6558 (claim_trampoline_space): Likewise.
6559 (have_fast_tracepoint_trampoline_buffer): Likewise.
6560 (cmd_qtstart): Likewise.
6561 (stop_tracing): Likewise.
6562 (fast_tracepoint_collecting): Likewise.
6563 (target_malloc): Likewise.
6564 (download_tracepoint): Likewise.
6565 (download_trace_state_variables): Replace check with gdb_assert.
6566 (upload_fast_traceframes): Replace fatal with internal_error.
6567
6568 2014-08-19 Tom Tromey <tromey@redhat.com>
6569 Gary Benson <gbenson@redhat.com>
6570
6571 * Makefile.in (SFILES): Add common/common-debug.c.
6572 (OBS): Add common-debug.o.
6573 (common-debug.o): New rule.
6574 * debug.h (debug_printf): Don't declare.
6575 * debug.c (debug_printf): Renamed and rewritten as...
6576 (debug_vprintf): New function.
6577
6578 2014-08-19 Gary Benson <gbenson@redhat.com>
6579
6580 * utils.h: Do not include print-utils.h.
6581
6582 2014-08-19 Tom Tromey <tromey@redhat.com>
6583 Gary Benson <gbenson@redhat.com>
6584
6585 * server.h: Add static assertion.
6586 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6587
6588 2014-08-19 Tom Tromey <tromey@redhat.com>
6589 Gary Benson <gbenson@redhat.com>
6590
6591 * Makefile.in (SFILES): Add common/errors.c.
6592 (OBS): Add errors.o.
6593 (IPA_OBS): Add errors-ipa.o.
6594 (errors.o): New rule.
6595 (errors-ipa.o): Likewise.
6596 * utils.h (perror_with_name, error, warning): Don't declare.
6597 * utils.c (warning): Renamed and rewritten as...
6598 (vwarning): New function.
6599 (error): Renamed and rewritten as...
6600 (verror): New function.
6601 (internal_error): Renamed and rewritten as...
6602 (internal_verror): New function.
6603
6604 2014-08-07 Gary Benson <gbenson@redhat.com>
6605
6606 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6607 * configure: Regenerate.
6608 * config.in: Likewise.
6609 * server.h: Do not include errno.h.
6610 * event-loop.c: Likewise.
6611 * hostio-errno.c: Likewise.
6612 * linux-low.c: Likewise.
6613 * remote-utils.c: Likewise.
6614 * spu-low.c: Likewise.
6615 * utils.c: Likewise.
6616 * gdbreplay.c: Unconditionally include errno.h.
6617
6618 2014-08-07 Gary Benson <gbenson@redhat.com>
6619
6620 * server.h: Do not include string.h.
6621 * event-loop.c: Likewise.
6622 * linux-low.c: Likewise.
6623 * regcache.c: Likewise.
6624 * remote-utils.c: Likewise.
6625 * spu-low.c: Likewise.
6626 * utils.c: Likewise.
6627
6628 2014-08-07 Gary Benson <gbenson@redhat.com>
6629
6630 * server.h: Do not include gdb_assert.h.
6631
6632 2014-08-07 Gary Benson <gbenson@redhat.com>
6633
6634 * server.h: Do not include common-utils.h.
6635
6636 2014-08-07 Gary Benson <gbenson@redhat.com>
6637
6638 * server.h: Do not include ptid.h.
6639 * notif.h: Likewise.
6640
6641 2014-08-07 Gary Benson <gbenson@redhat.com>
6642
6643 * server.h: Do not include gdb_locale.h.
6644
6645 2014-08-07 Gary Benson <gbenson@redhat.com>
6646
6647 * server.h: Do not include gdb/signals.h.
6648 * win32-low.c: Likewise.
6649
6650 2014-08-07 Gary Benson <gbenson@redhat.com>
6651
6652 * server.h: Do not include pathmax.h.
6653
6654 2014-08-07 Gary Benson <gbenson@redhat.com>
6655
6656 * server.h: Do not include libiberty.h.
6657 * linux-bfin-low.c: Likewise.
6658
6659 2014-08-07 Gary Benson <gbenson@redhat.com>
6660
6661 * server.h: Do not include ansidecl.h.
6662
6663 2014-08-07 Gary Benson <gbenson@redhat.com>
6664
6665 * linux-x86-low.c: Do not include stddef.h.
6666 * lynx-ppc-low.c: Likewise.
6667 * tracepoint.c: Likewise.
6668
6669 2014-08-07 Gary Benson <gbenson@redhat.com>
6670
6671 * server.h: Do not include stdarg.h.
6672 * nto-low.c: Likewise.
6673
6674 2014-08-07 Gary Benson <gbenson@redhat.com>
6675
6676 * server.h: Do not include stdlib.h.
6677 * inferiors.c: Likewise.
6678 * linux-low.c: Likewise.
6679 * regcache.c: Likewise.
6680 * spu-low.c: Likewise.
6681 * tracepoint.c: Likewise.
6682 * utils.c: Likewise.
6683
6684 2014-08-07 Gary Benson <gbenson@redhat.com>
6685
6686 * server.h: Do not include stdio.h.
6687 * linux-low.c: Likewise.
6688 * remote-utils.c: Likewise.
6689 * spu-low.c: Likewise.
6690 * utils.c: Likewise.
6691 * wincecompat.c: Likewise.
6692
6693 2014-08-06 Gary Benson <gbenson@redhat.com>
6694
6695 * regcache.c (init_register_cache): Move conditionals inside if.
6696
6697 2014-08-06 Gary Benson <gbenson@redhat.com>
6698
6699 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6700
6701 2014-07-31 Gary Benson <gbenson@redhat.com>
6702
6703 * ax.h: Do not include server.h.
6704 * gdbthread.h: Likewise.
6705 * lynx-low.h: Likewise.
6706 * notif.h: Likewise.
6707
6708 2014-07-30 Gary Benson <gbenson@redhat.com>
6709
6710 * server.h: Include common-defs.h.
6711 Do not include config.h or build-gnulib-gdbserver/config.h.
6712
6713 2014-07-30 Gary Benson <gbenson@redhat.com>
6714
6715 * hostio-errno.c: Move server.h to top of includes list.
6716 * inferiors.c: Likewise.
6717 * linux-x86-low.c: Likewise.
6718 * notif.c: Include server.h.
6719
6720 2014-07-24 Tom Tromey <tromey@redhat.com>
6721 Gary Benson <gbenson@redhat.com>
6722
6723 * server.h (CORE_ADDR): Now unsigned.
6724
6725 2014-07-16 Pedro Alves <palves@redhat.com>
6726
6727 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6728
6729 2014-07-15 Pedro Alves <palves@redhat.com>
6730
6731 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6732 copy.
6733
6734 2014-07-11 Pedro Alves <palves@redhat.com>
6735
6736 * linux-low.c (kill_wait_lwp): New function, based on
6737 kill_one_lwp_callback, but use my_waitpid directly.
6738 (kill_one_lwp_callback, linux_kill): Use it.
6739
6740 2014-06-23 Pedro Alves <palves@redhat.com>
6741
6742 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6743 before setting DR0..DR3.
6744
6745 2014-06-20 Gary Benson <gbenson@redhat.com>
6746
6747 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6748 * configure: Regenerated.
6749 * config.in: Likewise.
6750
6751 2014-06-20 Gary Benson <gbenson@redhat.com>
6752
6753 * Makefile.in (SFILES): Update locations for files moved
6754 from common to nat.
6755 (object file files): Reordered.
6756
6757 2014-06-20 Gary Benson <gbenson@redhat.com>
6758
6759 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6760 (i386_dr_low_set_addr): Likewise.
6761 (i386_dr_low_get_addr): Likewise.
6762 (i386_dr_low_can_set_control): Likewise.
6763 (i386_dr_low_set_control): Likewise.
6764 (i386_dr_low_get_control): Likewise.
6765 (i386_dr_low_get_status): Likewise.
6766 (i386_get_debug_register_length): Likewise.
6767 * linux-x86-low.c (i386_dr_low_set_addr):
6768 Changed signature. Made static.
6769 (i386_dr_low_get_addr): Likewise.
6770 (i386_dr_low_set_control): Likewise.
6771 (i386_dr_low_get_control): Likewise.
6772 (i386_dr_low_get_status): Likewise.
6773 (i386_dr_low): New global variable.
6774 * win32-i386-low.c (i386_dr_low_set_addr):
6775 Changed signature. Made static.
6776 (i386_dr_low_get_addr): Likewise.
6777 (i386_dr_low_set_control): Likewise.
6778 (i386_dr_low_get_control): Likewise.
6779 (i386_dr_low_get_status): Likewise.
6780 (i386_dr_low): New global variable.
6781
6782 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6783
6784 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6785 * Makefile.in (AR, AR_FLAGS): Define.
6786 * configure: Regenerate.
6787
6788 2014-06-19 Gary Benson <gbenson@redhat.com>
6789
6790 * Makefile.in (i386-dregs.o): New rule.
6791 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6792 * i386-low.c (target.h): Remove include.
6793 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6794 (DR_CONTROL_SHIFT): Likewise.
6795 (DR_CONTROL_SIZE): Likewise.
6796 (DR_RW_EXECUTE): Likewise.
6797 (DR_RW_WRITE): Likewise.
6798 (DR_RW_READ): Likewise.
6799 (DR_RW_IORW): Likewise.
6800 (DR_LEN_1): Likewise.
6801 (DR_LEN_2): Likewise.
6802 (DR_LEN_4): Likewise.
6803 (DR_LEN_8): Likewise.
6804 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6805 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6806 (DR_ENABLE_SIZE): Likewise.
6807 (DR_LOCAL_SLOWDOWN): Likewise.
6808 (DR_GLOBAL_SLOWDOWN): Likewise.
6809 (DR_CONTROL_RESERVED): Likewise.
6810 (I386_DR_CONTROL_MASK): Likewise.
6811 (I386_DR_VACANT): Likewise.
6812 (I386_DR_LOCAL_ENABLE): Likewise.
6813 (I386_DR_GLOBAL_ENABLE): Likewise.
6814 (I386_DR_DISABLE): Likewise.
6815 (I386_DR_SET_RW_LEN): Likewise.
6816 (I386_DR_GET_RW_LEN): Likewise.
6817 (I386_DR_WATCH_HIT): Likewise.
6818 (i386_wp_op_t): Likewise.
6819 (i386_show_dr): Likewise.
6820 (i386_length_and_rw_bits): Likewise.
6821 (i386_insert_aligned_watchpoint): Likewise.
6822 (i386_remove_aligned_watchpoint): Likewise.
6823 (i386_handle_nonaligned_watchpoint): Likewise.
6824 i386_update_inferior_debug_regs(): Likewise.
6825 (i386_dr_insert_watchpoint): Likewise.
6826 (i386_dr_remove_watchpoint): Likewise.
6827 (i386_dr_region_ok_for_watchpoint): Likewise.
6828 (i386_dr_stopped_data_address): Likewise.
6829 (i386_dr_stopped_by_watchpoint): Likewise.
6830
6831 2014-06-19 Gary Benson <gbenson@redhat.com>
6832
6833 * i386-low.c (i386_dr_show): Renamed to
6834 i386_show_dr and made static. All uses updated.
6835 (i386_dr_length_and_rw_bits): Renamed to
6836 i386_length_and_rw_bits and made static.
6837 All uses updated.
6838 (i386_dr_insert_aligned_watchpoint): Renamed to
6839 i386_insert_aligned_watchpoint and made static.
6840 All uses updated.
6841 (i386_dr_remove_aligned_watchpoint): Renamed to
6842 i386_remove_aligned_watchpoint and made static.
6843 All uses updated.
6844 (i386_dr_update_inferior_debug_regs): Renamed to
6845 i386_update_inferior_debug_regs and made static.
6846 All uses updated.
6847
6848 2014-06-18 Gary Benson <gbenson@redhat.com>
6849
6850 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6851 (i386_dr_low_can_set_control): Likewise.
6852 (i386_get_debug_register_length): Likewise.
6853 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6854 (i386_dr_low_can_set_control): Likewise.
6855 (i386_get_debug_register_length): Likewise.
6856
6857 2014-06-17 Gary Benson <gbenson@redhat.com>
6858
6859 * i386-low.h (i386-dregs.h): New include.
6860 (DR_FIRSTADDR): Now in i386-dregs.h.
6861 (DR_LASTADDR): Likewise.
6862 (DR_NADDR): Likewise.
6863 (DR_STATUS): Likewise.
6864 (DR_CONTROL): Likewise.
6865 (i386_debug_reg_state): Likewise.
6866 (i386_dr_insert_watchpoint): Likewise.
6867 (i386_dr_remove_watchpoint): Likewise.
6868 (i386_dr_region_ok_for_watchpoint): Likewise.
6869 (i386_dr_stopped_data_address): Likewise.
6870 (i386_dr_stopped_by_watchpoint): Likewise.
6871 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6872
6873 2014-06-18 Gary Benson <gbenson@redhat.com>
6874
6875 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6876 i386_dr_insert_watchpoint.
6877 (i386_low_remove_watchpoint): Renamed to
6878 i386_dr_remove_watchpoint.
6879 (i386_low_region_ok_for_watchpoint): Renamed to
6880 i386_dr_region_ok_for_watchpoint.
6881 (i386_low_stopped_data_address): Renamed to
6882 i386_dr_stopped_data_address.
6883 (i386_low_stopped_by_watchpoint): Renamed to
6884 i386_dr_stopped_by_watchpoint.
6885 * i386-low.c (i386_show_dr): Renamed to
6886 i386_dr_show and made nonstatic. All uses updated.
6887 (i386_length_and_rw_bits): Renamed to
6888 i386_dr_length_and_rw_bits and made nonstatic.
6889 All uses updated.
6890 (i386_insert_aligned_watchpoint): Renamed to
6891 i386_dr_insert_aligned_watchpoint and made nonstatic.
6892 All uses updated.
6893 (i386_remove_aligned_watchpoint): Renamed to
6894 i386_dr_remove_aligned_watchpoint and made nonstatic.
6895 All uses updated.
6896 (i386_update_inferior_debug_regs): Renamed to
6897 i386_dr_update_inferior_debug_regs and made nonstatic.
6898 All uses updated.
6899 (i386_low_insert_watchpoint): Renamed to
6900 i386_dr_insert_watchpoint. All uses updated.
6901 (i386_low_remove_watchpoint): Renamed to
6902 i386_dr_remove_watchpoint. All uses updated.
6903 (i386_low_region_ok_for_watchpoint): Renamed to
6904 i386_dr_region_ok_for_watchpoint. All uses updated.
6905 (i386_low_stopped_data_address): Renamed to
6906 i386_dr_stopped_data_address. All uses updated.
6907 (i386_low_stopped_by_watchpoint): Renamed to
6908 i386_dr_stopped_by_watchpoint. All uses updated.
6909
6910 2014-06-18 Gary Benson <gbenson@redhat.com>
6911
6912 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6913 (i386_dr_low_can_set_control): Likewise.
6914 (i386_insert_aligned_watchpoint): New check.
6915
6916 2014-06-18 Gary Benson <gbenson@redhat.com>
6917
6918 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6919 Renamed to state.
6920
6921 2014-06-18 Gary Benson <gbenson@redhat.com>
6922
6923 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6924 instead of fatal and error.
6925 (i386_handle_nonaligned_watchpoint): Likewise.
6926
6927 2014-06-18 Gary Benson <gbenson@redhat.com>
6928
6929 * i386-low.c (i386_get_debug_register_length): New macro.
6930 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6931 (i386_show_dr): Use debug_printf instead of fprintf. Use
6932 phex to format values.
6933
6934 2014-06-18 Gary Benson <gbenson@redhat.com>
6935
6936 * i386-low.h: Comment changes.
6937 * i386-low.c: Likewise.
6938
6939 2014-06-18 Gary Benson <gbenson@redhat.com>
6940
6941 * i386-low.c: Whitespace changes.
6942
6943 2014-06-12 Tom Tromey <tromey@redhat.com>
6944
6945 * utils.c (freeargv): Remove.
6946
6947 2014-06-12 Tom Tromey <tromey@redhat.com>
6948
6949 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6950 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6951 (parse_debug_format_options): Likewise.
6952 (gdbserver_usage): Likewise.
6953 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6954 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6955 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6956 against libiberty.
6957 ($(LIBGNU)): Depend on libiberty.
6958 (all-lib): Recurse into all subdirs.
6959 (install-only): Invoke "install" target in subdirs.
6960 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6961 targets.
6962 * configure: Rebuild.
6963 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6964 for vasprintf, vsnprintf, or gettimeofday.
6965 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6966 srv_tgtobj.
6967
6968 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6969
6970 * development.sh: Delete.
6971 * Makefile.in (config.status): Adjust dependency on development.sh.
6972 * configure.ac: Adjust development.sh source call.
6973 * configure: Regenerate.
6974
6975 2014-06-02 Pedro Alves <palves@redhat.com>
6976
6977 * ax.c (gdb_free_agent_expr): New function.
6978 * ax.h (gdb_free_agent_expr): New declaration.
6979 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6980 list.
6981 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6982 static.
6983 (clear_breakpoint_conditions_and_commands): New function.
6984 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6985 (clear_breakpoint_conditions_and_commands): New declaration.
6986
6987 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6988
6989 * linux-aarch64-low.c (asm/ptrace.h): Include.
6990
6991 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6992
6993 Fix TLS access for -static -pthread.
6994 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6995 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6996 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6997
6998 2014-05-20 Pedro Alves <palves@redhat.com>
6999
7000 * linux-aarch64-low.c (aarch64_insert_point)
7001 (aarch64_remove_point): No longer check whether the type is
7002 supported here. Adjust to new interface.
7003 (the_low_target): Install aarch64_supports_z_point_type as
7004 supports_z_point_type method.
7005 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7006 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7007 instead of a Z packet char. Adjust.
7008 (arm_supports_z_point_type): New function.
7009 (arm_insert_point, arm_remove_point): Adjust to new interface.
7010 (the_low_target): Install arm_supports_z_point_type.
7011 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7012 (cris_insert_point, cris_remove_point): Adjust to new interface.
7013 Don't check whether the type is supported here.
7014 (the_low_target): Install cris_supports_z_point_type.
7015 * linux-low.c (linux_supports_z_point_type): New function.
7016 (linux_insert_point, linux_remove_point): Adjust to new interface.
7017 * linux-low.h (struct linux_target_ops) <insert_point,
7018 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7019 raw_breakpoint pointer parameter.
7020 <supports_z_point_type>: New method.
7021 * linux-mips-low.c (mips_supports_z_point_type): New function.
7022 (mips_insert_point, mips_remove_point): Adjust to new interface.
7023 Use mips_supports_z_point_type.
7024 (the_low_target): Install mips_supports_z_point_type.
7025 * linux-ppc-low.c (the_low_target): Install NULL as
7026 supports_z_point_type method.
7027 * linux-s390-low.c (the_low_target): Install NULL as
7028 supports_z_point_type method.
7029 * linux-sparc-low.c (the_low_target): Install NULL as
7030 supports_z_point_type method.
7031 * linux-x86-low.c (x86_supports_z_point_type): New function.
7032 (x86_insert_point): Adjust to new insert_point interface. Use
7033 insert_memory_breakpoint. Adjust to new
7034 i386_low_insert_watchpoint interface.
7035 (x86_remove_point): Adjust to remove_point interface. Use
7036 remove_memory_breakpoint. Adjust to new
7037 i386_low_remove_watchpoint interface.
7038 (the_low_target): Install x86_supports_z_point_type.
7039 * lynx-low.c (lynx_target_ops): Install NULL as
7040 supports_z_point_type callback.
7041 * nto-low.c (nto_supports_z_point_type): New.
7042 (nto_insert_point, nto_remove_point): Adjust to new interface.
7043 (nto_target_ops): Install nto_supports_z_point_type.
7044 * mem-break.c: Adjust intro comment.
7045 (struct raw_breakpoint) <raw_type, size>: New fields.
7046 <inserted>: Update comment.
7047 <shlib_disabled>: Delete field.
7048 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7049 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7050 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7051 (raw_bkpt_type_to_target_hw_bp_type): New function.
7052 (find_enabled_raw_code_breakpoint_at): New function.
7053 (find_raw_breakpoint_at): New type and size parameters. Use them.
7054 (insert_memory_breakpoint): New function, based off
7055 set_raw_breakpoint_at.
7056 (remove_memory_breakpoint): New function.
7057 (set_raw_breakpoint_at): Reimplement.
7058 (set_breakpoint): New, based on set_breakpoint_at.
7059 (set_breakpoint_at): Reimplement.
7060 (delete_raw_breakpoint): Go through the_target->remove_point
7061 instead of assuming memory breakpoints.
7062 (find_gdb_breakpoint_at): Delete.
7063 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7064 (find_gdb_breakpoint): New function.
7065 (set_gdb_breakpoint_at): Delete.
7066 (z_type_supported): New function.
7067 (set_gdb_breakpoint_1): New function, loosely based off
7068 set_gdb_breakpoint_at.
7069 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7070 (delete_gdb_breakpoint_at): Delete.
7071 (delete_gdb_breakpoint_1): New function, loosely based off
7072 delete_gdb_breakpoint_at.
7073 (delete_gdb_breakpoint): New function.
7074 (clear_gdb_breakpoint_conditions): Rename to ...
7075 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7076 breakpoint.
7077 (add_condition_to_breakpoint): Make static.
7078 (add_breakpoint_condition): Take a struct breakpoint pointer
7079 instead of an address. Adjust.
7080 (gdb_condition_true_at_breakpoint): Rename to ...
7081 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7082 z_type parameter.
7083 (gdb_condition_true_at_breakpoint): Reimplement.
7084 (add_breakpoint_commands): Take a struct breakpoint pointer
7085 instead of an address. Adjust.
7086 (gdb_no_commands_at_breakpoint): Rename to ...
7087 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7088 parameter. Return true if no breakpoint was found. Change debug
7089 output.
7090 (gdb_no_commands_at_breakpoint): Reimplement.
7091 (run_breakpoint_commands): Rename to ...
7092 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7093 and change return type to boolean.
7094 (run_breakpoint_commands): New function.
7095 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7096 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7097 breakpoint. Go through the_target->remove_point instead of
7098 assuming memory breakpoint.
7099 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7100 software and hardware breakpoints.
7101 (reinsert_raw_breakpoint): Go through the_target->insert_point
7102 instead of assuming memory breakpoint.
7103 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7104 software and hardware breakpoints.
7105 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7106 Check both software and hardware breakpoints.
7107 (validate_inserted_breakpoint): Assert the breakpoint is a
7108 software breakpoint. Set the inserted flag to -1 instead of
7109 setting shlib_disabled.
7110 (delete_disabled_breakpoints): Adjust.
7111 (validate_breakpoints): Only validate software breakpoints.
7112 Adjust to inserted flag change.
7113 (check_mem_read, check_mem_write): Skip breakpoint types other
7114 than software breakpoints. Adjust to inserted flag change.
7115 * mem-break.h (enum raw_bkpt_type): New enum.
7116 (raw_breakpoint, struct process_info): Forward declare.
7117 (Z_packet_to_target_hw_bp_type): Delete declaration.
7118 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7119 (set_gdb_breakpoint, delete_gdb_breakpoint)
7120 (clear_breakpoint_conditions): New declarations.
7121 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7122 (breakpoint_inserted_here): Update comment.
7123 (add_breakpoint_condition, add_breakpoint_commands): Replace
7124 address parameter with a breakpoint pointer parameter.
7125 (gdb_breakpoint_here): Update comment.
7126 (delete_gdb_breakpoint_at): Delete.
7127 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7128 * server.c (process_point_options): Take a struct breakpoint
7129 pointer instead of an address. Adjust.
7130 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7131 delete_gdb_breakpoint.
7132 * spu-low.c (spu_target_ops): Install NULL as
7133 supports_z_point_type method.
7134 * target.h: Include mem-break.h.
7135 (struct target_ops) <prepare_to_access_memory>: Update comment.
7136 <supports_z_point_type>: New field.
7137 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7138 instead of a char. Also take a raw breakpoint pointer.
7139 * win32-arm-low.c (the_low_target): Install NULL as
7140 supports_z_point_type.
7141 * win32-i386-low.c (i386_supports_z_point_type): New function.
7142 (i386_insert_point, i386_remove_point): Adjust to new interface.
7143 (the_low_target): Install i386_supports_z_point_type.
7144 * win32-low.c (win32_supports_z_point_type): New function.
7145 (win32_insert_point, win32_remove_point): Adjust to new interface.
7146 (win32_target_ops): Install win32_supports_z_point_type.
7147 * win32-low.h (struct win32_target_ops):
7148 <supports_z_point_type>: New method.
7149 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7150 instead of a char. Also take a raw breakpoint pointer.
7151
7152 2014-05-20 Pedro Alves <palves@redhat.com>
7153
7154 * mem-break.h: Include break-common.h.
7155 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7156 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7157 (Z_packet_to_target_hw_bp_type): New declaration.
7158 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7159 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7160 (Z_PACKET_ACCESS_WP): Delete macros.
7161 (Z_packet_to_hw_type): Delete function.
7162 * i386-low.h: Don't include break-common.h here.
7163 (Z_packet_to_hw_type): Delete declaration.
7164 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7165 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7166 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7167 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7168 * linux-aarch64-low.c: Don't include break-common.h here.
7169 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7170 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7171 (Z_packet_to_target_hw_bp_type): Delete function.
7172 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7173 function.
7174 (mips_insert_point, mips_remove_point): Use
7175 Z_packet_to_target_hw_bp_type.
7176
7177 2014-05-20 Pedro Alves <palves@redhat.com>
7178
7179 * linux-aarch64-low.c: Include break-common.h.
7180 (enum target_point_type): Delete.
7181 (Z_packet_to_point_type): Rename to ...
7182 (Z_packet_to_target_hw_bp_type): ... this, and return a
7183 target_hw_bp_type instead.
7184 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7185 instead of an enum target_point_type.
7186 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7187 breakpoint type.
7188 (aarch64_dr_state_insert_one_point)
7189 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7190 (aarch64_handle_aligned_watchpoint)
7191 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7192 Take an enum target_hw_bp_type instead of an enum
7193 target_point_type.
7194 (aarch64_supports_z_point_type): New function.
7195 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7196 use Z_packet_to_target_hw_bp_type.
7197
7198 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7199
7200 * configure.ac: Only use -Werror by default when DEVELOPMENT
7201 is true.
7202 * configure: Regenerate.
7203
7204 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7205
7206 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7207 * linux-x86-low.c (X86_64_USER_REGS): New.
7208 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7209
7210 2014-04-28 Yao Qi <yao@codesourcery.com>
7211
7212 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7213 name.
7214
7215 2014-04-25 Pedro Alves <palves@redhat.com>
7216
7217 PR server/16255
7218 * linux-low.c (linux_attach_fail_reason_string): New function.
7219 (linux_attach_lwp): Delete.
7220 (linux_attach_lwp_1): Rename to ...
7221 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7222 argument. Remove "initial" parameter. Return int instead of
7223 void. Don't error or warn here.
7224 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7225 failure to attach to the tgid. Call warning when failing to
7226 attach to an lwp.
7227 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7228 argument. Remove "initial" parameter. Return int instead of
7229 void. Don't error or warn here.
7230 (linux_attach_fail_reason_string): New declaration.
7231 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7232 interface change. Use linux_attach_fail_reason_string.
7233
7234 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7235 Walfred Tedeschi <walfred.tedeschi@intel.com>
7236
7237 * Makefile.in: Added rules to handle new files
7238 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7239 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7240 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7241 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7242 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7243 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7244 x32-avx512-linux.o.
7245 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7246 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7247 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7248 i386/x32-avx512.xml.
7249 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7250 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7251 i386/x32-avx512-linux.xml.
7252 * i387-fp.c (num_avx512_k_registers): New constant for number
7253 of K registers.
7254 (num_avx512_zmmh_low_registers): New constant for number of
7255 lower ZMM registers (0-15).
7256 (num_avx512_zmmh_high_registers): New constant for number of
7257 higher ZMM registers (16-31).
7258 (num_avx512_ymmh_registers): New contant for number of higher
7259 YMM registers (ymm16-31 added by avx521 on x86_64).
7260 (num_avx512_xmm_registers): New constant for number of higher
7261 XMM registers (xmm16-31 added by AVX512 on x86_64).
7262 (struct i387_xsave): Add space for AVX512 registers.
7263 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7264 Add code to handle AVX512 registers.
7265 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7266 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7267 prototypei from generated file.
7268 (tdesc_amd64_avx512_linux): Likewise.
7269 (init_registers_x32_avx512_linux): Likewise.
7270 (tdesc_x32_avx512_linux): Likewise.
7271 (init_registers_i386_avx512_linux): Likewise.
7272 (tdesc_i386_avx512_linux): Likewise.
7273 (x86_64_regmap): Add AVX512 registers.
7274 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7275 mask.
7276 (initialize_low_arch): Add code to initialize AVX512 registers.
7277
7278 2014-04-23 Pedro Alves <palves@redhat.com>
7279
7280 * mem-break.c (find_gdb_breakpoint_at): Make static.
7281 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7282
7283 2014-04-23 Pedro Alves <palves@redhat.com>
7284
7285 * i386-low.c: Don't include break-common.h here.
7286 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7287 prototype to take target_hw_bp_type as argument instead of a Z
7288 packet char.
7289 * i386-low.h: Include break-common.h here.
7290 (Z_packet_to_hw_type): Declare.
7291 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7292 prototypes.
7293 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7294 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7295 (x86_remove_point): Convert the packet number to a
7296 target_hw_bp_type before calling i386_low_remove_watchpoint.
7297 * win32-i386-low.c (i386_insert_point): Convert the packet number
7298 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7299 (i386_remove_point): Convert the packet number to a
7300 target_hw_bp_type before calling i386_low_remove_watchpoint.
7301
7302 2014-04-23 Pedro Alves <palves@redhat.com>
7303
7304 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7305
7306 2014-04-10 Pedro Alves <palves@redhat.com>
7307
7308 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7309 Check if the condition or command is NULL before checking if the
7310 breakpoint is known. On success, return true.
7311 * mem-break.h (add_breakpoint_condition): Document return.
7312 (add_breakpoint_commands): Add describing comment.
7313 * server.c (skip_to_semicolon): New function.
7314 (process_point_options): Use it.
7315
7316 2014-04-09 Pedro Alves <palves@redhat.com>
7317
7318 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7319 to lwpid_of.
7320
7321 2014-02-27 Pedro Alves <palves@redhat.com>
7322
7323 PR 12702
7324 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7325 macros.
7326 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7327 output.
7328 (last_thread_of_process_p): Take a PID argument instead of a
7329 thread pointer.
7330 (linux_wait_for_lwp): Delete.
7331 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7332 functions.
7333 (linux_low_filter_event): New function, party factored out from
7334 linux_wait_for_event.
7335 (linux_wait_for_event): Rename to ...
7336 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7337 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7338 sigsuspend. Check for zombie leaders.
7339 (linux_wait_for_event): Reimplement as wrapper around
7340 linux_wait_for_event_filtered.
7341 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7342 a normal or signal exit is seen, it's the whole process exiting.
7343 (wait_for_sigstop): No longer a for_each_inferior callback.
7344 Rewrite on top of linux_wait_for_event_filtered.
7345 (stop_all_lwps): Call wait_for_sigstop directly.
7346 * server.c (resume, handle_target_event): Handle
7347 TARGET_WAITKIND_NO_RESUMED.
7348
7349 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7350
7351 * win32-low.c (psapi_get_dll_name,
7352 * win32_CreateToolhelp32Snapshot): Delete.
7353 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7354 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7355 Delete.
7356 (handle_load_dll): Add function description.
7357 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7358
7359 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7360
7361 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7362 Add comment.
7363 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7364 base address when calling win32_add_one_solib.
7365 (handle_load_dll): Delete local variable load_addr.
7366 Remove 0x1000 offset applied to DLL base address when calling
7367 win32_add_one_solib.
7368 (handle_unload_dll): Add comment.
7369
7370 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7371
7372 * win32-low.c (win32_add_all_dlls): Renames
7373 win32_ensure_ntdll_loaded. Rewrite function documentation.
7374 Adjust implementation to always load all DLLs.
7375 Add 0x1000 offset to DLL base address when calling
7376 win32_add_one_solib.
7377 (child_initialization_done): New static global.
7378 (do_initial_child_stuff): Set child_initialization_done to
7379 zero during child initialization, and 1 after. Replace call
7380 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7381 Add comment.
7382 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7383 (handle_unload_dll): Add function documentation.
7384 (get_child_debug_event): Ignore load and unload DLL events
7385 during child initialization.
7386
7387 2014-02-20 Doug Evans <dje@google.com>
7388
7389 Remove global all_lwps.
7390 * inferiors.h (ptid_of): Move here from linux-low.h.
7391 (pid_of, lwpid_of): Ditto.
7392 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7393 parameter is a struct thread_info * now.
7394 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7395 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7396 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7397 directly.
7398 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7399 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7400 * linux-arm-low.c (update_registers_callback): Update, "entry"
7401 parameter is a struct thread_info * now.
7402 Fetch lwpid from current_inferior directly.
7403 (arm_insert_point): Pass &all_threads to find_inferior instead of
7404 &all_lwps.
7405 (arm_remove_point): Ditto.
7406 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7407 (arm_prepare_to_resume): Fetch pid from thread.
7408 (arm_read_description): Fetch lwpid from current_inferior directly.
7409 * linux-low.c (all_lwps): Delete.
7410 (delete_lwp): Delete call to remove_inferior.
7411 (handle_extended_wait): Fetch lwpid from thread.
7412 (add_lwp): Don't set lwp->entry.id. Remove call to
7413 add_inferior_to_list.
7414 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7415 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7416 (kill_one_lwp_callback): Ditto.
7417 (linux_kill): Don't dereference NULL pointer.
7418 Fetch ptid,lwpid from thread.
7419 (get_detach_signal): Fetch ptid from thread.
7420 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7421 Simplify call to regcache_invalidate_thread.
7422 (delete_lwp_callback): Update, "entry" parameter is a
7423 struct thread_info * now. Fetch pid from thread.
7424 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7425 (status_pending_p_callback): Update, "entry" parameter is a
7426 struct thread_info * now. Fetch ptid from thread.
7427 (find_lwp_pid): Update, "entry" parameter is a
7428 struct thread_info * now.
7429 (linux_wait_for_lwp): Fetch pid from thread.
7430 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7431 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7432 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7433 (dequeue_one_deferred_signal): Ditto.
7434 (cancel_breakpoint): Fetch ptid from current_inferior.
7435 (linux_wait_for_event): Pass &all_threads to find_inferior,
7436 not &all_lwps. Fetch ptid, lwpid from thread.
7437 (count_events_callback): Update, "entry" parameter is a
7438 struct thread_info * now.
7439 (select_singlestep_lwp_callback): Ditto.
7440 (select_event_lwp_callback): Ditto.
7441 (cancel_breakpoints_callback): Ditto.
7442 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7443 not &all_lwps.
7444 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7445 (unsuspend_one_lwp): Update, "entry" parameter is a
7446 struct thread_info * now.
7447 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7448 not &all_lwps.
7449 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7450 Fetch lwpid from thread, not lwp.
7451 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7452 Pass &all_threads to find_inferior, not &all_lwps.
7453 (send_sigstop): Fetch lwpid from thread, not lwp.
7454 (send_sigstop_callback): Update, "entry" parameter is a
7455 struct thread_info * now.
7456 (suspend_and_send_sigstop_callback): Ditto.
7457 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7458 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7459 struct thread_info * now.
7460 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7461 from thread, lwp.
7462 (lwp_running): Update, "entry" parameter is a
7463 struct thread_info * now.
7464 (stop_all_lwps): Fetch ptid from thread.
7465 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7466 (linux_resume_one_lwp): Fetch lwpid from thread.
7467 (linux_set_resume_request): Update, "entry" parameter is a
7468 struct thread_info * now. Fetch pid, lwpid from thread.
7469 (resume_status_pending_p): Update, "entry" parameter is a
7470 struct thread_info * now.
7471 (need_step_over_p): Ditto. Fetch lwpid from thread.
7472 (start_step_over): Fetch lwpid from thread.
7473 (linux_resume_one_thread): Update, "entry" parameter is a
7474 struct thread_info * now. Fetch lwpid from thread.
7475 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7476 (proceed_one_lwp): Update, "entry" parameter is a
7477 struct thread_info * now. Fetch lwpid from thread.
7478 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7479 struct thread_info * now.
7480 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7481 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7482 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7483 directly.
7484 (regsets_store_inferior_registers): Ditto.
7485 (fetch_register, store_register): Ditto.
7486 (linux_read_memory, linux_write_memory): Ditto.
7487 (linux_request_interrupt): Ditto.
7488 (linux_read_auxv): Ditto.
7489 (linux_xfer_siginfo): Ditto.
7490 (linux_qxfer_spu): Ditto.
7491 (linux_qxfer_libraries_svr4): Ditto.
7492 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7493 moved to inferiors.h.
7494 (get_lwp): Delete.
7495 (get_thread_lwp): Update.
7496 (struct lwp_info): Delete member "entry". Simplify comment for
7497 member "thread".
7498 (all_lwps): Delete.
7499 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7500 current_inferior directly.
7501 (update_watch_registers_callback): Update, "entry" parameter is a
7502 struct thread_info * now. Fetch pid from thread.
7503 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7504 (mips_insert_point): Fetch lwpid from current_inferior.
7505 Pass &all_threads to find_inferior, not &all_lwps.
7506 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7507 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7508 directly.
7509 (mips_stopped_data_address): Ditto.
7510 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7511 directly.
7512 * linux-tile-low.c (tile_arch_setup): Ditto.
7513 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7514 (update_debug_registers_callback): Update, "entry" parameter is a
7515 struct thread_info * now. Fetch pid from thread.
7516 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7517 Pass &all_threads to find_inferior, not &all_lwps.
7518 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7519 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7520 Pass &all_threads to find_inferior, not &all_lwps.
7521 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7522 (i386_dr_low_get_status): Ditto.
7523 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7524 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7525 (x86_linux_read_description): Ditto.
7526 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7527
7528 2014-02-20 Doug Evans <dje@google.com>
7529
7530 * inferiors.c (get_first_inferior): Fix buglet.
7531
7532 2014-02-19 Doug Evans <dje@google.com>
7533
7534 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7535 * inferiors.c (add_thread): Change result type to struct thread_info *.
7536 All callers updated.
7537 (add_lwp): Call add_thread here instead of in callers.
7538 All callers updated.
7539 * linux-low.h (get_lwp_thread): Rewrite.
7540 (struct lwp_info): New member "thread".
7541
7542 2014-02-19 Doug Evans <dje@google.com>
7543
7544 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7545 All callers updated.
7546
7547 2014-02-19 Doug Evans <dje@google.com>
7548
7549 * inferiors.c (add_thread): Fix whitespace.
7550
7551 2014-02-19 Doug Evans <dje@google.com>
7552
7553 * dll.c (clear_dlls): Replace accessing list implemention details
7554 with API function.
7555 * gdbthread.h (get_first_thread): Declare.
7556 * inferiors.c (for_each_inferior_with_data): New function.
7557 (get_first_thread): New function.
7558 (find_thread_ptid): Simplify.
7559 (get_first_inferior): New function.
7560 (clear_list): Delete.
7561 (one_inferior_p): New function.
7562 (clear_inferior_list): New function.
7563 (clear_inferiors): Update.
7564 * inferiors.h (for_each_inferior_with_data): Declare.
7565 (clear_inferior_list): Declare.
7566 (one_inferior_p): Declare.
7567 (get_first_inferior): Declare.
7568 * linux-low.c (linux_wait_for_event): Replace accessing list
7569 implemention details with API function.
7570 * server.c (target_running): Ditto.
7571 (accumulate_file_name_length): New function.
7572 (emit_dll_description): New function.
7573 (handle_qxfer_libraries): Replace accessing list implemention
7574 details with API function.
7575 (handle_qxfer_threads_worker): New function.
7576 (handle_qxfer_threads_proper): Replace accessing list implemention
7577 details with API function.
7578 (handle_query): Ditto.
7579 (visit_actioned_threads_callback_ftype): New typedef.
7580 (visit_actioned_threads_data): New struct.
7581 (visit_actioned_threads): Rewrite to be find_inferior callback.
7582 (resume): Call find_inferior.
7583 (handle_status): Replace accessing list implemention
7584 details with API function.
7585 (process_serial_event): Replace accessing list implemention details
7586 with API function.
7587 * target.c (set_desired_inferior): Replace accessing list implemention
7588 details with API function.
7589 * tracepoint.c (same_process_p): New function.
7590 (gdb_agent_about_to_close): Replace accessing list implemention
7591 details with API function.
7592 * win32-low.c (child_delete_thread): Replace accessing list
7593 implemention details with API function.
7594 (match_dll_by_basename): New function.
7595 (dll_is_loaded_by_basename): New function.
7596 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7597 details call to dll_is_loaded_by_basename.
7598
7599 2014-02-19 Doug Evans <dje@google.com>
7600
7601 * dll.h (struct dll_info): Add comment.
7602 * gdbthread.h (struct thread_info): Add comment.
7603 (current_ptid): Simplify.
7604 * inferiors.c (add_process): Update.
7605 (remove_process): Update.
7606 * inferiors.h (struct process_info): Rename member "head" to "entry".
7607 * linux-low.c (delete_lwp): Update.
7608 (add_lwp): Update.
7609 (last_thread_of_process_p): Update.
7610 (kill_one_lwp_callback, linux_kill): Update.
7611 (status_pending_p_callback): Update.
7612 (wait_for_sigstop): Update. Simplify read of ptid.
7613 (start_step_over): Update.
7614 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7615 (get_lwp_thread): Update.
7616 (struct lwp_info): Rename member "head" to "entry".
7617 * regcache.h (inferior_list_entry): Delete.
7618 * server.c (kill_inferior_callback): Update.
7619 (detach_or_kill_inferior_callback): Update.
7620 (print_started_pid): Update.
7621 (print_attached_pid): Update.
7622 (process_serial_event): Simplify read of ptid.
7623 * thread-db.c (thread_db_create_event): Update.
7624 (thread_db_get_tls_address): Update.
7625 * win32-low.c (current_inferior_ptid): Simplify.
7626
7627 2014-02-19 Tom Tromey <tromey@redhat.com>
7628
7629 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7630 argument.
7631 (target_supports_btrace): Update.
7632
7633 2014-02-14 Yao Qi <yao@codesourcery.com>
7634
7635 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7636 (rsp-low-ipa.o): New target.
7637
7638 2014-02-12 Tom Tromey <tromey@redhat.com>
7639
7640 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7641 convert_ascii_to_int.
7642 * regcache.c (registers_to_string): Likewise.
7643 * remote-utils.c (decode_M_packet): Likewise.
7644 * server.c (process_serial_event): Likewise.
7645
7646 2014-02-12 Tom Tromey <tromey@redhat.com>
7647
7648 * server.c (handle_query, handle_v_run): Use hex2bin, not
7649 unhexify.
7650 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7651
7652 2014-02-12 Tom Tromey <tromey@redhat.com>
7653
7654 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7655 convert_int_to_ascii.
7656 * regcache.c (registers_to_string, collect_register_as_string):
7657 Likewise.
7658 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7659 Likewise.
7660 * server.c (process_serial_event): Likewise.
7661 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7662 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7663
7664 2014-02-12 Tom Tromey <tromey@redhat.com>
7665
7666 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7667 bin2hex, not hexify.
7668 * tracepoint.c (cmd_qtstatus): Likewise.
7669
7670 2014-02-12 Tom Tromey <tromey@redhat.com>
7671
7672 * remote-utils.c (monitor_output): Pass explicit length to
7673 hexify.
7674
7675 2014-02-12 Tom Tromey <tromey@redhat.com>
7676
7677 * tracepoint.c: Include rsp-low.h.
7678 * server.c: Include rsp-low.h.
7679 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7680 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7681 declare.
7682 * remote-utils.c: Include rsp-low.h.
7683 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7684 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7685 (convert_int_to_ascii, convert_ascii_to_int): Move to
7686 common/rsp-low.c.
7687 * regcache.c: Include rsp-low.h.
7688 * ax.c: Include rsp-low.h.
7689 * Makefile.in (SFILES): Add common/rsp-low.c.
7690 (OBS): Add rsp-low.o.
7691 (rsp-low.o): New target.
7692
7693 2014-02-12 Tom Tromey <tromey@redhat.com>
7694
7695 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7696 Include print-utils.h.
7697 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7698 (plongest, thirty_two, phex_nz): Remove.
7699 * Makefile.in (SFILES): Add common/print-utils.c.
7700 (OBS): Add print-utils.o.
7701 (print-utils-ipa.o): New target.
7702 (print-utils.o): New target.
7703 (IPA_OBJS): Add print-utils-ipa.o.
7704
7705 2014-02-06 Tom Tromey <tromey@redhat.com>
7706
7707 * Makefile.in (SFILES): Fix indentation.
7708
7709 2014-02-05 Doug Evans <dje@google.com>
7710
7711 * linux-low.c (linux_wait_for_event): Improve comment.
7712 (linux_wait_1): Keep current_inferior in sync with event_child.
7713
7714 2014-01-22 Doug Evans <dje@google.com>
7715
7716 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7717
7718 2014-01-22 Doug Evans <dje@google.com>
7719
7720 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7721 * configure: Regenerate.
7722 * config.in: Regenerate.
7723 * Makefile.in (SFILES): Add debug.c.
7724 (OBS): Add debug.o.
7725 * debug.c: New file.
7726 * debug.h: New file.
7727 * linux-aarch64-low.c (*): Update all debugging printfs to use
7728 debug_printf instead of fprintf.
7729 * linux-arm-low.c (*): Ditto.
7730 * linux-cris-low.c (*): Ditto.
7731 * linux-crisv32-low.c (*): Ditto.
7732 * linux-m32r-low.c (*): Ditto.
7733 * linux-sparc-low.c (*): Ditto.
7734 * linux-x86.c (*): Ditto.
7735 * linux-low.c (*): Ditto.
7736 (linux_wait_1): Add calls to debug_enter, debug_exit.
7737 (linux_wait): Remove redundant debugging printf.
7738 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7739 (linux_resume, unstop_all_lwps): Ditto.
7740 * mem-break.c (*): Update all debugging printfs to use
7741 debug_printf instead of fprintf.
7742 * remote-utils.c (*): Ditto.
7743 * thread-db.c (*): Ditto.
7744 * server.c #include <ctype.h>, "gdb_vecs.h".
7745 (debug_threads): Moved to debug.c.
7746 (*): Update all debugging printfs to use debug_printf instead of
7747 fprintf.
7748 (start_inferior): Replace call to fflush with call to debug_flush.
7749 (monitor_show_help): Mention set debug-format.
7750 (parse_debug_format_options): New function.
7751 (handle_monitor_command): Handle "monitor set debug-format".
7752 (gdbserver_usage): Mention --debug-format.
7753 (main): Parse --debug-format.
7754 * server.h (debug_threads): Declaration moved to debug.h.
7755 #include "debug.h".
7756 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7757 trace_debug_1 that uses debug_printf.
7758 (tracepoint_look_up_symbols): Update all debugging printfs to use
7759 debug_printf instead of fprintf.
7760
7761 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7762
7763 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7764 sys/ptrace.h.
7765
7766 2014-01-17 Pedro Alves <palves@redhat.com>
7767
7768 PR build/16445
7769 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7770 defined after including gdb_proc_service.h.
7771
7772 2014-01-16 Doug Evans <dje@google.com>
7773
7774 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7775 (match_dll): Use it.
7776
7777 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7778
7779 * target.h (target_ops) <read_btrace>: Change parameters and
7780 return type to allow error reporting.
7781 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7782 trace reading errors on.
7783 * linux-low.c (linux_low_read_btrace): Pass trace reading
7784 errors on.
7785 (linux_low_disable_btrace): New.
7786
7787 2014-01-15 Doug Evans <dje@google.com>
7788
7789 * inferiors.c (thread_id_to_gdb_id): Delete.
7790 * inferiors.h (thread_id_to_gdb_id): Delete.
7791
7792 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7793
7794 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7795 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7796 versions.
7797
7798 2014-01-08 Pedro Alves <palves@redhat.com>
7799
7800 * server.c (handle_status): Don't discard previous queued stop
7801 replies or thread's pending status here.
7802 (main) <disconnection>: Do it here instead.
7803
7804 2014-01-08 Pedro Alves <palves@redhat.com>
7805
7806 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7807 * server.c (visit_actioned_threads, handle_pending_status): New
7808 function.
7809 (handle_v_cont): Factor out parts to ...
7810 (resume): ... this new function. If in all-stop, and a thread
7811 being resumed has a pending status, report it without actually
7812 resuming.
7813 (myresume): Adjust to use the new 'resume' function.
7814 (clear_pending_status_callback, set_pending_status_callback)
7815 (find_status_pending_thread_callback): New functions.
7816 (handle_status): Handle the case of multiple threads having
7817 interesting statuses to report. Report threads' real last signal
7818 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7819 with an interesting thread to report the status for, instead of
7820 always reporting the status of the first thread.
7821
7822 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7823
7824 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7825 * gdbreplay.c (gdbreplay_version): Likewise.
7826
7827 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7828
7829 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7830 iov.iov_len with the real length in use.
7831
7832 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7833
7834 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7835 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7836 for all targets that use win32-low.c.
7837 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7838 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7839
7840 2013-12-13 Pedro Alves <palves@redhat.com>
7841
7842 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7843 if equal to TARGET_WAITKIND_LOADED.
7844 * win32-low.c (cached_status): New static global.
7845 (win32_wait): Add declaration.
7846 (do_initial_child_stuff): Flush all initial pending debug events
7847 up to the initial breakpoint.
7848 (win32_wait): If CACHED_STATUS was set, return that instead
7849 of doing a real wait. Remove the code resuming the execution
7850 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7851 during the initial phase. Also remove the code changing
7852 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7853 TARGET_WAITKIND_STOPPED.
7854
7855 2013-12-11 Yao Qi <yao@codesourcery.com>
7856
7857 * notif.c (handle_notif_ack): Return 0 if no notification
7858 matches.
7859
7860 2013-11-20 Doug Evans <dje@google.com>
7861
7862 * linux-low.c (linux_set_resume_request): Fix comment.
7863
7864 2013-11-20 Doug Evans <dje@google.com>
7865
7866 * linux-low.c (resume_status_pending_p): Tweak comment.
7867
7868 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7869
7870 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7871 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7872 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7873 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7874 (srv_amd64_regobj): Add amd64-mpx.o.
7875 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7876 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7877 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7878 * i387-fp.c (num_pl_bnd_register) Added constant.
7879 (num_pl_bnd_cfg_registers) Added constant.
7880 (struct i387_xsave) Added reserved area and MPX fields.
7881 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7882 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7883 function.
7884 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7885 (init_registers_amd64_mpx_linux): Declare new function.
7886 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7887 (x86_64_regmap): Add MPX registers.
7888 (x86_linux_read_description): Add MPX case.
7889 (initialize_low_arch): Initialize MPX targets.
7890
7891 2013-11-18 Tom Tromey <tromey@redhat.com>
7892
7893 * configure: Rebuild.
7894 * configure.ac: Don't check for stdlib.h.
7895 * gdbreplay.c: Unconditionally include stdlib.h.
7896
7897 2013-11-18 Tom Tromey <tromey@redhat.com>
7898
7899 * config.in: Rebuild.
7900 * configure: Rebuild.
7901 * configure.ac: Don't use AC_HEADER_DIRENT.
7902
7903 2013-11-18 Tom Tromey <tromey@redhat.com>
7904
7905 * server.h: Don't check HAVE_STRING_H.
7906 * gdbreplay.c: Don't check HAVE_STRING_H.
7907 * configure: Rebuild.
7908
7909 2013-11-18 Tom Tromey <tromey@redhat.com>
7910
7911 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7912 LIBGNU.
7913
7914 2013-11-08 Tom Tromey <tromey@redhat.com>
7915
7916 * configure, config.in: Rebuild.
7917 * configure.ac: Remove unused configury.
7918
7919 2013-11-08 Tom Tromey <tromey@redhat.com>
7920
7921 * acinclude.m4: Include common.m4, codeset.m4.
7922 * configure, config.in: Rebuild.
7923 * configure.ac: Use GDB_AC_COMMON.
7924
7925 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7926
7927 * linux-s390-low.c (HWCAP_S390_TE): New define.
7928 (s390_arch_setup): Consider the TE field in the HWCAP for
7929 determining 'have_regset_tdb'.
7930
7931 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7932
7933 PR gdb/16014
7934 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7935 call to sizeof.
7936
7937 2013-10-02 Pedro Alves <palves@redhat.com>
7938
7939 * server.c (process_serial_event): Don't output "GDBserver
7940 exiting" if GDB is connected through stdio.
7941 * target.c (mywait): Likewise, be silent if GDB is connected
7942 through stdio.
7943
7944 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7945
7946 * lynx-low.c (lynx_add_threads_after_attach): New function.
7947 (lynx_attach): Remove call to add_thread. Add call to
7948 lynx_add_threads_after_attach instead.
7949
7950 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7951
7952 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7953 * config.in, configure: Regenerated.
7954
7955 2013-09-18 Yao Qi <yao@codesourcery.com>
7956
7957 PR server/15959
7958 * server.c (start_inferior): Clear 'resume_info'.
7959
7960 2013-09-16 Jiong Wang <jiwang@tilera.com>
7961
7962 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7963 for each register.
7964
7965 2013-09-16 Jiong Wang <jiwang@tilera.com>
7966
7967 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7968 linux-tile-low.o to srv_tgtobj.
7969
7970 2013-09-16 Will Newton <will.newton@linaro.org>
7971
7972 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7973 out regs.
7974
7975 2013-09-06 Pedro Alves <palves@redhat.com>
7976
7977 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7978 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7979 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7980 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7981 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7982 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7983
7984 2013-09-06 Pedro Alves <palves@redhat.com>
7985
7986 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7987 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7988
7989 2013-09-06 Pedro Alves <palves@redhat.com>
7990
7991 * linux-amd64-ipa.c: Include tracepoint.h.
7992 * linux-i386-ipa.c: Include tracepoint.h.
7993
7994 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7995
7996 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7997 (ps_get_thread_area): New function.
7998
7999 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8000
8001 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8002 (initialize_low_arch): Call init_registers_crisv32 rather than
8003 init_register_crisv32.
8004
8005 2013-09-05 Pedro Alves <palves@redhat.com>
8006
8007 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8008 to ...
8009 * hostio.h: ... this new file.
8010 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8011 win32-low.c: Include hostio.h.
8012
8013 2013-09-05 Pedro Alves <palves@redhat.com>
8014
8015 * server.h (gdb_client_data, handler_func, callback_handler_func)
8016 (delete_file_handler, add_file_handler, append_callback_event)
8017 (delete_callback_event, start_event_loop, initialize_event_loop):
8018 Move to event-loop.h and include it.
8019 * event-loop.h: New file.
8020
8021 2013-09-05 Pedro Alves <palves@redhat.com>
8022
8023 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8024 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8025 (loaded_dll, unloaded_dll): Move to ...
8026 * dll.h: ... this new file.
8027 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8028
8029 2013-09-05 Pedro Alves <palves@redhat.com>
8030
8031 * server.h (current_process, get_thread_process, all_processes)
8032 (add_inferior_to_list, for_each_inferior, current_inferior)
8033 (remove_inferior, add_process, remove_process, find_process_pid)
8034 (have_started_inferiors_p, have_attached_inferiors_p)
8035 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8036 (clear_inferiors, find_inferior, find_inferior_id)
8037 (inferior_target_data, set_inferior_target_data)
8038 (inferior_regcache_data, set_inferior_regcache_data): Move to
8039 inferiors.h, and include it.
8040 * inferiors.h: New file.
8041
8042 2013-09-05 Pedro Alves <palves@redhat.com>
8043
8044 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8045 Move ...
8046 * ax.h: ... here.
8047
8048 2013-09-05 Pedro Alves <palves@redhat.com>
8049
8050 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8051 tracepoint.h.
8052 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8053 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8054 (handle_tracepoint_general_set, handle_tracepoint_query)
8055 (tracepoint_finished_step, tracepoint_was_hit)
8056 (release_while_stepping_state_list, current_traceframe)
8057 (in_readonly_region, traceframe_read_mem)
8058 (fetch_traceframe_registers, traceframe_read_sdata)
8059 (traceframe_read_info, struct fast_tpoint_collect_status)
8060 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8061 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8062 (supply_fast_tracepoint_registers)
8063 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8064 (ipa_tdesc, claim_trampoline_space)
8065 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8066 (agent_mem_read, agent_get_trace_state_variable_value)
8067 (agent_set_trace_state_variable_value, agent_tsv_read)
8068 (agent_mem_read_string, get_raw_reg_func_addr)
8069 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8070 * tracepoint.h: ... this new file.
8071
8072 2013-09-05 Pedro Alves <palves@redhat.com>
8073
8074 * server.h (perror_with_name, error, fatal, warning, paddress)
8075 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8076 include it.
8077 * utils.h: New file.
8078
8079 2013-09-05 Pedro Alves <palves@redhat.com>
8080
8081 * server.h (remote_debug, noack_mode, transport_is_reliable)
8082 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8083 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8084 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8085 (write_enn, initialize_async_io, enable_async_io)
8086 (disable_async_io, check_remote_input_interrupt_request)
8087 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8088 (dead_thread_notify, prepare_resume_reply)
8089 (decode_address_to_semicolon, decode_address, decode_m_packet)
8090 (decode_M_packet, decode_X_packet, decode_xfer_write)
8091 (decode_search_memory_packet, unhexify, hexify)
8092 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8093 (look_up_one_symbol, relocate_instruction)
8094 (monitor_output): Move to remote-utils.h, and include it.
8095 * remote-utils.h: New file.
8096
8097 2013-09-05 Pedro Alves <palves@redhat.com>
8098
8099 * server.h (_): Delete.
8100
8101 2013-09-02 Pedro Alves <palves@redhat.com>
8102
8103 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8104 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8105 allocated.
8106 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8107
8108 2013-09-02 Pierre Muller <muller@sourceware.org>
8109
8110 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8111 or WriteProcessMemory complete successfully and handle
8112 ERROR_PARTIAL_COPY error.
8113
8114 2013-09-02 Pedro Alves <palves@redhat.com>
8115
8116 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8117 error instead of EIO.
8118
8119 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8120
8121 PR server/15604
8122 * linux-low.c: Include filestuff.h.
8123 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8124 * lynx-low.c: Include filestuff.h.
8125 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8126 * server.c: Include filestuff.h.
8127 (main): Call notice_open_fds.
8128 * spu-low.c: Include filestuff.h.
8129 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8130
8131 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8132
8133 * Makefile.in: Explain why ../target and ../nat are not
8134 listed as include file search paths.
8135 (linux-waitpid.o): New object file rule.
8136 * configure.srv (srv_native_linux_obj): New variable.
8137 Replace all occurrences of linux native object files with
8138 $srv_native_linux_obj.
8139 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8140 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8141 (linux_enable_event_reporting): Remove declaration.
8142 (my_waitpid): Moved to common/linux-waitpid.c.
8143 (linux_wait_for_event): Pass ptid when calling
8144 linux_enable_event_reporting.
8145 (linux_supports_tracefork_flag): Remove.
8146 (linux_enable_event_reporting): Likewise.
8147 (linux_tracefork_grandchild): Remove.
8148 (STACK_SIZE): Moved to common/linux-ptrace.c.
8149 (linux_tracefork_child): Remove.
8150 (linux_test_for_tracefork): Remove.
8151 (linux_look_up_symbols): Call linux_supports_traceclone.
8152 (initialize_low): Remove call to linux_test_for_tracefork.
8153 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8154 common/linux-ptrace.h.
8155 (PTRACE_TYPE_ARG4): Likewise.
8156 Include linux-ptrace.h.
8157
8158 2013-08-21 Pedro Alves <palves@redhat.com>
8159
8160 * config.in: Renegerate.
8161
8162 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8163
8164 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8165 (SFILES): Remove $(srcdir)/common/target-common.c and
8166 add $(srcdir)/target/waitstatus.c.
8167 (OBS): Remove target-common.o and add waitstatus.o.
8168 (server_h): Remove $(srcdir)/../common/target-common.h and
8169 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8170 and $(srcdir)/../target/waitstatus.h.
8171 (target-common.o): Remove.
8172 (waitstatus.o): New target object file.
8173 * target.h: Do not include target-common.h and
8174 include target/resume.h, target/wait.h and
8175 target/waitstatus.h.
8176
8177 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8178
8179 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8180 to PTRACE_TYPE_ARG3.
8181 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8182 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8183 PTRACE_TYPE_ARG4.
8184 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8185 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8186
8187 2013-07-27 Jie Zhang <jie@codesourcery.com>
8188 Daniel Jacobowitz <dan@codesourcery.com>
8189 Yao Qi <yao@codesourcery.com>
8190
8191 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8192 (mips-linux-watch.o): New rule.
8193 (mips_linux_watch_h): New variable.
8194 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8195 srv_tgtobj.
8196 * linux-mips-low.c: Include mips-linux-watch.h.
8197 (struct arch_process_info, struct arch_lwp_info): New.
8198 (update_watch_registers_callback): New function.
8199 (mips_linux_new_process, mips_linux_new_thread) New functions.
8200 (mips_linux_prepare_to_resume, mips_insert_point): New
8201 functions.
8202 (mips_remove_point, mips_stopped_by_watchpoint): New
8203 functions.
8204 (rsp_bp_type_to_target_hw_bp_type): New function.
8205 (mips_stopped_data_address): New function.
8206 (the_low_target): Add watchpoint support functions.
8207
8208 2013-07-27 Yao Qi <yao@codesourcery.com>
8209
8210 * i386-low.c: Include break-common.h.
8211 (enum target_hw_bp_type): Remove.
8212
8213 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8214
8215 * Makefile.in (SFILES): /common/target-common.c.
8216 (OBS): Add target-common.o.
8217 (server_h): Add $(srcdir)/../common/target-common.h.
8218 (target-common.o): New target.
8219 * server.c (queue_stop_reply_callback): Free
8220 status string after use.
8221 * target.c (target_waitstatus_to_string): Remove.
8222 * target.h: Include target-common.h.
8223 (resume_kind): Likewise.
8224 (target_waitkind): Likewise.
8225 (target_waitstatus): Likewise.
8226 (TARGET_WNOHANG): Likewise.
8227
8228 2013-07-04 Yao Qi <yao@codesourcery.com>
8229
8230 * Makefile.in (host_alias): Use @host_noncanonical@.
8231 (target_alias): Use @target_noncanonical@.
8232 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8233 ACX_NONCANONICAL_HOST.
8234 * configure: Regenerated.
8235
8236 Revert:
8237 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8238
8239 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8240 * configure: Rebuild.
8241 * Makefile.in (version_host, version_target): Get from configure.
8242 (version.c): Use $(version_host) and $(version_target).
8243
8244 2013-07-03 Pedro Alves <palves@redhat.com>
8245
8246 * Makefile.in (config.status): Depend on development.sh.
8247 * acinclude.m4: Include libmcheck.m4.
8248 * configure: Regenerate.
8249
8250 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8251
8252 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8253 attribute inside the parentheses.
8254 (winapi_DebugSetProcessKillOnExit): Ditto.
8255 (winapi_DebugBreakProcess): Ditto.
8256 (winapi_GenerateConsoleCtrlEvent): Ditto.
8257
8258 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8259
8260 * notif.h (notif_event): Add a dummy member to avoid compiler
8261 errors.
8262
8263 2013-07-01 Pedro Alves <palves@redhat.com>
8264
8265 * hostio.c (HOSTIO_PATH_MAX): Define.
8266 (require_filename, handle_open, handle_unlink, handle_readlink):
8267 Use it.
8268
8269 2013-07-01 Pedro Alves <palves@redhat.com>
8270
8271 * server.h: Include "pathmax.h".
8272 * linux-low.c: Don't include sys/param.h.
8273 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8274 MAXPATHLEN.
8275 * win32-low.c: Don't include sys/param.h.
8276 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8277
8278 2013-07-01 Pedro Alves <palves@redhat.com>
8279
8280 * event-loop.c: Don't check HAVE_UNISTD_H before including
8281 <unistd.h>.
8282 * gdbreplay.c: Likewise.
8283 * remote-utils.c: Likewise.
8284 * server.c: Likewise.
8285 * configure.ac: Don't check for unistd.h.
8286 * configure: Regenerate.
8287
8288 2013-06-28 Tom Tromey <tromey@redhat.com>
8289
8290 * Makefile.in (version.c): Use version.in, not
8291 common/version.in.
8292
8293 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8294
8295 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8296 * configure: Rebuild.
8297 * Makefile.in (version_host, version_target): Get from configure.
8298 (version.c): Use $(version_host) and $(version_target).
8299
8300 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8301
8302 Fix trace-status to output user name without trailing colon.
8303 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8304
8305 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8306
8307 Fix trace-status to output proper start-time and stop-time.
8308 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8309 output start time and stop time in hex as gdb expects.
8310
8311 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8312
8313 * tracepoint.c (build_traceframe_info_xml): Output trace state
8314 variables present in the trace buffer.
8315
8316 2013-06-24 Tom Tromey <tromey@redhat.com>
8317
8318 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8319 create-version.sh.
8320 (version.o): Remove.
8321 * gdbreplay.c: Include version.h.
8322 (version, host_name): Don't declare.
8323 * server.h: Include version.h.
8324 (version, host_name): Don't declare.
8325
8326 2013-06-12 Pedro Alves <palves@redhat.com>
8327
8328 * linux-x86-low.c (linux_is_elf64): Delete global.
8329 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8330 with local linux_pid_exe_is_elf_64_file use.
8331
8332 2013-06-11 Pedro Alves <palves@redhat.com>
8333
8334 * linux-low.c (regset_disabled, disable_regset): New functions.
8335 (regsets_fetch_inferior_registers)
8336 (regsets_store_inferior_registers): Use them.
8337 (initialize_regsets_info); Don't allocate the disabled_regsets
8338 array here.
8339 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8340 comment.
8341
8342 2013-06-11 Pedro Alves <palves@redhat.com>
8343
8344 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8345 xmalloc.
8346
8347 2013-06-11 Pedro Alves <palves@redhat.com>
8348
8349 * linux-x86-low.c (initialize_low_arch): Call
8350 init_registers_x32_avx_linux.
8351
8352 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8353
8354 Fix compatibility with Android Bionic.
8355 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8356 it is not empty.
8357
8358 2013-06-07 Pedro Alves <palves@redhat.com>
8359
8360 PR server/14823
8361 * Makefile.in (OBS): Add tdesc.o.
8362 (IPA_OBJS): Add tdesc-ipa.o.
8363 (tdesc-ipa.o): New rule.
8364 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8365 interface.
8366 * linux-low.c (new_inferior): Delete.
8367 (disabled_regsets, num_regsets): Delete.
8368 (linux_add_process): Adjust to set the new per-process
8369 new_inferior flag.
8370 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8371 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8372 was a stop. When calling arch_setup, switch the current inferior
8373 to the thread that got an event.
8374 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8375 (regsets_fetch_inferior_registers)
8376 (regsets_store_inferior_registers): New regsets_info parameter.
8377 Adjust to use it.
8378 (linux_register_in_regsets): New regs_info parameter. Adjust to
8379 use it.
8380 (register_addr, fetch_register, store_register): New usrregs_info
8381 parameter. Adjust to use it.
8382 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8383 parameter regs_info. Adjust to use it.
8384 (linux_fetch_registers): Get the current inferior's regs_info, and
8385 adjust to use it.
8386 (linux_store_registers): Ditto.
8387 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8388 (initialize_low): Don't initialize the target_regsets here. Call
8389 initialize_low_arch.
8390 * linux-low.h (target_regsets): Delete declaration.
8391 (struct regsets_info): New.
8392 (struct usrregs_info): New.
8393 (struct regs_info): New.
8394 (struct process_info_private) <new_inferior>: New field.
8395 (struct linux_target_ops): Delete the num_regs, regmap, and
8396 regset_bitmap fields. New field regs_info.
8397 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8398 * i387-fp.c (num_xmm_registers): Delete.
8399 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8400 calls to new interface.
8401 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8402 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8403 Infer the number of xmm registers from the regcache's target
8404 description.
8405 * i387-fp.h (num_xmm_registers): Delete.
8406 * inferiors.c (add_thread): Don't install the thread's regcache
8407 here.
8408 * proc-service.c (gregset_info): Fetch the current inferior's
8409 regs_info. Adjust to use it.
8410 * regcache.c: Include tdesc.h.
8411 (register_bytes, reg_defs, num_registers)
8412 (gdbserver_expedite_regs): Delete.
8413 (get_thread_regcache): If the thread doesn't have a regcache yet,
8414 create one, instead of aborting gdbserver.
8415 (regcache_invalidate_one): Rename to ...
8416 (regcache_invalidate_thread): ... this.
8417 (regcache_invalidate_one): New.
8418 (regcache_invalidate): Only invalidate registers of the current
8419 process.
8420 (init_register_cache): Add target_desc parameter, and use it.
8421 (new_register_cache): Ditto. Assert the target description has a
8422 non zero registers_size.
8423 (regcache_cpy): Add assertions. Adjust.
8424 (realloc_register_cache, set_register_cache): Delete.
8425 (registers_to_string, registers_from_string): Adjust.
8426 (find_register_by_name, find_regno, find_register_by_number)
8427 (register_cache_size): Add target_desc parameter, and use it.
8428 (free_register_cache_thread, free_register_cache_thread_one)
8429 (regcache_release, register_cache_size): New.
8430 (register_size): Add target_desc parameter, and use it.
8431 (register_data, supply_register, supply_register_zeroed)
8432 (supply_regblock, supply_register_by_name, collect_register)
8433 (collect_register_as_string, collect_register_by_name): Adjust.
8434 * regcache.h (struct target_desc): Forward declare.
8435 (struct regcache) <tdesc>: New field.
8436 (init_register_cache, new_register_cache): Add target_desc
8437 parameter.
8438 (regcache_invalidate_thread): Declare.
8439 (regcache_invalidate_one): Delete declaration.
8440 (regcache_release): Declare.
8441 (find_register_by_number, register_cache_size, register_size)
8442 (find_regno): Add target_desc parameter.
8443 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8444 declarations.
8445 * remote-utils.c: Include tdesc.h.
8446 (outreg, prepare_resume_reply): Adjust.
8447 * server.c: Include tdesc.h.
8448 (gdbserver_xmltarget): Delete declaration.
8449 (get_features_xml, process_serial_event): Adjust.
8450 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8451 declare.
8452 (struct process_info) <tdesc>: New field.
8453 (ipa_tdesc): Declare.
8454 * tdesc.c: New file.
8455 * tdesc.h: New file.
8456 * tracepoint.c: Include tdesc.h.
8457 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8458 (get_context_regcache): Adjust to pass ipa_tdesc down.
8459 (do_action_at_tracepoint): Adjust to get the register cache size
8460 from the context regcache's description.
8461 (traceframe_walk_blocks): Adjust to get the register cache size
8462 from the current trace frame's description.
8463 (traceframe_get_pc): Adjust to get current trace frame's
8464 description and pass it down.
8465 (gdb_collect): Adjust to get the register cache size from the
8466 IPA's description.
8467 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8468 (gdbserver_xmltarget): Delete.
8469 (initialize_low_tracepoint): Set the ipa's target description.
8470 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8471 (initialize_low_tracepoint): Set the ipa's target description.
8472 * linux-x86-low.c: Include tdesc.h.
8473 [__x86_64__] (is_64bit_tdesc): New.
8474 (ps_get_thread_area, x86_get_thread_area): Use it.
8475 (i386_cannot_store_register): Rename to ...
8476 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8477 (i386_cannot_fetch_register): Rename to ...
8478 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8479 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8480 to new interface.
8481 (target_regsets): Rename to ...
8482 (x86_regsets): ... this.
8483 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8484 interface.
8485 (x86_siginfo_fixup): Use is_64bit_tdesc.
8486 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8487 (tdesc_x32_avx_linux, tdesc_x32_linux)
8488 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8489 Declare.
8490 (x86_linux_update_xmltarget): Delete.
8491 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8492 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8493 (AMD64_LINUX_USER64_CS): New.
8494 (x86_linux_read_description): New, based on
8495 x86_linux_update_xmltarget.
8496 (same_process_callback): New.
8497 (x86_arch_setup_process_callback): New.
8498 (x86_linux_update_xmltarget): New.
8499 (x86_regsets_info): New.
8500 (amd64_linux_regs_info): New.
8501 (i386_linux_usrregs_info): New.
8502 (i386_linux_regs_info): New.
8503 (x86_linux_regs_info): New.
8504 (x86_arch_setup): Reimplement.
8505 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8506 (x86_emit_ops): Ditto.
8507 (the_low_target): Adjust. Install x86_linux_regs_info,
8508 x86_cannot_fetch_register, and x86_cannot_store_register.
8509 (initialize_low_arch): New.
8510 * linux-ia64-low.c (tdesc_ia64): Declare.
8511 (ia64_fetch_register): Adjust.
8512 (ia64_usrregs_info, regs_info): New globals.
8513 (ia64_regs_info): New function.
8514 (the_low_target): Adjust.
8515 (initialize_low_arch): New function.
8516 * linux-sparc-low.c (tdesc_sparc64): Declare.
8517 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8518 Adjust.
8519 (sparc_arch_setup): New function.
8520 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8521 (the_low_target): Adjust.
8522 (initialize_low_arch): New function.
8523 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8524 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8525 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8526 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8527 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8528 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8529 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8530 (tdesc_powerpc_isa205_vsx64l): Declare.
8531 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8532 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8533 (ppc_set_pc, ppc_get_hwcap): Adjust.
8534 (ppc_usrregs_info): Forward declare.
8535 (!__powerpc64__) ppc_regmap_adjusted: New global.
8536 (ppc_arch_setup): Adjust to the current process'es target
8537 description.
8538 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8539 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8540 (ppc_store_evrregset): Adjust.
8541 (target_regsets): Rename to ...
8542 (ppc_regsets): ... this, and make static.
8543 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8544 (ppc_regs_info): New function.
8545 (the_low_target): Adjust.
8546 (initialize_low_arch): New function.
8547 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8548 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8549 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8550 (tdesc_s390x_linux64v2): Declare.
8551 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8552 (s390_fill_gregset, s390_store_last_break): Adjust.
8553 (target_regsets): Rename to ...
8554 (s390_regsets): ... this, and make static.
8555 (s390_get_pc, s390_set_pc): Adjust.
8556 (s390_get_hwcap): New target_desc parameter, and use it.
8557 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8558 (s390_arch_setup): Adjust to set the current process'es target
8559 description. Don't adjust the regmap.
8560 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8561 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8562 (regs_info_3264): New globals.
8563 (s390_regs_info): New function.
8564 (the_low_target): Adjust.
8565 (initialize_low_arch): New function.
8566 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8567 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8568 [__mips64] (init_registers_mips_linux)
8569 (init_registers_mips_dsp_linux): Delete defines.
8570 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8571 (have_dsp): New global.
8572 (mips_read_description): New, based on mips_arch_setup.
8573 (mips_arch_setup): Reimplement.
8574 (get_usrregs_info): New function.
8575 (mips_cannot_fetch_register, mips_cannot_store_register)
8576 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8577 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8578 (target_regsets): Rename to ...
8579 (mips_regsets): ... this, and make static.
8580 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8581 (dsp_regs_info, regs_info): New globals.
8582 (mips_regs_info): New function.
8583 (the_low_target): Adjust.
8584 (initialize_low_arch): New function.
8585 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8586 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8587 Declare.
8588 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8589 (arm_read_description): New, with bits factored from
8590 arm_arch_setup.
8591 (arm_arch_setup): Reimplement.
8592 (target_regsets): Rename to ...
8593 (arm_regsets): ... this, and make static.
8594 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8595 (arm_regs_info): New function.
8596 (the_low_target): Adjust.
8597 (initialize_low_arch): New function.
8598 * linux-m68k-low.c (tdesc_m68k): Declare.
8599 (target_regsets): Rename to ...
8600 (m68k_regsets): ... this, and make static.
8601 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8602 (m68k_regs_info): New function.
8603 (m68k_arch_setup): New function.
8604 (the_low_target): Adjust.
8605 (initialize_low_arch): New function.
8606 * linux-sh-low.c (tdesc_sharch): Declare.
8607 (target_regsets): Rename to ...
8608 (sh_regsets): ... this, and make static.
8609 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8610 (sh_regs_info, sh_arch_setup): New functions.
8611 (the_low_target): Adjust.
8612 (initialize_low_arch): New function.
8613 * linux-bfin-low.c (tdesc_bfin): Declare.
8614 (bfin_arch_setup): New function.
8615 (bfin_usrregs_info, regs_info): New globals.
8616 (bfin_regs_info): New function.
8617 (the_low_target): Adjust.
8618 (initialize_low_arch): New function.
8619 * linux-cris-low.c (tdesc_cris): Declare.
8620 (cris_arch_setup): New function.
8621 (cris_usrregs_info, regs_info): New globals.
8622 (cris_regs_info): New function.
8623 (the_low_target): Adjust.
8624 (initialize_low_arch): New function.
8625 * linux-cris-low.c (tdesc_crisv32): Declare.
8626 (cris_arch_setup): New function.
8627 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8628 (cris_regs_info): New function.
8629 (the_low_target): Adjust.
8630 (initialize_low_arch): New function.
8631 * linux-m32r-low.c (tdesc_m32r): Declare.
8632 (m32r_arch_setup): New function.
8633 (m32r_usrregs_info, regs_info): New globals.
8634 (m32r_regs_info): Adjust.
8635 (initialize_low_arch): New function.
8636 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8637 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8638 (tic6x_usrregs_info): Forward declare.
8639 (tic6x_read_description): New function, based on ...
8640 (tic6x_arch_setup): ... this. Reimplement.
8641 (target_regsets): Rename to ...
8642 (tic6x_regsets): ... this, and make static.
8643 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8644 (tic6x_regs_info): New function.
8645 (the_low_target): Adjust.
8646 (initialize_low_arch): New function.
8647 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8648 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8649 (target_regsets): Rename to ...
8650 (xtensa_regsets): ... this, and make static.
8651 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8652 globals.
8653 (xtensa_arch_setup, xtensa_regs_info): New functions.
8654 (the_low_target): Adjust.
8655 (initialize_low_arch): New function.
8656 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8657 (nios2_arch_setup): Set the current process'es tdesc.
8658 (target_regsets): Rename to ...
8659 (nios2_regsets): ... this.
8660 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8661 (nios2_regs_info): New function.
8662 (the_low_target): Adjust.
8663 (initialize_low_arch): New function.
8664 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8665 (aarch64_arch_setup): Set the current process'es tdesc.
8666 (target_regsets): Rename to ...
8667 (aarch64_regsets): ... this.
8668 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8669 (aarch64_regs_info): New function.
8670 (the_low_target): Adjust.
8671 (initialize_low_arch): New function.
8672 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8673 globals.
8674 (target_regsets): Rename to ...
8675 (tile_regsets): ... this.
8676 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8677 (tile_regs_info): New function.
8678 (tile_arch_setup): Set the current process'es tdesc.
8679 (the_low_target): Adjust.
8680 (initialize_low_arch): New function.
8681 * spu-low.c (tdesc_spu): Declare.
8682 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8683 * win32-arm-low.c (tdesc_arm): Declare.
8684 (arm_arch_setup): New function.
8685 (the_low_target): Install arm_arch_setup instead of
8686 init_registers_arm.
8687 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8688 (init_windows_x86): Rename to ...
8689 (i386_arch_setup): ... this. Set `win32_tdesc'.
8690 (the_low_target): Adjust.
8691 * win32-low.c (win32_tdesc): New global.
8692 (child_add_thread): Don't create the thread cache here.
8693 (do_initial_child_stuff): Set the new process'es tdesc.
8694 * win32-low.h (struct target_desc): Forward declare.
8695 (win32_tdesc): Declare.
8696 * lynx-i386-low.c (tdesc_i386): Declare global.
8697 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8698 * lynx-low.c (lynx_tdesc): New global.
8699 (lynx_add_process): Set the new process'es tdesc.
8700 * lynx-low.h (struct target_desc): Forward declare.
8701 (lynx_tdesc): Declare global.
8702 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8703 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8704 * nto-low.c (nto_tdesc): New global.
8705 (do_attach): Set the new process'es tdesc.
8706 * nto-low.h (struct target_desc): Forward declare.
8707 (nto_tdesc): Declare.
8708 * nto-x86-low.c (tdesc_i386): Declare.
8709 (nto_x86_arch_setup): Set `nto_tdesc'.
8710
8711 2013-06-04 Gary Benson <gbenson@redhat.com>
8712
8713 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8714 to qSupported response when appropriate.
8715 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8716 with nonzero-length annex.
8717 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8718 arguments supplied in annex.
8719
8720 2013-05-31 Doug Evans <dje@google.com>
8721
8722 PR server/15594
8723 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8724 64 bits in 64-cross-32 environment.
8725
8726 2013-05-28 Pedro Alves <palves@redhat.com>
8727
8728 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8729 (aarch64-without-fpu.c): Delete rule.
8730 * configure.srv (aarch64*-*-linux*): Remove references to
8731 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8732 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8733 declaration.
8734
8735 2013-05-24 Pedro Alves <palves@redhat.com>
8736
8737 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8738 instead of strchr/decode_address. Error if the range isn't split
8739 with a ','. Don't assume there's be a ':' in the action.
8740
8741 2013-05-23 Yao Qi <yao@codesourcery.com>
8742 Pedro Alves <palves@redhat.com>
8743
8744 * linux-low.c (lwp_in_step_range): New function.
8745 (linux_wait_1): If the thread was range stepping and stopped
8746 outside the stepping range, report the stop to GDB. Otherwise,
8747 continue stepping. Add range stepping debug output.
8748 (linux_set_resume_request): Copy the step range from the resume
8749 request to the lwp.
8750 (linux_supports_range_stepping): New.
8751 (linux_target_ops) <supports_range_stepping>: Set to
8752 linux_supports_range_stepping.
8753 * linux-low.h (struct linux_target_ops)
8754 <supports_range_stepping>: New field.
8755 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8756 * linux-x86-low.c (x86_supports_range_stepping): New.
8757 (the_low_target) <supports_range_stepping>: Set to
8758 x86_supports_range_stepping.
8759 * server.c (handle_v_cont): Handle 'r' action.
8760 (handle_v_requests): Append ";r" if the target supports range
8761 stepping.
8762 * target.h (struct thread_resume) <step_range_start,
8763 step_range_end>: New fields.
8764 (struct target_ops) <supports_range_stepping>:
8765 New field.
8766 (target_supports_range_stepping): New macro.
8767
8768 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8769
8770 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8771 confusion in comment.
8772
8773 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8774
8775 * lynx-low.c (struct process_info_private): New type.
8776 (lynx_add_process): New function.
8777 (lynx_create_inferior, lynx_attach): Replace calls to
8778 add_process by calls to lynx_add_process.
8779 (lynx_resume): If PTID is null, then try using
8780 current_process()->private->last_wait_event_ptid.
8781 Add comments.
8782 (lynx_clear_inferiors): Delete. The contents of that function
8783 has been inlined in lynx_mourn;
8784 (lynx_wait_1): Save the ptid in the process's private data.
8785 (lynx_mourn): Free the process' private data. Replace call
8786 to lynx_clear_inferiors by call to clear_inferiors.
8787
8788 2013-05-17 Yao Qi <yao@codesourcery.com>
8789
8790 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8791 the right place.
8792
8793 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8794
8795 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8796 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8797 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8798 PT_TEXT_END_ADDR guards. Update comments.
8799 (linux_target_op) <read_offsets>: Conditionally define to
8800 linux_read_offsets if the target is UCLIBC and if it defines
8801 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8802
8803 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8804 Andrew Jenner <andrew@codesourcery.com>
8805
8806 * Makefile.in (SFILES): Add linux-nios2-low.c.
8807 (clean): Add action to delete nios2-linux.c.
8808 (nios2-linux.c): New rule.
8809 * configure.srv: Add nios2*-*-linux*.
8810 * linux-nios2-low.c: New.
8811
8812 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8813
8814 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8815
8816 2013-04-25 Hui Zhu <hui@codesourcery.com>
8817
8818 PR gdb/15186
8819 * ax.c (ax_printf): Add fflush.
8820
8821 2013-04-22 Tom Tromey <tromey@redhat.com>
8822
8823 * Makefile.in (SFILES): Add filestuff.c.
8824 (OBS): Add filestuff.o.
8825 (filestuff.o): New target.
8826 * config.in, configure: Rebuild.
8827 * configure.ac: Check for fdwalk, pipe2.
8828
8829 2013-04-17 Pedro Alves <palves@redhat.com>
8830
8831 * configure.ac (USE_THREAD_DB): Delete variable.
8832 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8833 Don't AC_SUBST USE_THREAD_DB.
8834 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8835 * config.in, configure: Regenerate.
8836
8837 2013-04-16 Pedro Alves <palves@redhat.com>
8838
8839 * linux-low.h (struct lwp_info) <thread_known>: Move under
8840 the USE_THREAD_DB #ifdef.
8841
8842 2013-04-16 Pedro Alves <palves@redhat.com>
8843
8844 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8845 (linux-low.o): Delete rule.
8846 * linux-low.h: Always include "gdb_thread_db.h" instead of
8847 conditionally including thread_db.h.
8848 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8849 HAVE_THREAD_DB_H.
8850
8851 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8852
8853 * Makefile.in (install-only): Fix make install regression.
8854
8855 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8856
8857 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8858 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8859 installation.
8860 * gdbserver.1: Remove.
8861
8862 2013-03-22 Pedro Alves <palves@redhat.com>
8863
8864 * linux-low.c (handle_extended_wait): Don't call
8865 linux_enable_event_reporting.
8866
8867 2013-03-15 Tony Theodore <tonyt@logyst.com>
8868
8869 PR build/9098:
8870 * Makefile.in (SHELL): Use @SHELL@.
8871
8872 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8873
8874 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8875 compiler warning.
8876
8877 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8878
8879 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8880 Remove extraneous NULL element.
8881
8882 2013-03-13 Yao Qi <yao@codesourcery.com>
8883
8884 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8885 'V' block in trace frame.
8886
8887 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8888
8889 * target.h (struct target_ops): Add btrace ops.
8890 (target_supports_btrace): New macro.
8891 (target_enable_btrace): New macro.
8892 (target_disable_btrace): New macro.
8893 (target_read_btrace): New macro.
8894 * gdbthread.h (struct thread_info): Add btrace field.
8895 * server.c: Include btrace-common.h.
8896 (handle_btrace_general_set): New function.
8897 (handle_btrace_enable): New function.
8898 (handle_btrace_disable): New function.
8899 (handle_general_set): Call handle_btrace_general_set.
8900 (handle_qxfer_btrace): New function.
8901 (struct qxfer qxfer_packets[]): Add btrace entry.
8902 * inferiors.c (remove_thread): Disable btrace.
8903 * linux-low: Include linux-btrace.h.
8904 (linux_low_enable_btrace): New function.
8905 (linux_low_read_btrace): New function.
8906 (linux_target_ops): Add btrace ops.
8907 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8908 Add srv_linux_btrace=yes.
8909 (x86_64-*-linux*): Add linux-btrace.o.
8910 Add srv_linux_btrace=yes.
8911 * configure.ac: Define HAVE_LINUX_BTRACE.
8912 * config.in: Regenerated.
8913 * configure: Regenerated.
8914
8915 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8916
8917 * server.c (handle_qxfer): Preserve error message if -3 is
8918 returned.
8919 (qxfer): Document the -3 return value.
8920
8921 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8922
8923 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8924 (linux_btrace_h): New variable.
8925 (linux-btrace.o): New rule.
8926
8927 2013-03-08 Stan Shebs <stan@codesourcery.com>
8928 Hafiz Abid Qadeer <abidh@codesourcery.com>
8929
8930 * tracepoint.c (trace_buffer_size): New global.
8931 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8932 (init_trace_buffer): Change to one-argument function. Allocate
8933 trace buffer memory.
8934 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8935 handle QTBuffer:size packet.
8936 (cmd_bigqtbuffer_size): New function.
8937 (initialize_tracepoint): Call init_trace_buffer with
8938 DEFAULT_TRACE_BUFFER_SIZE.
8939 * server.c (handle_query): Add QTBuffer:size in the
8940 supported packets.
8941
8942 2013-03-07 Yao Qi <yao@codesourcery.com>
8943
8944 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8945 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8946 of -1.
8947 (cmd_qtsp): Adjust condition. Do post increment.
8948 Set cur_action and cur_step_action back to 0.
8949
8950 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8951
8952 PR server/15236
8953 * linux-low.c (linux_write_memory): Return early success if LEN is
8954 zero.
8955
8956 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8957
8958 * configure.srv: Add x86_64-*-cygwin* as target.
8959
8960 2013-02-28 Tom Tromey <tromey@redhat.com>
8961
8962 * configure.ac: Invoke AC_SYS_LARGEFILE.
8963 * configure, config.in: Rebuild.
8964
8965 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8966
8967 * win32-low.c: Throughout, fix format strings and casts of
8968 printf-like functions to avoid type related warnings on all
8969 platforms.
8970 (get_child_debug_event): Print dwDebugEventCode as hex since
8971 that's how it's usually documented.
8972
8973 2013-02-28 Yao Qi <yao@codesourcery.com>
8974
8975 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8976 pulongest.
8977
8978 2013-02-27 Jiong Wang <jiwang@tilera.com>
8979
8980 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8981 (reg-tilegx32.c): New rule.
8982 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8983 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8984 different register info initializer according to elf class.
8985 (init_registers_tilgx32): New function. The tilegx32 register info
8986 initializer.
8987 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8988 (tile_store_gregset): Likewise.
8989
8990 2013-02-27 Yao Qi <yao@codesourcery.com>
8991
8992 * server.c (process_point_options): Print debug message when
8993 debug_threads is true.
8994
8995 2013-02-26 Yao Qi <yao@codesourcery.com>
8996
8997 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8998
8999 2013-02-19 Pedro Alves <palves@redhat.com>
9000 Kai Tietz <ktietz@redhat.com>
9001
9002 PR gdb/15161
9003
9004 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9005 instead of strtoul to extract address from packet.
9006 (process_serial_event) <'z'>: Likewise.
9007
9008 2013-02-18 Yao Qi <yao@codesourcery.com>
9009
9010 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9011
9012 2013-02-14 Pedro Alves <palves@redhat.com>
9013
9014 Plug memory leak.
9015
9016 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9017 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9018
9019 2013-02-14 Pedro Alves <palves@redhat.com>
9020
9021 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9022
9023 2013-02-14 Pedro Alves <palves@redhat.com>
9024
9025 * tracepoint.c (save_string): Delete.
9026 (add_tracepoint_action): Use savestring instead of save_string.
9027
9028 2013-02-12 Pedro Alves <palves@redhat.com>
9029
9030 * linux-xtensa-low.c: Ditto.
9031 * xtensa-xtregs.c: Ditto.
9032
9033 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9034
9035 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9036 thread_db.
9037
9038 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9039
9040 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9041 aarch64_num_wp_regs and aarch64_num_bp_regs to
9042 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9043
9044 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9045
9046 * linux-aarch64-low.c (ps_get_thread_area): Replace
9047 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9048
9049 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9050 Marcus Shawcroft <marcus.shawcroft@arm.com>
9051 Nigel Stephens <nigel.stephens@arm.com>
9052 Yufeng Zhang <yufeng.zhang@arm.com>
9053
9054 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9055 (aarch64.c, aarch64-without-fpu.c): New targets.
9056 * configure.srv (aarch64*-*-linux*): New.
9057 * linux-aarch64-low.c: New file.
9058
9059 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9060
9061 * linux-low.c (handle_extended_wait, linux_create_inferior)
9062 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9063 (dequeue_one_deferred_signal, linux_resume_one_thread)
9064 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9065 (linux_tracefork_grandchild, linux_test_for_tracefork)
9066 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9067 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9068 where the argument is 0.
9069
9070 2013-01-25 Yao Qi <yao@codesourcery.com>
9071
9072 * event-loop.c: Include "queue.h".
9073 (gdb_event_p): New typedef.
9074 (struct gdb_event) <next_event>: Remove.
9075 (event_queue): Change to QUEUE(gdb_event_p).
9076 (async_queue_event): Remove.
9077 (gdb_event_xfree): New.
9078 (initialize_event_loop): New.
9079 (process_event): Use API from QUEUE.
9080 (wait_for_event): Likewise.
9081 * server.c (main): Call initialize_event_loop.
9082 * server.h (initialize_event_loop): Declare.
9083
9084 2013-01-18 Yao Qi <yao@codesourcery.com>
9085
9086 * ax.h (struct eval_agent_expr_context): New.
9087 (gdb_eval_agent_expr): Update declaration.
9088 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9089 TFRAME. Add new argument CTX.
9090 * server.h (struct eval_agent_expr_context): Declare.
9091 (agent_mem_read, agent_tsv_read): Update declaration.
9092 (agent_mem_read_string): Likewise.
9093 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9094 (add_traceframe_block): Add new argument TPOINT.
9095 Increase TPOINT->traceframe_usage.
9096 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9097 eval_tracepoint_agent_expr.
9098 (condition_true_at_tracepoint): Likewise.
9099 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9100 (agent_mem_read_string, agent_tsv_read): Likewise.
9101
9102 2013-01-16 Yao Qi <yao@codesourcery.com>
9103
9104 * linux-low.c (linux_resume_one_lwp): Don't check
9105 'lwp->bp_reinsert != 0'.
9106
9107 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9108 Pedro Alves <palves@redhat.com>
9109
9110 * lynx-low.c (ptrace_request_to_str): Define a temporary
9111 macro and use it to simplify this function's implementation.
9112
9113 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9114
9115 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9116 sets errno.
9117
9118 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9119
9120 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9121
9122 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9123
9124 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9125
9126 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9127
9128 * lynx-low.c (lynx_resume): Use the resume_info parameter
9129 to determine the ptid for the lynx_ptrace call, unless
9130 it is equal to minus_one_ptid, in which case we use the
9131 ptid of the current_inferior.
9132 (lynx_wait_1): After having received a thread create/exit
9133 event, resume the inferior's execution using the signaling
9134 thread's ptid, rather than the old ptid.
9135
9136 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9137
9138 * lynx-low.c (lynx_resume): Delete variable ret.
9139
9140 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9141
9142 * gdbreplay.c (gdbreplay_version): Update copyright year.
9143 * server.c (gdbserver_version): Likewise.
9144
9145 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9146
9147 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9148 new thread.
9149
9150 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9151
9152 * lynx-low.c (ptrace_request_to_str): Add handling for
9153 PTRACE_GETTRACESIG.
9154
9155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9156
9157 * lynx-low.c (lynx_attach): Delete variable new_process.
9158
9159 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9160
9161 * lynx-low.c (lynx_create_inferior): Delete variable
9162 new_process.
9163
9164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9165
9166 * lynx-low.c (ptrace_request_to_str): Do not handle
9167 PTRACE_GETTHREADLIST if this macro does not exist.
9168
9169 2012-12-15 Yao Qi <yao@codesourcery.com>
9170
9171 * Makefile.in (OBS): Add notif.o.
9172 * notif.c, notif.h: New.
9173 * server.c: Include "notif.h".
9174 (struct vstop_notif) <next>: Remove.
9175 <base>: New field.
9176 (queue_stop_reply): Update.
9177 (push_event, send_next_stop_reply): Remove.
9178 (discard_queued_stop_replies): Update.
9179 (notif_stop): New variable.
9180 (handle_v_stopped): Remove.
9181 (handle_v_requests): Don't call handle_v_stopped. Call
9182 handle_ack_notif instead.
9183 (queue_stop_reply_callback): Call notif_event_enque instead
9184 of queue_stop_reply.
9185 (handle_status): Don't call send_next_stop_reply, call
9186 notif_write_event instead.
9187 (kill_inferior_callback): Likewise.
9188 (detach_or_kill_inferior_callback): Likewise.
9189 (main): Call initialize_notif.
9190 (process_serial_event): Call QUEUE_is_empty.
9191 (handle_target_event): Call notif_push instead of push event.
9192 * server.h (push_event): Remove declaration.
9193
9194 2012-12-10 Tom Tromey <tromey@redhat.com>
9195
9196 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9197 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9198 macros.
9199 (.c.o): Rewrite.
9200 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9201 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9202 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9203 (amd64-linux-ipa.o, ax.o): Rewrite.
9204 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9205 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9206 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9207 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9208 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9209 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9210 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9211 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9212 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9213 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9214 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9215 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9216 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9217 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9218 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9219 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9220 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9221 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9222 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9223 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9224 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9225 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9226 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9227 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9228 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9229 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9230 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9231 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9232 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9233 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9234 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9235 (reg-tilegx.o): Remove.
9236 (all_object_files): New macro.
9237 Include .deps files.
9238 * aclocal.m4, configure: Rebuild.
9239 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9240 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9241 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9242
9243 2012-12-05 Tom Tromey <tromey@redhat.com>
9244
9245 PR gdb/14917:
9246 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9247
9248 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9249
9250 * configure.ac: Check for linux/perf_event.h.
9251 * config.in: Regenerated.
9252 * configure: Regenerated.
9253
9254 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9255
9256 * hostio.c (handle_readlink): Decrease buffer size
9257 parameter passed to readlink by one byte.
9258
9259 2012-11-26 Yao Qi <yao@codesourcery.com>
9260
9261 * configure.ac (build_warnings): Append '-Wempty-body'.
9262 * configure: Regenerated.
9263 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9264 body.
9265
9266 2012-11-15 Pierre Muller <muller@sourceware.org>
9267
9268 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9269 * config.in: Regenerate.
9270 * configure: Regenerate.
9271 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9272 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9273 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9274 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9275 header.
9276 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9277 instead of <sys/wait.h> header.
9278 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9279
9280 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9281
9282 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9283 (various make rules): Remove -DGDBSERVER
9284
9285 2012-11-09 Yao Qi <yao@codesourcery.com>
9286
9287 * spu-low.c (current_ptid): Move it to ..
9288 * gdbthread.h: ... here. New.
9289 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9290 * server.c (myresume, process_serial_event): Likewise.
9291 * thread-db.c (thread_db_find_new_threads): Likewise.
9292 * tracepoint.c (run_inferior_command): Likewise.
9293
9294 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9295
9296 * server.c (handle_search_memory_1): Include access length in
9297 warning message.
9298
9299 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9300
9301 * linux-crisv32-low.c: Fix compile errors.
9302
9303 2012-09-04 Yao Qi <yao@codesourcery.com>
9304
9305 * tracepoint.c (cmd_qtsv): Adjust debug message.
9306 Don't check CUR_TPOINT.
9307
9308 2012-08-28 Yao Qi <yao@codesourcery.com>
9309
9310 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9311 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9312 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9313 Remove declarations of xmalloc, xreallloc, xstrdup and
9314 freeargv.
9315 * Makefile.in (libiberty_h): New.
9316 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9317 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9318
9319 2012-08-23 Yao Qi <yao@codesourcery.com>
9320
9321 * server.h: Remove declaration of 'xsnprintf'.
9322
9323 2012-08-22 Keith Seitz <keiths@redhat.com>
9324
9325 * server.h: Include build-gnulib-gbserver/config.h.
9326 * gdbreplay.c: Likewise.
9327
9328 2012-08-08 Doug Evans <dje@google.com>
9329
9330 * Makefile.in (SFILES): Add gdb_vecs.c.
9331 (OBS): Add gdb_vecs.o.
9332 (gdb_vecs_h, host_defs_h): New variables.
9333 (thread-db.o): Add $(gdb_vecs_h) dependency.
9334 (gdb_vecs.o): New rule.
9335 * thread-db.c: #include "gdb_vecs.h".
9336 (thread_db_load_search): Use a vector to iterate over path elements.
9337 Handle text appearing after "$pdir".
9338
9339 * configure.ac: Add check for strstr.
9340 * config.in: Regenerate.
9341 * configure: Regenerate.
9342
9343 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9344
9345 * hostio.c (handle_pread): If pread fails, fall back to attempting
9346 lseek/read.
9347 (handle_pwrite): Likewise for pwrite.
9348
9349 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9350
9351 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9352 between unsupported TYPE and unimplementable ADDR/LEN combination.
9353 (arm_insert_point): Act on new return value.
9354
9355 2012-07-31 Pedro Alves <palves@redhat.com>
9356
9357 * server.c (process_point_options): Only skip tokens if we find
9358 one that is unrecognized. Don't treat 'X' specially while
9359 skipping unrecognized tokens.
9360
9361 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9362
9363 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9364 to 4-byte-align HW breakpoint addresses for Thumb.
9365
9366 2012-07-27 Yao Qi <yao@codesourcery.com>
9367
9368 PR remote/14161.
9369
9370 * server.h: Declare gdb_agent_about_to_close.
9371 * target.c (kill_inferior): Include "agent.h".
9372 New. Send command 'kill'.
9373 * target.h (kill_inferior): Removed macro.
9374 * tracepoint.c (gdb_agent_about_to_close): New.
9375 (gdb_agent_helper_thread): Handle command 'close'.
9376 Wait endlessly until the inferior stops.
9377 Install gdb_agent_remove_socket to atexit hook.
9378 (agent_socket_name): New static variable.
9379 (gdb_agent_socket_init): Replace local variable 'name' with
9380 'agent_socket_name'.
9381 (gdb_agent_remove_socket): New.
9382
9383 2012-07-27 Yao Qi <yao@codesourcery.com>
9384
9385 * server.c (process_point_options): Stop at 'X' when parsing.
9386
9387 2012-07-19 Michael Eager <eager@eagercon.com>
9388
9389 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9390 to hw_execute.
9391 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9392 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9393 hardware breakpoint.
9394
9395 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9396
9397 * gdbserver/linux-low.c (initialize_low): Call
9398 linux_ptrace_init_warnings.
9399
9400 2012-07-02 Doug Evans <dje@google.com>
9401
9402 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9403 pointer to int.
9404
9405 2012-07-02 Stan Shebs <stan@codesourcery.com>
9406
9407 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9408 (ax.o): Add it to build rule.
9409 (ax-ipa.o): Ditto.
9410 (OBS): Add format.o.
9411 (IPA_OBS): Add format.o.
9412 * server.c (handle_query): Claim support for breakpoint commands.
9413 (process_point_options): Add command case.
9414 (process_serial_event): Leave running if there are printfs in
9415 effect.
9416 * mem-break.h (any_persistent_commands): Declare.
9417 (add_breakpoint_commands): Declare.
9418 (gdb_no_commands_at_breakpoint): Declare.
9419 (run_breakpoint_commands): Declare.
9420 * mem-break.c (struct point_command_list): New struct.
9421 (struct breakpoint): New field command_list.
9422 (any_persistent_commands): New function.
9423 (add_commands_to_breakpoint): New function.
9424 (add_breakpoint_commands): New function.
9425 (gdb_no_commands_at_breakpoint): New function.
9426 (run_breakpoint_commands): New function.
9427 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9428 locally.
9429 * ax.c: Include format.h.
9430 (ax_printf): New function.
9431 (gdb_eval_agent_expr): Add printf opcode.
9432
9433 2012-06-13 Yao Qi <yao@codesourcery.com>
9434
9435 * server.c (start_inferior): Remove duplicated writes to fields
9436 'last_resume_kind' and 'last_status' of 'current_inferior'.
9437
9438 2012-06-12 Yao Qi <yao@codesourcery.com>
9439 Pedro Alves <palves@redhat.com>
9440
9441 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9442 comment.
9443 * server.c (handle_v_cont): Extend comment.
9444
9445 2012-06-11 Yao Qi <yao@codesourcery.com>
9446
9447 * linux-low.c (linux_attach): Add 'static'.
9448
9449 2012-06-06 Yao Qi <yao@codesourcery.com>
9450
9451 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9452
9453 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9454
9455 Fix gcc -flto compilation warning.
9456 * server.c (main): Make variable multi_mode and attach volatile.
9457
9458 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9459
9460 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9461 if the platform doesn't know about it.
9462
9463 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9464
9465 * Makefile.in (SFILES): Add linux-tile-low.c.
9466 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9467 * configure.srv: Handle tilegx-*-linux*.
9468 * linux-tile-low.c: New file.
9469
9470 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9471
9472 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9473
9474 2012-05-24 Pedro Alves <palves@redhat.com>
9475
9476 PR gdb/7205
9477
9478 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9479
9480 2012-05-24 Pedro Alves <palves@redhat.com>
9481
9482 PR gdb/7205
9483
9484 Replace target_signal with gdb_signal throughout.
9485
9486 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9487
9488 * linux-low.c (linux_store_registers): Avoid the copying sequence
9489 when no data has been retrieved by ptrace.
9490
9491 2012-05-22 Will Deacon <will.deacon@arm.com>
9492
9493 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9494 Include asm/ptrace.h.
9495 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9496 already defined.
9497
9498 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9499
9500 * linux-low.c (linux_store_registers): Don't re-retrieve data
9501 with ptrace that has already been obtained from /proc. Always
9502 copy any data retrieved with ptrace to the buffer supplied.
9503
9504 2012-05-11 Yao Qi <yao@codesourcery.com>
9505 Pedro Alves <palves@redhat.com>
9506
9507 * linux-low.c (enum stopping_threads_kind): New.
9508 (stopping_threads): Change type to `enum stopping_threads_kind'.
9509 (handle_extended_wait): If stopping and suspending threads, leave
9510 the new_lwp suspended too.
9511 (linux_wait_for_event): Adjust.
9512 (stop_all_lwps): Set `stopping_threads' to
9513 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9514 whether we're suspending threads or just stopping them. Assert no
9515 recursion happens.
9516
9517 2012-04-29 Yao Qi <yao@codesourcery.com>
9518
9519 * server.h: Move some code to ...
9520 * gdbthread.h: ... here. New.
9521 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9522 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9523 (nto-low.o, win32-low.o): Likewise.
9524 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9525 * regcache.c, remote-utils.c, server.c: Likewise.
9526 * target.c, tracepoint.c, win32-low.c: Likewise.
9527
9528 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9529
9530 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9531 (PTRACE_ARG4_TYPE): Likewise.
9532 (PTRACE_XFER_TYPE): Likewise.
9533 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9534 ptrace to PTRACE_ARG3_TYPE.
9535 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9536 (PTRACE_ARG4_TYPE): Likewise.
9537 (PTRACE_XFER_TYPE): Likewise.
9538 (linux_detach_one_lwp): Cast fourth argument of
9539 ptrace to long then PTRACE_ARG4_TYPE.
9540 (regsets_fetch_inferior_registers): Cast third argument of
9541 ptrace to long then PTRACE_ARG3_TYPE.
9542 (regsets_store_inferior_registers): Likewise.
9543
9544 2012-04-20 Pedro Alves <palves@redhat.com>
9545
9546 * configure: Regenerate.
9547
9548 2012-04-19 Pedro Alves <palves@redhat.com>
9549
9550 * Makefile.in (GNULIB_BUILDDIR): New.
9551 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9552 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9553 (all, install-only, uninstall, clean-info, all-lib, clean): No
9554 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9555 (maintainer-clean realclean distclean): Use subdir_do.
9556 (subdir_do): New.
9557 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9558 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9559 * acinclude.m4: Include acx_configure_dir.m4.
9560 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9561 calls. Call AC_PROG_RANLIB. Configure gnulib using
9562 ACX_CONFIGURE_DIR.
9563 (GNULIB): New.
9564 (GNULIB_STDINT_H): Adjust.
9565 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9566 * gdbreplay.c: Include build-gnulib/config.h.
9567 * server.h: Likewise.
9568 * aclocal.m4: Regenerate.
9569 * config.in: Regenerate.
9570 * configure: Regenerate.
9571
9572 2012-04-19 Pedro Alves <palves@redhat.com>
9573
9574 * Makefile.in (LIBGNU, INCGNU): Adjust.
9575 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9576 (all, install-only, uninstall, clean-info, all-lib, clean)
9577 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9578 * configure.ac: Adjust AC_OUTPUT output.
9579 * aclocal.m4: Regenerate.
9580 * configure: Regenerate.
9581
9582 2012-04-19 Pedro Alves <palves@redhat.com>
9583
9584 * Makefile.in (generated_files): New.
9585 (server_h): Remove the explicit dependency on config.h, and depend
9586 on $generated_files.
9587
9588 2012-04-19 Pedro Alves <palves@redhat.com>
9589
9590 * Makefile.in (INCGNU): Add -Ignulib.
9591
9592 2012-04-19 Pedro Alves <palves@redhat.com>
9593
9594 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9595 (INCGNU): ... this, and spell out -I here.
9596 (GNULIB_LIB): Rename to ...
9597 (LIBGNU): ... this.
9598 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9599
9600 2012-04-19 Pedro Alves <palves@redhat.com>
9601
9602 * config.in: Regenerate.
9603
9604 2012-04-19 Pedro Alves <palves@redhat.com>
9605
9606 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9607 * server.h (memmem): Remove declaration.
9608 * config.in: Regenerate.
9609 * configure: Regenerate.
9610
9611 2012-04-19 Yao Qi <yao@codesourcery.com>
9612
9613 * Makefile.in (SFILES): Add common/vec.c.
9614 (OBS): Add vec.o.
9615 (vec.o): New rule.
9616
9617 2012-04-19 Yao Qi <yao@codesourcery.com>
9618
9619 * remote-utils.c (prepare_resume_reply): Replace with macro
9620 target_core_of_thread.
9621 * server.c (handle_qxfer_threads_proper): Likewise.
9622 * target.h (traget_core_of_thread): New macro.
9623
9624 2012-04-18 Pedro Alves <palves@redhat.com>
9625
9626 * aclocal.m4: Regenerate.
9627 * configure: Regenerate.
9628
9629 2012-04-16 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9632 duplicated on address.
9633
9634 2012-04-16 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9637 (struct tracepoint_action_ops) <send>: New field.
9638 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9639 (agent_expr_send, x_tracepoint_action_send): New.
9640 (l_tracepoint_action_send): New.
9641 (cmd_qtdp): Download and install tracepoint
9642 according to `use_agent'.
9643 (run_inferior_command): Add one more parameter `len'.
9644 Update callers.
9645 (tracepoint_send_agent): New.
9646 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9647
9648 2012-04-16 Yao Qi <yao@codesourcery.com>
9649
9650 * tracepoint.c (download_tracepoints): Moved to ...
9651 (cmd_qtstart): ... here.
9652
9653 2012-04-14 Yao Qi <yao@codesourcery.com>
9654
9655 * tracepoint.c: Include inttypes.h.
9656 (struct collect_memory_action): Use sized types.
9657 (struct tracepoint): Likewise.
9658 (cmd_qtdp, stop_tracing): Update print specifiers.
9659 (cmd_qtp, response_tracepoint): Likewise.
9660 (collect_data_at_tracepoint): Likewise.
9661 (collect_data_at_step): Likewise.
9662
9663 2012-04-14 Yao Qi <yao@codesourcery.com>
9664
9665 Import gnulib module inttypes.
9666 * aclocal.m4, config.in, configure: Regenerated.
9667
9668 2012-04-14 Yao Qi <yao@codesourcery.com>
9669
9670 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9671 Makefile and config.status at last.
9672
9673 2012-04-13 Yao Qi <yao@codesourcery.com>
9674
9675 * tracepoint.c: Include stdint.h unconditionally.
9676
9677 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9678
9679 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9680 on BFD_HAVE_SYS_PROCFS_TYPE.
9681 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9682 * configure: Regenerate.
9683 * config.in: Likewise.
9684
9685 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9686
9687 * Makefile.in (clean): Also remove x32.c x32-linux.c
9688 x32-avx.c x32-avx-linux.c.
9689 (x32.o): New target.
9690 (x32.c): Likewise.
9691 (x32-linux.o): Likewise.
9692 (x32-linux.c): Likewise.
9693 (x32-avx.o): Likewise.
9694 (x32-avx.c): Likewise.
9695 (x32-avx-linux.o): Likewise.
9696 (x32-avx-linux.c): Likewise.
9697
9698 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9699 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9700 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9701 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9702 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9703 i386/x32-avx-linux.xml.
9704
9705 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9706 (init_registers_x32_avx_linux): Likwise.
9707 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9708 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9709
9710 2012-04-13 Pedro Alves <palves@redhat.com>
9711
9712 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9713 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9714 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9715 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9716 the sub-make.
9717
9718 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9719
9720 * linux-x86-low.c (compat_x32_clock_t): New.
9721 (compat_x32_siginfo_t): Likewise.
9722 (compat_x32_siginfo_from_siginfo): Likewise.
9723 (siginfo_from_compat_x32_siginfo): Likewise.
9724 (linux_is_elf64): Likewise.
9725 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9726 and siginfo_from_compat_x32_siginfo for x32.
9727 (x86_arch_setup): Set linux_is_elf64.
9728
9729 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9730
9731 PR gdb/13969
9732 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9733 e_machine field.
9734 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9735 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9736 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9737 compatible with process.
9738
9739 2012-04-12 Yao Qi <yao@codesourcery.com>
9740
9741 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9742 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9743 (install-only, install-info, clean): Handle sub dir gnulib.
9744 (all-lib, am--refresh): New targets.
9745 (memmem.o): Remove target.
9746 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9747 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9748 (AC_REPLACE_FUNCS): Remove memmem.
9749 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9750 (AC_OUTPUT): Generate Makefile in gnulib/.
9751 * aclocal.m4, config.in, configure: Regenerated.
9752
9753 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9754
9755 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9756
9757 2012-04-05 Pedro Alves <palves@redhat.com>
9758
9759 -Werror=strict-aliasing
9760
9761 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9762 pointer.
9763
9764 2012-04-04 Pedro Alves <palves@redhat.com>
9765
9766 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9767 (sparc_store_gregset_from_stack, sparc_store_gregset)
9768 (sparc_breakpoint_at): Fix formatting.
9769
9770 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9771
9772 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9773 are available.
9774 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9775 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9776 * config.in: Regenerate.
9777 * configure: Likewise.
9778
9779 2012-03-29 Pedro Alves <palves@redhat.com>
9780
9781 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9782 Correct ptrace arguments.
9783
9784 2012-03-28 Pedro Alves <palves@redhat.com>
9785
9786 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9787 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9788 (IA64_FR1_REGNUM): New defines.
9789 (ia64_fetch_register): New.
9790 (the_low_target): Install it.
9791 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9792 field.
9793 * linux-low.c (linux_fetch_registers): Try the
9794 the_low_target.fetch_register hook first.
9795
9796 * linux-arm-low.c (the_low_target): Adjust.
9797 * linux-bfin-low.c (the_low_target): Adjust.
9798 * linux-cris-low.c (the_low_target): Adjust.
9799 * linux-crisv32-low.c (the_low_target): Adjust.
9800 * linux-m32r-low.c (the_low_target): Adjust.
9801 * linux-m68k-low.c (the_low_target): Adjust.
9802 * linux-mips-low.c (the_low_target): Adjust.
9803 * linux-ppc-low.c (the_low_target): Adjust.
9804 * linux-s390-low.c (the_low_target): Adjust.
9805 * linux-sh-low.c (the_low_target): Adjust.
9806 * linux-sparc-low.c (the_low_target): Adjust.
9807 * linux-tic6x-low.c (the_low_target): Adjust.
9808 * linux-x86-low.c (the_low_target): Adjust.
9809 * linux-xtensa-low.c (the_low_target): Adjust.
9810
9811 2012-03-26 Pedro Alves <palves@redhat.com>
9812
9813 * server.c (handle_qxfer_libraries): Don't bail early if
9814 the_target->qxfer_libraries_svr4 is not NULL.
9815
9816 2012-03-26 Pedro Alves <palves@redhat.com>
9817
9818 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9819
9820 2012-03-23 Pedro Alves <palves@redhat.com>
9821
9822 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9823 "library-list-svr4" element's start tag when the the DSO list is
9824 empty.
9825
9826 2012-03-23 Pedro Alves <palves@redhat.com>
9827
9828 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9829 a variable whose type size is the same as the inferior's pointer
9830 size.
9831
9832 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9833
9834 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9835 struct siginfo.
9836 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9837 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9838 * linux-low.h: Include <signal.h>.
9839 (struct siginfo): Remove forward declaration.
9840 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9841 struct siginfo.
9842
9843 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9844
9845 * .gitignore: Ignore more files.
9846
9847 2012-03-19 Pedro Alves <palves@redhat.com>
9848 Jan Kratochvil <jan.kratochvil@redhat.com>
9849
9850 * server.c (cont_thread, general_thread): Add describing comments.
9851 (start_inferior): Clear `cont_thread'.
9852 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9853 of a process.
9854
9855 2012-03-15 Yao Qi <yao@codesourcery.com>
9856
9857 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9858 handling to ...
9859 (cmd_qtdp): ... here.
9860
9861 2012-03-15 Yao Qi <yao@codesourcery.com>
9862
9863 * tracepoint.c (struct tracepoint_action_ops): New.
9864 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9865 (m_tracepoint_action_download): New.
9866 (r_tracepoint_action_download): New.
9867 (x_tracepoint_action_download): New.
9868 (l_tracepoint_action_download): New.
9869 (add_tracepoint_action): Install `action->ops' according type.
9870 (download_tracepoint_1): Move code `download' function pointer
9871 of various tracepoint_action_ops.
9872
9873 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9874
9875 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9876 linux_ptrace_attach_warnings.
9877
9878 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 * Makefile.in (linux-ptrace.o): New.
9881 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9882 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9883 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9884 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9885 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9886 of these targets.
9887 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9888
9889 2012-03-08 Yao Qi <yao@codesourcery.com>
9890 Pedro Alves <palves@redhat.com>
9891
9892 Fix PR server/13392.
9893 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9894 offset of JMP insn.
9895 * tracepoint.c (remove_tracepoint): New.
9896 (cmd_qtdp): Call remove_tracepoint when failed to install.
9897
9898 2012-03-07 Pedro Alves <palves@redhat.com>
9899
9900 * linux-low.c (get_detach_signal): New.
9901 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9902 Pass on pending signals to PTRACE_DETACH. Check the result of the
9903 ptrace call.
9904 * server.c (program_signals, program_signals_p): New.
9905 (handle_general_set): Handle QProgramSignals.
9906 * server.h (program_signals, program_signals_p): Declare.
9907
9908 2012-03-05 Pedro Alves <palves@redhat.com>
9909 Jan Kratochvil <jan.kratochvil@redhat.com>
9910
9911 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9912 New comment why.
9913
9914 2012-03-03 Yao Qi <yao@codesourcery.com>
9915
9916 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9917 agent_look_up_symbols.
9918
9919 2012-03-03 Yao Qi <yao@codesourcery.com>
9920
9921 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9922 (linux-x86-low.o): Likewise.
9923 * server.h: Remove in_process_agent_loaded.
9924 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9925 common/agent.c.
9926 Update callers.
9927
9928 2012-03-03 Yao Qi <yao@codesourcery.com>
9929
9930 * tracepoint.c (gdb_agent_capability): New global.
9931 (in_process_agent_loaded_ust): Renamed to
9932 `in_process_agent_supports_ust'.
9933 Update callers.
9934 (in_process_agent_supports_ust): Call agent_capability_check.
9935 (clear_installed_tracepoints): Assert that agent supports
9936 agent.
9937
9938 2012-03-03 Yao Qi <yao@codesourcery.com>
9939
9940 * linux-low.c (linux_supports_agent): New.
9941 (linux_target_ops): Initialize field `supports_agent' with
9942 linux_supports_agent.
9943 * target.h (struct target_ops) <supports_agent>: New.
9944 (target_supports_agent): New macro.
9945 * server.c (handle_general_set): Handle packet 'QAgent'.
9946 (handle_query): Send `QAgent+'.
9947 * Makefile.in (server.o): Depends on agent.h.
9948
9949 2012-03-03 Yao Qi <yao@codesourcery.com>
9950
9951 * Makefile.in (OBS): Add agent.o.
9952 Add new rule for agent.o.
9953 Track dependence of tracepoint.c on agent.h.
9954 * tracepoint.c (run_inferior_command_1):
9955 (run_inferior_command): Call agent_run_command.
9956 (gdb_ust_connect_sync_socket): Deleted. Move it to
9957 common/agent.c.
9958 (resume_thread, stop_thread): Likewise.
9959 (gdb_ust_socket_init): Renamed to ...
9960 (gdb_agent_socket_init): ... New.
9961 (gdb_ust_thread): Renamed to ...
9962 (gdb_agent_helper_thread): ... New.
9963 (gdb_ust_init): Move some code to ...
9964 (gdb_agent_init): ... here. New.
9965 [HAVE_UST]: Call gdb_ust_init.
9966 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9967 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9968 * config.in, configure: Regenerated.
9969
9970 2012-03-02 Pedro Alves <palves@redhat.com>
9971
9972 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9973 * linux-low.c (struct simple_pid_list): New.
9974 (stopped_pids): New a struct simple_pid_list pointer.
9975 (add_to_pid_list, pull_pid_from_list): New.
9976 (handle_extended_wait): Don't assume the first signal new children
9977 report is SIGSTOP. Adjust call to pull_pid_from_list.
9978 (linux_wait_for_lwp): Adjust.
9979
9980 2012-03-02 Yao Qi <yao@codesourcery.com>
9981
9982 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9983 debug log.
9984
9985 2012-03-02 Yao Qi <yao@codesourcery.com>
9986
9987 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9988 `stop_pc' and `tpoint'. Update caller.
9989
9990 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9991
9992 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9993 * linux-low.c (use_linux_regsets): New macro.
9994 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9995 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9996 (linux_register_in_regsets): New function.
9997 (usr_fetch_inferior_registers): Skip registers covered by
9998 regsets.
9999 (usr_store_inferior_registers): Likewise.
10000 (usr_fetch_inferior_registers): New macro.
10001 (usr_store_inferior_registers): Likewise.
10002 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10003 (linux_store_registers): Likewise.
10004 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10005 prototype.
10006 (init_registers_mips64_dsp_linux): Likewise.
10007 (init_registers_mips_linux): New macro.
10008 (init_registers_mips_dsp_linux): Likewise.
10009 (mips_dsp_num_regs): Likewise.
10010 (DSP_BASE, DSP_CONTROL): New fallback macros.
10011 (mips_base_regs): New macro.
10012 (mips_regmap): Use it. Fix the size.
10013 (mips_dsp_regmap): New variable.
10014 (mips_dsp_regset_bitmap): Likewise.
10015 (mips_arch_setup): New function.
10016 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10017 than mips_regmap.
10018 (mips_cannot_store_register): Likewise.
10019 (the_low_target): Update .arch_setup, .num_regs and .regmap
10020 initializers. Add .regset_bitmap initializer.
10021 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10022 initializer.
10023 * linux-bfin-low.c (the_low_target): Likewise.
10024 * linux-cris-low.c (the_low_target): Likewise.
10025 * linux-crisv32-low.c (the_low_target): Likewise.
10026 * linux-ia64-low.c (the_low_target): Likewise.
10027 * linux-m32r-low.c (the_low_target): Likewise.
10028 * linux-m68k-low.c (the_low_target): Likewise.
10029 * linux-ppc-low.c (the_low_target): Likewise.
10030 * linux-s390-low.c (the_low_target): Likewise.
10031 * linux-sh-low.c (the_low_target): Likewise.
10032 * linux-sparc-low.c (the_low_target): Likewise.
10033 * linux-tic6x-low.c (the_low_target): Likewise.
10034 * linux-x86-low.c (the_low_target): Likewise.
10035 * linux-xtensa-low.c (the_low_target): Likewise.
10036 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10037 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10038 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10039 srv_xmlfiles.
10040 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10041 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10042
10043 2012-02-29 Yao Qi <yao@codesourcery.com>
10044 Pedro Alves <palves@redhat.com>
10045
10046 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10047 `step_over_finished' is true.
10048
10049 2012-02-27 Pedro Alves <palves@redhat.com>
10050
10051 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10052 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10053
10054 2012-02-27 Pedro Alves <palves@redhat.com>
10055
10056 PR server/9684
10057 * linux-low.c (pid_is_stopped): New.
10058 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10059
10060 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10061
10062 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10063 of conditions.
10064
10065 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10066
10067 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10068
10069 2012-02-24 Luis Machado <lgustavo@codesourcery>
10070
10071 * server.c (handle_query): Advertise support for target-side
10072 breakpoint condition evaluation.
10073 (process_point_options): New function.
10074 (process_serial_event): When inserting a breakpoint, check for
10075 a target-side condition that should be evaluated.
10076
10077 * mem-break.c: Include regcache.h and ax.h.
10078 (point_cond_list_t): New data structure.
10079 (breakpoint) <cond_list>: New field.
10080 (find_gdb_breakpoint_at): Make non-static.
10081 (delete_gdb_breakpoint_at): Clear any target-side
10082 conditions.
10083 (clear_gdb_breakpoint_conditions): New function.
10084 (add_condition_to_breakpoint): Likewise.
10085 (add_breakpoint_condition): Likewise.
10086 (gdb_condition_true_at_breakpoint): Likewise.
10087 (gdb_breakpoint_here): Return result directly instead
10088 of going through a local variable.
10089
10090 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10091 (clear_gdb_breakpoint_conditions): Likewise.
10092 (add_breakpoint_condition): Likewise.
10093 (gdb_condition_true_at_breakpoint): Likewise.
10094
10095 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10096 (need_step_over_p): Take target-side breakpoint condition into
10097 consideration.
10098
10099 2012-02-24 Luis Machado <lgustavo@codesourcery>
10100
10101 * server.h: Include tracepoint.h.
10102 (agent_mem_read, agent_get_trace_state_variable_value,
10103 agent_set_trace_state_variable_value,
10104 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10105 get_set_tsv_func_addr): New prototypes.
10106
10107 * ax.h: New include file.
10108 * ax.c: New source file.
10109
10110 * tracepoint.c: Include ax.h.
10111 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10112 agent_expr, eval_result_type): Move to ax.h.
10113 (parse_agent_expr): Rename to ...
10114 (gdb_parse_agent_expr): ... this, make it non-static and move
10115 to ax.h.
10116 (unparse_agent_expr) Rename to ...
10117 (gdb_unparse_agent_expr): ... this, make it non-static and move
10118 to ax.h.
10119 (eval_agent_expr): Rename to ...
10120 (eval_tracepoint_agent_expr): ... this.
10121 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10122 forward declarations.
10123 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10124 (agent_get_trace_state_variable_value): New function.
10125 (agent_set_trace_state_variable_value): New function.
10126 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10127 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10128 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10129 (condition_true_at_tracepoint): Likewise.
10130 (parse_agent_expr): Rename to ...
10131 (gdb_parse_agent_expr): ... this and move to ax.c.
10132 (unparse_agent_expr): Rename to ...
10133 (gdb_unparse_agent_expr): ... this and move to ax.c.
10134 (gdb_agent_op_name): Move to ax.c.
10135 (eval_agent_expr): Rename to ...
10136 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10137 and move to ax.c.
10138 (eval_tracepoint_agent_expr): New function.
10139 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10140 non-static.
10141 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10142 ax.c.
10143 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10144 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10145 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10146 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10147 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10148 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10149 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10150 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10151 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10152 (compile_bytecodes): Remove forward declaration.
10153 (is_goto_target): Move to ax.c.
10154 (compile_bytecodes): Move to ax.c and call
10155 agent_get_trace_state_variable_value (...) and
10156 agent_set_trace_state_variable_value (...).
10157
10158 * Makefile.in: Update ax.c and IPA dependencies.
10159
10160 2012-02-24 Pedro Alves <palves@redhat.com>
10161
10162 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10163 (cmd_bigqtbuffer_circular): ... this. Only handle
10164 'QTBuffer:circular:'.
10165 (handle_tracepoint_general_set): Adjust.
10166
10167 2012-02-16 Yao Qi <yao@codesourcery.com>
10168
10169 * inferiors.c: Move code to ...
10170 * dll.c: .... here. New.
10171 * server.h: Declare clear_dlls.
10172 * Makefile.in (SFILES): Add dll.c.
10173 (OBS): Add dll.o
10174 (dll.o): New rule.
10175
10176 2012-02-11 Yao Qi <yao@codesourcery.com>
10177
10178 * server.c: (handle_monitor_command): Add a new parameter
10179 `own_buf'.
10180 (handle_query): Update caller.
10181
10182 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10183
10184 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10185 * configure, config.in: Regenerate.
10186 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10187 is not defined.
10188
10189 2012-02-02 Pedro Alves <palves@redhat.com>
10190
10191 Try SIGKILL first, then PTRACE_KILL.
10192 * linux-low.c (linux_kill_one_lwp): New.
10193 (linux_kill_one_lwp): Rename to ...
10194 (kill_one_lwp_callback): ... this. Use the new
10195 linux_kill_one_lwp.
10196
10197 2012-02-02 Pedro Alves <palves@redhat.com>
10198
10199 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10200 inferior.
10201
10202 2012-01-27 Pedro Alves <palves@redhat.com>
10203
10204 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10205 (elf_64_file_p): Make static.
10206 (linux_pid_exe_is_elf_64_file): New.
10207 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10208 Delete declarations.
10209 (linux_pid_exe_is_elf_64_file): Declare.
10210 * linux-x86-low.c (x86_arch_setup): Use
10211 linux_pid_exe_is_elf_64_file.
10212
10213 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10214
10215 * linux-low.c (linux_wait_for_event_1): Rename to ...
10216 (linux_wait_for_event): ... here and merge it with former
10217 linux_wait_for_event - new variable wait_ptid, use it.
10218 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10219
10220 2012-01-23 Pedro Alves <palves@redhat.com>
10221
10222 * server.c (main): Avoid yet another case of infinite loop while
10223 detaching/killing after a longjmp.
10224
10225 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10226
10227 Code cleanup.
10228 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10229
10230 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10231
10232 * hostio.c (handle_readlink): New function.
10233 (handle_vFile): Call it to handle "vFile:readlink" packets.
10234
10235 2012-01-20 Pedro Alves <palves@redhat.com>
10236 Ulrich Weigand <ulrich.weigand@linaro.org>
10237
10238 * server.c (handle_v_requests): Only support vAttach and vRun to
10239 start multiple processes when in extended protocol mode.
10240
10241 2012-01-17 Pedro Alves <palves@redhat.com>
10242
10243 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10244 memalign plus mprotect to allocate the scratch buffer.
10245
10246 2012-01-13 Pedro Alves <palves@redhat.com>
10247
10248 * server.c (attach_inferior): Clear `cont_thread'.
10249
10250 2012-01-13 Pedro Alves <palves@redhat.com>
10251
10252 * server.c (main): Avoid infinite loop while detaching/killing
10253 after a longjmp.
10254
10255 2012-01-09 Doug Evans <dje@google.com>
10256
10257 * server.c (start_inferior): Set last_ptid in --wrapper case.
10258
10259 2012-01-06 Yao Qi <yao@codesourcery.com>
10260
10261 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10262 defined.
10263 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10264
10265 2012-01-04 Yao Qi <yao@codesourcery.com>
10266
10267 * tracepoint.c (cmd_qtdp): Print debug message
10268 for static tracepoint.
10269
10270 2012-01-04 Yao Qi <yao@codesourcery.com>
10271
10272 * tracepoint.c (trace_vdebug): Differentiate debug message
10273 between gdbserver and IPA.
10274
10275 2012-01-03 Yao Qi <yao@codesourcery.com>
10276
10277 * tracepoint.c (tracepoint_was_hit): Don't collect for
10278 static tracepoint.
10279
10280 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10281
10282 * terminal.h: Reformat copyright header.
10283
10284 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10285
10286 * server.c (gdbserver_version): Update copyright year.
10287 * gdbreplay.c (gdbreplay_version): Likewise.
10288
10289 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10290
10291 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10292
10293 Revert:
10294 2011-12-18 Hui Zhu <teawater@gmail.com>
10295 * linux-low.c (linux_create_inferior): Save return value to ret.
10296
10297 2011-12-18 Hui Zhu <teawater@gmail.com>
10298
10299 * linux-low.c (linux_create_inferior): Save return value to ret.
10300
10301 2011-12-16 Doug Evans <dje@google.com>
10302
10303 * linux-low.c (linux_create_inferior): If stdio connection,
10304 redirect stdin from /dev/null, stdout to stderr.
10305 * remote-utils.c (remote_is_stdio): New static global.
10306 (remote_connection_is_stdio): New function.
10307 (remote_prepare): Handle stdio connection.
10308 (remote_open): Ditto.
10309 (remote_close): Don't close stdin for stdio connections.
10310 (read_prim,write_prim): New functions. Replace all calls to
10311 read/write to these.
10312 * server.c (main): Watch for "-" argument. Move call to
10313 remote_prepare before start_inferior.
10314 * server.h (STDIO_CONNECTION_NAME): New macro.
10315 (remote_connection_is_stdio): Declare.
10316
10317 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10318 in debugging output.
10319
10320 2011-12-15 Yao Qi <yao@codesourcery.com>
10321
10322 * tracepoint.c: Include sys/syscall.h.
10323 (gdb_ust_thread): Remove preprocessor conditional.
10324
10325 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10326
10327 * linux-low.c (linux_detach_one_lwp): Call
10328 the_low_target.prepare_to_resume before detaching.
10329
10330 2011-12-14 Yao Qi <yao@codesourcery.com>
10331
10332 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10333 of write.
10334
10335 2011-12-14 Yao Qi <yao@codesourcery.com>
10336
10337 * i386-low.c (i386_low_stopped_data_address): Initialize local
10338 variable `control'.
10339
10340 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10341
10342 PR remote/13492
10343
10344 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10345 DR_CONTROL unless necessary. Extend comments.
10346 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10347 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10348
10349 2011-12-13 Yao Qi <yao@codesourcery.com>
10350
10351 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10352 macros.
10353 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10354
10355 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10356
10357 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10358 Print new debug message for such case.
10359
10360 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10361
10362 Fix overlapping memcpy.
10363 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10364 the read_inferior_memory transfer.
10365 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10366 write_inferior_memory transfer.
10367 (set_fast_tracepoint_jump): New variable buf. Use it for the
10368 read_inferior_memory and write_inferior_memory transfers.
10369 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10370 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10371 Use it for the write_inferior_memory transfer.
10372 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10373 buffers.
10374
10375 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10376
10377 * linux-low.c (fetch_register, store_register): Make code
10378 consistent, fix formatting.
10379
10380 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10381
10382 * linux-low.c (usr_store_inferior_registers): Factor out code
10383 to handle individual registers into...
10384 (store_register): ... this new function.
10385
10386 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10387
10388 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10389 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10390 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10391 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10392 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10393 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10394 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10395 (srv_xmlfiles): Add new XML files.
10396
10397 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10398 and <sys/uio.h>.
10399 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10400 (init_registers_s390_linux32v1): Add prototype.
10401 (init_registers_s390_linux32v2): Likewise.
10402 (init_registers_s390_linux64v1): Likewise.
10403 (init_registers_s390_linux64v2): Likewise.
10404 (init_registers_s390x_linux64v1): Likewise.
10405 (init_registers_s390x_linux64v2): Likewise.
10406 (s390_num_regs): Increment to 52.
10407 (s390_regmap): Add orig_r2 register.
10408 (s390_num_regs_3264): Increment to 68.
10409 (s390_regmap_3264): Add orig_r2 register.
10410 (s390_collect_ptrace_register): Handle orig_r2 register.
10411 (s390_supply_ptrace_register): Likewise.
10412 (s390_fill_last_break): New function.
10413 (s390_store_last_break): Likewise.
10414 (s390_fill_system_call): New function.
10415 (s390_store_system_call): Likewise.
10416 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10417 register sets.
10418 (s390_check_regset): New function.
10419 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10420 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10421 Update target_regsets for available register sets.
10422
10423 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10424 Jan Kratochvil <jan.kratochvil@redhat.com>
10425
10426 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10427 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10428 New.
10429 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10430 * linux-low.h (struct process_info_private): New member r_debug.
10431 * server.c (handle_qxfer_libraries): Call
10432 the_target->qxfer_libraries_svr4.
10433 (handle_qxfer_libraries_svr4): New function.
10434 (qxfer_packets): New entry "libraries-svr4".
10435 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10436 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10437 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10438 PACKET_qXfer_libraries_svr4.
10439
10440 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10441
10442 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10443 PSW address/mask between 8-byte and 16-byte formats.
10444 (s390_supply_ptrace_register): Likewise.
10445 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10446 basic addressing mode bit.
10447
10448 2011-11-24 Stan Shebs <stan@codesourcery.com>
10449
10450 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10451
10452 2011-11-17 Stan Shebs <stan@codesourcery.com>
10453
10454 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10455 (tracing_start_time): New global.
10456 (tracing_stop_time): New global.
10457 (tracing_user_name): New global.
10458 (tracing_notes): New global.
10459 (tracing_stop_note): New global.
10460 (cmd_qtstart): Set traceframe_usage, start_time.
10461 (stop_tracing): Set stop_time.
10462 (cmd_qtstatus): Report additional status.
10463 (cmd_qtp): New function.
10464 (handle_tracepoint_query): Call it.
10465 (cmd_qtnotes): New function.
10466 (handle_tracepoint_general_set): Call it.
10467 (get_timestamp): Rename from tsv_get_timestamp.
10468
10469 2011-11-14 Stan Shebs <stan@codesourcery.com>
10470 Kwok Cheung Yeung <kcy@codesourcery.com>
10471
10472 * linux-x86-low.c (small_jump_insn): New.
10473 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10474 trampoline and error message, build a trampoline and issue a small
10475 jump instruction to it.
10476 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10477 trampoline and error message.
10478 (x86_get_min_fast_tracepoint_insn_len): New.
10479 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10480 * linux-low.h (struct linux_target_ops): Add arguments to
10481 install_fast_tracepoint_jump_pad operation, add new operation.
10482 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10483 arguments.
10484 (linux_get_min_fast_tracepoint_insn_len): New function.
10485 (linux_target_op): Add new operation.
10486 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10487 (gdb_trampoline_buffer_end): Ditto.
10488 (gdb_trampoline_buffer_error): Ditto.
10489 (struct ipa_sym_addresses): Add fields for new IPA variables.
10490 (symbol_list): Add entries for new IPA variables.
10491 (struct tracepoint): Add fields to hold the address range of the
10492 trampoline used by the tracepoint.
10493 (trampoline_buffer_head): New static variable.
10494 (trampoline_buffer_tail): Ditto.
10495 (claim_trampoline_space): New function.
10496 (have_fast_tracepoint_trampoline_buffer): New function.
10497 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10498 structure.
10499 (install_fast_tracepoint): Ditto, also add error buffer argument.
10500 (cmd_qtminftpilen): New function.
10501 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10502 (fast_tracepoint_from_trampoline_address): New function.
10503 (fast_tracepoint_collecting): Handle trampoline as part of jump
10504 pad space.
10505 (set_trampoline_buffer_space): New function.
10506 (initialize_tracepoint): Initialize new IPA variables.
10507 * target.h (struct target_ops): Add arguments to
10508 install_fast_tracepoint_jump_pad operation, add new
10509 get_min_fast_tracepoint_insn_len operation.
10510 (target_get_min_fast_tracepoint_insn_len): New.
10511 (install_fast_tracepoint_jump_pad): Add arguments.
10512 * server.h (IPA_BUFSIZ): Define.
10513 * linux-i386-ipa.c: Include extra header files.
10514 (initialize_fast_tracepoint_trampoline_buffer): New function.
10515 (initialize_low_tracepoint): Call it.
10516 * server.h (set_trampoline_buffer_space): Declare.
10517 (claim_trampoline_space): Ditto.
10518 (have_fast_tracepoint_trampoline_buffer): Ditto.
10519
10520 2011-11-14 Yao Qi <yao@codesourcery.com>
10521
10522 * server.c (handle_query): Handle InstallInTrace for qSupported.
10523 * tracepoint.c (add_tracepoint): Sort list.
10524 (install_tracepoint, download_tracepoint): New.
10525 (cmd_qtdp): Call them to install and download tracepoints.
10526 (sort_tracepoints): Removed.
10527 (cmd_qtstart): Update.
10528
10529 2011-11-14 Yao Qi <yao@codesourcery.com>
10530
10531 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10532 * mem-break.h: Declare.
10533 * tracepoint.c (cmd_qtstart): Move some code to ...
10534 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10535 New.
10536 (download_tracepoints): Move some code to ...
10537 (download_tracepoint_1): ... here. New.
10538
10539 2011-11-08 Yao Qi <yao@codesourcery.com>
10540
10541 * remote-utils.c (relocate_instruction): A comment fix.
10542
10543 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10544
10545 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10546 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10547 dr_status_mirror and dr_control_mirror from debug_reg_state.
10548 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10549 (i386_initial_stuff): Remove use of deleted globals.
10550 (i386_get_thread_context, i386_set_thread_context,
10551 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10552 from debug_reg_state.
10553
10554 2011-11-05 Yao Qi <yao@codesourcery.com>
10555
10556 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10557 address as TPOINT's.
10558
10559 2011-11-02 Stan Shebs <stan@codesourcery.com>
10560
10561 * tracepoint.c (agent_mem_read_string): New function.
10562 (eval_agent_expr): Call it for tracenz.
10563 * server.c (handle_query): Report support for tracenz.
10564
10565 2011-11-02 Yao Qi <yao@codesourcery.com>
10566
10567 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10568
10569 2011-11-02 Yao Qi <yao@codesourcery.com>
10570
10571 * target.h: Fix a typo in comment.
10572
10573 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10574
10575 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10576 clobber the breakpoints' shadows with fast tracepoint jumps.
10577 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10578 * target.c (write_inferior_memory): Also pass MYADDR down to
10579 check_mem_write.
10580
10581 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10582
10583 * configure.ac: Check support for personality routine.
10584 * configure: Regenerate.
10585 * config.in: Likewise.
10586 * linux-low.c: Include <sys/personality.h>.
10587 Define ADDR_NO_RANDOMIZE if necessary.
10588 (linux_create_inferior): Disable address space randomization when
10589 forking inferior, if requested.
10590 (linux_supports_disable_randomization): New function.
10591 (linux_target_ops): Install it.
10592 * server.h (disable_randomization): Declare.
10593 * server.c (disable_randomization): New global variable.
10594 (handle_general_set): Handle QDisableRandomization.
10595 (handle_query): Likewise for qSupported.
10596 (main): Support --disable-randomization and --no-disable-randomization
10597 command line arguments.
10598 * target.h (struct target_ops): Add supports_disable_randomization.
10599 (target_supports_disable_randomization): New macro.
10600
10601 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10602
10603 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10604 ifdef check.
10605 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10606 [!PT_GETDSBT] (target_loadmap): New definition.
10607 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10608 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10609 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10610 and PT_GETDSBT to LINUX_LOADMAP.
10611 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10612 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10613
10614 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10615
10616 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10617 (arm_linux_hwbp_cap): New static variable.
10618 (arm_linux_get_hwbp_cap): Replace by ...
10619 (arm_linux_init_hwbp_cap): ... this new function.
10620 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10621 (arm_linux_get_hw_watchpoint_count): Likewise.
10622 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10623 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10624 (arm_prepare_to_resume): Use perror_with_name instead of error.
10625
10626 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10627
10628 * linux-arm-low.c: Include <signal.h>.
10629 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10630 (struct arm_linux_hwbp_cap): New data type.
10631 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10632 (struct arm_linux_hw_breakpoint): New data type.
10633 (MAX_BPTS, MAX_WPTS): Define.
10634 (struct arch_process_info, struct arch_lwp_info): New data types.
10635 (arm_linux_get_hwbp_cap): New function.
10636 (arm_linux_get_hw_breakpoint_count): Likewise.
10637 (arm_linux_get_hw_watchpoint_count): Likewise.
10638 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10639 (arm_hwbp_control_initialize): Likewise.
10640 (arm_hwbp_control_is_enabled): Likewise.
10641 (arm_hwbp_control_is_initialized): Likewise.
10642 (arm_hwbp_control_disable): Likewise.
10643 (arm_linux_hw_breakpoint_equal): Likewise.
10644 (arm_linux_hw_point_initialize): Likewise.
10645 (struct update_registers_data): New data structure.
10646 (update_registers_callback: New function.
10647 (arm_insert_point): Likewise.
10648 (arm_remove_point): Likewise.
10649 (arm_stopped_by_watchpoint): Likewise.
10650 (arm_stopped_data_address): Likewise.
10651 (arm_new_process): Likewise.
10652 (arm_new_thread): Likewise.
10653 (arm_prepare_to_resume): Likewise.
10654 (the_low_target): Register arm_insert_point, arm_remove_point,
10655 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10656 arm_new_thread, and arm_prepare_to_resume.
10657
10658 2011-09-15 Stan Shebs <stan@codesourcery.com>
10659
10660 * server.h (struct emit_ops): Add compare-goto fields.
10661 * tracepoint.c (gdb_agent_op_sizes): New table.
10662 (emit_eq_goto): New function.
10663 (emit_ne_goto): New function.
10664 (emit_lt_goto): New function.
10665 (emit_le_goto): New function.
10666 (emit_gt_goto): New function.
10667 (emit_ge_goto): New function.
10668 (is_goto_target): New function.
10669 (compile_bytecodes): Recognize special cases of compare-goto
10670 combinations and call specialized emitters for them.
10671 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10672 (amd64_emit_ne_goto): New function.
10673 (amd64_emit_lt_goto): New function.
10674 (amd64_emit_le_goto): New function.
10675 (amd64_emit_gt_goto): New function.
10676 (amd64_emit_ge_goto): New function.
10677 (amd64_emit_ops): Add the new functions.
10678 (i386_emit_eq_goto): New function.
10679 (i386_emit_ne_goto): New function.
10680 (i386_emit_lt_goto): New function.
10681 (i386_emit_le_goto): New function.
10682 (i386_emit_gt_goto): New function.
10683 (i386_emit_ge_goto): New function.
10684 (i386_emit_ops): Add the new functions.
10685
10686 2011-09-08 Stan Shebs <stan@codesourcery.com>
10687
10688 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10689 (i386_emit_epilogue): Restore %ebx.
10690
10691 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10692
10693 * server.c (step_thread): Remove definition.
10694 (process_serial_event): Don't handle Hs.
10695 * server.h (step_thread): Remove declaration.
10696 * target.c (set_desired_inferior): Remove use of step_thread.
10697
10698 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10699
10700 * linux-low.c: Include linux-procfs.h.
10701 (linux_attach_lwp_1): Update comments.
10702 (linux_attach): Scan for existing threads when attaching to a
10703 process that is the tgid.
10704 * Makefile.in: Update dependencies.
10705
10706 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10707
10708 * configure.srv: Add linux-procfs.o dependencies.
10709
10710 2011-08-14 Yao Qi <yao@codesourcery.com>
10711
10712 * target.h (struct target_ops): Fix indent.
10713 * win32-low.c (win32_target_ops): Fix comment.
10714
10715 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10716 Yao Qi <yao@codesourcery.com>
10717
10718 * Makefile.in (clean): Remove tic6x-*.c files.
10719 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10720 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10721 (tic6x-c64xp-linux.c): Likewise.
10722 * configure.srv: Add support for tic6x-*-uclinux.
10723 * linux-tic6x-low.c: New.
10724 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10725
10726 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10727 Yao Qi <yao@codesourcery.com>
10728
10729 * target.h (struct target_ops): Add read_loadmap.
10730 * linux-low.c (struct target_loadseg): New type.
10731 (struct target_loadmap): New type.
10732 (linux_read_loadmap): New function.
10733 (linux_target_ops): Add linux_read_loadmap.
10734 * server.c (handle_query): Support qXfer:fdpic:read packet.
10735 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10736 to NULL.
10737
10738 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10739
10740 * win32-low.c: Include <stdint.h>.
10741
10742 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10743
10744 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10745 to the inferior here.
10746 (i386_remove_aligned_watchpoint): Ditto.
10747 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10748 fit part of the watchpoint in the debug registers.
10749 (i386_update_inferior_debug_regs): New.
10750 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10751 registers, and only update the inferior on success.
10752 (i386_low_remove_watchpoint): Ditto.
10753
10754 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10755
10756 * linux-low.c (compare_ints, unique, list_threads, show_process,
10757 linux_core_of_thread): Delete.
10758 (linux_target_ops): Change linux_core_of_thread to
10759 linux_common_core_of_thread.
10760 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10761 * utils.c (malloc_failure): Change type of argument.
10762 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10763 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10764 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10765 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10766 (IPA_OBJS): Add common-utils-ipa.o.
10767 (ptid_h, linux_osdata_h): New macros.
10768 (server_h): Add common/common-utils.h, common/xml-utils.h,
10769 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10770 common/ptid.h.
10771 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10772 ptid.o, buffer.o): New rules.
10773 (linux-low.o): Add common/linux-osdata.h as a dependency.
10774 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10775 * configure.ac: Add AC_HEADER_DIRENT check.
10776 * config.in: Regenerate.
10777 * configure: Regenerate.
10778 * remote-utils.c (xml_escape_text): Delete.
10779 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10780 buffer_xml_printf): Move to common/buffer.c.
10781 * server.c (main): Remove call to initialize_inferiors.
10782 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10783 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10784 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10785 internal_error, gdb_assert, gdb_assert_fail): Delete.
10786 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10787 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10788 common/buffer.h.
10789 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10790 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10791 initialize_inferiors): Delete.
10792
10793 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10794
10795 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10796 symbol error.
10797
10798 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10799
10800 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10801 assertion.
10802 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10803
10804 2011-05-26 Yao Qi <yao@codesourcery.com>
10805
10806 * Makefile.in (thread-db.o): Track dependence to
10807 common/gdb_thread_db.h.
10808 * thread-db.c: include gdb_thread_db.h from right place.
10809
10810 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10811
10812 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10813 __FILE__ and __LINE__ to internal_error.
10814
10815 2011-05-13 Doug Evans <dje@google.com>
10816
10817 * thread-db.c (try_thread_db_load_from_sdir): New function.
10818 (try_thread_db_load_from_dir): New function.
10819 (thread_db_load_search): Handle $sdir, ignore $pdir.
10820 Remove trying of system directories if search of
10821 libthread-db-search-path fails, that is now done via $sdir.
10822
10823 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10824
10825 * server.c (handle_query): Add EnableDisableTracepoints to the list
10826 of supported features.
10827 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10828 tracepoints.
10829 (cmd_qtenable_disable): New.
10830 (cmd_qtstart): Install tracepoints even if disabled.
10831 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10832 receiving a QTEnable or QTDisable packet.
10833 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10834 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10835 tracepoints.
10836 (gdb_probe): Skip data collection if static tracepoint is disabled.
10837
10838 2011-05-10 Doug Evans <dje@google.com>
10839
10840 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10841
10842 2011-05-04 Doug Evans <dje@google.com>
10843
10844 * linux-low.c (linux_join): Skip process lookup.
10845 * spu-low.c (spu_join): Ditto.
10846 * server.c (join_inferiors_callback): Delete.
10847 (process_serial_event): For 'D' packet (detach) call join_inferior
10848 directly.
10849
10850 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10851
10852 * README: Don't mention xscale*-*-linux*.
10853 * configure.srv (xscale*-*-linux*): Don't handle target.
10854
10855 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10856
10857 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10858 casting pointers.
10859 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10860 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10861 (i386_emit_void_call_2): Likewise.
10862
10863 2011-04-26 Yao Qi <yao@codesourcery.com>
10864
10865 * linux-low.c: Move common macros to linux-ptrace.h.
10866 Include linux-ptrace.h.
10867 * Makefile.in (linux_ptrace_h): New.
10868 (linux-low.o): Depends on linux-ptrace.h.
10869
10870 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10871
10872 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10873 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10874 (remote_prepare): New function with most of the TCP code from ...
10875 (remote_open): ... here. Detect PORT here unconditionally. Move also
10876 setting transport_is_reliable.
10877 * server.c (run_once): New variable.
10878 (gdbserver_usage): Document it.
10879 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10880 the first run if RUN_ONCE.
10881 * server.h (run_once, remote_prepare): New declarations.
10882
10883 2011-04-19 Tom Tromey <tromey@redhat.com>
10884
10885 * win32-low.c (handle_load_dll): Remove duplicate "the".
10886
10887 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10888
10889 Remove support for old Cygwin 1.5 versions.
10890 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10891 function to avoid warning.
10892 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10893 warning.
10894
10895 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10896
10897 * gdbserver/server.h (Macro _): Define it if not available.
10898
10899 2011-03-14 Michael Snyder <msnyder@vmware.com>
10900
10901 * hostio.c (handle_close): Remove unnecessary null test.
10902
10903 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10904
10905 * Makefile.in (maintainer-clean realclean distclean): Remove
10906 "make ... subdir_do" command.
10907
10908 2011-03-10 Michael Snyder <msnyder@vmware.com>
10909
10910 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10911
10912 * server.c (handle_v_run): Free alloced buffer on early return.
10913
10914 2011-03-09 Yao Qi <yao@codesourcery.com>
10915
10916 Revert:
10917 2011-03-04 Yao Qi <yao@codesourcery.com>
10918
10919 * Makefile.in: Remove GNU make feature --directory.
10920
10921 2011-03-05 Yao Qi <yao@codesourcery.com>
10922
10923 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10924 (subdir_do): New make target. Copied from gdb/Makefile.
10925 (maintainer-clean, realclean, distclean, clean): Call corresponding
10926 make targets in common/Makefile.
10927
10928 2011-02-11 Yao Qi <yao@codesourcery.com>
10929
10930 * configure.ac: Call AC_PROG_RANLIB.
10931 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10932 * configure: Regenerate.
10933
10934 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10935
10936 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10937
10938 2011-03-06 Yao Qi <yao@codesourcery.com>
10939
10940 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10941
10942 2011-03-05 Yao Qi <yao@codesourcery.com>
10943
10944 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10945 (subdir_do): New make target. Copied from gdb/Makefile.
10946 (maintainer-clean, realclean, distclean, clean): Call corresponding
10947 make targets in common/Makefile.
10948
10949 2011-03-04 Yao Qi <yao@codesourcery.com>
10950
10951 * Makefile.in: Remove GNU make feature --directory.
10952
10953 2011-03-04 Michael Snyder <msnyder@vmware.com>
10954
10955 * server.c (queue_stop_reply): Call xmalloc not malloc.
10956
10957 2011-03-02 Michael Snyder <msnyder@vmware.com>
10958
10959 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10960
10961 2011-02-28 Michael Snyder <msnyder@vmware.com>
10962
10963 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10964 (cmd_qtframe): Ditto.
10965 (cmd_qtbuffer): Ditto.
10966 (cmd_bigqtbuffer): Ditto.
10967
10968 * utils.c (decimal2str): Initialize 'width' to nine, then
10969 don't mess with it.
10970
10971 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10972
10973 * hostio.c (require_data): Free *data, not data.
10974
10975 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10976
10977 * hostio.c (require_data): Use free, not xfree.
10978
10979 2011-02-27 Michael Snyder <msnyder@vmware.com>
10980
10981 * server.c (handle_query): Discard unused value.
10982
10983 * hostio.c (require_data): Free malloc memory before returning
10984 error.
10985
10986 2011-02-26 Michael Snyder <msnyder@vmware.com>
10987
10988 * linux-low.c (list_threads): Call closedir for dirent.
10989
10990 2011-02-27 Michael Snyder <msnyder@vmware.com>
10991
10992 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10993 a case statement falls through.
10994
10995 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10996
10997 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10998 in comparison.
10999
11000 2011-02-26 Michael Snyder <msnyder@vmware.com>
11001
11002 * utils.c (decimal2str): Eliminate dead code and dead param.
11003 (pulongest): Drop dead param from call to decimal2str.
11004 (plongest): Ditto.
11005
11006 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11007
11008 Revert the following patch (not approved yet):
11009 2011-02-21 Hui Zhu <teawater@gmail.com>
11010 * tracepoint.c (tp_printf): New function.
11011 (eval_agent_expr): Handle gdb_agent_op_printf.
11012
11013 2011-02-21 Hui Zhu <teawater@gmail.com>
11014
11015 * tracepoint.c (tp_printf): New function.
11016 (eval_agent_expr): Handle gdb_agent_op_printf.
11017
11018 2011-02-18 Tom Tromey <tromey@redhat.com>
11019
11020 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11021 (tracepoint.o): Likewise.
11022 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11023 (gdb_agent_op_names): Likewise.
11024
11025 2011-02-18 Tom Tromey <tromey@redhat.com>
11026
11027 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11028 gdb_agent_op_rot>: New constants.
11029 (gdb_agent_op_names): Add pick and roll.
11030 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11031 cases.
11032
11033 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11034
11035 * aclocal.m4: Regenerated with aclocal-1.11.1.
11036
11037 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11038
11039 * server.c (handle_qxfer_traceframe_info): New.
11040 (qxfer_packets): Register "traceframe-info".
11041 (handle_query): Report support for qXfer:traceframe-info:read+.
11042 * tracepoint.c (match_blocktype): New.
11043 (traceframe_find_block_type): Rename to ...
11044 (traceframe_walk_blocks): ... this. Add callback filter argument,
11045 and use it.
11046 (traceframe_find_block_type): New, reimplemented on top of
11047 traceframe_walk_blocks.
11048 (build_traceframe_info_xml): New.
11049 (traceframe_read_info): New.
11050 * server.h (traceframe_read_info): Declare.
11051
11052 2011-02-11 Yao Qi <yao@codesourcery.com>
11053
11054 * configure.ac: Call AC_PROG_RANLIB.
11055 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11056 * configure: Regenerate.
11057
11058 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11059
11060 * server.c (gdb_read_memory): Change return semantics to allow
11061 partial transfers.
11062 (handle_search_memory_1): Adjust.
11063 (process_serial_event) <'m' packet>: Handle partial transfers.
11064 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11065
11066 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11067
11068 * regcache.c (init_register_cache): Initialize
11069 regcache->register_status.
11070 (free_register_cache): Release regcache->register_status.
11071 (regcache_cpy): Copy register_status.
11072 (registers_to_string): Print 'x's for unavailable registers.
11073 (supply_register): Mark the register's status valid or
11074 unavailable, depending on whether a buffer was passed in or not.
11075 (supply_register_zeroed): New.
11076 (supply_regblock): Mark the registers' status valid or
11077 unavailable, depending on whether a buffer was passed in or not.
11078 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11079 (struct regcache): New `register_status' field.
11080 (supply_register_zeroed): Declare.
11081 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11082 supply_register_zeroed, rather than passing a NULL buffer to
11083 supply_register.
11084 * tracepoint.c (fetch_traceframe_registers): Update comment.
11085
11086 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11087
11088 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11089 buffer explicit.
11090
11091 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11092
11093 * server.h (decode_xfer_write): Change prototype.
11094 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11095 and don't extract the annex here.
11096 * server.c (decode_xfer_read): Remove `annex' parameter,
11097 and don't extract the annex here.
11098 (decode_xfer): New.
11099 (struct qxfer): New.
11100 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11101 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11102 (handle_qxfer_statictrace): New functions, abstracted out from
11103 handle_query, and made to use the struct qxfer interface.
11104 (handle_threads_qxfer_proper): Rename to ...
11105 (handle_qxfer_threads_proper): ... this.
11106 (handle_threads_qxfer): Rename to ...
11107 (handle_qxfer_threads): ... this. Adjust.
11108 (qxfer_packets): New array.
11109 (handle_qxfer): New function.
11110 (handle_query): Use handle_qxfer.
11111
11112 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11113
11114 * gdbreplay.c: Shorten lines of >= 80 columns.
11115 * linux-low.c: Ditto.
11116 * linux-ppc-low.c: Ditto.
11117 * linux-s390-low.c: Ditto.
11118 * linux-sparc-low.c: Ditto.
11119 * linux-x86-low.c: Ditto.
11120 * linux-xtensa-low.c: Ditto.
11121 * mem-break.c: Ditto.
11122 * nto-low.c: Ditto.
11123 * regcache.h: Ditto.
11124 * remote-utils.c: Ditto.
11125 * server.c: Ditto.
11126 * server.h: Ditto.
11127 * thread-db.c: Ditto.
11128 * tracepoint.c: Ditto.
11129 * utils.c: Ditto.
11130 * win32-low.h: Ditto.
11131
11132 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11133
11134 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11135 update.
11136
11137 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11138
11139 * server.c (gdbserver_version): Update copyright year in version
11140 output.
11141 * gdbreplay.c (gdbreplay_version): Ditto.
11142
11143 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11144
11145 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11146 * linux-bfin-low.c: New file.
11147 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11148 PT_DATA_ADDR for BFIN targets.
11149 * Makefile.in (SFILES): Add linux-bfin-low.c.
11150 (clean): Remove reg-bfin.c.
11151 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11152 * README: Mention supported Blackfin targets.
11153
11154 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11155
11156 * .gitignore: New file.
11157
11158 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11159
11160 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11161
11162 2010-10-22 Jie Zhang <jie@codesourcery.com>
11163
11164 * Makefile.in: Add FLAGS_TO_PASS variable.
11165 (install): Remove dependency of install-only and recursively
11166 invoke make for install-only.
11167
11168 2010-10-04 Doug Evans <dje@google.com>
11169
11170 * Makefile.in (uninstall): Use $(DESTDIR).
11171
11172 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11173
11174 PR gdb/11842
11175
11176 * linux-x86-low.c (compat_siginfo_from_siginfo)
11177 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11178 si_code is < 0. Check for si_code == SI_TIMER before checking for
11179 si_code < 0.
11180
11181 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11182
11183 * lynx-i386-low.c: New file.
11184 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11185
11186 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11187
11188 * lynx-low.c (ptrace_request_to_str): Remove handling for
11189 request values that have been removed in LynxOS 5.x.
11190
11191 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11192
11193 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11194 <ptrace.h>
11195
11196 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11197
11198 * configure.ac: Add --enable-inprocess-agent option.
11199 * configure: Rebuilt.
11200
11201 2010-09-06 Yao Qi <yao@codesourcery.com>
11202
11203 * linux-low.c (linux_kill): Remove unused variable.
11204 (linux_stabilize_threads): Likewise.
11205 * server.c (start_inferior): Likewise.
11206 (queue_stop_reply_callback): Likewise.
11207 * tracepoint.c (do_action_at_tracepoint): Likewise.
11208
11209 2010-09-06 Yao Qi <yao@codesourcery.com>
11210
11211 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11212 on return.
11213
11214 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11215
11216 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11217
11218 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11219
11220 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11221 "$(IPA_DEPFILES)".
11222
11223 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11224
11225 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11226 gdbserver/lynx-ppc-low.c: New files.
11227 * Makefile.in (lynx_low_h): New variable.
11228 (lynx-low.o, lynx-ppc-low.o): New rules.
11229 * configure.ac: On LynxOS, link with -lnetinet.
11230 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11231 * configure: regenerate.
11232
11233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11234
11235 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11236 * configure.ac: Add check for vasprintf and vsnprintf.
11237 * configure, config.in: Regenerate.
11238 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11239
11240 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11241
11242 * gdbreplay.c: Move include of alloca.h up, next to include of
11243 malloc.h.
11244 * server.h: Add include of malloc.h.
11245 * mem-break.c: Remove include of malloc.h.
11246 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11247
11248 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11249
11250 * Makefile.in (memmem.o): Build with -Wno-error.
11251
11252 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11253
11254 * utils.c (xsnprintf): Make non-static.
11255 * server.h: Add xsnprintf declaration.
11256 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11257 replace calls to snprintf by calls to xsnprintf throughout.
11258
11259 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11260
11261 * configure.ac: Add configure check for alloca.
11262 * configure, config.in: Regenerate.
11263 * server.h: Include alloca.h if it exists.
11264 * gdbreplay.c: Include alloca.h if it exists.
11265
11266 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11267
11268 * linux-low.c (__SIGRTMIN): Define if not already defined.
11269 (linux_create_inferior): Check for __ANDROID__ rather than
11270 __SIGRTMIN.
11271 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11272 are already deferred.
11273 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11274 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11275 stopped and already has a pending signal to report.
11276 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11277 a pending signal to report or is moving out of a jump pad.
11278 (linux_init_signals): Check for __ANDROID__ rather than
11279 __SIGRTMIN.
11280
11281 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11282
11283 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11284 debug_threads check. Avoid a linear search when not doing debug
11285 output.
11286
11287 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11288
11289 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11290 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11291 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11292 (process_event): Change local fd's type to gdb_fildes_t.
11293 (create_file_handler): Adjust prototype.
11294 (delete_file_handler): Adjust prototype.
11295 (handle_file_event): Adjust prototype. Use pfildes.
11296 (create_file_event): Adjsut prototype.
11297 * remote-utils.c (remote_desc, listen_desc): Change type to
11298 gdb_fildes_t.
11299 * server.h: New gdb_fildes_t typedef.
11300 [USE_WIN32API]: Include winsock2.h.
11301 (delete_file_handler, add_file_handler): Adjust prototypes.
11302 (pfildes): Declare.
11303 * utils.c (pfildes): New.
11304
11305 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11306
11307 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11308 * configure: Regenerate.
11309
11310 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11311
11312 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11313 (linux_done_accessing_memory): ... this.
11314 (linux_target_ops): Adjust.
11315 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11316 * nto-low.c (nto_target_ops): Adjust comment.
11317 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11318 * spu-low.c (spu_target_ops): Adjust comment.
11319 * target.h (target_ops): Rename unprepare_to_access_memory field
11320 to done_accessing_memory.
11321 (unprepare_to_access_memory): Rename to ...
11322 (done_accessing_memory): ... this.
11323
11324 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11325
11326 * linux-low.c (linux_prepare_to_access_memory): New.
11327 (linux_unprepare_to_access_memory): New.
11328 (linux_target_ops): Install them.
11329 * server.c (read_memory): Rename to ...
11330 (gdb_read_memory): ... this. Use
11331 prepare_to_access_memory/prepare_to_access_memory.
11332 (write_memory): Rename to ...
11333 (gdb_write_memory): ... this. Use
11334 prepare_to_access_memory/prepare_to_access_memory.
11335 (handle_search_memory_1): Adjust.
11336 (process_serial_event): Adjust.
11337 * target.h (struct target_ops): New fields
11338 prepare_to_access_memory and unprepare_to_access_memory.
11339 (prepare_to_access_memory, unprepare_to_access_memory): New.
11340 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11341 prepare_to_access_memory/prepare_to_access_memory.
11342 * nto-low.c (nto_target_ops): Adjust.
11343 * spu-low.c (spu_target_ops): Adjust.
11344 * win32-low.c (win32_target_ops): Adjust.
11345
11346 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11347
11348 * Makefile.in (WARN_CFLAGS): Get it from configure.
11349 (WERROR_CFLAGS): New.
11350 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11351 * configure.ac: Introduce --enable-werror, which adds -Werror to
11352 the compiler command line. Enabled by default. Disable with
11353 --disable-werror. Add -Wdeclaration-after-statement
11354 Wpointer-arith and -Wformat-nonliteral to warning flags.
11355 * configure: Regenerate.
11356
11357 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11358
11359 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11360
11361 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11362
11363 * gdbreplay.c (remote_error): New.
11364 (gdbchar): New.
11365 (expect): Use gdbchar. Check for error reading from GDB.
11366 Clarify sync error output.
11367 (play): Check for errors writing to GDB.
11368 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11369 * remote-utils.c (getpkt): Check for errors writing to the remote
11370 descriptor.
11371
11372 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11373
11374 * linux-low.c (linux_wait_1): Move non-debugging code out of
11375 `debug_threads' control.
11376
11377 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11378
11379 * linux-low.c (linux_wait_1): Don't set last_status here.
11380 * server.c (push_event, queue_stop_reply_callback): Assert we're
11381 not pushing a TARGET_WAITKIND_IGNORE event.
11382 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11383 (myresume, handle_target_event): Set the thread's last_resume_kind
11384 and last_status from the target returned status.
11385
11386 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11387
11388 PR threads/10729
11389
11390 * linux-x86-low.c (update_debug_registers_callback): New.
11391 (i386_dr_low_set_addr): Use it.
11392 (i386_dr_low_get_addr): New.
11393 (i386_dr_low_set_control): Use update_debug_registers_callback.
11394 (i386_dr_low_get_control): New.
11395 (i386_dr_low_get_status): Adjust.
11396 * linux-low.c (linux_stop_lwp): New.
11397 * linux-low.h (linux_stop_lwp): Declare.
11398
11399 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11400 argument instead of a i386_debug_reg_state.
11401 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11402 a i386_debug_reg_state.
11403 (i386_insert_aligned_watchpoint): Adjust.
11404 (i386_remove_aligned_watchpoint): Adjust.
11405 (i386_low_stopped_data_address): Read the debug registers from the
11406 inferior instead of from the mirrors.
11407 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11408 (i386_dr_low_get_addr): Declare.
11409 (i386_dr_low_get_control): Declare.
11410 (i386_dr_low_get_status): Change prototype.
11411
11412 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11413 (i386_dr_low_get_addr): New.
11414 (i386_dr_low_get_control): New.
11415 (i386_dr_low_get_status): Adjust prototype. Return
11416 dr_status_mirror.
11417 (i386_initial_stuff): Clear dr_status_mirror and
11418 dr_control_mirror.
11419 (i386_get_thread_context): Adjust.
11420 (i386_set_thread_context): Adjust.
11421 (i386_thread_added): Adjust.
11422
11423 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11424
11425 * linux-low.h (linux_thread_area): Delete declaration.
11426
11427 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11428
11429 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11430 after its termination.
11431
11432 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11433
11434 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11435 (gdb_wants_all_stopped): Delete.
11436 (linux_wait_1): Don't call them.
11437 * server.c (handle_v_cont): Tag all threads as want-stopped.
11438 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11439 stopped as "client-wants-stopped".
11440
11441 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11442
11443 * Makefile.in (signals_h): New.
11444 (server_h): Depend on it.
11445 (server.o): Don't depend on $(signals_def).
11446 (signals.o): Depend on $(signals_def).
11447
11448 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11449
11450 * Makefile.in (signals_def): New.
11451 (server_h): Append include/gdb/signals.h and signals_def.
11452 (server.o): Append signals_def.
11453
11454 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11455
11456 * server.c (handle_target_event): Use target_signal_to_host for
11457 resume_info.sig initialization.
11458 * target.h (struct thread_resume) <sig>: New comment.
11459
11460 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11461
11462 * server.c (handle_query): strcpy() the returned string from paddress()
11463 instead of sprintf().
11464 * utils.c (paddress): Return phex_nz().
11465
11466 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11467
11468 * server.c (handle_v_cont): Call mourn_inferior if process
11469 just exited.
11470 (myresume): Likewise.
11471
11472 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11473
11474 Static tracepoints, and integration with UST.
11475
11476 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11477 * mem-break.c (uninsert_all_breakpoints)
11478 (reinsert_all_breakpoints): New.
11479 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11480 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11481 (gdb_agent_ust_loaded, helper_thread_id)
11482 (gdb_agent_helper_thread_id): New macros.
11483 (struct ipa_sym_addresses): Add addr_ust_loaded,
11484 addr_helper_thread_id, addr_cmd_buf.
11485 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11486 (in_process_agent_loaded_ust): New.
11487 (write_e_ust_not_loaded): New.
11488 (maybe_write_ipa_ust_not_loaded): New.
11489 (struct collect_static_trace_data_action): New.
11490 (enum tracepoint_type) <static_tracepoint>: New.
11491 (struct tracepoint) <handle>: Mention static tracepoints.
11492 (struct static_tracepoint_ctx): New.
11493 (CMD_BUF_SIZE): New.
11494 (add_tracepoint_action): Handle static tracepoint actions.
11495 (unprobe_marker_at): New.
11496 (clear_installed_tracepoints): Handle static tracepoints.
11497 (cmd_qtdp): Handle static tracepoints.
11498 (probe_marker_at): New.
11499 (cmd_qtstart): Handle static tracepoints.
11500 (response_tracepoint): Handle static tracepoints.
11501 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11502 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11503 (get_context_regcache): Handle static tracepoints.
11504 (do_action_at_tracepoint): Handle static tracepoint actions.
11505 (traceframe_find_block_type): Handle static trace data blocks.
11506 (traceframe_read_sdata): New.
11507 (download_tracepoints): Download static tracepoint actions.
11508 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11509 (GDB_PROBE_NAME): New.
11510 (ust_ops): New.
11511 (GET_UST_SYM): New.
11512 (USTF): New.
11513 (dlsym_ust): New.
11514 (ust_marker_to_static_tracepoint): New.
11515 (gdb_probe): New.
11516 (collect_ust_data_at_tracepoint): New.
11517 (gdb_ust_probe): New.
11518 (UNIX_PATH_MAX, SOCK_DIR): New.
11519 (gdb_ust_connect_sync_socket): New.
11520 (resume_thread, stop_thread): New.
11521 (run_inferior_command): New.
11522 (init_named_socket): New.
11523 (gdb_ust_socket_init): New.
11524 (cstr_to_hexstr): New.
11525 (next_st): New.
11526 (first_marker, next_marker): New.
11527 (response_ust_marker): New.
11528 (cmd_qtfstm, cmd_qtsstm): New.
11529 (unprobe_marker_at, probe_marker_at): New.
11530 (cmd_qtstmat, gdb_ust_thread): New.
11531 (gdb_ust_init): New.
11532 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11533 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11534 (ST_REGENTRY): New.
11535 (x86_64_st_collect_regmap): New.
11536 (X86_64_NUM_ST_COLLECT_GREGS): New.
11537 (AMD64_RIP_REGNUM): New.
11538 (supply_static_tracepoint_registers): New.
11539 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11540 (ST_REGENTRY): New.
11541 (i386_st_collect_regmap): New.
11542 (i386_NUM_ST_COLLECT_GREGS): New.
11543 (supply_static_tracepoint_registers): New.
11544 * server.c (handle_query): Handle qXfer:statictrace:read.
11545 <qSupported>: Report support for StaticTracepoints, and
11546 qXfer:statictrace:read features.
11547 * server.h (traceframe_read_sdata)
11548 (supply_static_tracepoint_registers): Declare.
11549 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11550 (unpack_varlen_hex): Include in IPA build.
11551 * Makefile.in (ustlibs, ustinc): New.
11552 (IPA_OBJS): Add remote-utils-ipa.o.
11553 ($(IPA_LIB)): Link -ldl and -lpthread.
11554 (UST_CFLAGS): New.
11555 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11556 * config.in, configure: Regenerate.
11557
11558 2010-06-20 Ian Lance Taylor <iant@google.com>
11559 Pedro Alves <pedro@codesourcery.com>
11560
11561 * linux-x86-low.c (always_true): Delete.
11562 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11563 trying to fool the compiler with always_true.
11564
11565 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11566
11567 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11568 conditions in gdbserver.
11569
11570 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11571
11572 * spu-low.c (spu_read_memory): Wrap around local store limit.
11573 (spu_write_memory): Likewise.
11574
11575 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11576
11577 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11578 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11579 LONGEST uses.
11580 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11581 uses.
11582 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11583 uses with LONGEST uses.
11584
11585 2010-06-14 Stan Shebs <stan@codesourcery.com>
11586 Pedro Alves <pedro@codesourcery.com>
11587
11588 Bytecode compiler.
11589
11590 * linux-x86-low.c: Include limits.h.
11591 (add_insns): New.
11592 (always_true): New.
11593 (EMIT_ASM): New.
11594 (EMIT_ASM32): New.
11595 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11596 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11597 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11598 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11599 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11600 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11601 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11602 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11603 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11604 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11605 (amd64_emit_void_call_2): New.
11606 (amd64_emit_ops): New.
11607 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11608 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11609 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11610 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11611 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11612 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11613 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11614 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11615 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11616 (i386_emit_stack_adjust, i386_emit_int_call_1)
11617 (i386_emit_void_call_2): New.
11618 (i386_emit_ops): New.
11619 (x86_emit_ops): New.
11620 (the_low_target): Install x86_emit_ops.
11621 * server.h (struct emit_ops): New.
11622 (get_raw_reg_func_addr): Declare.
11623 (current_insn_ptr, emit_error): Declare.
11624 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11625 (set_trace_state_variable_value): New defines.
11626 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11627 addr_get_trace_state_variable_value and
11628 addr_set_trace_state_variable_value.
11629 (symbol_list): New fields for get_raw_reg,
11630 get_trace_state_variable_value and set_trace_state_variable_value.
11631 (condfn): New typedef.
11632 (struct tracepoint): New field `compiled_cond'.
11633 (do_action_at_tracepoint): Clear compiled_cond.
11634 (get_trace_state_variable_value, set_trace_state_variable_value):
11635 Export in the IPA.
11636 (condition_true_at_tracepoint): If there's a compiled condition,
11637 run that.
11638 (current_insn_ptr, emit_error): New globals.
11639 (struct bytecode_address): New.
11640 (get_raw_reg_func_addr): New.
11641 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11642 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11643 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11644 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11645 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11646 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11647 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11648 (compile_tracepoint_condition, compile_bytecodes): New.
11649 * target.h (emit_ops): Forward declare.
11650 (struct target_ops): New field emit_ops.
11651 (target_emit_ops): New.
11652 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11653 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11654 * linux-low.c (linux_emit_ops): New.
11655 (linux_target_ops): Install it.
11656 * linux-low.h (struct linux_target_ops): New field emit_ops.
11657
11658 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11659
11660 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11661 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11662
11663 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11664 Stan Shebs <stan@codesourcery.com>
11665
11666 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11667 (all): Depend on $(extra_libraries).
11668 (install-only): Install the IPA.
11669 (IPA_OBJS, IPA_LIB): New.
11670 (clean): Remove the IPA lib.
11671 (IPAGENT_CFLAGS): New.
11672 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11673 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11674 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11675 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11676 * configure.ac: Check for atomic builtins support in the compiler.
11677 (IPA_DEPFILES, extra_libraries): Define.
11678 * configure.srv (ipa_obj): Add description.
11679 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11680 (i[34567]86-*-linux*): Set ipa_obj.
11681 (x86_64-*-linux*): Set ipa_obj.
11682 * linux-low.c (stabilizing_threads): New.
11683 (supports_fast_tracepoints): New.
11684 (linux_detach): Stabilize threads before detaching.
11685 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11686 the lwp is either not stabilizing, or is moving out of a jump pad.
11687 (linux_fast_tracepoint_collecting): New.
11688 (maybe_move_out_of_jump_pad): New.
11689 (enqueue_one_deferred_signal): New.
11690 (dequeue_one_deferred_signal): New.
11691 (linux_wait_for_event_1): If moving out of a jump pad, defer
11692 pending signals to later.
11693 (linux_stabilize_threads): New.
11694 (linux_wait_1): Check if threads need moving out of jump pads, and
11695 do it if so.
11696 (stuck_in_jump_pad_callback): New.
11697 (move_out_of_jump_pad_callback): New.
11698 (lwp_running): New.
11699 (linux_resume_one_lwp): Handle moving out of jump pads.
11700 (linux_set_resume_request): Dequeue deferred signals.
11701 (need_step_over_p): Also step over fast tracepoint jumps.
11702 (start_step_over): Also uninsert fast tracepoint jumps.
11703 (finish_step_over): Also reinsert fast tracepoint jumps.
11704 (linux_install_fast_tracepoint_jump): New.
11705 (linux_target_ops): Install linux_stabilize_threads and
11706 linux_install_fast_tracepoint_jump_pad.
11707 * linux-low.h (linux_target_ops) <get_thread_area,
11708 install_fast_tracepoint_jump_pad>: New fields.
11709 (struct lwp_info) <collecting_fast_tracepoint,
11710 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11711 (linux_get_thread_area): Declare.
11712 * linux-x86-low.c (jump_insn): New.
11713 (x86_get_thread_area): New.
11714 (append_insns): New.
11715 (push_opcode): New.
11716 (amd64_install_fast_tracepoint_jump_pad): New.
11717 (i386_install_fast_tracepoint_jump_pad): New.
11718 (x86_install_fast_tracepoint_jump_pad): New.
11719 (the_low_target): Install x86_get_thread_area and
11720 x86_install_fast_tracepoint_jump_pad.
11721 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11722 (struct fast_tracepoint_jump): New.
11723 (fast_tracepoint_jump_insn): New.
11724 (fast_tracepoint_jump_shadow): New.
11725 (find_fast_tracepoint_jump_at): New.
11726 (fast_tracepoint_jump_here): New.
11727 (delete_fast_tracepoint_jump): New.
11728 (set_fast_tracepoint_jump): New.
11729 (uninsert_fast_tracepoint_jumps_at): New.
11730 (reinsert_fast_tracepoint_jumps_at): New.
11731 (set_breakpoint_at): Use write_inferior_memory.
11732 (uninsert_raw_breakpoint): Use write_inferior_memory.
11733 (check_mem_read): Mask out fast tracepoint jumps.
11734 (check_mem_write): Mask out fast tracepoint jumps.
11735 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11736 (set_fast_tracepoint_jump): Declare.
11737 (delete_fast_tracepoint_jump)
11738 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11739 (reinsert_fast_tracepoint_jumps_at): Declare.
11740 * regcache.c: Don't compile many functions when building the
11741 in-process agent library.
11742 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11743 the register buffer in the heap.
11744 (free_register_cache): If the register buffer isn't owned by the
11745 regcache, don't free it.
11746 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11747 pre-existing register caches.
11748 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11749 type.
11750 (convert_ascii_to_int): : Constify `from' parameter type.
11751 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11752 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11753 the needed buffer in-place.
11754 (relocate_instruction): New.
11755 * server.c (handle_query) <qSymbols>: If the target supports
11756 tracepoints, give it a chance of looking up symbols. Report
11757 support for fast tracepoints.
11758 (handle_status): Stabilize threads.
11759 (process_serial_event): Adjust.
11760 * server.h (struct fast_tracepoint_jump): Forward declare.
11761 (struct process_info) <fast_tracepoint_jumps>: New field.
11762 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11763 (decode_X_packet, decode_M_packet): Adjust.
11764 (relocate_instruction): Declare.
11765 (in_process_agent_loaded): Declare.
11766 (tracepoint_look_up_symbols): Declare.
11767 (struct fast_tpoint_collect_status): Declare.
11768 (fast_tracepoint_collecting): Declare.
11769 (force_unlock_trace_buffer): Declare.
11770 (handle_tracepoint_bkpts): Declare.
11771 (initialize_low_tracepoint)
11772 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11773 * target.h (struct target_ops) <stabilize_threads,
11774 install_fast_tracepoint_jump_pad>: New fields.
11775 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11776 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11777 [HAVE_STDINT_H]: Include stdint.h.
11778 (trace_debug_1): Rename to ...
11779 (trace_vdebug): ... this.
11780 (trace_debug): Rename to ...
11781 (trace_debug_1): ... this. Add `level' parameter.
11782 (trace_debug): New.
11783 (ATTR_USED, ATTR_NOINLINE): New.
11784 (IP_AGENT_EXPORT): New.
11785 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11786 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11787 (about_to_request_buffer_space, trace_buffer_is_full)
11788 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11789 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11790 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11791 (traceframe_write_count, traceframes_created)
11792 (trace_state_variables)
11793 New renaming defines.
11794 (struct ipa_sym_addresses): New.
11795 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11796 (symbol_list): New.
11797 (ipa_sym_addrs): New.
11798 (all_tracepoint_symbols_looked_up): New.
11799 (in_process_agent_loaded): New.
11800 (write_e_ipa_not_loaded): New.
11801 (maybe_write_ipa_not_loaded): New.
11802 (tracepoint_look_up_symbols): New.
11803 (debug_threads) [IN_PROCESS_AGENT]: New.
11804 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11805 (UNKNOWN_SIDE_EFFECTS): New.
11806 (stop_tracing): New.
11807 (flush_trace_buffer): New.
11808 (stop_tracing_bkpt): New.
11809 (flush_trace_buffer_bkpt): New.
11810 (read_inferior_integer): New.
11811 (read_inferior_uinteger): New.
11812 (read_inferior_data_pointer): New.
11813 (write_inferior_data_pointer): New.
11814 (write_inferior_integer): New.
11815 (write_inferior_uinteger): New.
11816 (struct collect_static_trace_data_action): Delete.
11817 (enum tracepoint_type): New.
11818 (struct tracepoint) <type>: New field `type'.
11819 <actions_str, step_actions, step_actions_str>: Only include in
11820 GDBserver.
11821 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11822 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11823 (tracepoints): Use IP_AGENT_EXPORT.
11824 (last_tracepoint): Don't include in the IPA.
11825 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11826 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11827 (alloced_trace_state_variables): New.
11828 (trace_state_variables): Use IP_AGENT_EXPORT.
11829 (traceframe_t): Delete unused variable.
11830 (circular_trace_buffer): Don't include in the IPA.
11831 (trace_buffer_start): Delete.
11832 (struct trace_buffer_control): New.
11833 (trace_buffer_free): Delete.
11834 (struct ipa_trace_buffer_control): New.
11835 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11836 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11837 New.
11838 (trace_buffer_ctrl): New.
11839 (TRACE_BUFFER_CTRL_CURR): New.
11840 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11841 Reimplement as macros.
11842 (trace_buffer_wrap): Delete.
11843 (traceframe_write_count, traceframe_read_count)
11844 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11845 (struct tracepoint_hit_ctx) <type>: New field.
11846 (struct fast_tracepoint_ctx): New.
11847 (memory_barrier): New.
11848 (cmpxchg): New.
11849 (record_tracepoint_error): Update atomically in the IPA.
11850 (clear_inferior_trace_buffer): New.
11851 (about_to_request_buffer_space): New.
11852 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11853 updating the same buffer.
11854 (add_tracepoint): Default the tracepoint's type to trap
11855 tracepoint, and orig_size to -1.
11856 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11857 internal variables.
11858 (create_trace_state_variable): New parameter `gdb'. Handle it.
11859 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11860 (cmd_qtdp): Handle fast tracepoints.
11861 (cmd_qtdv): Adjust.
11862 (max_jump_pad_size): New.
11863 (gdb_jump_pad_head): New.
11864 (get_jump_space_head): New.
11865 (claim_jump_space): New.
11866 (sort_tracepoints): New.
11867 (MAX_JUMP_SIZE): New.
11868 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11869 IPA.
11870 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11871 support. Upload fast traceframes, and delete internal IPA
11872 breakpoints.
11873 (stop_tracing_handler): New.
11874 (flush_trace_buffer_handler): New.
11875 (cmd_qtstop): Upload fast tracepoints.
11876 (response_tracepoint): Handle fast tracepoints.
11877 (tracepoint_finished_step): Upload fast traceframes. Set the
11878 tracepoint hit context's tracepoint type.
11879 (handle_tracepoint_bkpts): New.
11880 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11881 type. Add comment about fast tracepoints.
11882 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11883 non-existing action_str field.
11884 (get_context_regcache): Handle fast tracepoints.
11885 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11886 to the regcache.
11887 (fast_tracepoint_from_jump_pad_address): New.
11888 (fast_tracepoint_from_ipa_tpoint_address): New.
11889 (collecting_t): New.
11890 (force_unlock_trace_buffer): New.
11891 (fast_tracepoint_collecting): New.
11892 (collecting): New.
11893 (gdb_collect): New.
11894 (write_inferior_data_ptr): New.
11895 (target_tp_heap): New.
11896 (target_malloc): New.
11897 (download_agent_expr): New.
11898 (UALIGN): New.
11899 (download_tracepoints): New.
11900 (download_trace_state_variables): New.
11901 (upload_fast_traceframes): New.
11902 (IPA_FIRST_TRACEFRAME): New.
11903 (IPA_NEXT_TRACEFRAME_1): New.
11904 (IPA_NEXT_TRACEFRAME): New.
11905 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11906 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11907 (gdb_jump_pad_buffer_end): New.
11908 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11909 (initialize_tracepoint): Adjust.
11910 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11911 buffer. Initialize the low module.
11912 * utils.c (PREFIX, TOOLNAME): New.
11913 (malloc_failure): Use PREFIX.
11914 (error): In the IPA, an error causes an exit.
11915 (fatal, warning): Use PREFIX.
11916 (internal_error): Use TOOLNAME.
11917 (NUMCELLS): Increase to 10.
11918 * configure, config.in: Regenerate.
11919
11920 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11921
11922 * server.c (handle_query) <qSupported>: Do two passes over the
11923 qSupported string to avoid nesting strtok.
11924
11925 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11926
11927 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11928 (CDEPS): New.
11929 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11930 -Wl,--dynamic-list.
11931 * configure: Regenerate.
11932 * proc-service.list: New.
11933
11934 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11935
11936 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11937 New comment.
11938
11939 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11940
11941 * gdbreplay.c (remote_open): Check error return from socket() call by
11942 its equality to -1 not by it being negative.
11943 * remote-utils.c (remote_open): Likewise.
11944
11945 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11946
11947 * config.h: Regenerate.
11948
11949 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11950
11951 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11952 doesn't provide PTRACE_GET_THREAD_AREA.
11953
11954 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11955
11956 * linux-m68k-low.c: Include <asm/ptrace.h>
11957 (ps_get_thread_area): Implement.
11958
11959 2010-05-03 Doug Evans <dje@google.com>
11960
11961 * event-loop.c (struct callback_event): New struct.
11962 (callback_list): New global.
11963 (append_callback_event, delete_callback_event): New functions.
11964 (process_callback): New function.
11965 (start_event_loop): Call it.
11966 * remote-utils.c (NOT_SCHEDULED): Define.
11967 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11968 moved out of readchar.
11969 (readchar): Rewrite. Call reschedule before returning.
11970 (reset_readchar): New function.
11971 (remote_close): Call it.
11972 (process_remaining, reschedule): New functions.
11973 * server.h (callback_handler_func): New typedef.
11974 (append_callback_event, delete_callback_event): Declare.
11975
11976 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11977
11978 * proc-service.c (ps_pglobal_lookup): Use
11979 thread_db_look_up_one_symbol.
11980 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11981 parameter. Use it instead of all_symbols_looked_up.
11982 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11983 field.
11984 (all_symbols_looked_up): Don't declare.
11985 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11986 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11987 field.
11988 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11989 Set all_symbols_looked_up here.
11990 (thread_db_look_up_one_symbol): New.
11991 (thread_db_get_tls_address): Adjust.
11992 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11993 thread_db object on the heap, and tentatively set it in the
11994 process structure.
11995 (thread_db_init): Don't set all_symbols_looked_up here.
11996 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11997
11998 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11999
12000 * linux-low.c (linux_kill, linux_detach): Adjust.
12001 (status_pending_p_callback): Remove redundant statement. Check
12002 for !TARGET_WAITIKIND_IGNORE, instead of
12003 TARGET_WAITKIND_STOPPED.
12004 (handle_tracepoints): Make sure LWP is locked. Adjust.
12005 (linux_wait_for_event_1): Adjust.
12006 (linux_cancel_breakpoints): New.
12007 (unsuspend_one_lwp): New.
12008 (unsuspend_all_lwps): New.
12009 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12010 (send_sigstop_callback): Change return type to int, add new
12011 `except' parameter and handle it.
12012 (suspend_and_send_sigstop_callback): New.
12013 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12014 pass them down. If SUSPEND, also increment the lwp's suspend
12015 count.
12016 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12017 (need_step_over_p): Don't consider suspended LWPs.
12018 (start_step_over): Adjust.
12019 (proceed_one_lwp): Change return type to int, add new `except'
12020 parameter and handle it.
12021 (unsuspend_and_proceed_one_lwp): New.
12022 (proceed_all_lwps): Use find_inferior instead of
12023 for_each_inferior.
12024 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12025 also decrement the suspend count of LWPs. Pass `except' down,
12026 instead of hacking its suspend count.
12027 (linux_pause_all): Add `freeze' parameter. Adjust.
12028 (linux_unpause_all): New.
12029 (linux_target_ops): Install linux_unpause_all.
12030 * server.c (handle_status): Adjust.
12031 * target.h (struct target_ops): New fields `unpause_all' and
12032 `cancel_breakpoints'. Add new parameter to `pause_all'.
12033 (pause_all): Add new `freeze' parameter.
12034 (unpause_all): New.
12035 (cancel_breakpoints): New.
12036 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12037 cancel breakpoints.
12038 (cmd_qtstart): Pause threads.
12039 (stop_tracing): Pause threads, and cancel breakpoints.
12040 * win32-low.c (win32_target_ops): Adjust.
12041
12042 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12043
12044 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12045 the inferior right away from here...
12046 (linux_wait_1): ... to here, and adjust to check the thread's
12047 last_resume_kind instead of the lwp's step or stop_expected flags.
12048
12049 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12050
12051 * README: Use consistent `GDB' and `GDBserver' spellings.
12052
12053 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12054
12055 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12056 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12057 (linux_detach_one_lwp): Assume the lwp is stopped.
12058 (any_thread_of): Delete.
12059 (linux_detach): Stop all lwps here. Don't blindly delete all
12060 breakpoints.
12061 (delete_lwp_callback): New.
12062 (linux_mourn): Delete all lwps of the process that is gone.
12063 (linux_wait_1): Don't delete the last lwp of the process here.
12064 * mem-break.h (mark_breakpoints_out): Declare.
12065 * mem-break.c (mark_breakpoints_out): New.
12066 (free_all_breakpoints): Use it.
12067 * server.c (handle_target_event): If the process is gone, mark
12068 breakpoints out.
12069 * thread-db.c (struct thread_db) <create_bp>: New field.
12070 (thread_db_enable_reporting): Fix prototype. Store a thread event
12071 breakpoint reference in the thread_db struct.
12072 (thread_db_load_search): Clear the thread_db object.
12073 (try_thread_db_load_1): Ditto.
12074 (switch_to_process): New.
12075 (disable_thread_event_reporting): Use it.
12076 (remove_thread_event_breakpoints): New.
12077 (thread_db_detach, thread_db_mourn): Use it.
12078
12079 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12080
12081 * linux-low.c (linux_enable_event_reporting): New.
12082 (linux_wait_for_event_1, handle_extended_wait): Use it.
12083
12084 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12085
12086 * linux-low.c (linux_kill_one_lwp, linux_kill)
12087 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12088 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12089 SIGSTOP even if the LWP is stopped.
12090 (send_sigstop_callback): New.
12091 (stop_all_lwps): Use send_sigstop_callback instead.
12092 (linux_resume_one_thread): Adjust.
12093 (proceed_one_lwp): Still proceed an LWP that the client has
12094 requested to stop, if we haven't reported it as stopped yet. Make
12095 sure that LWPs the client want stopped, have a pending SIGSTOP.
12096
12097 2010-04-26 Doug Evans <dje@google.com>
12098
12099 * server.c (handle_general_set): Make static.
12100
12101 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12102 Print received char after testing for error/eof instead of before.
12103 (input_interrupt): Tweak comment.
12104
12105 2010-04-23 Doug Evans <dje@google.com>
12106
12107 * server.c (start_inferior): Print inferior argv if --debug.
12108
12109 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12110
12111 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12112 * nto-x86-low.c: Include server.h
12113
12114 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12115
12116 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12117 be consistent with other sources of this directory.
12118 (init_registers_amd64): Correct name of source file of this function
12119 in the comment.
12120
12121 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12122
12123 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12124 64-bit executables.
12125
12126 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12127
12128 * win32-i386-low.c: Add 64-bit support.
12129 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12130 (init_registers_amd64): Declare.
12131 (mappings): Add 64-bit version of array.
12132 (init_windows_x86): New function.
12133 (the_low_target): Change init_arch field to init_windows_x86.
12134
12135 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12136
12137 * win32-low.c: Adapt to support also 64-bit architecture.
12138 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12139 (get_image_name): Use SIZE_T type for local variable `done'.
12140 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12141 (toolhelp_get_dll_name): Idem.
12142 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12143 Use uintptr_t typecast to avoid warning.
12144 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12145 (handle_exception): Use phex_nz to avoid warning.
12146 (win32_wait): Remove unused local variable `process'.
12147
12148 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12149
12150 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12151 `amd64-avx.o'.
12152
12153 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12154
12155 * configure.ac: Use `ws2_32' library for srv_mingw.
12156 * configure: Regenerate.
12157 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12158 * remote-utils.c: Likewise.
12159
12160 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12161
12162 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12163 if __x86_64__ is defined.
12164
12165 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12166
12167 * configure: Regenerate.
12168
12169 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12170
12171 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12172 * target.h (target_ops): New get_tib_address field.
12173 * win32-low.h (win32_thread_info): Add thread_local_base field.
12174 * win32-low.c (child_add_thread): Add tlb argument.
12175 Set thread_local_base field to TLB.
12176 (get_child_debug_event): Adapt to child_add_thread change.
12177 (win32_get_tib_address): New function.
12178 (win32_target_ops): Set get_tib_address field to
12179 win32_get_tib_address.
12180 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12181
12182 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12183
12184 * linux-low.c (linux_mourn): Also remove the process.
12185 * server.c (handle_target_event): Don't remove the process here.
12186 * nto-low.c (nto_mourn): New.
12187 (nto_target_ops): Install it.
12188 * spu-low.c (spu_mourn): New.
12189 (spu_target_ops): Install it.
12190 * win32-low.c (win32_mourn): New.
12191 (win32_target_ops): Install it.
12192
12193 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12194
12195 * server.h (buffer_xml_printf): Remove redundant `;'.
12196
12197 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12198
12199 * regcache.c (set_register_cache): Invalidate regcaches before
12200 changing the register cache layout.
12201 (regcache_invalidate_one): Allow a NULL regcache.
12202 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12203 regcaches before changing the register cache layout or the target
12204 regsets.
12205
12206 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12207
12208 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12209 variable warning on Linux/x86-64.
12210
12211 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12212
12213 GDBserver disconnected tracing support.
12214
12215 * linux-low.c (linux_remove_process): Delete.
12216 (add_lwp): Don't set last_resume_kind here.
12217 (linux_kill): Use `mourn'.
12218 (linux_detach): Use `thread_db_detach', and `mourn'.
12219 (linux_mourn): New.
12220 (linux_attach_lwp_1): Adjust comment.
12221 (linux_attach): last_resume_kind moved the thread_info; adjust.
12222 (status_pending_p_callback): Adjust.
12223 (linux_wait_for_event_1): Adjust.
12224 (count_events_callback, select_singlestep_lwp_callback)
12225 (select_event_lwp_callback, cancel_breakpoints_callback)
12226 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12227 (proceed_one_lwp): Adjust.
12228 (linux_async): Add debug output.
12229 (linux_thread_stopped): New.
12230 (linux_pause_all): New.
12231 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12232 linux_pause_all.
12233 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12234 (thread_db_free): Delete declaration.
12235 (thread_db_detach, thread_db_mourn): Declare.
12236 * thread-db.c (thread_db_init): Use thread_db_mourn.
12237 (thread_db_free): Delete, split in two.
12238 (disable_thread_event_reporting): New.
12239 (thread_db_detach): New.
12240 (thread_db_mourn): New.
12241
12242 * server.h (struct thread_info) <last_resume_kind>: New field.
12243 <attached>: Add comment.
12244 <gdb_detached>: New field.
12245 (handler_func): Change return type to int.
12246 (handle_serial_event, handle_target_event): Ditto.
12247 (gdb_connected): Declare.
12248 (tracing): Delete.
12249 (disconnected_tracing): Declare.
12250 (stop_tracing): Declare.
12251
12252 * server.c (handle_query) <qSupported>: Report support for
12253 disconnected tracing.
12254 (queue_stop_reply_callback): Account for running threads.
12255 (gdb_wants_thread_stopped): New.
12256 (gdb_wants_all_threads_stopped): New.
12257 (gdb_reattached_process): New.
12258 (handle_status): Clear the `gdb_detached' flag of all processes.
12259 In all-stop, stop all threads.
12260 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12261 (process_serial_event): If the remote connection breaks, or if an
12262 exit was forced with "monitor exit", force an event loop exit.
12263 Handle disconnected tracing on detach.
12264 (handle_serial_event): Adjust.
12265 (handle_target_event): If GDB isn't connected, forward events back
12266 to the inferior, unless the last process exited, in which case,
12267 exit gdbserver. Adjust interface.
12268
12269 * remote-utils.c (remote_open): Don't block in accept. Instead
12270 register an event loop source on the listen socket file
12271 descriptor. Refactor bits into ...
12272 (listen_desc): ... this new global.
12273 (gdb_connected): ... this new function.
12274 (enable_async_notification): ... this new function.
12275 (handle_accept_event): ... this new function.
12276 (remote_close): Clear remote_desc.
12277
12278 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12279
12280 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12281 New fields.
12282 (mourn_inferior): Define.
12283 (target_process_qsupported): Avoid the dangling else problem.
12284 (thread_stopped): Define.
12285 (pause_all): Define.
12286 (target_waitstatus_to_string): Declare.
12287 * target.c (target_waitstatus_to_string): New.
12288
12289 * tracepoint.c (tracing): Make extern.
12290 (disconnected_tracing): New.
12291 (stop_tracing): Make extern. Handle tracing stops due to GDB
12292 disconnecting.
12293 (cmd_qtdisconnected): New.
12294 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12295 (handle_tracepoint_general_set): Handle QTDisconnected.
12296
12297 * event-loop.c (event_handler_func): Change return type to int.
12298 (process_event): Bail out if the event handler wants the event
12299 loop to stop.
12300 (handle_file_event): Ditto.
12301 (start_event_loop): Bail out if the event handler wants the event
12302 loop to stop.
12303
12304 * nto-low.c (nto_target_ops): Adjust.
12305 * spu-low.c (spu_wait): Don't remove the process here.
12306 (spu_target_ops): Adjust.
12307 * win32-low.c (win32_wait): Don't remove the process here.
12308 (win32_target_ops): Adjust.
12309
12310 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12311
12312 * regcache.c (realloc_register_cache): Invalidate inferior's
12313 regcache before recreating it.
12314
12315 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12316
12317 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12318
12319 2010-04-09 Stan Shebs <stan@codesourcery.com>
12320 Pedro Alves <pedro@codesourcery.com>
12321
12322 * server.h (LONGEST): New.
12323 (struct thread_info) <while_stepping>: New field.
12324 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12325 Declare.
12326 (initialize_tracepoint, handle_tracepoint_general_set)
12327 (handle_tracepoint_query, tracepoint_finished_step)
12328 (tracepoint_was_hit, release_while_stepping_state_list):
12329 (current_traceframe): Declare.
12330 * server.c (handle_general_set): Handle tracepoint packets.
12331 (read_memory): New.
12332 (write_memory): New.
12333 (handle_search_memory_1): Use read_memory.
12334 (handle_query): Report support for conditional tracepoints, trace
12335 state variables, and tracepoint sources. Handle tracepoint
12336 queries.
12337 (main): Initialize the tracepoints module.
12338 (process_serial_event): Handle traceframe reads/writes.
12339
12340 * linux-low.c (handle_tracepoints): New.
12341 (linux_wait_1): Call it.
12342 (linux_resume_one_lwp): Handle while-stepping.
12343 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12344 (linux_target_ops): Install them.
12345 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12346 New field.
12347 * linux-x86-low.c (x86_supports_tracepoints): New.
12348 (the_low_target). Install it.
12349
12350 * mem-break.h (delete_breakpoint): Declare.
12351 * mem-break.c (delete_breakpoint): Make external.
12352
12353 * target.h (struct target_ops): Add `supports_tracepoints',
12354 `read_pc', and `write_pc' fields.
12355 (target_supports_tracepoints): Define.
12356 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12357 (phex_nz): New.
12358
12359 * regcache.h (struct regcache) <registers_owned>: New field.
12360 (init_register_cache, regcache_cpy): Declare.
12361 (regcache_read_pc, regcache_write_pc): Declare.
12362 (register_cache_size): Declare.
12363 (supply_regblock): Declare.
12364 * regcache.c (init_register_cache): New.
12365 (new_register_cache): Use it.
12366 (regcache_cpy): New.
12367 (register_cache_size): New.
12368 (supply_regblock): New.
12369 (regcache_read_pc, regcache_write_pc): New.
12370
12371 * tracepoint.c: New.
12372
12373 * Makefile.in (OBS): Add tracepoint.o.
12374 (tracepoint.o): New rule.
12375
12376 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12377
12378 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12379 (i386-mmx.o): New.
12380 (i386-mmx.c): Likewise.
12381 (i386-mmx-linux.o): Likewise.
12382 (i386-mmx-linux.c): Likewise.
12383
12384 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12385 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12386 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12387 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12388
12389 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12390 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12391 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12392
12393 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12394
12395 * Makefile.in (clean): Updated.
12396 (i386-avx.o): New.
12397 (i386-avx.c): Likewise.
12398 (i386-avx-linux.o): Likewise.
12399 (i386-avx-linux.c): Likewise.
12400 (amd64-avx.o): Likewise.
12401 (amd64-avx.c): Likewise.
12402 (amd64-avx-linux.o): Likewise.
12403 (amd64-avx-linux.c): Likewise.
12404
12405 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12406 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12407 (srv_amd64_regobj): Add amd64-avx.o.
12408 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12409 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12410 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12411 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12412 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12413 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12414 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12415
12416 * i387-fp.c: Include "i386-xstate.h".
12417 (i387_xsave): New.
12418 (i387_cache_to_xsave): Likewise.
12419 (i387_xsave_to_cache): Likewise.
12420 (x86_xcr0): Likewise.
12421
12422 * i387-fp.h (i387_cache_to_xsave): Likewise.
12423 (i387_xsave_to_cache): Likewise.
12424 (x86_xcr0): Likewise.
12425
12426 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12427 * linux-crisv32-low.c (target_regsets): Likewise.
12428 * linux-m68k-low.c (target_regsets): Likewise.
12429 * linux-mips-low.c (target_regsets): Likewise.
12430 * linux-ppc-low.c (target_regsets): Likewise.
12431 * linux-s390-low.c (target_regsets): Likewise.
12432 * linux-sh-low.c (target_regsets): Likewise.
12433 * linux-sparc-low.c (target_regsets): Likewise.
12434 * linux-xtensa-low.c (target_regsets): Likewise.
12435
12436 * linux-low.c: Include <sys/uio.h>.
12437 (regsets_fetch_inferior_registers): Support nt_type.
12438 (regsets_store_inferior_registers): Likewise.
12439 (linux_process_qsupported): New.
12440 (linux_target_ops): Add linux_process_qsupported.
12441
12442 * linux-low.h (regset_info): Add nt_type.
12443 (linux_target_ops): Add process_qsupported.
12444
12445 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12446 and <sys/uio.h>.
12447 (init_registers_i386_avx_linux): New.
12448 (init_registers_amd64_avx_linux): Likewise.
12449 (xmltarget_i386_linux_no_xml): Likewise.
12450 (xmltarget_amd64_linux_no_xml): Likewise.
12451 (PTRACE_GETREGSET): Likewise.
12452 (PTRACE_SETREGSET): Likewise.
12453 (x86_fill_xstateregset): Likewise.
12454 (x86_store_xstateregset): Likewise.
12455 (use_xml): Likewise.
12456 (x86_linux_update_xmltarget): Likewise.
12457 (x86_linux_process_qsupported): Likewise.
12458 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12459 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12460 init_registers_i386_linux here. Call
12461 x86_linux_update_xmltarget.
12462 (the_low_target): Add x86_linux_process_qsupported.
12463
12464 * server.c (handle_query): Call target_process_qsupported.
12465
12466 * target.h (target_ops): Add process_qsupported.
12467 (target_process_qsupported): New.
12468
12469 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12470
12471 * inferiors.c (add_thread): Set last_status kind to
12472 TARGET_WAITKIND_IGNORE.
12473 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12474 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12475 (linux_wait_1): Move `thread' local definition to block that uses
12476 it. Don't NULL initialize `event_child'.
12477 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12478 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12479 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12480
12481 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12482
12483 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12484 an extended waitstatus, or by a watchpoint.
12485 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12486 thread was stepping or has been stopped by a watchpoint.
12487
12488 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12489
12490 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12491 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12492 of another, then delete the previous, and validate all
12493 breakpoints.
12494 (validate_inserted_breakpoint): New.
12495 (delete_disabled_breakpoints): New.
12496 (validate_breakpoints): New.
12497 (check_mem_read): Validate breakpoints before trusting their
12498 shadow. Delete disabled breakpoints.
12499 (check_mem_write): Validate breakpoints before trusting they
12500 should be inserted. Delete disabled breakpoints.
12501 * mem-break.h (validate_breakpoints):
12502 * server.c (handle_query): Validate breakpoints when we see a
12503 qSymbol query.
12504
12505 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12506
12507 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12508 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12509 if we could tell there's a GDB breakpoint at stop_pc.
12510 (need_step_over_p): Don't do a step over if we find a GDB
12511 breakpoint at the resume PC.
12512
12513 * mem-break.c (struct raw_breakpoint): New.
12514 (enum bkpt_type): New type `gdb_breakpoint'.
12515 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12516 fields. New field `raw'.
12517 (find_raw_breakpoint_at): New.
12518 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12519 breakpoint instead.
12520 (set_breakpoint_at): Adjust.
12521 (delete_raw_breakpoint): New.
12522 (release_breakpoint): New.
12523 (delete_breakpoint): Rename to...
12524 (delete_breakpoint_1): ... this. Add proc parameter. Use
12525 release_breakpoint. Return ENOENT.
12526 (delete_breakpoint): Reimplement.
12527 (find_breakpoint_at): Delete.
12528 (find_gdb_breakpoint_at): New.
12529 (delete_breakpoint_at): Delete.
12530 (set_gdb_breakpoint_at): New.
12531 (delete_gdb_breakpoint_at): New.
12532 (gdb_breakpoint_here): New.
12533 (set_reinsert_breakpoint): Use release_breakpoint.
12534 (uninsert_breakpoint): Rename to ...
12535 (uninsert_raw_breakpoint): ... this.
12536 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12537 (reinsert_raw_breakpoint): Change parameter type to
12538 raw_breakpoint.
12539 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12540 instead.
12541 (check_breakpoints): Adjust. Use release_breakpoint.
12542 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12543 (breakpoint_inserted_here): Ditto.
12544 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12545 Don't trust the breakpoint's shadow if it is not inserted.
12546 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12547 (delete_all_breakpoints): Adjust.
12548 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12549 use delete_breakpoint_1.
12550
12551 * mem-break.h (breakpoints_supported): Delete declaration.
12552 (set_gdb_breakpoint_at): Declare.
12553 (gdb_breakpoint_here): Declare.
12554 (delete_breakpoint_at): Delete.
12555 (delete_gdb_breakpoint_at): Declare.
12556
12557 * server.h (struct raw_breakpoint): Forward declare.
12558 (struct process_info): New field `raw_breakpoints'.
12559
12560 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12561 breakpoints.
12562
12563 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12564
12565 * linux-low.c (status_pending_p_callback): Fix comment.
12566 (linux_wait_for_event_1): Move most of the internal breakpoint
12567 handling from here...
12568 (linux_wait_1): ... to here.
12569 (count_events_callback): New.
12570 (select_singlestep_lwp_callback): New.
12571 (select_event_lwp_callback): New.
12572 (cancel_breakpoints_callback): New.
12573 (select_event_lwp): New.
12574 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12575 priority to all LWPs that have had events that should be reported
12576 to the client. Cancel breakpoints when about to reporting the
12577 event to the client, not while stopping lwps. No longer cancel
12578 finished single-steps here.
12579 (cancel_finished_single_step): Delete.
12580 (cancel_finished_single_steps): Delete.
12581
12582 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12583
12584 * mem-break.c (enum bkpt_type): New.
12585 (struct breakpoint): New field `type'.
12586 (set_breakpoint_at): Change return type to struct breakpoint
12587 pointer. Set type to `other_breakpoint' by default.
12588 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12589 in the breakpoint list.
12590 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12591 (reinsert_breakpoint): Rename to ...
12592 (reinsert_raw_breakpoint): ... this.
12593 (reinsert_breakpoints_at): Adjust.
12594 * mem-break.h (struct breakpoint): Declare.
12595 (set_breakpoint_at): Change return type to struct breakpoint
12596 pointer.
12597
12598 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12599
12600 * server.c (handle_query): Assign, not compare.
12601
12602 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12603
12604 Teach linux gdbserver to step-over-breakpoints.
12605
12606 * linux-low.c (can_hardware_single_step): New.
12607 (supports_breakpoints): New.
12608 (handle_extended_wait): If stopping threads, read the stop pc of
12609 the new cloned LWP.
12610 (get_pc): New.
12611 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12612 low target doesn't support retrieving the PC.
12613 (add_lwp): Set last_resume_kind to resume_continue.
12614 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12615 (linux_attach): Don't clear stop_expected. Set the lwp's
12616 last_resume_kind to resume_stop.
12617 (linux_detach_one_lwp): Don't check for removed breakpoints.
12618 (check_removed_breakpoint): Delete.
12619 (status_pending_p): Rename to ...
12620 (status_pending_p_callback): ... this. Don't check for removed
12621 breakpoints. Don't consider threads that are stopped from GDB's
12622 perspective.
12623 (linux_wait_for_lwp): Always read the stop_pc here.
12624 (cancel_breakpoint): New.
12625 (step_over_bkpt): New global.
12626 (linux_wait_for_event_1): Implement stepping over breakpoints.
12627 (gdb_wants_lwp_stopped): New.
12628 (gdb_wants_all_stopped): New.
12629 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12630 single-step traps here. Store the thread's last reported target
12631 wait status.
12632 (send_sigstop): Don't clear stop_expected. Always set it,
12633 instead.
12634 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12635 (cancel_finished_single_step): New.
12636 (cancel_finished_single_steps): New.
12637 (wait_for_sigstop): Don't cancel finished single-step traps here.
12638 (linux_resume_one_lwp): Don't check for removed breakpoints.
12639 Don't set `step' on non-hardware step archs.
12640 (linux_set_resume_request): Ignore resume_stop requests if already
12641 stopping or stopped. Set the lwp's last_resume_kind.
12642 (resume_status_pending_p): Don't check for removed breakpoints.
12643 (need_step_over_p): New.
12644 (start_step_over): New.
12645 (finish_step_over): New.
12646 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12647 requests. Clear the thread's last reported target waitstatus.
12648 Don't use the `suspended' flag. Don't consider pending breakpoints.
12649 (linux_resume): Start a step-over if necessary.
12650 (proceed_one_lwp): New.
12651 (proceed_all_lwps): New.
12652 (unstop_all_lwps): New.
12653 * linux-low.h (struct lwp_info): Rewrite comment for the
12654 `suspended' flag. Add the `stop_pc' field. Delete the
12655 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12656 Add `'last_resume_kind' and `need_step_over' fields.
12657 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12658 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12659 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12660 (set_raw_breakpoint_at): New.
12661 (set_breakpoint_at): Rewrite to use it.
12662 (reinsert_breakpoint_handler): Delete.
12663 (set_reinsert_breakpoint): New.
12664 (reinsert_breakpoint_by_bp): Delete.
12665 (delete_reinsert_breakpoints): New.
12666 (uninsert_breakpoint): Rewrite.
12667 (uninsert_breakpoints_at): New.
12668 (reinsert_breakpoint): Rewrite.
12669 (reinsert_breakpoints_at): New.
12670 (check_breakpoints): Rewrite.
12671 (breakpoint_here): New.
12672 (breakpoint_inserted_here): New.
12673 (check_mem_read): Adjust.
12674 * mem-break.h (breakpoints_supported, breakpoint_here)
12675 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12676 (reinsert_breakpoint_by_bp): Delete declaration.
12677 (delete_reinsert_breakpoints): Declare.
12678 (reinsert_breakpoint): Delete declaration.
12679 (reinsert_breakpoints_at): Declare.
12680 (uninsert_breakpoint): Delete declaration.
12681 (uninsert_breakpoints_at): Declare.
12682 (check_breakpoints): Adjust prototype.
12683 * server.h: Adjust include order.
12684 (struct thread_info): Declare here. Add a `last_status' field.
12685
12686 2010-03-23 Michael Snyder <msnyder@vmware.com>
12687
12688 * server.c (crc32): New function.
12689 (handle_query): Add handling for 'qCRC:' request.
12690
12691 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12692
12693 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12694 lwp had been stopped by a watchpoint.
12695
12696 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12697
12698 * server.h (internal_error): Declare.
12699 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12700 * utils.c (internal_error): New function.
12701
12702 2010-03-15 Andreas Schwab <schwab@redhat.com>
12703
12704 * configure.srv: Fix typo setting srv_regobj.
12705
12706 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12707
12708 * linux-low.c (fetch_register): Avoid passing a non string literal
12709 format to `error'.
12710 (usr_store_inferior_registers): Ditto.
12711
12712 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12713
12714 * linux-low.c (linux_write_memory): Bail out early if peeking
12715 memory failed.
12716
12717 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12718
12719 * linux-low.h (struct lwp_info): New fields
12720 `stopped_by_watchpoint' and `stopped_data_address'.
12721 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12722 here, and cache them in the lwp object.
12723 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12724 directly.
12725 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12726 field.
12727 (linux_stopped_by_watchpoint): Rewrite.
12728 (linux_stopped_data_address): Rewrite.
12729
12730 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12731
12732 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12733 switching the current inferior, not before.
12734
12735 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12736
12737 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12738 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12739 i386-linux.c and amd64-linux.c.
12740 (reg-i386.o): Removed.
12741 (reg-i386.c): Likewise.
12742 (reg-i386-linux.o): Likewise.
12743 (reg-i386-linux.c): Likewise.
12744 (reg-x86-64.o): Likewise.
12745 (reg-x86-64.c): Likewise.
12746 (reg-x86-64-linux.o): Likewise.
12747 (reg-x86-64-linux.c): Likewise.
12748 (i386.o): New.
12749 (i386.c): Likewise.
12750 (i386-linux.o): Likewise.
12751 (i386-linux.c): Likewise.
12752 (amd64.o): Likewise.
12753 (amd64.c): Likewise.
12754 (amd64-linux.o): Likewise.
12755 (amd64-linux.c): Likewise.
12756
12757 * configure.srv (srv_i386_regobj): New.
12758 (srv_i386_linux_regobj): Likewise.
12759 (srv_amd64_regobj): Likewise.
12760 (srv_amd64_linux_regobj): Likewise.
12761 (srv_i386_32bit_xmlfiles): Likewise.
12762 (srv_i386_64bit_xmlfiles): Likewise.
12763 (srv_i386_xmlfiles): Likewise.
12764 (srv_amd64_xmlfiles): Likewise.
12765 (srv_i386_linux_xmlfiles): Likewise.
12766 (srv_amd64_linux_xmlfiles): Likewise.
12767 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12768 srv_xmlfiles to $srv_i386_xmlfiles.
12769 (i[34567]86-*-mingw32ce*): Likewise.
12770 (i[34567]86-*-mingw*): Likewise.
12771 (i[34567]86-*-nto*): Likewise.
12772 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12773 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12774 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12775 (x86_64-*-linux*): Likewise.
12776
12777 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12778 (init_registers_amd64_linux): New.
12779 (x86_arch_setup): Replace init_registers_x86_64_linux with
12780 init_registers_amd64_linux.
12781
12782 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12783
12784 * configure.ac: Check for libdl. If it is not available link against
12785 static libthread_db.
12786 * configure: Regenerate.
12787
12788 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12789
12790 PR9605
12791
12792 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12793 handing a read watchpoint.
12794 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12795
12796 2010-02-12 Doug Evans <dje@google.com>
12797
12798 * linux-low.c (linux_supports_tracefork_flag): Document.
12799 (linux_look_up_symbols): Add comment.
12800
12801 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12802
12803 * regcache.c (supply_register): Clear regcache if buf is NULL.
12804
12805 2010-02-02 Nicolas Roche <roche@sourceware.org>
12806 Joel Brobecker <brobecker@adacore.com>
12807
12808 * inferiors.c (find_inferior): Add function documentation.
12809 (unloaded_dll): Handle the case where the unloaded dll has not
12810 been previously registered in the dll list.
12811
12812 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12813
12814 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12815 (thumb2_breakpoint): New.
12816 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12817
12818 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12819
12820 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12821 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12822 breakpoints.
12823
12824 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12825
12826 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12827
12828 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12829
12830 * linux-s390-low.c (s390_collect_ptrace_register)
12831 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12832
12833 2010-01-21 Doug Evans <dje@google.com>
12834
12835 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12836 (PTRACE_ARG4_TYPE): New macro.
12837 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12838 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12839 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12840 (usr_store_inferior_registers): Ditto.
12841 (linux_read_memory, linux_write_memory): Ditto.
12842 (linux_test_for_tracefork): Ditto.
12843
12844 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12845 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12846
12847 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12848
12849 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12850 target.
12851
12852 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12853
12854 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12855 prototype to take a regcache. Adjust.
12856
12857 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12858
12859 * regcache.h (struct thread_info): Forward declare.
12860 (struct regcache): New.
12861 (new_register_cache): Adjust prototype.
12862 (get_thread_regcache): Declare.
12863 (free_register_cache): Adjust prototype.
12864 (registers_to_string, registers_from_string): Ditto.
12865 (supply_register, supply_register_by_name, collect_register)
12866 (collect_register_as_string, collect_register_by_name): Ditto.
12867 * regcache.c (struct inferior_regcache_data): Delete.
12868 (get_regcache): Rename to ...
12869 (get_thread_regcache): ... this. Adjust. Switch inferior before
12870 fetching registers.
12871 (regcache_invalidate_one): Adjust.
12872 (regcache_invalidate): Fix prototype.
12873 (new_register_cache): Return the new register cache.
12874 (free_register_cache): Change prototype.
12875 (realloc_register_cache): Adjust.
12876 (registers_to_string): Change prototype to take a regcache. Adjust.
12877 (registers_from_string): Ditto.
12878 (register_data): Ditto.
12879 (supply_register): Ditto.
12880 (supply_register_by_name): Ditto.
12881 (collect_register): Ditto.
12882 (collect_register_as_string): Ditto.
12883 (collect_register_by_name): Ditto.
12884 * server.c (process_serial_event): Adjust.
12885 * linux-low.h (regset_fill_func, regset_store_func): Change
12886 prototype.
12887 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12888 Change prototype.
12889 * linux-low.c (get_stop_pc): Adjust.
12890 (check_removed_breakpoint): Adjust.
12891 (linux_wait_for_event): Adjust.
12892 (linux_resume_one_lwp): Adjust.
12893 (fetch_register): Add regcache parameter. Adjust.
12894 (usr_store_inferior_registers): Ditto.
12895 (regsets_fetch_inferior_registers): Ditto.
12896 (regsets_store_inferior_registers): Ditto.
12897 (linux_fetch_registers, linux_store_registers): Ditto.
12898 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12899 regcache. Adjust.
12900 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12901 Ditto.
12902 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12903 prototype to take a regcache.
12904 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12905 * remote-utils.c (convert_ascii_to_int, outreg)
12906 (prepare_resume_reply): Change prototype to take a regcache.
12907 Adjust.
12908 * target.h (struct target_ops) <fetch_registers, store_registers>:
12909 Change prototype to take a regcache.
12910 (fetch_inferior_registers, store_inferior_registers): Change
12911 prototype to take a regcache. Adjust.
12912 * proc-service.c (ps_lgetregs): Adjust.
12913 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12914 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12915 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12916 take a regcache. Adjust.
12917 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12918 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12919 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12920 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12921 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12922 (cris_cannot_fetch_register):
12923 (cris_breakpoint_at): Change prototype to take a regcache.
12924 Adjust.
12925 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12926 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12927 to take a regcache. Adjust.
12928 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12929 Adjust.
12930 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12931 take a regcache. Adjust.
12932 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12933 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12934 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12935 * linux-mips-low.c (mips_get_pc):
12936 (mips_set_pc): Change prototype to take a regcache. Adjust.
12937 (mips_reinsert_addr): Adjust.
12938 (mips_collect_register): Change prototype to take a regcache.
12939 Adjust.
12940 (mips_supply_register):
12941 (mips_collect_register_32bit, mips_supply_register_32bit)
12942 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12943 (mips_store_fpregset): Ditto.
12944 * linux-ppc-low.c (ppc_supply_ptrace_register)
12945 (ppc_supply_ptrace_register): Ditto.
12946 (parse_spufs_run): Adjust.
12947 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12948 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12949 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12950 take a regcache. Adjust.
12951 * linux-s390-low.c (s390_collect_ptrace_register)
12952 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12953 (s390_set_pc): Change prototype to take a regcache. Adjust.
12954 (s390_arch_setup): Adjust.
12955 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12956 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12957 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12958 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12959 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12960 regcache. Adjust.
12961 (sparc_breakpoint_at): Adjust.
12962 * linux-xtensa-low.c (xtensa_fill_gregset):
12963 (xtensa_store_gregset):
12964 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12965 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12966 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12967 prototype to take a regcache. Adjust.
12968 * win32-arm-low.c (arm_fetch_inferior_register)
12969 (arm_store_inferior_register): Change prototype to take a
12970 regcache. Adjust.
12971 * win32-i386-low.c (i386_fetch_inferior_register)
12972 (i386_store_inferior_register): Change prototype to take a
12973 regcache. Adjust.
12974 * win32-low.c (child_fetch_inferior_registers)
12975 (child_store_inferior_registers): Change prototype to take a
12976 regcache. Adjust.
12977 (win32_wait): Adjust.
12978 (win32_fetch_inferior_registers): Change prototype to take a
12979 regcache. Adjust.
12980 (win32_store_inferior_registers): Adjust.
12981 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12982 store_inferior_register>: Change prototype to take a regcache.
12983
12984 2010-01-20 Doug Evans <dje@google.com>
12985
12986 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12987 #ifdef.
12988 (linux_wait_for_event1, linux_init_signals): Ditto.
12989 (W_STOPCODE): Provide definition if missing.
12990
12991 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12992
12993 * linux-low.c (linux_core_of_thread): New.
12994 (compare_ints, show_process, list_threads): New.
12995 (linux_qxfer_osdata): Report threads and cores.
12996 (linux_target_op): Register linux_core_of_thread.
12997 * remote-utils.c (prepare_resume_reply): Report the core.
12998 (buffer_xml_printf): Support %d specifier.
12999 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13000 New.
13001 (handle_query): Handle qXfer:threads. Announce availability
13002 thereof.
13003 * target.h (struct target_ops): New field core_of_thread.
13004
13005 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * Makefile.in (clean): Remove new generated files.
13008 (reg-s390.o, reg-s390.c): Remove rules.
13009 (reg-s390x.o, reg-s390x.c): Likewise.
13010 (s390-linux32.o, s390-linux32.c): Add rules.
13011 (s390-linux64.o, s390-linux64.c): Likewise.
13012 (s390x-linux64.o, s390x-linux64.c): Likewise.
13013 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13014 * linux-s390-low.c: Include <elf.h>.
13015 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13016 (init_registers_s390): Remove prototype.
13017 (init_registers_s390x): Likewise.
13018 (init_registers_s390_linux32): Add prototype.
13019 (init_registers_s390_linux64): Likewise.
13020 (init_registers_s390x_linux64): Likewise.
13021 (s390_num_regs_3264): New define.
13022 (s390_regmap_3264): New global variable.
13023 (s390_cannot_fetch_register): Remove obsolete check.
13024 (s390_cannot_store_register): Likewise.
13025 (s390_collect_ptrace_register): Handle upper/lower register halves.
13026 (s390_supply_ptrace_register): Likewise.
13027 (s390_fill_gregset): Update to register number changes.
13028 (s390_get_hwcap): New routine.
13029 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13030 Install appropriate regmap and register set.
13031
13032 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13033
13034 * server.c (gdbserver_version): Update copyright year to 2010.
13035 * gdbreplay.c (gdbreplay_version): Likewise.
13036
13037 2009-12-28 Doug Evans <dje@google.com>
13038
13039 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13040 elf/external.h. Include <elf.h> instead but only if necessary.
13041
13042 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13043
13044 * linux-low.c (linux_remove_process): Remove `detaching'
13045 parameter. Don't release/detach from thread_db here.
13046 (linux_kill): Release/detach from thread_db here, ...
13047 (linux_detach): ... and here, before actually detaching.
13048 (linux_wait_1): ... and here, when a process exits.
13049 * thread-db.c (any_thread_of): New.
13050 (thread_db_free): Switch the current inferior to a thread of the
13051 passed in process.
13052
13053 2009-12-21 Doug Evans <dje@google.com>
13054
13055 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13056
13057 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13058 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13059 warning ifndef __NR_tkill. Move setting of errno there too.
13060 Delete unnecessary resetting of errno after syscall.
13061 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13062
13063 * configure.ac: Check for dladdr.
13064 * config.in: Regenerate.
13065 * configure: Regenerate.
13066 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13067 (try_thread_db_load): Update.
13068
13069 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13070
13071 2009-12-18 Doug Evans <dje@google.com>
13072
13073 * event-loop.c: Include unistd.h if it exists.
13074
13075 * linux-low.c (my_waitpid): Move definition away from being in
13076 between linux_tracefork_child/linux_test_for_tracefork.
13077
13078 * gdb_proc_service.h (psaddr_t): Fix type.
13079 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13080 signature to match glibc.
13081
13082 2009-12-16 Doug Evans <dje@google.com>
13083
13084 * linux-low.c (linux_read_memory): Fix argument to read.
13085
13086 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13087
13088 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13089 events, don't leave current_inferior pointing at null.
13090
13091 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13092
13093 * win32-low.c (LOG): Delete.
13094 (OUTMSG): Output to stderr.
13095 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13096 on compile time LOG macro.
13097 (win32_wait): Fix debug output.
13098
13099 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13100
13101 * win32-low.c (win32_add_one_solib): If the dll name is
13102 "ntdll.dll", prepend the system directory to the dll path.
13103
13104 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13105
13106 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13107
13108 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13109 Vladimir Prus <vladimir@codesourcery.com>
13110
13111 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13112 * configure.ac: Check for __mcoldfire__ and set
13113 gdb_cv_m68k_is_coldfire.
13114 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13115 reg-cf.o and reg-m68k.o.
13116 * configure: Regenerated.
13117
13118 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13119
13120 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13121 Pass it to thread_db_free.
13122 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13123 proper `detaching' argument to linux_remove_process.
13124 * linux-low.h (thread_db_free): Add `detaching' parameter.
13125 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13126 to thread_db_free.
13127 (thread_db_free): Add `detaching' parameter. Only
13128 call td_ta_clear_event if detaching from process.
13129
13130 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13131
13132 * thread-db.c (thread_db_free): Fix typo.
13133
13134 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13135
13136 PR gdb/10838
13137 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13138
13139 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13140
13141 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13142 with an i686 compiler.
13143 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13144 needed.
13145 * configure: Rebuilt.
13146
13147 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13148
13149 PR gdb/10783
13150
13151 * server.c (handle_search_memory_1): Correct read_addr initialization
13152 in loop for searching subsequent chunks.
13153
13154 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13155
13156 * configure.ac: New --with-libthread-db option.
13157 * thread-db.c: Allow direct dependence on libthread_db.
13158 (thread_db_free): Adjust.
13159 * config.in: Regenerate.
13160 * configure: Likewise.
13161
13162 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13163
13164 PR gdb/10757
13165 * thread-db.c (attach_thread): New function.
13166 (maybe_attach_thread): Return success/failure.
13167 (find_new_threads_callback): Adjust.
13168 (thread_db_find_new_threads): Loop until no new threads.
13169
13170 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13171
13172 * proc-service.c (ps_lgetregs): Formatting.
13173
13174 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13175
13176 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13177 * configure.ac: Adjust.
13178 * linux-low.h (struct process_info_private): Move members to struct
13179 thread_db.
13180 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13181 * linux-low.c (linux_remove_process): Adjust.
13182 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13183 * server.c (handle_query): Move code ...
13184 (handle_monitor_command): ... here. New function.
13185 * target.h (struct target_ops): New member.
13186 * thread-db.c (struct thread_db): New.
13187 (libthread_db_search_path): New variable.
13188 (thread_db_create_event, thread_db_enable_reporting)
13189 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13190 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13191 (try_thread_db_load_1, dladdr_to_soname): New functions.
13192 (try_thread_db_load, thread_db_load_search): New functions.
13193 (thread_db_init): Search for libthread_db.
13194 (thread_db_free): New function.
13195 (thread_db_handle_monitor_command): Likewise.
13196 * config.in: Regenerate.
13197 * configure: Regenerate.
13198
13199 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13200
13201 * spu-low.c (spu_kill): Wait for inferior to terminate.
13202 Call clear_inferiors.
13203 (spu_detach): Call clear_inferiors.
13204
13205 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13206
13207 * aclocal.m4: Regenerate.
13208 * config.in: Likewise.
13209 * configure: Likewise.
13210
13211 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13212
13213 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13214 (parse_spufs_run): New function.
13215 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13216 (ppc_breakpoint_at): Handle SPU breakpoints.
13217
13218 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13219
13220 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13221 (SPUFS_MAGIC): Define.
13222 (spu_enumerate_spu_ids): New function.
13223 (linux_qxfer_spu): New function.
13224 (linux_target_ops): Install linux_qxfer_spu.
13225
13226 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13227
13228 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13229 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13230 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13231 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13232 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13233 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13234 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13235 (init_registers_powerpc_cell32l): Add prototype.
13236 (init_registers_powerpc_cell64l): Likewise.
13237 (ppc_arch_setup): Detect Cell/B.E. architecture.
13238
13239 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13240
13241 * Makefile.in (datarootdir): New variable.
13242
13243 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13244
13245 * linux-low.c (linux_write_memory): Update debugging output.
13246 * Makefile.in (clean): Add new descriptions.
13247 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13248 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13249 * configure.srv: Add new files for arm*-*-linux*.
13250 * linux-arm-low.c: Add new declarations.
13251 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13252 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13253 (HWCAP_VFPv3D16): New.
13254 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13255 instead of __IWMMXT__.
13256 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13257 (arm_arch_setup): New.
13258 (target_regsets): Remove #ifdef. Add VFP regset.
13259 (the_low_target): Use arm_arch_setup.
13260
13261 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13262
13263 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13264 the main thread again.
13265
13266 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13267
13268 Adding Neutrino gdbserver.
13269 * configure: Regenerated.
13270 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13271 * configure.srv (i[34567]86-*-nto*): New target.
13272 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13273 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13274 (nto_comctrl) [__QNX__]: New function.
13275 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13276
13277 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13278
13279 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13280 srv_tgtobj.
13281
13282 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13283 Pedro Alves <pedro@codesourcery.com>
13284
13285 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13286 don't support CONTEXT_EXTENDED_REGISTERS.
13287 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13288 (the_low_target): Install them.
13289 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13290 failing with ERROR_PIPE_NOT_CONNECTED.
13291
13292 2009-06-30 Doug Evans <dje@google.com>
13293 Pierre Muller <muller@ics.u-strasbg.fr>
13294
13295 Add h/w watchpoint support to x86-linux, win32-i386.
13296 * Makefile.in (SFILES): Add i386-low.c
13297 (i386_low_h): Define.
13298 (i386-low.o): Add dependencies.
13299 (linux-x86-low.o): Add i386-low.h dependency.
13300 (win32-i386-low.o): Ditto.
13301 * i386-low.c: New file.
13302 * i386-low.h: New file.
13303 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13304 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13305 * linux-low.c (linux_add_process): Initialize arch_private.
13306 (linux_remove_process): Free arch_private.
13307 (add_lwp): Initialize arch_private.
13308 (delete_lwp): Free arch_private.
13309 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13310 provided.
13311 * linux-low.h (process_info_private): New member arch_private.
13312 (lwp_info): New member arch_private.
13313 (linux_target_ops): New members new_process, new_thread,
13314 prepare_to_resume.
13315 (ptid_of): New macro.
13316 * linux-x86-low.c: Include stddef.h, i386-low.h.
13317 (arch_process_info): New struct.
13318 (arch_lwp_info): New struct.
13319 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13320 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13321 (i386_dr_low_get_status): New function.
13322 (x86_insert_point, x86_remove_point): New functions.
13323 (x86_stopped_by_watchpoint): New function.
13324 (x86_stopped_data_address): New function.
13325 (x86_linux_new_process, x86_linux_new_thread): New functions.
13326 (x86_linux_prepare_to_resume): New function.
13327 (the_low_target): Add entries for insert_point, remove_point,
13328 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13329 prepare_to_resume.
13330 * server.c (debug_hw_points): New global.
13331 (monitor_show_help): Document set debug-hw-points.
13332 (handle_query): Process "set debug-hw-points".
13333 * server.h (debug_hw_points): Declare.
13334 (paddress): Declare.
13335 * utils.c (NUMCELLS, CELLSIZE): New macros.
13336 (get_sell, xsnprintf, paddress): New functions.
13337 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13338 remove_point, stopped_by_watchpoint, stopped_data_address.
13339 * win32-i386-low.c: Include i386-low.h.
13340 (debug_reg_state): Replaces dr.
13341 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13342 (i386_dr_low_get_status): New function.
13343 (i386_insert_point, i386_remove_point): New functions.
13344 (i386_stopped_by_watchpoint): New function.
13345 (i386_stopped_data_address): New function.
13346 (i386_initial_stuff): Update.
13347 (get_thread_context,set_thread_context,i386_thread_added): Update.
13348 (the_low_target): Add entries for insert_point,
13349 remove_point, stopped_by_watchpoint, stopped_data_address.
13350 * win32-low.c (win32_insert_watchpoint): New function.
13351 (win32_remove_watchpoint): New function.
13352 (win32_stopped_by_watchpoint): New function.
13353 (win32_stopped_data_address): New function.
13354 (win32_target_ops): Add entries for insert_watchpoint,
13355 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13356 * win32-low.h (win32_target_ops): New members insert_point,
13357 remove_point, stopped_by_watchpoint, stopped_data_address.
13358
13359 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13360
13361 * server.c (process_serial_event): Re-return unsupported, not
13362 error, if the type isn't recognized. Re-allow supporting only
13363 insert or remove packets. Also call require_running for
13364 breakpoints. Add missing break statement to default case. Tidy.
13365 * target.h (struct target_ops): Rename insert_watchpoint to
13366 insert_point, and remove_watchpoint to remove_point.
13367
13368 * linux-low.h (struct linux_target_ops): Likewise.
13369 * linux-low.c (linux_insert_watchpoint): Rename to ...
13370 (linux_insert_point): ... this. Adjust.
13371 (linux_remove_watchpoint): Rename to ...
13372 (linux_remove_point): ... this. Adjust.
13373 (linux_target_ops): Adjust.
13374 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13375 (cris_insert_point): ... this.
13376 (cris_remove_watchpoint): Rename to ...
13377 (cris_remove_point): ... this.
13378 (the_low_target): Adjust.
13379
13380 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13381
13382 * server.c (handle_v_kill): Pass signal_pid to
13383 kill_inferior if multi_process is zero.
13384
13385 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13386
13387 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13388 * target.h (target_ops): Comment for *_watchpoint to make it clear
13389 the functions can get types '0' and '1'.
13390
13391 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13392
13393 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13394 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13395 * regcache.c (get_regcache): Likewise.
13396 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13397 * win32-low.c (child_fetch_inferior_registers): Remove check for
13398 regno 0.
13399
13400 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13401 Pedro Alves <pedro@codesourcery.com>
13402
13403 * target.h (struct target_ops) <supports_multi_process>: New
13404 callback.
13405 (target_supports_multi_process): New.
13406 * server.c (handle_query): Even if GDB reports support, only
13407 enable multi-process if the target also supports it. Report
13408 multi-process support only if the target backend supports it.
13409 * linux-low.c (linux_supports_multi_process): New function.
13410 (linux_target_ops): Install it as target_supports_multi_process
13411 callback.
13412
13413 2009-05-24 Doug Evans <dje@google.com>
13414
13415 Global renaming of find_thread_pid to find_thread_ptid.
13416 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13417 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13418 All callers updated.
13419
13420 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13421 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13422 directly.
13423
13424 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13425 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13426 (linux_resume_one_lwp): Ditto.
13427
13428 2009-05-23 Doug Evans <dje@google.com>
13429
13430 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13431 from struct inferior_list_entry * to struct lwp_info *.
13432 All callers updated.
13433
13434 2009-05-13 Doug Evans <dje@google.com>
13435
13436 * linux-x86-low.c: Don't include assert.h.
13437 (x86_siginfo_fixup): Use fatal, not assert.
13438 (x86_arch_setup): Fix comment.
13439
13440 2009-05-12 Doug Evans <dje@google.com>
13441
13442 Biarch support for i386/amd64 gdbserver.
13443 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13444 Add linux-x86-low.c.
13445 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13446 (linux-x86-low.o): Add.
13447 * linux-x86-64-low.c: Delete.
13448 * linux-i386-low.c: Delete.
13449 * linux-x86-low.c: New file.
13450 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13451 linux-x86-low.o.
13452 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13453 linux-x86-low.o.
13454 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13455 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13456 (linux_child_pid_to_exec_file): New function.
13457 (elf_64_header_p, elf_64_file_p): New functions.
13458 (siginfo_fixup): New function.
13459 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13460 give target a chance to convert layout.
13461 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13462 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13463
13464 2009-05-07 Doug Evans <dje@google.com>
13465
13466 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13467 (regsets_store_inferior_registers): Ditto.
13468
13469 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13470
13471 PR server/10048
13472
13473 * linux-low.c (must_set_ptrace_flags): Delete.
13474 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13475 of the global.
13476 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13477 `lwp->must_set_ptrace_flags' instead.
13478 (linux_wait_for_event_1): Set ptrace options here.
13479 (linux_wait_1): ... not here.
13480
13481 2009-04-30 Doug Evans <dje@google.com>
13482
13483 * inferiors.c (started_inferior_callback): New function.
13484 (attached_inferior_callback): New function.
13485 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13486 * server.c (print_started_pid, print_attached_pid): New functions.
13487 (detach_or_kill_for_exit): New function.
13488 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13489 * server.h (have_started_inferiors_p): Declare.
13490 (have_attached_inferiors_p): Declare.
13491
13492 * inferiors.c (remove_process): Fix memory leak, free process.
13493 * linux-low.c (linux_remove_process): New function.
13494 (linux_kill): Call it instead of remove_process.
13495 (linux_detach, linux_wait_1): Ditto.
13496
13497 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13498
13499 * configure.srv: Add x86 Windows CE target.
13500
13501 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13502
13503 * inferiors.c (get_thread_process): Make global.
13504 * server.h (get_thread_process): Add prototype.
13505 * thread-db.c (find_one_thread): Use get_thread_process
13506 instead of current_process.
13507 (thread_db_get_tls_address): Do not crash if called when
13508 thread layer is not yet initialized.
13509
13510 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13511
13512 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13513 * spu-low.c (current_tid): Rename to ...
13514 (current_ptid): ... this.
13515 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13516 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13517 ptid_get_lwp (current_ptid) instead of current_tid.
13518 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13519 instead of current_tid. Use find_process_pid to verify pid
13520 argument is valid. Pass proper argument to remove_process.
13521 (spu_thread_alive): Compare current_ptid instead of current_tid.
13522 (spu_resume): Likewise.
13523
13524 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13525
13526 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13527 variable.
13528
13529 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13530
13531 Implement the multiprocess extensions, and add linux multiprocess
13532 support.
13533
13534 * server.h (ULONGEST): Declare.
13535 (struct ptid, ptid_t): New.
13536 (minus_one_ptid, null_ptid): Declare.
13537 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13538 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13539 (struct inferior_list_entry): Change `id' type from unsigned from
13540 to ptid_t.
13541 (struct sym_cache, struct breakpoint, struct
13542 process_info_private): Forward declare.
13543 (struct process_info): Declare.
13544 (current_process): Declare.
13545 (all_processes): Declare.
13546 (initialize_inferiors): Declare.
13547 (add_thread): Adjust to use ptid_t.
13548 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13549 (add_process, remove_process, find_thread_pid): Declare.
13550 (find_inferior_id): Adjust to use ptid_t.
13551 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13552 (multi_process): Declare.
13553 (push_event): Adjust to use ptid_t.
13554 (read_ptid, write_ptid): Declare.
13555 (prepare_resume_reply): Adjust to use ptid_t.
13556 (clear_symbol_cache): Declare.
13557 * inferiors.c (all_processes): New.
13558 (null_ptid, minus_one_ptid): New.
13559 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13560 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13561 (add_thread): Change unsigned long to ptid. Remove gdb_id
13562 parameter. Adjust.
13563 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13564 (gdb_id_to_thread): Rename to ...
13565 (find_thread_pid): ... this. Change unsigned long to ptid.
13566 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13567 (loaded_dll, pull_pid_from_list): Adjust.
13568 (add_process, remove_process, find_process_pid)
13569 (get_thread_process, current_process, initialize_inferiors): New.
13570 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13571 (struct target_waitstatus) <related_pid>: Ditto.
13572 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13573 return type to int.
13574 (struct target_ops) <join>: Add `pid' argument.
13575 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13576 (struct target_ops) <wait>: Add `ptid' field. Change return type
13577 to ptid.
13578 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13579 (mywait): Add `ptid' argument. Change return type to ptid_t.
13580 (target_pid_to_str): Declare.
13581 * target.c (set_desired_inferior): Adjust to use ptids.
13582 (mywait): Add new `ptid' argument. Adjust.
13583 (target_pid_to_str): New.
13584 * mem-break.h (free_all_breakpoints): Declare.
13585 * mem-break.c (breakpoints): Delelete.
13586 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13587 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13588 to use per-process breakpoint list.
13589 (free_all_breakpoints): New.
13590 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13591 (symbol_cache, all_symbols_looked_up): Delete.
13592 (hexchars): New.
13593 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13594 read_ptid): New.
13595 (prepare_resume_reply): Change ptid argument's type from unsigned
13596 long to ptid_t. Adjust. Implement W;process and X;process.
13597 (free_sym_cache, clear_symbol_cache): New.
13598 (look_up_one_symbol): Adjust to per-process symbol cache. *
13599 * server.c (cont_thread, general_thread, step_thread): Change type
13600 to ptid_t.
13601 (attached): Delete.
13602 (multi_process): New.
13603 (last_ptid): Change type to ptid_t.
13604 (struct vstop_notif) <ptid>: Change type to ptid_t.
13605 (queue_stop_reply, push_event): Change `ptid' argument's type to
13606 ptid_t.
13607 (discard_queued_stop_replies): Add `pid' argument.
13608 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13609 changes. Don't reference the `attached' global.
13610 (attach_inferior): Adjust to mywait interface changes.
13611 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13612 features. Handle and report "multiprocess+". Handle
13613 "qAttached:PID".
13614 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13615 changes.
13616 (handle_v_kill): New.
13617 (handle_v_stopped): Adjust to use target_pid_to_str.
13618 (handle_v_requests): Allow multiple attaches and runs when
13619 multiprocess extensions are in effect. Handle "vKill".
13620 (myresume): Adjust to use ptids.
13621 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13622 (handle_status): Adjust to discard_queued_stop_replies interface
13623 change.
13624 (first_thread_of, kill_inferior_callback)
13625 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13626 (main): Call initialize_inferiors. Adjust to use ptids, killing
13627 and detaching from all inferiors. Handle multiprocess packet
13628 variants.
13629 * linux-low.h: Include gdb_proc_service.h.
13630 (struct process_info_private): New.
13631 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13632 <lwpid_of>: Use ptid_get_lwp.
13633 (get_lwp_thread): Adjust.
13634 (struct lwp_info): Add `dead' member.
13635 (find_lwp_pid): Declare.
13636 * linux-low.c (thread_db_active): Delete.
13637 (new_inferior): Adjust comment.
13638 (inferior_pid): Delete.
13639 (linux_add_process): New.
13640 (handle_extended_wait): Adjust.
13641 (add_lwp): Change unsigned long to ptid.
13642 (linux_create_inferior): Add process to processes table. Adjust
13643 to use ptids. Don't set new_inferior here.
13644 (linux_attach_lwp): Rename to ...
13645 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13646 it. Adjust to use ptids.
13647 (linux_attach_lwp): New.
13648 (linux_attach): Add process to processes table. Don't set
13649 new_inferior here.
13650 (struct counter): New.
13651 (second_thread_of_pid_p, last_thread_of_process_p): New.
13652 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13653 multiple processes.
13654 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13655 processes. Remove process from process table.
13656 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13657 to multiple processes.
13658 (any_thread_of): New.
13659 (linux_detach): Add `pid' argument, and handle it. Remove process
13660 from processes table.
13661 (linux_join): Add `pid' argument. Handle it.
13662 (linux_thread_alive): Change unsighed long argument to ptid_t.
13663 Consider dead lwps as not being alive.
13664 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13665 threads we're not interested in.
13666 (same_lwp, find_lwp_pid): New.
13667 (linux_wait_for_lwp): Change `pid' argument's type from int to
13668 ptid_t. Adjust.
13669 (linux_wait_for_event): Rename to ...
13670 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13671 from int to ptid_t. Adjust.
13672 (linux_wait_for_event): New.
13673 (linux_wait_1): Add `ptid' argument. Change return type to
13674 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13675 that exit from the process table.
13676 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13677 Adjust.
13678 (mark_lwp_dead): New.
13679 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13680 stopping all threads, mark its main lwp as dead.
13681 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13682 ptids.
13683 (fetch_register, usr_store_inferior_registers)
13684 (regsets_fetch_inferior_registers)
13685 (regsets_store_inferior_registers, linux_read_memory)
13686 (linux_write_memory): Inline `inferior_pid'.
13687 (linux_look_up_symbols): Adjust to use per-process
13688 `thread_db_active'.
13689 (linux_request_interrupt): Adjust to use ptids.
13690 (linux_read_auxv): Inline `inferior_pid'.
13691 (initialize_low): Don't reference thread_db_active.
13692 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13693 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13694 (ps_getpid): Return the pid of the current inferior.
13695 * thread-db.c (proc_handle, thread_agent): Delete.
13696 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13697 per-process data.
13698 (find_one_thread): Change argument type to ptid_t. Adjust to
13699 per-process data.
13700 (maybe_attach_thread): Adjust to per-process data and ptids.
13701 (thread_db_find_new_threads): Ditto.
13702 (thread_db_init): Ditto.
13703 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13704 processes table. Adjust to use ptids.
13705 (spu_kill, spu_detach): Adjust interface. Remove process from
13706 processes table.
13707 (spu_join, spu_thread_alive): Adjust interface.
13708 (spu_wait): Adjust interface. Remove process from processes
13709 table. Adjust to use ptids.
13710 * win32-low.c (current_inferior_tid): Delete.
13711 (current_inferior_ptid): New.
13712 (debug_event_ptid): New.
13713 (thread_rec): Take a ptid. Adjust.
13714 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13715 (child_delete_thread): Ditto.
13716 (do_initial_child_stuff): Add `attached' argument. Add process to
13717 processes table.
13718 (child_fetch_inferior_registers, child_store_inferior_registers):
13719 Adjust.
13720 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13721 (win32_attach): Pass 1 to do_initial_child_stuff.
13722 (win32_kill): Adjust interface. Remove process from processes
13723 table.
13724 (win32_detach): Ditto.
13725 (win32_join): Adjust interface.
13726 (win32_thread_alive): Take a ptid.
13727 (win32_resume): Adjust to use ptids.
13728 (get_child_debug_event): Ditto.
13729 (win32_wait): Adjust interface. Remove exiting process from
13730 processes table.
13731
13732 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13733
13734 Non-stop mode support.
13735
13736 * server.h (non_stop): Declare.
13737 (gdb_client_data, handler_func): Declare.
13738 (delete_file_handler, add_file_handler, start_event_loop):
13739 Declare.
13740 (handle_serial_event, handle_target_event, push_event)
13741 (putpkt_notif): Declare.
13742 * target.h (enum resume_kind): New.
13743 (struct thread_resume): Replace `step' field by `kind' field.
13744 (TARGET_WNOHANG): Define.
13745 (struct target_ops) <wait>: Add `options' argument.
13746 <supports_non_stop, async, start_non_stop>: New fields.
13747 (target_supports_non_stop, target_async): New.
13748 (start_non_stop): Declare.
13749 (mywait): Add `options' argument.
13750 * target.c (mywait): Add `options' argument. Print child exit
13751 notifications here.
13752 (start_non_stop): New.
13753 * server.c (non_stop, own_buf, mem_buf): New globals.
13754 (struct vstop_notif): New.
13755 (notif_queue): New global.
13756 (queue_stop_reply, push_event, discard_queued_stop_replies)
13757 (send_next_stop_reply): New.
13758 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13759 interface changes.
13760 (attach_inferior): In non-stop mode, don't wait for the target
13761 here.
13762 (handle_general_set): Handle QNonStop.
13763 (handle_query): When handling qC, return the current general
13764 thread, instead of the first thread of the list.
13765 (handle_query): If the backend supports non-stop mode, include
13766 QNonStop+ in the qSupported query response.
13767 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13768 and non-stop mode.
13769 (handle_v_attach, handle_v_run): Handle non-stop mode.
13770 (handle_v_stopped): New.
13771 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13772 (myresume): Adjust to use resume_kind. Handle non-stop.
13773 (queue_stop_reply_callback): New.
13774 (handle_status): Handle non-stop mode.
13775 (main): Clear non_stop flag on reconnection. Use the event-loop.
13776 Refactor serial protocol handling from here ...
13777 (process_serial_event): ... to this new function. When GDB
13778 selects any thread, select one here. In non-stop mode, wait until
13779 GDB acks all pending events before exiting.
13780 (handle_serial_event, handle_target_event): New.
13781 * remote-utils.c (remote_open): Install remote_desc in the event
13782 loop.
13783 (remote_close): Remove remote_desc from the event loop.
13784 (putpkt_binary): Rename to...
13785 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13786 (putpkt_binary): New as wrapper around putpkt_binary_1.
13787 (putpkt_notif): New.
13788 (prepare_resume_reply): In non-stop mode, don't change the
13789 general_thread.
13790 * event-loop.c: New.
13791 * Makefile.in (OBJ): Add event-loop.o.
13792 (event-loop.o): New rule.
13793
13794 * linux-low.h (pid_of): Moved here.
13795 (lwpid_of): New.
13796 (get_lwp_thread): Use lwpid_of.
13797 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13798 * linux-low.c (pid_of): Delete.
13799 (inferior_pid): Use lwpid_of.
13800 (linux_event_pipe): New.
13801 (target_is_async_p): New.
13802 (delete_lwp): New.
13803 (handle_extended_wait): Use lwpid_of.
13804 (add_lwp): Don't set lwpid field.
13805 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13806 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13807 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13808 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13809 first. Adjust to linux_wait_for_event interface changes. Use
13810 lwpid_of.
13811 (linux_detach): Don't delete the main lwp here.
13812 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13813 (status_pending_p): Don't consider explicitly suspended lwps.
13814 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13815 pointer. Add OPTIONS argument. Change return type to int. Use
13816 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13817 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13818 pointer. Add status pointer argument. Return a pid instead of a
13819 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13820 changes. In non-stop mode, don't switch to a random thread.
13821 (linux_wait): Rename to...
13822 (linux_wait_1): ... this. Add target_options argument, and handle
13823 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13824 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13825 clean exit and signal exit code. Don't stop all threads in
13826 non-stop mode. In all-stop mode, only stop all threads when
13827 reporting a stop to GDB. Handle explicit thread stop requests.
13828 (async_file_flush, async_file_mark): New.
13829 (linux_wait): New.
13830 (send_sigstop): Use lwpid_of.
13831 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13832 interface changes. In non-stop mode, don't switch to a random
13833 thread.
13834 (linux_resume_one_lwp): Use lwpid_of.
13835 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13836 (linux_resume_one_thread): ... this. Handle resume_stop. In
13837 non-stop mode, don't look for pending flag in all threads.
13838 (resume_status_pending_p): Don't consider explicitly suspended
13839 threads.
13840 (my_waitpid): Reimplement. Emulate __WALL.
13841 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13842 Use lwpid_of.
13843 (sigchld_handler, linux_supports_non_stop, linux_async)
13844 (linux_start_non_stop): New.
13845 (linux_target_ops): Register linux_supports_non_stop, linux_async
13846 and linux_start_non_stop.
13847 (initialize_low): Install SIGCHLD handler.
13848 * thread-db.c (thread_db_create_event, find_one_thread)
13849 (thread_db_get_tls_address): Use lwpid_of.
13850 * win32-low.c (win32_detach): Adjust to use resume_kind.
13851 (win32_wait): Add `options' argument.
13852 * spu-low.c (spu_resume): Adjust to use resume_kind.
13853 (spu_wait): Add `options' argument.
13854
13855 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13856
13857 Decouple target code from remote protocol.
13858
13859 * target.h (enum target_waitkind): New.
13860 (struct target_waitstatus): New.
13861 (struct target_ops) <wait>: Return an unsigned long. Take a
13862 target_waitstatus pointer instead of a char pointer.
13863 (mywait): Likewise.
13864 * target.c (mywait): Change prototype to return an unsigned long.
13865 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13866 * server.h (thread_from_wait, old_thread_from_wait): Delete
13867 declarations.
13868 (prepare_resume_reply): Change prototype to take a
13869 target_waitstatus.
13870 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13871 (last_status, last_ptid): New.
13872 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13873 pid instead of a signal.
13874 (attach_inferior): Remove "status" and "signal" parameters.
13875 Adjust.
13876 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13877 not as an address.
13878 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13879 (handle_v_requests, myresume): Remove "status" and "signal"
13880 parameters. Adjust.
13881 (handle_status): New.
13882 (main): Delete local `status'. Adjust.
13883 * remote-utils.c: Include target.h.
13884 (prepare_resume_reply): Change prototype to take a
13885 target_waitstatus. Adjust.
13886
13887 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13888 interface.
13889 * spu-low.c (spu_wait): Adjust.
13890 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13891 Delete.
13892 (win32_wait): Adjust.
13893
13894 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13895
13896 * target.h (struct thread_resume): Delete leave_stopped member.
13897 (struct target_ops): Add a `n' argument to the `resume' callback.
13898 * server.c (start_inferior): Adjust.
13899 (handle_v_cont, myresume): Adjust.
13900 * linux-low.c (check_removed_breakpoint): Adjust to resume
13901 interface change, and to removed leave_stopped field.
13902 (resume_ptr): Delete.
13903 (struct thread_resume_array): New.
13904 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13905 resume interface change.
13906 (linux_continue_one_thread, linux_queue_one_thread)
13907 (resume_status_pending_p): Check if the resume field is NULL
13908 instead of checking the leave_stopped member.
13909 (linux_resume): Adjust to the target resume interface change.
13910 * spu-low.c (spu_resume): Adjust to the target resume interface
13911 change.
13912 * win32-low.c (win32_detach, win32_resume): Ditto.
13913
13914 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13915
13916 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13917 flag.
13918 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13919 pending.
13920 (linux_continue_one_thread): Only preserve the stepping flag if
13921 there's a pending breakpoint.
13922
13923 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13924
13925 * server.c (main): After the inferior having exited, call
13926 remote_close before exiting gdbserver.
13927
13928 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13929
13930 Fix size of FPSCR in Power 7 processors.
13931 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13932 (PPC_FEATURE_HAS_DFP): New #define.
13933 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13934 size of the FPSCR.
13935
13936 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13937
13938 * server.c (handle_query) Whitespace and formatting.
13939
13940 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13941
13942 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13943 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13944 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13945 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13946 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13947 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13948 Makefile.in, configure.ac: Fix whitespace throughout.
13949 * configure: Regenerate.
13950
13951 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13952
13953 * inferiors.c (find_inferior): Make it safe for the callback
13954 function to delete the currently iterated inferior.
13955
13956 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13957
13958 * Makefile.in (linuw_low_h): Move higher.
13959 (thread-db.o): Depend on $(linux_low_h).
13960
13961 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13962
13963 Rename "process" to "lwp" throughout.
13964
13965 * linux-low.c (all_processes): Rename to...
13966 (all_lwps): ... this.
13967 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13968 (add_process): Rename to ...
13969 (add_lwp): ... this. Adjust.
13970 (linux_create_inferior): Adjust.
13971 (linux_attach_lwp): Adjust.
13972 (linux_attach): Adjust.
13973 (linux_kill_one_process): Rename to ...
13974 (linux_kill_one_lwp): ... this. Adjust.
13975 (linux_kill): Adjust.
13976 (linux_detach_one_process): Rename to ...
13977 (linux_detach_one_lwp): ... this. Adjust.
13978 (linux_detach): Adjust.
13979 (check_removed_breakpoint): Adjust.
13980 (status_pending_p): Adjust.
13981 (linux_wait_for_process): Rename to ...
13982 (linux_wait_for_lwp): ... this. Adjust.
13983 (linux_wait_for_event): Adjust.
13984 (send_sigstop): Adjust.
13985 (wait_for_sigstop): Adjust.
13986 (stop_all_processes): Rename to ...
13987 (stop_all_lwps): ... this.
13988 (linux_resume_one_process): Rename to ...
13989 (linux_resume_one_lwp): ... this. Adjust.
13990 (linux_set_resume_request, linux_continue_one_thread)
13991 (linux_queue_one_thread, resume_status_pending_p)
13992 (usr_store_inferior_registers, regsets_store_inferior_registers)
13993 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13994 Adjust.
13995 * linux-low.h (get_process): Rename to ...
13996 (get_lwp): ... this. Adjust.
13997 (get_thread_process): Rename to ...
13998 (get_thread_lwp): ... this. Adjust.
13999 (get_process_thread): Rename to ...
14000 (get_lwp_thread): ... this. Adjust.
14001 (struct process_info): Rename to ...
14002 (struct lwp_info): ... this.
14003 (all_processes): Rename to ...
14004 (all_lwps): ... this.
14005 * proc-service.c (ps_lgetregs): Adjust.
14006 * thread-db.c (thread_db_create_event, find_one_thread)
14007 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14008
14009 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14010
14011 * server.c (handle_query): Handle "qAttached".
14012
14013 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14014
14015 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14016 GPLv3, update license URL.
14017
14018 2009-03-01 Doug Evans <dje@google.com>
14019
14020 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14021 (server_h): Add gdb_signals.h.
14022 (signals.o): Update.
14023 * server.h (target_signal_from_host,target_signal_to_host_p)
14024 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14025
14026 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14027
14028 * remote-utils.c (getpkt): Also generate remote-debug
14029 information if noack_mode is set.
14030
14031 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14032
14033 * server.c (handle_query): Report qXfer:siginfo:read and
14034 qXfer:siginfo:write as supported and handle them.
14035 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14036 * linux-low.c (linux_xfer_siginfo): New.
14037 (linux_target_ops): Set it.
14038
14039 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14040
14041 * server.c (gdbserver_usage): Mention --remote-debug.
14042 (main): Accept '--remote-debug' switch.
14043
14044 2009-01-18 Doug Evans <dje@google.com>
14045
14046 * regcache.c (new_register_cache): No need to check result of xcalloc.
14047 * server.c (handle_search_memory): Back out calls to xmalloc,
14048 result is checked and error is returned to user upon failure.
14049 (handle_query): Ditto. Add more checks for result of malloc.
14050 (handle_v_cont): Check result of malloc, report error back to
14051 user upon failure.
14052 (handle_v_run): Ditto. Call freeargv.
14053 * server.h (freeargv): Declare.
14054 * utils.c (freeargv): New fn.
14055
14056 2009-01-15 Doug Evans <dje@google.com>
14057
14058 * gdbreplay.c (perror_with_name): Make arg const char *.
14059 * server.h (target_signal_to_name): Make return type const char *.
14060 * thread-db.c (thread_db_err_str): Make return type const char *.
14061 * utils.c (perror_with_name): Make arg const char *.
14062
14063 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14064
14065 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14066 when handling a EXIT_PROCESS_DEBUG_EVENT.
14067
14068 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14069
14070 * gdbreplay.c (gdbreplay_version): Update copyright year.
14071 * server.c (gdbserver_version): Likewise.
14072
14073 2009-01-05 Doug Evans <dje@google.com>
14074
14075 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14076 (handle_extended_wait): Improve comment.
14077
14078 2008-12-13 Doug Evans <dje@google.com>
14079
14080 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14081 * server.h (ATTR_MALLOC): New macro.
14082 (xmalloc,xcalloc,xstrdup): Declare.
14083 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14084 * inferiors.c: Ditto.
14085 * linux-low.c: Ditto.
14086 * mem-break.c: Ditto.
14087 * regcache.c: Ditto.
14088 * remote-utils.c: Ditto.
14089 * server.c: Ditto.
14090 * target.c: Ditto.
14091 * win32-low.c: Ditto.
14092
14093 2008-12-12 Doug Evans <dje@google.com>
14094
14095 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14096 in debugging printf.
14097
14098 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14099
14100 2008-12-09 Doug Evans <dje@google.com>
14101
14102 * linux-low.h (struct process_info): Delete member tid, unused.
14103 * thread-db.c (find_one_thread): Update.
14104 (maybe_attach_thread): Update.
14105
14106 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14107
14108 * target.h (struct target_ops): Add qxfer_osdata member.
14109 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14110 and dirent.h.
14111 (linux_qxfer_osdata): New functions.
14112 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14113 callback.
14114 * server.c (handle_query): Handle "qXfer:osdata:read:".
14115 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14116 (buffer_xml_printf): New functions.
14117 * server.h (struct buffer): New.
14118 (buffer_grow_str, buffer_grow_str0): New macros.
14119 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14120 (buffer_xml_printf): Declare.
14121
14122 2008-11-24 Doug Evans <dje@google.com>
14123
14124 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14125
14126 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14127
14128 * server.c (handle_v_run): Always use the supplied argument list.
14129
14130 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14131
14132 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14133 (xtensa_regmap_table): Add entry for scompare1.
14134
14135 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14136
14137 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14138 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14139 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14140 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14141 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14142 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14143 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14144 XML target descriptions.
14145 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14146 when inferior is running on an ISA 2.05 or later processor. Add
14147 special case to return offset for full 64-bit slot of FPSCR when
14148 in 32-bits.
14149
14150 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14151
14152 * Makefile.in (SFILES, clean): Added sparc64 files.
14153 (reg-sparc64.o, reg-sparc64.c): New.
14154 * configure.srv (sparc*-*-linux*): New configuration.
14155 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14156 syscall arguments for SPARC.
14157 (regsets_store_inferior_registers): Likewise.
14158 * linux-sparc-low.c: New file.
14159
14160 2008-10-21 Doug Evans <dje@google.com>
14161
14162 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14163 (READLINE_DIR,READLINE_DEP): Delete.
14164 (INTERNAL_CFLAGS): Update.
14165 (LINTFLAGS): Update.
14166
14167 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14168
14169 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14170 whole argv from the last run, not just argv[0].
14171
14172 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14173
14174 * regcache.c (new_register_cache): Return NULL if the register
14175 cache size isn't known yet.
14176 (free_register_cache): Avoid dereferencing a NULL regcache.
14177
14178 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * configure.srv: Merge MIPS and MIPS64.
14181
14182 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14183
14184 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14185
14186 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14187
14188 * Makefile.in: Add required vsx dependencies.
14189
14190 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14191 Declare init_registers_powerpc_vsx32l.
14192 Declare init_registers_powerpc_vsx64l.
14193 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14194 (ppc_arch_setup): Check for VSX in hwcap.
14195 (ppc_fill_vsxregset): New function.
14196 (ppc_store_vsxregset): New function.
14197 Add new VSX entry in regset_info target_regsets.
14198
14199 * configure.srv: Add new VSX dependencies.
14200
14201 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14202
14203 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14204 (remote_open): Set or clear transport_is_reliable.
14205 (putpkt_binary): Don't expect acks in noack mode.
14206 (getpkt): Don't send ack/nac in noack mode.
14207 * server.c (handle_general_set): Handle QStartNoAckMode.
14208 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14209 qSupported.
14210 (main): Reset noack_mode on every connection.
14211 * server.h (noack_mode): Declare.
14212
14213 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14214
14215 * Makefile.in (GDBREPLAY_OBS): New variable.
14216 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14217
14218 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14219 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14222 (usr_store_inferior_registers): Likewise.
14223 (regsets_store_inferior_registers): Likewise.
14224
14225 2008-07-31 Rolf Jansen <rj@surtec.com>
14226 Pedro Alves <pedro@codesourcery.com>
14227
14228 * configure.ac: Check for memmem declaration.
14229 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14230 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14231 (disable_packet_qfThreadInfo): Unconditionally compile.
14232 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14233 * configure, config.in: Regenerate.
14234
14235 2008-07-28 Doug Kwan <dougkwan@google.com>
14236
14237 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14238 (linux_write_memory): Remove declaration of errno.
14239
14240 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14241
14242 * linux-low.c (handle_extended_wait): Do not use "status"
14243 variable uninitialized.
14244
14245 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14246
14247 * server.c (handle_v_attach): Inhibit reporting dll changes.
14248
14249 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14250
14251 * remote-utils.c (prepare_resume_reply): If requested, don't
14252 output "thread:TID" in the T stop reply.
14253
14254 * server.c (disable_packet_vCont, disable_packet_Tthread)
14255 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14256 (handle_query): If requested, disable support for qC, qfThreadInfo
14257 and qsThreadInfo.
14258 (handle_v_requests): If requested, disable support for vCont.
14259 (gdbserver_show_disableable): New.
14260 (main): Handle --disable-packet and --disable-packet=LIST.
14261
14262 * server.h (disable_packet_vCont, disable_packet_Tthread)
14263 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14264
14265 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14266
14267 * server.c (gdbserver_usage): Mention --version.
14268
14269 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * Makefile.in (gdbreplay.o): New rule.
14272
14273 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14274
14275 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14276 message, not gdbserver.
14277
14278 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14279 Nathan Sidwell <nathan@codesourcery.com>
14280 Joseph Myers <joseph@codesourcery.com>
14281
14282 * acinclude.m4: Include ../../config/acx.m4.
14283 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14284 * configure, config.in: Regenerate.
14285 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14286 * server.c (gdbserver_version): Print PKGVERSION.
14287 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14288 (main): Adjust gdbserver_usage calls.
14289 * gdbreplay.c (version, host_name): Add declarations.
14290 (gdbreplay_version, gdbreplay_usage): New.
14291 (main): Accept --version and --help options.
14292
14293 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14296 (arm_breakpoint_at): Handle Thumb.
14297 (the_low_target): Add comment.
14298
14299 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14300
14301 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14302
14303 2008-05-09 Doug Evans <dje@google.com>
14304
14305 * server.h (decode_search_memory_packet): Declare.
14306 * remote-utils.c (decode_search_memory_packet): New fn.
14307 * server.c (handle_search_memory_1): New fn.
14308 (handle_search_memory): New fn.
14309 (handle_query): Process qSearch:memory packets.
14310
14311 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14312
14313 * regcache.c (registers_length): Remove.
14314 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14315 full register packet.
14316 * regcache.h (registers_length): Remove prototype.
14317 * server.h (PBUFSIZ): Define to 16384.
14318
14319 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14320
14321 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14322 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14323 powerpc-64l.o, and powerpc-altivec64l.o.
14324 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14325 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14326 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14327 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14328 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14329 to srv_xmlfiles.
14330
14331 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14332 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14333 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14334 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14335 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14336 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14337 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14338 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14339 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14340 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14341 (clean): Update.
14342
14343 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14344 (init_registers_powerpc_32l): ... this new prototype.
14345 (init_registers_powerpc_32): Remove, replace by ...
14346 (init_registers_powerpc_altivec32l): ... this new prototype.
14347 (init_registers_powerpc_e500): Remove, replace by ...
14348 (init_registers_powerpc_e500l): ... this new prototype.
14349 (init_registers_ppc64): Remove, replace by ...
14350 (init_registers_powerpc_64l): ... this new prototype.
14351 (init_registers_powerpc_64): Remove, replace by ...
14352 (init_registers_powerpc_altivec64l): ... this new prototype.
14353 (ppc_num_regs): Set to 73.
14354 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14355 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14356 (ppc_cannot_store_register): Handle orig_r3 and trap.
14357 (ppc_arch_setup): Update init_registers_... calls.
14358 (ppc_fill_gregset): Handle orig_r3 and trap.
14359
14360 * inferiors.c (clear_inferiors): Reset current_inferior.
14361
14362 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14363
14364 * acinclude.m4: Add override.m4.
14365 * configure: Regenerate.
14366
14367 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14368
14369 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14370 initial call to init_register_ppc64.
14371
14372 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14373
14374 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14375 single powerpc*-*-linux* case.
14376 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14377
14378 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14379
14380 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14381 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14382 from reg_xmlfiles.
14383 * linux-ppc-low.c: Include <elf.h>.
14384 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14385 (ppc_hwcap): New global variable.
14386 (ppc_regmap): Remove __SPE__ #ifdef sections.
14387 (ppc_regmap_e500): New global variable.
14388 (ppc_cannot_store_register): Update __SPE__ special case.
14389 (ppc_get_hwcap): New function.
14390 (ppc_arch_setup): Use it to determine whether inferior supports
14391 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14392 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14393 Do not access registers if target does not support AltiVec.
14394 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14395 Do not access registers if target does not support SPE.
14396 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14397
14398 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * linux-low.c (disabled_regsets, num_regsets): New.
14401 (use_regsets_p): Delete.
14402 (linux_wait_for_process): Clear disabled_regsets.
14403 (regsets_fetch_inferior_registers): Check and set it.
14404 (regsets_store_inferior_registers): Likewise.
14405 (linux_fetch_registers, linux_store_registers): Do not use
14406 use_regsets_p.
14407 (initialize_low): Allocate disabled_regsets.
14408
14409 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * Makefile.in (LIBOBJS): New.
14412 (OBS): Use LIBOBJS.
14413 (memmem.o): New rule.
14414 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14415 * configure: Regenerated.
14416
14417 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14418
14419 * server.c (handle_query): Never return "unsupported" for
14420 qXfer:features:read queries.
14421
14422 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14423
14424 * server.c (get_features_xml): Fix inverted condition.
14425 (handle_query): Always support qXfer:feature:read.
14426
14427 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14428
14429 * server.c (wrapper_argv): New.
14430 (start_inferior): Handle wrapper_argv. If set, expect an extra
14431 trap.
14432 (gdbserver_usage): Document --wrapper.
14433 (main): Parse --wrapper.
14434
14435 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14436
14437 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14438 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14439 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14440 (ppc_set_pc): Likewise.
14441 (ppc_arch_setup): New function.
14442 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14443 of collect_register.
14444 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14445
14446 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14447
14448 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14449 instead of linux-ppc64-low.o.
14450 * linux-ppc64-low.c: Remove file.
14451 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14452 (linux-ppc64-low.o): Remove rule.
14453
14454 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14455 (init_registers_powerpc_64): Likewise.
14456 (ppc_regmap): Conditionally define depending on __powerpc64__.
14457 (ppc_cannot_store_register): Do not special-case "fpscr" when
14458 compiled on __powerpc64__.
14459 (ppc_collect_ptrace_register): New function.
14460 (ppc_supply_ptrace_register): New function.
14461 (ppc_breakpoint): Change type to "unsigned int".
14462 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14463 (the_low_target): Conditionally provide initializers for the
14464 arch_setup member depending on __powerpc64__. Install
14465 collect_ptrace_register and supply_ptrace_register members.
14466
14467 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14468
14469 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14470 * server.c (gdbserver_xmltarget): Define.
14471 (get_features_xml): Use it to replace "target.xml" and arch_string.
14472
14473 * configure.srv: Remove srv_xmltarget. Add XML files that were
14474 mentioned there to srv_xmlfiles instead. Remove conditional tests
14475 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14476 srv_xmlfiles and srv_regobj to include all possible choices.
14477 * configure.ac (srv_xmltarget): Remove.
14478 (srv_xmlfiles): Do not add "target.xml".
14479 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14480 checks for supplementary target information.
14481 * configure: Regenerate.
14482 * Makefile.in (XML_TARGET): Remove.
14483 (target.xml): Remove rule.
14484 (clean): Do not clean up target.xml.
14485 (.PRECIOUS): Do not mention target.xml.
14486
14487 * target.h (struct target_ops): Remove arch_string member.
14488 * linux-low.c (linux_arch_string): Remove.
14489 (linux_target_ops): Remove arch_string initializer.
14490 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14491 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14492 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14493 * spu-low.c (spu_arch_string): Remove.
14494 (spu_target_ops): Remove arch_string initializer.
14495 * win32-low.c (win32_arch_string): Remove.
14496 (win32_target_ops): Remove arch_string initializer.
14497 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14498 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14499 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14500
14501 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14502
14503 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14504 by collect_ptrace_register and supply_ptrace_register hooks.
14505 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14506 instead of checking for the_low_target.left_pad_xfer.
14507 (usr_store_inferior_registers): Use collect_ptrace_register callback
14508 instead of checking for the_low_target.left_pad_xfer.
14509
14510 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14511 (s390_supply_ptrace_register): Likewise.
14512 (s390_fill_gregset): Call s390_collect_ptrace_register.
14513 (the_low_target): Update.
14514
14515 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14516 (ppc_supply_ptrace_register): Likewise.
14517 (the_low_target): Update.
14518
14519 * linux-i386-low.c (the_low_target): Update.
14520 * linux-x86-64-low.c (the_low_target): Update.
14521
14522 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14523
14524 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14525 reg-s390.o and reg-s390x.o.
14526
14527 * linux-low.c (new_inferior): New global variable.
14528 (linux_create_inferior, linux_attach): Set it.
14529 (linux_wait_for_process): Call the_low_target.arch_setup after the
14530 target has stopped for the first time.
14531 (initialize_low): Do not call the_low_target.arch_setup.
14532
14533 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14534 (s390_set_pc): Likewise.
14535 (s390_arch_setup): New function.
14536 (the_low_target): Use s390_arch_setup as arch_setup routine.
14537
14538 * regcache.c (realloc_register_cache): New function.
14539 (set_register_cache): Call it for each existing regcache.
14540
14541 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14542
14543 * server.h (init_registers): Remove prototype.
14544
14545 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14546 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14547 instead of init_registers ().
14548 * linux-arm-low.c (init_registers_arm): Add prototype.
14549 (init_registers_arm_with_iwmmxt): Likewise.
14550 (the_low_target): Add initializer for arch_setup field.
14551 * linux-cris-low.c (init_registers_cris): Add prototype.
14552 (the_low_target): Add initializer for arch_setup field.
14553 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14554 (the_low_target): Add initializer for arch_setup field.
14555 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14556 (the_low_target): Add initializer for arch_setup field.
14557 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14558 (the_low_target): Add initializer for arch_setup field.
14559 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14560 (the_low_target): Add initializer for arch_setup field.
14561 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14562 (the_low_target): Add initializer for arch_setup field.
14563 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14564 (init_registers_mips64_linux): Likewise.
14565 (the_low_target): Add initializer for arch_setup field.
14566 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14567 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14568 (the_low_target): Add initializer for arch_setup field.
14569 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14570 (init_registers_powerpc_64): Likewise.
14571 (the_low_target): Add initializer for arch_setup field.
14572 * linux-s390-low.c (init_registers_s390): Add prototype.
14573 (init_registers_s390x): Likewise.
14574 (the_low_target): Add initializer for arch_setup field.
14575 * linux-sh-low.c (init_registers_sh): Add prototype.
14576 (the_low_target): Add initializer for arch_setup field.
14577 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14578 (the_low_target): Add initializer for arch_setup field.
14579 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14580 (the_low_target): Add initializer for arch_setup field.
14581
14582 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14583 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14584 instead of init_registers ().
14585 * win32-arm-low.c (init_registers_arm): Add prototype.
14586 (the_low_target): Add initializer for arch_setup field.
14587 * win32-i386-low.c (init_registers_i386): Add prototype.
14588 (the_low_target): Add initializer for arch_setup field.
14589
14590 * spu-low.c (init_registers_spu): Add prototype.
14591 (initialize_low): Call initialie_registers_spu () instead of
14592 initialize_registers ().
14593
14594 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14595
14596 * server.c (handle_v_requests): When handling the vRun and vAttach
14597 packets, if already debugging a process, don't kill it. Return an
14598 error instead.
14599
14600 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * server.c (handle_query): Correct length check.
14603
14604 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14605
14606 * win32-low.c (do_initial_child_stuff): Add process handle
14607 parameter. Set current_process_handle and current_process_id from the
14608 parameters. Clear globals.
14609 (win32_create_inferior): Don't set current_process_handle and
14610 current_process_id here. Instead pass them on the call to
14611 do_initial_child_stuff.
14612 (win32_attach): Likewise.
14613 (win32_clear_inferiors): New.
14614 (win32_kill): Don't close the current process handle or the
14615 current thread handle here. Instead call win32_clear_inferiors.
14616 (win32_detach): Don't open a new handle to the process. Call
14617 win32_clear_inferiors.
14618 (win32_join): Don't rely on current_process_handle; open a new
14619 handle using the process id.
14620 (win32_wait): Call win32_clear_inferiors when the inferior process
14621 has exited.
14622
14623 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * server.c (monitor_show_help): Add "exit".
14626
14627 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14628
14629 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14630 (clean): Add reg-xtensa.c.
14631 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14632 * configure.srv (xtensa*-*-linux*) New target.
14633 * linux-xtensa-low.c: New.
14634 * xtensa-xtregs.c: New.
14635
14636 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14637
14638 * hostio.c: Don't include errno.h.
14639 (errno_to_fileio_errno): Move to hostio-errno.
14640 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14641 error number outputting to the target->hostio_last_error callback.
14642 (hostio_packet_error): Use FILEIO_EINVAL directly.
14643 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14644 calls to hostio_error.
14645 * hostio-errno.c: New.
14646 * server.h (hostio_last_error_from_errno): Declare.
14647 * target.h (target_ops): Add hostio_last_error member.
14648 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14649 as hostio_last_error handler.
14650 * spu-low.c (spu_target_ops): Likewise.
14651 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14652 (wince_hostio_last_error): New functions.
14653 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14654 as hostio_last_error handler.
14655 (win32_target_ops) [!_WIN32_WCE]: Register
14656 hostio_last_error_from_errno as hostio_last_error handler.
14657 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14658 (hostio-errno.o): New rule.
14659 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14660 * configure.srv (srv_hostio_err_objs): New variable. Default to
14661 hostio-errno.o.
14662 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14663 * configure: Regenerate.
14664
14665 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14668 (linux_kill, linux_detach): Clean up the process list.
14669 * remote-utils.c (remote_open): Improve port number parsing.
14670 (putpkt_binary, input_interrupt): Only send interrupts if the target
14671 is running.
14672 * server.c (extended_protocol): Make static.
14673 (attached): Define earlier.
14674 (exit_requested, response_needed, program_argv): New variables.
14675 (target_running): New.
14676 (start_inferior): Clear attached here.
14677 (attach_inferior): Set attached here.
14678 (require_running): Define.
14679 (handle_query): Use require_running and target_running. Implement
14680 "monitor exit".
14681 (handle_v_attach, handle_v_run): New.
14682 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14683 (gdbserver_usage): Update.
14684 (main): Redo argument parsing. Handle --debug and --multi. Handle
14685 --attach along with other options or after the port. Save
14686 program_argv. Support no initial program. Resynchronize
14687 communication with GDB after an error. Handle "monitor exit".
14688 Use require_running and target_running. Always allow the extended
14689 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14690 restart in extended mode.
14691 * README: Refer to the GDB manual. Update --attach usage.
14692
14693 2007-12-20 Andreas Schwab <schwab@suse.de>
14694
14695 * linux-low.c (STACK_SIZE): Define.
14696 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14697 (linux_test_for_tracefork): Likewise.
14698
14699 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14700
14701 * linux-low.c (linux_wait_for_event): Update messages. Do not
14702 reinsert auto-delete breakpoints.
14703 * mem-break.c (struct breakpoint): Change return type of handler to
14704 int.
14705 (set_breakpoint_at): Update handler type.
14706 (reinsert_breakpoint_handler): Return 1 instead of calling
14707 delete_breakpoint.
14708 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14709 setting a new one.
14710 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14711 * mem-break.h (set_breakpoint_at): Update handler type.
14712 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14713 * win32-low.c (auto_delete_breakpoint): New.
14714 (get_child_debug_event): Use it.
14715
14716 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14717
14718 * configure.ac: Check for pread and pwrite.
14719 * hostio.c (handle_pread): Fall back to lseek and read.
14720 (handle_pwrite): Fall back to lseek and write.
14721 * config.in, configure: Regenerated.
14722
14723 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14724
14725 * server.c (myresume): Add own_buf argument.
14726 (main): Update calls.
14727
14728 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14731 * remote-utils.c (remote_open): Do not call disable_async_io.
14732 (block_async_io): Delete.
14733 (unblock_async_io): Make static.
14734 (initialize_async_io): New.
14735 * server.c (handle_v_cont): Handle async I/O here.
14736 (myresume): Likewise. Move other common resume tasks here...
14737 (main): ... from here. Call initialize_async_io. Disable async
14738 I/O before the main loop.
14739 * server.h (initialize_async_io): Declare.
14740 (block_async_io, unblock_async_io): Delete prototypes.
14741 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14742
14743 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14744
14745 * remote-utils.c (readchar): Allow binary data in received messages.
14746
14747 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * win32-low.c (attaching): New global.
14750 (win32_create_inferior): Clear the `attaching' global.
14751 (win32_attach): Set the `attaching' global.
14752 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14753 attaching. Only set a breakpoint at the entry point if not
14754 attaching.
14755
14756 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14757
14758 * server.c (main): Don't report dll events on the initial
14759 connection on attaches.
14760
14761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14762
14763 * server.c (main): Relax numerical bases supported for the pid of
14764 the --attach command line argument.
14765
14766 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14767
14768 * win32-low.c (win32_attach): Call OpenProcess before
14769 DebugActiveProcess, not after. Add last error output to error
14770 call.
14771
14772 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14773
14774 * win32-low.c (win32_get_thread_context)
14775 (win32_set_thread_context): New functions.
14776 (thread_rec): Use win32_get_thread_context.
14777 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14778 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14779 field.
14780
14781 2007-12-03 Leo Zayas
14782 Pedro Alves <pedro_alves@portugalmail.pt>
14783
14784 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14785 global variables.
14786 (child_add_thread): Minor cleanup.
14787 (child_continue): Resume artificially suspended threads before
14788 calling ContinueDebugEvent.
14789 (suspend_one_thread): New.
14790 (fake_breakpoint_event): New.
14791 (get_child_debug_event): Change return type to int. Check here if
14792 gdb sent an interrupt request. If a soft interrupt was requested,
14793 fake a breakpoint event. Return 0 if there is no event to handle,
14794 and 1 otherwise.
14795 (win32_wait): Don't check here if gdb sent an interrupt request.
14796 Ensure there is a valid event to handle.
14797 (win32_request_interrupt): Add soft interruption method as last
14798 resort.
14799
14800 2007-12-03 Leo Zayas
14801 Pedro Alves <pedro_alves@portugalmail.pt>
14802
14803 * win32-low.h (win32_thread_info): Add descriptions to the
14804 structure members. Replace `suspend_count' counter by a
14805 `suspended' flag.
14806 * win32-low.c (thread_rec): Update condition of when to get the
14807 context from the inferior. Rely on ContextFlags being set if it
14808 has already been retrieved. Only suspend the inferior thread if
14809 we haven't already. Warn if that fails.
14810 (continue_one_thread): s/suspend_count/suspended/. Only call
14811 ResumeThread once. Warn if that fails.
14812
14813 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14814
14815 * win32-low.c (win32_wait): Don't read from the inferior when it
14816 has already exited.
14817
14818 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14819
14820 * Makefile.in (win32_low_h): New variable.
14821 (win32-low.o): Add dependency on $(win32_low_h).
14822 (win32-arm-low.o, win32-i386-low.o): New rules.
14823
14824 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * hostio.c: Correct copyright year.
14827
14828 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14829
14830 * Makefile.in (OBS): Add hostio.o.
14831 (hostio.o): New rule.
14832 * server.h (handle_vFile): Declare.
14833 * hostio.c: New file.
14834 * server.c (handle_v_requests): Take packet_len and new_packet_len
14835 for binary packets. Call handle_vFile.
14836 (main): Update call to handle_v_requests.
14837
14838 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14839
14840 * linux-low.c: Include <sched.h>.
14841
14842 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14843
14844 * linux-low.c (linux_tracefork_grandchild): New.
14845 (linux_tracefork_child): Use clone.
14846 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14847
14848 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14849
14850 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14851
14852 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14855
14856 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * inferiors.c (change_inferior_id): Delete.
14859 (add_pid_to_list, pull_pid_from_list): New.
14860 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14861 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14862 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14863 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14864 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14865 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14866 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14867 (using_threads): Always set to 1.
14868 (handle_extended_wait): New.
14869 (add_process): Do not set TID.
14870 (linux_create_inferior): Set must_set_ptrace_flags.
14871 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14872 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14873 (linux_thread_alive): Rename TID argument to LWPID.
14874 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14875 (linux_wait_for_event): Do not use TID or check using_threads. Update
14876 call to dead_thread_notify. Call handle_extended_wait.
14877 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14878 (send_sigstop): Delete sigstop_sent.
14879 (wait_for_sigstop): Avoid TID.
14880 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14881 (linux_test_for_tracefork): New.
14882 (linux_lookup_signals): Use thread_db_active and
14883 linux_supports_tracefork_flag.
14884 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14885 * linux-low.h (get_process_thread): Avoid TID.
14886 (struct process_ifo): Move thread_known and tid to the end. Remove
14887 sigstop_sent.
14888 (linux_attach_lwp, thread_db_init): Update prototypes.
14889 * server.h (change_inferior_id): Delete prototype.
14890 (add_pid_to_list, pull_pid_from_list): New prototypes.
14891 * thread-db.c (thread_db_use_events): New.
14892 (find_first_thread): Rename to...
14893 (find_one_thread): ...this. Update callers and messages. Do not
14894 call fatal. Check thread_db_use_events. Do not call
14895 change_inferior_id or new_thread_notify.
14896 (maybe_attach_thread): Update. Do not call new_thread_notify.
14897 (thread_db_init): Set thread_db_use_events. Check use_events.
14898 * utils.c (fatal, warning): Correct message prefix.
14899
14900 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * Makefile.in (clean): Remove new files.
14903 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14904 (powerpc-64.o, powerpc-64.c): New rules.
14905 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14906 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14907 with SPE.
14908 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14909 SPE targets.
14910 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14911 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14912 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14913 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14914 (target_regsets): Add AltiVec and SPE register sets.
14915 * configure.ac: Check for AltiVec and SPE.
14916 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14917 (ppc_fill_vrregset, ppc_store_vrregset): New.
14918 (target_regsets): Add AltiVec register set.
14919 * configure: Regenerated.
14920
14921 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * linux-low.c (O_LARGEFILE): Define.
14924 (linux_read_memory): Use /proc/PID/mem.
14925 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14926 * configure, config.in: Regenerated.
14927
14928 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * linux-low.c (linux_wait_for_event): Do not pass signals while
14931 single-stepping.
14932
14933 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14934
14935 * win32-low.c (create_process): New.
14936 (win32_create_inferior): Use create_process instead of
14937 CreateProcess. If create_process failed retry appending an ".exe"
14938 suffix. Store the GetLastError result immediatelly after
14939 create_process calls and use it on the call to error.
14940
14941 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14942
14943 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14944
14945 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14946
14947 * configure.ac: Switch license to GPLv3.
14948
14949 2007-08-01 Michael Snyder <msnyder@access-company.com>
14950
14951 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14952
14953 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14954
14955 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14956 typedef.
14957 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14958 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14959 CloseToolhelp32Snapshot.
14960 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14961 CloseToolhelp32Snapshot.
14962
14963 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14964
14965 * server.c (main): Check for inferior exit before main loop.
14966
14967 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14970 instead of on tmp_desc.
14971
14972 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14973 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14976 (add_thread): Minor cleanups.
14977 (clear_inferiors): Move lower in the file. Clear the DLL
14978 list.
14979 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14980 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14981 (xml_escape_text): New.
14982 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14983 for qSupported.
14984 (handle_v_cont): Report errors.
14985 (gdbserver_version): Update.
14986 (main): Correct size of own_buf. Do not report initial DLL events.
14987 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14988 (unloaded_dll, xml_escape_text): New.
14989 * win32-low.c (enum target_waitkind): Update comments.
14990 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14991 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14992 (win32_EnumProcessModules, win32_GetModuleInformation)
14993 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14994 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14995 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14996 (win32_Module32First, win32_Module32Next, load_toolhelp)
14997 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14998 (get_child_debug_event): Handle DLL events.
14999 (win32_wait): Likewise.
15000
15001 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15004 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15005
15006 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15007
15008 * win32-low.c (handle_output_debug_string): Ignore event if not
15009 waiting.
15010
15011 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15012
15013 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15014
15015 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15018
15019 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15020
15021 * inferiors.c (change_inferior_id): Add comment.
15022 * linux-low.c (check_removed_breakpoint): Add an early
15023 prototype. Improve debug output.
15024 (linux_attach): Doc update.
15025 (linux_detach_one_process, linux_detach): Clean up before releasing
15026 each process.
15027 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15028 * linux-low.h (struct process_info): Doc improvement.
15029 * mem-break.c (delete_all_breakpoints): New.
15030 * mem-break.h (delete_all_breakpoints): New prototype.
15031 * thread-db.c (find_first_thread): New.
15032 (thread_db_create_event): Call it instead of
15033 thread_db_find_new_threads. Clean up unused variables.
15034 (maybe_attach_thread): Remove first thread handling.
15035 (thread_db_find_new_threads): Use find_first_thread.
15036 (thread_db_get_tls_address): Likewise.
15037
15038 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * thread-db.c (thread_db_find_new_threads): Add prototype.
15041 (thread_db_create_event): Check for the main thread before adding
15042 a new thread.
15043 (maybe_attach_thread): Only enable event reporting if TID == 0.
15044 (thread_db_get_tls_address): Check for new threads.
15045
15046 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15047
15048 * linux-low.c (linux_create_inferior): Try execv before execvp.
15049 * spu-low.c (spu_create_inferior): Likewise.
15050
15051 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15052
15053 * linux-low.c (linux_create_inferior): Change execv to execvp.
15054 * spu-low.c (spu_create_inferior): Likewies.
15055
15056 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * Makefile.in (clean): Clean new files instead of deleted ones.
15059 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15060 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15061 rules.
15062 * configure.srv: Specify XML files and new regformats for MIPS and
15063 MIPS64 GNU/Linux.
15064 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15065 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15066 an entry for the restart register.
15067 (mips_cannot_fetch_register, mips_cannot_store_register)
15068 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15069 register names to match the XML descriptions.
15070 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15071 restart register instead of $0.
15072
15073 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15074 Markus Deuling <deuling@de.ibm.com>
15075
15076 * remote-utils.c (decode_xfer_write): New function.
15077 * server.h (decode_xfer_write): Add prototype.
15078 * server.c (handle_query): Add PACKET_LEN argument. Support
15079 qXfer:spu:read and qXfer:spu:write packets.
15080 (main): Pass packet_len to handle_query.
15081 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15082 * target.h (target_ops): Add qxfer_spu.
15083
15084 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15085
15086 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15087 accessing non-seekable spufs files.
15088
15089 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15090
15091 * server.c (handle_query): Add reply for qC packet.
15092
15093 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15094 Leo Zayas <lerele@champenstudios@com>
15095
15096 * server.h (check_remote_input_interrupt_request): New function.
15097 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15098 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15099 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15100 (check_remote_input_interrupt_request): New function.
15101 * server.h (check_remote_input_interrupt_request): Declare.
15102 * win32-low.c (winapi_DebugBreakProcess,
15103 winapi_GenerateConsoleCtrlEvent): New typedefs.
15104 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15105 to 250 ms.
15106 (win32_wait): Check for remote interrupt request
15107 with check_remote_input_interrupt_request.
15108 (win32_request_interrupt): New function.
15109 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15110
15111 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15112
15113 * win32-low.c (debug_registers_changed,
15114 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15115 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15116 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15117 (thread_rec): Get context using the low target.
15118 (child_add_thread): Call thread_added on the low target,
15119 which does the same thing.
15120 (regptr): Delete.
15121 (do_initial_child_stuff): Remove debug registers references.
15122 Set context using the low target. Resume threads after
15123 setting the contexts.
15124 (child_continue): Remove dead variable. Remove debug
15125 registers references.
15126 (child_fetch_inferior_registers): Go through the low target.
15127 (do_child_store_inferior_registers): Remove.
15128 (child_store_inferior_registers): Go through the low target.
15129 (win32_resume): Remove debug registers references.
15130 Set context using the low target.
15131 (handle_exception): Change return type to void. Don't record
15132 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15133 first chance exception.
15134 (get_child_debug_event): Change return type to void. Remove
15135 goto loop. Always return after waiting for debug event.
15136 (win32_wait): Convert to switch statement. Handle spurious
15137 events.
15138
15139 * win32-i386-low.c (debug_registers_changed,
15140 debug_registers_used): New.
15141 (initial_stuff): Rename to ...
15142 (i386_initial_stuff): ... this. Clear debug registers
15143 state variables.
15144 (store_debug_registers): Delete.
15145 (i386_get_thread_context): New.
15146 (load_debug_registers): Delete.
15147 (i386_set_thread_context): New.
15148 (i386_thread_added): New.
15149 (single_step): Rename to ...
15150 (i386_single_step): ... this.
15151 (do_fetch_inferior_registers): Rename to ...
15152 (i386_fetch_inferior_register): ... this.
15153 (i386_store_inferior_register): New.
15154 (the_low_target): Adapt to new interface.
15155
15156 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15157 (arm_get_thread_context): New.
15158 (arm_set_thread_context): New.
15159 (regptr): New.
15160 (do_fetch_inferior_registers): Rename to ...
15161 (arm_fetch_inferior_register): ... this.
15162 (arm_store_inferior_register): New.
15163 (arm_wince_breakpoint): Reimplement as unsigned long.
15164 (arm_wince_breakpoint_len): Define.
15165 (the_low_target): Adapt to new interface.
15166
15167 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15168 load_debug_registers. Add get_thread_context, set_thread_context,
15169 thread_added and store_inferior_register. Rename
15170 fetch_inferior_registers to fetch_inferior_register.
15171 (regptr): Remove declaration.
15172
15173 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15174
15175 * linux-low.c (linux_detach): Change return type to int. Return 0.
15176 * spu-low.c (spu_detach): Likewise.
15177
15178 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15179
15180 * target.h (target_ops): Change return type of detach to int.
15181 Add join.
15182 (join_inferior): New.
15183 * server.c (main): Don't skip detach support on mingw32.
15184 If the inferior doesn't support detaching return error.
15185 Call join_inferior instead of using waitpid.
15186 * linux-low.c (linux_join): New.
15187 (linux_target_op): Add linux_join.
15188 * spu-low.c (spu_join): New.
15189 (spu_target_ops): Add spu_join.
15190 * win32-low.c (win32_detach): Adapt to new interface.
15191 Reopen current_process_handle before detaching. Issue a child
15192 resume before detaching.
15193 (win32_join): New.
15194 (win32_target_op): Add win32_join.
15195
15196 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15197
15198 * win32-low.c (win32-attach): Fix return value.
15199 * target.h (target_ops): Describe ATTACH return values.
15200
15201 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15202
15203 * win32-low.c (GETPROCADDRESS): Define.
15204 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15205 (winapi_DebugSetProcessKillOnExit): Likewise.
15206 (win32_create_inferior): Force usage of ansi CreateProcessA.
15207 (win32_attach): Use GETPROCADDRESS.
15208 (win32_detach): Likewise.
15209
15210 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15211
15212 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15213
15214 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15215
15216 * win32-low.c: Commit leftover changes from 2007-03-29.
15217
15218 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15219
15220 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15221 fields short instead of int. Add explicit padding.
15222 (i387_cache_to_fsave): Remove unnecessary casts.
15223 (i387_fsave_to_cache): Doc fix.
15224 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15225
15226 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15227
15228 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15229 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15230
15231 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15232
15233 * configure.srv (arm*-*-mingw32ce*): Move near the other
15234 arm targets.
15235
15236 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15237
15238 * configure.ac: Add errno checking.
15239 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15240 sys/file.h and malloc.h.
15241 (AC_CHECK_DECLS): Add perror.
15242 (srv_mingwce): Handle.
15243 * configure.srv (i[34567]86-*-cygwin*): Add
15244 win32-i386-low.o to srv_tgtobj.
15245 (i[34567]86-*-mingw*): Likewise.
15246 (arm*-*-mingw32ce*): Add case.
15247 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15248 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15249 [__MINGW32CE__] (strerror): New function.
15250 [__MINGW32CE__] (errno): Define to GetLastError.
15251 [__MINGW32CE__] (COUNTOF): New macro.
15252 (remote_open): Remove extra close call.
15253 * mem-break.c (delete_breakpoint_at): New function.
15254 * mem-break.h (delete_breakpoint_at): Declare.
15255 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15256 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15257 [USE_WIN32API] (read, write): Add char* casts.
15258 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15259 * server.h: Include wincecompat.h on Windows CE.
15260 [HAVE_ERRNO_H]: Check.
15261 (perror): Declare if not declared.
15262 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15263 (perror_with_name): Remove errno declaration.
15264 * wincecompat.h: New.
15265 * wincecompat.c: New.
15266 * win32-low.h: New.
15267 * win32-arm-low.c: New.
15268 * win32-i386-low.c: New.
15269 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15270 (OUTMSG2): Make it safe.
15271 (_T): New macro.
15272 (COUNTOF): New macro.
15273 (NUM_REGS): Get it from the low target.
15274 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15275 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15276 (thread_rec): Let low target handle debug registers.
15277 (child_add_thread): Likewise.
15278 (child_init_thread_list): Likewise.
15279 (continue_one_thread): Likewise.
15280 (regptr): New.
15281 (do_child_fetch_inferior_registers): Move to ...
15282 * win32-i386-low.c: ... here, and rename to ...
15283 (do_fetch_inferior_registers): ... this.
15284 * win32-low.c (child_fetch_inferior_registers):
15285 Go through the low target.
15286 (do_child_store_inferior_registers): Use regptr.
15287 (strwinerror): New function.
15288 (win32_create_inferior): Handle Windows CE.
15289 Use strwinerror instead of strerror on Windows error
15290 codes. Add program to the error output.
15291 Don't close the main thread handle on Windows CE.
15292 (win32_attach): Use coredll.dll on Windows CE.
15293 (win32_kill): Close current process and current
15294 thread handles.
15295 (win32_detach): Use coredll.dll on Windows CE.
15296 (win32_resume): Let low target handle debug registers, and
15297 step request.
15298 (handle_exception): Add/Remove initial breakpoint. Avoid
15299 non-existant WSTOPSIG on Windows CE.
15300 (win32_read_inferior_memory): Cast to remove warning.
15301 (win32_arch_string): Go through the low target.
15302 (initialize_low): Call set_breakpoint_data with the low
15303 target's breakpoint.
15304 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15305 FOP_REGNUM, mappings): Move to ...
15306 * win32-i386-low.c: ... here.
15307 * win32-low.c (win32_thread_info): Move to ...
15308 * win32-low.h: ... here.
15309 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15310 win32-arm-low.c and wincecompat.c.
15311 (all:): Add $EXEEXT.
15312 (install-only:): Likewise.
15313 (gdbserver:): Likewise.
15314 (gdbreplay:): Likewise.
15315 * config.in: Regenerate.
15316 * configure: Regenerate.
15317
15318 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15319
15320 * win32-low.c: Rename typedef thread_info to
15321 win32_thread_info throughout.
15322
15323 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15324
15325 * win32-i386-low.c: Rename to ...
15326 * win32-low.c: ... this.
15327 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15328 * Makefile.in: Likewise.
15329
15330 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15331
15332 * remote-utils.c (monitor_output): Constify msg parameter.
15333 * server.h (monitor_output): Likewise.
15334 * win32-i386-low.c (handle_output_debug_string): New.
15335 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15336 handle_output_debug_string.
15337 (get_child_debug_event): Likewise.
15338
15339 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15340
15341 * server.c (main): Correct strtoul check.
15342
15343 2007-03-27 Jon Ringle <jon@ringle.org>
15344
15345 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15346
15347 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15348
15349 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15350
15351 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15352
15353 * terminal.h: Check HAVE_SGTTY_H.
15354
15355 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15356
15357 * remote-utils.c (remote_open): Print out the assigned port number.
15358
15359 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15360
15361 * remote-utils.c (monitor_output): New function.
15362 * server.c (debug_threads): Define here.
15363 (monitor_show_help): New function.
15364 (handle_query): Handle qRcmd.
15365 (main): Do not handle 'd' packet.
15366 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15367 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15368 of debug_threads.
15369
15370 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15371
15372 * Makefile.in (EXEEXT): New.
15373 (clean): Use $(EXEEXT).
15374
15375 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15376
15377 * target.h (target_ops): Rename send_signal to request_interrupt,
15378 and remove enum target_signal parameter.
15379 * linux-low.c (linux_request_interrupt): Rename from
15380 linux_send_signal, and always send SIGINT.
15381 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15382 and always send SIGINT.
15383 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15384 of send_signal.
15385 (input_interrupt): Likewise.
15386
15387 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15388
15389 * server.c (get_features_xml): Check if target implemented
15390 arch_string.
15391 * win32-i386-low.c (win32_arch_string): New.
15392 (win32_target_ops): Add win32_arch_string as arch_string member.
15393
15394 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15395
15396 * spu-low.c (spu_arch_string): New.
15397 (spu_target_ops): Add spu_arch_string.
15398
15399 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15400
15401 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15402 * configure.ac: Do not check for terminal.h.
15403 * configure, config.in: Regenerated.
15404
15405 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15406
15407 * Makefile.in (OBS): Add $(XML_BUILTIN).
15408 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15409 (clean): Update.
15410 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15411 (arm-with-iwmmxt.c): New.
15412 * config.in, configure: Regenerate.
15413 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15414 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15415 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15416 (arm*-*-linux*): Add iWMMXt and regset support.
15417 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15418 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15419 (arm_store_wmmxregset, target_regsets): New.
15420 * server.c (get_features_xml): Take annex argument. Check builtin
15421 XML documents.
15422 (handle_query): Handle multiple annexes.
15423
15424 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * remote-utils.c [USE_WIN32API] (read, write): Define.
15427 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15428 write.
15429
15430 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * linux-i386-low.c (the_low_target): Set arch_string.
15433 * linux-x86-64-low.c (the_low_target): Likewise.
15434 * linux-low.c (linux_arch_string): New.
15435 (linux_target_ops): Add it.
15436 * linux-low.h (struct linux_target_ops): Add arch_string.
15437 * server.c (write_qxfer_response): Use const void * for DATA.
15438 (get_features_xml): New.
15439 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15440 * target.h (struct target_ops): Add arch_string method.
15441
15442 2007-01-03 Denis Pilat <denis.pilat@st.com>
15443 Daniel Jacobowitz <dan@codesourcery.com>
15444
15445 * linux-low.c (linux_kill): Handle being called with no threads.
15446 * win32-i386-low.c (win32_kill): Likewise.
15447 (get_child_debug_event): Clear current_process_handle.
15448
15449 2006-12-30 Denis PILAT <denis.pilat@st.com>
15450 Daniel Jacobowitz <dan@codesourcery.com>
15451
15452 * remote-utils.c (remote_open): Check the type of specified
15453 serial port devices before opening them.
15454 * server.c (main): Kill the inferior if an error occurs during
15455 the first remote_open.
15456
15457 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15458
15459 * README: Update supported targets.
15460
15461 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * Makefile.in (clean): Remove reg-mips64.c.
15464 (reg-mips64.c, reg-mips64.o): New rules.
15465 * configure.srv: Handle mips64. Include regset support for mips.
15466 * linux-mips-low.c (union mips_register): New.
15467 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15468 (mips_breakpoint, mips_breakpoint_at): Use int.
15469 (mips_collect_register, mips_supply_register)
15470 (mips_collect_register_32bit, mips_supply_register_32bit)
15471 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15472 (mips_store_fpregset, target_regsets): New.
15473 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15474
15475 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15476
15477 * configure.srv: Add target "spu*-*-*".
15478 * Makefile.in (clean): Remove reg-spu.c.
15479 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15480 * spu-low.c: New file.
15481
15482 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15483
15484 * configure.ac: Correct td_thr_tls_get_addr test.
15485 * configure: Regenerated.
15486
15487 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15488
15489 * linux-low.c (linux_wait_for_event): Reformat. Use the
15490 pass_signals array.
15491 * remote-utils.c (decode_address_to_semicolon): New.
15492 * server.c (pass_signals, handle_general_set): New.
15493 (handle_query): Mention QPassSignals for qSupported.
15494 (main): Call handle_general_set.
15495 * server.h (pass_signals, decode_address_to_semicolon): New.
15496
15497 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * server.c (handle_query): Correct error handling for read_auxv.
15500
15501 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15502
15503 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15504 and srv_linux_thread_db to yes.
15505 * linux-s390-low.c (s390_fill_gregset): New function.
15506 (target_regsets): Define data structure.
15507
15508 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15509
15510 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15511 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15512 * config.in, configure: Regenerated.
15513 * inferiors.c (gdb_id_to_thread): New function.
15514 (gdb_id_to_thread_id): Use it.
15515 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15516 * linux-low.h (struct process_info): Add th member.
15517 (thread_db_get_tls_address): New prototype.
15518 * remote-utils.c (decode_address): Make non-static.
15519 * server.c (handle_query): Handle qGetTLSAddr.
15520 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15521 * target.h (struct target_ops): Add get_tls_address.
15522 * thread-db.c (maybe_attach_thread): Save the thread handle.
15523 (thread_db_get_tls_address): New.
15524
15525 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15526
15527 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15528 (linux_resume_one_process): Take a siginfo_t *. Update all
15529 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15530 (struct pending_signals): Add a siginfo_t.
15531 (linux_wait_for_process): Always set last_status.
15532 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15533 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15534 * linux-low.h (struct process_info): Add last_status.
15535
15536 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15537
15538 * remote-utils.c (try_rle): New function.
15539 (putpkt_binary): Use it.
15540
15541 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15544 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15545 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15546 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15547 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15548 point registers.
15549
15550 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15551
15552 * server.c (terminal_fd): New variable.
15553 (old_foreground_pgrp): Likewise.
15554 (restore_old_foreground_pgrp): New function.
15555 (start_inferior): Record the terminal file descriptor in terminal_fd
15556 and its original foreground group in old_foreground_pgrp. Register
15557 restore_old_foreground_pgrp with atexit().
15558
15559 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * server.c (handle_query): Correct qPart to qXfer.
15562
15563 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15564
15565 * configure.ac: Check for more headers which are missing on
15566 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15567 * configure.srv: Add Cygwin and mingw32.
15568 * remote-utils.c: Don't include headers unconditionally which
15569 are missing on mingw32. Include <winsock.h> for mingw32.
15570 (remote_open): Adjust for mingw32 support. Flush
15571 standard error after writing to it.
15572 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15573 (unblock_async_io, enable_async_io, disable_async_io)
15574 (readchar, getpkt): Update for Winsock support.
15575 (prepare_resume_reply): Expect a protocol signal number.
15576 * server.c: Disable <sys/wait.h> on mingw32.
15577 (start_inferior): Adjust for mingw32 support. Flush
15578 standard error after writing to it.
15579 (attach_inferior): Likewise. Use protocol signal
15580 numbers.
15581 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15582 and names.
15583 * win32-i386-low.c: New file.
15584 * Makefile.in (XM_CLIBS): Set.
15585 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15586 (win32-i386-low.o): New dependency rule.
15587 * linux-low.c (linux_wait): Use target signal numbers.
15588 * target.h (struct target_ops): Doc fix.
15589 * server.h (target_signal_to_name): New prototype.
15590 * gdbreplay.c: Don't include headers unconditionally which
15591 are missing on mingw32. Include <winsock.h> for mingw32.
15592 (remote_close, remote_open): Adjust for Winsock support.
15593 * configure, config.in: Regenerated.
15594
15595 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15596
15597 * server.c (decode_xfer_read, write_qxfer_response): New.
15598 (handle_query): Take a packet length argument. Handle
15599 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15600 the qSupported response.
15601 (main): Update call to handle_query.
15602
15603 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15604
15605 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15606 (putpkt_binary): Renamed from putpkt and adjusted for binary
15607 data.
15608 (putpkt): New wrapper for putpkt_binary.
15609 (readchar): Don't mask off the high bit.
15610 (decode_X_packet): New function.
15611 * server.c (main): Call putpkt_binary if a handler sets the packet
15612 length. Save the length of the incoming packet. Handle 'X'.
15613 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15614
15615 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15616
15617 * server.c (handle_query): Handle qSupported.
15618
15619 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * remote-utils.c (all_symbols_looked_up): New variable.
15622 (look_up_one_symbol): Check it.
15623 * server.h (look_up_one_symbol): New declaration.
15624 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15625
15626 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15627
15628 * Makefile.in (linux-arm-low.o): Update dependencies.
15629 * linux-arm-low.c: Include "gdb_proc_service.h".
15630 (PTRACE_GET_THREAD_AREA): Define.
15631 (ps_get_thread_area): New function.
15632
15633 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15634
15635 * configure.srv (m68k*-*-uclinux*): New target.
15636 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15637 (linux_resume_one_process): Remove extraneous cast.
15638 (linux_read_offsets): New.
15639 (linux_target_op): Add linux_read_offsets on mmuless systems.
15640 * server.c (handle_query): Add qOffsets logic.
15641 * target.h (struct target_ops): Add read_offsets.
15642
15643 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15646 (PTRACE_GET_THREAD_AREA): Define.
15647 (ps_get_thread_area): New function.
15648 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15649 (linux-x86-64-low.o): Update.
15650
15651 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15652
15653 * configure.ac: Remove checks for prfpregset_t.
15654 * gdb_proc_service.h: New file.
15655 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15656 new "gdb_proc_service.h".
15657 * proc-service.c: Likewise.
15658 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15659 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15660 * Makefile.in (gdb_proc_service_h): Updated.
15661 * configure, config.in: Regenerated.
15662
15663 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15664
15665 * remote-utils.c (prepare_resume_reply): Move declaration
15666 of gdb_id_from_wait to the top of the block.
15667
15668 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * linux-low.c (regsets_store_inferior_registers): Read the regset
15671 from the target before filling it.
15672
15673 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15674
15675 * server.c (attach_inferior): Return SIGTRAP for a successful
15676 attach.
15677
15678 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * Makefile.in (OBS): Add version.o.
15681 (STAGESTUFF): Delete.
15682 (version.o): Add dependencies.
15683 (version.c): Replace rule.
15684 (clean): Remove version.c.
15685 * server.c (gdbserver_version): New.
15686 (gdbserver_usage): Use printf.
15687 (main): Handle --version and --help.
15688 * server.h (version, host_name): Add declarations.
15689
15690 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15691
15692 * linux-arm-low.c:
15693 * linux-arm-low.c:
15694 * inferiors.c:
15695 * i387-fp.h:
15696 * i387-fp.c:
15697 * gdbreplay.c:
15698 * regcache.c:
15699 * proc-service.c:
15700 * mem-break.h:
15701 * mem-break.c:
15702 * linux-x86-64-low.c:
15703 * linux-sh-low.c:
15704 * linux-s390-low.c:
15705 * linux-ppc64-low.c:
15706 * linux-ppc-low.c:
15707 * linux-mips-low.c:
15708 * linux-m68k-low.c:
15709 * linux-m32r-low.c:
15710 * linux-low.h:
15711 * linux-low.c:
15712 * linux-ia64-low.c:
15713 * linux-i386-low.c:
15714 * linux-crisv32-low.c:
15715 * thread-db.c:
15716 * terminal.h:
15717 * target.h:
15718 * target.c:
15719 * server.h:
15720 * server.c:
15721 * remote-utils.c:
15722 * regcache.h:
15723 * utils.c:
15724 * Makefile.in:
15725 * configure.ac:
15726 * gdbserver.1: Add (C) after Copyright. Update the FSF
15727 address.
15728
15729 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15730
15731 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15732 (arm_breakpoint_at): Recognize both breakpoints.
15733 (the_low_target): Use the correct breakpoint instruction.
15734
15735 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15736
15737 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15738 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15739 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15740 (the_low_target): Update.
15741
15742 2005-10-25 Andreas Schwab <schwab@suse.de>
15743
15744 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15745
15746 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15747 (ia64_num_regs): Reduce to 462.
15748
15749 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * acinclude.m4: Correct quoting.
15752 * aclocal.m4: Regenerated.
15753
15754 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15755 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15756 (thread_db_init): Call thread_db_err_str.
15757 * configure.ac: Check for TD_VERSION.
15758 * config.in, configure: Regenerated.
15759
15760 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15761
15762 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15763
15764 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15765
15766 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15767 is not available. Define HAVE_PTRACE_GETREGS if it is.
15768 * config.in, configure: Regenerated.
15769 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15770 * linux-i386-low.c, linux-m68k-low.c: Update to use
15771 HAVE_PTRACE_GETREGS.
15772 * linux-low.c (regsets_fetch_inferior_registers)
15773 (regsets_store_inferior_registers): Only return 0 if we processed
15774 GENERAL_REGS.
15775 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15776 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15777
15778 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * inferiors.c (struct thread_info): Add gdb_id.
15781 (add_thread): Add gdb_id argument.
15782 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15783 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15784 calls to add_thread.
15785 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15786 * server.c (handle_query): Use thread_to_gdb_id.
15787 (handle_v_cont, main): Use gdb_id_to_thread_id.
15788 * server.h (add_thread): Update prototype.
15789 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15790 prototypes.
15791
15792 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15795 left-padded registers.
15796 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15797 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15798
15799 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15800
15801 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15802 * configure: Regenerate.
15803 * config.in: Regenerate.
15804 * server.h (NEED_DECLARATION_STRERROR):
15805 Replace with !HAVE_DECL_STRERROR.
15806
15807 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15808
15809 * linux-low.c (linux_wait, linux_send_signal): Don't test
15810 an unsigned long variable for > 0 if it could be MAX_ULONG.
15811 * server.c (myresume): Likewise.
15812 * target.c (set_desired_inferior): Likewise.
15813
15814 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15815
15816 * configure.ac: Simplify and improve check for socklen_t.
15817 * configure, config.in: Regenerate.
15818
15819 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15820
15821 * acconfig.h: Remove.
15822 * configure.ac: Add a test for socklen_t. Use three-argument
15823 AC_DEFINE throughout.
15824 * config.in: Regenerated using autoheader 2.59.
15825 * configure: Regenerated.
15826
15827 * gdbreplay.c (socklen_t): Provide a default.
15828 (remote_open): Use socklen_t.
15829 * remote-utils.c (socklen_t): Provide a default.
15830 (remote_open): Use socklen_t.
15831 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15832 unsigned char.
15833
15834 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15835 char for buffers.
15836 * linux-low.c (linux_read_memory, linux_write_memory)
15837 (linux_read_auxv): Likewise.
15838 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15839 (check_mem_write): Likewise.
15840 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15841 Likewise.
15842 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15843 (registers_from_string, register_data): Likewise.
15844 * server.c (handle_query, main): Likewise.
15845 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15846 (decode_M_packet): Likewise.
15847 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15848 * target.h (struct target_ops): Update read_memory, write_memory,
15849 and read_auxv.
15850 (read_inferior_memory, write_inferior_memory): Update.
15851 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15852 to unsigned char *.
15853 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15854 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15855 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15856 linux-s390-low.c, linux-sh-low.c: Update for changes in
15857 read_inferior_memory and the_low_target->breakpoint.
15858
15859 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15860
15861 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15862 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15863 * configure.srv: Add powerpc64-*-linux*.
15864 * linux-ppc64-low.c: New file.
15865
15866 2005-05-23 Orjan Friberg <orjanf@axis.com>
15867
15868 * linux-cris-low.c: New file with support for CRIS.
15869 * linux-crisv32-low.c: Ditto for CRISv32.
15870 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15871 (clean): Add reg-cris.c and reg-crisv32.c.
15872 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15873 reg-crisv32.o, and reg-crisv32.c to make rules.
15874 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15875 recognized targets.
15876
15877 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15878
15879 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15880 of sizeof (PTRACE_XFER_TYPE).
15881 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15882
15883 2005-05-12 Orjan Friberg <orjanf@axis.com>
15884
15885 * target.h (struct target_ops): Add insert_watchpoint,
15886 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15887 pointers for hardware watchpoint support.
15888 * linux-low.h (struct linux_target_ops): Ditto.
15889 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15890 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15891 to linux_target_ops.
15892 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15893 reply packet.
15894 * server.c (main): Recognize 'Z' and 'z' packets.
15895
15896 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15897
15898 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15899 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15900 (the_low_target): Add new members.
15901
15902 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15903
15904 * proc-service.c (ps_lgetregs): Search all_processes instead of
15905 all_threads.
15906
15907 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15908
15909 * server.c (start_inferior): Change return type to int.
15910 (attach_inferior): Change sigptr to int *.
15911 (handle_v_cont, handle_v_requests): Change signal to int *.
15912 (main): Change signal to int.
15913
15914 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15915
15916 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15917 * configure.srv: Add m32r*-*-linux*.
15918 * linux-m32r-low.c: New file.
15919
15920 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15921
15922 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15923
15924 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15925
15926 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15927 Take unsigned long arguments for PIDs.
15928 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15929 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15930 (wait_for_sigstop, linux_resume_one_process)
15931 (regsets_fetch_inferior_registers, linux_send_signal)
15932 (linux_read_auxv): Likewise. Update the types of variables holding
15933 PIDs. Update format string specifiers.
15934 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15935 * remote-utils.c (prepare_resume_reply): Likewise.
15936 * server.c (cont_thread, general_thread, step_thread)
15937 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15938 unsigned long.
15939 (handle_query): Update format specifiers.
15940 (handle_v_cont, main): Use strtoul for thread IDs.
15941 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15942 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15943 (general_thread, step_thread, thread_from_wait)
15944 (old_thread_from_wait): Update.
15945 * target.h (struct thread_resume): Use unsigned long for THREAD.
15946 (struct target_ops): Use unsigned long for arguments to attach and
15947 thread_alive.
15948
15949 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15950
15951 * acinclude.m4: Include bfd/bfd.m4 directly.
15952 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15953 <agriffis@toolchain.org>.
15954 * aclocal.m4, configure: Regenerated.
15955
15956 2005-01-07 Andrew Cagney <cagney@gnu.org>
15957
15958 * configure.ac: Rename configure.in, require autoconf 2.59.
15959 * configure: Re-generate.
15960
15961 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15962
15963 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15964 LIBS when finished.
15965 * aclocal.m4: Regenerated.
15966 * configure: Regenerated.
15967
15968 2004-11-21 Andreas Schwab <schwab@suse.de>
15969
15970 * linux-m68k-low.c (m68k_num_gregs): Define.
15971 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15972 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15973 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15974 (m68k_breakpoint_at): New. Add to the_low_target.
15975
15976 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15977 srv_linux_thread_db to yes.
15978
15979 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15980
15981 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15982 (ARCH_SET_FS): Likewise.
15983 (ARCH_GET_FS): Likewise.
15984 (ARCH_GET_GS): Likewise.
15985
15986 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15987
15988 * linux-i386-low.c (ps_get_thread_area): New.
15989 * linux-x86-64-low.c (ps_get_thread_area): New.
15990 * linux-low.c: Include <sys/syscall.h>.
15991 (linux_kill_one_process): Don't kill the first thread here.
15992 (linux_kill): Kill the first thread here.
15993 (kill_lwp): New function.
15994 (send_sigstop, linux_send_signal): Use it.
15995 * proc-service.c: Clean up #ifdefs.
15996 (fpregset_info): Delete.
15997 (ps_lgetregs): Update and enable implementation.
15998 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15999 implementations.
16000 * remote-utils.c (struct sym_cache, symbol_cache): New.
16001 (input_interrupt): Print a clearer message.
16002 (async_io_enabled): New variable.
16003 (enable_async_io, disable_async_io): Use it. Update comments.
16004 (look_up_one_symbol): Use the symbol cache.
16005 * thread-db.c (thread_db_look_up_symbols): New function.
16006 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16007
16008 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16009
16010 * configure.in: Test for -rdynamic.
16011 * configure: Regenerated.
16012 * Makefile (INTERNAL_LDFLAGS): New.
16013 (gdbserver, gdbreplay): Use it.
16014
16015 2004-09-02 Andrew Cagney <cagney@gnu.org>
16016
16017 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16018
16019 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16020
16021 * linux-low.c (linux_wait): Clear all_processes list also.
16022
16023 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16024
16025 * linux-low.c: Include <errno.h>. Remove extern declaration of
16026 errno.
16027
16028 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16029
16030 * gdbreplay.c, server.h, utils.c: Update copyright years.
16031
16032 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16033
16034 * server.c (main): Print child status or termination signal from
16035 variable 'signal', not 'sig'.
16036
16037 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16038
16039 * linux-low.c (linux_read_memory): Change return type to
16040 int. Check for and return error from ptrace().
16041 * target.c (read_inferior_memory): Change return type to int. Pass
16042 back return status from the_target->read_memory().
16043 * target.h (struct target_ops): Adapt *read_memory() prototype.
16044 Update comment.
16045 (read_inferior_memory): Adapt prototype.
16046 * server.c (main): Return an error packet if
16047 read_inferior_memory() returns an error.
16048
16049 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16050
16051 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16052 Unify with other clean targets.
16053
16054 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16055
16056 * server.c (handle_v_cont): Call set_desired_inferior.
16057
16058 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16059
16060 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16061
16062 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * linux-low.c (linux_wait): Unblock async I/O.
16065 (linux_resume): Block and enable async I/O.
16066 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16067 * server.h (block_async_io, unblock_async_io): Add prototypes.
16068
16069 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16070
16071 * remote-utils.c (remote_open): Print a status notice after
16072 opening a TCP port.
16073 * server.c (attach_inferior): Print a status notice after
16074 attaching.
16075
16076 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16077
16078 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16079
16080 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16081
16082 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16083 error packet.
16084 * server.c, target.h: Update copyright years.
16085
16086 2004-02-25 Roland McGrath <roland@redhat.com>
16087
16088 * target.h (struct target_ops): New member `read_auxv'.
16089 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16090 * linux-low.c (linux_read_auxv): New function.
16091 (linux_target_ops): Initialize `read_auxv' member to that.
16092
16093 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16094
16095 Committed by Jim Blandy <jimb@redhat.com>.
16096
16097 * linux-s390-low.c (s390_num_regs): Update.
16098 (s390_regmap): Remove control registers. Use __s390x__ predefine
16099 instead of GPR_SIZE to distiguish s390 and s390x targets.
16100
16101 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16102
16103 * linux-low.c: Update copyright year.
16104 (check_removed_breakpoint): Clear pending_is_breakpoint.
16105 (linux_set_resume_request, linux_queue_one_thread)
16106 (resume_status_pending_p): New functions.
16107 (linux_continue_one_thread): Use process->resume.
16108 (linux_resume): Only resume threads if there are no pending events.
16109 * linux-low.h (struct process_info): Add resume request
16110 pointer.
16111
16112 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16113
16114 * regcache.c (new_register_cache): Clear the allocated register
16115 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16116
16117 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * linux-low.c (linux_resume): Take a struct thread_resume *
16120 argument.
16121 (linux_wait): Update call.
16122 (resume_ptr): New static variable.
16123 (linux_continue_one_thread): Renamed from
16124 linux_continue_one_process. Use resume_ptr.
16125 (linux_resume): Use linux_continue_one_thread.
16126 * server.c (handle_v_cont, handle_v_requests): New functions.
16127 (myresume): New function.
16128 (main): Handle 'v' case.
16129 * target.h (struct thread_resume): New type.
16130 (struct target_ops): Change argument of "resume" to struct
16131 thread_resume *.
16132 (myresume): Delete macro.
16133
16134 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16135
16136 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16137 (uninstall): Support DESTDIR.
16138
16139 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16140
16141 * configure.srv: Add xscale*linux copy of arm*linux entry.
16142
16143 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16144
16145 * linux-arm-low.c (arm_reinsert_addr): New function.
16146 (the_low_target): Add arm_reinsert_addr.
16147
16148 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16149
16150 * mem-break.c: Remove whitespace at end of file.
16151
16152 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16153
16154 * configure.in: Check whether we need to prototype strerror.
16155 * server.h: Optionally prototype strerror.
16156 * gdbreplay.c (perror_with_name): Use strerror.
16157 * linux-low.c (linux_attach_lwp): Use strerror.
16158 * utils.c (perror_with_name): Use strerror.
16159 * config.in, configure: Regenerated.
16160
16161 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16162
16163 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16164 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16165
16166 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16167
16168 * Makefile.in (SFILES): Update.
16169 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16170 low-sun3.c: Remove files.
16171
16172 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16173
16174 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16175 (linux_detach_one_process, linux_detach): New functions.
16176 (linux_target_ops): Add linux_detach.
16177 * server.c (main): Handle 'D' packet.
16178 * target.h (struct target_ops): Add "detach" member.
16179 (detach_inferior): Define.
16180
16181 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16182
16183 From Kelley Cook <kelleycook@wideopenwest.com>:
16184 * configure.srv: Accept i[34567]86 variants.
16185
16186 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16187
16188 * linux-low.c (linux_wait_for_event): Correct comment typos.
16189 (linux_resume_one_process): Call check_removed_breakpoint.
16190 (linux_send_signal): New function.
16191 (linux_target_ops): Add linux_send_signal.
16192 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16193 of kill.
16194 * target.h (struct target_ops): Add send_signal.
16195
16196 2003-05-29 Jim Blandy <jimb@redhat.com>
16197
16198 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16199 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16200 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16201 away part of the register's value.
16202
16203 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16204
16205 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16206 (linux_wait_for_event, linux_init_signals): Likewise.
16207
16208 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16209
16210 * configure.in: Check for stdlib.h.
16211 * configure: Regenerated.
16212 * config.in: Regenerated.
16213
16214 2003-01-04 Andreas Schwab <schwab@suse.de>
16215
16216 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16217
16218 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16219
16220 * Makefile.in: Remove obsolete code.
16221
16222 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16223
16224 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16225 defined(PT_FPR0_HI).
16226
16227 2002-11-17 Stuart Hughes <seh@zee2.com>
16228
16229 * linux-arm-low.c (arm_num_regs): Increase.
16230 (arm_regmap): Include status register.
16231
16232 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16233
16234 * linux-low.c (register_addr): Remove incorrect -1 check.
16235
16236 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16237
16238 * linux-low.c (linux_create_inferior): Call setpgid. Return
16239 the new PID.
16240 (unstopped_p, linux_signal_pid): Remove.
16241 (linux_target_ops): Remove linux_signal_pid.
16242 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16243 global instead of target method.
16244 * target.h (struct target_ops): Remove signal_pid. Update comment
16245 for create_inferior.
16246 * server.c (signal_pid): New variable.
16247 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16248 gdbserver. Set the child to be the foreground process group.
16249 (attach_inferior): Set signal_pid.
16250
16251 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16252
16253 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16254
16255 2002-08-20 Jim Blandy <jimb@redhat.com>
16256
16257 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16258 default for this.
16259
16260 2002-08-01 Andrew Cagney <cagney@redhat.com>
16261
16262 * Makefile.in: Make chill references obsolete.
16263
16264 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16265
16266 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16267 * configure: Regenerate.
16268 * config.in: Regenerate.
16269
16270 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16271
16272 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16273 (perror_with_name, remote_close, remote_open, expect, play): Static.
16274
16275 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16276
16277 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16278 byte offsets instead of an array of indexes.
16279 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16280
16281 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16282
16283 * regcache.c: Add comment.
16284
16285 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16286
16287 * thread-db.c: New file.
16288 * proc-service.c: New file.
16289 * acinclude.m4: New file.
16290 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16291 proc-service.o, and thread-db.o.
16292 (linux-low.o): Add USE_THREAD_DB.
16293 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16294 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16295 * aclocal.m4: Regenerated.
16296 * config.in: Regenerated.
16297 * configure: Regenerated.
16298 * configure.in: Check for proc_service.h, sys/procfs.h,
16299 thread_db.h, and linux/elf.h headrs.
16300 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16301 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16302 Check for -lthread_db and thread support.
16303 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16304 PowerPC, and SuperH.
16305 * i387-fp.c: Constify arguments.
16306 * i387-fp.h: Likewise.
16307 * inferiors.c: (struct thread_info): Renamed from
16308 `struct inferior_info'. Remove PID member. Use generic inferior
16309 list header. All uses updated.
16310 (inferiors, signal_pid): Removed.
16311 (all_threads): New variable.
16312 (get_thread): Define.
16313 (add_inferior_to_list): New function.
16314 (for_each_inferior): New function.
16315 (change_inferior_id): New function.
16316 (add_inferior): Removed.
16317 (remove_inferior): New function.
16318 (add_thread): New function.
16319 (free_one_thread): New function.
16320 (remove_thread): New function.
16321 (clear_inferiors): Use for_each_inferior and free_one_thread.
16322 (find_inferior): New function.
16323 (find_inferior_id): New function.
16324 (inferior_target_data): Update argument type.
16325 (set_inferior_target_data): Likewise.
16326 (inferior_regcache_data): Likewise.
16327 (set_inferior_regcache_data): Likewise.
16328 * linux-low.c (linux_bp_reinsert): Remove.
16329 (all_processes, stopping_threads, using_thrads)
16330 (struct pending_signals, debug_threads, pid_of): New.
16331 (inferior_pid): Replace with macro.
16332 (struct inferior_linux_data): Remove.
16333 (get_stop_pc, add_process): New functions.
16334 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16335 Use add_process and add_thread.
16336 (linux_attach_lwp): New function, based on old linux_attach. Use
16337 add_process and add_thread. Set stop_expected for new threads.
16338 (linux_attach): New function.
16339 (linux_kill_one_process): New function.
16340 (linux_kill): Kill all LWPs.
16341 (linux_thread_alive): Use find_inferior_id.
16342 (check_removed_breakpoints, status_pending_p): New functions.
16343 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16344 Update. Use WNOHANG. Wait for cloned processes also. Update process
16345 struct for the found process.
16346 (linux_wait_for_event): New function.
16347 (linux_wait): Use it. Support LWPs.
16348 (send_sigstop, wait_for_sigstop, stop_all_processes)
16349 (linux_resume_one_process, linux_continue_one_process): New functions.
16350 (linux_resume): Support LWPs.
16351 (REGISTER_RAW_SIZE): Remove.
16352 (fetch_register): Use register_size instead. Call supply_register.
16353 (usr_store_inferior_registers): Likewise. Call collect_register.
16354 Fix recursive case.
16355 (regsets_fetch_inferior_registers): Improve error message.
16356 (regsets_store_inferior_registers): Add debugging.
16357 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16358 (unstopped_p, linux_signal_pid): New functions.
16359 (linux_target_ops): Add linux_signal_pid.
16360 (linux_init_signals): New function.
16361 (initialize_low): Call it. Initialize using_threads.
16362 * regcache.c (inferior_regcache_data): Add valid
16363 flag.
16364 (get_regcache): Fetch registers lazily. Add fetch argument
16365 and update all callers.
16366 (regcache_invalidate_one, regcache_invalidate): New
16367 functions.
16368 (new_register_cache): Renamed from create_register_cache.
16369 Return the new regcache.
16370 (free_register_cache): Change argument to a void *.
16371 (registers_to_string, registers_from_string): Call get_regcache
16372 with fetch flag set.
16373 (register_data): Make static. Pass fetch flag to get_regcache.
16374 (supply_register): Call get_regcache with fetch flag clear.
16375 (collect_register): Call get_regcache with fetch flag set.
16376 (collect_register_as_string): New function.
16377 * regcache.h: Update.
16378 * remote-utils.c (putpkt): Flush after debug output and use
16379 stderr.
16380 Handle input interrupts while waiting for an ACK.
16381 (input_interrupt): Use signal_pid method.
16382 (getpkt): Flush after debug output and use stderr.
16383 (outreg): Use collect_register_as_string.
16384 (new_thread_notify, dead_thread_notify): New functions.
16385 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16386 and general_thread.
16387 (look_up_one_symbol): Flush after debug output.
16388 * server.c (step_thread, server_waiting): New variables.
16389 (start_inferior): Don't use signal_pid. Update call to mywait.
16390 (attach_inferior): Update call to mywait.
16391 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16392 (main): Don't fetch/store registers explicitly. Use
16393 set_desired_inferior. Support proposed ``Hs'' packet. Update
16394 calls to mywait.
16395 * server.h: Update.
16396 (struct inferior_list, struct_inferior_list_entry): New.
16397 * target.c (set_desired_inferior): New.
16398 (write_inferior_memory): Constify.
16399 (mywait): New function.
16400 * target.h: Update.
16401 (struct target_ops): New signal_pid method.
16402 (mywait): Removed macro, added prototype.
16403
16404 * linux-low.h (regset_func): Removed.
16405 (regset_fill_func, regset_store_func): New.
16406 (enum regset_type): New.
16407 (struct regset_info): Add type field. Use new operation types.
16408 (struct linux_target_ops): stop_pc renamed to get_pc.
16409 Add decr_pc_after_break and breakpoint_at.
16410 (get_process, get_thread_proess, get_process_thread)
16411 (strut process_info, all_processes, linux_attach_lwp)
16412 (thread_db_init): New.
16413
16414 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16415 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16416 (the_low_target): Add new members.
16417 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16418 (i386_store_fpxregset): Constify.
16419 (target_regsets): Add new kind identifier.
16420 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16421 (i386_set_pc): Add debugging.
16422 (i386_breakpoint_at): New function.
16423 (the_low_target): Add new members.
16424 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16425 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16426 (mips_breakpoint_at): New.
16427 (the_low_target): Add new members.
16428 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16429 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16430 (the_low_target): Add new members.
16431 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16432 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16433 (the_low_target): Add new members.
16434 * linux-x86-64-low.c (target_regsets): Add new kind
16435 identifier.
16436
16437 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16438
16439 From Martin Pool <mbp@samba.org>:
16440 * server.c (gdbserver_usage): New function.
16441 (main): Call it.
16442
16443 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16444
16445 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16446 stop_at -> stop_pc.
16447
16448 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16449
16450 * Makefile.in: Remove obsolete code.
16451
16452 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16453
16454 * linux-low.c (regsets_fetch_inferior_registers),
16455 (regsets_store_inferior_registers): Removed cast to int from
16456 ptrace() calls.
16457 * regcache.h: Added declaration of struct inferior_info.
16458
16459 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16460
16461 * inferiors.c (struct inferior_info): Add regcache_data.
16462 (add_inferior): Call create_register_cache.
16463 (clear_inferiors): Call free_register_cache.
16464 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16465 * regcache.c (struct inferior_regcache_data): New.
16466 (registers): Remove.
16467 (get_regcache): New function.
16468 (create_register_cache, free_register_cache): New functions.
16469 (set_register_cache): Don't initialize the register cache here.
16470 (registers_to_string, registers_from_string, register_data): Call
16471 get_regcache.
16472 * regcache.h: Add prototypes.
16473 * server.h: Likewise.
16474
16475 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16476
16477 * mem-break.c: New file.
16478 * mem-break.h: New file.
16479 * Makefile.in: Add mem-break.o rule; update server.h
16480 dependencies.
16481 * inferiors.c (struct inferior_info): Add target_data
16482 member.
16483 (clear_inferiors): Free target_data member if set.
16484 (inferior_target_data, set_inferior_target_data): New functions.
16485 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16486 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16487 * linux-low.c (linux_bp_reinsert): New variable.
16488 (struct inferior_linux_data): New.
16489 (linux_create_inferior): Use set_inferior_target_data.
16490 (linux_attach): Likewise. Call add_inferior.
16491 (linux_wait_for_one_inferior): New function.
16492 (linux_wait): Call it.
16493 (linux_write_memory): Add const.
16494 (initialize_low): Call set_breakpoint_data.
16495 * linux-low.h (struct linux_target_ops): Add breakpoint
16496 handling members.
16497 * server.c (attach_inferior): Remove extra add_inferior
16498 call.
16499 * server.h: Include mem-break.h. Update inferior.c
16500 prototypes.
16501 * target.c (read_inferior_memory)
16502 (write_inferior_memory): New functions.
16503 * target.h (read_inferior_memory)
16504 (write_inferior_memory): Change macros to prototypes.
16505 (struct target_ops): Update comments. Add const to write_memory
16506 definition.
16507
16508 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16509
16510 * linux-low.c (usr_store_inferior_registers): Support
16511 registers which are allowed to fail to store.
16512 * linux-low.h (linux_target_ops): Likewise.
16513 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16514 (ppc_cannot_store_register): FPSCR may not be storable.
16515
16516 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16517
16518 * server.h: Include <string.h> if HAVE_STRING_H.
16519 * ChangeLog: Correct paths in last ChangeLog entry.
16520
16521 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16522
16523 * linux-low.h: Remove obsolete prototypes.
16524 (struct linux_target_ops): New.
16525 (extern the_low_target): New.
16526 * linux-low.c (num_regs, regmap): Remove declarations.
16527 (register_addr): Use the_low_target explicitly.
16528 (fetch_register): Likewise.
16529 (usr_fetch_inferior_registers): Likewise.
16530 (usr_store_inferior_registers): Likewise.
16531 * linux-arm-low.c (num_regs): Remove.
16532 (arm_num_regs): Define.
16533 (arm_regmap): Renamed from regmap, made static.
16534 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16535 made static.
16536 (arm_cannot_store_register): Renamed from cannot_store_register,
16537 made static.
16538 (the_low_target): New.
16539 * linux-i386-low.c (num_regs): Remove.
16540 (i386_num_regs): Define.
16541 (i386_regmap): Renamed from regmap, made static.
16542 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16543 made static.
16544 (i386_cannot_store_register): Renamed from cannot_store_register,
16545 made static.
16546 (the_low_target): New.
16547 * linux-ia64-low.c (num_regs): Remove.
16548 (ia64_num_regs): Define.
16549 (ia64_regmap): Renamed from regmap, made static.
16550 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16551 made static.
16552 (ia64_cannot_store_register): Renamed from cannot_store_register,
16553 made static.
16554 (the_low_target): New.
16555 * linux-m68k-low.c (num_regs): Remove.
16556 (m68k_num_regs): Define.
16557 (m68k_regmap): Renamed from regmap, made static.
16558 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16559 made static.
16560 (m68k_cannot_store_register): Renamed from cannot_store_register,
16561 made static.
16562 (the_low_target): New.
16563 * linux-mips-low.c (num_regs): Remove.
16564 (mips_num_regs): Define.
16565 (mips_regmap): Renamed from regmap, made static.
16566 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16567 made static.
16568 (mips_cannot_store_register): Renamed from cannot_store_register,
16569 made static.
16570 (the_low_target): New.
16571 * linux-ppc-low.c (num_regs): Remove.
16572 (ppc_num_regs): Define.
16573 (ppc_regmap): Renamed from regmap, made static.
16574 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16575 made static.
16576 (ppc_cannot_store_register): Renamed from cannot_store_register,
16577 made static.
16578 (the_low_target): New.
16579 * linux-s390-low.c (num_regs): Remove.
16580 (s390_num_regs): Define.
16581 (s390_regmap): Renamed from regmap, made static.
16582 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16583 made static.
16584 (s390_cannot_store_register): Renamed from cannot_store_register,
16585 made static.
16586 (the_low_target): New.
16587 * linux-sh-low.c (num_regs): Remove.
16588 (sh_num_regs): Define.
16589 (sh_regmap): Renamed from regmap, made static.
16590 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16591 made static.
16592 (sh_cannot_store_register): Renamed from cannot_store_register,
16593 made static.
16594 (the_low_target): New.
16595 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16596 (the_low_target): New.
16597
16598 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16599
16600 * Makefile.in: Add stamp-h target.
16601 * configure.in: Create stamp-h.
16602 * configure: Regenerated.
16603
16604 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16605
16606 * inferiors.c: New file.
16607 * target.c: New file.
16608 * target.h: New file.
16609 * Makefile.in: Add target.o and inferiors.o. Update
16610 dependencies.
16611 * linux-low.c (inferior_pid): New static variable,
16612 moved from server.c.
16613 (linux_create_inferior): Renamed from create_inferior.
16614 Call add_inferior. Return 0 on success instead of a PID.
16615 (linux_attach): Renamed from myattach.
16616 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16617 (linux_thread_alive): Renamed from mythread_alive.
16618 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16619 child dies.
16620 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16621 (regsets_store_inferior_registers): Correct error message.
16622 Add missing ``return 0''.
16623 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16624 (linux_store_registers): Renamed from store_inferior_registers.
16625 (linux_read_memory): Renamed from read_inferior_memory.
16626 (linux_write_memory): Renamed from write_inferior_memory.
16627 (linux_target_ops): New structure.
16628 (initialize_low): Call set_target_ops ().
16629 * remote-utils.c (unhexify): New function.
16630 (hexify): New function.
16631 (input_interrupt): Send signals to ``signal_pid''.
16632 * server.c (inferior_pid): Remove.
16633 (start_inferior): Update create_inferior call.
16634 (attach_inferior): Call add_inferior.
16635 (handle_query): New function.
16636 (main): Call handle_query for `q' packets.
16637 * server.h: Include "target.h". Remove obsolete prototypes.
16638 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16639
16640 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16641
16642 * Makefile.in: Add WARN_CFLAGS. Update configury
16643 dependencies.
16644 * configure.in: Check for <string.h>
16645 * configure: Regenerate.
16646 * config.in: Regenerate.
16647 * gdbreplay.c: Include needed system headers.
16648 (remote_open): Remove strchr prototype.
16649 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16650 * regcache.c (supply_register): Change buf argument to const void *.
16651 (supply_register_by_name): Likewise.
16652 (collect_register): Change buf argument to void *.
16653 (collect_register_by_name): Likewise.
16654 * regcache.h: Add missing prototypes.
16655 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16656 * server.c (handle_query): New function.
16657 (attached): New static variable, moved out of main.
16658 (main): Quiet longjmp clobber warnings.
16659 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16660 * utils.c (error): Remove NORETURN.
16661 (fatal): Likewise.
This page took 0.361352 seconds and 5 git commands to generate.