]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
Add missing client_state struct references to win target.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-06-08 Stan Cox <scox@redhat.com>
2
3 * win32-low.c (win32_create_inferior): last_ptid and last_status
4 moved to client_state.
5
6 2018-06-08 Pedro Alves <palves@redhat.com>
7
8 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
9 common/common-exceptions.o, common/common-utils.o,
10 common/errors.o, common/print-utils.o and utils.o.
11 * gdbreplay.c: Include "common-defs.h" instead of the two
12 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
13 string.h or alloca.h.
14 (perror_with_name): Delete.
15 (remote_open): Use xstrdup instead of strdup.
16 (main): Rename to ...
17 (captured_main): ... this.
18 (main): New.
19
20 2018-06-08 Tom Tromey <tom@tromey.com>
21
22 * linux-low.c (linux_low_read_btrace): Update.
23
24 2018-06-04 Stan Cox <scox@redhat.com>
25
26 * server.h (struct client_state): New.
27 * server.c (cont_thread, general_thread, multi_process)
28 (report_fork_events, report_vfork_events, report_exec_events)
29 (report_thread_events, swbreak_feature, hwbreak_feature)
30 (vCont_supported, disable_randomization, pass_signals)
31 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
32 Moved to client_state.
33 * remote-utils.c (remote_debug, noack_mode)
34 (transport_is_reliable): Moved to client_state.
35 * tracepoint.c (current_traceframe): Moved to client_state.
36
37 Update all callers.
38 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
39 linux-low.c, remote-utils.h, target.c: Use client_state.
40
41 2018-05-31 Alan Hayward <alan.hayward@arm.com>
42
43 * configure.srv: Add new c/h file.
44
45 2018-05-31 Alan Hayward <alan.hayward@arm.com>
46
47 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
48 null VQ.
49
50 2018-05-25 Maciej W. Rozycki <macro@mips.com>
51
52 * gdb.arch/mips-fpregset-core.exp: New test.
53 * gdb.arch/mips-fpregset-core.c: New test source.
54
55 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
56
57 PR server/23198
58 * hostio.c (require_int): Do not report overflow for integers
59 between 0xfffffff and 0x7fffffff.
60
61 2018-05-22 Maciej W. Rozycki <macro@mips.com>
62
63 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
64 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
65 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
66 functions.
67 (the_low_target): Wire them.
68
69 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
70
71 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
72 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
73 mode. Call collect_register_by_name with vscr using
74 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
75 (ppc_store_vrregset): Add and set vscr_offset variable as in
76 ppc_fill_vrregset. Call supply_register_by_name with vscr using
77 vscr_offset.
78
79 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
80
81 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
82 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
83 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
84
85 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
86
87 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
88 (ppc_store_vsxregset): Likewise.
89 (ppc_fill_vrregset): Likewise.
90 (ppc_store_vrregset): Likewise.
91 (ppc_fill_evrregset): Likewise.
92 (ppc_store_evrregset): Likewise.
93 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
94 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
95 needed.
96
97 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
98
99 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
100 wordsize of the inferior. Call ppc_linux_target_wordsize.
101
102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
103
104 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
105 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
106 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
107 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
108 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
109 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
110 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
111 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
112 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
113 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
114 (tdesc_powerpc_e500l): Remove.
115 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
116 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
117 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
118 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
119 linux-ppc-tdesc.h.
120 (ppc_arch_setup): Remove target description matching code. Fill a
121 ppc_linux_features struct and call ppc_linux_match_description
122 with it.
123
124 2018-05-22 Maciej W. Rozycki <macro@mips.com>
125
126 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
127 width of the requested register exceeds the width of the
128 `ptrace' data type.
129 (mips_cannot_store_register): Likewise.
130
131 2018-05-21 Maciej W. Rozycki <macro@mips.com>
132
133 * linux-mips-low.c (mips_fetch_register): New function. Update
134 preceding comment.
135 (mips_store_gregset): Supply 0 rather than $restart for $zero.
136 (the_low_target): Wire `mips_fetch_register'.
137
138 2018-05-10 Joel Brobecker <brobecker@adacore.com>
139
140 * lynx-i386-low.c (LYNXOS_178): New macro.
141 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
142 the layout on LynxOS-178.
143 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
144 handle floating point registers that are not supported by
145 LynxOS-178.
146
147 2018-05-10 Tom Tromey <tom@tromey.com>
148
149 * configure: Rebuild.
150
151 2018-05-10 Joel Brobecker <brobecker@adacore.com>
152
153 PR server/23158:
154 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
155 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
156 Use it to set the expedite_regs field in the given tdesc.
157 * x86-tdesc.h: New file.
158 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
159 Adjust following the addition of the new expedite_regs parameter
160 to init_target_desc.
161 * linux-tic6x-low.c (tic6x_read_description): Likewise.
162 * linux-x86-tdesc.c: #include "x86-tdesc.h".
163 (i386_linux_read_description, amd64_linux_read_description):
164 Adjust following the addition of the new expedite_regs parameter
165 to init_target_desc.
166 * lynx-i386-low.c: #include "x86-tdesc.h".
167 (lynx_i386_arch_setup): Adjust following the addition of the new
168 expedite_regs parameter to init_target_desc.
169 * nto-x86-low.c: #include "x86-tdesc.h".
170 (nto_x86_arch_setup): Adjust following the addition of the new
171 expedite_regs parameter to init_target_desc.
172 * win32-i386-low.c: #include "x86-tdesc.h".
173 (i386_arch_setup): Adjust following the addition of the new
174 expedite_regs parameter to init_target_desc.
175
176 2018-05-10 Joel Brobecker <brobecker@adacore.com>
177
178 PR server/23158:
179 * win32-low.c (win32_create_inferior): Add call to my_wait
180 setting last_status global.
181
182 2018-05-10 Joel Brobecker <brobecker@adacore.com>
183
184 PR server/23158:
185 * win32-low.c (create_process): Only call gdb_tilde_expand if
186 inferior_cwd is not NULL.
187
188 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
189
190 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
191 registers to the cache if their values have changed.
192 (i387_xsave_to_cache): Provide default values for x87 control
193 registers when these features are available, but disabled.
194 * regcache.c (supply_register_by_name_zeroed): New function.
195 * regcache.h (supply_register_by_name_zeroed): Declare new
196 function.
197
198 2018-05-07 Tom Tromey <tom@tromey.com>
199
200 * configure: Rebuild.
201
202 2018-05-04 Tom Tromey <tom@tromey.com>
203
204 * configure: Rebuild.
205
206 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
207 Pedro Alves <palves@redhat.com>
208
209 * linux-aarch64-low.c (aarch64_stopped_data_address):
210 Likewise.
211
212 2018-04-27 Tom Tromey <tom@tromey.com>
213
214 * configure: Rebuild.
215
216 2018-04-23 Tom Tromey <tom@tromey.com>
217
218 * configure: Rebuild.
219
220 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
221
222 * Makefile.in (depcomp): Add "..".
223 (all_deps_files): New and use it.
224
225 2018-04-18 Alan Hayward <alan.hayward@arm.com>
226
227 * configure.srv (aarch64*-*-linux*): Don't include xml.
228 (i[34567]86-*-cygwin*): Likewise.
229 (i[34567]86-*-linux*): Likewise.
230 (i[34567]86-*-lynxos*): Likewise.
231 (i[34567]86-*-mingw32ce*): Likewise.
232 (i[34567]86-*-mingw*): Likewise.
233 (i[34567]86-*-nto*): Likewise.
234 (tic6x-*-uclinux): Likewise.
235 (x86_64-*-linux*): Likewise.
236 (x86_64-*-mingw*): Likewise.
237 (x86_64-*-cygwin*): Likewise.
238
239 2018-04-18 Alan Hayward <alan.hayward@arm.com>
240
241 * tdesc.c: Remove xml parameter.
242
243 2018-04-18 Alan Hayward <alan.hayward@arm.com>
244
245 * server.c (get_features_xml): Remove cast.
246 * tdesc.c (void target_desc::accept): Fill in function.
247 (tdesc_get_features_xml): Remove old xml creation.
248 (print_xml_feature::visit_pre): Add xml vistor.
249 * tdesc.h (struct target_desc): Make xmltarget mutable.
250 (tdesc_get_features_xml): Remove declaration.
251
252 2018-04-18 Alan Hayward <alan.hayward@arm.com>
253
254 * tdesc.c (tdesc_architecture_name): Add new function.
255 (tdesc_osabi_name): Likewise.
256 (tdesc_get_features_xml): Use new functions.
257
258 2018-04-18 Alan Hayward <alan.hayward@arm.com>
259
260 * tdesc.c (tdesc_create_flags): Remove.
261 (tdesc_add_flag): Likewise.
262 (tdesc_named_type): Likewise.
263 (tdesc_create_union): Likewise.
264 (tdesc_create_struct): Likewise.
265 (tdesc_create_vector): Likewise.
266 (tdesc_add_bitfield): Likewise.
267 (tdesc_add_field): Likewise.
268 (tdesc_set_struct_size): Likewise.
269
270 2018-04-18 Alan Hayward <alan.hayward@arm.com>
271
272 * tdesc.c (~target_desc): Remove implictly deleted items.
273 (init_target_desc): Iterate all features.
274 (tdesc_get_features_xml): Use vector.
275 (tdesc_create_feature): Create feature.
276 * tdesc.h (tdesc_feature) Remove
277 (target_desc): Add features.
278
279 2018-04-18 Alan Hayward <alan.hayward@arm.com>
280
281 * Makefile.in: Add common/tdesc.c
282 * tdesc.c (init_target_desc): init all reg_defs from register
283 vector.
284 (tdesc_create_reg): Create tdesc_reg.
285 * tdesc.h (tdesc_feature): Add register vector.
286
287 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
288
289 * tdesc.h (struct target_desc) <features>: Change type to
290 std::vector<std::string>.
291 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
292 changes.
293 (tdesc_get_features_xml): Likewise.
294 (tdesc_create_feature): Likewise.
295
296 2018-03-26 Alan Hayward <alan.hayward@arm.com>
297
298 * regcache.c (find_register_by_number): Return a ref.
299 (find_regno): Use references.
300 (register_size): Likewise.
301 (register_data): Likewise.
302 * tdesc.c (target_desc::~target_desc): Remove free calls.
303 (target_desc::operator==): Use std::vector compare.
304 (init_target_desc): Use reference.
305 (tdesc_create_reg): Use reg constructors.
306 * tdesc.h (struct target_desc): Replace pointer with object.
307
308 2018-03-23 Alan Hayward <alan.hayward@arm.com>
309
310 * regcache.c (find_register_by_number): Make static.
311 (find_regno): Use find_register_by_number
312 * regcache.h (struct reg): Remove declaration.
313
314 2018-03-23 Alan Hayward <alan.hayward@arm.com>
315
316 * tdesc.c (target_desc::~target_desc): Move to here.
317 (target_desc::operator==): Likewise.
318 * tdesc.h (target_desc::~target_desc): Move from here.
319 (target_desc::operator==): Likewise.
320
321 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
322
323 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
324
325 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
326
327 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
328 S390_TDESC_GS.
329 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
330 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
331 and init_registers_s390_gs_linux64.
332
333 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
334
335 * linux-s390-low.c (s390_fill_gs): Remove function.
336 (s390_fill_gsbc): Remove function.
337 (s390_regsets): Set fill functions for the guarded storage regsets
338 to NULL.
339
340 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
341
342 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
343 the word size. Add comment.
344 (s390_get_wordsize): New function.
345 (s390_arch_setup): No longer select a temporary tdesc to fetch the
346 pswm with it. Instead, use s390_get_wordsize to determine the
347 word size first and derive the correct tdesc from that directly.
348
349 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * Makefile.in: Include silent-rules.mk.
352 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
353 (COMPILE): Add ECHO_CXX.
354 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
355 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
356 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
357 (version-generated.c): Add ECHO_GEN.
358 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
359 (IPAGENT_COMPILE): Add ECHO_CXX.
360 (%-generated.c): Add ECHO_REGDAT.
361
362 2018-03-14 Tom Tromey <tom@tromey.com>
363
364 PR cli/14977:
365 * ax.c (ax_printf): Special case for NULL.
366
367 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * linux-low.c (linux_qxfer_libraries_svr4): Use
370 xml_escape_text_append.
371
372 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
373
374 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
375
376 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * server.c (handle_general_set): Remove unnecessary xstrdup.
379
380 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * server.c (parse_debug_format_options): Adjust to
383 delim_string_to_char_ptr_vec changes.
384 * thread-db.c (thread_db_load_search): Adjust to
385 dirnames_to_char_ptr_vec changes.
386
387 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
388
389 * target.h (target_enable_btrace, target_disable_btrace)
390 (target_read_btrace, target_read_btrace_conf): Turn macro into
391 inline function. Throw error if target method is not defined.
392 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
393 check for btrace target method. Be prepared to handle exceptions
394 from btrace target methods.
395
396 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
397
398 * server.c (captured_main): Change order of error message printed
399 when the current working directory cannot be found.
400
401 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
402
403 * server.c: Include "filenames.h" and "pathstuff.h".
404 (program_name): Delete variable.
405 (program_path): New anonymous class.
406 (get_exec_wrapper): Use "program_path" instead of
407 "program_name".
408 (handle_v_run): Likewise.
409 (captured_main): Likewise.
410 (process_serial_event): Likewise.
411
412 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
413
414 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
415 (OBJS): Add "pathstuff.o".
416 * server.c (current_directory): New global variable.
417 (captured_main): Initialize "current_directory".
418
419 2018-02-26 Alan Hayward <alan.hayward@arm.com>
420
421 * tdesc.c: Use common/tdesc.h.
422 * tdesc.h: Likewise.
423
424 2018-02-20 Alan Hayward <alan.hayward@arm.com>
425 Simon Marchi <simon.marchi@ericsson.com>
426
427 * Makefile.in: Switch order of make rules.
428
429 2018-02-19 Alan Hayward <alan.hayward@arm.com>
430
431 * Makefile.in: Add common directory in build.
432 * configure.ac: Add common reference.
433 * configure: Regenerate.
434
435 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
436
437 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
438 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
439 * spu-low.c (spu_target_ops): Likewise.
440 * win32-low.c (win32_target_ops): Likewise.
441 * server.c (supported_btrace_packets): Report packets unconditionally.
442 * target.h (target_ops) <supports_btrace>: Remove.
443 (target_supports_btrace): Remove.
444
445 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
446
447 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
448 (handle_btrace_disable): Change return type to void. Use exceptions
449 to report errors.
450 (handle_btrace_general_set): Catch exception and copy message to
451 return message.
452
453 2018-02-08 Tom Tromey <tom@tromey.com>
454
455 * linux-low.c (install_software_single_step_breakpoints): Use
456 make_scoped_restore.
457 * inferiors.c (make_cleanup_restore_current_thread): Remove.
458 (do_restore_current_thread_cleanup): Remove.
459 * gdbthread.h (make_cleanup_restore_current_thread): Don't
460 declare.
461
462 2018-02-08 Tom Tromey <tom@tromey.com>
463
464 * mem-break.c (set_raw_breakpoint_at): Use
465 gdb::unique_xmalloc_ptr.
466
467 2018-01-30 Pedro Alves <palves@redhat.com>
468
469 PR gdb/13211
470 * target.c (target_terminal::terminal_state): Rename to ...
471 (target_terminal::m_terminal_state): ... this.
472
473 2018-01-19 James Clarke <jrtc27@jrtc27.com>
474
475 * linux-low.c (handle_extended_wait): Surround call to
476 thread_db_notice_clone with #ifdef USE_THREAD_DB.
477
478 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
479
480 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
481 linux_ptrace_attach_fail_reason_string now returning an
482 std::string.
483 (linux_attach): Likewise.
484 * thread-db.c (attach_thread): Likewise.
485
486 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
487
488 PR gdb/21559
489 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
490 checking for fs_base/gs_base fields in struct user_regs_struct.
491 * configure: Regenerate.
492
493 2018-01-16 Yao Qi <yao.qi@linaro.org>
494
495 PR gdb/18749
496 * linux-low.c (fetch_register): Call supply_register instead of
497 error.
498
499 2018-01-08 Yao Qi <yao.qi@linaro.org>
500 Simon Marchi <simon.marchi@ericsson.com>
501
502 * Makefile.in (OBS): Remove selftest.o.
503 * configure.ac: Set srv_selftest_objs if $development is true.
504 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
505 * configure: Re-generated.
506 * server.c (captured_main): Wrap variable selftest_filter with
507 GDB_SELF_TEST.
508
509 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
510
511 * server.c (parse_debug_format_options): Return std::string.
512 (handle_monitor_command, captured_main): Adjust.
513
514 2018-01-05 Pedro Alves <palves@redhat.com>
515
516 PR gdb/18653
517 * server.c (captured_main): Pass quiet=false to
518 save_original_signals_state.
519
520 2018-01-01 Joel Brobecker <brobecker@adacore.com>
521
522 * gdbreplay.c (gdbreplay_version): Update copyright year in
523 version message.
524 * server.c (gdbserver_version): Likewise.
525
526 2017-12-08 Tom Tromey <tom@tromey.com>
527
528 * ax.c (ax_printf): Update.
529
530 2017-12-07 Yao Qi <yao.qi@linaro.org>
531
532 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
533 aarch64_linux_read_description.
534 * linux-amd64-ipa.c (idx2mask): New array.
535 (get_ipa_tdesc): Move idx2mask out.
536 (initialize_low_tracepoint): Initialize target descriptions.
537 * linux-i386-ipa.c (idx2mask): New array.
538 (get_ipa_tdesc): Move idx2mask out.
539 (initialize_low_tracepoint): Initialize target descriptions.
540
541 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * tdesc.c (struct tdesc_type): Change return type.
544 (tdesc_add_flag): Change parameter type.
545 (tdesc_add_bitfield): Likewise.
546 (tdesc_add_field): Likewise.
547 (tdesc_set_struct_size): Likewise.
548
549 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
550
551 * regcache.c (registers_to_string): Remove unused variable.
552
553 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
554
555 * inferiors.c (for_each_inferior_with_data): Remove.
556 * inferiors.h (for_each_inferior_with_data): Remove.
557 * server.c (handle_qxfer_threads_worker): Change parameter type.
558 (handle_qxfer_threads_proper): Use for_each_thread.
559
560 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
561
562 * inferiors.c (for_each_inferior): Remove.
563 (clear_inferiors): Use for_each_thread.
564 * inferiors.h (for_each_inferior): Remove.
565 * linux-low.c (linux_wait_for_event_filtered): Use
566 for_each_thread.
567 (linux_stabilize_threads): Likewise.
568 * regcache.c (regcache_release): Likewise.
569 * server.c (gdb_wants_all_threads_stopped): Likewise.
570 (clear_pending_status_callback): Remove.
571 (handle_status): Use for_each_thread.
572 (captured_main): Likewise.
573 * win32-low.c (child_init_thread_list): Likewise.
574 (win32_clear_inferiors): Likewise.
575 (fake_breakpoint_event): Likewise.
576
577 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
578
579 * inferiors.h (find_inferior): Remove.
580 * inferiors.c (find_inferior): Remove.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-low.c (resume_status_pending_p): Update comment.
585 (need_step_over_p): Update comment.
586
587 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * linux-low.c (proceed_one_lwp): Return void, change parameter
590 type.
591 (unsuspend_and_proceed_one_lwp): Likewise.
592 (proceed_all_lwps): Use for_each_thread.
593 (unstop_all_lwps): Likewise.
594
595 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
596
597 * linux-low.c (linux_resume_one_thread): Return void, take
598 parameter directly.
599 (linux_resume): Use for_each_thread.
600
601 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
602
603 * linux-low.c (send_sigstop_callback): Return void, change
604 parameter type. Rename to...
605 (send_sigstop): ... this.
606 (suspend_and_send_sigstop_callback): Return void, change parameter
607 type. Rename to...
608 (suspend_and_send_sigstop): ... this.
609 (stop_all_lwps): Use for_each_thread.
610
611 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
612
613 * linux-low.c (lwp_running): Return bool, remove unused
614 argument.
615 (linux_stabilize_threads): Use find_thread.
616
617 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
618
619 * linux-low.c (select_singlestep_lwp_callback): Remove.
620 (count_events_callback): Remove.
621 (select_event_lwp_callback): Remove.
622 (select_event_lwp): Use find_thread/for_each_thread.
623
624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
625
626 * linux-low.c (not_stopped_callback): Return bool, take filter
627 argument directly.
628 (linux_wait_for_event_filtered): Use find_thread.
629 (linux_wait_1): Likewise.
630
631 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
632
633 * linux-low.c (same_lwp): Remove.
634 (find_lwp_pid): Use find_thread.
635
636 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
637
638 * linux-low.c (delete_lwp_callback): Remove.
639 (linux_mourn): Use for_each_thread.
640
641 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
642
643 * linux-low.c (linux_detach_lwp_callback): Return void, remove
644 args parameter, don't check for pid.
645 (linux_detach): Use for_each_thread.
646
647 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * linux-low.c (struct counter): Remove.
650 (second_thread_of_pid_p): Remove.
651 (last_thread_of_process_p): Use find_thread.
652
653 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * inferiors.c (find_inferior_in_random): Remove.
656 * inferiors.h (find_inferior_in_random): Remove.
657 * linux-low.c (status_pending_p_callback): Return bool, accept
658 parameter ptid directly.
659 (linux_wait_for_event_filtered): Use find_thread_in_random.
660 (linux_wait_1): Likewise.
661
662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
663
664 * inferiors.c (find_inferior_id): Remove.
665 (find_thread_ptid): Move implemention from find_inferior_id to
666 here.
667 * inferiors.h (find_inferior_id): Remove.
668 * server.c (handle_status): Use find_thread_ptid.
669 (process_serial_event): Likewise.
670 * thread-db.c (find_one_thread): Likewise.
671 (thread_db_thread_handle): Likewise.
672 * win32-low.c (thread_rec): Likewise.
673 (child_delete_thread): Likewise.
674 (win32_thread_alive): Likewise.
675 (get_child_debug_event): Likewise.
676
677 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * linux-mips-low.c (update_watch_registers_callback): Return
680 void, remove pid_p parameter, don't check for pid.
681 (mips_insert_point, mips_remove_point): Use for_each_thread.
682
683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * lynx.low (lynx_delete_thread_callback): Remove.
686 (lynx_mourn): Use for_each_thread.
687
688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * regcache.c (regcache_invalidate_one): Remove.
691 (regcache_invalidate_pid): use for_each_thread.
692
693 2017-11-26 Tom Tromey <tom@tromey.com>
694
695 * linux-low.c (linux_create_inferior): Update.
696
697 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
698
699 * spu-low.c (spu_create_inferior): Fix typo in argument name.
700
701 2017-11-24 Alan Hayward <alan.hayward@arm.com>
702
703 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
704 * linux-aarch64-low.c (initialize_low_arch): Call init func.
705 * linux-aarch64-tdesc-selftest.c: New file.
706 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
707
708 2017-11-24 Alan Hayward <alan.hayward@arm.com>
709
710 * configure.srv: Add new file.
711 * linux-aarch64-low.c (initialize_low_arch): Call init func.
712 * linux-aarch64-tdesc-selftest.c: New file.
713 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
714
715 2017-11-24 Alan Hayward <alan.hayward@arm.com>
716
717 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
718 * linux-aarch64-low.c (initialize_low_arch): Remove init.
719 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
720
721 2017-11-24 Alan Hayward <alan.hayward@arm.com>
722
723 * configure.srv: Add new files.
724 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
725 aarch64_linux_read_description.
726 * linux-aarch64-low.c (aarch64_linux_read_description):
727 Merge with aarch64_arch_setup.
728 (aarch64_arch_setup): Call aarch64_linux_read_description.
729 * linux-aarch64-tdesc.c: New file.
730 * linux-aarch64-tdesc.h: New file.
731
732 2017-11-24 Yao Qi <yao.qi@linaro.org>
733
734 * configure.srv: Set $srv_regobj for tic6x-linux.
735 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
736 (tic6x_read_description): Move some code to tic6x_arch_setup.
737 (tic6x_tdesc_test): New function.
738 (initialize_low_arch): Call selftests::register_test.
739
740 2017-11-22 Yao Qi <yao.qi@linaro.org>
741
742 * remote-utils.c (prepare_resume_reply): Use memcpy.
743
744 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
745
746 * linux-low.c (kill_one_lwp_callback): Return void, take
747 argument directly, don't filter on pid.
748 (linux_kill): Use for_each_thread.
749
750 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
751
752 * linux-low.c (need_step_over_p): Return bool, remove dummy
753 argument.
754 (linux_resume, proceed_all_lwps): Use find_thread.
755
756 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
757
758 * linux-low.c (resume_status_pending_p): Return bool, remove
759 flag_p argument.
760 (linux_resume): Use find_thread.
761
762 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
763
764 * linux-low.c (struct thread_resume_array): Remove.
765 (linux_set_resume_request): Return void, take arguments
766 directly.
767 (linux_resume): Use for_each_thread.
768
769 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
770
771 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
772 return bool, remove data argument.
773 (linux_stabilize_threads): Use find_thread.
774
775 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
776
777 * linux-low.c (unsuspend_one_lwp): Remove.
778 (unsuspend_all_lwps): Use for_each_thread, inline code from
779 unsuspend_one_lwp.
780
781 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
782
783 * gdbthread.h (find_thread): Add overload with ptid_t filter.
784 * linux-low.c (struct iterate_over_lwps_args): Remove.
785 (iterate_over_lwps_filter): Remove.
786 (iterate_over_lwps): Use find_thread.
787
788 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
789
790 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
791 (linux_handle_new_gdb_connection): Use for_each_thread, inline
792 code from reset_lwp_ptrace_options_callback.
793
794 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
795
796 * linux-arm-low.c (struct update_registers_data): Remove.
797 (update_registers_callback): Return void, take arguments
798 directly, don't check thread's pid.
799 (arm_insert_point, arm_remove_point): Use for_each_thread.
800
801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
802
803 * win32-low.c (continue_one_thread): Return void, take argument
804 directly.
805 (child_continue): Use for_each_thread.
806
807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
808
809 * win32-i386-low.c (update_debug_registers_callback): Rename
810 to ...
811 (update_debug_registers): ... this, return void, remove pid_p arg.
812 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
813
814 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * inferiors.h (struct process_info): Add constructor, initialize
817 fields..
818 <syscalls_to_catch>: Change type to std::vector<int>.
819 * inferiors.c (add_process): Allocate process_info with new.
820 (remove_process): Free process_info with delete.
821 * linux-low.c (handle_extended_wait): Adjust.
822 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
823 * server.c (handle_general_set): Adjust.
824
825 2017-11-16 Pedro Alves <palves@redhat.com>
826
827 * remote-utils.c (remote_close): Block SIGIO signals instead of
828 uninstalling the SIGIO handler.
829
830 2017-11-16 Alan Hayward <alan.hayward@arm.com>
831
832 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
833
834 2017-11-16 Yao Qi <yao.qi@linaro.org>
835
836 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
837 (tic6x_store_gregset): Likewise.
838 (tic6x_usrregs_info): Move it up.
839
840 2017-11-15 Alan Hayward <alan.hayward@arm.com>
841
842 * Makefile.in: Update arch rules.
843 * configure.srv: Explicitly mark arch/ files.
844
845 2017-11-13 Andreas Schwab <schwab@suse.de>
846
847 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
848 function.
849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
850
851 2017-11-06 Pedro Alves <palves@redhat.com>
852
853 * config.in, configure: Regenerate.
854
855 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
856
857 * target.c (struct thread_search): Remove.
858 (thread_search_callback): Remove.
859 (prepare_to_access_memory): Use for_each_thread instead of
860 find_inferior. Inline code from thread_search_callback.
861
862 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
863
864 * server.c (struct visit_actioned_threads_data): Remove.
865 (visit_actioned_threads): Change prototype to take arguments
866 directly.
867 (resume): Use find_thread instead of find_inferior.
868
869 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
870
871 * server.c (queue_stop_reply_callback): Change prototype, return
872 void.
873 (find_status_pending_thread_callback): Remove.
874 (handle_status): Replace find_inferior with find_thread and
875 for_each_thread.
876
877 2017-10-25 Alan Hayward <alan.hayward@arm.com>
878
879 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
880 with REGNO.
881 (aarch64_store_gregset): Likewise.
882 (aarch64_fill_fpregset): Likewise.
883 (aarch64_store_fpregset): Likewise.
884
885 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
886
887 * gdbthread.h (find_thread, for_each_thread): New functions.
888 * inferiors.c (thread_of_pid): Remove.
889 (find_any_thread_of_pid): Use find_thread.
890 * linux-low.c (num_lwps): Use for_each_thread.
891
892 2017-10-17 Yao Qi <yao.qi@linaro.org>
893
894 * Makefile.in: Remove one rule.
895 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
896
897 2017-10-17 Yao Qi <yao.qi@linaro.org>
898
899 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
900 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
901
902 2017-10-17 Yao Qi <yao.qi@linaro.org>
903
904 * configure.srv: Rename arm.o with arch/arm.o.
905
906 2017-10-17 Yao Qi <yao.qi@linaro.org>
907
908 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
909 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
910 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
911 (arch-i386.o, arch-amd64.o): Remove rules.
912 (arch/%.o): New rule.
913 Update POSTCOMPILE and COMPILE.pre.
914 * configure.ac: Invoke AC_CONFIG_COMMANDS.
915 * configure: Re-generated.
916 * configure.srv: Replace arch-i386.o with arch/i386.o.
917 Replace arch-amd64.o with arch/amd64.o.
918
919 2017-10-16 Yao Qi <yao.qi@linaro.org>
920
921 * configure: Regenerated.
922
923 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
924
925 * inferiors.h: (struct inferior_list): Remove.
926 (struct inferior_list_entry); Remove.
927 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
928 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
929 get_first_inferior): Remove.
930 (for_each_inferior, for_each_inferior_with_data, find_inferior,
931 find_inferior_id, find_inferior_in_random): Change signature.
932 * inferiors.c (all_threads): Change type to
933 std::list<thread_info *>.
934 (get_thread): Remove macro.
935 (find_inferior, find_inferior_id): Change signature, implement
936 using find_thread.
937 (find_inferior_in_random): Change signature, implement using
938 find_thread_in_random.
939 (for_each_inferior, for_each_inferior_with_data): Change
940 signature, implement using for_each_thread.
941 (add_inferior_to_list, remove_inferior): Remove.
942 (add_thread, get_first_thread, thread_of_pid,
943 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
944 (get_first_inferior, one_inferior_p, clear_inferior_list):
945 Remove.
946 (clear_inferiors, get_thread_process): Update.
947 * gdbthread.h: Include <list>.
948 (struct thread_info) <entry>: Remove field.
949 <id>: New field.
950 (all_threads): Change type to std::list<thread_info *>.
951 (get_first_inferior): Add doc.
952 (find_thread, for_each_thread, find_thread_in_random): New
953 functions.
954 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
955 * linux-arm-low.c (update_registers_callback): Update.
956 * linux-low.c (second_thread_of_pid_p): Update.
957 (kill_one_lwp_callback, linux_detach_lwp_callback,
958 delete_lwp_callback, status_pending_p_callback, same_lwp,
959 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
960 iterate_over_lwps, not_stopped_callback,
961 resume_stopped_resumed_lwps, count_events_callback,
962 select_singlestep_lwp_callback, select_event_lwp_callback,
963 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
964 suspend_and_send_sigstop_callback, wait_for_sigstop,
965 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
966 lwp_running, linux_set_resume_request, resume_status_pending_p,
967 need_step_over_p, start_step_over, linux_resume_one_thread,
968 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
969 reset_lwp_ptrace_options_callback): Update.
970 * linux-mips-low.c (update_watch_registers_callback): Update.
971 * regcache.c (regcache_invalidate_one, regcache_invalidate):
972 Update.
973 (free_register_cache_thread_one): Remove.
974 (regcache_release): Update.
975 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
976 handle_qxfer_threads_worker): Update.
977 (handle_query): Update, use list iterator.
978 (visit_actioned_threads, handle_pending_status,
979 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
980 clear_pending_status_callback, set_pending_status_callback,
981 find_status_pending_thread_callback, handle_status,
982 process_serial_event): Update.
983 * target.c (thread_search_callback): Update.
984 * thread-db.c (thread_db_get_tls_address): Update.
985 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
986 Update.
987 * win32-i386-low.c (update_debug_registers_callback): Update.
988 * win32-low.c (delete_thread_info, child_delete_thread,
989 continue_one_thread, suspend_one_thread,
990 get_child_debug_event): Adjust.
991
992 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
993
994 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
995 * inferiors.h: Include <list>.
996 (struct process_info) <entry>: Remove field.
997 <pid>: New field.
998 (pid_of): Change macro to function.
999 (ptid_of, lwpid_of): Remove macro.
1000 (all_processes): Change type to std::list<process_info *>.
1001 (ALL_PROCESSES): Remove macro.
1002 (for_each_process, find_process): New function.
1003 * inferiors.c (all_processes): Change type to
1004 std::list<process_info *>.
1005 (find_thread_process): Adjust.
1006 (add_process): Likewise.
1007 (remove_process): Likewise.
1008 (find_process_pid): Likewise.
1009 (get_first_process): Likewise.
1010 (started_inferior_callback): Remove.
1011 (have_started_inferiors_p): Adjust.
1012 (attached_inferior_callback): Remove.
1013 (have_attached_inferiors_p): Adjust.
1014 * linux-low.c (check_zombie_leaders): Likewise.
1015 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1016 (x86_linux_update_xmltarget): Adjust.
1017 * server.c (handle_query): Likewise.
1018 (gdb_reattached_process): Remove.
1019 (handle_status): Adjust.
1020 (kill_inferior_callback): Likewise.
1021 (detach_or_kill_inferior): Remove.
1022 (print_started_pid): Likewise.
1023 (print_attached_pid): Likewise.
1024 (detach_or_kill_for_exit): Update.
1025 (process_serial_event): Likewise.
1026 * linux-arm-low.c (arm_new_fork): Likewise.
1027
1028 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1029
1030 * dll.h: Include <list>.
1031 (struct dll_info): Add constructor.
1032 <entry>: Remove field.
1033 (all_dlls): Change type to std::list<dll_info>.
1034 * dll.c: Include <algorithm>.
1035 (get_dll): Remove macro.
1036 (all_dlls): Change type to std::list<dll_info *>.
1037 (free_one_dll): Remove.
1038 (match_dll): Likewise.
1039 (loaded_dll): Adjust.
1040 (unloaded_dll): Adjust to all_dlls type change, use
1041 std::find_if. Inline code from match_dll.
1042 (clear_dlls): Adjust to all_dlls type change.
1043 * server.c (emit_dll_description): Remove.
1044 (handle_qxfer_libraries): Adjust to all_dlls type change,
1045 integrate emit_dll_description's functionality.
1046
1047 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1048
1049 * linux-low.h (struct linux_target_ops) <delete_process>: New
1050 field.
1051 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1052 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1053 (struct linux_target_ops): Add delete_process callback.
1054 * linux-arm-low.c (arm_delete_process): New.
1055 (struct linux_target_ops): Add delete_process callback.
1056 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1057 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1058 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1059 * linux-mips-low.c (mips_linux_delete_process): New.
1060 (struct linux_target_ops): Add delete_process callback.
1061 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1062 * linux-s390-low.c (struct linux_target_ops): Likewise.
1063 * linux-sh-low.c (struct linux_target_ops): Likewise.
1064 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1065 * linux-tile-low.c (struct linux_target_ops): Likewise.
1066 * linux-x86-low.c (x86_linux_delete_process): New.
1067 (struct linux_target_ops): Add delete_process callback.
1068 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1069
1070 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * linux-aarch64-low.c (the_low_target): Add thread delete
1073 callback.
1074 * linux-arm-low.c (arm_delete_thread): New function.
1075 (the_low_target): Add thread delete callback.
1076 * linux-bfin-low.c (the_low_target): Likewise.
1077 * linux-crisv32-low.c (the_low_target): Likewise.
1078 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1079 set.
1080 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1081 field.
1082 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1083 * linux-mips-low.c (mips_linux_delete_thread): New function.
1084 (the_low_target): Add thread delete callback.
1085 * linux-ppc-low.c (the_low_target): Likewise.
1086 * linux-s390-low.c (the_low_target): Likewise.
1087 * linux-sh-low.c (the_low_target): Likewise.
1088 * linux-tic6x-low.c (the_low_target): Likewise.
1089 * linux-tile-low.c (the_low_target): Likewise.
1090 * linux-x86-low.c (the_low_target): Likewise.
1091 * linux-xtensa-low.c (the_low_target): Likewise.
1092
1093 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1094
1095 * win32-low.c: Include "common-inferior.h".
1096
1097 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * inferiors.c (set_inferior_cwd): New function.
1100 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1101 (handle_query): Inform that QSetWorkingDir is supported.
1102 * win32-low.c (create_process): Pass the inferior's cwd to
1103 CreateProcess.
1104
1105 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1106
1107 * inferiors.c (current_inferior_cwd): New global variable.
1108 (get_inferior_cwd): New function.
1109 * inferiors.h (struct process_info) <cwd>: New field.
1110
1111 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1112
1113 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1114 (OBS): Add gdb_tilde_expand.o.
1115
1116 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1117
1118 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1119 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1120
1121 2017-09-29 Pedro Alves <palves@redhat.com>
1122
1123 * ax.c (gdb_parse_agent_expr): Constify.
1124 * ax.h (gdb_parse_agent_expr): Constify.
1125 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1126 Constify.
1127 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1128 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1129 * remote-utils.h (read_ptid): Constify.
1130 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1131 (process_point_options, process_serial_event): Constify.
1132 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1133 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1134 (cmd_qtbuffer): Constify.
1135
1136 2017-09-29 Pedro Alves <palves@redhat.com>
1137
1138 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1139 fails.
1140
1141 2017-09-29 Pedro Alves <palves@redhat.com>
1142
1143 * linux-low.c (handle_extended_wait): Pass parent thread instead
1144 of process to thread_db_notice_clone.
1145 * linux-low.h (thread_db_notice_clone): Replace parent process
1146 parameter with parent thread parameter.
1147 * thread-db.c (find_one_thread): Add comment.
1148 (thread_db_notice_clone): Replace parent process parameter with
1149 parent thread parameter. Temporarily switch to the parent thread.
1150
1151 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1152
1153 * gdbthread.h: Include "common-gdbthread.h".
1154 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1155 "if" when validating the ptid.
1156 * remote-utils.c: Include "gdbthread.h".
1157 (prepare_resume_reply): Use "switch_to_thread".
1158 * target.c (done_accessing_memory): Likewise.
1159
1160 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1161
1162 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1163 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1164 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1165 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1166 s390x-gs-linux64-ipa.o to ipa_obj.
1167 * linux-s390-low.c (HWCAP_S390_GS): New define.
1168 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1169 New functions.
1170 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1171 (s390_arch_setup): Check for guarded-storage support and choose
1172 appropriate tdesc.
1173 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1174 init_registers_s390x_gs_linux64.
1175 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1176 enum value.
1177 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1178 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1179
1180 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1181
1182 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1183
1184 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1185
1186 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1187 (thread_db_thread_handle): Declare.
1188 * linux-low.c (linux_target_ops): Initialize thread_handle.
1189 * server.c (handle_qxfer_threads_worker): Add support for
1190 "handle" attribute.
1191 * target.h (struct target_ops): Add new function pointer,
1192 thread_handle.
1193 (target_thread_handle): Define.
1194 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1195 field in lwp.
1196 (thread_db_thread_handle): New function.
1197
1198 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1199
1200 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1201 * linux-low.h (thread_db_notice_clone): Declare.
1202 * thread-db.c (thread_db_notice_clone): New function.
1203
1204 2017-09-21 Pedro Alves <palves@redhat.com>
1205
1206 * server.c (gdb_read_memory, handle_status, process_serial_event)
1207 (handle_serial_event, handle_target_event): Adjust to
1208 set_desired_thread prototype change.
1209 * target.c (set_desired_thread): Remove 'use_general' parameter
1210 and adjust.
1211 * target.h (set_desired_thread): Remove 'use_general' parameter.
1212
1213 2017-09-20 Tom Tromey <tom@tromey.com>
1214
1215 * target.c (target_terminal::terminal_state): Define.
1216 (target_terminal::init): Rename from target_terminal_init.
1217 (target_terminal::inferior): Rename from
1218 target_terminal_inferior.
1219 (target_terminal::ours): Rename from target_terminal_ours.
1220 (target_terminal::ours_for_output, target_terminal::info): New.
1221
1222 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1223
1224 * server.c (accumulate_file_name_length): Remove.
1225 (emit_dll_description): Adjust to std::string change.
1226 (handle_qxfer_libraries): Use std::string to hold document.
1227
1228 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1229
1230 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1231 return type of xml_escape_text.
1232 * server.c (emit_dll_description): Likewise.
1233
1234 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1235
1236 * server.c (captured_main): Accept argument for --selftest.
1237 Update run_tests call.
1238 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1239 when registering selftests.
1240
1241 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1242
1243 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1244 instead of "VEC" for "target_desc.reg_defs".
1245 (regcache_cpy): Likewise.
1246 (registers_to_string): Likewise.
1247 (registers_from_string): Likewise.
1248 (find_regno): Likewise.
1249 (supply_regblock): Likewise.
1250 (regcache_raw_read_unsigned): Likewise.
1251 * tdesc.c (init_target_desc): Likewise.
1252 (tdesc_create_reg): Likewise.
1253 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1254 (struct target_desc) <reg_defs>: Convert to "std::vector".
1255 (target_desc): Do not initialize "reg_defs".
1256 (~target_desc): Update code to use "std::vector" instead of "VEC"
1257 for "target_desc.reg_defs".
1258 (operator==): Likewise.
1259
1260 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1261
1262 * inferiors.h (thread_to_gdb_id): Remove.
1263 * inferiors.c (thread_to_gdb_id): Remove.
1264 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1265 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1266 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1267 Likewise.
1268 * nto-low.c (nto_fetch_registers, nto_store_registers,
1269 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1270
1271 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * inferiors.h (gdb_id_to_thread_id): Remove.
1274 * inferiors.c (gdb_id_to_thread_id): Remove.
1275 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1276 removal. Move pid declaration closer to where it's used.
1277
1278 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * server.c (handle_detach): New function.
1281 (process_serial_event): Move code out, call handle_detach.
1282
1283 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1284
1285 * server.c (require_running): Rename to ...
1286 (require_running_or_return): ... this ...
1287 (require_running_or_break): ... and this.
1288 (handle_query, process_serial_event): Adjust.
1289
1290 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1291
1292 * linux-low.c (linux_set_resume_request): Remove unused
1293 variables.
1294
1295 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * server.c (first_thread_of): Remove.
1298 (process_serial_event): Replace usage of first_thread_of with
1299 find_any_thread_of_pid.
1300 * tracepoint.c (same_process_p): Remove.
1301 (gdb_agent_about_to_close): Replace usage of same_process_p with
1302 find_any_thread_of_pid.
1303 * linux-x86-low.c (same_process_callback): Remove.
1304 (x86_arch_setup_process_callback): Replace usage of
1305 same_process_callback with find_any_thread_of_pid.
1306 * thread-db.c (any_thread_of): Remove.
1307 (switch_to_process): Replace usage of any_thread_of with
1308 find_any_thread_of_pid.
1309 * inferiors.c (thread_pid_matches_callback): Remove.
1310 (find_thread_process): Adjust to use find_any_thread_of_pid.
1311
1312 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1313
1314 * regcache.c (get_thread_regcache): Guard calls to "memset"
1315 with "!VEC_empty".
1316
1317 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1318
1319 * linux-low.c (handle_extended_wait): Use
1320 "allocate_target_description" instead of "XNEW".
1321 * linux-x86-low.c (initialize_low_arch): Likewise.
1322
1323 2017-09-05 Yao Qi <yao.qi@linaro.org>
1324
1325 * configure.srv (srv_i386_regobj): Remove.
1326 (srv_amd64_regobj): Remove.
1327 (srv_regobj): Set it to "" for x86 non-linux targets.
1328 * linux-x86-tdesc.c (i386_linux_read_description):
1329 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1330 (init_registers_i386): Remove the declaration.
1331 (tdesc_i386): Remove the declaration.
1332 (lynx_i386_arch_setup): Call i386_create_target_description.
1333 * nto-x86-low.c: Likewise.
1334 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1335 [!__x86_64__]: include arch/i386.h.
1336 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1337
1338 2017-09-05 Yao Qi <yao.qi@linaro.org>
1339
1340 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1341 i386/amd64-XXX-linux from it.
1342
1343 2017-09-05 Yao Qi <yao.qi@linaro.org>
1344
1345 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1346 false.
1347 (ipa_amd64_linux_regobj): Remove.
1348 (ipa_x32_linux_regobj): Remove.
1349
1350 2017-09-05 Yao Qi <yao.qi@linaro.org>
1351
1352 * Makefile.in (arch-amd64.o): New rule.
1353 * configure.srv: Append arch-amd64.o.
1354 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1355 (get_ipa_tdesc): Call amd64_linux_read_description.
1356 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1357 and init_registers_amd64_XXX.
1358 * linux-x86-low.c (x86_linux_read_description): Call
1359 amd64_linux_read_description.
1360 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1361 (initialize_low_arch): Don't call init_registers_x32_XXX and
1362 init_registers_amd64_XXX.
1363 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1364 and tdesc_amd64_XXX.
1365 [__x86_64__] (amd64_tdesc_test): New function.
1366 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1367 and init_registers_amd64_XXX.
1368 * linux-x86-tdesc.c: Include arch/amd64.h.
1369 (xcr0_to_tdesc_idx): New function.
1370 (i386_linux_read_description): New function.
1371 (amd64_get_ipa_tdesc_idx): New function.
1372 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1373 (amd64_get_ipa_tdesc): Declare.
1374
1375 2017-09-05 Yao Qi <yao.qi@linaro.org>
1376
1377 * configure.srv (srv_i386_linux_xmlfiles): Remove
1378 i386/i386-XXX-linux.xml from it.
1379
1380 2017-09-05 Yao Qi <yao.qi@linaro.org>
1381
1382 * configure.srv: Set srv_i386_linux_regobj empty if $development
1383 is false.
1384 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1385 initialize_low_tdesc.
1386 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1387 with #if initialize_low_tdesc.
1388 * linux-x86-tdesc-selftest.c: New file.
1389 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1390
1391 2017-09-05 Yao Qi <yao.qi@linaro.org>
1392
1393 * Makefile.in (arch-i386.o): New rule.
1394 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1395 (x86_64-*-linux*): Likewise.
1396 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1397 include arch/i386.h.
1398 (i386_linux_read_description): Remove code and call
1399 i386_create_target_description.
1400 * tdesc.c (allocate_target_description): New function.
1401 * tdesc.h (set_tdesc_architecture): Remove declaration.
1402 (set_tdesc_osabi): Likewise.
1403
1404 2017-09-05 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1407 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1408 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1409 .xmltarget.
1410 * server.c (get_features_xml): Call tdesc_get_features_xml.
1411 * tdesc.c (set_tdesc_architecture): New function.
1412 (set_tdesc_osabi): New function.
1413 (tdesc_get_features_xml): New function.
1414 (tdesc_create_feature): Add an argument.
1415 * tdesc.h (struct target_desc) <features>: New field.
1416 <arch, osabi>: New field.
1417 (~target_desc): xfree features, arch, and osabi.
1418 (target_desc::oerator==): Don't compare .xmltarget.
1419 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1420 (set_tdesc_osabi): Likewise.
1421 (tdesc_get_features_xml): Likewise.
1422
1423 2017-09-05 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-x86-tdesc.c: Include selftest.h.
1426 (i386_tdesc_test): New function.
1427 (initialize_low_tdesc): Call selftests::register_test.
1428 * tdesc.h: Include regdef.h.
1429 (target_desc): Override operator == and !=.
1430
1431 2017-09-05 Yao Qi <yao.qi@linaro.org>
1432
1433 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1434 (ipa_obj): Likewise.
1435 * linux-i386-ipa.c: Include common/x86-xstate.h
1436 (get_ipa_tdesc): Call i386_linux_read_description.
1437 (initialize_low_tracepoint): Don't call init_registers_XXX
1438 functions, call initialize_low_tdesc instead.
1439 * linux-x86-low.c (x86_linux_read_description): Call
1440 i386_linux_read_description.
1441 (initialize_low_arch): Don't call init_registers_i386_XXX
1442 functions, call initialize_low_tdesc.
1443 * linux-x86-tdesc.c: New file.
1444 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1445 (i386_get_ipa_tdesc_idx): Declare.
1446 (i386_get_ipa_tdesc): Declare.
1447 (initialize_low_tdesc): Declare.
1448
1449 2017-09-05 Yao Qi <yao.qi@linaro.org>
1450
1451 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1452 instead of 0.
1453
1454 2017-09-05 Yao Qi <yao.qi@linaro.org>
1455
1456 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1457 * regcache.c (get_thread_regcache): Use VEC_length.
1458 (init_register_cache): Likewise.
1459 (regcache_cpy): Likewise.
1460 (registers_to_string): Iterate reg_defs via VEC_iterate.
1461 (find_regno): Likewise.
1462 (find_register_by_number): Use VEC_index.
1463 (register_size): Call find_register_by_number.
1464 (register_data): Call find_register_by_number.
1465 (supply_regblock): Use VEC_length.
1466 (regcache_raw_read_unsigned): Likewise.
1467 * tdesc.c (init_target_desc): Iterate reg_defs via
1468 VEC_iterate.
1469 (default_description): Update initializer.
1470 (copy_target_description): Don't update field num_registers.
1471 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1472 <num_registers>: Remove.
1473
1474 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1475
1476 * Makefile.in (.SECONDARY): Define target.
1477
1478 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1479
1480 * linux-low.c (linux_wait_1): Adjust.
1481 * server.c (queue_stop_reply_callback): Adjust.
1482
1483 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1484
1485 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1486 QEnvironmentUnset and QEnvironmentReset packets.
1487 (handle_query): Inform remote that QEnvironmentHexEncoded,
1488 QEnvironmentUnset and QEnvironmentReset are supported.
1489
1490 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * inferiors.h (inferior_target_data): Rename to ...
1493 (thread_target_data): ... this.
1494 (inferior_regcache_data): Rename to ...
1495 (thread_regcache_data): ... this.
1496 (set_inferior_regcache_data): Rename to ...
1497 (set_thread_regcache_data): ... this.
1498 * inferiors.c (inferior_target_data): Rename to ...
1499 (thread_target_data): ... this.
1500 (inferior_regcache_data): Rename to ...
1501 (thread_regcache_data): ... this.
1502 (set_inferior_regcache_data): Rename to ...
1503 (set_thread_regcache_data): ... this.
1504 (free_one_thread): Update.
1505 * linux-low.h (get_thread_lwp): Update.
1506 * regcache.c (get_thread_regcache): Update.
1507 (regcache_invalidate_thread): Update.
1508 (free_register_cache_thread): Update.
1509 * win32-i386-low.c (update_debug_registers_callback): Update.
1510 (win32_get_current_dr): Update.
1511 * win32-low.c (thread_rec): Update.
1512 (delete_thread_info): Update.
1513 (continue_one_thread): Update.
1514 (suspend_one_thread): Update.
1515
1516 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1517
1518 * inferiors.c (set_inferior_target_data): Remove.
1519 * inferiors.h (set_inferior_target_data): Remove.
1520
1521 2017-08-18 Yao Qi <yao.qi@linaro.org>
1522
1523 * Makefile.in (OBS): Add selftest.o.
1524 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1525 * configure, config.in: Re-generated.
1526 * server.c: Include common/sefltest.h.
1527 (captured_main): Handle option --selftest.
1528
1529 2017-08-09 Yao Qi <yao.qi@linaro.org>
1530
1531 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1532 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1533 i386-avx-mpx.o and i386-mmx.o.
1534 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1535 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1536 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1537 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1538 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1539 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1540 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1541 i386/amd64-avx-mpx.xml.
1542
1543 2017-08-09 Yao Qi <yao.qi@linaro.org>
1544
1545 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1546 and x32-avx-avx512.o.
1547 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1548 i386/x32-avx-avx512.xml.
1549
1550 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * tracepoint.h (enum class fast_tpoint_collect_result): New
1553 enumeration.
1554 (fast_tracepoint_collecting): Change return type to
1555 fast_tpoint_collect_result.
1556 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1557 * linux-low.h: Include tracepoint.h.
1558 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1559 fast_tpoint_collect_result.
1560 * linux-low.c (handle_tracepoints): Adjust.
1561 (linux_fast_tracepoint_collecting): Change return type to
1562 fast_tpoint_collect_result.
1563 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1564 linux_wait_1, stuck_in_jump_pad_callback,
1565 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1566 proceed_one_lwp): Adjust to type change.
1567
1568 2017-07-10 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1571
1572 2017-06-29 Yao Qi <yao.qi@linaro.org>
1573
1574 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1575 Remove.
1576 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1577
1578 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1579
1580 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1581
1582 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1583
1584 * linux-low.c (linux_create_inferior): Adjust code to access the
1585 environment information via 'gdb_environ' class.
1586 * lynx-low.c (lynx_create_inferior): Likewise.
1587 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1588 (get_environ): Return a pointer to 'our_environ'.
1589 (captured_main): Initialize 'our_environ'.
1590 * server.h (get_environ): Adjust prototype.
1591 * spu-low.c (spu_create_inferior): Adjust code to access the
1592 environment information via 'gdb_environ' class.
1593
1594 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1597 usage of "register" keyword.
1598
1599 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1600
1601 * configure: Re-generate.
1602
1603 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1604
1605 * configure: Re-generate.
1606
1607 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * Makefile.in (COMPILE.pre): Add "-x c++".
1610
1611 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1612
1613 * fork-child.c: Conditionally include <signal.h>.
1614
1615 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1616
1617 * server.c (handle_general_set): Handle new packet
1618 "QStartupWithShell".
1619 (handle_query): Add "QStartupWithShell" to the list of supported
1620 packets.
1621 (gdbserver_usage): Add help text explaining the
1622 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1623 options.
1624 (captured_main): Recognize and act upon the presence of the new
1625 CLI options.
1626
1627 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1628 Pedro Alves <palves@redhat.com>
1629
1630 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1631 * configure: Regenerate.
1632 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1633 "fork-inferior.o".
1634 (i[34567]86-*-lynxos*): Likewise.
1635 (spu*-*-*): Likewise.
1636 * fork-child.c: New file.
1637 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1638 and "environ.h".
1639 (linux_ptrace_fun): New function.
1640 (linux_create_inferior): Adjust function prototype to reflect
1641 change on "target.h". Adjust function code to use
1642 "fork_inferior".
1643 (linux_request_interrupt): Delete "signal_pid".
1644 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1645 (lynx_ptrace_fun): New function.
1646 (lynx_create_inferior): Adjust function prototype to reflect
1647 change on "target.h". Adjust function code to use
1648 "fork_inferior".
1649 * nto-low.c (nto_create_inferior): Adjust function prototype and
1650 code to reflect change on "target.h". Update comments.
1651 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1652 "common-terminal.h" and "environ.h".
1653 (terminal_fd): Moved to fork-child.c.
1654 (old_foreground_pgrp): Likewise.
1655 (restore_old_foreground_pgrp): Likewise.
1656 (last_status): Make it global.
1657 (last_ptid): Likewise.
1658 (our_environ): New variable.
1659 (startup_with_shell): Likewise.
1660 (program_name): Likewise.
1661 (program_argv): Rename to...
1662 (program_args): ...this.
1663 (wrapper_argv): New variable.
1664 (start_inferior): Delete function.
1665 (get_exec_wrapper): New function.
1666 (get_exec_file): Likewise.
1667 (get_environ): Likewise.
1668 (prefork_hook): Likewise.
1669 (post_fork_inferior): Likewise.
1670 (postfork_hook): Likewise.
1671 (postfork_child_hook): Likewise.
1672 (handle_v_run): Update code to deal with arguments coming from the
1673 remote host. Update calls from "start_inferior" to
1674 "create_inferior".
1675 (captured_main): Likewise. Initialize environment variable. Call
1676 "have_job_control".
1677 * server.h (post_fork_inferior): New prototype.
1678 (get_environ): Likewise.
1679 (last_status): Declare.
1680 (last_ptid): Likewise.
1681 (signal_pid): Likewise.
1682 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1683 (spu_ptrace_fun): New function.
1684 (spu_create_inferior): Adjust function prototype to reflect change
1685 on "target.h". Adjust function code to use "fork_inferior".
1686 * target.c (target_terminal_init): New function.
1687 (target_terminal_inferior): Likewise.
1688 (target_terminal_ours): Likewise.
1689 * target.h: Include <vector>.
1690 (struct target_ops) <create_inferior>: Update prototype.
1691 (create_inferior): Update macro.
1692 * utils.c (gdb_flush_out_err): New function.
1693 * win32-low.c (win32_create_inferior): Adjust function prototype
1694 and code to reflect change on "target.h".
1695
1696 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1697
1698 * inferiors.c (switch_to_thread): New function.
1699
1700 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1701
1702 * Makefile.in (SFILE): Add "common/job-control.c".
1703 (OBS): Add "job-control.o".
1704
1705 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1706
1707 * Makefile: Remove "@host_makefile_frag@".
1708
1709 2017-05-05 Pedro Alves <palves@redhat.com>
1710
1711 * configure: Regenerate.
1712
1713 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1714
1715 * configure: Regenerate.
1716
1717 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1718
1719 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1720 software_single_step change of return type to
1721 std::vector<CORE_ADDR>.
1722 * linux-low.c (install_software_single_step_breakpoints):
1723 Likewise.
1724 * linux-low.h (install_software_single_step_breakpoints):
1725 Likewise.
1726
1727 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1728
1729 * remote-utils.c: Include "gdb_termios.h" instead of
1730 "terminal.h".
1731 * terminal.h: Delete file.
1732
1733 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1734
1735 * server.c: Include <vector>.
1736 <program_argv, wrapper_argv>: Convert to std::vector.
1737 (start_inferior): Rewrite function to use C++.
1738 (handle_v_run): Likewise. Update code that calculates the argv
1739 based on the vRun packet; use C++.
1740 (captured_main): Likewise.
1741
1742 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * server.c (handle_v_cont): Initialize thread_resume::thread
1745 with null_ptid.
1746
1747 2017-04-05 Pedro Alves <palves@redhat.com>
1748
1749 * configure: Regenerate.
1750
1751 2017-04-05 Pedro Alves <palves@redhat.com>
1752
1753 * gdbreplay.c (sync_error): Constify.
1754 * linux-x86-low.c (push_opcode): Constify.
1755
1756 2017-04-05 Pedro Alves <palves@redhat.com>
1757
1758 * win32-low.c (get_child_debug_event)
1759 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1760 Report TARGET_WAITKIND_SPURIOUS instead.
1761
1762 2017-04-05 Pedro Alves <palves@redhat.com>
1763
1764 * remote-utils.c (remote_prepare, remote_open): Constify.
1765 * remote-utils.h (remote_prepare, remote_open): Constify.
1766 * server.c (captured_main): Constify 'port' handling.
1767
1768 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1769
1770 * Makefile.in (clean): Clear .deps.
1771
1772 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1773
1774 * .gitignore: Remove generated files, replace with wildcard.
1775 * (clean): Replace removal of generated files with wildcard.
1776 (version.c): Replace with...
1777 (version-generated.c): ...this.
1778 (xml-builtin.c): Replace with...
1779 (xml-builtin-generated.c): ...this.
1780 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1781 (%.c: *regformats*): Replace with...
1782 (%-generated.c: *regformats*): ...this.
1783
1784 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1785
1786 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1787 (xtensa_fill_gregset): Call collect_register_by_name for
1788 threadptr register.
1789 (xtensa_store_gregset): Call supply_register_by_name for
1790 threadptr register.
1791
1792 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1793
1794 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1795 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1796 (xtensa_store_gregset): Call supply_register for all registers in
1797 a0_regnum..a0_regnum + C0_NREGS range.
1798
1799 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1800
1801 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1802 (ax-ipa.o: ax.c): Remove.
1803 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1804 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1805 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1806 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1807 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1808
1809 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1810
1811 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1812 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1813 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1814 (errors-ipa.o: ../common/errors.c): Remove.
1815 (format-ipa.o: ../common/format.c): Remove.
1816 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1817
1818 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * Makefile.in (%-ipa.o: %.c): New rule.
1821 (tracepoint-ipa.o: tracepoint.c): Remove.
1822 (utils-ipa.o: utils.c): Remove.
1823 (remote-utils-ipa.o: remote-utils.c): Remove.
1824 (regcache-ipa.o: regcache.c): Remove.
1825 (i386-linux-ipa.o: i386-linux.c): Remove.
1826 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1827 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1828 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1829 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1830 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1831 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1832 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1833 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1834 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1835 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1836 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1837 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1838 (aarch64-ipa.o: aarch64.c): Remove.
1839 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1840 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1841 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1842 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1843 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1844 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1845 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1846 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1847 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1848 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1849 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1850 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1851 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1852 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1853 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1854 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1855 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1856 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1857 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1858 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1859 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1860 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1861 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1862 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1863 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1864 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1865 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1866 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1867 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1868 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1869 (tdesc-ipa.o: tdesc.c): Remove.
1870 (x32-linux-ipa.o: x32-linux.c): Remove.
1871 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1872 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1873
1874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * Makefile.in (%.o: ../arch/%.c): New rule.
1877 (arm.o: ../arch/arm.c): Remove.
1878 (arm-linux.o: ../arch/arm-linux.c): Remove.
1879 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1880 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1881
1882 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * Makefile.in (%.o: ../nat/%.c): New rule.
1885 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1886 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1887 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1888 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1889 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1890 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1891 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1892 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1893 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1894 (linux-personality.o: ../nat/linux-personality.c): Remove.
1895 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1896 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1897 (x86-linux.o: ../nat/x86-linux.c): Remove.
1898 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1899 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1900
1901 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * Makefile.in (%.o: ../common/%.c): New rule.
1904 (signals.o: ../common/signals.c): Remove.
1905 (print-utils.o: ../common/print-utils.c): Remove.
1906 (rsp-low.o: ../common/rsp-low.c): Remove.
1907 (common-utils.o: ../common/common-utils.c): Remove.
1908 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1909 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1910 (vec.o: ../common/vec.c): Remove.
1911 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1912 (xml-utils.o: ../common/xml-utils.c): Remove.
1913 (ptid.o: ../common/ptid.c): Remove.
1914 (buffer.o: ../common/buffer.c): Remove.
1915 (format.o: ../common/format.c): Remove.
1916 (filestuff.o: ../common/filestuff.c): Remove.
1917 (agent.o: ../common/agent.c): Remove.
1918 (errors.o: ../common/errors.c): Remove.
1919 (environ.o: ../common/environ.c): Remove.
1920 (common-debug.o: ../common/common-debug.c): Remove.
1921 (cleanups.o: ../common/cleanups.c): Remove.
1922 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1923 (fileio.o: ../common/fileio.c): Remove.
1924 (common-regcache.o: ../common/common-regcache.c): Remove.
1925 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1926 (new-op.o: ../common/new-op.c): Remove.
1927 (btrace-common.o: ../common/btrace-common.c): Remove.
1928
1929 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * Makefile.in (%.o: ../target/%.c): New rule.
1932 (waitstatus.o: ../target/waitstatus.c): Remove.
1933
1934 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1935
1936 * Makefile.in
1937 (%.c: ../regformats/%.dat,
1938 (%.c: ../regformats/arm/%.dat,
1939 (%.c: ../regformats/i386/%.dat,
1940 (%.c: ../regformats/rs6000/%.dat): New rules.
1941 (aarch64.c): Remove.
1942 (reg-arm.c): Remove.
1943 (arm-with-iwmmxt.c): Remove.
1944 (arm-with-vfpv2.c): Remove.
1945 (arm-with-vfpv3.c): Remove.
1946 (arm-with-neon.c): Remove.
1947 (reg-bfin.c): Remove.
1948 (reg-cris.c): Remove.
1949 (reg-crisv32.c): Remove.
1950 (i386.c): Remove.
1951 (i386-linux.c): Remove.
1952 (i386-avx.c): Remove.
1953 (i386-avx-linux.c): Remove.
1954 (i386-avx-avx512.c): Remove.
1955 (i386-avx-avx512-linux.c): Remove.
1956 (i386-mpx.c): Remove.
1957 (i386-mpx-linux.c): Remove.
1958 (i386-avx-mpx-avx512-pku.c): Remove.
1959 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1960 (i386-avx-mpx.c): Remove.
1961 (i386-avx-mpx-linux.c): Remove.
1962 (i386-mmx.c): Remove.
1963 (i386-mmx-linux.c): Remove.
1964 (reg-ia64.c): Remove.
1965 (reg-m32r.c): Remove.
1966 (reg-m68k.c): Remove.
1967 (reg-cf.c): Remove.
1968 (mips-linux.c): Remove.
1969 (mips-dsp-linux.c): Remove.
1970 (mips64-linux.c): Remove.
1971 (mips64-dsp-linux.c): Remove.
1972 (nios2-linux.c): Remove.
1973 (powerpc-32.c): Remove.
1974 (powerpc-32l.c): Remove.
1975 (powerpc-altivec32l.c): Remove.
1976 (powerpc-cell32l.c): Remove.
1977 (powerpc-vsx32l.c): Remove.
1978 (powerpc-isa205-32l.c): Remove.
1979 (powerpc-isa205-altivec32l.c): Remove.
1980 (powerpc-isa205-vsx32l.c): Remove.
1981 (powerpc-e500l.c): Remove.
1982 (powerpc-64l.c): Remove.
1983 (powerpc-altivec64l.c): Remove.
1984 (powerpc-cell64l.c): Remove.
1985 (powerpc-vsx64l.c): Remove.
1986 (powerpc-isa205-64l.c): Remove.
1987 (powerpc-isa205-altivec64l.c): Remove.
1988 (powerpc-isa205-vsx64l.c): Remove.
1989 (s390-linux32.c): Remove.
1990 (s390-linux32v1.c): Remove.
1991 (s390-linux32v2.c): Remove.
1992 (s390-linux64.c): Remove.
1993 (s390-linux64v1.c): Remove.
1994 (s390-linux64v2.c): Remove.
1995 (s390-te-linux64.c): Remove.
1996 (s390-vx-linux64.c): Remove.
1997 (s390-tevx-linux64.c): Remove.
1998 (s390x-linux64.c): Remove.
1999 (s390x-linux64v1.c): Remove.
2000 (s390x-linux64v2.c): Remove.
2001 (s390x-te-linux64.c): Remove.
2002 (s390x-vx-linux64.c): Remove.
2003 (s390x-tevx-linux64.c): Remove.
2004 (tic6x-c64xp-linux.c): Remove.
2005 (tic6x-c64x-linux.c): Remove.
2006 (tic6x-c62x-linux.c): Remove.
2007 (reg-sh.c): Remove.
2008 (reg-sparc64.c): Remove.
2009 (reg-spu.c): Remove.
2010 (amd64.c): Remove.
2011 (amd64-linux.c): Remove.
2012 (amd64-avx.c): Remove.
2013 (amd64-avx-linux.c): Remove.
2014 (amd64-avx-avx512.c): Remove.
2015 (amd64-avx-avx512-linux.c): Remove.
2016 (amd64-mpx.c): Remove.
2017 (amd64-mpx-linux.c): Remove.
2018 (amd64-avx-mpx-avx512-pku.c): Remove.
2019 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2020 (amd64-avx-mpx.c): Remove.
2021 (amd64-avx-mpx-linux.c): Remove.
2022 (x32.c): Remove.
2023 (x32-linux.c): Remove.
2024 (x32-avx.c): Remove.
2025 (x32-avx-linux.c): Remove.
2026 (x32-avx-avx512.c): Remove.
2027 (x32-avx-avx512-linux.c): Remove.
2028 (reg-xtensa.c): Remove.
2029 (reg-tilegx.c): Remove.
2030 (reg-tilegx32.c): Remove.
2031
2032 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2033
2034 * Makefile.in (SFILES): Add "common/environ.c".
2035 (OBJS): Add "common/environ.h".
2036
2037 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2038
2039 * configure.ac: Check if the fs_base and gs_base members of
2040 `struct user_regs_struct' exist.
2041 * config.in: Regenerated.
2042 * configure: Likewise.
2043
2044 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2045
2046 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2047 target_read_memory.
2048 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2049 (get_next_pcs_syscall_next_pc): Likewise.
2050
2051 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2052
2053 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2054 * nto-x86-low.c: Likewise.
2055
2056 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2057
2058 * Makefile.in: Include disable-implicit-rules.mk.
2059
2060 2016-11-23 Pedro Alves <palves@redhat.com>
2061
2062 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2063 (debug_vprintf): Use std::chrono::steady_clock instead of
2064 gettimeofday. Use '.' instead of ':'.
2065 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2066 (get_timestamp): Use std::chrono::steady_clock instead of
2067 gettimeofday.
2068
2069 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2070
2071 * Makefile.in: Fix whitespace formatting.
2072
2073 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * Makefile.in (SFILES, OBS): Flatten list and order
2076 alphabetically.
2077
2078 2016-11-23 Pedro Alves <palves@redhat.com>
2079
2080 * event-loop.c (handle_file_event): Use warning.
2081 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2082 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2083 Use warning.
2084
2085 2016-11-23 Pedro Alves <palves@redhat.com>
2086
2087 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2088 output.
2089 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2090 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2091 debug_printf and debug_flush for debug output.
2092 * server.c (handle_general_set): Likewise.
2093 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2094 output.
2095
2096 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2097
2098 * Makefile.in (.c.o): Replace rule with ...
2099 (%.o: %.c): ... this one.
2100
2101 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2102
2103 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2104 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2105 make.
2106 * configure.ac: Remove checks for the make program.
2107 * configure: Re-generate.
2108
2109 2016-10-28 Pedro Alves <palves@redhat.com>
2110
2111 * Makefile.in (CXX_DIALECT): Get from configure.
2112 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2113 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2114 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2115 * config.in: Regenerate.
2116 * configure: Regenerate.
2117
2118 2016-10-27 Yao Qi <yao.qi@linaro.org>
2119
2120 * linux-low.c (linux_supports_range_stepping): Return true if
2121 can_software_single_step return true.
2122
2123 2016-10-27 Yao Qi <yao.qi@linaro.org>
2124
2125 * inferiors.c (find_inferior_in_random): New function.
2126 * inferiors.h (find_inferior_in_random): Declare.
2127 * linux-low.c (linux_wait_for_event_filtered): Call
2128 find_inferior_in_random instead of find_inferior.
2129
2130 2016-10-27 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-low.c (linux_wait_1): If single-step breakpoints are
2133 inserted, remove them.
2134
2135 2016-10-26 Pedro Alves <palves@redhat.com>
2136
2137 * linux-low.c (handle_extended_wait): Link parent/child fork
2138 threads.
2139 (linux_wait_1): Unlink them.
2140 (linux_set_resume_request): Ignore resume requests for
2141 already-resumed and unhandled fork child threads.
2142 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2143 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2144 New functions.
2145 (handle_v_requests) <vCont>: Don't call require_running.
2146 * server.h (in_queued_stop_replies): New declaration.
2147
2148 2016-10-24 Yao Qi <yao.qi@linaro.org>
2149
2150 PR server/20733
2151 * linux-aarch64-low.c (append_insns): Cast the return value to
2152 'uint32_t *'.
2153
2154 2016-10-10 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2157
2158 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2159
2160 * target.c (target_supports_multi_process): New function, moved
2161 from...
2162 * target.h (target_supports_multi_process): ... here. Remove
2163 macro.
2164
2165 2016-10-05 Tom Tromey <tom@tromey.com>
2166
2167 PR remote/20655:
2168 * tracepoint.c (handle_tracepoint_bkpts): Check
2169 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2170
2171 2016-10-05 Yao Qi <yao.qi@linaro.org>
2172
2173 * configure.srv: Update the path of arm-*.xml files.
2174
2175 2016-10-05 Terry Guo <terry.guo@arm.com>
2176 Yao Qi <yao.qi@linaro.org>
2177
2178 * Makefile.in: Adjust the path of rules.
2179 * configure.srv: Update the path of xml files.
2180 * regformats/arm-with-iwmmxt.dat: Regenerated.
2181 * regformats/arm-with-neon.dat: Likewise.
2182 * regformats/arm-with-vfpv2.dat: Likewise.
2183 * regformats/arm-with-vfpv3.dat Likewise.
2184
2185 2016-09-30 Yao Qi <yao.qi@linaro.org>
2186
2187 PR gdbserver/20627
2188 * target.c (target_stop_and_wait): Don't call
2189 target_continue_no_signal, use resume_stop instead.
2190
2191 2016-09-26 Yao Qi <yao.qi@linaro.org>
2192
2193 * linux-low.c (linux_wait_1): Call debug_exit.
2194
2195 2016-09-23 Pedro Alves <palves@redhat.com>
2196
2197 * Makefile.in (SFILES): Add common/new-op.c.
2198 (OBS): Add common/new-op.o.
2199 (new-op.o): New rule.
2200
2201 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * .gitinore: Ignore more files.
2204
2205 2016-09-21 Yao Qi <yao.qi@linaro.org>
2206
2207 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2208 23.
2209
2210 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2211
2212 * server.c (start_inferior): Call target_mourn_inferior instead of
2213 mourn_inferior; pass ptid_t argument to it.
2214 (resume): Likewise.
2215 (handle_target_event): Likewise.
2216 * target.c (target_mourn_inferior): New function.
2217 * target.h (mourn_inferior): Delete macro.
2218
2219 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2220
2221 * linux-low.c (lwp_is_stepping): New function.
2222
2223 2016-09-06 Carl Love <cel@us.ibm.com>
2224
2225 * server.c (start_inferior): Fixed comment, requested comment change
2226 didn't get updated correctly. Removed reference to ptrace () call as
2227 it is only true on Linux systems.
2228
2229 2016-09-06 Carl Love <cel@us.ibm.com>
2230
2231 * server.c (start_inferior): Do not call
2232 function target_post_create_inferior () if the
2233 inferior process has already exited.
2234
2235 2016-09-05 Pedro Alves <palves@redhat.com>
2236
2237 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2238 (COMPILE.pre, CC_LD): Use CXX directly.
2239 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2240 * acinclude.m4: Don't include build-with-cxx.m4.
2241 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2242 * configure: Regenerate.
2243
2244 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2245
2246 PR gdb/19495
2247 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2248 call writing data to own_buf.
2249
2250 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2251
2252 * target.c (mywait): Call target_wait instead of
2253 the_target->wait.
2254 (target_wait): New function.
2255
2256 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2257
2258 * server.c (start_inferior): New variable 'ptid'. Replace calls
2259 to the_target->resume by target_continue{,_no_signal}, depending
2260 on the case.
2261 * target.c (target_stop_and_wait): Call target_continue_no_signal
2262 instead of the_target->resume.
2263 (target_continue): New function.
2264
2265 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2266
2267 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2268
2269 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2270
2271 PR server/20491
2272 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2273 ps_prochandle.
2274 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2275 * linux-arm-low.c (ps_get_thread_area): Likewise.
2276 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2277 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2278 * linux-mips-low.c (ps_get_thread_area): Likewise.
2279 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2280 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2281 * linux-x86-low.c (ps_get_thread_area): Likewise.
2282 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2283
2284 2016-08-19 Pedro Alves <palves@redhat.com>
2285
2286 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2287
2288 2016-08-19 Pedro Alves <palves@redhat.com>
2289
2290 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2291 comment. Use memcpy instead of casting through unsigned long.
2292
2293 2016-08-19 Pedro Alves <palves@redhat.com>
2294
2295 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2296 allocating around 0x80000000.
2297
2298 2016-08-19 Pedro Alves <palves@redhat.com>
2299
2300 PR gdb/20415
2301 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2302 (x32-avx512-linux-ipa.o): New rules.
2303 * configure.ac (x86_64-*-linux*): New x32 check.
2304 * configure.srv (ipa_x32_linux_regobj): New.
2305 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2306 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2307 descriptions.
2308 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2309 descriptions.
2310 * configure: Regenerate.
2311
2312 2016-08-09 Pedro Alves <palves@redhat.com>
2313
2314 PR gdb/18653
2315 * Makefile.in (OBS): Add signals-state-save-restore.o.
2316 (signals-state-save-restore.o): New rule.
2317 * config.in: Regenerate.
2318 * configure: Regenerate.
2319 * linux-low.c: Include "signals-state-save-restore.h".
2320 (linux_create_inferior): Call
2321 restore_original_signals_state.
2322 * server.c: Include "dispositions-save-restore.h".
2323 (captured_main): Call save_original_signals_state.
2324
2325 2016-08-05 Pedro Alves <palves@redhat.com>
2326
2327 * configure: Regenerate.
2328
2329 2016-08-04 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-low.c (regsets_fetch_inferior_registers): Check
2332 errno is ESRCH or not.
2333
2334 2016-08-02 Yao Qi <yao.qi@linaro.org>
2335
2336 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2337 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2338 (thread_db_load_search): Update.
2339 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2340 td_ta_set_event and td_ta_event_getmsg.
2341
2342 2016-07-26 Pedro Alves <palves@redhat.com>
2343
2344 PR server/20414
2345 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2346 of unsigned long for 64-bit registers and use uint32_t instead of
2347 unsigned int for 32-bit registers.
2348
2349 2016-07-26 Pedro Alves <palves@redhat.com>
2350
2351 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2352 to 'ptrace'.
2353
2354 2016-07-21 Tom Tromey <tom@tromey.com>
2355
2356 * configure: Rebuild.
2357
2358 2016-07-21 Yao Qi <yao.qi@linaro.org>
2359
2360 * mem-break.c (find_gdb_breakpoint): Cast bp to
2361 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2362
2363 2016-07-21 Yao Qi <yao.qi@linaro.org>
2364
2365 * server.c (handle_v_requests): Support s and S actions
2366 if target_supports_software_single_step return true.
2367
2368 2016-07-21 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2371 is resume_step, call maybe_hw_step.
2372 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2373 and unstop them.
2374 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2375 breakpoints or not.
2376 (proceed_one_lwp): If resume request is resume_step, install
2377 reinsert breakpoints and call maybe_hw_step.
2378
2379 2016-07-21 Yao Qi <yao.qi@linaro.org>
2380
2381 * linux-low.c (proceed_one_lwp): Declare.
2382 (linux_resume_one_thread): Remove local variable 'step'.
2383 Lift code enqueue signal. Call proceed_one_lwp instead of
2384 linux_resume_one_lwp.
2385
2386 2016-07-21 Yao Qi <yao.qi@linaro.org>
2387
2388 * linux-low.c (linux_resume_one_thread): Call
2389 enqueue_pending_signal.
2390
2391 2016-07-21 Yao Qi <yao.qi@linaro.org>
2392
2393 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2394 * inferiors.c (do_restore_current_thread_cleanup): New function.
2395 (make_cleanup_restore_current_thread): Likewise.
2396 * linux-low.c (install_software_single_step_breakpoints): Call
2397 make_cleanup_restore_current_thread. Switch current_thread to
2398 thread.
2399
2400 2016-07-21 Yao Qi <yao.qi@linaro.org>
2401
2402 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2403 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2404 (clone_one_breakpoint): Likewise.
2405 (delete_reinsert_breakpoints): Change parameter to thread.
2406 Callers updated.
2407 (has_reinsert_breakpoints): Likewise.
2408 (uninsert_reinsert_breakpoints): Likewise.
2409 (reinsert_reinsert_breakpoints): Likewise.
2410 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2411 (delete_reinsert_breakpoints): Likewise.
2412 (reinsert_reinsert_breakpoints): Likewise.
2413 (uninsert_reinsert_breakpoints): Likewise.
2414 (has_reinsert_breakpoints): Likewise.
2415
2416 2016-07-21 Yao Qi <yao.qi@linaro.org>
2417
2418 * inferiors.c (get_thread_process): Make parameter const.
2419 * inferiors.h (get_thread_process): Update declaration.
2420 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2421 Add new parameters child_thread and parent_thread. Callers
2422 updated.
2423 * mem-break.h (clone_all_breakpoints): Update declaration.
2424
2425 2016-07-21 Yao Qi <yao.qi@linaro.org>
2426
2427 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2428 <command_list, handler>: Remove.
2429 (struct gdb_breakpoint): New.
2430 (struct other_breakpoint): New.
2431 (struct reinsert_breakpoint): New.
2432 (is_gdb_breakpoint): New function.
2433 (any_persistent_commands): Update command_list if
2434 is_gdb_breakpoint returns true.
2435 (set_breakpoint): Create breakpoints according to their types.
2436 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2437 (set_gdb_breakpoint_1): Likewise.
2438 (set_gdb_breakpoint): Likewise.
2439 (clear_breakpoint_conditions): Change parameter type to
2440 'struct gdb_breakpoint *'.
2441 (clear_breakpoint_commands): Likewise.
2442 (clear_breakpoint_conditions_and_commands): Likewise.
2443 (add_condition_to_breakpoint): Likewise.
2444 (add_breakpoint_condition): Likewise.
2445 (add_commands_to_breakpoint): Likewise.
2446 (check_breakpoints): Check other_breakpoint.
2447 (clone_one_breakpoint): Clone breakpopint according to its type.
2448 * mem-break.h (struct gdb_breakpoint): Declare.
2449 (set_gdb_breakpoint): Update declaration.
2450 (clear_breakpoint_conditions_and_commands): Likewise.
2451 (add_breakpoint_condition): Likewise.
2452 (add_breakpoint_commands): Likewise.
2453 * server.c (process_point_options): Change parameter type to
2454 'struct gdb_breakpoint *'.
2455
2456 2016-07-21 Yao Qi <yao.qi@linaro.org>
2457
2458 * mem-break.c (set_breakpoint_at): Rename it to ...
2459 (set_breakpoint_type_at): ... it.
2460 (set_breakpoint_at): Call set_breakpoint_type_at.
2461 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2462 * mem-break.h (set_breakpoint_at): Update comments.
2463
2464 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2465
2466 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2467 to buf parameter.
2468 (nios2_store_gregset): Likewise.
2469
2470 2016-07-01 Pedro Alves <palves@redhat.com>
2471 Antoine Tremblay <antoine.tremblay@ericsson.com>
2472
2473 * linux-low.c: Change interface to take the target lwp_info
2474 pointer directly and return void. Handle detaching from a zombie
2475 thread.
2476 (linux_detach_lwp_callback): New function.
2477 (linux_detach): Detach from the leader thread after detaching from
2478 the clone threads.
2479
2480 2016-06-28 Yao Qi <yao.qi@linaro.org>
2481
2482 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2483 for variable new_offset.
2484 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2485 (aarch64_ftrace_insn_reloc_cb): Likewise.
2486 (aarch64_ftrace_insn_reloc_tb): Likewise.
2487 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2488 PRIx64 instead of PRIx32.
2489
2490 2016-06-28 Yao Qi <yao.qi@linaro.org>
2491
2492 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2493 (the_low_target): Install arm_get_syscall_trapinfo.
2494
2495 2016-06-28 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2498 function.
2499 (the_low_target): Install aarch64_get_syscall_trapinfo.
2500
2501 2016-06-28 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2504 Callers updated.
2505 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2506 Remove parameter sysno.
2507 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2508 sysret.
2509
2510 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2511
2512 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2513 (s390_emit_ne_goto): Likewise.
2514 (s390_emit_lt_goto): Likewise.
2515 (s390_emit_le_goto): Likewise.
2516 (s390_emit_gt_goto): Likewise.
2517 (s390_emit_ge_goto): Likewise.
2518 (s390x_emit_eq_goto): Likewise.
2519 (s390x_emit_ne_goto): Likewise.
2520 (s390x_emit_lt_goto): Likewise.
2521 (s390x_emit_le_goto): Likewise.
2522 (s390x_emit_gt_goto): Likewise.
2523 (s390x_emit_ge_goto): Likewise.
2524 (s390_emit_ops_impl): Mark variable static.
2525 (s390x_emit_ops): Likewise.
2526
2527 2016-06-17 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-low.c (handle_extended_wait): Call
2530 uninsert_reinsert_breakpoints for the parent process. Remove
2531 reinsert breakpoints from the child process. Reinsert them to
2532 the parent process when vfork is done.
2533 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2534 (reinsert_reinsert_breakpoints): New function.
2535 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2536 (reinsert_reinsert_breakpoints): Declare.
2537
2538 2016-06-17 Yao Qi <yao.qi@linaro.org>
2539
2540 * linux-low.c (handle_extended_wait): If the parent is doing
2541 step-over, remove the reinsert breakpoints from the forked child.
2542
2543 2016-06-17 Yao Qi <yao.qi@linaro.org>
2544
2545 * linux-low.c (unsuspend_all_lwps): Declare.
2546 (linux_low_filter_event): If thread exited, call finish_step_over.
2547 If step-over is finished, unsuspend other threads.
2548
2549 2016-06-17 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-low.c (linux_resume_one_lwp_throw): Assert
2552 has_reinsert_breakpoints returns false.
2553 * mem-break.c (delete_disabled_breakpoints): Assert
2554 bp type isn't reinsert_breakpoint.
2555
2556 2016-06-17 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-low.c (maybe_hw_step): New function.
2559 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2560 (finish_step_over): Switch current_thread to lwp temporarily,
2561 and assert has_reinsert_breakpoints returns true.
2562 (proceed_one_lwp): Call maybe_hw_step.
2563 * mem-break.c (has_reinsert_breakpoints): New function.
2564 * mem-break.h (has_reinsert_breakpoints): Declare.
2565
2566 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2567
2568 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2569
2570 2016-05-17 Yao Qi <yao.qi@linaro.org>
2571
2572 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2573 instead of find_inferior.
2574
2575 2016-05-05 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2578 Initialize res to zero.
2579
2580 2016-05-05 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2583 to uint32_t.
2584
2585 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2586
2587 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2588 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2589 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2590
2591 2016-04-28 Par Olsson <par.olsson@windriver.com>
2592 Simon Marchi <simon.marchi@ericsson.com>
2593
2594 * tracepoint.c (write_inferior_int8): New function.
2595 (cmd_qtenable_disable): Write enable flag using
2596 write_inferior_int8.
2597
2598 2016-04-25 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2601 (need_step_over_p): Return zero if the LWP has pending signals
2602 can be delivered on software single step target.
2603
2604 2016-04-25 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2607 return instead of error.
2608
2609 2016-04-22 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2612 to 23.
2613
2614 2016-04-22 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2617 signal when stepping over breakpoint with software single
2618 step.
2619
2620 2016-04-21 Pedro Alves <palves@redhat.com>
2621
2622 * linux-s390-low.c (s390_collect_ptrace_register)
2623 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2624 add casts.
2625 (s390_check_regset): Use void * instead of gdb_byte *.
2626
2627 2016-04-20 Pedro Alves <palves@redhat.com>
2628
2629 * configure: Renegerate.
2630
2631 2016-04-20 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2634 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2635 number 16.
2636 (arm_store_gregset): Likewise.
2637
2638 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2639
2640 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2641 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2642 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2643 (amd64-avx-mpx-linux.c): New rules.
2644 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2645 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2646 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2647 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2648 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2649 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2650 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2651 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2652 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2653 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2654 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2655 * linux-x86-low.c (x86_linux_read_description): Add case for
2656 X86_XSTATE_AVX_MPX_MASK.
2657 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2658 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2659 init_registers_i386_avx_mpx_linux.
2660 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2661 (initialize_low_tracepoint): Call
2662 init_registers_i386_avx_mpx_linux.
2663 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2664 (initialize_low_tracepoint): Call
2665 init_registers_amd64_avx_mpx_linux.
2666 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2667 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2668 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2669 declarations.
2670
2671 2016-04-18 Pedro Alves <palves@redhat.com>
2672
2673 * configure: Regenerate.
2674
2675 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2676
2677 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2678 (aarch64_emit_sub): Likewise.
2679
2680 2016-04-12 Pedro Alves <palves@redhat.com>
2681
2682 * utils.c (prepare_to_throw_exception): Delete.
2683
2684 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2687
2688 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2689
2690 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2691
2692 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2693
2694 * linux-aarch64-ipa.c: Add <elf.h> include.
2695 * linux-ppc-ipa.c: Add <elf.h> include.
2696 * linux-s390-ipa.c: Add <elf.h> include.
2697
2698 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2699
2700 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2701 (get_raw_reg_ptr): Likewise.
2702 (get_trace_state_variable_value_ptr): Likewise.
2703 (set_trace_state_variable_value_ptr): Likewise.
2704 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2705 char *.
2706
2707 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2708 Marcin Kościelnicki <koriakin@0x04.net>
2709
2710 PR/17221
2711 * linux-ppc-low.c (emit_insns): New function.
2712 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2713 (ppc_emit_prologue): New function.
2714 (ppc_emit_epilogue): New function.
2715 (ppc_emit_add): New function.
2716 (ppc_emit_sub): New function.
2717 (ppc_emit_mul): New function.
2718 (ppc_emit_lsh): New function.
2719 (ppc_emit_rsh_signed): New function.
2720 (ppc_emit_rsh_unsigned): New function.
2721 (ppc_emit_ext): New function.
2722 (ppc_emit_zero_ext): New function.
2723 (ppc_emit_log_not): New function.
2724 (ppc_emit_bit_and): New function.
2725 (ppc_emit_bit_or): New function.
2726 (ppc_emit_bit_xor): New function.
2727 (ppc_emit_bit_not): New function.
2728 (ppc_emit_equal): New function.
2729 (ppc_emit_less_signed): New function.
2730 (ppc_emit_less_unsigned): New function.
2731 (ppc_emit_ref): New function.
2732 (ppc_emit_const): New function.
2733 (ppc_emit_reg): New function.
2734 (ppc_emit_pop): New function.
2735 (ppc_emit_stack_flush): New function.
2736 (ppc_emit_swap): New function.
2737 (ppc_emit_stack_adjust): New function.
2738 (ppc_emit_call): New function.
2739 (ppc_emit_int_call_1): New function.
2740 (ppc_emit_void_call_2): New function.
2741 (ppc_emit_if_goto): New function.
2742 (ppc_emit_goto): New function.
2743 (ppc_emit_eq_goto): New function.
2744 (ppc_emit_ne_goto): New function.
2745 (ppc_emit_lt_goto): New function.
2746 (ppc_emit_le_goto): New function.
2747 (ppc_emit_gt_goto): New function.
2748 (ppc_emit_ge_goto): New function.
2749 (ppc_write_goto_address): New function.
2750 (ppc_emit_ops_impl): New static variable.
2751 (ppc64v1_emit_prologue): New function.
2752 (ppc64v2_emit_prologue): New function.
2753 (ppc64_emit_epilogue): New function.
2754 (ppc64_emit_add): New function.
2755 (ppc64_emit_sub): New function.
2756 (ppc64_emit_mul): New function.
2757 (ppc64_emit_lsh): New function.
2758 (ppc64_emit_rsh_signed): New function.
2759 (ppc64_emit_rsh_unsigned): New function.
2760 (ppc64_emit_ext): New function.
2761 (ppc64_emit_zero_ext): New function.
2762 (ppc64_emit_log_not): New function.
2763 (ppc64_emit_bit_and): New function.
2764 (ppc64_emit_bit_or): New function.
2765 (ppc64_emit_bit_xor): New function.
2766 (ppc64_emit_bit_not): New function.
2767 (ppc64_emit_equal): New function.
2768 (ppc64_emit_less_signed): New function.
2769 (ppc64_emit_less_unsigned): New function.
2770 (ppc64_emit_ref): New function.
2771 (ppc64_emit_const): New function.
2772 (ppc64v1_emit_reg): New function.
2773 (ppc64v2_emit_reg): New function.
2774 (ppc64_emit_pop): New function.
2775 (ppc64_emit_stack_flush): New function.
2776 (ppc64_emit_swap): New function.
2777 (ppc64v1_emit_call): New function.
2778 (ppc64v2_emit_call): New function.
2779 (ppc64v1_emit_int_call_1): New function.
2780 (ppc64v2_emit_int_call_1): New function.
2781 (ppc64v1_emit_void_call_2): New function.
2782 (ppc64v2_emit_void_call_2): New function.
2783 (ppc64_emit_if_goto): New function.
2784 (ppc64_emit_eq_goto): New function.
2785 (ppc64_emit_ne_goto): New function.
2786 (ppc64_emit_lt_goto): New function.
2787 (ppc64_emit_le_goto): New function.
2788 (ppc64_emit_gt_goto): New function.
2789 (ppc64_emit_ge_goto): New function.
2790 (ppc64v1_emit_ops_impl): New static variable.
2791 (ppc64v2_emit_ops_impl): New static variable.
2792 (ppc_emit_ops): New function.
2793 (linux_low_target): Wire in ppc_emit_ops.
2794
2795 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2796 Marcin Kościelnicki <koriakin@0x04.net>
2797
2798 PR/17221
2799 * Makefile.in: Add powerpc-*-ipa.o
2800 * configure.srv: Add ipa_obj for powerpc*-linux.
2801 * linux-ppc-ipa.c: New file.
2802 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2803 includes.
2804 (PPC_FIELD): New macro.
2805 (PPC_SEXT): New macro.
2806 (PPC_OP6): New macro.
2807 (PPC_BO): New macro.
2808 (PPC_LI): New macro.
2809 (PPC_BD): New macro.
2810 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2811 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2812 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2813 (ppc_get_thread_area): New function.
2814 (is_elfv2_inferior): New function.
2815 (gen_ds_form): New function.
2816 (GEN_STD): New macro.
2817 (GEN_STDU): New macro.
2818 (GEN_LD): New macro.
2819 (GEN_LDU): New macro.
2820 (gen_d_form): New function.
2821 (GEN_ADDI): New macro.
2822 (GEN_ADDIS): New macro.
2823 (GEN_LI): New macro.
2824 (GEN_LIS): New macro.
2825 (GEN_ORI): New macro.
2826 (GEN_ORIS): New macro.
2827 (GEN_LWZ): New macro.
2828 (GEN_STW): New macro.
2829 (GEN_STWU): New macro.
2830 (gen_xfx_form): New function.
2831 (GEN_MFSPR): New macro.
2832 (GEN_MTSPR): New macro.
2833 (GEN_MFCR): New macro.
2834 (GEN_MTCR): New macro.
2835 (GEN_SYNC): New macro.
2836 (GEN_LWSYNC): New macro.
2837 (gen_x_form): New function.
2838 (GEN_OR): New macro.
2839 (GEN_MR): New macro.
2840 (GEN_LWARX): New macro.
2841 (GEN_STWCX): New macro.
2842 (GEN_CMPW): New macro.
2843 (gen_md_form): New function.
2844 (GEN_RLDICL): New macro.
2845 (GEN_RLDICR): New macro.
2846 (gen_i_form): New function.
2847 (GEN_B): New macro.
2848 (GEN_BL): New macro.
2849 (gen_b_form): New function.
2850 (GEN_BNE): New macro.
2851 (GEN_LOAD): New macro.
2852 (GEN_STORE): New macro.
2853 (gen_limm): New function.
2854 (gen_atomic_xchg): New function.
2855 (gen_call): New function.
2856 (ppc_relocate_instruction): New function.
2857 (ppc_install_fast_tracepoint_jump_pad): New function.
2858 (ppc_get_min_fast_tracepoint_insn_len): New function.
2859 (ppc_get_ipa_tdesc_idx): New function.
2860 (the_low_target): Wire in the new functions.
2861 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2862 tdescs.
2863 * linux-ppc-tdesc.h: New file.
2864
2865 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2866
2867 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2868 (alloc_jump_pad_buffer): New function.
2869 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2870 (alloc_jump_pad_buffer): New function.
2871 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2872 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2873 (alloc_jump_pad_buffer): New function.
2874 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2875 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2876 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2877 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2878
2879 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2880
2881 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2882 * linux-amd64-ipa.c: Likewise.
2883 * linux-i386-ipa.c: Likewise.
2884 * linux-s390-ipa.c: Likewise.
2885 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2886 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2887 set_trace_state_variable_value_ptr.
2888 (struct ipa_sym_addresses): Likewise.
2889 (symbol_list): Likewise.
2890 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2891 accessing gdb_collect directly.
2892 (gdb_collect_ptr_type): New typedef.
2893 (get_raw_reg_ptr_type): New typedef.
2894 (get_trace_state_variable_value_ptr_type): New typedef.
2895 (set_trace_state_variable_value_ptr_type): New typedef.
2896 (gdb_collect_ptr): New global.
2897 (get_raw_reg_ptr): New global.
2898 (get_trace_state_variable_value_ptr): New global.
2899 (set_trace_state_variable_value_ptr): New global.
2900 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2901 accessing get_raw_reg directly.
2902 (get_get_tsv_func_addr): Likewise for
2903 get_trace_state_variable_value_ptr.
2904 (get_set_tsv_func_addr): Likewise for
2905 set_trace_state_variable_value_ptr.
2906 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2907
2908 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2909
2910 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2911
2912 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2913
2914 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2915 packets.
2916 (relocate_instruction): Remove own_buf.
2917 * server.c (own_buf): Make global.
2918 (handle_v_requests): Make global.
2919 * server.h (own_buf): New declaration.
2920 (handle_v_requests): New prototype.
2921
2922 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2923
2924 PR 18377
2925 * linux-s390-low.c (add_insns): New function.
2926 (s390_emit_prologue): New function.
2927 (s390_emit_epilogue): New function.
2928 (s390_emit_add): New function.
2929 (s390_emit_sub): New function.
2930 (s390_emit_mul): New function.
2931 (s390_emit_lsh): New function.
2932 (s390_emit_rsh_signed): New function.
2933 (s390_emit_rsh_unsigned): New function.
2934 (s390_emit_ext): New function.
2935 (s390_emit_log_not): New function.
2936 (s390_emit_bit_and): New function.
2937 (s390_emit_bit_or): New function.
2938 (s390_emit_bit_xor): New function.
2939 (s390_emit_bit_not): New function.
2940 (s390_emit_equal): New function.
2941 (s390_emit_less_signed): New function.
2942 (s390_emit_less_unsigned): New function.
2943 (s390_emit_ref): New function.
2944 (s390_emit_if_goto): New function.
2945 (s390_emit_goto): New function.
2946 (s390_write_goto_address): New function.
2947 (s390_emit_litpool): New function.
2948 (s390_emit_const): New function.
2949 (s390_emit_call): New function.
2950 (s390_emit_reg): New function.
2951 (s390_emit_pop): New function.
2952 (s390_emit_stack_flush): New function.
2953 (s390_emit_zero_ext): New function.
2954 (s390_emit_swap): New function.
2955 (s390_emit_stack_adjust): New function.
2956 (s390_emit_set_r2): New function.
2957 (s390_emit_int_call_1): New function.
2958 (s390_emit_void_call_2): New function.
2959 (s390_emit_eq_goto): New function.
2960 (s390_emit_ne_goto): New function.
2961 (s390_emit_lt_goto): New function.
2962 (s390_emit_le_goto): New function.
2963 (s390_emit_gt_goto): New function.
2964 (s390_emit_ge_goto): New function.
2965 (s390x_emit_prologue): New function.
2966 (s390x_emit_epilogue): New function.
2967 (s390x_emit_add): New function.
2968 (s390x_emit_sub): New function.
2969 (s390x_emit_mul): New function.
2970 (s390x_emit_lsh): New function.
2971 (s390x_emit_rsh_signed): New function.
2972 (s390x_emit_rsh_unsigned): New function.
2973 (s390x_emit_ext): New function.
2974 (s390x_emit_log_not): New function.
2975 (s390x_emit_bit_and): New function.
2976 (s390x_emit_bit_or): New function.
2977 (s390x_emit_bit_xor): New function.
2978 (s390x_emit_bit_not): New function.
2979 (s390x_emit_equal): New function.
2980 (s390x_emit_less_signed): New function.
2981 (s390x_emit_less_unsigned): New function.
2982 (s390x_emit_ref): New function.
2983 (s390x_emit_if_goto): New function.
2984 (s390x_emit_const): New function.
2985 (s390x_emit_call): New function.
2986 (s390x_emit_reg): New function.
2987 (s390x_emit_pop): New function.
2988 (s390x_emit_stack_flush): New function.
2989 (s390x_emit_zero_ext): New function.
2990 (s390x_emit_swap): New function.
2991 (s390x_emit_stack_adjust): New function.
2992 (s390x_emit_int_call_1): New function.
2993 (s390x_emit_void_call_2): New function.
2994 (s390x_emit_eq_goto): New function.
2995 (s390x_emit_ne_goto): New function.
2996 (s390x_emit_lt_goto): New function.
2997 (s390x_emit_le_goto): New function.
2998 (s390x_emit_gt_goto): New function.
2999 (s390x_emit_ge_goto): New function.
3000 (s390_emit_ops): New function.
3001 (struct linux_target_ops): Fill in emit_ops hook.
3002
3003 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3004
3005 PR 18377
3006 * Makefile.in: Add s390 IPA files.
3007 * configure.srv: Build IPA for s390.
3008 * linux-s390-ipa.c: New file.
3009 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3010 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3011 (tdesc_s390_linux32): Likewise.
3012 (init_registers_s390_linux32v1): Likewise.
3013 (tdesc_s390_linux32v1): Likewise.
3014 (init_registers_s390_linux32v2): Likewise.
3015 (tdesc_s390_linux32v2): Likewise.
3016 (init_registers_s390_linux64): Likewise.
3017 (tdesc_s390_linux64): Likewise.
3018 (init_registers_s390_linux64v1): Likewise.
3019 (tdesc_s390_linux64v1): Likewise.
3020 (init_registers_s390_linux64v2): Likewise.
3021 (tdesc_s390_linux64v2): Likewise.
3022 (init_registers_s390_te_linux64): Likewise.
3023 (tdesc_s390_te_linux64): Likewise.
3024 (init_registers_s390_vx_linux64): Likewise.
3025 (tdesc_s390_vx_linux64): Likewise.
3026 (init_registers_s390_tevx_linux64): Likewise.
3027 (tdesc_s390_tevx_linux64): Likewise.
3028 (init_registers_s390x_linux64): Likewise.
3029 (tdesc_s390x_linux64): Likewise.
3030 (init_registers_s390x_linux64v1): Likewise.
3031 (tdesc_s390x_linux64v1): Likewise.
3032 (init_registers_s390x_linux64v2): Likewise.
3033 (tdesc_s390x_linux64v2): Likewise.
3034 (init_registers_s390x_te_linux64): Likewise.
3035 (tdesc_s390x_te_linux64): Likewise.
3036 (init_registers_s390x_vx_linux64): Likewise.
3037 (tdesc_s390x_vx_linux64): Likewise.
3038 (init_registers_s390x_tevx_linux64): Likewise.
3039 (tdesc_s390x_tevx_linux64): Likewise.
3040 (have_hwcap_s390_vx): New static variable.
3041 (s390_arch_setup): Fill have_hwcap_s390_vx.
3042 (s390_get_thread_area): New function.
3043 (s390_ft_entry_gpr_esa): New const.
3044 (s390_ft_entry_gpr_zarch): New const.
3045 (s390_ft_entry_misc): New const.
3046 (s390_ft_entry_fr): New const.
3047 (s390_ft_entry_vr): New const.
3048 (s390_ft_main_31): New const.
3049 (s390_ft_main_64): New const.
3050 (s390_ft_exit_fr): New const.
3051 (s390_ft_exit_vr): New const.
3052 (s390_ft_exit_misc): New const.
3053 (s390_ft_exit_gpr_esa): New const.
3054 (s390_ft_exit_gpr_zarch): New const.
3055 (append_insns): New function.
3056 (s390_relocate_instruction): New function.
3057 (s390_install_fast_tracepoint_jump_pad): New function.
3058 (s390_get_min_fast_tracepoint_insn_len): New function.
3059 (s390_get_ipa_tdesc_idx): New function.
3060 (struct linux_target_ops): Wire in the above functions.
3061 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3062 * linux-s390-tdesc.h: New file.
3063
3064 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3065
3066 * linux-s390-low.c (s390_supports_tracepoints): New function.
3067 (struct linux_target_ops): Fill supports_tracepoints hook.
3068
3069 2016-03-18 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-low.c (lwp_signal_can_be_delivered): New function.
3072 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3073
3074 2016-03-18 Yao Qi <yao.qi@linaro.org>
3075
3076 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3077 0 if signal is enqueued. Remove 'signal' from one debugging
3078 message. Move one debugging message to some lines below.
3079 Remove code setting 'signal' to 0.
3080
3081 2016-03-18 Yao Qi <yao.qi@linaro.org>
3082
3083 * linux-low.c (linux_low_filter_event): Remove redundant
3084 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3085
3086 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3087
3088 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3089 (struct linux_target_ops): Wire in the above.
3090
3091 2016-03-03 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-low.c: Update comments to start_step_over.
3094
3095 2016-03-03 Yao Qi <yao.qi@linaro.org>
3096
3097 PR server/19736
3098 * linux-low.c (handle_extended_wait): Set child suspended
3099 if event_lwp->bp_reinsert isn't zero.
3100
3101 2016-03-02 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3104 enqueue_pending_signal.
3105
3106 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3107
3108 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3109 is actually loaded.
3110
3111 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3112
3113 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3114 (s390_regmap_3264) [!__s390x__]: New global.
3115 (s390_collect_ptrace_register): Skip map entries containing -1.
3116 (s390_supply_ptrace_register): Ditto.
3117 (s390_fill_gprs_high): New function.
3118 (s390_store_gprs_high): New function.
3119 (s390_regsets): Add NT_S390_HIGH_GPRS.
3120 (s390_get_hwcap): Enable on 31-bit.
3121 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3122 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3123 Detect NT_S390_HIGH_GPRS.
3124 (s390_usrregs_info_3264): Enable on 31-bit.
3125 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3126 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3127
3128 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3129
3130 PR gdb/13808
3131 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3132 * configure.srv: Ditto.
3133 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3134 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3135 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3136 (init_registers_amd64_linux): Remove prototype.
3137 (tdesc_amd64_linux): Remove declaration.
3138 (get_ipa_tdesc): New function.
3139 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3140 initialize remaining tdescs.
3141 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3142 (init_registers_i386_linux): Remove prototype.
3143 (tdesc_i386_linux): Remove declaration.
3144 (get_ipa_tdesc): New function.
3145 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3146 initialize remaining tdescs.
3147 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3148 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3149 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3150 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3151 (x86_get_ipa_tdesc_idx): New function.
3152 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3153 * linux-x86-tdesc.h: New file.
3154 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3155 (target_get_ipa_tdesc_idx): New macro.
3156 * tracepoint.c (ipa_tdesc_idx): New macro.
3157 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3158 (symbol_list): Add ipa_tdesc_idx.
3159 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3160 (ipa_tdesc): Remove.
3161 (ipa_tdesc_idx): New variable.
3162 (get_context_regcache): Use get_ipa_tdesc.
3163 (gdb_collect): Ditto.
3164 (gdb_probe): Ditto.
3165 * tracepoint.h (get_ipa_tdesc): New prototype.
3166 (ipa_tdesc): Remove.
3167
3168 2016-02-24 Pedro Alves <palves@redhat.com>
3169
3170 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3171 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3172 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3173 Factor out common code between the USE_SIGTRAP_SIGINFO and
3174 !USE_SIGTRAP_SIGINFO blocks.
3175 (linux_low_filter_event): Call save_stop_reason instead of
3176 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3177 Update comments.
3178 (linux_wait_1): Update comments.
3179
3180 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3181
3182 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3183 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3184 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3185 ppc_insert_point, ppc_remove_point.
3186
3187 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3188
3189 * linux-s390-low.c (s390_supports_z_point_type): New function.
3190 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3191
3192 2016-02-16 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3195 PC. Get pc from regcache_read_pc.
3196
3197 2016-02-12 Yao Qi <yao.qi@linaro.org>
3198
3199 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3200 or linux_get_pc_32bit.
3201 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3202
3203 2016-02-12 Yao Qi <yao.qi@linaro.org>
3204
3205 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3206 arm_linux_get_next_pcs_fixup.
3207
3208 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3209
3210 * tracepoint.c (x_tracepoint_action_download): Change
3211 write_inferior_data_ptr to write_inferior_data_pointer.
3212 (cmd_qtstart): Likewise.
3213 (write_inferior_data_ptr): Remove.
3214 (download_agent_expr): Change write_inferior_data_ptr to
3215 write_inferior_data_pointer.
3216 (download_tracepoint_1): Likewise.
3217 (download_tracepoint): Likewise.
3218 (download_trace_state_variables): Likewise.
3219
3220 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3221 Marcin Kościelnicki <koriakin@0x04.net>
3222
3223 * tracepoint.c (struct tracepoint_action_ops): Remove.
3224 (struct tracepoint_action): Remove ops.
3225 (m_tracepoint_action_download, r_tracepoint_action_download)
3226 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3227 size and offset accordingly.
3228 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3229 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3230 (tracepoint_action_send, tracepoint_action_download): New functions.
3231 Helpers for trace action handlers.
3232 (add_tracepoint_action): Remove setup actions ops.
3233 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3234
3235 2016-02-10 Yao Qi <yao.qi@linaro.org>
3236
3237 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3238
3239 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3240
3241 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3242 to AC_OUTPUT.
3243 * configure: Regenerate.
3244
3245 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3246
3247 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3248 void * to gdb_byte *.
3249 * linux-low.c (siginfo_fixup): Likewise.
3250 (linux_xfer_siginfo): Likewise.
3251 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3252 Likewise.
3253 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3254
3255 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3256
3257 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3258 to srv_tgtobj.
3259 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3260 to srv_tgtobj.
3261 * linux-x86-low.c [__x86_64__]: Include
3262 "nat/amd64-linux-siginfo.h".
3263 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3264 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3265 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3266 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3267 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3268 (cpt_si_fd, si_timerid, si_overrun): Move from
3269 nat/amd64-linux-siginfo.c.
3270 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3271
3272 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * server.c (skip_to_semicolon): Remove.
3275 (process_point_options): Use strchrnul instead of
3276 skip_to_semicolon.
3277
3278 2016-01-26 Yao Qi <yao.qi@linaro.org>
3279
3280 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3281 * linux-low.c (install_software_single_step_breakpoints): Don't
3282 call regcache_read_pc.
3283 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3284 argument pc.
3285
3286 2016-01-26 Yao Qi <yao.qi@linaro.org>
3287
3288 * linux-low.c (install_software_single_step_breakpoints): Call
3289 regcache_read_pc instead of get_pc.
3290
3291 2016-01-26 Yao Qi <yao.qi@linaro.org>
3292
3293 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3294 (unblock_async_io): Rename to ...
3295 (block_unblock_async_io): ... it. New function.
3296 (enable_async_io): Don't install SIGIO handler. Unblock it
3297 instead.
3298 (disable_async_io): Don't ignore SIGIO. Block it instead.
3299 (initialize_async_io): Install SIGIO handler. Don't call
3300 unblock_async_io.
3301
3302 2016-01-26 Yao Qi <yao.qi@linaro.org>
3303
3304 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3305 first character is '\003', call *the_target->request_interrupt.
3306
3307 2016-01-25 Yao Qi <yao.qi@linaro.org>
3308
3309 * remote-utils.c (new_thread_notify): Remove.
3310 (dead_thread_notify): Likewise.
3311 * remote-utils.h (new_thread_notify): Remove declaration.
3312 (dead_thread_notify): Likewise.
3313
3314 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3315
3316 * gdb.trace/pending.exp: Fix expected message on continue.
3317
3318 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3319
3320 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3321 it works properly on big-endian machines where sizeof (CORE_ADDR)
3322 != sizeof (void *).
3323
3324 2016-01-21 Pedro Alves <palves@redhat.com>
3325
3326 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3327 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3328 * configure: Regenerate.
3329
3330 2016-01-21 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3333 is_thumb and set it according to CPSR saved on the stack.
3334 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3335 arm_sigreturn_next_pc.
3336
3337 2016-01-18 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-low.c (linux_set_pc_64bit): New function.
3340 (linux_get_pc_64bit): New function.
3341 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3342 Declare.
3343 * linux-sparc-low.c (debug_threads): Remove declaration.
3344 (sparc_get_pc): Remove.
3345 (the_low_target): Use linux_get_pc_64bit instead of
3346 sparc_get_pc.
3347 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3348 (the_low_target): Use linux_get_pc_64bit and
3349 linux_set_pc_64bit.
3350
3351 2016-01-18 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-arm-low.c (debug_threads): Remove declaration.
3354 (arm_get_pc, arm_set_pc): Remove.
3355 (the_low_target): Use linux_get_pc_32bit and
3356 linux_set_pc_32bit.
3357 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3358 (the_low_target): Use linux_get_pc_32bit and
3359 linux_set_pc_32bit.
3360 * linux-cris-low.c (debug_threads): Remove declaration.
3361 (cris_get_pc, cris_set_pc,): Remove.
3362 (the_low_target): Use linux_get_pc_32bit and
3363 linux_set_pc_32bit.
3364 * linux-crisv32-low.c (debug_threads): Remove declaration.
3365 (cris_get_pc, cris_set_pc): Remove.
3366 (the_low_target): Use linux_get_pc_32bit and
3367 linux_set_pc_32bit.
3368 * linux-low.c: Include inttypes.h.
3369 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3370 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3371 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3372 (the_low_target): Use linux_get_pc_32bit and
3373 linux_set_pc_32bit.
3374 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3375 (the_low_target): Use linux_get_pc_32bit and
3376 linux_set_pc_32bit.
3377 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3378 (the_low_target): Use linux_get_pc_32bit and
3379 linux_set_pc_32bit.
3380 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3381 (the_low_target): Use linux_get_pc_32bit and
3382 linux_set_pc_32bit.
3383 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3384 (the_low_target): Use linux_get_pc_32bit and
3385 linux_set_pc_32bit.
3386
3387 2016-01-18 Gary Benson <gbenson@redhat.com>
3388
3389 * configure.ac (AC_FUNC_FORK): New check.
3390 * config.in: Regenerate.
3391 * configure: Likewise.
3392
3393 2016-01-14 Yao Qi <yao.qi@linaro.org>
3394
3395 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3396 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3397 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3398 arm_get_next_pcs_ctor.
3399
3400 2016-01-12 Josh Stone <jistone@redhat.com>
3401 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3402
3403 * inferiors.h: Include "gdb_vecs.h".
3404 (struct process_info): Add syscalls_to_catch.
3405 * inferiors.c (remove_process): Free syscalls_to_catch.
3406 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3407 syscall_return stops.
3408 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3409 * server.c (handle_general_set): Handle QCatchSyscalls.
3410 (handle_query): Report support for QCatchSyscalls.
3411 * target.h (struct target_ops): Add supports_catch_syscall.
3412 (target_supports_catch_syscall): New macro.
3413 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3414 (struct lwp_info): Add syscall_state.
3415 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3416 Maintain syscall_state and syscalls_to_catch across exec.
3417 (get_syscall_trapinfo): New function, proxy to the_low_target.
3418 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3419 (linux_low_filter_event): Toggle syscall_state entry/return for
3420 syscall traps, and set it ignored for all others.
3421 (gdb_catching_syscalls_p): New function.
3422 (gdb_catch_this_syscall_p): New function.
3423 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3424 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3425 (linux_supports_catch_syscall): New function.
3426 (linux_target_ops): Install it.
3427 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3428 (the_low_target): Install it.
3429
3430 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3431
3432 * acinclude.m4: Include new ../warning.m4 file.
3433 * configure: Regenerated.
3434 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3435
3436 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3437
3438 * ax.c (is_goto_target): Mark static.
3439 * linux-low.c (register_addr): Likewise.
3440 (linux_fetch_registers, linux_store_registers): Likewise.
3441 * mem-break.c (any_persistent_commands): Fix old prototype.
3442 (add_commands_to_breakpoint): Mark static.
3443 * regcache.c (find_register_by_name): Delete unused func.
3444 * remote-utils.c (hex_or_minus_one): Mark static.
3445 * server.c (monitor_show_help): Mark static.
3446 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3447 handle_v_requests): Likewise.
3448
3449 2016-01-12 Pedro Alves <palves@redhat.com>
3450
3451 Remove use of the registered trademark symbol throughout.
3452
3453 2016-01-08 Yao Qi <yao.qi@linaro.org>
3454
3455 * remote-utils.c (getpkt): If c is '\003', call target hook
3456 request_interrupt.
3457
3458 2016-01-06 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3461 linux-aarch32-low.c.
3462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3463 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3464 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3465 (thumb2_breakpoint): Declare.
3466 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3467 linux-aarch32-low.h.
3468 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3469 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3470 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3471
3472 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3473
3474 * gdbreplay.c (gdbreplay_version): Change copyright year in
3475 version message.
3476 * server.c (gdbserver_version): Likewise.
3477
3478 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3479
3480 * server.c (crc32_table): Delete.
3481 (crc32): Use libiberty's xcrc32 function.
3482
3483 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3484
3485 * lynx-low.c (lynx_delete_thread_callback): New function.
3486 (lynx_mourn): Properly delete our process and all of its
3487 threads. Remove call to clear_inferiors.
3488
3489 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3490
3491 * target.c (thread_search_callback): Add check that
3492 the thread_stopped target callback is not NULL before
3493 calling it.
3494
3495 2015-12-21 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3498 arm breakpoint.
3499
3500 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3501
3502 * server.c (handle_query): Call target_supports_software_single_step.
3503
3504 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3505
3506 * linux-low.c (single_step): New function.
3507 (linux_resume_one_lwp_throw): Call single_step.
3508 (start_step_over): Likewise.
3509
3510 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3511
3512 * Makefile.in (SFILES): Append arch/arm-linux.c,
3513 arch/arm-get-next-pcs.c.
3514 (arm-linux.o): New rule.
3515 (arm-get-next-pcs.o): New rule.
3516 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3517 arm-linux.o.
3518 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3519 to linux-aarch32-low.c.
3520 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3521 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3522 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3523 (thumb2_breakpoint_len): Likewise.
3524 (arm_is_thumb_mode): Make non-static.
3525 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3526 from linux-aarch32-low.c.
3527 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3528 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3529 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3530 (thumb2_breakpoint_len): Likewise.
3531 (arm_is_thumb_mode): New declaration.
3532 * linux-arm-low.c: Include arch/arm-linux.h
3533 aarch/arm-get-next-pcs.h, sys/syscall.h.
3534 (get_next_pcs_ops): New struct.
3535 (get_next_pcs_addr_bits_remove): New function.
3536 (get_next_pcs_is_thumb): New function.
3537 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3538 (arm_sigreturn_next_pc): Likewise.
3539 (get_next_pcs_syscall_next_pc): Likewise.
3540 (arm_gdbserver_get_next_pcs): Likewise.
3541 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3542 Initialize.
3543 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3544 * server.h: Include gdb_vecs.h.
3545
3546 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3547
3548 * Makefile.in (SFILES): Append common/common-regcache.c.
3549 (OBS): Append common-regcache.o.
3550 (common-regcache.o): New rule.
3551 * regcache.c (init_register_cache): Initialize cache to
3552 REG_UNAVAILABLE.
3553 (regcache_raw_read_unsigned): New function.
3554 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3555 register_status enum.
3556
3557 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3558
3559 * linux-aarch64-low.c (the_low_targets): Rename
3560 breakpoint_reinsert_addr to get_next_pcs.
3561 * linux-arm-low.c (the_low_targets): Likewise.
3562 * linux-bfin-low.c (the_low_targets): Likewise.
3563 * linux-cris-low.c (the_low_targets): Likewise.
3564 * linux-crisv32-low.c (the_low_targets): Likewise.
3565 * linux-low.c (can_software_single_step): Likewise.
3566 (install_software_single_step_breakpoints): New function.
3567 (start_step_over): Use install_software_single_step_breakpoints.
3568 * linux-low.h: New CORE_ADDR vector.
3569 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3570 get_next_pcs.
3571 * linux-mips-low.c (the_low_targets): Likewise.
3572 * linux-nios2-low.c (the_low_targets): Likewise.
3573 * linux-sparc-low.c (the_low_targets): Likewise.
3574
3575 2015-12-17 Pedro Alves <palves@redhat.com>
3576
3577 * linux-low.c (linux_kill_one_lwp): Remove references to
3578 LinuxThreads.
3579 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3580 to 'kill'.
3581 (linux_init_signals): Delete.
3582 (initialize_low): Adjust.
3583 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3584
3585 2015-12-16 Pedro Alves <palves@redhat.com>
3586
3587 * configure.ac (compiler warning flags): When testing a
3588 -Wno-foo option, check whether -Wfoo works instead.
3589 * configure: Regenerate.
3590
3591 2015-12-11 Don Breazeal <donb@codesourcery.com>
3592
3593 * server.c (process_serial_event): Don't exit from gdbserver
3594 in remote mode if there are still active inferiors.
3595
3596 2015-12-11 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3599 arm_breakpoint_at if the process is 32-bit.
3600
3601 2015-12-11 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3604 arm breakpoint.
3605
3606 2015-12-07 Yao Qi <yao.qi@linaro.org>
3607
3608 * configure.srv: Append arm.o to srv_tgtobj for
3609 aarch64*-*-linux* target.
3610 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3611 from linux-arm-low.c.
3612 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3613 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3614 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3615 (thumb2_breakpoint_len): Likewise.
3616 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3617 (arm_breakpoint_kinds): Likewise.
3618 (arm_breakpoint_kind_from_pc): Likewise.
3619 (arm_sw_breakpoint_from_kind): Likewise.
3620 (arm_breakpoint_kind_from_current_state): Likewise.
3621 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3622 (arm_sw_breakpoint_from_kind): Declare.
3623 (arm_breakpoint_kind_from_current_state): Declare.
3624 (arm_breakpoint_at): Declare.
3625 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3626 arm_sw_breakpoint_from_kind if process is 32-bit.
3627 (aarch64_breakpoint_kind_from_pc): New function.
3628 (aarch64_breakpoint_kind_from_current_state): New function.
3629 (the_low_target): Initialize fields breakpoint_kind_from_pc
3630 and breakpoint_kind_from_current_state.
3631 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3632 linux-aarch32-low.c.
3633 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3634 (arm_breakpoint, arm_breakpoint_len): Likewise.
3635 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3636 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3637 (arm_is_thumb_mode): Likewise.
3638 (arm_breakpoint_at): Likewise.
3639 (arm_breakpoint_kind_from_pc): Likewise.
3640 (arm_sw_breakpoint_from_kind): Likewise.
3641 (arm_breakpoint_kind_from_current_state): Likewise.
3642
3643 Revert:
3644 2015-08-04 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3647 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3648 * server.c (extended_protocol): Remove "static".
3649 * server.h (extended_protocol): Declare it.
3650
3651 2015-12-04 Josh Stone <jistone@redhat.com>
3652
3653 * target.h (struct target_ops) <arch_setup>: Rename to ...
3654 (struct target_ops) <post_create_inferior>: ... this.
3655 (target_arch_setup): Rename to ...
3656 (target_post_create_inferior): ... this, calling post_create_inferior.
3657 * server.c (start_inferior): Update target_arch_setup calls to
3658 target_post_create_inferior.
3659 * linux-low.c (linux_low_ptrace_options): Forward declare.
3660 (linux_arch_setup): Update its comment for general use.
3661 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3662 (struct linux_target_ops): Use linux_post_create_inferior.
3663 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3664 to post_create_inferior.
3665 * nto-low.c (struct nto_target_ops): Likewise.
3666 * spu-low.c (struct spu_target_ops): Likewise.
3667 * win32-low.c (struct win32_target_ops): Likewise.
3668
3669 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3670
3671 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3672
3673 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3674
3675 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3676 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3677 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3678 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3679 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3680 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3681 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3682 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3683 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3684 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3685 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3686 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3687
3688 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3689
3690 * linux-low.c (linux_look_up_symbols): Don't call
3691 linux_supports_traceclone.
3692 * linux-low.h (thread_db_init): Remove use_events argument.
3693 * thread-db.c (thread_db_use_event): Remove global variable.
3694 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3695 (struct thread_db) <td_create_bp>: Remove field.
3696 (thread_db_create_event): Remove function.
3697 (thread_db_enable_reporting): Likewise.
3698 (find_one_thread): Don't check for thread_db_use_events.
3699 (attach_thread): Likewise.
3700 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3701 (try_thread_db_load_1): Don't check for thread_db_use_events.
3702 (thread_db_init): Remove use_events argument and thread events
3703 handling.
3704 (remove_thread_event_breakpoints): Remove function.
3705 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3706
3707 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3708
3709 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3710 New function.
3711 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3712 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3713 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3714 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3715 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3716 Initialize.
3717 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3718 New function.
3719 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3720 * linux-low.c (can_hardware_single_step): Use
3721 supports_hardware_single_step.
3722 (can_software_single_step): New function.
3723 (start_step_over): Call can_software_single_step.
3724 (linux_supports_hardware_single_step): New function.
3725 (struct target_ops) <supports_software_single_step>: Initialize.
3726 * linux-low.h (struct linux_target_ops)
3727 <supports_hardware_single_step>: Initialize.
3728 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3729 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3730 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3731 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3732 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3733 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3734 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3735 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3736 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3737 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3738 Initialize.
3739 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3740 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3741 Initialize.
3742 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3743 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3744 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3745 New function.
3746 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3747 * target.h (struct target_ops): <supports_software_single_step>:
3748 New field.
3749 (target_supports_software_single_step): New macro.
3750
3751 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3752
3753 * linux-low.c (linux_wait_1): Fix pc advance condition.
3754 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3755 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3756
3757 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3758
3759 * linux-arm-low.c (arm_is_thumb_mode): New function.
3760 (arm_breakpoint_at): Use arm_is_thumb_mode.
3761 (arm_breakpoint_kind_from_current_state): New function.
3762 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3763 Initialize.
3764 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3765 (linux_breakpoint_kind_from_current_state): New function.
3766 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3767 * linux-low.h (struct linux_target_ops)
3768 <breakpoint_kind_from_current_state>: New field.
3769 * target.h (struct target_ops): Likewise.
3770 (target_breakpoint_kind_from_current_state): New macro.
3771
3772 2015-11-30 Pedro Alves <palves@redhat.com>
3773
3774 * linux-low.c (linux_resume): Wake up the event loop before
3775 returning.
3776
3777 2015-11-30 Pedro Alves <palves@redhat.com>
3778
3779 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3780 check.
3781 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3782 to -1.
3783 * target.c (struct thread_search): New structure.
3784 (thread_search_callback): New function.
3785 (prev_general_thread): New global.
3786 (prepare_to_access_memory, done_accessing_memory): New functions.
3787 * target.h (prepare_to_access_memory, done_accessing_memory):
3788 Replace macros with function declarations.
3789
3790 2015-11-30 Pedro Alves <palves@redhat.com>
3791
3792 PR 14618
3793 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3794 report TARGET_WAITKIND_NO_RESUMED.
3795 * remote-utils.c (prepare_resume_reply): Handle
3796 TARGET_WAITKIND_NO_RESUMED.
3797 * server.c (report_no_resumed): New global.
3798 (handle_query) <qSupported>: Handle "no-resumed+". Report
3799 "no-resumed+" support.
3800 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3801 return error if the client doesn't support no-resumed events.
3802 (push_stop_notification): New function.
3803 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3804 events if the client supports them.
3805
3806 2015-11-30 Pedro Alves <palves@redhat.com>
3807
3808 * linux-low.c (thread_still_has_status_pending_p): Don't check
3809 vCont;t here.
3810 (lwp_resumed): New function.
3811 (status_pending_p_callback): Return early if the LWP is not
3812 supposed to be resumed.
3813
3814 2015-11-30 Pedro Alves <palves@redhat.com>
3815
3816 * linux-low.c (handle_extended_wait): Assert that the LWP's
3817 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3818 thread create events, leave the new child's status pending.
3819 (linux_low_filter_event): If GDB wants to hear about thread exit
3820 events, leave the LWP marked dead and don't delete it.
3821 (linux_wait_for_event_filtered): Don't check for thread exit.
3822 (filter_exit_event): New function.
3823 (linux_wait_1): Use it, when returning an exit event.
3824 (linux_resume_one_lwp_throw): Assert that the LWP's
3825 waitstatus is TARGET_WAITKIND_IGNORE.
3826 * remote-utils.c (prepare_resume_reply): Handle
3827 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3828 * server.c (report_thread_events): New global.
3829 (handle_general_set): Handle QThreadEvents.
3830 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3831 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3832 TARGET_WAITKIND_THREAD_EXITED.
3833 * server.h (report_thread_events): Declare.
3834
3835 2015-11-30 Pedro Alves <palves@redhat.com>
3836
3837 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3838 the thread's last_resume_kind was resume_stop.
3839
3840 2015-11-30 Pedro Alves <palves@redhat.com>
3841
3842 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3843 before returning.
3844
3845 2015-11-30 Pedro Alves <palves@redhat.com>
3846
3847 * server.c (handle_v_requests): Handle vCtrlC.
3848
3849 2015-11-30 Pedro Alves <palves@redhat.com>
3850
3851 * gdbthread.h (find_any_thread_of_pid): Declare.
3852 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3853 functions.
3854 * server.c (handle_query): If current_thread is NULL, look for
3855 another thread of the selected process.
3856
3857 2015-11-26 Daniel Colascione <dancol@dancol.org>
3858 Simon Marchi <simon.marchi@ericsson.com>
3859
3860 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3861 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3862 name in reply.
3863 * target.h (struct target_ops) <thread_name>: New field.
3864 (target_thread_name): New macro.
3865
3866 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3867
3868 * regcache.h (regcache_invalidate_pid): Add declaration.
3869 * regcache.c (regcache_invalidate_pid): New function, extracted
3870 from regcache_invalidate.
3871 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3872 Add trivial documentation comment.
3873 * lynx-low.c: Use regcache_invalidate_pid instead of
3874 regcache_invalidate.
3875
3876 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3877
3878 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3879 and Elf64_auxv_t if the target is Android.
3880
3881 2015-11-22 Doug Evans <xdje42@gmail.com>
3882
3883 * target.h: #include <sys/types.h>.
3884
3885 2015-11-19 Pedro Alves <palves@redhat.com>
3886
3887 * linux-low.c (linux_process_qsupported): Change prototype.
3888 Adjust.
3889 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3890 Change prototype.
3891 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3892 and adjust to loop over all features.
3893 * server.c (handle_query) <qSupported>: Adjust to call
3894 target_process_qsupported once, passing it a vector of unprocessed
3895 features.
3896 * target.h (struct target_ops) <process_qsupported>: Change
3897 prototype.
3898 (target_process_qsupported): Adjust.
3899
3900 2015-11-19 Pedro Alves <palves@redhat.com>
3901
3902 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3903 mode.
3904 * configure: Regenerate.
3905
3906 2015-11-19 Pedro Alves <palves@redhat.com>
3907
3908 * configure: Regenerate.
3909
3910 2015-11-19 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3913 type to uint32_t.
3914
3915 2015-11-19 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3918 (struct aarch64_operand): Move enum out.
3919
3920 2015-11-19 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3923 struct user_fpsimd_state *.
3924 (aarch64_store_fpregset): Likewise.
3925
3926 2015-11-19 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3929 struct user_pt_regs *.
3930 (aarch64_store_gregset): Likewise.
3931
3932 2015-11-18 Pedro Alves <palves@redhat.com>
3933
3934 * Makefile.in (all_object_files): Add $IPA_OBJS.
3935
3936 2015-11-17 Pedro Alves <palves@redhat.com>
3937
3938 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3939 GDB_SIGNAL_0 and gdb_signal_to_string.
3940
3941 2015-11-17 Pedro Alves <palves@redhat.com>
3942
3943 * win32-low.c (handle_output_debug_string): Remove parameter.
3944 (win32_kill): Remove our_status local and adjust call to
3945 handle_output_debug_string.
3946 (get_child_debug_event): Adjust call to
3947 handle_output_debug_string.
3948
3949 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3950
3951 * linux-mips-low.c (mips_fill_gregset): Add cast.
3952 (mips_store_gregset): Likewise.
3953 (mips_fill_fpregset): Likewise.
3954 (mips_store_fpregset): Likewise.
3955
3956 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3957
3958 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3959 priv.
3960
3961 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3962
3963 * linux-mips-low.c (mips_linux_new_thread): Change type of
3964 watch_type to enum target_hw_bp_type.
3965
3966 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3967
3968 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3969 Change return type to arm_hwbp_type.
3970
3971 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3972
3973 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3974 (arm_store_gregset): Likewise.
3975 * linux-arm-low.c (arm_get_hwcap): Likewise.
3976 (arm_read_description): Likewise.
3977
3978 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3979
3980 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3981
3982 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3983
3984 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3985 (ppc_fill_vsxregset): Likewise.
3986 (ppc_store_vsxregset): Likewise.
3987 (ppc_fill_vrregset): Likewise.
3988 (ppc_store_vrregset): Likewise.
3989 (ppc_fill_evrregset): Likewise.
3990 (ppc_store_evrregset): Likewise.
3991
3992 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3993
3994 * linux-ppc-low.c (ppc_usrregs_info): Remove
3995 forward-declaration.
3996 (ppc_arch_setup): Move lower in file.
3997
3998 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4001 (ps_pdwrite): Likewise.
4002
4003 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4004
4005 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4006 to after assert checks.
4007
4008 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4009
4010 * proc-service.c (ps_pdread): Add/adjust casts.
4011 (ps_pdwrite): Add/adjust casts.
4012
4013 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4014
4015 * server.c (handle_search_memory_1): Cast return value of
4016 memmem.
4017
4018 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4019
4020 * server.c (write_qxfer_response): Change type of data to
4021 gdb_byte *.
4022
4023 2015-10-29 Pedro Alves <palves@redhat.com>
4024
4025 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4026
4027 2015-10-29 Pedro Alves <palves@redhat.com>
4028
4029 * tracepoint.c (clear_installed_tracepoints): Add casts.
4030
4031 2015-10-29 Pedro Alves <palves@redhat.com>
4032
4033 * server.c (handle_v_cont, process_serial_event): Add enum
4034 gdb_signal casts to signal parsing code.
4035
4036 2015-10-29 Pedro Alves <palves@redhat.com>
4037
4038 * linux-low.h (NULL_REGSET): Define.
4039 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4040 * linux-arm-low.c (arm_regsets): Likewise.
4041 * linux-crisv32-low.c (cris_regsets): Likewise.
4042 * linux-m68k-low.c (m68k_regsets): Likewise.
4043 * linux-mips-low.c (mips_regsets): Likewise.
4044 * linux-nios2-low.c (nios2_regsets): Likewise.
4045 * linux-ppc-low.c (ppc_regsets): Likewise.
4046 * linux-s390-low.c (s390_regsets): Likewise.
4047 * linux-sh-low.c (sh_regsets): Likewise.
4048 * linux-sparc-low.c (sparc_regsets): Likewise.
4049 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4050 * linux-tile-low.c (tile_regsets): Likewise.
4051 * linux-x86-low.c (x86_regsets): Likewise.
4052 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4053
4054 2015-10-29 Pedro Alves <palves@redhat.com>
4055
4056 * linux-low.h (NULL_REGSET): Define.
4057 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4058 * linux-arm-low.c (arm_regsets): Likewise.
4059 * linux-crisv32-low.c (cris_regsets): Likewise.
4060 * linux-m68k-low.c (m68k_regsets): Likewise.
4061 * linux-mips-low.c (mips_regsets): Likewise.
4062 * linux-nios2-low.c (nios2_regsets): Likewise.
4063 * linux-ppc-low.c (ppc_regsets): Likewise.
4064 * linux-s390-low.c (s390_regsets): Likewise.
4065 * linux-sh-low.c (sh_regsets): Likewise.
4066 * linux-sparc-low.c (sparc_regsets): Likewise.
4067 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4068 * linux-tile-low.c (tile_regsets): Likewise.
4069 * linux-x86-low.c (x86_regsets): Likewise.
4070 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4071
4072 2015-10-26 Doug Evans <dje@google.com>
4073
4074 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4075
4076 2015-10-26 Doug Evans <dje@google.com>
4077
4078 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4079
4080 2015-10-26 Doug Evans <dje@google.com>
4081
4082 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4083 for debug_printf.
4084 (attach_thread, find_new_threads_callback): Ditto.
4085
4086 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4087
4088 * mem-break.h (set_breakpoint_data): Remove.
4089
4090 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4091
4092 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4093 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4094 (initialize_low): Remove set_breakpoint_data call.
4095 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4096 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4097 (initialize_low): Remove set_breakpoint_data call.
4098 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4099 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4100 (initialize_low): Remove set_breakpoint_data call.
4101
4102 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4103
4104 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4105 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4106 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4107 * target.h (target_breakpoint_kind_from_pc): New macro.
4108
4109 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4110
4111 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4112 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4113 the default breakpoint kind.
4114
4115 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4116
4117 * linux-arm-low.c (arm_supports_z_point_type): Add software
4118 breakpoint support.
4119
4120 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4121
4122 * linux-arm-low.c: Refactor breakpoint definitions.
4123 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4124 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4125
4126 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4127
4128 * Makefile.in: Add arm.c/o.
4129 * configure.srv: Likewise.
4130 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4131 (arm_breakpoint_kind_from_pc): New function.
4132 (arm_sw_breakpoint_from_kind): Return proper kind.
4133 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4134
4135 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4136
4137 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4138 removal.
4139 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4140 (struct raw_breakpoint) <size>: Remove.
4141 (struct raw_breakpoint) <kind>: Add.
4142 (bp_size): New function.
4143 (bp_opcode): Likewise.
4144 (find_raw_breakpoint_at): Adjust for kind.
4145 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4146 (remove_memory_breakpoint): Adjust for kind call bp_size.
4147 (set_raw_breakpoint_at): Adjust for kind.
4148 (set_breakpoint): Likewise.
4149 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4150 (delete_raw_breakpoint): Adjust for kind.
4151 (delete_breakpoint): Likewise.
4152 (find_gdb_breakpoint): Likewise.
4153 (set_gdb_breakpoint_1): Likewise.
4154 (set_gdb_breakpoint): Likewise.
4155 (delete_gdb_breakpoint_1): Likewise.
4156 (delete_gdb_breakpoint): Likewise.
4157 (uninsert_raw_breakpoint): Likewise.
4158 (reinsert_raw_breakpoint): Likewise.
4159 (set_breakpoint_data): Remove.
4160 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4161 (check_mem_read): Adjust for kind call bp_size.
4162 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4163 (clone_one_breakpoint): Adjust for kind.
4164 * mem-break.h (set_gdb_breakpoint): Likewise.
4165 (delete_gdb_breakpoint): Likewise.
4166 * server.c (process_serial_event): Likewise.
4167
4168 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4169
4170 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4171 (struct linux_target_ops) <breakpoint>: Remove.
4172 (struct linux_target_ops) <breakpoint_len>: Remove.
4173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4175 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4176 (arm_sw_breakpoint_from_kind): New function.
4177 * linux-bfin-low.c (bfin_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-cris-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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4188 (struct linux_target_ops) <breakpoint>: Remove.
4189 (struct linux_target_ops) <breakpoint_len>: Remove.
4190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4192 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4193 and sw_breakpoint_from_kind to increment the pc.
4194 (linux_breakpoint_kind_from_pc): New function.
4195 (linux_sw_breakpoint_from_kind): New function.
4196 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4197 (initialize_low): Call breakpoint_kind_from_pc and
4198 sw_breakpoint_from_kind to replace breakpoint_data/len.
4199 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4200 New field.
4201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4202 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4243 (struct linux_target_ops) <breakpoint>: Remove.
4244 (struct linux_target_ops) <breakpoint_len>: Remove.
4245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4247 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4248 * linux-x86-low.c (x86_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 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4254 (struct linux_target_ops) <breakpoint>: Remove.
4255 (struct linux_target_ops) <breakpoint_len>: Remove.
4256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4258
4259 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4260
4261 * linux-cris-low.c (cris_get_pc): Remove void arg.
4262
4263 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4264
4265 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4266 variable name.
4267
4268 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4269
4270 * inferiors.c (thread_pid_matches_callback): New function.
4271 (find_thread_process): New function.
4272 (remove_thread): Reset current_thread.
4273 (remove_process): Assert threads have been removed first.
4274
4275 2015-10-15 Yao Qi <yao.qi@linaro.org>
4276
4277 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4278 if it is 3.
4279 (aarch64_remove_point): Likewise.
4280 * regcache.c (regcache_register_size): New function.
4281
4282 2015-10-12 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c: Update all callers as emit_load_store
4285 is renamed to aarch64_emit_load_store.
4286
4287 2015-10-12 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-aarch64-low.c: Update all callers of function renaming
4290 from emit_insn to aarch64_emit_insn.
4291
4292 2015-10-12 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4295 arch/aarch64-insn.h.
4296 (struct aarch64_memory_operand): Likewise.
4297 (ENCODE): Likewise.
4298 (emit_insn): Move to arch/aarch64-insn.c.
4299 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4300 (emit_load_store): Move to arch/aarch64-insn.c.
4301 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4302 (can_encode_int32): Remove.
4303
4304 2015-10-12 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4307 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4308 (aarch64_relocate_instruction): Likewise.
4309 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4310 (struct aarch64_insn_visitor): Likewise.
4311
4312 2015-10-12 Yao Qi <yao.qi@linaro.org>
4313
4314 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4315 (struct aarch64_insn_visitor): New.
4316 (struct aarch64_insn_relocation_data): New.
4317 (aarch64_ftrace_insn_reloc_b): New function.
4318 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4319 (aarch64_ftrace_insn_reloc_cb): Likewise.
4320 (aarch64_ftrace_insn_reloc_tb): Likewise.
4321 (aarch64_ftrace_insn_reloc_adr): Likewise.
4322 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4323 (aarch64_ftrace_insn_reloc_others): Likewise.
4324 (visitor): New.
4325 (aarch64_relocate_instruction): Use visitor.
4326
4327 2015-10-12 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4330 int. Add argument buf.
4331 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4332 aarch64_relocate_instruction.
4333
4334 2015-10-12 Yao Qi <yao.qi@linaro.org>
4335
4336 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4337 argument insn. Remove local variable insn. Don't call
4338 target_read_uint32.
4339 (aarch64_install_fast_tracepoint_jump_pad): Call
4340 target_read_uint32.
4341
4342 2015-09-30 Yao Qi <yao.qi@linaro.org>
4343
4344 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4345 (emit_load_store_pair): Likewise.
4346
4347 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4348
4349 * dll.c (match_dll): Add cast(s).
4350 (unloaded_dll): Likewise.
4351 * linux-low.c (second_thread_of_pid_p): Likewise.
4352 (delete_lwp_callback): Likewise.
4353 (count_events_callback): Likewise.
4354 (select_event_lwp_callback): Likewise.
4355 (linux_set_resume_request): Likewise.
4356 * server.c (accumulate_file_name_length): Likewise.
4357 (emit_dll_description): Likewise.
4358 (handle_qxfer_threads_worker): Likewise.
4359 (visit_actioned_threads): Likewise.
4360 * thread-db.c (any_thread_of): Likewise.
4361 * tracepoint.c (same_process_p): Likewise.
4362 (match_blocktype): Likewise.
4363 (build_traceframe_info_xml): Likewise.
4364
4365 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4366
4367 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4368 assignment.
4369 (gdb_unparse_agent_expr): Likewise.
4370 * hostio.c (require_data): Likewise.
4371 (handle_pread): Likewise.
4372 * linux-low.c (disable_regset): Likewise.
4373 (fetch_register): Likewise.
4374 (store_register): Likewise.
4375 (get_dynamic): Likewise.
4376 (linux_qxfer_libraries_svr4): Likewise.
4377 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4378 (set_fast_tracepoint_jump): Likewise.
4379 (uninsert_fast_tracepoint_jumps_at): Likewise.
4380 (reinsert_fast_tracepoint_jumps_at): Likewise.
4381 (validate_inserted_breakpoint): Likewise.
4382 (clone_agent_expr): Likewise.
4383 * regcache.c (init_register_cache): Likewise.
4384 * remote-utils.c (putpkt_binary_1): Likewise.
4385 (decode_M_packet): Likewise.
4386 (decode_X_packet): Likewise.
4387 (look_up_one_symbol): Likewise.
4388 (relocate_instruction): Likewise.
4389 (monitor_output): Likewise.
4390 * server.c (handle_search_memory): Likewise.
4391 (handle_qxfer_exec_file): Likewise.
4392 (handle_qxfer_libraries): Likewise.
4393 (handle_qxfer): Likewise.
4394 (handle_query): Likewise.
4395 (handle_v_cont): Likewise.
4396 (handle_v_run): Likewise.
4397 (captured_main): Likewise.
4398 * target.c (write_inferior_memory): Likewise.
4399 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4400 * tracepoint.c (init_trace_buffer): Likewise.
4401 (add_tracepoint_action): Likewise.
4402 (add_traceframe): Likewise.
4403 (add_traceframe_block): Likewise.
4404 (cmd_qtdpsrc): Likewise.
4405 (cmd_qtdv): Likewise.
4406 (cmd_qtstatus): Likewise.
4407 (response_source): Likewise.
4408 (response_tsv): Likewise.
4409 (cmd_qtnotes): Likewise.
4410 (gdb_collect): Likewise.
4411 (initialize_tracepoint): Likewise.
4412
4413 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4414
4415 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4416 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4417 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4418 <NOP>: New.
4419 (enum aarch64_condition_codes): New enum.
4420 (w0): New static global.
4421 (fp): Likewise.
4422 (lr): Likewise.
4423 (struct aarch64_memory_operand) <type>: New
4424 MEMORY_OPERAND_POSTINDEX type.
4425 (postindex_memory_operand): New helper function.
4426 (emit_ret): New function.
4427 (emit_load_store_pair): New function, factored out of emit_stp
4428 with support for MEMORY_OPERAND_POSTINDEX.
4429 (emit_stp): Rewrite using emit_load_store_pair.
4430 (emit_ldp): New function.
4431 (emit_load_store): Likewise.
4432 (emit_ldr): Mention post-index instruction in comment.
4433 (emit_ldrh): New function.
4434 (emit_ldrb): New function.
4435 (emit_ldrsw): Mention post-index instruction in comment.
4436 (emit_str): Likewise.
4437 (emit_subs): New function.
4438 (emit_cmp): Likewise.
4439 (emit_and): Likewise.
4440 (emit_orr): Likewise.
4441 (emit_orn): Likewise.
4442 (emit_eor): Likewise.
4443 (emit_mvn): Likewise.
4444 (emit_lslv): Likewise.
4445 (emit_lsrv): Likewise.
4446 (emit_asrv): Likewise.
4447 (emit_mul): Likewise.
4448 (emit_sbfm): Likewise.
4449 (emit_sbfx): Likewise.
4450 (emit_ubfm): Likewise.
4451 (emit_ubfx): Likewise.
4452 (emit_csinc): Likewise.
4453 (emit_cset): Likewise.
4454 (emit_nop): Likewise.
4455 (emit_ops_insns): New helper function.
4456 (emit_pop): Likewise.
4457 (emit_push): Likewise.
4458 (aarch64_emit_prologue): New function.
4459 (aarch64_emit_epilogue): Likewise.
4460 (aarch64_emit_add): Likewise.
4461 (aarch64_emit_sub): Likewise.
4462 (aarch64_emit_mul): Likewise.
4463 (aarch64_emit_lsh): Likewise.
4464 (aarch64_emit_rsh_signed): Likewise.
4465 (aarch64_emit_rsh_unsigned): Likewise.
4466 (aarch64_emit_ext): Likewise.
4467 (aarch64_emit_log_not): Likewise.
4468 (aarch64_emit_bit_and): Likewise.
4469 (aarch64_emit_bit_or): Likewise.
4470 (aarch64_emit_bit_xor): Likewise.
4471 (aarch64_emit_bit_not): Likewise.
4472 (aarch64_emit_equal): Likewise.
4473 (aarch64_emit_less_signed): Likewise.
4474 (aarch64_emit_less_unsigned): Likewise.
4475 (aarch64_emit_ref): Likewise.
4476 (aarch64_emit_if_goto): Likewise.
4477 (aarch64_emit_goto): Likewise.
4478 (aarch64_write_goto_address): Likewise.
4479 (aarch64_emit_const): Likewise.
4480 (aarch64_emit_call): Likewise.
4481 (aarch64_emit_reg): Likewise.
4482 (aarch64_emit_pop): Likewise.
4483 (aarch64_emit_stack_flush): Likewise.
4484 (aarch64_emit_zero_ext): Likewise.
4485 (aarch64_emit_swap): Likewise.
4486 (aarch64_emit_stack_adjust): Likewise.
4487 (aarch64_emit_int_call_1): Likewise.
4488 (aarch64_emit_void_call_2): Likewise.
4489 (aarch64_emit_eq_goto): Likewise.
4490 (aarch64_emit_ne_goto): Likewise.
4491 (aarch64_emit_lt_goto): Likewise.
4492 (aarch64_emit_le_goto): Likewise.
4493 (aarch64_emit_gt_goto): Likewise.
4494 (aarch64_emit_ge_got): Likewise.
4495 (aarch64_emit_ops_impl): New static global variable.
4496 (aarch64_emit_ops): New target function, return
4497 &aarch64_emit_ops_impl.
4498 (struct linux_target_ops): Install it.
4499
4500 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4501
4502 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4503 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4504 aarch64-ipa.o.
4505 * linux-aarch64-ipa.c: New file.
4506 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4507 and endian.h.
4508 (aarch64_get_thread_area): New target method.
4509 (extract_signed_bitfield): New helper function.
4510 (aarch64_decode_ldr_literal): New function.
4511 (enum aarch64_opcodes): New enum.
4512 (struct aarch64_register): New struct.
4513 (struct aarch64_operand): New struct.
4514 (x0): New static global.
4515 (x1): Likewise.
4516 (x2): Likewise.
4517 (x3): Likewise.
4518 (x4): Likewise.
4519 (w2): Likewise.
4520 (ip0): Likewise.
4521 (sp): Likewise.
4522 (xzr): Likewise.
4523 (aarch64_register): New helper function.
4524 (register_operand): Likewise.
4525 (immediate_operand): Likewise.
4526 (struct aarch64_memory_operand): New struct.
4527 (offset_memory_operand): New helper function.
4528 (preindex_memory_operand): Likewise.
4529 (enum aarch64_system_control_registers): New enum.
4530 (ENCODE): New macro.
4531 (emit_insn): New helper function.
4532 (emit_b): New function.
4533 (emit_bcond): Likewise.
4534 (emit_cb): Likewise.
4535 (emit_tb): Likewise.
4536 (emit_blr): Likewise.
4537 (emit_stp): Likewise.
4538 (emit_ldp_q_offset): Likewise.
4539 (emit_stp_q_offset): Likewise.
4540 (emit_load_store): Likewise.
4541 (emit_ldr): Likewise.
4542 (emit_ldrsw): Likewise.
4543 (emit_str): Likewise.
4544 (emit_ldaxr): Likewise.
4545 (emit_stxr): Likewise.
4546 (emit_stlr): Likewise.
4547 (emit_data_processing_reg): Likewise.
4548 (emit_data_processing): Likewise.
4549 (emit_add): Likewise.
4550 (emit_sub): Likewise.
4551 (emit_mov): Likewise.
4552 (emit_movk): Likewise.
4553 (emit_mov_addr): Likewise.
4554 (emit_mrs): Likewise.
4555 (emit_msr): Likewise.
4556 (emit_sevl): Likewise.
4557 (emit_wfe): Likewise.
4558 (append_insns): Likewise.
4559 (can_encode_int32_in): New helper function.
4560 (aarch64_relocate_instruction): New function.
4561 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4562 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4563 (struct linux_target_ops): Install aarch64_get_thread_area,
4564 aarch64_install_fast_tracepoint_jump_pad and
4565 aarch64_get_min_fast_tracepoint_insn_len.
4566
4567 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4568
4569 * Makefile.in (aarch64-insn.o): New rule.
4570 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4571
4572 2015-09-21 Yao Qi <yao.qi@linaro.org>
4573
4574 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4575
4576 2015-09-21 Yao Qi <yao.qi@linaro.org>
4577
4578 * tracepoint.c (max_jump_pad_size): Remove.
4579
4580 2015-09-18 Yao Qi <yao.qi@linaro.org>
4581
4582 * linux-aarch64-low.c: Don't include sys/uio.h.
4583 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4584
4585 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4586
4587 * tracepoint.c (eval_result_type): Change prototype.
4588 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4589
4590 2015-09-15 Pedro Alves <palves@redhat.com>
4591
4592 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4593 Check whether to report exec events instead of checking whether
4594 multiprocess is enabled.
4595
4596 2015-09-15 Pedro Alves <palves@redhat.com>
4597
4598 PR remote/18965
4599 * remote-utils.c (prepare_resume_reply): Merge
4600 TARGET_WAITKIND_VFORK_DONE switch case with the
4601 TARGET_WAITKIND_FORKED case.
4602
4603 2015-09-15 Yao Qi <yao.qi@linaro.org>
4604
4605 * server.c (handle_query): Check string comparison using
4606 "else if" instead of "if".
4607
4608 2015-09-15 Yao Qi <yao.qi@linaro.org>
4609
4610 * server.c (vCont_supported): New global variable.
4611 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4612 matches. Append ";vContSupported+" to own_buf.
4613 (handle_v_requests): Append ";s;S" to own_buf if target supports
4614 hardware single step or vCont_supported is false.
4615 (capture_main): Set vCont_supported to zero.
4616
4617 2015-09-15 Yao Qi <yao.qi@linaro.org>
4618
4619 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4620 it to ...
4621 (linux_supports_hardware_single_step): ... New function.
4622 (linux_target_ops): Update.
4623 * lynx-low.c (lynx_target_ops): Set field
4624 supports_hardware_single_step to target_can_do_hardware_single_step.
4625 * nto-low.c (nto_target_ops): Likewise.
4626 * spu-low.c (spu_target_ops): Likewise.
4627 * win32-low.c (win32_target_ops): Likewise.
4628 * target.c (target_can_do_hardware_single_step): New function.
4629 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4630 Remove. <supports_hardware_single_step>: New field.
4631 (target_supports_conditional_breakpoints): Remove.
4632 (target_supports_hardware_single_step): New macro.
4633 (target_can_do_hardware_single_step): Declare.
4634 * server.c (handle_query): Use target_supports_hardware_single_step
4635 instead of target_supports_conditional_breakpoints.
4636
4637 2015-09-15 Yao Qi <yao.qi@linaro.org>
4638
4639 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4640 function.
4641 (struct linux_target_ops the_low_target): Install
4642 aarch64_linux_siginfo_fixup.
4643
4644 2015-09-11 Don Breazeal <donb@codesourcery.com>
4645 Luis Machado <lgustavo@codesourcery.com>
4646
4647 * linux-low.c (linux_mourn): Static declaration.
4648 (linux_arch_setup): Move in front of
4649 handle_extended_wait.
4650 (linux_arch_setup_thread): New function.
4651 (handle_extended_wait): Handle exec events. Call
4652 linux_arch_setup_thread. Make event_lwp argument a
4653 pointer-to-a-pointer.
4654 (check_zombie_leaders): Do not check stopped threads.
4655 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4656 (linux_low_filter_event): Add lwp and thread for exec'ing
4657 non-leader thread if leader thread has been deleted.
4658 Refactor code into linux_arch_setup_thread and call it.
4659 Pass child lwp pointer by reference to handle_extended_wait.
4660 (linux_wait_for_event_filtered): Update comment.
4661 (linux_wait_1): Prevent clobbering exec event status.
4662 (linux_supports_exec_events): New function.
4663 (linux_target_ops) <supports_exec_events>: Initialize new member.
4664 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4665 new member.
4666 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4667 * server.c (report_exec_events): New global variable.
4668 (handle_query): Handle qSupported query for exec-events feature.
4669 (captured_main): Initialize report_exec_events.
4670 * server.h (report_exec_events): Declare new global variable.
4671 * target.h (struct target_ops) <supports_exec_events>: New
4672 member.
4673 (target_supports_exec_events): New macro.
4674 * win32-low.c (win32_target_ops) <supports_exec_events>:
4675 Initialize new member.
4676
4677 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4678
4679 * linux-low.c (linux_low_enable_btrace): Remove.
4680 (linux_target_ops): Replace linux_low_enable_btrace with
4681 linux_enable_btrace.
4682
4683 2015-09-03 Yao Qi <yao.qi@linaro.org>
4684
4685 * linux-aarch64-low.c (aarch64_insert_point): Call
4686 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4687 returns true.
4688
4689 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4690
4691 * linux-low.c (check_stopped_by_breakpoint): Use
4692 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4693
4694 2015-08-27 Pedro Alves <palves@redhat.com>
4695
4696 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4697
4698 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4699
4700 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4701 the XNEW-family equivalent.
4702 (compile_bytecodes): Likewise.
4703 * dll.c (loaded_dll): Likewise.
4704 * event-loop.c (append_callback_event): Likewise.
4705 (create_file_handler): Likewise.
4706 (create_file_event): Likewise.
4707 * hostio.c (handle_open): Likewise.
4708 * inferiors.c (add_thread): Likewise.
4709 (add_process): Likewise.
4710 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4711 * linux-arm-low.c (arm_new_process): Likewise.
4712 (arm_new_thread): Likewise.
4713 * linux-low.c (add_to_pid_list): Likewise.
4714 (linux_add_process): Likewise.
4715 (handle_extended_wait): Likewise.
4716 (add_lwp): Likewise.
4717 (enqueue_one_deferred_signal): Likewise.
4718 (enqueue_pending_signal): Likewise.
4719 (linux_resume_one_lwp_throw): Likewise.
4720 (linux_resume_one_thread): Likewise.
4721 (linux_read_memory): Likewise.
4722 (linux_write_memory): Likewise.
4723 * linux-mips-low.c (mips_linux_new_process): Likewise.
4724 (mips_linux_new_thread): Likewise.
4725 (mips_add_watchpoint): Likewise.
4726 * linux-x86-low.c (initialize_low_arch): Likewise.
4727 * lynx-low.c (lynx_add_process): Likewise.
4728 * mem-break.c (set_raw_breakpoint_at): Likewise.
4729 (set_breakpoint): Likewise.
4730 (add_condition_to_breakpoint): Likewise.
4731 (add_commands_to_breakpoint): Likewise.
4732 (clone_agent_expr): Likewise.
4733 (clone_one_breakpoint): Likewise.
4734 * regcache.c (new_register_cache): Likewise.
4735 * remote-utils.c (look_up_one_symbol): Likewise.
4736 * server.c (queue_stop_reply): Likewise.
4737 (start_inferior): Likewise.
4738 (queue_stop_reply_callback): Likewise.
4739 (handle_target_event): Likewise.
4740 * spu-low.c (fetch_ppc_memory): Likewise.
4741 (store_ppc_memory): Likewise.
4742 * target.c (set_target_ops): Likewise.
4743 * thread-db.c (thread_db_load_search): Likewise.
4744 (try_thread_db_load_1): Likewise.
4745 * tracepoint.c (add_tracepoint): Likewise.
4746 (add_tracepoint_action): Likewise.
4747 (create_trace_state_variable): Likewise.
4748 (cmd_qtdpsrc): Likewise.
4749 (cmd_qtro): Likewise.
4750 (add_while_stepping_state): Likewise.
4751 * win32-low.c (child_add_thread): Likewise.
4752 (get_image_name): Likewise.
4753
4754 2015-08-25 Yao Qi <yao.qi@linaro.org>
4755
4756 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4757
4758 2015-08-25 Yao Qi <yao.qi@linaro.org>
4759
4760 * Makefile.in (aarch64-linux.o): New rule.
4761 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4762 srv_tgtobj.
4763 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4764 (aarch64_init_debug_reg_state): Make it extern.
4765 (aarch64_linux_prepare_to_resume): Remove.
4766
4767 2015-08-25 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4770 lwp_arch_private_info and ptid_of_lwp.
4771
4772 2015-08-25 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4775 Find proc_info by find_process_pid. All callers updated.
4776
4777 2015-08-25 Yao Qi <yao.qi@linaro.org>
4778
4779 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4780 Remove.
4781 (debug_reg_change_callback): Remove.
4782 (aarch64_notify_debug_reg_change): Remove.
4783
4784 2015-08-25 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4787 Call current_lwp_ptid.
4788
4789 2015-08-25 Yao Qi <yao.qi@linaro.org>
4790
4791 * linux-aarch64-low.c (debug_reg_change_callback): Use
4792 debug_printf.
4793
4794 2015-08-25 Yao Qi <yao.qi@linaro.org>
4795
4796 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4797
4798 2015-08-25 Yao Qi <yao.qi@linaro.org>
4799
4800 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4801
4802 2015-08-25 Yao Qi <yao.qi@linaro.org>
4803
4804 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4805 the code.
4806
4807 2015-08-25 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4810 Remove.
4811 (debug_reg_change_callback): Remove argument entry and add argument
4812 lwp. Remove local variable thread. Don't print thread id in the
4813 debugging output. Don't check whether pid of thread equals to pid.
4814 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4815 iterate_over_lwps instead find_inferior.
4816
4817 2015-08-24 Pedro Alves <palves@redhat.com>
4818
4819 * inferiors.c (get_first_process): New function.
4820 * inferiors.h (get_first_process): New declaration.
4821 * remote-utils.c (read_ptid): Default to the first process in the
4822 list, instead of to the current thread's process.
4823
4824 2015-08-24 Pedro Alves <palves@redhat.com>
4825
4826 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4827 * event-loop.c: Likewise.
4828 * remote-utils.c: Likewise.
4829 * tracepoint.c: Likewise.
4830
4831 2015-08-24 Pedro Alves <palves@redhat.com>
4832
4833 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4834 ptid_get_lwp.
4835
4836 2015-08-21 Pedro Alves <palves@redhat.com>
4837
4838 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4839 instead of literal 1.
4840
4841 2015-08-21 Pedro Alves <palves@redhat.com>
4842
4843 * tdesc.c (default_description): Explicitly zero-initialize.
4844
4845 2015-08-21 Pedro Alves <palves@redhat.com>
4846
4847 PR gdb/18749
4848 * inferiors.c (remove_thread): Discard any pending stop reply for
4849 this thread.
4850 * server.c (remove_all_on_match_pid): Rename to ...
4851 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4852 instead of a pid.
4853 (discard_queued_stop_replies): Change parameter to a ptid. Now
4854 extern.
4855 (handle_v_kill, kill_inferior_callback, captured_main)
4856 (process_serial_event): Adjust.
4857 * server.h (discard_queued_stop_replies): Declare.
4858
4859 2015-08-21 Pedro Alves <palves@redhat.com>
4860
4861 * linux-low.c (wait_for_sigstop): Always switch to no thread
4862 selected if the previously current thread dies.
4863 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4864 process instead of the current thread's.
4865 * remote-utils.c (input_interrupt): Don't check if there's no
4866 current thread.
4867 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4868 current thread to the general thread fails, error out.
4869 (handle_qxfer_auxv, handle_qxfer_libraries)
4870 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4871 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4872 (handle_query): Check if there's a thread selected instead of
4873 checking whether there's any thread in the thread list.
4874 (handle_qxfer_threads, handle_qxfer_btrace)
4875 (handle_qxfer_btrace_conf): Don't error out early if there's no
4876 thread in the thread list.
4877 (handle_v_cont, myresume): Don't set the current thread to the
4878 continue thread.
4879 (process_serial_event) <Hg handling>: Also set thread_id if the
4880 previous general thread is still alive.
4881 (process_serial_event) <g/G handling>: If setting the current
4882 thread to the general thread fails, error out.
4883 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4884 thread's lwp instead of the current thread's.
4885 * target.c (set_desired_thread): If the desired thread was not
4886 found, leave the current thread pointing to NULL. Return an int
4887 (boolean) indicating success.
4888 * target.h (set_desired_thread): Change return type to int.
4889
4890 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4891
4892 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4893 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4894 #includes.
4895 (ps_get_thread_area): New function.
4896
4897 2015-08-19 Gary Benson <gbenson@redhat.com>
4898
4899 * hostio.c (handle_pread): Do not attempt to read more data
4900 than hostio_reply_with_data can fit in a packet.
4901
4902 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4903
4904 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4905
4906 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4907
4908 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4909
4910 2015-08-06 Pedro Alves <palves@redhat.com>
4911
4912 * tracepoint.c (expr_eval_result): Now an int.
4913
4914 2015-08-06 Pedro Alves <palves@redhat.com>
4915
4916 * gdbthread.h (struct regcache): Forward declare.
4917 (struct thread_info) <regcache_data>: Now a struct regcache
4918 pointer.
4919 * inferiors.c (inferior_regcache_data)
4920 (set_inferior_regcache_data): Now work with struct regcache
4921 pointers.
4922 * inferiors.h (struct regcache): Forward declare.
4923 (inferior_regcache_data, set_inferior_regcache_data): Now work
4924 with struct regcache pointers.
4925 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4926 (free_register_cache_thread): Remove struct regcache pointer
4927 casts.
4928
4929 2015-08-06 Pedro Alves <palves@redhat.com>
4930
4931 * server.c (captured_main): On error, print the exception message
4932 to stderr, and if run_once is set, throw a quit.
4933
4934 2015-08-06 Pedro Alves <palves@redhat.com>
4935
4936 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4937 the current thread.
4938
4939 2015-08-06 Pedro Alves <palves@redhat.com>
4940
4941 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4942 reading beyond the passed in buffer length.
4943
4944 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4945
4946 * tracepoint.c (symbol_list) <required>: Remove.
4947
4948 2015-08-06 Pedro Alves <palves@redhat.com>
4949
4950 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4951 count if stopping and suspending threads.
4952 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4953 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4954 (linux_detach): Complete an ongoing step-over.
4955 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4956 throughout.
4957 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4958 (linux_wait_1): If passing a signal to the inferior after
4959 finishing a step-over, unsuspend and re-resume all lwps. If we
4960 see a single-step event but the thread should be continuing, don't
4961 pass the trap to gdb.
4962 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4963 internal_error instead of gdb_assert.
4964 (enqueue_pending_signal): New function.
4965 (check_ptrace_stopped_lwp_gone): Add debug output.
4966 (start_step_over): Use internal_error instead of gdb_assert.
4967 (complete_ongoing_step_over): New function.
4968 (linux_resume_one_thread): Don't resume a suspended thread.
4969 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4970 it stepping.
4971
4972 2015-08-06 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4975 (linux_thread_alive): Use lwp_is_marked_dead.
4976 (extended_event_reported): Delete.
4977 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4978 instead of extended_event_reported.
4979 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4980 as well.
4981 (lwp_is_marked_dead): New function.
4982 (lwp_running): Use lwp_is_marked_dead.
4983 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4984 comment.
4985
4986 2015-08-06 Pedro Alves <palves@redhat.com>
4987
4988 * linux-low.c (linux_wait_1): Move fork event output out of the
4989 !report_to_gdb check. Pass event_child->waitstatus to
4990 target_waitstatus_to_string instead of ourstatus.
4991
4992 2015-08-04 Yao Qi <yao.qi@linaro.org>
4993
4994 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4995 if current_thread is 32 bit.
4996
4997 2015-08-04 Yao Qi <yao.qi@linaro.org>
4998
4999 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5000 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5001 * server.c (extended_protocol): Remove "static".
5002 * server.h (extended_protocol): Declare it.
5003
5004 2015-08-04 Yao Qi <yao.qi@linaro.org>
5005
5006 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5007 both aarch64 and aarch32.
5008 (aarch64_set_pc): Likewise.
5009
5010 2015-08-04 Yao Qi <yao.qi@linaro.org>
5011
5012 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5013 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5014 arm-with-neon.xml to srv_xmlfiles.
5015 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5016 (is_64bit_tdesc): New function.
5017 (aarch64_linux_read_description): New function.
5018 (aarch64_arch_setup): Call aarch64_linux_read_description.
5019 (regs_info): Rename to regs_info_aarch64.
5020 (aarch64_regs_info): Return right regs_info.
5021 (initialize_low_arch): Call initialize_low_arch_aarch32.
5022
5023 2015-08-04 Yao Qi <yao.qi@linaro.org>
5024
5025 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5026 * linux-aarch32-low.c: New file.
5027 * linux-aarch32-low.h: New file.
5028 * linux-arm-low.c (arm_fill_gregset): Move it to
5029 linux-aarch32-low.c.
5030 (arm_store_gregset): Likewise.
5031 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5032 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5033 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5034 (regs_info): Rename to regs_info_arm.
5035 (arm_regs_info): Return regs_info_aarch32 if
5036 have_ptrace_getregset is 1 and target description is
5037 arm_with_neon or arm_with_vfpv3.
5038 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5039 Call initialize_low_arch_aarch32 instead.
5040
5041 2015-08-04 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5044 * linux-low.c: ... here.
5045 * linux-low.h (have_ptrace_getregset): Declare it.
5046
5047 2015-08-04 Pedro Alves <palves@redhat.com>
5048
5049 * thread-db.c (struct thread_db): Use new typedefs.
5050 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5051 CHK calls.
5052 (disable_thread_event_reporting): Cast result of dlsym to
5053 destination function pointer type.
5054 (thread_db_mourn): Use td_ta_delete_ftype.
5055
5056 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5057
5058 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5059 arch variant.
5060 (CDX_BREAKPOINT): Define for R2.
5061 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5062 (the_low_target): Add comments.
5063
5064 2015-07-30 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-arm-low.c (arm_hwcap): Remove it.
5067 (arm_read_description): New local variable arm_hwcap. Don't
5068 set arm_hwcap to zero.
5069
5070 2015-07-30 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5073 Use regcache->tdesc instead.
5074 (arm_store_wmmxregset): Likewise.
5075 (arm_fill_vfpregset): Likewise.
5076 (arm_store_vfpregset): Likewise.
5077
5078 2015-07-30 Yao Qi <yao.qi@linaro.org>
5079
5080 * linux-arm-low.c: Include arch/arm.h.
5081 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5082 (arm_store_gregset): Likewise.
5083
5084 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5085
5086 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5087 ptrace's 4th parameter.
5088
5089 2015-07-27 Yao Qi <yao.qi@linaro.org>
5090
5091 * configure.srv (case aarch64*-*-linux*): Don't set
5092 srv_linux_usrregs.
5093
5094 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5095
5096 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5097 sys/ptrace.h.
5098 * linux-arm-low.c: Likewise.
5099 * linux-cris-low.c: Likewise.
5100 * linux-crisv32-low.c: Likewise.
5101 * linux-low.c: Likewise.
5102 * linux-m68k-low.c: Likewise.
5103 * linux-mips-low.c: Likewise.
5104 * linux-nios2-low.c: Likewise.
5105 * linux-s390-low.c: Likewise.
5106 * linux-sparc-low.c: Likewise.
5107 * linux-tic6x-low.c: Likewise.
5108 * linux-tile-low.c: Likewise.
5109 * linux-x86-low.c: Likewise.
5110
5111 2015-07-24 Pedro Alves <palves@redhat.com>
5112
5113 * config.in: Regenerate.
5114 * configure: Regenerate.
5115
5116 2015-07-24 Pedro Alves <palves@redhat.com>
5117
5118 * acinclude.m4: Include ../ptrace.m4.
5119 * configure.ac: Call GDB_AC_PTRACE.
5120 * config.in, configure: Regenerate.
5121
5122 2015-07-24 Yao Qi <yao.qi@linaro.org>
5123
5124 * linux-low.c (linux_create_inferior): Remove setting to
5125 proc->priv->new_inferior.
5126 (linux_attach): Likewise.
5127 (linux_low_filter_event): Likewise.
5128 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5129
5130 2015-07-24 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-low.c (linux_arch_setup): New function.
5133 (linux_low_filter_event): If proc->tdesc is NULL and
5134 proc->attached is true, call the_low_target.arch_setup.
5135 Otherwise, keep status pending, and return.
5136 (linux_resume_one_lwp_throw): Don't call get_pc if
5137 thread->while_stepping isn't NULL. Don't call
5138 get_thread_regcache if proc->tdesc is NULL.
5139 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5140 (linux_target_ops): Install arch_setup.
5141 * server.c (start_inferior): Call the_target->arch_setup.
5142 * target.h (struct target_ops) <arch_setup>: New field.
5143 (target_arch_setup): New marco.
5144 * lynx-low.c (lynx_target_ops): Update.
5145 * nto-low.c (nto_target_ops): Update.
5146 * spu-low.c (spu_target_ops): Update.
5147 * win32-low.c (win32_target_ops): Update.
5148
5149 2015-07-24 Yao Qi <yao.qi@linaro.org>
5150
5151 * linux-low.c (linux_add_process): Don't set
5152 proc->priv->new_inferior.
5153 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5154 (linux_attach): Likewise.
5155
5156 2015-07-24 Yao Qi <yao.qi@linaro.org>
5157
5158 * server.c (start_inferior): Code refactor.
5159
5160 2015-07-24 Yao Qi <yao.qi@linaro.org>
5161
5162 * server.c (process_serial_event): Set general_thread.
5163
5164 2015-07-21 Yao Qi <yao.qi@linaro.org>
5165
5166 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5167 aarch64_linux_get_debug_reg_capacity.
5168
5169 2015-07-17 Yao Qi <yao.qi@linaro.org>
5170
5171 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5172 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5173 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5174 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5175 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5176 (AARCH64_HWP_ALIGNMENT): Likewise.
5177 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5178 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5179 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5180 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5181 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5182 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5183 (struct aarch64_debug_reg_state): Likewise.
5184 (struct arch_lwp_info): Likewise.
5185 (aarch64_align_watchpoint): Likewise.
5186 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5187 (aarch64_watchpoint_length): Likewise.
5188 (aarch64_point_encode_ctrl_reg): Likewise
5189 (aarch64_point_is_aligned): Likewise.
5190 (aarch64_align_watchpoint): Likewise.
5191 (aarch64_linux_set_debug_regs):
5192 (aarch64_dr_state_insert_one_point): Likewise.
5193 (aarch64_dr_state_remove_one_point): Likewise.
5194 (aarch64_handle_breakpoint): Likewise.
5195 (aarch64_handle_aligned_watchpoint): Likewise.
5196 (aarch64_handle_unaligned_watchpoint): Likewise.
5197 (aarch64_handle_watchpoint): Likewise.
5198
5199 2015-07-17 Yao Qi <yao.qi@linaro.org>
5200
5201 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5202 and don't aarch64_get_debug_reg_state. All callers update.
5203 (aarch64_handle_aligned_watchpoint): Likewise.
5204 (aarch64_handle_unaligned_watchpoint): Likewise.
5205 (aarch64_handle_watchpoint): Likewise.
5206 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5207 (aarch64_remove_point): Likewise.
5208
5209 2015-07-17 Yao Qi <yao.qi@linaro.org>
5210
5211 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5212 debug_printf.
5213 (aarch64_handle_unaligned_watchpoint): Likewise.
5214
5215 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5216
5217 Revert the previous 3 commits:
5218 Move gdb_regex* to common/
5219 Move linux_find_memory_regions_full & co.
5220 gdbserver build-id attribute generator
5221
5222 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5223 Jan Kratochvil <jan.kratochvil@redhat.com>
5224
5225 gdbserver build-id attribute generator.
5226 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5227 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5228 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5229 (find_phdr): New.
5230 (get_dynamic): Use find_pdhr to traverse program headers.
5231 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5232 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5233 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5234 (get_hex_build_id): New.
5235 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5236 to reply XML document.
5237
5238 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5239 Jan Kratochvil <jan.kratochvil@redhat.com>
5240
5241 * target.c: Include target/target-utils.h and fcntl.h.
5242 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5243 (target_fileio_read_stralloc): New functions.
5244
5245 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5246
5247 * Makefile.in (OBS): Add gdb_regex.o.
5248 (gdb_regex.o): New.
5249 * config.in: Rebuilt.
5250 * configure: Rebuilt.
5251
5252 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5253 Jan Kratochvil <jan.kratochvil@redhat.com>
5254
5255 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5256 * Makefile.in (OBS): Add target-utils.o.
5257 (linux-maps.o, target-utils.o): New.
5258 * configure.srv (srv_linux_obj): Add linux-maps.o.
5259
5260 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5261
5262 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5263 function, return 1.
5264 (the_low_target): Install it.
5265
5266 2015-07-14 Pedro Alves <palves@redhat.com>
5267
5268 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5269 Instead, ignore ECHILD, and throw an error for other errnos.
5270
5271 2015-07-10 Pedro Alves <palves@redhat.com>
5272
5273 * event-loop.c (struct callback_event) <data>: Change type to
5274 gdb_client_data instance instead of gdb_client_data pointer.
5275 (append_callback_event): Adjust.
5276
5277 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5278
5279 * linux-aarch64-low.c: Add comments for each linux_target_ops
5280 method. Remove comments already covered in target_ops and
5281 linux_target_ops definitions.
5282 (the_low_target): Add comments for each unimplemented method.
5283
5284 2015-07-09 Yao Qi <yao.qi@linaro.org>
5285
5286 * linux-aarch64-low.c (aarch64_regmap): Remove.
5287 (aarch64_usrregs_info): Remove.
5288 (regs_info): Set field usrregs to NULL.
5289
5290 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5291
5292 * linux-low.c: Include "rsp-low.h"
5293 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5294 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5295 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5296 (handle_btrace_enable_pt): New.
5297 (handle_btrace_general_set): Support "pt".
5298 (handle_btrace_conf_general_set): Support "pt:size".
5299
5300 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5301
5302 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5303 Z_PACKET_SW_BP.
5304
5305 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5306
5307 * linux-aarch64-low.c: Remove comment about endianness.
5308 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5309 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5310 memcmp.
5311
5312 2015-06-24 Gary Benson <gbenson@redhat.com>
5313
5314 * linux-i386-ipa.c (stdint.h): Do not include.
5315 * lynx-i386-low.c (stdint.h): Likewise.
5316 * lynx-ppc-low.c (stdint.h): Likewise.
5317 * mem-break.c (stdint.h): Likewise.
5318 * thread-db.c (stdint.h): Likewise.
5319 * tracepoint.c (stdint.h): Likewise.
5320 * win32-low.c (stdint.h): Likewise.
5321
5322 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5323
5324 * server.c (write_qxfer_response): Update call to
5325 remote_escape_output.
5326
5327 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5328 Jan Kratochvil <jan.kratochvil@redhat.com>
5329
5330 Merge multiple hex conversions.
5331 * gdbreplay.c (tohex): Rename to 'fromhex'.
5332 (logchar): Use fromhex.
5333
5334 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5335
5336 * server.c (handle_qxfer_libraries): Set `version' attribute for
5337 <library-list>.
5338
5339 2015-06-10 Gary Benson <gbenson@redhat.com>
5340
5341 * target.h (struct target_ops) <multifs_open>: New field.
5342 <multifs_unlink>: Likewise.
5343 <multifs_readlink>: Likewise.
5344 * linux-low.c (nat/linux-namespaces.h): New include.
5345 (linux_target_ops): Initialize the_target->multifs_open,
5346 the_target->multifs_unlink and the_target->multifs_readlink.
5347 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5348 * hostio.c (hostio_fs_pid): New static variable.
5349 (hostio_handle_new_gdb_connection): New function.
5350 (handle_setfs): Likewise.
5351 (handle_open): Use the_target->multifs_open as appropriate.
5352 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5353 (handle_readlink): Use the_target->multifs_readlink as
5354 appropriate.
5355 (handle_vFile): Handle vFile:setfs packets.
5356 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5357 after target_handle_new_gdb_connection.
5358
5359 2015-06-10 Gary Benson <gbenson@redhat.com>
5360
5361 * configure.ac (AC_CHECK_FUNCS): Add setns.
5362 * config.in: Regenerate.
5363 * configure: Likewise.
5364 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5365 (linux-namespaces.o): New rule.
5366 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5367
5368 2015-06-09 Gary Benson <gbenson@redhat.com>
5369
5370 * hostio.c (handle_open): Process mode argument with
5371 fileio_to_host_mode.
5372
5373 2015-06-01 Yao Qi <yao.qi@linaro.org>
5374
5375 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5376 * linux-x86-low.c: Likewise.
5377
5378 2015-05-28 Don Breazeal <donb@codesourcery.com>
5379
5380 * linux-low.c (handle_extended_wait): Initialize
5381 thread_info.last_resume_kind for new fork children.
5382
5383 2015-05-15 Pedro Alves <palves@redhat.com>
5384
5385 * target.h (target_handle_new_gdb_connection): Rewrite using if
5386 wrapped in do/while.
5387
5388 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5389
5390 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5391 * configure, config.in: Regenerate.
5392 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5393 Declare typedef.
5394
5395 2015-05-12 Don Breazeal <donb@codesourcery.com>
5396
5397 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5398 PTRACE_EVENT_VFORK_DONE.
5399 (linux_low_ptrace_options, extended_event_reported): Add vfork
5400 events.
5401 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5402 and "vforkdone" for RSP 'T' Stop Reply Packet.
5403 * server.h (report_vfork_events): Declare
5404 global variable.
5405
5406 2015-05-12 Don Breazeal <donb@codesourcery.com>
5407
5408 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5409 (the_low_target) <new_fork>: Initialize new member.
5410 * linux-arm-low.c (arm_new_fork): New function.
5411 (the_low_target) <new_fork>: Initialize new member.
5412 * linux-low.c (handle_extended_wait): Call new target function
5413 new_fork.
5414 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5415 * linux-mips-low.c (mips_add_watchpoint): New function
5416 extracted from mips_insert_point.
5417 (the_low_target) <new_fork>: Initialize new member.
5418 (mips_linux_new_fork): New function.
5419 (mips_insert_point): Call mips_add_watchpoint.
5420 * linux-x86-low.c (x86_linux_new_fork): New function.
5421 (the_low_target) <new_fork>: Initialize new member.
5422
5423 2015-05-12 Don Breazeal <donb@codesourcery.com>
5424
5425 * linux-low.c (handle_extended_wait): Implement return value,
5426 rename argument 'event_child' to 'event_lwp', handle
5427 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5428 (linux_low_ptrace_options): New function.
5429 (linux_low_filter_event): Call linux_low_ptrace_options,
5430 use different argument fo linux_enable_event_reporting,
5431 use return value from handle_extended_wait.
5432 (extended_event_reported): New function.
5433 (linux_wait_1): Call extended_event_reported and set
5434 status to report fork events.
5435 (linux_write_memory): Add pid to debug message.
5436 (reset_lwp_ptrace_options_callback): New function.
5437 (linux_handle_new_gdb_connection): New function.
5438 (linux_target_ops): Initialize new structure member.
5439 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5440 * lynx-low.c: Initialize new structure member.
5441 * remote-utils.c (prepare_resume_reply): Implement stop reason
5442 "fork" for "T" stop message.
5443 * server.c (handle_query): Call handle_new_gdb_connection.
5444 * server.h (report_fork_events): Declare global flag.
5445 * target.h (struct target_ops) <handle_new_gdb_connection>:
5446 New member.
5447 (target_handle_new_gdb_connection): New macro.
5448 * win32-low.c: Initialize new structure member.
5449
5450 2015-05-12 Don Breazeal <donb@codesourcery.com>
5451
5452 * mem-break.c (APPEND_TO_LIST): Define macro.
5453 (clone_agent_expr): New function.
5454 (clone_one_breakpoint): New function.
5455 (clone_all_breakpoints): New function.
5456 * mem-break.h: Declare new functions.
5457
5458 2015-05-12 Don Breazeal <donb@codesourcery.com>
5459
5460 * linux-low.c (linux_supports_fork_events): New function.
5461 (linux_supports_vfork_events): New function.
5462 (linux_target_ops): Initialize new structure members.
5463 (initialize_low): Call linux_check_ptrace_features.
5464 * lynx-low.c (lynx_target_ops): Initialize new structure
5465 members.
5466 * server.c (report_fork_events, report_vfork_events):
5467 New global flags.
5468 (handle_query): Add new features to qSupported packet and
5469 response.
5470 (captured_main): Initialize new global variables.
5471 * target.h (struct target_ops) <supports_fork_events>:
5472 New member.
5473 <supports_vfork_events>: New member.
5474 (target_supports_fork_events): New macro.
5475 (target_supports_vfork_events): New macro.
5476 * win32-low.c (win32_target_ops): Initialize new structure
5477 members.
5478
5479 2015-05-12 Gary Benson <gbenson@redhat.com>
5480
5481 * server.c (handle_qxfer_exec_file): Use current process
5482 if annex is empty.
5483
5484 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5485
5486 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5487 Remove HAVE_PTRACE_GETREGS conditionals.
5488 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5489 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5490
5491 2015-05-08 Yao Qi <yao.qi@linaro.org>
5492
5493 * linux-low.c (linux_supports_conditional_breakpoints): New
5494 function.
5495 (linux_target_ops): Install new target method.
5496 * lynx-low.c (lynx_target_ops): Install NULL hook for
5497 supports_conditional_breakpoints.
5498 * nto-low.c (nto_target_ops): Likewise.
5499 * spu-low.c (spu_target_ops): Likewise.
5500 * win32-low.c (win32_target_ops): Likewise.
5501 * server.c (handle_query): Check
5502 target_supports_conditional_breakpoints.
5503 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5504 New field.
5505 (target_supports_conditional_breakpoints): New macro.
5506
5507 2015-05-06 Pedro Alves <palves@redhat.com>
5508
5509 PR server/18081
5510 * server.c (start_inferior): If the process exits, mourn it.
5511
5512 2015-04-21 Gary Benson <gbenson@redhat.com>
5513
5514 * hostio.c (fileio_open_flags_to_host): Factored out to
5515 fileio_to_host_openflags in common/fileio.c. Single use
5516 updated.
5517
5518 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5519
5520 * linux-xtensa-low.c (xtensa_fill_gregset)
5521 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5522 XCHAL_HAVE_LOOP.
5523
5524 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5525
5526 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5527 (regs_info): Replace usrregs pointer with NULL.
5528
5529 2015-04-17 Gary Benson <gbenson@redhat.com>
5530
5531 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5532 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5533 * server.c (handle_qxfer_exec_file): New function.
5534 (qxfer_packets): Add exec-file entry.
5535 (handle_query): Report qXfer:exec-file:read as supported packet.
5536
5537 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5538
5539 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5540
5541 2015-04-09 Gary Benson <gbenson@redhat.com>
5542
5543 * hostio-errno.c (errno_to_fileio_error): Remove function.
5544 Update caller to use remote_fileio_to_fio_error.
5545
5546 2015-04-09 Yao Qi <yao.qi@linaro.org>
5547
5548 * linux-low.c (linux_insert_point): Call
5549 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5550 (linux_remove_point): Call remove_memory_breakpoint if type is
5551 raw_bkpt_type_sw.
5552 * linux-x86-low.c (x86_insert_point): Don't call
5553 insert_memory_breakpoint.
5554 (x86_remove_point): Don't call remove_memory_breakpoint.
5555
5556 2015-04-01 Pedro Alves <palves@redhat.com>
5557 Cleber Rosa <crosa@redhat.com>
5558
5559 * server.c (gdbserver_usage): Reorganize and extend the usage
5560 message.
5561
5562 2015-03-24 Pedro Alves <palves@redhat.com>
5563
5564 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5565 output. Also dump TRAP_TRACE.
5566 (linux_low_filter_event): In debug output, distinguish a
5567 resume_stop SIGSTOP from a delayed SIGSTOP.
5568
5569 2015-03-24 Gary Benson <gbenson@redhat.com>
5570
5571 * linux-x86-low.c (x86_linux_new_thread): Moved to
5572 nat/x86-linux.c.
5573 (x86_linux_prepare_to_resume): Likewise.
5574
5575 2015-03-24 Gary Benson <gbenson@redhat.com>
5576
5577 * Makefile.in (x86-linux-dregs.o): New rule.
5578 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5579 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5580 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5581 (x86_linux_dr_get): Likewise.
5582 (x86_linux_dr_set): Likewise.
5583 (update_debug_registers_callback): Likewise.
5584 (x86_linux_dr_set_addr): Likewise.
5585 (x86_linux_dr_get_addr): Likewise.
5586 (x86_linux_dr_set_control): Likewise.
5587 (x86_linux_dr_get_control): Likewise.
5588 (x86_linux_dr_get_status): Likewise.
5589 (x86_linux_update_debug_registers): Likewise.
5590
5591 2015-03-24 Gary Benson <gbenson@redhat.com>
5592
5593 * linux-x86-low.c (x86_linux_update_debug_registers):
5594 New function, factored out from...
5595 (x86_linux_prepare_to_resume): ...this.
5596
5597 2015-03-24 Gary Benson <gbenson@redhat.com>
5598
5599 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5600 (x86_linux_dr_set): Likewise.
5601 (update_debug_registers_callback): Likewise.
5602 (x86_linux_dr_set_addr): Likewise.
5603 (x86_linux_dr_get_addr): Likewise.
5604 (x86_linux_dr_set_control): Likewise.
5605 (x86_linux_dr_get_control): Likewise.
5606 (x86_linux_dr_get_status): Likewise.
5607 (x86_linux_prepare_to_resume): Likewise.
5608
5609 2015-03-24 Gary Benson <gbenson@redhat.com>
5610
5611 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5612 Use perror_with_name. Pass string through gettext.
5613 (x86_linux_dr_set): Likewise.
5614
5615 2015-03-24 Gary Benson <gbenson@redhat.com>
5616
5617 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5618 (x86_linux_dr_set_addr): ...this.
5619 (x86_dr_low_get_addr): Rename to...
5620 (x86_linux_dr_get_addr): ...this.
5621 (x86_dr_low_set_control): Rename to...
5622 (x86_linux_dr_set_control): ...this.
5623 (x86_dr_low_get_control): Rename to...
5624 (x86_linux_dr_get_control): ...this.
5625 (x86_dr_low_get_status): Rename to...
5626 (x86_linux_dr_get_status): ...this.
5627 (x86_dr_low): Update with new function names.
5628
5629 2015-03-24 Gary Benson <gbenson@redhat.com>
5630
5631 * Makefile.in (x86-linux.o): New rule.
5632 * configure.srv: Add x86-linux.o to relevant targets.
5633 * linux-low.c (lwp_set_arch_private_info): New function.
5634 (lwp_arch_private_info): Likewise.
5635 * linux-x86-low.c: Include nat/x86-linux.h.
5636 (arch_lwp_info): Removed structure.
5637 (update_debug_registers_callback):
5638 Use lwp_set_debug_registers_changed.
5639 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5640 and lwp_set_debug_registers_changed.
5641 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5642
5643 2015-03-24 Gary Benson <gbenson@redhat.com>
5644
5645 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5646 * linux-arm-low.c (arm_new_thread): Likewise.
5647 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5648 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5649 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5650 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5651
5652 2015-03-24 Gary Benson <gbenson@redhat.com>
5653
5654 * linux-low.c (ptid_of_lwp): New function.
5655 (lwp_is_stopped): Likewise.
5656 (lwp_stop_reason): Likewise.
5657 * linux-x86-low.c (update_debug_registers_callback):
5658 Use lwp_is_stopped.
5659 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5660 lwp_stop_reason.
5661
5662 2015-03-24 Gary Benson <gbenson@redhat.com>
5663
5664 * linux-low.h (linux_stop_lwp): Remove declaration.
5665
5666 2015-03-24 Gary Benson <gbenson@redhat.com>
5667
5668 * linux-low.h: Include nat/linux-nat.h.
5669 * linux-low.c (iterate_over_lwps_args): New structure.
5670 (iterate_over_lwps_filter): New function.
5671 (iterate_over_lwps): Likewise.
5672 * linux-x86-low.c (update_debug_registers_callback):
5673 Update signature to what iterate_over_lwps expects.
5674 Remove PID check that iterate_over_lwps now performs.
5675 (x86_dr_low_set_addr): Use iterate_over_lwps.
5676 (x86_dr_low_set_control): Likewise.
5677
5678 2015-03-24 Gary Benson <gbenson@redhat.com>
5679
5680 * linux-x86-low.c (x86_debug_reg_state): New function.
5681 (x86_linux_prepare_to_resume): Use the above.
5682
5683 2015-03-24 Gary Benson <gbenson@redhat.com>
5684
5685 * linux-low.c (current_lwp_ptid): New function.
5686 * linux-x86-low.c: Include nat/linux-nat.h.
5687 (x86_dr_low_get_addr): Use current_lwp_ptid.
5688 (x86_dr_low_get_control): Likewise.
5689 (x86_dr_low_get_status): Likewise.
5690
5691 2015-03-20 Pedro Alves <palves@redhat.com>
5692
5693 * tracepoint.c (cmd_qtstatus): Make "str" const.
5694
5695 2015-03-20 Pedro Alves <palves@redhat.com>
5696
5697 * server.c (handle_general_set): Make "req_str" const.
5698
5699 2015-03-19 Pedro Alves <palves@redhat.com>
5700
5701 * linux-low.c (linux_resume_one_lwp): Rename to ...
5702 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5703 instead call perror_with_name.
5704 (check_ptrace_stopped_lwp_gone): New function.
5705 (linux_resume_one_lwp): Reimplement as wrapper around
5706 linux_resume_one_lwp_throw that swallows errors if the LWP is
5707 gone.
5708
5709 2015-03-19 Pedro Alves <palves@redhat.com>
5710
5711 * linux-low.c (count_events_callback, select_event_lwp_callback):
5712 No longer check whether the thread has resume_stop as last resume
5713 kind.
5714
5715 2015-03-19 Pedro Alves <palves@redhat.com>
5716
5717 * linux-low.c (count_events_callback, select_event_lwp_callback):
5718 Use the lwp's status_pending_p field, not the thread's.
5719
5720 2015-03-19 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (select_event_lwp_callback): Update comments to
5723 no longer mention SIGTRAP.
5724
5725 2015-03-18 Gary Benson <gbenson@redhat.com>
5726
5727 * server.c (handle_query): Do not report vFile:fstat as supported.
5728
5729 2015-03-11 Gary Benson <gbenson@redhat.com>
5730
5731 * hostio.c (sys/types.h): New include.
5732 (sys/stat.h): Likewise.
5733 (common-remote-fileio.h): Likewise.
5734 (handle_fstat): New function.
5735 (handle_vFile): Handle vFile:fstat packets.
5736
5737 2015-03-11 Gary Benson <gbenson@redhat.com>
5738
5739 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5740 struct stat.st_blocks and struct stat.st_blksize.
5741 * configure: Regenerate.
5742 * config.in: Likewise.
5743 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5744 (OBS): Add common-remote-fileio.o.
5745 (common-remote-fileio.o): New rule.
5746
5747 2015-03-09 Pedro Alves <palves@redhat.com>
5748
5749 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5750 'struct sockaddr' pointer in 'accept' call.
5751
5752 2015-03-09 Pedro Alves <palves@redhat.com>
5753
5754 Revert:
5755 2015-03-07 Pedro Alves <palves@redhat.com>
5756 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5757 or <winsock2.h> here. Instead include "gdb_socket.h".
5758 (remote_open): Use union gdb_sockaddr_u.
5759 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5760 or <winsock2.h> here. Instead include "gdb_socket.h".
5761 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5762 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5763 or <sys/un.h>.
5764 (init_named_socket, gdb_agent_helper_thread): Use union
5765 gdb_sockaddr_u.
5766
5767 2015-03-07 Pedro Alves <palves@redhat.com>
5768
5769 * configure.ac (build_warnings): Move
5770 -Wdeclaration-after-statement to the C-specific set.
5771 * configure: Regenerate.
5772
5773 2015-03-07 Pedro Alves <palves@redhat.com>
5774
5775 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5776 or <winsock2.h> here. Instead include "gdb_socket.h".
5777 (remote_open): Use union gdb_sockaddr_u.
5778 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5779 or <winsock2.h> here. Instead include "gdb_socket.h".
5780 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5781 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5782 or <sys/un.h>.
5783 (init_named_socket, gdb_agent_helper_thread): Use union
5784 gdb_sockaddr_u.
5785
5786 2015-03-07 Pedro Alves <palves@redhat.com>
5787
5788 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5789 instead.
5790
5791 2015-03-06 Yao Qi <yao.qi@linaro.org>
5792
5793 * linux-aarch64-low.c (aarch64_insert_point): Use
5794 show_debug_regs as a boolean.
5795 (aarch64_remove_point): Likewise.
5796
5797 2015-03-05 Pedro Alves <palves@redhat.com>
5798
5799 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5800 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5801 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5802 * nto-low.c (nto_target_ops): Likewise.
5803 * spu-low.c (spu_target_ops): Likewise.
5804 * win32-low.c (win32_target_ops): Likewise.
5805
5806 2015-03-04 Pedro Alves <palves@redhat.com>
5807
5808 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5809 Decide whether a breakpoint triggered based on the SIGTRAP's
5810 siginfo.si_code.
5811 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5812 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5813 (linux_low_filter_event): Check for breakpoints before checking
5814 watchpoints.
5815 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5816 siginfo.si_code.
5817 (linux_stopped_by_sw_breakpoint)
5818 (linux_supports_stopped_by_sw_breakpoint)
5819 (linux_stopped_by_hw_breakpoint)
5820 (linux_supports_stopped_by_hw_breakpoint): New functions.
5821 (linux_target_ops): Install new target methods.
5822
5823 2015-03-04 Pedro Alves <palves@redhat.com>
5824
5825 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5826 * server.c (swbreak_feature, hwbreak_feature): New globals.
5827 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5828 (captured_main): Clear swbreak_feature and hwbreak_feature.
5829 * server.h (swbreak_feature, hwbreak_feature): Declare.
5830 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5831 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5832 supports_stopped_by_hw_breakpoint>: New fields.
5833 (target_supports_stopped_by_sw_breakpoint)
5834 (target_stopped_by_sw_breakpoint)
5835 (target_supports_stopped_by_hw_breakpoint)
5836 (target_stopped_by_hw_breakpoint): Declare.
5837
5838 2015-03-04 Pedro Alves <palves@redhat.com>
5839
5840 enum lwp_stop_reason -> enum target_stop_reason
5841 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5842 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5843 (linux_wait_1, stuck_in_jump_pad_callback)
5844 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5845 (linux_stopped_by_watchpoint):
5846 * linux-low.h (enum lwp_stop_reason): Delete.
5847 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5848 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5849
5850 2015-03-04 Yao Qi <yao.qi@linaro.org>
5851
5852 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5853
5854 2015-03-03 Gary Benson <gbenson@redhat.com>
5855
5856 * hostio.c (handle_vFile): Fix prefix lengths.
5857
5858 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5859
5860 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5861 ptr_bits.
5862
5863 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5864
5865 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5866 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5867 (clean): Add "rm -f" for above C files.
5868 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5869 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5870 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5871 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5872 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5873 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5874 (init_registers_s390x_vx_linux64)
5875 (init_registers_s390x_tevx_linux64)
5876 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5877 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5878 declarations.
5879 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5880 (s390_store_vxrs_high): New functions.
5881 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5882 NT_S390_VXRS_HIGH.
5883 (s390_arch_setup): Add logic for selecting one of the new target
5884 descriptions. Activate the new vector regsets if applicable.
5885 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5886 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5887 and init_registers_s390x_tevx_linux64.
5888
5889 2015-03-01 Pedro Alves <palves@redhat.com>
5890
5891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5892 parameter.
5893
5894 2015-02-27 Pedro Alves <palves@redhat.com>
5895
5896 * linux-x86-low.c (u_debugreg_offset): New function.
5897 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5898
5899 2015-02-27 Pedro Alves <palves@redhat.com>
5900
5901 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5902 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5903 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5904 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5905 (ps_lsetfpregs, ps_getpid)
5906 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5907 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5908 (ps_lsetxregs, ps_plog): Declare.
5909
5910 2015-02-27 Pedro Alves <palves@redhat.com>
5911
5912 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5913 IP_AGENT_EXPORT_FUNC.
5914 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5915 IP_AGENT_EXPORT_FUNC.
5916 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5917 (IP_AGENT_EXPORT): Delete.
5918 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5919 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5920 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5921 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5922 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5923 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5924 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5925 (traceframe_read_count, traceframe_write_count)
5926 (traceframes_created, trace_state_variables, get_raw_reg)
5927 (get_trace_state_variable_value, set_trace_state_variable_value)
5928 (ust_loaded, helper_thread_id, cmd_buf): Use
5929 IPA_SYM_EXPORTED_NAME.
5930 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5931 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5932 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5933 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5934 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5935 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5936 EXTERN_C_PUSH/EXTERN_C_POP.
5937 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5938 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5939 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5940 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5941 (traceframe_write_count, traceframe_read_count)
5942 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5943 (about_to_request_buffer_space, get_trace_state_variable_value)
5944 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5945 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5946 EXTERN_C_PUSH/EXTERN_C_POP.
5947 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5948 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5949 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5950 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5951 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5952 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5953 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5954 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5955 Define.
5956 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5957 (IP_AGENT_EXPORT_VAR_DECL): Define.
5958 (tracing): Declare.
5959 (gdb_agent_get_raw_reg): Declare.
5960
5961 2015-02-27 Tom Tromey <tromey@redhat.com>
5962 Pedro Alves <palves@redhat.com>
5963
5964 Rename symbols whose names are reserved C++ keywords throughout.
5965
5966 2015-02-27 Pedro Alves <palves@redhat.com>
5967
5968 * Makefile.in (COMPILER): New, get it from autoconf.
5969 (CXX): Get from autoconf instead.
5970 (COMPILE.pre): Use COMPILER.
5971 (CC-LD): Rename to ...
5972 (CC_LD): ... this. Use COMPILER.
5973 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5974 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5975 * acinclude.m4: Include build-with-cxx.m4.
5976 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5977 Disable -Werror by default if building in C++ mode.
5978 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5979 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5980 the C++ compiler. Save/restore CXXFLAGS too.
5981 * configure: Regenerate.
5982
5983 2015-02-27 Pedro Alves <palves@redhat.com>
5984
5985 * acinclude.m4: Include libiberty.m4.
5986 * configure.ac: Call libiberty_INIT.
5987 * config.in, configure: Regenerate.
5988
5989 2015-02-26 Pedro Alves <palves@redhat.com>
5990
5991 * linux-low.c (linux_wait_1): When incrementing the PC past a
5992 program breakpoint always use the_low_target.breakpoint_len as
5993 increment, rather than the maximum between that and
5994 the_low_target.decr_pc_after_break.
5995
5996 2015-02-23 Pedro Alves <palves@redhat.com>
5997
5998 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5999 thread was doing a step-over; always adjust the PC if
6000 we stepped over a permanent breakpoint.
6001 (linux_wait_1): If we stepped over breakpoint that was on top of a
6002 permanent breakpoint, manually advance the PC past it.
6003
6004 2015-02-23 Pedro Alves <palves@redhat.com>
6005
6006 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6007 modes.
6008 (x86_fill_gregset, x86_store_gregset): Use it when handling
6009 $orig_eax.
6010
6011 2015-02-20 Pedro Alves <palves@redhat.com>
6012
6013 * thread-db.c: Include "nat/linux-procfs.h".
6014 (thread_db_init): Skip listing new threads if the kernel supports
6015 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6016
6017 2015-02-20 Pedro Alves <palves@redhat.com>
6018
6019 * linux-low.c (status_pending_p_callback): Use ptid_match.
6020
6021 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6022
6023 PR breakpoints/16812
6024 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6025 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6026 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6027
6028 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6029
6030 PR breakpoints/15956
6031 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6032
6033 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6034
6035 * linux-low.c (linux_low_btrace_conf): Print size.
6036 * server.c (handle_btrace_conf_general_set): New.
6037 (hanle_general_set): Call handle_btrace_conf_general_set.
6038 (handle_query): Report Qbtrace-conf:bts:size as supported.
6039
6040 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6041
6042 * linux-low.c (linux_low_enable_btrace): Update parameters.
6043 (linux_low_btrace_conf): New.
6044 (linux_target_ops)<to_btrace_conf>: Initialize.
6045 * server.c (current_btrace_conf): New.
6046 (handle_btrace_enable): Rename to ...
6047 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6048 to target_enable_btrace. Update comment. Update users.
6049 (handle_qxfer_btrace_conf): New.
6050 (qxfer_packets): Add btrace-conf entry.
6051 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6052 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6053 (target_ops)<read_btrace_conf>: New.
6054 (target_enable_btrace): Update parameters.
6055 (target_read_btrace_conf): New.
6056
6057 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6058
6059 * server.c (handle_btrace_general_set): Remove call to
6060 target_supports_btrace.
6061 (supported_btrace_packets): New.
6062 (handle_query): Call supported_btrace_packets.
6063 * target.h: include btrace-common.h.
6064 (btrace_target_info): Removed.
6065 (supports_btrace, target_supports_btrace): Update parameters.
6066
6067 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6068
6069 * Makefile.in (SFILES): Add common/btrace-common.c.
6070 (OBS): Add common/btrace-common.o.
6071 (btrace-common.o): Add build rules.
6072 * linux-low: Include btrace-common.h.
6073 (linux_low_read_btrace): Use struct btrace_data. Call
6074 btrace_data_init and btrace_data_fini.
6075
6076 2015-02-06 Pedro Alves <palves@redhat.com>
6077
6078 * thread-db.c (find_new_threads_callback): Add debug output.
6079
6080 2015-02-04 Pedro Alves <palves@redhat.com>
6081
6082 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6083 (resume_stopped_resumed_lwps): New function.
6084 (linux_wait_for_event_filtered): Use it.
6085
6086 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6087
6088 * Makefile.in (SFILES): Add linux-personality.c.
6089 (linux-personality.o): New rule.
6090 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6091 list of objects to be built.
6092 * linux-low.c: Include nat/linux-personality.h.
6093 (linux_create_inferior): Remove code to disable address space
6094 randomization (moved to ../nat/linux-personality.c). Create
6095 cleanup to disable address space randomization.
6096
6097 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6098
6099 * Makefile.in (posix-strerror.o): New rule.
6100 (mingw-strerror.o): Likewise.
6101 * configure: Regenerated.
6102 * configure.ac: Source file ../common/common.host. Initialize new
6103 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6104
6105 2015-01-14 Yao Qi <yao@codesourcery.com>
6106
6107 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6108 (ppc-linux.o): New rule.
6109 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6110 * configure.ac: AC_CHECK_FUNCS(getauxval).
6111 * config.in: Re-generated.
6112 * configure: Re-generated.
6113 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6114 ppc64_64bit_inferior_p
6115
6116 2015-01-14 Yao Qi <yao@codesourcery.com>
6117
6118 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6119 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6120 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6121 (PT_ORIG_R3, PT_TRAP): Likewise.
6122 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6123 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6124 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6125
6126 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6127
6128 * i387-fp.c (i387_cache_to_xsave): In look over
6129 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6130 zmmh_low_space field by use of zmmh_high_space.
6131
6132 2015-01-09 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (step_over_bkpt): Move higher up in the file.
6135 (handle_extended_wait): Don't store the stop_pc here.
6136 (get_stop_pc): Adjust comments and rename to ...
6137 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6138 stopped for a software breakpoint or hardware breakpoint.
6139 (thread_still_has_status_pending_p): New function.
6140 (status_pending_p_callback): Use
6141 thread_still_has_status_pending_p. If the event is no longer
6142 interesting, resume the LWP.
6143 (handle_tracepoints): Add assert.
6144 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6145 (wstatus_maybe_breakpoint): New function.
6146 (cancel_breakpoint): Delete function.
6147 (check_stopped_by_watchpoint): New function, factored out from
6148 linux_low_filter_event.
6149 (lp_status_maybe_breakpoint): Delete function.
6150 (linux_low_filter_event): Remove filter_ptid argument.
6151 Leave thread group exits pending here. Store the LWP's stop PC.
6152 Always leave events pending.
6153 (linux_wait_for_event_filtered): Pull all events out of the
6154 kernel, and leave them all pending.
6155 (count_events_callback, select_event_lwp_callback): Consider all
6156 events.
6157 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6158 (select_event_lwp): Only give preference to the stepping LWP in
6159 all-stop mode. Adjust comments.
6160 (ignore_event): New function.
6161 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6162 references to cancel_breakpoints. Adjust to renames. Also give
6163 equal priority to all LWPs that have had events in non-stop mode.
6164 If reporting a software breakpoint event, unadjust the LWP's PC.
6165 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6166 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6167 Adjust.
6168 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6169 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6170 (linux_stopped_by_watchpoint): Adjust.
6171 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6172 * linux-low.h (enum lwp_stop_reason): New.
6173 (struct lwp_info) <stop_pc>: Adjust comment.
6174 <stopped_by_watchpoint>: Delete field.
6175 <stop_reason>: New field.
6176 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6177 * mem-break.c (software_breakpoint_inserted_here)
6178 (hardware_breakpoint_inserted_here): New function.
6179 * mem-break.h (software_breakpoint_inserted_here)
6180 (hardware_breakpoint_inserted_here): Declare.
6181 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6182 (cancel_breakpoints): Delete.
6183 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6184 (upload_fast_traceframes): Remove references to
6185 cancel_breakpoints.
6186
6187 2015-01-09 Pedro Alves <palves@redhat.com>
6188
6189 * thread-db.c (find_new_threads_callback): Ignore thread if the
6190 kernel thread ID is -1.
6191
6192 2015-01-09 Pedro Alves <palves@redhat.com>
6193
6194 * linux-low.c (linux_attach_fail_reason_string): Move to
6195 nat/linux-ptrace.c, and rename.
6196 (linux_attach_lwp): Update comment.
6197 (attach_proc_task_lwp_callback): New function.
6198 (linux_attach): Adjust to rename and use
6199 linux_proc_attach_tgid_threads.
6200 (linux_attach_fail_reason_string): Delete declaration.
6201
6202 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6203
6204 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6205 * server.c (gdbserver_version): Likewise.
6206
6207 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6208
6209 * remote-utils.c: Include ctype.h.
6210 (input_interrupt): Explicitly handle the case when the char
6211 received is the NUL byte. Improve the printing of non-ASCII
6212 characters.
6213
6214 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6215
6216 * linux-low.c (linux_low_filter_event): Update call to
6217 linux_enable_event_reporting following the addition of
6218 a new parameter to that function.
6219
6220 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6221
6222 PR server/17457
6223 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6224 (AARCH64_FPCR_REGNO): Likewise.
6225 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6226 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6227 (aarch64_store_fpregset): Likewise.
6228
6229 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6230
6231 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6232 Remove FIXME comment about assumption about N.
6233
6234 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6235
6236 * configure.ac: If large-file support is disabled in GDBserver,
6237 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6238 * configure: Regenerate.
6239
6240 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6241
6242 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6243 warning upon ENODATA from ptrace.
6244 * linux-s390-low.c (s390_store_tdb): New.
6245 (s390_regsets): Add regset for NT_S390_TDB.
6246
6247 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6248
6249 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6250 without a fill_function.
6251 * linux-s390-low.c (s390_fill_last_break): Remove.
6252 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6253 (s390_arch_setup): Use regset's size instead of fill_function for
6254 loop end condition.
6255
6256 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6257
6258 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6259 the regset's store function when ptrace returned an error.
6260 * regcache.c (get_thread_regcache): Invalidate register cache
6261 before fetching inferior's registers.
6262
6263 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6264
6265 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6266 while-loop as for-loop.
6267 (regsets_store_inferior_registers): Likewise.
6268
6269 2014-11-28 Yao Qi <yao@codesourcery.com>
6270
6271 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6272 * config.in, configure: Re-generate.
6273 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6274 is defined.
6275
6276 2014-11-21 Yao Qi <yao@codesourcery.com>
6277
6278 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6279 (AC_CHECK_HEADERS): Remove malloc.h.
6280 * configure: Re-generated.
6281 * config.in: Re-generated.
6282 * server.h: Don't include alloca.h and malloc.h.
6283 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6284 Don't include malloc.h.
6285
6286 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6287
6288 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6289 corresponding ERRNO check in same block.
6290
6291 2014-11-12 Pedro Alves <palves@redhat.com>
6292
6293 * server.c (cont_thread): Update comment.
6294 (start_inferior, attach_inferior): No longer clear cont_thread.
6295 (handle_v_cont): No longer set cont_thread.
6296 (captured_main): Clear cont_thread each time a GDB connects.
6297
6298 2014-11-12 Pedro Alves <palves@redhat.com>
6299
6300 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6301 thread, and don't resume all threads if the Hc thread has exited.
6302
6303 2014-11-12 Pedro Alves <palves@redhat.com>
6304
6305 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6306 the process group instead of to a specific LWP.
6307
6308 2014-10-15 Pedro Alves <palves@redhat.com>
6309
6310 PR server/17487
6311 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6312 parameter.
6313 (arm_set_thread_context): Delete.
6314 (the_low_target): Adjust.
6315 * win32-i386-low.c (debug_registers_changed)
6316 (debug_registers_used): Delete.
6317 (update_debug_registers_callback): New function.
6318 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6319 needing to update their debug registers.
6320 (win32_get_current_dr): New function.
6321 (x86_dr_low_get_addr, x86_dr_low_get_control)
6322 (x86_dr_low_get_status): Fetch the debug register from the thread
6323 record's context.
6324 (i386_initial_stuff): Adjust.
6325 (i386_get_thread_context): Remove current_event parameter. Don't
6326 clear debug_registers_changed nor copy DR values to
6327 debug_reg_state.
6328 (i386_set_thread_context): Delete.
6329 (i386_prepare_to_resume): New function.
6330 (i386_thread_added): Mark the thread as needing to update irs
6331 debug registers.
6332 (the_low_target): Remove i386_set_thread_context and install
6333 i386_prepare_to_resume.
6334 * win32-low.c (win32_get_thread_context): Adjust.
6335 (win32_set_thread_context): Use SetThreadContext
6336 directly.
6337 (win32_prepare_to_resume): New function.
6338 (win32_require_context): New function, factored out from ...
6339 (thread_rec): ... this.
6340 (continue_one_thread): Call win32_prepare_to_resume on each thread
6341 we're about to continue.
6342 (win32_resume): Call win32_prepare_to_resume on the event thread.
6343 * win32-low.h (struct win32_thread_info)
6344 <debug_registers_changed>: New field.
6345 (struct win32_target_ops): Change prototype of set_thread_context,
6346 delete set_thread_context and add prepare_to_resume.
6347 (win32_require_context): New declaration.
6348
6349 2014-10-08 Gary Benson <gbenson@redhat.com>
6350
6351 * server.h: Do not include common-exceptions.h.
6352
6353 2014-10-08 Gary Benson <gbenson@redhat.com>
6354
6355 * server.h: Do not include cleanups.h.
6356
6357 2014-09-30 James Hogan <james.hogan@imgtec.com>
6358
6359 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6360 mips64-dsp-linux.c.
6361
6362 2014-09-23 Yao Qi <yao@codesourcery.com>
6363
6364 * linux-low.c (lp_status_maybe_breakpoint): New function.
6365 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6366 (count_events_callback): Likewise.
6367 (select_event_lwp_callback): Likewise.
6368 (cancel_breakpoints_callback): Likewise.
6369
6370 2014-09-19 Don Breazeal <donb@codesourcery.com>
6371
6372 * linux-low.c (handle_extended_wait): Call
6373 linux_ptrace_get_extended_event.
6374 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6375 linux_is_extended_waitstatus.
6376
6377 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6378
6379 * Makefile.in (CPPFLAGS): Define.
6380 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6381 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6382
6383 2014-09-16 Gary Benson <gbenson@redhat.com>
6384
6385 * inferiors.h (current_inferior): Renamed as...
6386 (current_thread): New variable. All uses updated.
6387 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6388 (maybe_move_out_of_jump_pad): Likewise.
6389 (cancel_breakpoint): Likewise.
6390 (linux_low_filter_event): Likewise.
6391 (wait_for_sigstop): Likewise.
6392 (linux_resume_one_lwp): Likewise.
6393 (need_step_over_p): Likewise.
6394 (start_step_over): Likewise.
6395 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6396 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6397 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6398 and save_inferior as saved_thread.
6399 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6400 saved_thread.
6401 (regcache_invalidate_thread): Likewise.
6402 * remote-utils.c (prepare_resume_reply): Likewise.
6403 * thread-db.c (thread_db_get_tls_address): Likewise.
6404 (disable_thread_event_reporting): Likewise.
6405 (remove_thread_event_breakpoints): Likewise.
6406 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6407 as saved_thread.
6408 * target.h (set_desired_inferior): Renamed as...
6409 (set_desired_thread): New declaration. All uses updated.
6410 * server.c (myresume): Updated comment to reference thread instead
6411 of inferior.
6412 (handle_serial_event): Likewise.
6413 (handle_target_event): Likewise.
6414
6415 2014-09-12 Tom Tromey <tromey@redhat.com>
6416 Gary Benson <gbenson@redhat.com>
6417
6418 * regcache.h: Include common-regcache.h.
6419 (regcache_read_pc): Don't declare.
6420 * regcache.c (get_thread_regcache_for_ptid): New function.
6421
6422 2014-09-11 Tom Tromey <tromey@redhat.com>
6423 Gary Benson <gbenson@redhat.com>
6424
6425 * symbol.c: New file.
6426 * Makefile.in (SFILES): Add symbol.c.
6427 (OBS): Add symbol.o.
6428
6429 2014-09-11 Gary Benson <gbenson@redhat.com>
6430
6431 * target.c (target_stop_ptid, target_continue_ptid): New
6432 functions.
6433
6434 2014-09-11 Tom Tromey <tromey@redhat.com>
6435 Gary Benson <gbenson@redhat.com>
6436
6437 * target.h: Include target/target.h.
6438 * target.c (target_read_memory, target_read_uint32)
6439 (target_write_memory): New functions.
6440
6441 2014-09-11 Gary Benson <gbenson@redhat.com>
6442
6443 * server.h (debug_hw_points): Don't declare.
6444 * server.c (debug_hw_points): Don't define. Replace all uses
6445 with show_debug_regs.
6446 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6447 all uses with show_debug_regs.
6448
6449 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6450
6451 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6452 endianness into account.
6453 (ppc_supply_ptrace_register): Likewise.
6454
6455 2014-09-03 James Hogan <james.hogan@imgtec.com>
6456
6457 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6458 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6459
6460 2014-09-03 Gary Benson <gbenson@redhat.com>
6461
6462 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6463 ALL_DEBUG_ADDRESS_REGISTERS.
6464
6465 2014-09-02 Gary Benson <gbenson@redhat.com>
6466
6467 * i386-low.h: Renamed as...
6468 * x86-low.h: New file. All type, function and variable name
6469 prefixes changed from "i386_" to "x86_". All references updated.
6470 * i386-low.c: Renamed as...
6471 * x86-low.c: New file. All type, function and variable name
6472 prefixes changed from "i386_" to "x86_". All references updated.
6473
6474 2014-09-02 Gary Benson <gbenson@redhat.com>
6475
6476 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6477 (x86_linux_new_thread): Likewise.
6478
6479 2014-08-29 Gary Benson <gbenson@redhat.com>
6480
6481 * server.h (setjmp.h): Do not include.
6482 (toplevel): Do not declare.
6483 (common-exceptions.h): Include.
6484 (cleanups.h): Likewise.
6485 * server.c (toplevel): Do not define.
6486 (exit_code): New static global.
6487 (detach_or_kill_for_exit_cleanup): New function.
6488 (main): New function. Original main renamed to...
6489 (captured_main): New function.
6490 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6491
6492 2014-08-29 Gary Benson <gbenson@redhat.com>
6493
6494 * Makefile.in (SFILES): Add common/common-exceptions.c.
6495 (OBS): Add common-exceptions.o.
6496 (common-exceptions.o): New rule.
6497 * utils.c (prepare_to_throw_exception): New function.
6498
6499 2014-08-29 Gary Benson <gbenson@redhat.com>
6500
6501 * config.in: Regenerate.
6502 * configure: Likewise.
6503
6504 2014-08-29 Gary Benson <gbenson@redhat.com>
6505
6506 * Makefile.in (SFILES): Add common/cleanups.c.
6507 (OBS): cleanups.o.
6508 (cleanups.o): New rule.
6509
6510 2014-08-29 Gary Benson <gbenson@redhat.com>
6511
6512 * utils.c (internal_vwarning): New function.
6513
6514 2014-08-28 Gary Benson <gbenson@redhat.com>
6515
6516 * utils.h (fatal): Remove declaration.
6517 * utils.c (fatal): Remove function.
6518
6519 2014-08-28 Gary Benson <gbenson@redhat.com>
6520
6521 * tracepoint.c (gdb_agent_init): Replace fatal with
6522 perror_with_name.
6523 (initialize_tracepoint): Likewise.
6524
6525 2014-08-28 Gary Benson <gbenson@redhat.com>
6526
6527 * remote-utils.c (remote_prepare): Replace fatal with error.
6528
6529 2014-08-28 Gary Benson <gbenson@redhat.com>
6530
6531 * linux-low.c (linux_async): Replace fatal with warning.
6532 Tidy up and return.
6533 (linux_start_non_stop): Return -1 if linux_async failed.
6534
6535 2014-08-28 Gary Benson <gbenson@redhat.com>
6536
6537 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6538 gdb_assert.
6539 (i386_dr_low_get_addr): Remove vague comment.
6540 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6541 gdb_assert.
6542
6543 2014-08-28 Gary Benson <gbenson@redhat.com>
6544
6545 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6546 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6547 internal_error.
6548 (linux_resume_one_lwp): Likewise.
6549 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6550 gdb_assert.
6551 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6552 with internal_error.
6553 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6554 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6555 (find_register_by_name): Replace fatal with internal_error.
6556 (find_regno): Likewise.
6557 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6558 * thread-db.c (thread_db_create_event): Likewise.
6559 (thread_db_load_search): Likewise.
6560 (try_thread_db_load_1): Likewise.
6561 * tracepoint.c (get_jump_space_head): Replace fatal with
6562 internal_error.
6563 (claim_trampoline_space): Likewise.
6564 (have_fast_tracepoint_trampoline_buffer): Likewise.
6565 (cmd_qtstart): Likewise.
6566 (stop_tracing): Likewise.
6567 (fast_tracepoint_collecting): Likewise.
6568 (target_malloc): Likewise.
6569 (download_tracepoint): Likewise.
6570 (download_trace_state_variables): Replace check with gdb_assert.
6571 (upload_fast_traceframes): Replace fatal with internal_error.
6572
6573 2014-08-19 Tom Tromey <tromey@redhat.com>
6574 Gary Benson <gbenson@redhat.com>
6575
6576 * Makefile.in (SFILES): Add common/common-debug.c.
6577 (OBS): Add common-debug.o.
6578 (common-debug.o): New rule.
6579 * debug.h (debug_printf): Don't declare.
6580 * debug.c (debug_printf): Renamed and rewritten as...
6581 (debug_vprintf): New function.
6582
6583 2014-08-19 Gary Benson <gbenson@redhat.com>
6584
6585 * utils.h: Do not include print-utils.h.
6586
6587 2014-08-19 Tom Tromey <tromey@redhat.com>
6588 Gary Benson <gbenson@redhat.com>
6589
6590 * server.h: Add static assertion.
6591 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6592
6593 2014-08-19 Tom Tromey <tromey@redhat.com>
6594 Gary Benson <gbenson@redhat.com>
6595
6596 * Makefile.in (SFILES): Add common/errors.c.
6597 (OBS): Add errors.o.
6598 (IPA_OBS): Add errors-ipa.o.
6599 (errors.o): New rule.
6600 (errors-ipa.o): Likewise.
6601 * utils.h (perror_with_name, error, warning): Don't declare.
6602 * utils.c (warning): Renamed and rewritten as...
6603 (vwarning): New function.
6604 (error): Renamed and rewritten as...
6605 (verror): New function.
6606 (internal_error): Renamed and rewritten as...
6607 (internal_verror): New function.
6608
6609 2014-08-07 Gary Benson <gbenson@redhat.com>
6610
6611 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6612 * configure: Regenerate.
6613 * config.in: Likewise.
6614 * server.h: Do not include errno.h.
6615 * event-loop.c: Likewise.
6616 * hostio-errno.c: Likewise.
6617 * linux-low.c: Likewise.
6618 * remote-utils.c: Likewise.
6619 * spu-low.c: Likewise.
6620 * utils.c: Likewise.
6621 * gdbreplay.c: Unconditionally include errno.h.
6622
6623 2014-08-07 Gary Benson <gbenson@redhat.com>
6624
6625 * server.h: Do not include string.h.
6626 * event-loop.c: Likewise.
6627 * linux-low.c: Likewise.
6628 * regcache.c: Likewise.
6629 * remote-utils.c: Likewise.
6630 * spu-low.c: Likewise.
6631 * utils.c: Likewise.
6632
6633 2014-08-07 Gary Benson <gbenson@redhat.com>
6634
6635 * server.h: Do not include gdb_assert.h.
6636
6637 2014-08-07 Gary Benson <gbenson@redhat.com>
6638
6639 * server.h: Do not include common-utils.h.
6640
6641 2014-08-07 Gary Benson <gbenson@redhat.com>
6642
6643 * server.h: Do not include ptid.h.
6644 * notif.h: Likewise.
6645
6646 2014-08-07 Gary Benson <gbenson@redhat.com>
6647
6648 * server.h: Do not include gdb_locale.h.
6649
6650 2014-08-07 Gary Benson <gbenson@redhat.com>
6651
6652 * server.h: Do not include gdb/signals.h.
6653 * win32-low.c: Likewise.
6654
6655 2014-08-07 Gary Benson <gbenson@redhat.com>
6656
6657 * server.h: Do not include pathmax.h.
6658
6659 2014-08-07 Gary Benson <gbenson@redhat.com>
6660
6661 * server.h: Do not include libiberty.h.
6662 * linux-bfin-low.c: Likewise.
6663
6664 2014-08-07 Gary Benson <gbenson@redhat.com>
6665
6666 * server.h: Do not include ansidecl.h.
6667
6668 2014-08-07 Gary Benson <gbenson@redhat.com>
6669
6670 * linux-x86-low.c: Do not include stddef.h.
6671 * lynx-ppc-low.c: Likewise.
6672 * tracepoint.c: Likewise.
6673
6674 2014-08-07 Gary Benson <gbenson@redhat.com>
6675
6676 * server.h: Do not include stdarg.h.
6677 * nto-low.c: Likewise.
6678
6679 2014-08-07 Gary Benson <gbenson@redhat.com>
6680
6681 * server.h: Do not include stdlib.h.
6682 * inferiors.c: Likewise.
6683 * linux-low.c: Likewise.
6684 * regcache.c: Likewise.
6685 * spu-low.c: Likewise.
6686 * tracepoint.c: Likewise.
6687 * utils.c: Likewise.
6688
6689 2014-08-07 Gary Benson <gbenson@redhat.com>
6690
6691 * server.h: Do not include stdio.h.
6692 * linux-low.c: Likewise.
6693 * remote-utils.c: Likewise.
6694 * spu-low.c: Likewise.
6695 * utils.c: Likewise.
6696 * wincecompat.c: Likewise.
6697
6698 2014-08-06 Gary Benson <gbenson@redhat.com>
6699
6700 * regcache.c (init_register_cache): Move conditionals inside if.
6701
6702 2014-08-06 Gary Benson <gbenson@redhat.com>
6703
6704 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6705
6706 2014-07-31 Gary Benson <gbenson@redhat.com>
6707
6708 * ax.h: Do not include server.h.
6709 * gdbthread.h: Likewise.
6710 * lynx-low.h: Likewise.
6711 * notif.h: Likewise.
6712
6713 2014-07-30 Gary Benson <gbenson@redhat.com>
6714
6715 * server.h: Include common-defs.h.
6716 Do not include config.h or build-gnulib-gdbserver/config.h.
6717
6718 2014-07-30 Gary Benson <gbenson@redhat.com>
6719
6720 * hostio-errno.c: Move server.h to top of includes list.
6721 * inferiors.c: Likewise.
6722 * linux-x86-low.c: Likewise.
6723 * notif.c: Include server.h.
6724
6725 2014-07-24 Tom Tromey <tromey@redhat.com>
6726 Gary Benson <gbenson@redhat.com>
6727
6728 * server.h (CORE_ADDR): Now unsigned.
6729
6730 2014-07-16 Pedro Alves <palves@redhat.com>
6731
6732 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6733
6734 2014-07-15 Pedro Alves <palves@redhat.com>
6735
6736 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6737 copy.
6738
6739 2014-07-11 Pedro Alves <palves@redhat.com>
6740
6741 * linux-low.c (kill_wait_lwp): New function, based on
6742 kill_one_lwp_callback, but use my_waitpid directly.
6743 (kill_one_lwp_callback, linux_kill): Use it.
6744
6745 2014-06-23 Pedro Alves <palves@redhat.com>
6746
6747 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6748 before setting DR0..DR3.
6749
6750 2014-06-20 Gary Benson <gbenson@redhat.com>
6751
6752 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6753 * configure: Regenerated.
6754 * config.in: Likewise.
6755
6756 2014-06-20 Gary Benson <gbenson@redhat.com>
6757
6758 * Makefile.in (SFILES): Update locations for files moved
6759 from common to nat.
6760 (object file files): Reordered.
6761
6762 2014-06-20 Gary Benson <gbenson@redhat.com>
6763
6764 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6765 (i386_dr_low_set_addr): Likewise.
6766 (i386_dr_low_get_addr): Likewise.
6767 (i386_dr_low_can_set_control): Likewise.
6768 (i386_dr_low_set_control): Likewise.
6769 (i386_dr_low_get_control): Likewise.
6770 (i386_dr_low_get_status): Likewise.
6771 (i386_get_debug_register_length): Likewise.
6772 * linux-x86-low.c (i386_dr_low_set_addr):
6773 Changed signature. Made static.
6774 (i386_dr_low_get_addr): Likewise.
6775 (i386_dr_low_set_control): Likewise.
6776 (i386_dr_low_get_control): Likewise.
6777 (i386_dr_low_get_status): Likewise.
6778 (i386_dr_low): New global variable.
6779 * win32-i386-low.c (i386_dr_low_set_addr):
6780 Changed signature. Made static.
6781 (i386_dr_low_get_addr): Likewise.
6782 (i386_dr_low_set_control): Likewise.
6783 (i386_dr_low_get_control): Likewise.
6784 (i386_dr_low_get_status): Likewise.
6785 (i386_dr_low): New global variable.
6786
6787 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6788
6789 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6790 * Makefile.in (AR, AR_FLAGS): Define.
6791 * configure: Regenerate.
6792
6793 2014-06-19 Gary Benson <gbenson@redhat.com>
6794
6795 * Makefile.in (i386-dregs.o): New rule.
6796 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6797 * i386-low.c (target.h): Remove include.
6798 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6799 (DR_CONTROL_SHIFT): Likewise.
6800 (DR_CONTROL_SIZE): Likewise.
6801 (DR_RW_EXECUTE): Likewise.
6802 (DR_RW_WRITE): Likewise.
6803 (DR_RW_READ): Likewise.
6804 (DR_RW_IORW): Likewise.
6805 (DR_LEN_1): Likewise.
6806 (DR_LEN_2): Likewise.
6807 (DR_LEN_4): Likewise.
6808 (DR_LEN_8): Likewise.
6809 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6810 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6811 (DR_ENABLE_SIZE): Likewise.
6812 (DR_LOCAL_SLOWDOWN): Likewise.
6813 (DR_GLOBAL_SLOWDOWN): Likewise.
6814 (DR_CONTROL_RESERVED): Likewise.
6815 (I386_DR_CONTROL_MASK): Likewise.
6816 (I386_DR_VACANT): Likewise.
6817 (I386_DR_LOCAL_ENABLE): Likewise.
6818 (I386_DR_GLOBAL_ENABLE): Likewise.
6819 (I386_DR_DISABLE): Likewise.
6820 (I386_DR_SET_RW_LEN): Likewise.
6821 (I386_DR_GET_RW_LEN): Likewise.
6822 (I386_DR_WATCH_HIT): Likewise.
6823 (i386_wp_op_t): Likewise.
6824 (i386_show_dr): Likewise.
6825 (i386_length_and_rw_bits): Likewise.
6826 (i386_insert_aligned_watchpoint): Likewise.
6827 (i386_remove_aligned_watchpoint): Likewise.
6828 (i386_handle_nonaligned_watchpoint): Likewise.
6829 i386_update_inferior_debug_regs(): Likewise.
6830 (i386_dr_insert_watchpoint): Likewise.
6831 (i386_dr_remove_watchpoint): Likewise.
6832 (i386_dr_region_ok_for_watchpoint): Likewise.
6833 (i386_dr_stopped_data_address): Likewise.
6834 (i386_dr_stopped_by_watchpoint): Likewise.
6835
6836 2014-06-19 Gary Benson <gbenson@redhat.com>
6837
6838 * i386-low.c (i386_dr_show): Renamed to
6839 i386_show_dr and made static. All uses updated.
6840 (i386_dr_length_and_rw_bits): Renamed to
6841 i386_length_and_rw_bits and made static.
6842 All uses updated.
6843 (i386_dr_insert_aligned_watchpoint): Renamed to
6844 i386_insert_aligned_watchpoint and made static.
6845 All uses updated.
6846 (i386_dr_remove_aligned_watchpoint): Renamed to
6847 i386_remove_aligned_watchpoint and made static.
6848 All uses updated.
6849 (i386_dr_update_inferior_debug_regs): Renamed to
6850 i386_update_inferior_debug_regs and made static.
6851 All uses updated.
6852
6853 2014-06-18 Gary Benson <gbenson@redhat.com>
6854
6855 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6856 (i386_dr_low_can_set_control): Likewise.
6857 (i386_get_debug_register_length): Likewise.
6858 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6859 (i386_dr_low_can_set_control): Likewise.
6860 (i386_get_debug_register_length): Likewise.
6861
6862 2014-06-17 Gary Benson <gbenson@redhat.com>
6863
6864 * i386-low.h (i386-dregs.h): New include.
6865 (DR_FIRSTADDR): Now in i386-dregs.h.
6866 (DR_LASTADDR): Likewise.
6867 (DR_NADDR): Likewise.
6868 (DR_STATUS): Likewise.
6869 (DR_CONTROL): Likewise.
6870 (i386_debug_reg_state): Likewise.
6871 (i386_dr_insert_watchpoint): Likewise.
6872 (i386_dr_remove_watchpoint): Likewise.
6873 (i386_dr_region_ok_for_watchpoint): Likewise.
6874 (i386_dr_stopped_data_address): Likewise.
6875 (i386_dr_stopped_by_watchpoint): Likewise.
6876 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6877
6878 2014-06-18 Gary Benson <gbenson@redhat.com>
6879
6880 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6881 i386_dr_insert_watchpoint.
6882 (i386_low_remove_watchpoint): Renamed to
6883 i386_dr_remove_watchpoint.
6884 (i386_low_region_ok_for_watchpoint): Renamed to
6885 i386_dr_region_ok_for_watchpoint.
6886 (i386_low_stopped_data_address): Renamed to
6887 i386_dr_stopped_data_address.
6888 (i386_low_stopped_by_watchpoint): Renamed to
6889 i386_dr_stopped_by_watchpoint.
6890 * i386-low.c (i386_show_dr): Renamed to
6891 i386_dr_show and made nonstatic. All uses updated.
6892 (i386_length_and_rw_bits): Renamed to
6893 i386_dr_length_and_rw_bits and made nonstatic.
6894 All uses updated.
6895 (i386_insert_aligned_watchpoint): Renamed to
6896 i386_dr_insert_aligned_watchpoint and made nonstatic.
6897 All uses updated.
6898 (i386_remove_aligned_watchpoint): Renamed to
6899 i386_dr_remove_aligned_watchpoint and made nonstatic.
6900 All uses updated.
6901 (i386_update_inferior_debug_regs): Renamed to
6902 i386_dr_update_inferior_debug_regs and made nonstatic.
6903 All uses updated.
6904 (i386_low_insert_watchpoint): Renamed to
6905 i386_dr_insert_watchpoint. All uses updated.
6906 (i386_low_remove_watchpoint): Renamed to
6907 i386_dr_remove_watchpoint. All uses updated.
6908 (i386_low_region_ok_for_watchpoint): Renamed to
6909 i386_dr_region_ok_for_watchpoint. All uses updated.
6910 (i386_low_stopped_data_address): Renamed to
6911 i386_dr_stopped_data_address. All uses updated.
6912 (i386_low_stopped_by_watchpoint): Renamed to
6913 i386_dr_stopped_by_watchpoint. All uses updated.
6914
6915 2014-06-18 Gary Benson <gbenson@redhat.com>
6916
6917 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6918 (i386_dr_low_can_set_control): Likewise.
6919 (i386_insert_aligned_watchpoint): New check.
6920
6921 2014-06-18 Gary Benson <gbenson@redhat.com>
6922
6923 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6924 Renamed to state.
6925
6926 2014-06-18 Gary Benson <gbenson@redhat.com>
6927
6928 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6929 instead of fatal and error.
6930 (i386_handle_nonaligned_watchpoint): Likewise.
6931
6932 2014-06-18 Gary Benson <gbenson@redhat.com>
6933
6934 * i386-low.c (i386_get_debug_register_length): New macro.
6935 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6936 (i386_show_dr): Use debug_printf instead of fprintf. Use
6937 phex to format values.
6938
6939 2014-06-18 Gary Benson <gbenson@redhat.com>
6940
6941 * i386-low.h: Comment changes.
6942 * i386-low.c: Likewise.
6943
6944 2014-06-18 Gary Benson <gbenson@redhat.com>
6945
6946 * i386-low.c: Whitespace changes.
6947
6948 2014-06-12 Tom Tromey <tromey@redhat.com>
6949
6950 * utils.c (freeargv): Remove.
6951
6952 2014-06-12 Tom Tromey <tromey@redhat.com>
6953
6954 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6955 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6956 (parse_debug_format_options): Likewise.
6957 (gdbserver_usage): Likewise.
6958 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6959 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6960 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6961 against libiberty.
6962 ($(LIBGNU)): Depend on libiberty.
6963 (all-lib): Recurse into all subdirs.
6964 (install-only): Invoke "install" target in subdirs.
6965 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6966 targets.
6967 * configure: Rebuild.
6968 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6969 for vasprintf, vsnprintf, or gettimeofday.
6970 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6971 srv_tgtobj.
6972
6973 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6974
6975 * development.sh: Delete.
6976 * Makefile.in (config.status): Adjust dependency on development.sh.
6977 * configure.ac: Adjust development.sh source call.
6978 * configure: Regenerate.
6979
6980 2014-06-02 Pedro Alves <palves@redhat.com>
6981
6982 * ax.c (gdb_free_agent_expr): New function.
6983 * ax.h (gdb_free_agent_expr): New declaration.
6984 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6985 list.
6986 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6987 static.
6988 (clear_breakpoint_conditions_and_commands): New function.
6989 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6990 (clear_breakpoint_conditions_and_commands): New declaration.
6991
6992 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6993
6994 * linux-aarch64-low.c (asm/ptrace.h): Include.
6995
6996 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6997
6998 Fix TLS access for -static -pthread.
6999 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7000 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7001 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7002
7003 2014-05-20 Pedro Alves <palves@redhat.com>
7004
7005 * linux-aarch64-low.c (aarch64_insert_point)
7006 (aarch64_remove_point): No longer check whether the type is
7007 supported here. Adjust to new interface.
7008 (the_low_target): Install aarch64_supports_z_point_type as
7009 supports_z_point_type method.
7010 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7011 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7012 instead of a Z packet char. Adjust.
7013 (arm_supports_z_point_type): New function.
7014 (arm_insert_point, arm_remove_point): Adjust to new interface.
7015 (the_low_target): Install arm_supports_z_point_type.
7016 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7017 (cris_insert_point, cris_remove_point): Adjust to new interface.
7018 Don't check whether the type is supported here.
7019 (the_low_target): Install cris_supports_z_point_type.
7020 * linux-low.c (linux_supports_z_point_type): New function.
7021 (linux_insert_point, linux_remove_point): Adjust to new interface.
7022 * linux-low.h (struct linux_target_ops) <insert_point,
7023 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7024 raw_breakpoint pointer parameter.
7025 <supports_z_point_type>: New method.
7026 * linux-mips-low.c (mips_supports_z_point_type): New function.
7027 (mips_insert_point, mips_remove_point): Adjust to new interface.
7028 Use mips_supports_z_point_type.
7029 (the_low_target): Install mips_supports_z_point_type.
7030 * linux-ppc-low.c (the_low_target): Install NULL as
7031 supports_z_point_type method.
7032 * linux-s390-low.c (the_low_target): Install NULL as
7033 supports_z_point_type method.
7034 * linux-sparc-low.c (the_low_target): Install NULL as
7035 supports_z_point_type method.
7036 * linux-x86-low.c (x86_supports_z_point_type): New function.
7037 (x86_insert_point): Adjust to new insert_point interface. Use
7038 insert_memory_breakpoint. Adjust to new
7039 i386_low_insert_watchpoint interface.
7040 (x86_remove_point): Adjust to remove_point interface. Use
7041 remove_memory_breakpoint. Adjust to new
7042 i386_low_remove_watchpoint interface.
7043 (the_low_target): Install x86_supports_z_point_type.
7044 * lynx-low.c (lynx_target_ops): Install NULL as
7045 supports_z_point_type callback.
7046 * nto-low.c (nto_supports_z_point_type): New.
7047 (nto_insert_point, nto_remove_point): Adjust to new interface.
7048 (nto_target_ops): Install nto_supports_z_point_type.
7049 * mem-break.c: Adjust intro comment.
7050 (struct raw_breakpoint) <raw_type, size>: New fields.
7051 <inserted>: Update comment.
7052 <shlib_disabled>: Delete field.
7053 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7054 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7055 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7056 (raw_bkpt_type_to_target_hw_bp_type): New function.
7057 (find_enabled_raw_code_breakpoint_at): New function.
7058 (find_raw_breakpoint_at): New type and size parameters. Use them.
7059 (insert_memory_breakpoint): New function, based off
7060 set_raw_breakpoint_at.
7061 (remove_memory_breakpoint): New function.
7062 (set_raw_breakpoint_at): Reimplement.
7063 (set_breakpoint): New, based on set_breakpoint_at.
7064 (set_breakpoint_at): Reimplement.
7065 (delete_raw_breakpoint): Go through the_target->remove_point
7066 instead of assuming memory breakpoints.
7067 (find_gdb_breakpoint_at): Delete.
7068 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7069 (find_gdb_breakpoint): New function.
7070 (set_gdb_breakpoint_at): Delete.
7071 (z_type_supported): New function.
7072 (set_gdb_breakpoint_1): New function, loosely based off
7073 set_gdb_breakpoint_at.
7074 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7075 (delete_gdb_breakpoint_at): Delete.
7076 (delete_gdb_breakpoint_1): New function, loosely based off
7077 delete_gdb_breakpoint_at.
7078 (delete_gdb_breakpoint): New function.
7079 (clear_gdb_breakpoint_conditions): Rename to ...
7080 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7081 breakpoint.
7082 (add_condition_to_breakpoint): Make static.
7083 (add_breakpoint_condition): Take a struct breakpoint pointer
7084 instead of an address. Adjust.
7085 (gdb_condition_true_at_breakpoint): Rename to ...
7086 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7087 z_type parameter.
7088 (gdb_condition_true_at_breakpoint): Reimplement.
7089 (add_breakpoint_commands): Take a struct breakpoint pointer
7090 instead of an address. Adjust.
7091 (gdb_no_commands_at_breakpoint): Rename to ...
7092 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7093 parameter. Return true if no breakpoint was found. Change debug
7094 output.
7095 (gdb_no_commands_at_breakpoint): Reimplement.
7096 (run_breakpoint_commands): Rename to ...
7097 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7098 and change return type to boolean.
7099 (run_breakpoint_commands): New function.
7100 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7101 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7102 breakpoint. Go through the_target->remove_point instead of
7103 assuming memory breakpoint.
7104 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7105 software and hardware breakpoints.
7106 (reinsert_raw_breakpoint): Go through the_target->insert_point
7107 instead of assuming memory breakpoint.
7108 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7109 software and hardware breakpoints.
7110 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7111 Check both software and hardware breakpoints.
7112 (validate_inserted_breakpoint): Assert the breakpoint is a
7113 software breakpoint. Set the inserted flag to -1 instead of
7114 setting shlib_disabled.
7115 (delete_disabled_breakpoints): Adjust.
7116 (validate_breakpoints): Only validate software breakpoints.
7117 Adjust to inserted flag change.
7118 (check_mem_read, check_mem_write): Skip breakpoint types other
7119 than software breakpoints. Adjust to inserted flag change.
7120 * mem-break.h (enum raw_bkpt_type): New enum.
7121 (raw_breakpoint, struct process_info): Forward declare.
7122 (Z_packet_to_target_hw_bp_type): Delete declaration.
7123 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7124 (set_gdb_breakpoint, delete_gdb_breakpoint)
7125 (clear_breakpoint_conditions): New declarations.
7126 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7127 (breakpoint_inserted_here): Update comment.
7128 (add_breakpoint_condition, add_breakpoint_commands): Replace
7129 address parameter with a breakpoint pointer parameter.
7130 (gdb_breakpoint_here): Update comment.
7131 (delete_gdb_breakpoint_at): Delete.
7132 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7133 * server.c (process_point_options): Take a struct breakpoint
7134 pointer instead of an address. Adjust.
7135 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7136 delete_gdb_breakpoint.
7137 * spu-low.c (spu_target_ops): Install NULL as
7138 supports_z_point_type method.
7139 * target.h: Include mem-break.h.
7140 (struct target_ops) <prepare_to_access_memory>: Update comment.
7141 <supports_z_point_type>: New field.
7142 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7143 instead of a char. Also take a raw breakpoint pointer.
7144 * win32-arm-low.c (the_low_target): Install NULL as
7145 supports_z_point_type.
7146 * win32-i386-low.c (i386_supports_z_point_type): New function.
7147 (i386_insert_point, i386_remove_point): Adjust to new interface.
7148 (the_low_target): Install i386_supports_z_point_type.
7149 * win32-low.c (win32_supports_z_point_type): New function.
7150 (win32_insert_point, win32_remove_point): Adjust to new interface.
7151 (win32_target_ops): Install win32_supports_z_point_type.
7152 * win32-low.h (struct win32_target_ops):
7153 <supports_z_point_type>: New method.
7154 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7155 instead of a char. Also take a raw breakpoint pointer.
7156
7157 2014-05-20 Pedro Alves <palves@redhat.com>
7158
7159 * mem-break.h: Include break-common.h.
7160 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7161 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7162 (Z_packet_to_target_hw_bp_type): New declaration.
7163 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7164 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7165 (Z_PACKET_ACCESS_WP): Delete macros.
7166 (Z_packet_to_hw_type): Delete function.
7167 * i386-low.h: Don't include break-common.h here.
7168 (Z_packet_to_hw_type): Delete declaration.
7169 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7170 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7171 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7172 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7173 * linux-aarch64-low.c: Don't include break-common.h here.
7174 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7175 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7176 (Z_packet_to_target_hw_bp_type): Delete function.
7177 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7178 function.
7179 (mips_insert_point, mips_remove_point): Use
7180 Z_packet_to_target_hw_bp_type.
7181
7182 2014-05-20 Pedro Alves <palves@redhat.com>
7183
7184 * linux-aarch64-low.c: Include break-common.h.
7185 (enum target_point_type): Delete.
7186 (Z_packet_to_point_type): Rename to ...
7187 (Z_packet_to_target_hw_bp_type): ... this, and return a
7188 target_hw_bp_type instead.
7189 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7190 instead of an enum target_point_type.
7191 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7192 breakpoint type.
7193 (aarch64_dr_state_insert_one_point)
7194 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7195 (aarch64_handle_aligned_watchpoint)
7196 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7197 Take an enum target_hw_bp_type instead of an enum
7198 target_point_type.
7199 (aarch64_supports_z_point_type): New function.
7200 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7201 use Z_packet_to_target_hw_bp_type.
7202
7203 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7204
7205 * configure.ac: Only use -Werror by default when DEVELOPMENT
7206 is true.
7207 * configure: Regenerate.
7208
7209 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7210
7211 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7212 * linux-x86-low.c (X86_64_USER_REGS): New.
7213 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7214
7215 2014-04-28 Yao Qi <yao@codesourcery.com>
7216
7217 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7218 name.
7219
7220 2014-04-25 Pedro Alves <palves@redhat.com>
7221
7222 PR server/16255
7223 * linux-low.c (linux_attach_fail_reason_string): New function.
7224 (linux_attach_lwp): Delete.
7225 (linux_attach_lwp_1): Rename to ...
7226 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7227 argument. Remove "initial" parameter. Return int instead of
7228 void. Don't error or warn here.
7229 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7230 failure to attach to the tgid. Call warning when failing to
7231 attach to an lwp.
7232 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7233 argument. Remove "initial" parameter. Return int instead of
7234 void. Don't error or warn here.
7235 (linux_attach_fail_reason_string): New declaration.
7236 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7237 interface change. Use linux_attach_fail_reason_string.
7238
7239 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7240 Walfred Tedeschi <walfred.tedeschi@intel.com>
7241
7242 * Makefile.in: Added rules to handle new files
7243 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7244 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7245 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7246 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7247 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7248 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7249 x32-avx512-linux.o.
7250 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7251 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7252 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7253 i386/x32-avx512.xml.
7254 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7255 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7256 i386/x32-avx512-linux.xml.
7257 * i387-fp.c (num_avx512_k_registers): New constant for number
7258 of K registers.
7259 (num_avx512_zmmh_low_registers): New constant for number of
7260 lower ZMM registers (0-15).
7261 (num_avx512_zmmh_high_registers): New constant for number of
7262 higher ZMM registers (16-31).
7263 (num_avx512_ymmh_registers): New contant for number of higher
7264 YMM registers (ymm16-31 added by avx521 on x86_64).
7265 (num_avx512_xmm_registers): New constant for number of higher
7266 XMM registers (xmm16-31 added by AVX512 on x86_64).
7267 (struct i387_xsave): Add space for AVX512 registers.
7268 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7269 Add code to handle AVX512 registers.
7270 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7271 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7272 prototypei from generated file.
7273 (tdesc_amd64_avx512_linux): Likewise.
7274 (init_registers_x32_avx512_linux): Likewise.
7275 (tdesc_x32_avx512_linux): Likewise.
7276 (init_registers_i386_avx512_linux): Likewise.
7277 (tdesc_i386_avx512_linux): Likewise.
7278 (x86_64_regmap): Add AVX512 registers.
7279 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7280 mask.
7281 (initialize_low_arch): Add code to initialize AVX512 registers.
7282
7283 2014-04-23 Pedro Alves <palves@redhat.com>
7284
7285 * mem-break.c (find_gdb_breakpoint_at): Make static.
7286 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7287
7288 2014-04-23 Pedro Alves <palves@redhat.com>
7289
7290 * i386-low.c: Don't include break-common.h here.
7291 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7292 prototype to take target_hw_bp_type as argument instead of a Z
7293 packet char.
7294 * i386-low.h: Include break-common.h here.
7295 (Z_packet_to_hw_type): Declare.
7296 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7297 prototypes.
7298 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7299 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7300 (x86_remove_point): Convert the packet number to a
7301 target_hw_bp_type before calling i386_low_remove_watchpoint.
7302 * win32-i386-low.c (i386_insert_point): Convert the packet number
7303 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7304 (i386_remove_point): Convert the packet number to a
7305 target_hw_bp_type before calling i386_low_remove_watchpoint.
7306
7307 2014-04-23 Pedro Alves <palves@redhat.com>
7308
7309 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7310
7311 2014-04-10 Pedro Alves <palves@redhat.com>
7312
7313 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7314 Check if the condition or command is NULL before checking if the
7315 breakpoint is known. On success, return true.
7316 * mem-break.h (add_breakpoint_condition): Document return.
7317 (add_breakpoint_commands): Add describing comment.
7318 * server.c (skip_to_semicolon): New function.
7319 (process_point_options): Use it.
7320
7321 2014-04-09 Pedro Alves <palves@redhat.com>
7322
7323 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7324 to lwpid_of.
7325
7326 2014-02-27 Pedro Alves <palves@redhat.com>
7327
7328 PR 12702
7329 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7330 macros.
7331 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7332 output.
7333 (last_thread_of_process_p): Take a PID argument instead of a
7334 thread pointer.
7335 (linux_wait_for_lwp): Delete.
7336 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7337 functions.
7338 (linux_low_filter_event): New function, party factored out from
7339 linux_wait_for_event.
7340 (linux_wait_for_event): Rename to ...
7341 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7342 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7343 sigsuspend. Check for zombie leaders.
7344 (linux_wait_for_event): Reimplement as wrapper around
7345 linux_wait_for_event_filtered.
7346 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7347 a normal or signal exit is seen, it's the whole process exiting.
7348 (wait_for_sigstop): No longer a for_each_inferior callback.
7349 Rewrite on top of linux_wait_for_event_filtered.
7350 (stop_all_lwps): Call wait_for_sigstop directly.
7351 * server.c (resume, handle_target_event): Handle
7352 TARGET_WAITKIND_NO_RESUMED.
7353
7354 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7355
7356 * win32-low.c (psapi_get_dll_name,
7357 * win32_CreateToolhelp32Snapshot): Delete.
7358 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7359 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7360 Delete.
7361 (handle_load_dll): Add function description.
7362 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7363
7364 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7365
7366 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7367 Add comment.
7368 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7369 base address when calling win32_add_one_solib.
7370 (handle_load_dll): Delete local variable load_addr.
7371 Remove 0x1000 offset applied to DLL base address when calling
7372 win32_add_one_solib.
7373 (handle_unload_dll): Add comment.
7374
7375 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7376
7377 * win32-low.c (win32_add_all_dlls): Renames
7378 win32_ensure_ntdll_loaded. Rewrite function documentation.
7379 Adjust implementation to always load all DLLs.
7380 Add 0x1000 offset to DLL base address when calling
7381 win32_add_one_solib.
7382 (child_initialization_done): New static global.
7383 (do_initial_child_stuff): Set child_initialization_done to
7384 zero during child initialization, and 1 after. Replace call
7385 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7386 Add comment.
7387 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7388 (handle_unload_dll): Add function documentation.
7389 (get_child_debug_event): Ignore load and unload DLL events
7390 during child initialization.
7391
7392 2014-02-20 Doug Evans <dje@google.com>
7393
7394 Remove global all_lwps.
7395 * inferiors.h (ptid_of): Move here from linux-low.h.
7396 (pid_of, lwpid_of): Ditto.
7397 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7398 parameter is a struct thread_info * now.
7399 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7400 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7401 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7402 directly.
7403 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7404 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7405 * linux-arm-low.c (update_registers_callback): Update, "entry"
7406 parameter is a struct thread_info * now.
7407 Fetch lwpid from current_inferior directly.
7408 (arm_insert_point): Pass &all_threads to find_inferior instead of
7409 &all_lwps.
7410 (arm_remove_point): Ditto.
7411 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7412 (arm_prepare_to_resume): Fetch pid from thread.
7413 (arm_read_description): Fetch lwpid from current_inferior directly.
7414 * linux-low.c (all_lwps): Delete.
7415 (delete_lwp): Delete call to remove_inferior.
7416 (handle_extended_wait): Fetch lwpid from thread.
7417 (add_lwp): Don't set lwp->entry.id. Remove call to
7418 add_inferior_to_list.
7419 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7420 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7421 (kill_one_lwp_callback): Ditto.
7422 (linux_kill): Don't dereference NULL pointer.
7423 Fetch ptid,lwpid from thread.
7424 (get_detach_signal): Fetch ptid from thread.
7425 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7426 Simplify call to regcache_invalidate_thread.
7427 (delete_lwp_callback): Update, "entry" parameter is a
7428 struct thread_info * now. Fetch pid from thread.
7429 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7430 (status_pending_p_callback): Update, "entry" parameter is a
7431 struct thread_info * now. Fetch ptid from thread.
7432 (find_lwp_pid): Update, "entry" parameter is a
7433 struct thread_info * now.
7434 (linux_wait_for_lwp): Fetch pid from thread.
7435 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7436 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7437 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7438 (dequeue_one_deferred_signal): Ditto.
7439 (cancel_breakpoint): Fetch ptid from current_inferior.
7440 (linux_wait_for_event): Pass &all_threads to find_inferior,
7441 not &all_lwps. Fetch ptid, lwpid from thread.
7442 (count_events_callback): Update, "entry" parameter is a
7443 struct thread_info * now.
7444 (select_singlestep_lwp_callback): Ditto.
7445 (select_event_lwp_callback): Ditto.
7446 (cancel_breakpoints_callback): Ditto.
7447 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7448 not &all_lwps.
7449 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7450 (unsuspend_one_lwp): Update, "entry" parameter is a
7451 struct thread_info * now.
7452 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7453 not &all_lwps.
7454 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7455 Fetch lwpid from thread, not lwp.
7456 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7457 Pass &all_threads to find_inferior, not &all_lwps.
7458 (send_sigstop): Fetch lwpid from thread, not lwp.
7459 (send_sigstop_callback): Update, "entry" parameter is a
7460 struct thread_info * now.
7461 (suspend_and_send_sigstop_callback): Ditto.
7462 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7463 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7464 struct thread_info * now.
7465 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7466 from thread, lwp.
7467 (lwp_running): Update, "entry" parameter is a
7468 struct thread_info * now.
7469 (stop_all_lwps): Fetch ptid from thread.
7470 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7471 (linux_resume_one_lwp): Fetch lwpid from thread.
7472 (linux_set_resume_request): Update, "entry" parameter is a
7473 struct thread_info * now. Fetch pid, lwpid from thread.
7474 (resume_status_pending_p): Update, "entry" parameter is a
7475 struct thread_info * now.
7476 (need_step_over_p): Ditto. Fetch lwpid from thread.
7477 (start_step_over): Fetch lwpid from thread.
7478 (linux_resume_one_thread): Update, "entry" parameter is a
7479 struct thread_info * now. Fetch lwpid from thread.
7480 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7481 (proceed_one_lwp): Update, "entry" parameter is a
7482 struct thread_info * now. Fetch lwpid from thread.
7483 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7484 struct thread_info * now.
7485 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7486 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7487 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7488 directly.
7489 (regsets_store_inferior_registers): Ditto.
7490 (fetch_register, store_register): Ditto.
7491 (linux_read_memory, linux_write_memory): Ditto.
7492 (linux_request_interrupt): Ditto.
7493 (linux_read_auxv): Ditto.
7494 (linux_xfer_siginfo): Ditto.
7495 (linux_qxfer_spu): Ditto.
7496 (linux_qxfer_libraries_svr4): Ditto.
7497 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7498 moved to inferiors.h.
7499 (get_lwp): Delete.
7500 (get_thread_lwp): Update.
7501 (struct lwp_info): Delete member "entry". Simplify comment for
7502 member "thread".
7503 (all_lwps): Delete.
7504 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7505 current_inferior directly.
7506 (update_watch_registers_callback): Update, "entry" parameter is a
7507 struct thread_info * now. Fetch pid from thread.
7508 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7509 (mips_insert_point): Fetch lwpid from current_inferior.
7510 Pass &all_threads to find_inferior, not &all_lwps.
7511 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7512 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7513 directly.
7514 (mips_stopped_data_address): Ditto.
7515 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7516 directly.
7517 * linux-tile-low.c (tile_arch_setup): Ditto.
7518 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7519 (update_debug_registers_callback): Update, "entry" parameter is a
7520 struct thread_info * now. Fetch pid from thread.
7521 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7522 Pass &all_threads to find_inferior, not &all_lwps.
7523 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7524 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7525 Pass &all_threads to find_inferior, not &all_lwps.
7526 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7527 (i386_dr_low_get_status): Ditto.
7528 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7529 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7530 (x86_linux_read_description): Ditto.
7531 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7532
7533 2014-02-20 Doug Evans <dje@google.com>
7534
7535 * inferiors.c (get_first_inferior): Fix buglet.
7536
7537 2014-02-19 Doug Evans <dje@google.com>
7538
7539 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7540 * inferiors.c (add_thread): Change result type to struct thread_info *.
7541 All callers updated.
7542 (add_lwp): Call add_thread here instead of in callers.
7543 All callers updated.
7544 * linux-low.h (get_lwp_thread): Rewrite.
7545 (struct lwp_info): New member "thread".
7546
7547 2014-02-19 Doug Evans <dje@google.com>
7548
7549 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7550 All callers updated.
7551
7552 2014-02-19 Doug Evans <dje@google.com>
7553
7554 * inferiors.c (add_thread): Fix whitespace.
7555
7556 2014-02-19 Doug Evans <dje@google.com>
7557
7558 * dll.c (clear_dlls): Replace accessing list implemention details
7559 with API function.
7560 * gdbthread.h (get_first_thread): Declare.
7561 * inferiors.c (for_each_inferior_with_data): New function.
7562 (get_first_thread): New function.
7563 (find_thread_ptid): Simplify.
7564 (get_first_inferior): New function.
7565 (clear_list): Delete.
7566 (one_inferior_p): New function.
7567 (clear_inferior_list): New function.
7568 (clear_inferiors): Update.
7569 * inferiors.h (for_each_inferior_with_data): Declare.
7570 (clear_inferior_list): Declare.
7571 (one_inferior_p): Declare.
7572 (get_first_inferior): Declare.
7573 * linux-low.c (linux_wait_for_event): Replace accessing list
7574 implemention details with API function.
7575 * server.c (target_running): Ditto.
7576 (accumulate_file_name_length): New function.
7577 (emit_dll_description): New function.
7578 (handle_qxfer_libraries): Replace accessing list implemention
7579 details with API function.
7580 (handle_qxfer_threads_worker): New function.
7581 (handle_qxfer_threads_proper): Replace accessing list implemention
7582 details with API function.
7583 (handle_query): Ditto.
7584 (visit_actioned_threads_callback_ftype): New typedef.
7585 (visit_actioned_threads_data): New struct.
7586 (visit_actioned_threads): Rewrite to be find_inferior callback.
7587 (resume): Call find_inferior.
7588 (handle_status): Replace accessing list implemention
7589 details with API function.
7590 (process_serial_event): Replace accessing list implemention details
7591 with API function.
7592 * target.c (set_desired_inferior): Replace accessing list implemention
7593 details with API function.
7594 * tracepoint.c (same_process_p): New function.
7595 (gdb_agent_about_to_close): Replace accessing list implemention
7596 details with API function.
7597 * win32-low.c (child_delete_thread): Replace accessing list
7598 implemention details with API function.
7599 (match_dll_by_basename): New function.
7600 (dll_is_loaded_by_basename): New function.
7601 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7602 details call to dll_is_loaded_by_basename.
7603
7604 2014-02-19 Doug Evans <dje@google.com>
7605
7606 * dll.h (struct dll_info): Add comment.
7607 * gdbthread.h (struct thread_info): Add comment.
7608 (current_ptid): Simplify.
7609 * inferiors.c (add_process): Update.
7610 (remove_process): Update.
7611 * inferiors.h (struct process_info): Rename member "head" to "entry".
7612 * linux-low.c (delete_lwp): Update.
7613 (add_lwp): Update.
7614 (last_thread_of_process_p): Update.
7615 (kill_one_lwp_callback, linux_kill): Update.
7616 (status_pending_p_callback): Update.
7617 (wait_for_sigstop): Update. Simplify read of ptid.
7618 (start_step_over): Update.
7619 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7620 (get_lwp_thread): Update.
7621 (struct lwp_info): Rename member "head" to "entry".
7622 * regcache.h (inferior_list_entry): Delete.
7623 * server.c (kill_inferior_callback): Update.
7624 (detach_or_kill_inferior_callback): Update.
7625 (print_started_pid): Update.
7626 (print_attached_pid): Update.
7627 (process_serial_event): Simplify read of ptid.
7628 * thread-db.c (thread_db_create_event): Update.
7629 (thread_db_get_tls_address): Update.
7630 * win32-low.c (current_inferior_ptid): Simplify.
7631
7632 2014-02-19 Tom Tromey <tromey@redhat.com>
7633
7634 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7635 argument.
7636 (target_supports_btrace): Update.
7637
7638 2014-02-14 Yao Qi <yao@codesourcery.com>
7639
7640 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7641 (rsp-low-ipa.o): New target.
7642
7643 2014-02-12 Tom Tromey <tromey@redhat.com>
7644
7645 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7646 convert_ascii_to_int.
7647 * regcache.c (registers_to_string): Likewise.
7648 * remote-utils.c (decode_M_packet): Likewise.
7649 * server.c (process_serial_event): Likewise.
7650
7651 2014-02-12 Tom Tromey <tromey@redhat.com>
7652
7653 * server.c (handle_query, handle_v_run): Use hex2bin, not
7654 unhexify.
7655 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7656
7657 2014-02-12 Tom Tromey <tromey@redhat.com>
7658
7659 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7660 convert_int_to_ascii.
7661 * regcache.c (registers_to_string, collect_register_as_string):
7662 Likewise.
7663 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7664 Likewise.
7665 * server.c (process_serial_event): Likewise.
7666 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7667 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7668
7669 2014-02-12 Tom Tromey <tromey@redhat.com>
7670
7671 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7672 bin2hex, not hexify.
7673 * tracepoint.c (cmd_qtstatus): Likewise.
7674
7675 2014-02-12 Tom Tromey <tromey@redhat.com>
7676
7677 * remote-utils.c (monitor_output): Pass explicit length to
7678 hexify.
7679
7680 2014-02-12 Tom Tromey <tromey@redhat.com>
7681
7682 * tracepoint.c: Include rsp-low.h.
7683 * server.c: Include rsp-low.h.
7684 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7685 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7686 declare.
7687 * remote-utils.c: Include rsp-low.h.
7688 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7689 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7690 (convert_int_to_ascii, convert_ascii_to_int): Move to
7691 common/rsp-low.c.
7692 * regcache.c: Include rsp-low.h.
7693 * ax.c: Include rsp-low.h.
7694 * Makefile.in (SFILES): Add common/rsp-low.c.
7695 (OBS): Add rsp-low.o.
7696 (rsp-low.o): New target.
7697
7698 2014-02-12 Tom Tromey <tromey@redhat.com>
7699
7700 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7701 Include print-utils.h.
7702 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7703 (plongest, thirty_two, phex_nz): Remove.
7704 * Makefile.in (SFILES): Add common/print-utils.c.
7705 (OBS): Add print-utils.o.
7706 (print-utils-ipa.o): New target.
7707 (print-utils.o): New target.
7708 (IPA_OBJS): Add print-utils-ipa.o.
7709
7710 2014-02-06 Tom Tromey <tromey@redhat.com>
7711
7712 * Makefile.in (SFILES): Fix indentation.
7713
7714 2014-02-05 Doug Evans <dje@google.com>
7715
7716 * linux-low.c (linux_wait_for_event): Improve comment.
7717 (linux_wait_1): Keep current_inferior in sync with event_child.
7718
7719 2014-01-22 Doug Evans <dje@google.com>
7720
7721 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7722
7723 2014-01-22 Doug Evans <dje@google.com>
7724
7725 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7726 * configure: Regenerate.
7727 * config.in: Regenerate.
7728 * Makefile.in (SFILES): Add debug.c.
7729 (OBS): Add debug.o.
7730 * debug.c: New file.
7731 * debug.h: New file.
7732 * linux-aarch64-low.c (*): Update all debugging printfs to use
7733 debug_printf instead of fprintf.
7734 * linux-arm-low.c (*): Ditto.
7735 * linux-cris-low.c (*): Ditto.
7736 * linux-crisv32-low.c (*): Ditto.
7737 * linux-m32r-low.c (*): Ditto.
7738 * linux-sparc-low.c (*): Ditto.
7739 * linux-x86.c (*): Ditto.
7740 * linux-low.c (*): Ditto.
7741 (linux_wait_1): Add calls to debug_enter, debug_exit.
7742 (linux_wait): Remove redundant debugging printf.
7743 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7744 (linux_resume, unstop_all_lwps): Ditto.
7745 * mem-break.c (*): Update all debugging printfs to use
7746 debug_printf instead of fprintf.
7747 * remote-utils.c (*): Ditto.
7748 * thread-db.c (*): Ditto.
7749 * server.c #include <ctype.h>, "gdb_vecs.h".
7750 (debug_threads): Moved to debug.c.
7751 (*): Update all debugging printfs to use debug_printf instead of
7752 fprintf.
7753 (start_inferior): Replace call to fflush with call to debug_flush.
7754 (monitor_show_help): Mention set debug-format.
7755 (parse_debug_format_options): New function.
7756 (handle_monitor_command): Handle "monitor set debug-format".
7757 (gdbserver_usage): Mention --debug-format.
7758 (main): Parse --debug-format.
7759 * server.h (debug_threads): Declaration moved to debug.h.
7760 #include "debug.h".
7761 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7762 trace_debug_1 that uses debug_printf.
7763 (tracepoint_look_up_symbols): Update all debugging printfs to use
7764 debug_printf instead of fprintf.
7765
7766 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7767
7768 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7769 sys/ptrace.h.
7770
7771 2014-01-17 Pedro Alves <palves@redhat.com>
7772
7773 PR build/16445
7774 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7775 defined after including gdb_proc_service.h.
7776
7777 2014-01-16 Doug Evans <dje@google.com>
7778
7779 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7780 (match_dll): Use it.
7781
7782 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7783
7784 * target.h (target_ops) <read_btrace>: Change parameters and
7785 return type to allow error reporting.
7786 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7787 trace reading errors on.
7788 * linux-low.c (linux_low_read_btrace): Pass trace reading
7789 errors on.
7790 (linux_low_disable_btrace): New.
7791
7792 2014-01-15 Doug Evans <dje@google.com>
7793
7794 * inferiors.c (thread_id_to_gdb_id): Delete.
7795 * inferiors.h (thread_id_to_gdb_id): Delete.
7796
7797 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7798
7799 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7800 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7801 versions.
7802
7803 2014-01-08 Pedro Alves <palves@redhat.com>
7804
7805 * server.c (handle_status): Don't discard previous queued stop
7806 replies or thread's pending status here.
7807 (main) <disconnection>: Do it here instead.
7808
7809 2014-01-08 Pedro Alves <palves@redhat.com>
7810
7811 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7812 * server.c (visit_actioned_threads, handle_pending_status): New
7813 function.
7814 (handle_v_cont): Factor out parts to ...
7815 (resume): ... this new function. If in all-stop, and a thread
7816 being resumed has a pending status, report it without actually
7817 resuming.
7818 (myresume): Adjust to use the new 'resume' function.
7819 (clear_pending_status_callback, set_pending_status_callback)
7820 (find_status_pending_thread_callback): New functions.
7821 (handle_status): Handle the case of multiple threads having
7822 interesting statuses to report. Report threads' real last signal
7823 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7824 with an interesting thread to report the status for, instead of
7825 always reporting the status of the first thread.
7826
7827 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7828
7829 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7830 * gdbreplay.c (gdbreplay_version): Likewise.
7831
7832 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7833
7834 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7835 iov.iov_len with the real length in use.
7836
7837 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7838
7839 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7840 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7841 for all targets that use win32-low.c.
7842 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7843 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7844
7845 2013-12-13 Pedro Alves <palves@redhat.com>
7846
7847 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7848 if equal to TARGET_WAITKIND_LOADED.
7849 * win32-low.c (cached_status): New static global.
7850 (win32_wait): Add declaration.
7851 (do_initial_child_stuff): Flush all initial pending debug events
7852 up to the initial breakpoint.
7853 (win32_wait): If CACHED_STATUS was set, return that instead
7854 of doing a real wait. Remove the code resuming the execution
7855 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7856 during the initial phase. Also remove the code changing
7857 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7858 TARGET_WAITKIND_STOPPED.
7859
7860 2013-12-11 Yao Qi <yao@codesourcery.com>
7861
7862 * notif.c (handle_notif_ack): Return 0 if no notification
7863 matches.
7864
7865 2013-11-20 Doug Evans <dje@google.com>
7866
7867 * linux-low.c (linux_set_resume_request): Fix comment.
7868
7869 2013-11-20 Doug Evans <dje@google.com>
7870
7871 * linux-low.c (resume_status_pending_p): Tweak comment.
7872
7873 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7874
7875 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7876 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7877 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7878 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7879 (srv_amd64_regobj): Add amd64-mpx.o.
7880 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7881 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7882 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7883 * i387-fp.c (num_pl_bnd_register) Added constant.
7884 (num_pl_bnd_cfg_registers) Added constant.
7885 (struct i387_xsave) Added reserved area and MPX fields.
7886 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7887 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7888 function.
7889 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7890 (init_registers_amd64_mpx_linux): Declare new function.
7891 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7892 (x86_64_regmap): Add MPX registers.
7893 (x86_linux_read_description): Add MPX case.
7894 (initialize_low_arch): Initialize MPX targets.
7895
7896 2013-11-18 Tom Tromey <tromey@redhat.com>
7897
7898 * configure: Rebuild.
7899 * configure.ac: Don't check for stdlib.h.
7900 * gdbreplay.c: Unconditionally include stdlib.h.
7901
7902 2013-11-18 Tom Tromey <tromey@redhat.com>
7903
7904 * config.in: Rebuild.
7905 * configure: Rebuild.
7906 * configure.ac: Don't use AC_HEADER_DIRENT.
7907
7908 2013-11-18 Tom Tromey <tromey@redhat.com>
7909
7910 * server.h: Don't check HAVE_STRING_H.
7911 * gdbreplay.c: Don't check HAVE_STRING_H.
7912 * configure: Rebuild.
7913
7914 2013-11-18 Tom Tromey <tromey@redhat.com>
7915
7916 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7917 LIBGNU.
7918
7919 2013-11-08 Tom Tromey <tromey@redhat.com>
7920
7921 * configure, config.in: Rebuild.
7922 * configure.ac: Remove unused configury.
7923
7924 2013-11-08 Tom Tromey <tromey@redhat.com>
7925
7926 * acinclude.m4: Include common.m4, codeset.m4.
7927 * configure, config.in: Rebuild.
7928 * configure.ac: Use GDB_AC_COMMON.
7929
7930 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7931
7932 * linux-s390-low.c (HWCAP_S390_TE): New define.
7933 (s390_arch_setup): Consider the TE field in the HWCAP for
7934 determining 'have_regset_tdb'.
7935
7936 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7937
7938 PR gdb/16014
7939 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7940 call to sizeof.
7941
7942 2013-10-02 Pedro Alves <palves@redhat.com>
7943
7944 * server.c (process_serial_event): Don't output "GDBserver
7945 exiting" if GDB is connected through stdio.
7946 * target.c (mywait): Likewise, be silent if GDB is connected
7947 through stdio.
7948
7949 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7950
7951 * lynx-low.c (lynx_add_threads_after_attach): New function.
7952 (lynx_attach): Remove call to add_thread. Add call to
7953 lynx_add_threads_after_attach instead.
7954
7955 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7956
7957 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7958 * config.in, configure: Regenerated.
7959
7960 2013-09-18 Yao Qi <yao@codesourcery.com>
7961
7962 PR server/15959
7963 * server.c (start_inferior): Clear 'resume_info'.
7964
7965 2013-09-16 Jiong Wang <jiwang@tilera.com>
7966
7967 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7968 for each register.
7969
7970 2013-09-16 Jiong Wang <jiwang@tilera.com>
7971
7972 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7973 linux-tile-low.o to srv_tgtobj.
7974
7975 2013-09-16 Will Newton <will.newton@linaro.org>
7976
7977 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7978 out regs.
7979
7980 2013-09-06 Pedro Alves <palves@redhat.com>
7981
7982 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7983 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7984 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7985 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7986 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7987 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7988
7989 2013-09-06 Pedro Alves <palves@redhat.com>
7990
7991 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7992 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7993
7994 2013-09-06 Pedro Alves <palves@redhat.com>
7995
7996 * linux-amd64-ipa.c: Include tracepoint.h.
7997 * linux-i386-ipa.c: Include tracepoint.h.
7998
7999 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8000
8001 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8002 (ps_get_thread_area): New function.
8003
8004 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8005
8006 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8007 (initialize_low_arch): Call init_registers_crisv32 rather than
8008 init_register_crisv32.
8009
8010 2013-09-05 Pedro Alves <palves@redhat.com>
8011
8012 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8013 to ...
8014 * hostio.h: ... this new file.
8015 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8016 win32-low.c: Include hostio.h.
8017
8018 2013-09-05 Pedro Alves <palves@redhat.com>
8019
8020 * server.h (gdb_client_data, handler_func, callback_handler_func)
8021 (delete_file_handler, add_file_handler, append_callback_event)
8022 (delete_callback_event, start_event_loop, initialize_event_loop):
8023 Move to event-loop.h and include it.
8024 * event-loop.h: New file.
8025
8026 2013-09-05 Pedro Alves <palves@redhat.com>
8027
8028 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8029 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8030 (loaded_dll, unloaded_dll): Move to ...
8031 * dll.h: ... this new file.
8032 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8033
8034 2013-09-05 Pedro Alves <palves@redhat.com>
8035
8036 * server.h (current_process, get_thread_process, all_processes)
8037 (add_inferior_to_list, for_each_inferior, current_inferior)
8038 (remove_inferior, add_process, remove_process, find_process_pid)
8039 (have_started_inferiors_p, have_attached_inferiors_p)
8040 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8041 (clear_inferiors, find_inferior, find_inferior_id)
8042 (inferior_target_data, set_inferior_target_data)
8043 (inferior_regcache_data, set_inferior_regcache_data): Move to
8044 inferiors.h, and include it.
8045 * inferiors.h: New file.
8046
8047 2013-09-05 Pedro Alves <palves@redhat.com>
8048
8049 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8050 Move ...
8051 * ax.h: ... here.
8052
8053 2013-09-05 Pedro Alves <palves@redhat.com>
8054
8055 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8056 tracepoint.h.
8057 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8058 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8059 (handle_tracepoint_general_set, handle_tracepoint_query)
8060 (tracepoint_finished_step, tracepoint_was_hit)
8061 (release_while_stepping_state_list, current_traceframe)
8062 (in_readonly_region, traceframe_read_mem)
8063 (fetch_traceframe_registers, traceframe_read_sdata)
8064 (traceframe_read_info, struct fast_tpoint_collect_status)
8065 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8066 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8067 (supply_fast_tracepoint_registers)
8068 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8069 (ipa_tdesc, claim_trampoline_space)
8070 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8071 (agent_mem_read, agent_get_trace_state_variable_value)
8072 (agent_set_trace_state_variable_value, agent_tsv_read)
8073 (agent_mem_read_string, get_raw_reg_func_addr)
8074 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8075 * tracepoint.h: ... this new file.
8076
8077 2013-09-05 Pedro Alves <palves@redhat.com>
8078
8079 * server.h (perror_with_name, error, fatal, warning, paddress)
8080 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8081 include it.
8082 * utils.h: New file.
8083
8084 2013-09-05 Pedro Alves <palves@redhat.com>
8085
8086 * server.h (remote_debug, noack_mode, transport_is_reliable)
8087 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8088 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8089 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8090 (write_enn, initialize_async_io, enable_async_io)
8091 (disable_async_io, check_remote_input_interrupt_request)
8092 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8093 (dead_thread_notify, prepare_resume_reply)
8094 (decode_address_to_semicolon, decode_address, decode_m_packet)
8095 (decode_M_packet, decode_X_packet, decode_xfer_write)
8096 (decode_search_memory_packet, unhexify, hexify)
8097 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8098 (look_up_one_symbol, relocate_instruction)
8099 (monitor_output): Move to remote-utils.h, and include it.
8100 * remote-utils.h: New file.
8101
8102 2013-09-05 Pedro Alves <palves@redhat.com>
8103
8104 * server.h (_): Delete.
8105
8106 2013-09-02 Pedro Alves <palves@redhat.com>
8107
8108 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8109 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8110 allocated.
8111 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8112
8113 2013-09-02 Pierre Muller <muller@sourceware.org>
8114
8115 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8116 or WriteProcessMemory complete successfully and handle
8117 ERROR_PARTIAL_COPY error.
8118
8119 2013-09-02 Pedro Alves <palves@redhat.com>
8120
8121 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8122 error instead of EIO.
8123
8124 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8125
8126 PR server/15604
8127 * linux-low.c: Include filestuff.h.
8128 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8129 * lynx-low.c: Include filestuff.h.
8130 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8131 * server.c: Include filestuff.h.
8132 (main): Call notice_open_fds.
8133 * spu-low.c: Include filestuff.h.
8134 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8135
8136 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8137
8138 * Makefile.in: Explain why ../target and ../nat are not
8139 listed as include file search paths.
8140 (linux-waitpid.o): New object file rule.
8141 * configure.srv (srv_native_linux_obj): New variable.
8142 Replace all occurrences of linux native object files with
8143 $srv_native_linux_obj.
8144 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8145 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8146 (linux_enable_event_reporting): Remove declaration.
8147 (my_waitpid): Moved to common/linux-waitpid.c.
8148 (linux_wait_for_event): Pass ptid when calling
8149 linux_enable_event_reporting.
8150 (linux_supports_tracefork_flag): Remove.
8151 (linux_enable_event_reporting): Likewise.
8152 (linux_tracefork_grandchild): Remove.
8153 (STACK_SIZE): Moved to common/linux-ptrace.c.
8154 (linux_tracefork_child): Remove.
8155 (linux_test_for_tracefork): Remove.
8156 (linux_look_up_symbols): Call linux_supports_traceclone.
8157 (initialize_low): Remove call to linux_test_for_tracefork.
8158 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8159 common/linux-ptrace.h.
8160 (PTRACE_TYPE_ARG4): Likewise.
8161 Include linux-ptrace.h.
8162
8163 2013-08-21 Pedro Alves <palves@redhat.com>
8164
8165 * config.in: Renegerate.
8166
8167 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8168
8169 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8170 (SFILES): Remove $(srcdir)/common/target-common.c and
8171 add $(srcdir)/target/waitstatus.c.
8172 (OBS): Remove target-common.o and add waitstatus.o.
8173 (server_h): Remove $(srcdir)/../common/target-common.h and
8174 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8175 and $(srcdir)/../target/waitstatus.h.
8176 (target-common.o): Remove.
8177 (waitstatus.o): New target object file.
8178 * target.h: Do not include target-common.h and
8179 include target/resume.h, target/wait.h and
8180 target/waitstatus.h.
8181
8182 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8183
8184 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8185 to PTRACE_TYPE_ARG3.
8186 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8187 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8188 PTRACE_TYPE_ARG4.
8189 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8190 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8191
8192 2013-07-27 Jie Zhang <jie@codesourcery.com>
8193 Daniel Jacobowitz <dan@codesourcery.com>
8194 Yao Qi <yao@codesourcery.com>
8195
8196 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8197 (mips-linux-watch.o): New rule.
8198 (mips_linux_watch_h): New variable.
8199 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8200 srv_tgtobj.
8201 * linux-mips-low.c: Include mips-linux-watch.h.
8202 (struct arch_process_info, struct arch_lwp_info): New.
8203 (update_watch_registers_callback): New function.
8204 (mips_linux_new_process, mips_linux_new_thread) New functions.
8205 (mips_linux_prepare_to_resume, mips_insert_point): New
8206 functions.
8207 (mips_remove_point, mips_stopped_by_watchpoint): New
8208 functions.
8209 (rsp_bp_type_to_target_hw_bp_type): New function.
8210 (mips_stopped_data_address): New function.
8211 (the_low_target): Add watchpoint support functions.
8212
8213 2013-07-27 Yao Qi <yao@codesourcery.com>
8214
8215 * i386-low.c: Include break-common.h.
8216 (enum target_hw_bp_type): Remove.
8217
8218 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8219
8220 * Makefile.in (SFILES): /common/target-common.c.
8221 (OBS): Add target-common.o.
8222 (server_h): Add $(srcdir)/../common/target-common.h.
8223 (target-common.o): New target.
8224 * server.c (queue_stop_reply_callback): Free
8225 status string after use.
8226 * target.c (target_waitstatus_to_string): Remove.
8227 * target.h: Include target-common.h.
8228 (resume_kind): Likewise.
8229 (target_waitkind): Likewise.
8230 (target_waitstatus): Likewise.
8231 (TARGET_WNOHANG): Likewise.
8232
8233 2013-07-04 Yao Qi <yao@codesourcery.com>
8234
8235 * Makefile.in (host_alias): Use @host_noncanonical@.
8236 (target_alias): Use @target_noncanonical@.
8237 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8238 ACX_NONCANONICAL_HOST.
8239 * configure: Regenerated.
8240
8241 Revert:
8242 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8243
8244 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8245 * configure: Rebuild.
8246 * Makefile.in (version_host, version_target): Get from configure.
8247 (version.c): Use $(version_host) and $(version_target).
8248
8249 2013-07-03 Pedro Alves <palves@redhat.com>
8250
8251 * Makefile.in (config.status): Depend on development.sh.
8252 * acinclude.m4: Include libmcheck.m4.
8253 * configure: Regenerate.
8254
8255 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8256
8257 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8258 attribute inside the parentheses.
8259 (winapi_DebugSetProcessKillOnExit): Ditto.
8260 (winapi_DebugBreakProcess): Ditto.
8261 (winapi_GenerateConsoleCtrlEvent): Ditto.
8262
8263 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8264
8265 * notif.h (notif_event): Add a dummy member to avoid compiler
8266 errors.
8267
8268 2013-07-01 Pedro Alves <palves@redhat.com>
8269
8270 * hostio.c (HOSTIO_PATH_MAX): Define.
8271 (require_filename, handle_open, handle_unlink, handle_readlink):
8272 Use it.
8273
8274 2013-07-01 Pedro Alves <palves@redhat.com>
8275
8276 * server.h: Include "pathmax.h".
8277 * linux-low.c: Don't include sys/param.h.
8278 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8279 MAXPATHLEN.
8280 * win32-low.c: Don't include sys/param.h.
8281 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8282
8283 2013-07-01 Pedro Alves <palves@redhat.com>
8284
8285 * event-loop.c: Don't check HAVE_UNISTD_H before including
8286 <unistd.h>.
8287 * gdbreplay.c: Likewise.
8288 * remote-utils.c: Likewise.
8289 * server.c: Likewise.
8290 * configure.ac: Don't check for unistd.h.
8291 * configure: Regenerate.
8292
8293 2013-06-28 Tom Tromey <tromey@redhat.com>
8294
8295 * Makefile.in (version.c): Use version.in, not
8296 common/version.in.
8297
8298 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8299
8300 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8301 * configure: Rebuild.
8302 * Makefile.in (version_host, version_target): Get from configure.
8303 (version.c): Use $(version_host) and $(version_target).
8304
8305 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8306
8307 Fix trace-status to output user name without trailing colon.
8308 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8309
8310 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8311
8312 Fix trace-status to output proper start-time and stop-time.
8313 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8314 output start time and stop time in hex as gdb expects.
8315
8316 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8317
8318 * tracepoint.c (build_traceframe_info_xml): Output trace state
8319 variables present in the trace buffer.
8320
8321 2013-06-24 Tom Tromey <tromey@redhat.com>
8322
8323 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8324 create-version.sh.
8325 (version.o): Remove.
8326 * gdbreplay.c: Include version.h.
8327 (version, host_name): Don't declare.
8328 * server.h: Include version.h.
8329 (version, host_name): Don't declare.
8330
8331 2013-06-12 Pedro Alves <palves@redhat.com>
8332
8333 * linux-x86-low.c (linux_is_elf64): Delete global.
8334 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8335 with local linux_pid_exe_is_elf_64_file use.
8336
8337 2013-06-11 Pedro Alves <palves@redhat.com>
8338
8339 * linux-low.c (regset_disabled, disable_regset): New functions.
8340 (regsets_fetch_inferior_registers)
8341 (regsets_store_inferior_registers): Use them.
8342 (initialize_regsets_info); Don't allocate the disabled_regsets
8343 array here.
8344 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8345 comment.
8346
8347 2013-06-11 Pedro Alves <palves@redhat.com>
8348
8349 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8350 xmalloc.
8351
8352 2013-06-11 Pedro Alves <palves@redhat.com>
8353
8354 * linux-x86-low.c (initialize_low_arch): Call
8355 init_registers_x32_avx_linux.
8356
8357 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8358
8359 Fix compatibility with Android Bionic.
8360 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8361 it is not empty.
8362
8363 2013-06-07 Pedro Alves <palves@redhat.com>
8364
8365 PR server/14823
8366 * Makefile.in (OBS): Add tdesc.o.
8367 (IPA_OBJS): Add tdesc-ipa.o.
8368 (tdesc-ipa.o): New rule.
8369 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8370 interface.
8371 * linux-low.c (new_inferior): Delete.
8372 (disabled_regsets, num_regsets): Delete.
8373 (linux_add_process): Adjust to set the new per-process
8374 new_inferior flag.
8375 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8376 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8377 was a stop. When calling arch_setup, switch the current inferior
8378 to the thread that got an event.
8379 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8380 (regsets_fetch_inferior_registers)
8381 (regsets_store_inferior_registers): New regsets_info parameter.
8382 Adjust to use it.
8383 (linux_register_in_regsets): New regs_info parameter. Adjust to
8384 use it.
8385 (register_addr, fetch_register, store_register): New usrregs_info
8386 parameter. Adjust to use it.
8387 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8388 parameter regs_info. Adjust to use it.
8389 (linux_fetch_registers): Get the current inferior's regs_info, and
8390 adjust to use it.
8391 (linux_store_registers): Ditto.
8392 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8393 (initialize_low): Don't initialize the target_regsets here. Call
8394 initialize_low_arch.
8395 * linux-low.h (target_regsets): Delete declaration.
8396 (struct regsets_info): New.
8397 (struct usrregs_info): New.
8398 (struct regs_info): New.
8399 (struct process_info_private) <new_inferior>: New field.
8400 (struct linux_target_ops): Delete the num_regs, regmap, and
8401 regset_bitmap fields. New field regs_info.
8402 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8403 * i387-fp.c (num_xmm_registers): Delete.
8404 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8405 calls to new interface.
8406 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8407 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8408 Infer the number of xmm registers from the regcache's target
8409 description.
8410 * i387-fp.h (num_xmm_registers): Delete.
8411 * inferiors.c (add_thread): Don't install the thread's regcache
8412 here.
8413 * proc-service.c (gregset_info): Fetch the current inferior's
8414 regs_info. Adjust to use it.
8415 * regcache.c: Include tdesc.h.
8416 (register_bytes, reg_defs, num_registers)
8417 (gdbserver_expedite_regs): Delete.
8418 (get_thread_regcache): If the thread doesn't have a regcache yet,
8419 create one, instead of aborting gdbserver.
8420 (regcache_invalidate_one): Rename to ...
8421 (regcache_invalidate_thread): ... this.
8422 (regcache_invalidate_one): New.
8423 (regcache_invalidate): Only invalidate registers of the current
8424 process.
8425 (init_register_cache): Add target_desc parameter, and use it.
8426 (new_register_cache): Ditto. Assert the target description has a
8427 non zero registers_size.
8428 (regcache_cpy): Add assertions. Adjust.
8429 (realloc_register_cache, set_register_cache): Delete.
8430 (registers_to_string, registers_from_string): Adjust.
8431 (find_register_by_name, find_regno, find_register_by_number)
8432 (register_cache_size): Add target_desc parameter, and use it.
8433 (free_register_cache_thread, free_register_cache_thread_one)
8434 (regcache_release, register_cache_size): New.
8435 (register_size): Add target_desc parameter, and use it.
8436 (register_data, supply_register, supply_register_zeroed)
8437 (supply_regblock, supply_register_by_name, collect_register)
8438 (collect_register_as_string, collect_register_by_name): Adjust.
8439 * regcache.h (struct target_desc): Forward declare.
8440 (struct regcache) <tdesc>: New field.
8441 (init_register_cache, new_register_cache): Add target_desc
8442 parameter.
8443 (regcache_invalidate_thread): Declare.
8444 (regcache_invalidate_one): Delete declaration.
8445 (regcache_release): Declare.
8446 (find_register_by_number, register_cache_size, register_size)
8447 (find_regno): Add target_desc parameter.
8448 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8449 declarations.
8450 * remote-utils.c: Include tdesc.h.
8451 (outreg, prepare_resume_reply): Adjust.
8452 * server.c: Include tdesc.h.
8453 (gdbserver_xmltarget): Delete declaration.
8454 (get_features_xml, process_serial_event): Adjust.
8455 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8456 declare.
8457 (struct process_info) <tdesc>: New field.
8458 (ipa_tdesc): Declare.
8459 * tdesc.c: New file.
8460 * tdesc.h: New file.
8461 * tracepoint.c: Include tdesc.h.
8462 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8463 (get_context_regcache): Adjust to pass ipa_tdesc down.
8464 (do_action_at_tracepoint): Adjust to get the register cache size
8465 from the context regcache's description.
8466 (traceframe_walk_blocks): Adjust to get the register cache size
8467 from the current trace frame's description.
8468 (traceframe_get_pc): Adjust to get current trace frame's
8469 description and pass it down.
8470 (gdb_collect): Adjust to get the register cache size from the
8471 IPA's description.
8472 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8473 (gdbserver_xmltarget): Delete.
8474 (initialize_low_tracepoint): Set the ipa's target description.
8475 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8476 (initialize_low_tracepoint): Set the ipa's target description.
8477 * linux-x86-low.c: Include tdesc.h.
8478 [__x86_64__] (is_64bit_tdesc): New.
8479 (ps_get_thread_area, x86_get_thread_area): Use it.
8480 (i386_cannot_store_register): Rename to ...
8481 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8482 (i386_cannot_fetch_register): Rename to ...
8483 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8484 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8485 to new interface.
8486 (target_regsets): Rename to ...
8487 (x86_regsets): ... this.
8488 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8489 interface.
8490 (x86_siginfo_fixup): Use is_64bit_tdesc.
8491 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8492 (tdesc_x32_avx_linux, tdesc_x32_linux)
8493 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8494 Declare.
8495 (x86_linux_update_xmltarget): Delete.
8496 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8497 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8498 (AMD64_LINUX_USER64_CS): New.
8499 (x86_linux_read_description): New, based on
8500 x86_linux_update_xmltarget.
8501 (same_process_callback): New.
8502 (x86_arch_setup_process_callback): New.
8503 (x86_linux_update_xmltarget): New.
8504 (x86_regsets_info): New.
8505 (amd64_linux_regs_info): New.
8506 (i386_linux_usrregs_info): New.
8507 (i386_linux_regs_info): New.
8508 (x86_linux_regs_info): New.
8509 (x86_arch_setup): Reimplement.
8510 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8511 (x86_emit_ops): Ditto.
8512 (the_low_target): Adjust. Install x86_linux_regs_info,
8513 x86_cannot_fetch_register, and x86_cannot_store_register.
8514 (initialize_low_arch): New.
8515 * linux-ia64-low.c (tdesc_ia64): Declare.
8516 (ia64_fetch_register): Adjust.
8517 (ia64_usrregs_info, regs_info): New globals.
8518 (ia64_regs_info): New function.
8519 (the_low_target): Adjust.
8520 (initialize_low_arch): New function.
8521 * linux-sparc-low.c (tdesc_sparc64): Declare.
8522 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8523 Adjust.
8524 (sparc_arch_setup): New function.
8525 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8526 (the_low_target): Adjust.
8527 (initialize_low_arch): New function.
8528 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8529 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8530 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8531 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8532 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8533 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8534 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8535 (tdesc_powerpc_isa205_vsx64l): Declare.
8536 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8537 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8538 (ppc_set_pc, ppc_get_hwcap): Adjust.
8539 (ppc_usrregs_info): Forward declare.
8540 (!__powerpc64__) ppc_regmap_adjusted: New global.
8541 (ppc_arch_setup): Adjust to the current process'es target
8542 description.
8543 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8544 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8545 (ppc_store_evrregset): Adjust.
8546 (target_regsets): Rename to ...
8547 (ppc_regsets): ... this, and make static.
8548 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8549 (ppc_regs_info): New function.
8550 (the_low_target): Adjust.
8551 (initialize_low_arch): New function.
8552 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8553 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8554 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8555 (tdesc_s390x_linux64v2): Declare.
8556 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8557 (s390_fill_gregset, s390_store_last_break): Adjust.
8558 (target_regsets): Rename to ...
8559 (s390_regsets): ... this, and make static.
8560 (s390_get_pc, s390_set_pc): Adjust.
8561 (s390_get_hwcap): New target_desc parameter, and use it.
8562 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8563 (s390_arch_setup): Adjust to set the current process'es target
8564 description. Don't adjust the regmap.
8565 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8566 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8567 (regs_info_3264): New globals.
8568 (s390_regs_info): New function.
8569 (the_low_target): Adjust.
8570 (initialize_low_arch): New function.
8571 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8572 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8573 [__mips64] (init_registers_mips_linux)
8574 (init_registers_mips_dsp_linux): Delete defines.
8575 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8576 (have_dsp): New global.
8577 (mips_read_description): New, based on mips_arch_setup.
8578 (mips_arch_setup): Reimplement.
8579 (get_usrregs_info): New function.
8580 (mips_cannot_fetch_register, mips_cannot_store_register)
8581 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8582 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8583 (target_regsets): Rename to ...
8584 (mips_regsets): ... this, and make static.
8585 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8586 (dsp_regs_info, regs_info): New globals.
8587 (mips_regs_info): New function.
8588 (the_low_target): Adjust.
8589 (initialize_low_arch): New function.
8590 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8591 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8592 Declare.
8593 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8594 (arm_read_description): New, with bits factored from
8595 arm_arch_setup.
8596 (arm_arch_setup): Reimplement.
8597 (target_regsets): Rename to ...
8598 (arm_regsets): ... this, and make static.
8599 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8600 (arm_regs_info): New function.
8601 (the_low_target): Adjust.
8602 (initialize_low_arch): New function.
8603 * linux-m68k-low.c (tdesc_m68k): Declare.
8604 (target_regsets): Rename to ...
8605 (m68k_regsets): ... this, and make static.
8606 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8607 (m68k_regs_info): New function.
8608 (m68k_arch_setup): New function.
8609 (the_low_target): Adjust.
8610 (initialize_low_arch): New function.
8611 * linux-sh-low.c (tdesc_sharch): Declare.
8612 (target_regsets): Rename to ...
8613 (sh_regsets): ... this, and make static.
8614 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8615 (sh_regs_info, sh_arch_setup): New functions.
8616 (the_low_target): Adjust.
8617 (initialize_low_arch): New function.
8618 * linux-bfin-low.c (tdesc_bfin): Declare.
8619 (bfin_arch_setup): New function.
8620 (bfin_usrregs_info, regs_info): New globals.
8621 (bfin_regs_info): New function.
8622 (the_low_target): Adjust.
8623 (initialize_low_arch): New function.
8624 * linux-cris-low.c (tdesc_cris): Declare.
8625 (cris_arch_setup): New function.
8626 (cris_usrregs_info, regs_info): New globals.
8627 (cris_regs_info): New function.
8628 (the_low_target): Adjust.
8629 (initialize_low_arch): New function.
8630 * linux-cris-low.c (tdesc_crisv32): Declare.
8631 (cris_arch_setup): New function.
8632 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8633 (cris_regs_info): New function.
8634 (the_low_target): Adjust.
8635 (initialize_low_arch): New function.
8636 * linux-m32r-low.c (tdesc_m32r): Declare.
8637 (m32r_arch_setup): New function.
8638 (m32r_usrregs_info, regs_info): New globals.
8639 (m32r_regs_info): Adjust.
8640 (initialize_low_arch): New function.
8641 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8642 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8643 (tic6x_usrregs_info): Forward declare.
8644 (tic6x_read_description): New function, based on ...
8645 (tic6x_arch_setup): ... this. Reimplement.
8646 (target_regsets): Rename to ...
8647 (tic6x_regsets): ... this, and make static.
8648 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8649 (tic6x_regs_info): New function.
8650 (the_low_target): Adjust.
8651 (initialize_low_arch): New function.
8652 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8653 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8654 (target_regsets): Rename to ...
8655 (xtensa_regsets): ... this, and make static.
8656 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8657 globals.
8658 (xtensa_arch_setup, xtensa_regs_info): New functions.
8659 (the_low_target): Adjust.
8660 (initialize_low_arch): New function.
8661 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8662 (nios2_arch_setup): Set the current process'es tdesc.
8663 (target_regsets): Rename to ...
8664 (nios2_regsets): ... this.
8665 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8666 (nios2_regs_info): New function.
8667 (the_low_target): Adjust.
8668 (initialize_low_arch): New function.
8669 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8670 (aarch64_arch_setup): Set the current process'es tdesc.
8671 (target_regsets): Rename to ...
8672 (aarch64_regsets): ... this.
8673 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8674 (aarch64_regs_info): New function.
8675 (the_low_target): Adjust.
8676 (initialize_low_arch): New function.
8677 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8678 globals.
8679 (target_regsets): Rename to ...
8680 (tile_regsets): ... this.
8681 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8682 (tile_regs_info): New function.
8683 (tile_arch_setup): Set the current process'es tdesc.
8684 (the_low_target): Adjust.
8685 (initialize_low_arch): New function.
8686 * spu-low.c (tdesc_spu): Declare.
8687 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8688 * win32-arm-low.c (tdesc_arm): Declare.
8689 (arm_arch_setup): New function.
8690 (the_low_target): Install arm_arch_setup instead of
8691 init_registers_arm.
8692 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8693 (init_windows_x86): Rename to ...
8694 (i386_arch_setup): ... this. Set `win32_tdesc'.
8695 (the_low_target): Adjust.
8696 * win32-low.c (win32_tdesc): New global.
8697 (child_add_thread): Don't create the thread cache here.
8698 (do_initial_child_stuff): Set the new process'es tdesc.
8699 * win32-low.h (struct target_desc): Forward declare.
8700 (win32_tdesc): Declare.
8701 * lynx-i386-low.c (tdesc_i386): Declare global.
8702 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8703 * lynx-low.c (lynx_tdesc): New global.
8704 (lynx_add_process): Set the new process'es tdesc.
8705 * lynx-low.h (struct target_desc): Forward declare.
8706 (lynx_tdesc): Declare global.
8707 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8708 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8709 * nto-low.c (nto_tdesc): New global.
8710 (do_attach): Set the new process'es tdesc.
8711 * nto-low.h (struct target_desc): Forward declare.
8712 (nto_tdesc): Declare.
8713 * nto-x86-low.c (tdesc_i386): Declare.
8714 (nto_x86_arch_setup): Set `nto_tdesc'.
8715
8716 2013-06-04 Gary Benson <gbenson@redhat.com>
8717
8718 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8719 to qSupported response when appropriate.
8720 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8721 with nonzero-length annex.
8722 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8723 arguments supplied in annex.
8724
8725 2013-05-31 Doug Evans <dje@google.com>
8726
8727 PR server/15594
8728 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8729 64 bits in 64-cross-32 environment.
8730
8731 2013-05-28 Pedro Alves <palves@redhat.com>
8732
8733 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8734 (aarch64-without-fpu.c): Delete rule.
8735 * configure.srv (aarch64*-*-linux*): Remove references to
8736 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8737 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8738 declaration.
8739
8740 2013-05-24 Pedro Alves <palves@redhat.com>
8741
8742 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8743 instead of strchr/decode_address. Error if the range isn't split
8744 with a ','. Don't assume there's be a ':' in the action.
8745
8746 2013-05-23 Yao Qi <yao@codesourcery.com>
8747 Pedro Alves <palves@redhat.com>
8748
8749 * linux-low.c (lwp_in_step_range): New function.
8750 (linux_wait_1): If the thread was range stepping and stopped
8751 outside the stepping range, report the stop to GDB. Otherwise,
8752 continue stepping. Add range stepping debug output.
8753 (linux_set_resume_request): Copy the step range from the resume
8754 request to the lwp.
8755 (linux_supports_range_stepping): New.
8756 (linux_target_ops) <supports_range_stepping>: Set to
8757 linux_supports_range_stepping.
8758 * linux-low.h (struct linux_target_ops)
8759 <supports_range_stepping>: New field.
8760 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8761 * linux-x86-low.c (x86_supports_range_stepping): New.
8762 (the_low_target) <supports_range_stepping>: Set to
8763 x86_supports_range_stepping.
8764 * server.c (handle_v_cont): Handle 'r' action.
8765 (handle_v_requests): Append ";r" if the target supports range
8766 stepping.
8767 * target.h (struct thread_resume) <step_range_start,
8768 step_range_end>: New fields.
8769 (struct target_ops) <supports_range_stepping>:
8770 New field.
8771 (target_supports_range_stepping): New macro.
8772
8773 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8774
8775 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8776 confusion in comment.
8777
8778 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8779
8780 * lynx-low.c (struct process_info_private): New type.
8781 (lynx_add_process): New function.
8782 (lynx_create_inferior, lynx_attach): Replace calls to
8783 add_process by calls to lynx_add_process.
8784 (lynx_resume): If PTID is null, then try using
8785 current_process()->private->last_wait_event_ptid.
8786 Add comments.
8787 (lynx_clear_inferiors): Delete. The contents of that function
8788 has been inlined in lynx_mourn;
8789 (lynx_wait_1): Save the ptid in the process's private data.
8790 (lynx_mourn): Free the process' private data. Replace call
8791 to lynx_clear_inferiors by call to clear_inferiors.
8792
8793 2013-05-17 Yao Qi <yao@codesourcery.com>
8794
8795 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8796 the right place.
8797
8798 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8799
8800 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8801 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8802 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8803 PT_TEXT_END_ADDR guards. Update comments.
8804 (linux_target_op) <read_offsets>: Conditionally define to
8805 linux_read_offsets if the target is UCLIBC and if it defines
8806 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8807
8808 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8809 Andrew Jenner <andrew@codesourcery.com>
8810
8811 * Makefile.in (SFILES): Add linux-nios2-low.c.
8812 (clean): Add action to delete nios2-linux.c.
8813 (nios2-linux.c): New rule.
8814 * configure.srv: Add nios2*-*-linux*.
8815 * linux-nios2-low.c: New.
8816
8817 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8818
8819 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8820
8821 2013-04-25 Hui Zhu <hui@codesourcery.com>
8822
8823 PR gdb/15186
8824 * ax.c (ax_printf): Add fflush.
8825
8826 2013-04-22 Tom Tromey <tromey@redhat.com>
8827
8828 * Makefile.in (SFILES): Add filestuff.c.
8829 (OBS): Add filestuff.o.
8830 (filestuff.o): New target.
8831 * config.in, configure: Rebuild.
8832 * configure.ac: Check for fdwalk, pipe2.
8833
8834 2013-04-17 Pedro Alves <palves@redhat.com>
8835
8836 * configure.ac (USE_THREAD_DB): Delete variable.
8837 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8838 Don't AC_SUBST USE_THREAD_DB.
8839 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8840 * config.in, configure: Regenerate.
8841
8842 2013-04-16 Pedro Alves <palves@redhat.com>
8843
8844 * linux-low.h (struct lwp_info) <thread_known>: Move under
8845 the USE_THREAD_DB #ifdef.
8846
8847 2013-04-16 Pedro Alves <palves@redhat.com>
8848
8849 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8850 (linux-low.o): Delete rule.
8851 * linux-low.h: Always include "gdb_thread_db.h" instead of
8852 conditionally including thread_db.h.
8853 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8854 HAVE_THREAD_DB_H.
8855
8856 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8857
8858 * Makefile.in (install-only): Fix make install regression.
8859
8860 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8861
8862 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8863 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8864 installation.
8865 * gdbserver.1: Remove.
8866
8867 2013-03-22 Pedro Alves <palves@redhat.com>
8868
8869 * linux-low.c (handle_extended_wait): Don't call
8870 linux_enable_event_reporting.
8871
8872 2013-03-15 Tony Theodore <tonyt@logyst.com>
8873
8874 PR build/9098:
8875 * Makefile.in (SHELL): Use @SHELL@.
8876
8877 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8878
8879 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8880 compiler warning.
8881
8882 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8883
8884 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8885 Remove extraneous NULL element.
8886
8887 2013-03-13 Yao Qi <yao@codesourcery.com>
8888
8889 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8890 'V' block in trace frame.
8891
8892 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8893
8894 * target.h (struct target_ops): Add btrace ops.
8895 (target_supports_btrace): New macro.
8896 (target_enable_btrace): New macro.
8897 (target_disable_btrace): New macro.
8898 (target_read_btrace): New macro.
8899 * gdbthread.h (struct thread_info): Add btrace field.
8900 * server.c: Include btrace-common.h.
8901 (handle_btrace_general_set): New function.
8902 (handle_btrace_enable): New function.
8903 (handle_btrace_disable): New function.
8904 (handle_general_set): Call handle_btrace_general_set.
8905 (handle_qxfer_btrace): New function.
8906 (struct qxfer qxfer_packets[]): Add btrace entry.
8907 * inferiors.c (remove_thread): Disable btrace.
8908 * linux-low: Include linux-btrace.h.
8909 (linux_low_enable_btrace): New function.
8910 (linux_low_read_btrace): New function.
8911 (linux_target_ops): Add btrace ops.
8912 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8913 Add srv_linux_btrace=yes.
8914 (x86_64-*-linux*): Add linux-btrace.o.
8915 Add srv_linux_btrace=yes.
8916 * configure.ac: Define HAVE_LINUX_BTRACE.
8917 * config.in: Regenerated.
8918 * configure: Regenerated.
8919
8920 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8921
8922 * server.c (handle_qxfer): Preserve error message if -3 is
8923 returned.
8924 (qxfer): Document the -3 return value.
8925
8926 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8927
8928 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8929 (linux_btrace_h): New variable.
8930 (linux-btrace.o): New rule.
8931
8932 2013-03-08 Stan Shebs <stan@codesourcery.com>
8933 Hafiz Abid Qadeer <abidh@codesourcery.com>
8934
8935 * tracepoint.c (trace_buffer_size): New global.
8936 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8937 (init_trace_buffer): Change to one-argument function. Allocate
8938 trace buffer memory.
8939 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8940 handle QTBuffer:size packet.
8941 (cmd_bigqtbuffer_size): New function.
8942 (initialize_tracepoint): Call init_trace_buffer with
8943 DEFAULT_TRACE_BUFFER_SIZE.
8944 * server.c (handle_query): Add QTBuffer:size in the
8945 supported packets.
8946
8947 2013-03-07 Yao Qi <yao@codesourcery.com>
8948
8949 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8950 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8951 of -1.
8952 (cmd_qtsp): Adjust condition. Do post increment.
8953 Set cur_action and cur_step_action back to 0.
8954
8955 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8956
8957 PR server/15236
8958 * linux-low.c (linux_write_memory): Return early success if LEN is
8959 zero.
8960
8961 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8962
8963 * configure.srv: Add x86_64-*-cygwin* as target.
8964
8965 2013-02-28 Tom Tromey <tromey@redhat.com>
8966
8967 * configure.ac: Invoke AC_SYS_LARGEFILE.
8968 * configure, config.in: Rebuild.
8969
8970 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8971
8972 * win32-low.c: Throughout, fix format strings and casts of
8973 printf-like functions to avoid type related warnings on all
8974 platforms.
8975 (get_child_debug_event): Print dwDebugEventCode as hex since
8976 that's how it's usually documented.
8977
8978 2013-02-28 Yao Qi <yao@codesourcery.com>
8979
8980 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8981 pulongest.
8982
8983 2013-02-27 Jiong Wang <jiwang@tilera.com>
8984
8985 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8986 (reg-tilegx32.c): New rule.
8987 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8988 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8989 different register info initializer according to elf class.
8990 (init_registers_tilgx32): New function. The tilegx32 register info
8991 initializer.
8992 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8993 (tile_store_gregset): Likewise.
8994
8995 2013-02-27 Yao Qi <yao@codesourcery.com>
8996
8997 * server.c (process_point_options): Print debug message when
8998 debug_threads is true.
8999
9000 2013-02-26 Yao Qi <yao@codesourcery.com>
9001
9002 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9003
9004 2013-02-19 Pedro Alves <palves@redhat.com>
9005 Kai Tietz <ktietz@redhat.com>
9006
9007 PR gdb/15161
9008
9009 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9010 instead of strtoul to extract address from packet.
9011 (process_serial_event) <'z'>: Likewise.
9012
9013 2013-02-18 Yao Qi <yao@codesourcery.com>
9014
9015 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9016
9017 2013-02-14 Pedro Alves <palves@redhat.com>
9018
9019 Plug memory leak.
9020
9021 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9022 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9023
9024 2013-02-14 Pedro Alves <palves@redhat.com>
9025
9026 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9027
9028 2013-02-14 Pedro Alves <palves@redhat.com>
9029
9030 * tracepoint.c (save_string): Delete.
9031 (add_tracepoint_action): Use savestring instead of save_string.
9032
9033 2013-02-12 Pedro Alves <palves@redhat.com>
9034
9035 * linux-xtensa-low.c: Ditto.
9036 * xtensa-xtregs.c: Ditto.
9037
9038 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9039
9040 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9041 thread_db.
9042
9043 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9044
9045 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9046 aarch64_num_wp_regs and aarch64_num_bp_regs to
9047 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9048
9049 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9050
9051 * linux-aarch64-low.c (ps_get_thread_area): Replace
9052 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9053
9054 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9055 Marcus Shawcroft <marcus.shawcroft@arm.com>
9056 Nigel Stephens <nigel.stephens@arm.com>
9057 Yufeng Zhang <yufeng.zhang@arm.com>
9058
9059 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9060 (aarch64.c, aarch64-without-fpu.c): New targets.
9061 * configure.srv (aarch64*-*-linux*): New.
9062 * linux-aarch64-low.c: New file.
9063
9064 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9065
9066 * linux-low.c (handle_extended_wait, linux_create_inferior)
9067 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9068 (dequeue_one_deferred_signal, linux_resume_one_thread)
9069 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9070 (linux_tracefork_grandchild, linux_test_for_tracefork)
9071 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9072 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9073 where the argument is 0.
9074
9075 2013-01-25 Yao Qi <yao@codesourcery.com>
9076
9077 * event-loop.c: Include "queue.h".
9078 (gdb_event_p): New typedef.
9079 (struct gdb_event) <next_event>: Remove.
9080 (event_queue): Change to QUEUE(gdb_event_p).
9081 (async_queue_event): Remove.
9082 (gdb_event_xfree): New.
9083 (initialize_event_loop): New.
9084 (process_event): Use API from QUEUE.
9085 (wait_for_event): Likewise.
9086 * server.c (main): Call initialize_event_loop.
9087 * server.h (initialize_event_loop): Declare.
9088
9089 2013-01-18 Yao Qi <yao@codesourcery.com>
9090
9091 * ax.h (struct eval_agent_expr_context): New.
9092 (gdb_eval_agent_expr): Update declaration.
9093 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9094 TFRAME. Add new argument CTX.
9095 * server.h (struct eval_agent_expr_context): Declare.
9096 (agent_mem_read, agent_tsv_read): Update declaration.
9097 (agent_mem_read_string): Likewise.
9098 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9099 (add_traceframe_block): Add new argument TPOINT.
9100 Increase TPOINT->traceframe_usage.
9101 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9102 eval_tracepoint_agent_expr.
9103 (condition_true_at_tracepoint): Likewise.
9104 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9105 (agent_mem_read_string, agent_tsv_read): Likewise.
9106
9107 2013-01-16 Yao Qi <yao@codesourcery.com>
9108
9109 * linux-low.c (linux_resume_one_lwp): Don't check
9110 'lwp->bp_reinsert != 0'.
9111
9112 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9113 Pedro Alves <palves@redhat.com>
9114
9115 * lynx-low.c (ptrace_request_to_str): Define a temporary
9116 macro and use it to simplify this function's implementation.
9117
9118 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9119
9120 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9121 sets errno.
9122
9123 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9124
9125 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9126
9127 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9128
9129 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9130
9131 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9132
9133 * lynx-low.c (lynx_resume): Use the resume_info parameter
9134 to determine the ptid for the lynx_ptrace call, unless
9135 it is equal to minus_one_ptid, in which case we use the
9136 ptid of the current_inferior.
9137 (lynx_wait_1): After having received a thread create/exit
9138 event, resume the inferior's execution using the signaling
9139 thread's ptid, rather than the old ptid.
9140
9141 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c (lynx_resume): Delete variable ret.
9144
9145 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9146
9147 * gdbreplay.c (gdbreplay_version): Update copyright year.
9148 * server.c (gdbserver_version): Likewise.
9149
9150 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9151
9152 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9153 new thread.
9154
9155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9156
9157 * lynx-low.c (ptrace_request_to_str): Add handling for
9158 PTRACE_GETTRACESIG.
9159
9160 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9161
9162 * lynx-low.c (lynx_attach): Delete variable new_process.
9163
9164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9165
9166 * lynx-low.c (lynx_create_inferior): Delete variable
9167 new_process.
9168
9169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9170
9171 * lynx-low.c (ptrace_request_to_str): Do not handle
9172 PTRACE_GETTHREADLIST if this macro does not exist.
9173
9174 2012-12-15 Yao Qi <yao@codesourcery.com>
9175
9176 * Makefile.in (OBS): Add notif.o.
9177 * notif.c, notif.h: New.
9178 * server.c: Include "notif.h".
9179 (struct vstop_notif) <next>: Remove.
9180 <base>: New field.
9181 (queue_stop_reply): Update.
9182 (push_event, send_next_stop_reply): Remove.
9183 (discard_queued_stop_replies): Update.
9184 (notif_stop): New variable.
9185 (handle_v_stopped): Remove.
9186 (handle_v_requests): Don't call handle_v_stopped. Call
9187 handle_ack_notif instead.
9188 (queue_stop_reply_callback): Call notif_event_enque instead
9189 of queue_stop_reply.
9190 (handle_status): Don't call send_next_stop_reply, call
9191 notif_write_event instead.
9192 (kill_inferior_callback): Likewise.
9193 (detach_or_kill_inferior_callback): Likewise.
9194 (main): Call initialize_notif.
9195 (process_serial_event): Call QUEUE_is_empty.
9196 (handle_target_event): Call notif_push instead of push event.
9197 * server.h (push_event): Remove declaration.
9198
9199 2012-12-10 Tom Tromey <tromey@redhat.com>
9200
9201 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9202 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9203 macros.
9204 (.c.o): Rewrite.
9205 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9206 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9207 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9208 (amd64-linux-ipa.o, ax.o): Rewrite.
9209 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9210 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9211 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9212 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9213 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9214 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9215 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9216 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9217 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9218 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9219 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9220 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9221 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9222 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9223 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9224 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9225 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9226 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9227 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9228 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9229 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9230 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9231 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9232 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9233 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9234 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9235 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9236 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9237 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9238 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9239 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9240 (reg-tilegx.o): Remove.
9241 (all_object_files): New macro.
9242 Include .deps files.
9243 * aclocal.m4, configure: Rebuild.
9244 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9245 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9246 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9247
9248 2012-12-05 Tom Tromey <tromey@redhat.com>
9249
9250 PR gdb/14917:
9251 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9252
9253 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9254
9255 * configure.ac: Check for linux/perf_event.h.
9256 * config.in: Regenerated.
9257 * configure: Regenerated.
9258
9259 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9260
9261 * hostio.c (handle_readlink): Decrease buffer size
9262 parameter passed to readlink by one byte.
9263
9264 2012-11-26 Yao Qi <yao@codesourcery.com>
9265
9266 * configure.ac (build_warnings): Append '-Wempty-body'.
9267 * configure: Regenerated.
9268 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9269 body.
9270
9271 2012-11-15 Pierre Muller <muller@sourceware.org>
9272
9273 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9274 * config.in: Regenerate.
9275 * configure: Regenerate.
9276 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9277 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9278 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9279 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9280 header.
9281 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9282 instead of <sys/wait.h> header.
9283 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9284
9285 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9286
9287 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9288 (various make rules): Remove -DGDBSERVER
9289
9290 2012-11-09 Yao Qi <yao@codesourcery.com>
9291
9292 * spu-low.c (current_ptid): Move it to ..
9293 * gdbthread.h: ... here. New.
9294 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9295 * server.c (myresume, process_serial_event): Likewise.
9296 * thread-db.c (thread_db_find_new_threads): Likewise.
9297 * tracepoint.c (run_inferior_command): Likewise.
9298
9299 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9300
9301 * server.c (handle_search_memory_1): Include access length in
9302 warning message.
9303
9304 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9305
9306 * linux-crisv32-low.c: Fix compile errors.
9307
9308 2012-09-04 Yao Qi <yao@codesourcery.com>
9309
9310 * tracepoint.c (cmd_qtsv): Adjust debug message.
9311 Don't check CUR_TPOINT.
9312
9313 2012-08-28 Yao Qi <yao@codesourcery.com>
9314
9315 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9316 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9317 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9318 Remove declarations of xmalloc, xreallloc, xstrdup and
9319 freeargv.
9320 * Makefile.in (libiberty_h): New.
9321 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9322 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9323
9324 2012-08-23 Yao Qi <yao@codesourcery.com>
9325
9326 * server.h: Remove declaration of 'xsnprintf'.
9327
9328 2012-08-22 Keith Seitz <keiths@redhat.com>
9329
9330 * server.h: Include build-gnulib-gbserver/config.h.
9331 * gdbreplay.c: Likewise.
9332
9333 2012-08-08 Doug Evans <dje@google.com>
9334
9335 * Makefile.in (SFILES): Add gdb_vecs.c.
9336 (OBS): Add gdb_vecs.o.
9337 (gdb_vecs_h, host_defs_h): New variables.
9338 (thread-db.o): Add $(gdb_vecs_h) dependency.
9339 (gdb_vecs.o): New rule.
9340 * thread-db.c: #include "gdb_vecs.h".
9341 (thread_db_load_search): Use a vector to iterate over path elements.
9342 Handle text appearing after "$pdir".
9343
9344 * configure.ac: Add check for strstr.
9345 * config.in: Regenerate.
9346 * configure: Regenerate.
9347
9348 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9349
9350 * hostio.c (handle_pread): If pread fails, fall back to attempting
9351 lseek/read.
9352 (handle_pwrite): Likewise for pwrite.
9353
9354 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9355
9356 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9357 between unsupported TYPE and unimplementable ADDR/LEN combination.
9358 (arm_insert_point): Act on new return value.
9359
9360 2012-07-31 Pedro Alves <palves@redhat.com>
9361
9362 * server.c (process_point_options): Only skip tokens if we find
9363 one that is unrecognized. Don't treat 'X' specially while
9364 skipping unrecognized tokens.
9365
9366 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9367
9368 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9369 to 4-byte-align HW breakpoint addresses for Thumb.
9370
9371 2012-07-27 Yao Qi <yao@codesourcery.com>
9372
9373 PR remote/14161.
9374
9375 * server.h: Declare gdb_agent_about_to_close.
9376 * target.c (kill_inferior): Include "agent.h".
9377 New. Send command 'kill'.
9378 * target.h (kill_inferior): Removed macro.
9379 * tracepoint.c (gdb_agent_about_to_close): New.
9380 (gdb_agent_helper_thread): Handle command 'close'.
9381 Wait endlessly until the inferior stops.
9382 Install gdb_agent_remove_socket to atexit hook.
9383 (agent_socket_name): New static variable.
9384 (gdb_agent_socket_init): Replace local variable 'name' with
9385 'agent_socket_name'.
9386 (gdb_agent_remove_socket): New.
9387
9388 2012-07-27 Yao Qi <yao@codesourcery.com>
9389
9390 * server.c (process_point_options): Stop at 'X' when parsing.
9391
9392 2012-07-19 Michael Eager <eager@eagercon.com>
9393
9394 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9395 to hw_execute.
9396 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9397 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9398 hardware breakpoint.
9399
9400 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9401
9402 * gdbserver/linux-low.c (initialize_low): Call
9403 linux_ptrace_init_warnings.
9404
9405 2012-07-02 Doug Evans <dje@google.com>
9406
9407 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9408 pointer to int.
9409
9410 2012-07-02 Stan Shebs <stan@codesourcery.com>
9411
9412 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9413 (ax.o): Add it to build rule.
9414 (ax-ipa.o): Ditto.
9415 (OBS): Add format.o.
9416 (IPA_OBS): Add format.o.
9417 * server.c (handle_query): Claim support for breakpoint commands.
9418 (process_point_options): Add command case.
9419 (process_serial_event): Leave running if there are printfs in
9420 effect.
9421 * mem-break.h (any_persistent_commands): Declare.
9422 (add_breakpoint_commands): Declare.
9423 (gdb_no_commands_at_breakpoint): Declare.
9424 (run_breakpoint_commands): Declare.
9425 * mem-break.c (struct point_command_list): New struct.
9426 (struct breakpoint): New field command_list.
9427 (any_persistent_commands): New function.
9428 (add_commands_to_breakpoint): New function.
9429 (add_breakpoint_commands): New function.
9430 (gdb_no_commands_at_breakpoint): New function.
9431 (run_breakpoint_commands): New function.
9432 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9433 locally.
9434 * ax.c: Include format.h.
9435 (ax_printf): New function.
9436 (gdb_eval_agent_expr): Add printf opcode.
9437
9438 2012-06-13 Yao Qi <yao@codesourcery.com>
9439
9440 * server.c (start_inferior): Remove duplicated writes to fields
9441 'last_resume_kind' and 'last_status' of 'current_inferior'.
9442
9443 2012-06-12 Yao Qi <yao@codesourcery.com>
9444 Pedro Alves <palves@redhat.com>
9445
9446 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9447 comment.
9448 * server.c (handle_v_cont): Extend comment.
9449
9450 2012-06-11 Yao Qi <yao@codesourcery.com>
9451
9452 * linux-low.c (linux_attach): Add 'static'.
9453
9454 2012-06-06 Yao Qi <yao@codesourcery.com>
9455
9456 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9457
9458 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9459
9460 Fix gcc -flto compilation warning.
9461 * server.c (main): Make variable multi_mode and attach volatile.
9462
9463 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9464
9465 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9466 if the platform doesn't know about it.
9467
9468 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9469
9470 * Makefile.in (SFILES): Add linux-tile-low.c.
9471 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9472 * configure.srv: Handle tilegx-*-linux*.
9473 * linux-tile-low.c: New file.
9474
9475 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9476
9477 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9478
9479 2012-05-24 Pedro Alves <palves@redhat.com>
9480
9481 PR gdb/7205
9482
9483 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9484
9485 2012-05-24 Pedro Alves <palves@redhat.com>
9486
9487 PR gdb/7205
9488
9489 Replace target_signal with gdb_signal throughout.
9490
9491 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9492
9493 * linux-low.c (linux_store_registers): Avoid the copying sequence
9494 when no data has been retrieved by ptrace.
9495
9496 2012-05-22 Will Deacon <will.deacon@arm.com>
9497
9498 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9499 Include asm/ptrace.h.
9500 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9501 already defined.
9502
9503 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9504
9505 * linux-low.c (linux_store_registers): Don't re-retrieve data
9506 with ptrace that has already been obtained from /proc. Always
9507 copy any data retrieved with ptrace to the buffer supplied.
9508
9509 2012-05-11 Yao Qi <yao@codesourcery.com>
9510 Pedro Alves <palves@redhat.com>
9511
9512 * linux-low.c (enum stopping_threads_kind): New.
9513 (stopping_threads): Change type to `enum stopping_threads_kind'.
9514 (handle_extended_wait): If stopping and suspending threads, leave
9515 the new_lwp suspended too.
9516 (linux_wait_for_event): Adjust.
9517 (stop_all_lwps): Set `stopping_threads' to
9518 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9519 whether we're suspending threads or just stopping them. Assert no
9520 recursion happens.
9521
9522 2012-04-29 Yao Qi <yao@codesourcery.com>
9523
9524 * server.h: Move some code to ...
9525 * gdbthread.h: ... here. New.
9526 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9527 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9528 (nto-low.o, win32-low.o): Likewise.
9529 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9530 * regcache.c, remote-utils.c, server.c: Likewise.
9531 * target.c, tracepoint.c, win32-low.c: Likewise.
9532
9533 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9534
9535 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9536 (PTRACE_ARG4_TYPE): Likewise.
9537 (PTRACE_XFER_TYPE): Likewise.
9538 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9539 ptrace to PTRACE_ARG3_TYPE.
9540 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9541 (PTRACE_ARG4_TYPE): Likewise.
9542 (PTRACE_XFER_TYPE): Likewise.
9543 (linux_detach_one_lwp): Cast fourth argument of
9544 ptrace to long then PTRACE_ARG4_TYPE.
9545 (regsets_fetch_inferior_registers): Cast third argument of
9546 ptrace to long then PTRACE_ARG3_TYPE.
9547 (regsets_store_inferior_registers): Likewise.
9548
9549 2012-04-20 Pedro Alves <palves@redhat.com>
9550
9551 * configure: Regenerate.
9552
9553 2012-04-19 Pedro Alves <palves@redhat.com>
9554
9555 * Makefile.in (GNULIB_BUILDDIR): New.
9556 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9557 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9558 (all, install-only, uninstall, clean-info, all-lib, clean): No
9559 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9560 (maintainer-clean realclean distclean): Use subdir_do.
9561 (subdir_do): New.
9562 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9563 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9564 * acinclude.m4: Include acx_configure_dir.m4.
9565 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9566 calls. Call AC_PROG_RANLIB. Configure gnulib using
9567 ACX_CONFIGURE_DIR.
9568 (GNULIB): New.
9569 (GNULIB_STDINT_H): Adjust.
9570 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9571 * gdbreplay.c: Include build-gnulib/config.h.
9572 * server.h: Likewise.
9573 * aclocal.m4: Regenerate.
9574 * config.in: Regenerate.
9575 * configure: Regenerate.
9576
9577 2012-04-19 Pedro Alves <palves@redhat.com>
9578
9579 * Makefile.in (LIBGNU, INCGNU): Adjust.
9580 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9581 (all, install-only, uninstall, clean-info, all-lib, clean)
9582 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9583 * configure.ac: Adjust AC_OUTPUT output.
9584 * aclocal.m4: Regenerate.
9585 * configure: Regenerate.
9586
9587 2012-04-19 Pedro Alves <palves@redhat.com>
9588
9589 * Makefile.in (generated_files): New.
9590 (server_h): Remove the explicit dependency on config.h, and depend
9591 on $generated_files.
9592
9593 2012-04-19 Pedro Alves <palves@redhat.com>
9594
9595 * Makefile.in (INCGNU): Add -Ignulib.
9596
9597 2012-04-19 Pedro Alves <palves@redhat.com>
9598
9599 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9600 (INCGNU): ... this, and spell out -I here.
9601 (GNULIB_LIB): Rename to ...
9602 (LIBGNU): ... this.
9603 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9604
9605 2012-04-19 Pedro Alves <palves@redhat.com>
9606
9607 * config.in: Regenerate.
9608
9609 2012-04-19 Pedro Alves <palves@redhat.com>
9610
9611 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9612 * server.h (memmem): Remove declaration.
9613 * config.in: Regenerate.
9614 * configure: Regenerate.
9615
9616 2012-04-19 Yao Qi <yao@codesourcery.com>
9617
9618 * Makefile.in (SFILES): Add common/vec.c.
9619 (OBS): Add vec.o.
9620 (vec.o): New rule.
9621
9622 2012-04-19 Yao Qi <yao@codesourcery.com>
9623
9624 * remote-utils.c (prepare_resume_reply): Replace with macro
9625 target_core_of_thread.
9626 * server.c (handle_qxfer_threads_proper): Likewise.
9627 * target.h (traget_core_of_thread): New macro.
9628
9629 2012-04-18 Pedro Alves <palves@redhat.com>
9630
9631 * aclocal.m4: Regenerate.
9632 * configure: Regenerate.
9633
9634 2012-04-16 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9637 duplicated on address.
9638
9639 2012-04-16 Yao Qi <yao@codesourcery.com>
9640
9641 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9642 (struct tracepoint_action_ops) <send>: New field.
9643 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9644 (agent_expr_send, x_tracepoint_action_send): New.
9645 (l_tracepoint_action_send): New.
9646 (cmd_qtdp): Download and install tracepoint
9647 according to `use_agent'.
9648 (run_inferior_command): Add one more parameter `len'.
9649 Update callers.
9650 (tracepoint_send_agent): New.
9651 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9652
9653 2012-04-16 Yao Qi <yao@codesourcery.com>
9654
9655 * tracepoint.c (download_tracepoints): Moved to ...
9656 (cmd_qtstart): ... here.
9657
9658 2012-04-14 Yao Qi <yao@codesourcery.com>
9659
9660 * tracepoint.c: Include inttypes.h.
9661 (struct collect_memory_action): Use sized types.
9662 (struct tracepoint): Likewise.
9663 (cmd_qtdp, stop_tracing): Update print specifiers.
9664 (cmd_qtp, response_tracepoint): Likewise.
9665 (collect_data_at_tracepoint): Likewise.
9666 (collect_data_at_step): Likewise.
9667
9668 2012-04-14 Yao Qi <yao@codesourcery.com>
9669
9670 Import gnulib module inttypes.
9671 * aclocal.m4, config.in, configure: Regenerated.
9672
9673 2012-04-14 Yao Qi <yao@codesourcery.com>
9674
9675 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9676 Makefile and config.status at last.
9677
9678 2012-04-13 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c: Include stdint.h unconditionally.
9681
9682 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9683
9684 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9685 on BFD_HAVE_SYS_PROCFS_TYPE.
9686 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9687 * configure: Regenerate.
9688 * config.in: Likewise.
9689
9690 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9691
9692 * Makefile.in (clean): Also remove x32.c x32-linux.c
9693 x32-avx.c x32-avx-linux.c.
9694 (x32.o): New target.
9695 (x32.c): Likewise.
9696 (x32-linux.o): Likewise.
9697 (x32-linux.c): Likewise.
9698 (x32-avx.o): Likewise.
9699 (x32-avx.c): Likewise.
9700 (x32-avx-linux.o): Likewise.
9701 (x32-avx-linux.c): Likewise.
9702
9703 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9704 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9705 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9706 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9707 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9708 i386/x32-avx-linux.xml.
9709
9710 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9711 (init_registers_x32_avx_linux): Likwise.
9712 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9713 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9714
9715 2012-04-13 Pedro Alves <palves@redhat.com>
9716
9717 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9718 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9719 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9720 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9721 the sub-make.
9722
9723 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9724
9725 * linux-x86-low.c (compat_x32_clock_t): New.
9726 (compat_x32_siginfo_t): Likewise.
9727 (compat_x32_siginfo_from_siginfo): Likewise.
9728 (siginfo_from_compat_x32_siginfo): Likewise.
9729 (linux_is_elf64): Likewise.
9730 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9731 and siginfo_from_compat_x32_siginfo for x32.
9732 (x86_arch_setup): Set linux_is_elf64.
9733
9734 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9735
9736 PR gdb/13969
9737 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9738 e_machine field.
9739 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9740 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9741 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9742 compatible with process.
9743
9744 2012-04-12 Yao Qi <yao@codesourcery.com>
9745
9746 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9747 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9748 (install-only, install-info, clean): Handle sub dir gnulib.
9749 (all-lib, am--refresh): New targets.
9750 (memmem.o): Remove target.
9751 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9752 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9753 (AC_REPLACE_FUNCS): Remove memmem.
9754 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9755 (AC_OUTPUT): Generate Makefile in gnulib/.
9756 * aclocal.m4, config.in, configure: Regenerated.
9757
9758 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9759
9760 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9761
9762 2012-04-05 Pedro Alves <palves@redhat.com>
9763
9764 -Werror=strict-aliasing
9765
9766 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9767 pointer.
9768
9769 2012-04-04 Pedro Alves <palves@redhat.com>
9770
9771 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9772 (sparc_store_gregset_from_stack, sparc_store_gregset)
9773 (sparc_breakpoint_at): Fix formatting.
9774
9775 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9776
9777 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9778 are available.
9779 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9780 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9781 * config.in: Regenerate.
9782 * configure: Likewise.
9783
9784 2012-03-29 Pedro Alves <palves@redhat.com>
9785
9786 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9787 Correct ptrace arguments.
9788
9789 2012-03-28 Pedro Alves <palves@redhat.com>
9790
9791 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9792 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9793 (IA64_FR1_REGNUM): New defines.
9794 (ia64_fetch_register): New.
9795 (the_low_target): Install it.
9796 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9797 field.
9798 * linux-low.c (linux_fetch_registers): Try the
9799 the_low_target.fetch_register hook first.
9800
9801 * linux-arm-low.c (the_low_target): Adjust.
9802 * linux-bfin-low.c (the_low_target): Adjust.
9803 * linux-cris-low.c (the_low_target): Adjust.
9804 * linux-crisv32-low.c (the_low_target): Adjust.
9805 * linux-m32r-low.c (the_low_target): Adjust.
9806 * linux-m68k-low.c (the_low_target): Adjust.
9807 * linux-mips-low.c (the_low_target): Adjust.
9808 * linux-ppc-low.c (the_low_target): Adjust.
9809 * linux-s390-low.c (the_low_target): Adjust.
9810 * linux-sh-low.c (the_low_target): Adjust.
9811 * linux-sparc-low.c (the_low_target): Adjust.
9812 * linux-tic6x-low.c (the_low_target): Adjust.
9813 * linux-x86-low.c (the_low_target): Adjust.
9814 * linux-xtensa-low.c (the_low_target): Adjust.
9815
9816 2012-03-26 Pedro Alves <palves@redhat.com>
9817
9818 * server.c (handle_qxfer_libraries): Don't bail early if
9819 the_target->qxfer_libraries_svr4 is not NULL.
9820
9821 2012-03-26 Pedro Alves <palves@redhat.com>
9822
9823 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9824
9825 2012-03-23 Pedro Alves <palves@redhat.com>
9826
9827 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9828 "library-list-svr4" element's start tag when the the DSO list is
9829 empty.
9830
9831 2012-03-23 Pedro Alves <palves@redhat.com>
9832
9833 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9834 a variable whose type size is the same as the inferior's pointer
9835 size.
9836
9837 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9838
9839 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9840 struct siginfo.
9841 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9842 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9843 * linux-low.h: Include <signal.h>.
9844 (struct siginfo): Remove forward declaration.
9845 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9846 struct siginfo.
9847
9848 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9849
9850 * .gitignore: Ignore more files.
9851
9852 2012-03-19 Pedro Alves <palves@redhat.com>
9853 Jan Kratochvil <jan.kratochvil@redhat.com>
9854
9855 * server.c (cont_thread, general_thread): Add describing comments.
9856 (start_inferior): Clear `cont_thread'.
9857 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9858 of a process.
9859
9860 2012-03-15 Yao Qi <yao@codesourcery.com>
9861
9862 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9863 handling to ...
9864 (cmd_qtdp): ... here.
9865
9866 2012-03-15 Yao Qi <yao@codesourcery.com>
9867
9868 * tracepoint.c (struct tracepoint_action_ops): New.
9869 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9870 (m_tracepoint_action_download): New.
9871 (r_tracepoint_action_download): New.
9872 (x_tracepoint_action_download): New.
9873 (l_tracepoint_action_download): New.
9874 (add_tracepoint_action): Install `action->ops' according type.
9875 (download_tracepoint_1): Move code `download' function pointer
9876 of various tracepoint_action_ops.
9877
9878 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9881 linux_ptrace_attach_warnings.
9882
9883 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9884
9885 * Makefile.in (linux-ptrace.o): New.
9886 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9887 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9888 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9889 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9890 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9891 of these targets.
9892 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9893
9894 2012-03-08 Yao Qi <yao@codesourcery.com>
9895 Pedro Alves <palves@redhat.com>
9896
9897 Fix PR server/13392.
9898 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9899 offset of JMP insn.
9900 * tracepoint.c (remove_tracepoint): New.
9901 (cmd_qtdp): Call remove_tracepoint when failed to install.
9902
9903 2012-03-07 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (get_detach_signal): New.
9906 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9907 Pass on pending signals to PTRACE_DETACH. Check the result of the
9908 ptrace call.
9909 * server.c (program_signals, program_signals_p): New.
9910 (handle_general_set): Handle QProgramSignals.
9911 * server.h (program_signals, program_signals_p): Declare.
9912
9913 2012-03-05 Pedro Alves <palves@redhat.com>
9914 Jan Kratochvil <jan.kratochvil@redhat.com>
9915
9916 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9917 New comment why.
9918
9919 2012-03-03 Yao Qi <yao@codesourcery.com>
9920
9921 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9922 agent_look_up_symbols.
9923
9924 2012-03-03 Yao Qi <yao@codesourcery.com>
9925
9926 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9927 (linux-x86-low.o): Likewise.
9928 * server.h: Remove in_process_agent_loaded.
9929 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9930 common/agent.c.
9931 Update callers.
9932
9933 2012-03-03 Yao Qi <yao@codesourcery.com>
9934
9935 * tracepoint.c (gdb_agent_capability): New global.
9936 (in_process_agent_loaded_ust): Renamed to
9937 `in_process_agent_supports_ust'.
9938 Update callers.
9939 (in_process_agent_supports_ust): Call agent_capability_check.
9940 (clear_installed_tracepoints): Assert that agent supports
9941 agent.
9942
9943 2012-03-03 Yao Qi <yao@codesourcery.com>
9944
9945 * linux-low.c (linux_supports_agent): New.
9946 (linux_target_ops): Initialize field `supports_agent' with
9947 linux_supports_agent.
9948 * target.h (struct target_ops) <supports_agent>: New.
9949 (target_supports_agent): New macro.
9950 * server.c (handle_general_set): Handle packet 'QAgent'.
9951 (handle_query): Send `QAgent+'.
9952 * Makefile.in (server.o): Depends on agent.h.
9953
9954 2012-03-03 Yao Qi <yao@codesourcery.com>
9955
9956 * Makefile.in (OBS): Add agent.o.
9957 Add new rule for agent.o.
9958 Track dependence of tracepoint.c on agent.h.
9959 * tracepoint.c (run_inferior_command_1):
9960 (run_inferior_command): Call agent_run_command.
9961 (gdb_ust_connect_sync_socket): Deleted. Move it to
9962 common/agent.c.
9963 (resume_thread, stop_thread): Likewise.
9964 (gdb_ust_socket_init): Renamed to ...
9965 (gdb_agent_socket_init): ... New.
9966 (gdb_ust_thread): Renamed to ...
9967 (gdb_agent_helper_thread): ... New.
9968 (gdb_ust_init): Move some code to ...
9969 (gdb_agent_init): ... here. New.
9970 [HAVE_UST]: Call gdb_ust_init.
9971 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9972 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9973 * config.in, configure: Regenerated.
9974
9975 2012-03-02 Pedro Alves <palves@redhat.com>
9976
9977 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9978 * linux-low.c (struct simple_pid_list): New.
9979 (stopped_pids): New a struct simple_pid_list pointer.
9980 (add_to_pid_list, pull_pid_from_list): New.
9981 (handle_extended_wait): Don't assume the first signal new children
9982 report is SIGSTOP. Adjust call to pull_pid_from_list.
9983 (linux_wait_for_lwp): Adjust.
9984
9985 2012-03-02 Yao Qi <yao@codesourcery.com>
9986
9987 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9988 debug log.
9989
9990 2012-03-02 Yao Qi <yao@codesourcery.com>
9991
9992 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9993 `stop_pc' and `tpoint'. Update caller.
9994
9995 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9996
9997 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9998 * linux-low.c (use_linux_regsets): New macro.
9999 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10000 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10001 (linux_register_in_regsets): New function.
10002 (usr_fetch_inferior_registers): Skip registers covered by
10003 regsets.
10004 (usr_store_inferior_registers): Likewise.
10005 (usr_fetch_inferior_registers): New macro.
10006 (usr_store_inferior_registers): Likewise.
10007 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10008 (linux_store_registers): Likewise.
10009 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10010 prototype.
10011 (init_registers_mips64_dsp_linux): Likewise.
10012 (init_registers_mips_linux): New macro.
10013 (init_registers_mips_dsp_linux): Likewise.
10014 (mips_dsp_num_regs): Likewise.
10015 (DSP_BASE, DSP_CONTROL): New fallback macros.
10016 (mips_base_regs): New macro.
10017 (mips_regmap): Use it. Fix the size.
10018 (mips_dsp_regmap): New variable.
10019 (mips_dsp_regset_bitmap): Likewise.
10020 (mips_arch_setup): New function.
10021 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10022 than mips_regmap.
10023 (mips_cannot_store_register): Likewise.
10024 (the_low_target): Update .arch_setup, .num_regs and .regmap
10025 initializers. Add .regset_bitmap initializer.
10026 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10027 initializer.
10028 * linux-bfin-low.c (the_low_target): Likewise.
10029 * linux-cris-low.c (the_low_target): Likewise.
10030 * linux-crisv32-low.c (the_low_target): Likewise.
10031 * linux-ia64-low.c (the_low_target): Likewise.
10032 * linux-m32r-low.c (the_low_target): Likewise.
10033 * linux-m68k-low.c (the_low_target): Likewise.
10034 * linux-ppc-low.c (the_low_target): Likewise.
10035 * linux-s390-low.c (the_low_target): Likewise.
10036 * linux-sh-low.c (the_low_target): Likewise.
10037 * linux-sparc-low.c (the_low_target): Likewise.
10038 * linux-tic6x-low.c (the_low_target): Likewise.
10039 * linux-x86-low.c (the_low_target): Likewise.
10040 * linux-xtensa-low.c (the_low_target): Likewise.
10041 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10042 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10043 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10044 srv_xmlfiles.
10045 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10046 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10047
10048 2012-02-29 Yao Qi <yao@codesourcery.com>
10049 Pedro Alves <palves@redhat.com>
10050
10051 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10052 `step_over_finished' is true.
10053
10054 2012-02-27 Pedro Alves <palves@redhat.com>
10055
10056 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10057 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10058
10059 2012-02-27 Pedro Alves <palves@redhat.com>
10060
10061 PR server/9684
10062 * linux-low.c (pid_is_stopped): New.
10063 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10064
10065 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10066
10067 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10068 of conditions.
10069
10070 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10071
10072 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10073
10074 2012-02-24 Luis Machado <lgustavo@codesourcery>
10075
10076 * server.c (handle_query): Advertise support for target-side
10077 breakpoint condition evaluation.
10078 (process_point_options): New function.
10079 (process_serial_event): When inserting a breakpoint, check for
10080 a target-side condition that should be evaluated.
10081
10082 * mem-break.c: Include regcache.h and ax.h.
10083 (point_cond_list_t): New data structure.
10084 (breakpoint) <cond_list>: New field.
10085 (find_gdb_breakpoint_at): Make non-static.
10086 (delete_gdb_breakpoint_at): Clear any target-side
10087 conditions.
10088 (clear_gdb_breakpoint_conditions): New function.
10089 (add_condition_to_breakpoint): Likewise.
10090 (add_breakpoint_condition): Likewise.
10091 (gdb_condition_true_at_breakpoint): Likewise.
10092 (gdb_breakpoint_here): Return result directly instead
10093 of going through a local variable.
10094
10095 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10096 (clear_gdb_breakpoint_conditions): Likewise.
10097 (add_breakpoint_condition): Likewise.
10098 (gdb_condition_true_at_breakpoint): Likewise.
10099
10100 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10101 (need_step_over_p): Take target-side breakpoint condition into
10102 consideration.
10103
10104 2012-02-24 Luis Machado <lgustavo@codesourcery>
10105
10106 * server.h: Include tracepoint.h.
10107 (agent_mem_read, agent_get_trace_state_variable_value,
10108 agent_set_trace_state_variable_value,
10109 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10110 get_set_tsv_func_addr): New prototypes.
10111
10112 * ax.h: New include file.
10113 * ax.c: New source file.
10114
10115 * tracepoint.c: Include ax.h.
10116 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10117 agent_expr, eval_result_type): Move to ax.h.
10118 (parse_agent_expr): Rename to ...
10119 (gdb_parse_agent_expr): ... this, make it non-static and move
10120 to ax.h.
10121 (unparse_agent_expr) Rename to ...
10122 (gdb_unparse_agent_expr): ... this, make it non-static and move
10123 to ax.h.
10124 (eval_agent_expr): Rename to ...
10125 (eval_tracepoint_agent_expr): ... this.
10126 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10127 forward declarations.
10128 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10129 (agent_get_trace_state_variable_value): New function.
10130 (agent_set_trace_state_variable_value): New function.
10131 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10132 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10133 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10134 (condition_true_at_tracepoint): Likewise.
10135 (parse_agent_expr): Rename to ...
10136 (gdb_parse_agent_expr): ... this and move to ax.c.
10137 (unparse_agent_expr): Rename to ...
10138 (gdb_unparse_agent_expr): ... this and move to ax.c.
10139 (gdb_agent_op_name): Move to ax.c.
10140 (eval_agent_expr): Rename to ...
10141 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10142 and move to ax.c.
10143 (eval_tracepoint_agent_expr): New function.
10144 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10145 non-static.
10146 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10147 ax.c.
10148 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10149 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10150 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10151 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10152 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10153 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10154 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10155 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10156 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10157 (compile_bytecodes): Remove forward declaration.
10158 (is_goto_target): Move to ax.c.
10159 (compile_bytecodes): Move to ax.c and call
10160 agent_get_trace_state_variable_value (...) and
10161 agent_set_trace_state_variable_value (...).
10162
10163 * Makefile.in: Update ax.c and IPA dependencies.
10164
10165 2012-02-24 Pedro Alves <palves@redhat.com>
10166
10167 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10168 (cmd_bigqtbuffer_circular): ... this. Only handle
10169 'QTBuffer:circular:'.
10170 (handle_tracepoint_general_set): Adjust.
10171
10172 2012-02-16 Yao Qi <yao@codesourcery.com>
10173
10174 * inferiors.c: Move code to ...
10175 * dll.c: .... here. New.
10176 * server.h: Declare clear_dlls.
10177 * Makefile.in (SFILES): Add dll.c.
10178 (OBS): Add dll.o
10179 (dll.o): New rule.
10180
10181 2012-02-11 Yao Qi <yao@codesourcery.com>
10182
10183 * server.c: (handle_monitor_command): Add a new parameter
10184 `own_buf'.
10185 (handle_query): Update caller.
10186
10187 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10188
10189 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10190 * configure, config.in: Regenerate.
10191 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10192 is not defined.
10193
10194 2012-02-02 Pedro Alves <palves@redhat.com>
10195
10196 Try SIGKILL first, then PTRACE_KILL.
10197 * linux-low.c (linux_kill_one_lwp): New.
10198 (linux_kill_one_lwp): Rename to ...
10199 (kill_one_lwp_callback): ... this. Use the new
10200 linux_kill_one_lwp.
10201
10202 2012-02-02 Pedro Alves <palves@redhat.com>
10203
10204 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10205 inferior.
10206
10207 2012-01-27 Pedro Alves <palves@redhat.com>
10208
10209 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10210 (elf_64_file_p): Make static.
10211 (linux_pid_exe_is_elf_64_file): New.
10212 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10213 Delete declarations.
10214 (linux_pid_exe_is_elf_64_file): Declare.
10215 * linux-x86-low.c (x86_arch_setup): Use
10216 linux_pid_exe_is_elf_64_file.
10217
10218 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10219
10220 * linux-low.c (linux_wait_for_event_1): Rename to ...
10221 (linux_wait_for_event): ... here and merge it with former
10222 linux_wait_for_event - new variable wait_ptid, use it.
10223 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10224
10225 2012-01-23 Pedro Alves <palves@redhat.com>
10226
10227 * server.c (main): Avoid yet another case of infinite loop while
10228 detaching/killing after a longjmp.
10229
10230 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10231
10232 Code cleanup.
10233 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10234
10235 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10236
10237 * hostio.c (handle_readlink): New function.
10238 (handle_vFile): Call it to handle "vFile:readlink" packets.
10239
10240 2012-01-20 Pedro Alves <palves@redhat.com>
10241 Ulrich Weigand <ulrich.weigand@linaro.org>
10242
10243 * server.c (handle_v_requests): Only support vAttach and vRun to
10244 start multiple processes when in extended protocol mode.
10245
10246 2012-01-17 Pedro Alves <palves@redhat.com>
10247
10248 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10249 memalign plus mprotect to allocate the scratch buffer.
10250
10251 2012-01-13 Pedro Alves <palves@redhat.com>
10252
10253 * server.c (attach_inferior): Clear `cont_thread'.
10254
10255 2012-01-13 Pedro Alves <palves@redhat.com>
10256
10257 * server.c (main): Avoid infinite loop while detaching/killing
10258 after a longjmp.
10259
10260 2012-01-09 Doug Evans <dje@google.com>
10261
10262 * server.c (start_inferior): Set last_ptid in --wrapper case.
10263
10264 2012-01-06 Yao Qi <yao@codesourcery.com>
10265
10266 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10267 defined.
10268 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10269
10270 2012-01-04 Yao Qi <yao@codesourcery.com>
10271
10272 * tracepoint.c (cmd_qtdp): Print debug message
10273 for static tracepoint.
10274
10275 2012-01-04 Yao Qi <yao@codesourcery.com>
10276
10277 * tracepoint.c (trace_vdebug): Differentiate debug message
10278 between gdbserver and IPA.
10279
10280 2012-01-03 Yao Qi <yao@codesourcery.com>
10281
10282 * tracepoint.c (tracepoint_was_hit): Don't collect for
10283 static tracepoint.
10284
10285 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10286
10287 * terminal.h: Reformat copyright header.
10288
10289 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10290
10291 * server.c (gdbserver_version): Update copyright year.
10292 * gdbreplay.c (gdbreplay_version): Likewise.
10293
10294 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10295
10296 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10297
10298 Revert:
10299 2011-12-18 Hui Zhu <teawater@gmail.com>
10300 * linux-low.c (linux_create_inferior): Save return value to ret.
10301
10302 2011-12-18 Hui Zhu <teawater@gmail.com>
10303
10304 * linux-low.c (linux_create_inferior): Save return value to ret.
10305
10306 2011-12-16 Doug Evans <dje@google.com>
10307
10308 * linux-low.c (linux_create_inferior): If stdio connection,
10309 redirect stdin from /dev/null, stdout to stderr.
10310 * remote-utils.c (remote_is_stdio): New static global.
10311 (remote_connection_is_stdio): New function.
10312 (remote_prepare): Handle stdio connection.
10313 (remote_open): Ditto.
10314 (remote_close): Don't close stdin for stdio connections.
10315 (read_prim,write_prim): New functions. Replace all calls to
10316 read/write to these.
10317 * server.c (main): Watch for "-" argument. Move call to
10318 remote_prepare before start_inferior.
10319 * server.h (STDIO_CONNECTION_NAME): New macro.
10320 (remote_connection_is_stdio): Declare.
10321
10322 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10323 in debugging output.
10324
10325 2011-12-15 Yao Qi <yao@codesourcery.com>
10326
10327 * tracepoint.c: Include sys/syscall.h.
10328 (gdb_ust_thread): Remove preprocessor conditional.
10329
10330 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10331
10332 * linux-low.c (linux_detach_one_lwp): Call
10333 the_low_target.prepare_to_resume before detaching.
10334
10335 2011-12-14 Yao Qi <yao@codesourcery.com>
10336
10337 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10338 of write.
10339
10340 2011-12-14 Yao Qi <yao@codesourcery.com>
10341
10342 * i386-low.c (i386_low_stopped_data_address): Initialize local
10343 variable `control'.
10344
10345 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10346
10347 PR remote/13492
10348
10349 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10350 DR_CONTROL unless necessary. Extend comments.
10351 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10352 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10353
10354 2011-12-13 Yao Qi <yao@codesourcery.com>
10355
10356 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10357 macros.
10358 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10359
10360 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10361
10362 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10363 Print new debug message for such case.
10364
10365 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10366
10367 Fix overlapping memcpy.
10368 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10369 the read_inferior_memory transfer.
10370 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10371 write_inferior_memory transfer.
10372 (set_fast_tracepoint_jump): New variable buf. Use it for the
10373 read_inferior_memory and write_inferior_memory transfers.
10374 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10375 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10376 Use it for the write_inferior_memory transfer.
10377 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10378 buffers.
10379
10380 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10381
10382 * linux-low.c (fetch_register, store_register): Make code
10383 consistent, fix formatting.
10384
10385 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10386
10387 * linux-low.c (usr_store_inferior_registers): Factor out code
10388 to handle individual registers into...
10389 (store_register): ... this new function.
10390
10391 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10392
10393 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10394 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10395 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10396 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10397 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10398 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10399 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10400 (srv_xmlfiles): Add new XML files.
10401
10402 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10403 and <sys/uio.h>.
10404 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10405 (init_registers_s390_linux32v1): Add prototype.
10406 (init_registers_s390_linux32v2): Likewise.
10407 (init_registers_s390_linux64v1): Likewise.
10408 (init_registers_s390_linux64v2): Likewise.
10409 (init_registers_s390x_linux64v1): Likewise.
10410 (init_registers_s390x_linux64v2): Likewise.
10411 (s390_num_regs): Increment to 52.
10412 (s390_regmap): Add orig_r2 register.
10413 (s390_num_regs_3264): Increment to 68.
10414 (s390_regmap_3264): Add orig_r2 register.
10415 (s390_collect_ptrace_register): Handle orig_r2 register.
10416 (s390_supply_ptrace_register): Likewise.
10417 (s390_fill_last_break): New function.
10418 (s390_store_last_break): Likewise.
10419 (s390_fill_system_call): New function.
10420 (s390_store_system_call): Likewise.
10421 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10422 register sets.
10423 (s390_check_regset): New function.
10424 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10425 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10426 Update target_regsets for available register sets.
10427
10428 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10429 Jan Kratochvil <jan.kratochvil@redhat.com>
10430
10431 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10432 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10433 New.
10434 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10435 * linux-low.h (struct process_info_private): New member r_debug.
10436 * server.c (handle_qxfer_libraries): Call
10437 the_target->qxfer_libraries_svr4.
10438 (handle_qxfer_libraries_svr4): New function.
10439 (qxfer_packets): New entry "libraries-svr4".
10440 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10441 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10442 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10443 PACKET_qXfer_libraries_svr4.
10444
10445 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10446
10447 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10448 PSW address/mask between 8-byte and 16-byte formats.
10449 (s390_supply_ptrace_register): Likewise.
10450 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10451 basic addressing mode bit.
10452
10453 2011-11-24 Stan Shebs <stan@codesourcery.com>
10454
10455 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10456
10457 2011-11-17 Stan Shebs <stan@codesourcery.com>
10458
10459 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10460 (tracing_start_time): New global.
10461 (tracing_stop_time): New global.
10462 (tracing_user_name): New global.
10463 (tracing_notes): New global.
10464 (tracing_stop_note): New global.
10465 (cmd_qtstart): Set traceframe_usage, start_time.
10466 (stop_tracing): Set stop_time.
10467 (cmd_qtstatus): Report additional status.
10468 (cmd_qtp): New function.
10469 (handle_tracepoint_query): Call it.
10470 (cmd_qtnotes): New function.
10471 (handle_tracepoint_general_set): Call it.
10472 (get_timestamp): Rename from tsv_get_timestamp.
10473
10474 2011-11-14 Stan Shebs <stan@codesourcery.com>
10475 Kwok Cheung Yeung <kcy@codesourcery.com>
10476
10477 * linux-x86-low.c (small_jump_insn): New.
10478 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10479 trampoline and error message, build a trampoline and issue a small
10480 jump instruction to it.
10481 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10482 trampoline and error message.
10483 (x86_get_min_fast_tracepoint_insn_len): New.
10484 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10485 * linux-low.h (struct linux_target_ops): Add arguments to
10486 install_fast_tracepoint_jump_pad operation, add new operation.
10487 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10488 arguments.
10489 (linux_get_min_fast_tracepoint_insn_len): New function.
10490 (linux_target_op): Add new operation.
10491 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10492 (gdb_trampoline_buffer_end): Ditto.
10493 (gdb_trampoline_buffer_error): Ditto.
10494 (struct ipa_sym_addresses): Add fields for new IPA variables.
10495 (symbol_list): Add entries for new IPA variables.
10496 (struct tracepoint): Add fields to hold the address range of the
10497 trampoline used by the tracepoint.
10498 (trampoline_buffer_head): New static variable.
10499 (trampoline_buffer_tail): Ditto.
10500 (claim_trampoline_space): New function.
10501 (have_fast_tracepoint_trampoline_buffer): New function.
10502 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10503 structure.
10504 (install_fast_tracepoint): Ditto, also add error buffer argument.
10505 (cmd_qtminftpilen): New function.
10506 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10507 (fast_tracepoint_from_trampoline_address): New function.
10508 (fast_tracepoint_collecting): Handle trampoline as part of jump
10509 pad space.
10510 (set_trampoline_buffer_space): New function.
10511 (initialize_tracepoint): Initialize new IPA variables.
10512 * target.h (struct target_ops): Add arguments to
10513 install_fast_tracepoint_jump_pad operation, add new
10514 get_min_fast_tracepoint_insn_len operation.
10515 (target_get_min_fast_tracepoint_insn_len): New.
10516 (install_fast_tracepoint_jump_pad): Add arguments.
10517 * server.h (IPA_BUFSIZ): Define.
10518 * linux-i386-ipa.c: Include extra header files.
10519 (initialize_fast_tracepoint_trampoline_buffer): New function.
10520 (initialize_low_tracepoint): Call it.
10521 * server.h (set_trampoline_buffer_space): Declare.
10522 (claim_trampoline_space): Ditto.
10523 (have_fast_tracepoint_trampoline_buffer): Ditto.
10524
10525 2011-11-14 Yao Qi <yao@codesourcery.com>
10526
10527 * server.c (handle_query): Handle InstallInTrace for qSupported.
10528 * tracepoint.c (add_tracepoint): Sort list.
10529 (install_tracepoint, download_tracepoint): New.
10530 (cmd_qtdp): Call them to install and download tracepoints.
10531 (sort_tracepoints): Removed.
10532 (cmd_qtstart): Update.
10533
10534 2011-11-14 Yao Qi <yao@codesourcery.com>
10535
10536 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10537 * mem-break.h: Declare.
10538 * tracepoint.c (cmd_qtstart): Move some code to ...
10539 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10540 New.
10541 (download_tracepoints): Move some code to ...
10542 (download_tracepoint_1): ... here. New.
10543
10544 2011-11-08 Yao Qi <yao@codesourcery.com>
10545
10546 * remote-utils.c (relocate_instruction): A comment fix.
10547
10548 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10549
10550 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10551 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10552 dr_status_mirror and dr_control_mirror from debug_reg_state.
10553 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10554 (i386_initial_stuff): Remove use of deleted globals.
10555 (i386_get_thread_context, i386_set_thread_context,
10556 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10557 from debug_reg_state.
10558
10559 2011-11-05 Yao Qi <yao@codesourcery.com>
10560
10561 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10562 address as TPOINT's.
10563
10564 2011-11-02 Stan Shebs <stan@codesourcery.com>
10565
10566 * tracepoint.c (agent_mem_read_string): New function.
10567 (eval_agent_expr): Call it for tracenz.
10568 * server.c (handle_query): Report support for tracenz.
10569
10570 2011-11-02 Yao Qi <yao@codesourcery.com>
10571
10572 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10573
10574 2011-11-02 Yao Qi <yao@codesourcery.com>
10575
10576 * target.h: Fix a typo in comment.
10577
10578 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10579
10580 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10581 clobber the breakpoints' shadows with fast tracepoint jumps.
10582 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10583 * target.c (write_inferior_memory): Also pass MYADDR down to
10584 check_mem_write.
10585
10586 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10587
10588 * configure.ac: Check support for personality routine.
10589 * configure: Regenerate.
10590 * config.in: Likewise.
10591 * linux-low.c: Include <sys/personality.h>.
10592 Define ADDR_NO_RANDOMIZE if necessary.
10593 (linux_create_inferior): Disable address space randomization when
10594 forking inferior, if requested.
10595 (linux_supports_disable_randomization): New function.
10596 (linux_target_ops): Install it.
10597 * server.h (disable_randomization): Declare.
10598 * server.c (disable_randomization): New global variable.
10599 (handle_general_set): Handle QDisableRandomization.
10600 (handle_query): Likewise for qSupported.
10601 (main): Support --disable-randomization and --no-disable-randomization
10602 command line arguments.
10603 * target.h (struct target_ops): Add supports_disable_randomization.
10604 (target_supports_disable_randomization): New macro.
10605
10606 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10607
10608 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10609 ifdef check.
10610 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10611 [!PT_GETDSBT] (target_loadmap): New definition.
10612 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10613 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10614 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10615 and PT_GETDSBT to LINUX_LOADMAP.
10616 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10617 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10618
10619 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10620
10621 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10622 (arm_linux_hwbp_cap): New static variable.
10623 (arm_linux_get_hwbp_cap): Replace by ...
10624 (arm_linux_init_hwbp_cap): ... this new function.
10625 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10626 (arm_linux_get_hw_watchpoint_count): Likewise.
10627 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10628 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10629 (arm_prepare_to_resume): Use perror_with_name instead of error.
10630
10631 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10632
10633 * linux-arm-low.c: Include <signal.h>.
10634 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10635 (struct arm_linux_hwbp_cap): New data type.
10636 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10637 (struct arm_linux_hw_breakpoint): New data type.
10638 (MAX_BPTS, MAX_WPTS): Define.
10639 (struct arch_process_info, struct arch_lwp_info): New data types.
10640 (arm_linux_get_hwbp_cap): New function.
10641 (arm_linux_get_hw_breakpoint_count): Likewise.
10642 (arm_linux_get_hw_watchpoint_count): Likewise.
10643 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10644 (arm_hwbp_control_initialize): Likewise.
10645 (arm_hwbp_control_is_enabled): Likewise.
10646 (arm_hwbp_control_is_initialized): Likewise.
10647 (arm_hwbp_control_disable): Likewise.
10648 (arm_linux_hw_breakpoint_equal): Likewise.
10649 (arm_linux_hw_point_initialize): Likewise.
10650 (struct update_registers_data): New data structure.
10651 (update_registers_callback: New function.
10652 (arm_insert_point): Likewise.
10653 (arm_remove_point): Likewise.
10654 (arm_stopped_by_watchpoint): Likewise.
10655 (arm_stopped_data_address): Likewise.
10656 (arm_new_process): Likewise.
10657 (arm_new_thread): Likewise.
10658 (arm_prepare_to_resume): Likewise.
10659 (the_low_target): Register arm_insert_point, arm_remove_point,
10660 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10661 arm_new_thread, and arm_prepare_to_resume.
10662
10663 2011-09-15 Stan Shebs <stan@codesourcery.com>
10664
10665 * server.h (struct emit_ops): Add compare-goto fields.
10666 * tracepoint.c (gdb_agent_op_sizes): New table.
10667 (emit_eq_goto): New function.
10668 (emit_ne_goto): New function.
10669 (emit_lt_goto): New function.
10670 (emit_le_goto): New function.
10671 (emit_gt_goto): New function.
10672 (emit_ge_goto): New function.
10673 (is_goto_target): New function.
10674 (compile_bytecodes): Recognize special cases of compare-goto
10675 combinations and call specialized emitters for them.
10676 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10677 (amd64_emit_ne_goto): New function.
10678 (amd64_emit_lt_goto): New function.
10679 (amd64_emit_le_goto): New function.
10680 (amd64_emit_gt_goto): New function.
10681 (amd64_emit_ge_goto): New function.
10682 (amd64_emit_ops): Add the new functions.
10683 (i386_emit_eq_goto): New function.
10684 (i386_emit_ne_goto): New function.
10685 (i386_emit_lt_goto): New function.
10686 (i386_emit_le_goto): New function.
10687 (i386_emit_gt_goto): New function.
10688 (i386_emit_ge_goto): New function.
10689 (i386_emit_ops): Add the new functions.
10690
10691 2011-09-08 Stan Shebs <stan@codesourcery.com>
10692
10693 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10694 (i386_emit_epilogue): Restore %ebx.
10695
10696 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10697
10698 * server.c (step_thread): Remove definition.
10699 (process_serial_event): Don't handle Hs.
10700 * server.h (step_thread): Remove declaration.
10701 * target.c (set_desired_inferior): Remove use of step_thread.
10702
10703 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10704
10705 * linux-low.c: Include linux-procfs.h.
10706 (linux_attach_lwp_1): Update comments.
10707 (linux_attach): Scan for existing threads when attaching to a
10708 process that is the tgid.
10709 * Makefile.in: Update dependencies.
10710
10711 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10712
10713 * configure.srv: Add linux-procfs.o dependencies.
10714
10715 2011-08-14 Yao Qi <yao@codesourcery.com>
10716
10717 * target.h (struct target_ops): Fix indent.
10718 * win32-low.c (win32_target_ops): Fix comment.
10719
10720 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10721 Yao Qi <yao@codesourcery.com>
10722
10723 * Makefile.in (clean): Remove tic6x-*.c files.
10724 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10725 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10726 (tic6x-c64xp-linux.c): Likewise.
10727 * configure.srv: Add support for tic6x-*-uclinux.
10728 * linux-tic6x-low.c: New.
10729 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10730
10731 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10732 Yao Qi <yao@codesourcery.com>
10733
10734 * target.h (struct target_ops): Add read_loadmap.
10735 * linux-low.c (struct target_loadseg): New type.
10736 (struct target_loadmap): New type.
10737 (linux_read_loadmap): New function.
10738 (linux_target_ops): Add linux_read_loadmap.
10739 * server.c (handle_query): Support qXfer:fdpic:read packet.
10740 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10741 to NULL.
10742
10743 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10744
10745 * win32-low.c: Include <stdint.h>.
10746
10747 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10748
10749 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10750 to the inferior here.
10751 (i386_remove_aligned_watchpoint): Ditto.
10752 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10753 fit part of the watchpoint in the debug registers.
10754 (i386_update_inferior_debug_regs): New.
10755 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10756 registers, and only update the inferior on success.
10757 (i386_low_remove_watchpoint): Ditto.
10758
10759 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10760
10761 * linux-low.c (compare_ints, unique, list_threads, show_process,
10762 linux_core_of_thread): Delete.
10763 (linux_target_ops): Change linux_core_of_thread to
10764 linux_common_core_of_thread.
10765 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10766 * utils.c (malloc_failure): Change type of argument.
10767 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10768 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10769 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10770 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10771 (IPA_OBJS): Add common-utils-ipa.o.
10772 (ptid_h, linux_osdata_h): New macros.
10773 (server_h): Add common/common-utils.h, common/xml-utils.h,
10774 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10775 common/ptid.h.
10776 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10777 ptid.o, buffer.o): New rules.
10778 (linux-low.o): Add common/linux-osdata.h as a dependency.
10779 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10780 * configure.ac: Add AC_HEADER_DIRENT check.
10781 * config.in: Regenerate.
10782 * configure: Regenerate.
10783 * remote-utils.c (xml_escape_text): Delete.
10784 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10785 buffer_xml_printf): Move to common/buffer.c.
10786 * server.c (main): Remove call to initialize_inferiors.
10787 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10788 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10789 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10790 internal_error, gdb_assert, gdb_assert_fail): Delete.
10791 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10792 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10793 common/buffer.h.
10794 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10795 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10796 initialize_inferiors): Delete.
10797
10798 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10799
10800 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10801 symbol error.
10802
10803 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10804
10805 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10806 assertion.
10807 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10808
10809 2011-05-26 Yao Qi <yao@codesourcery.com>
10810
10811 * Makefile.in (thread-db.o): Track dependence to
10812 common/gdb_thread_db.h.
10813 * thread-db.c: include gdb_thread_db.h from right place.
10814
10815 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10816
10817 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10818 __FILE__ and __LINE__ to internal_error.
10819
10820 2011-05-13 Doug Evans <dje@google.com>
10821
10822 * thread-db.c (try_thread_db_load_from_sdir): New function.
10823 (try_thread_db_load_from_dir): New function.
10824 (thread_db_load_search): Handle $sdir, ignore $pdir.
10825 Remove trying of system directories if search of
10826 libthread-db-search-path fails, that is now done via $sdir.
10827
10828 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10829
10830 * server.c (handle_query): Add EnableDisableTracepoints to the list
10831 of supported features.
10832 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10833 tracepoints.
10834 (cmd_qtenable_disable): New.
10835 (cmd_qtstart): Install tracepoints even if disabled.
10836 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10837 receiving a QTEnable or QTDisable packet.
10838 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10839 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10840 tracepoints.
10841 (gdb_probe): Skip data collection if static tracepoint is disabled.
10842
10843 2011-05-10 Doug Evans <dje@google.com>
10844
10845 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10846
10847 2011-05-04 Doug Evans <dje@google.com>
10848
10849 * linux-low.c (linux_join): Skip process lookup.
10850 * spu-low.c (spu_join): Ditto.
10851 * server.c (join_inferiors_callback): Delete.
10852 (process_serial_event): For 'D' packet (detach) call join_inferior
10853 directly.
10854
10855 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10856
10857 * README: Don't mention xscale*-*-linux*.
10858 * configure.srv (xscale*-*-linux*): Don't handle target.
10859
10860 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10861
10862 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10863 casting pointers.
10864 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10865 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10866 (i386_emit_void_call_2): Likewise.
10867
10868 2011-04-26 Yao Qi <yao@codesourcery.com>
10869
10870 * linux-low.c: Move common macros to linux-ptrace.h.
10871 Include linux-ptrace.h.
10872 * Makefile.in (linux_ptrace_h): New.
10873 (linux-low.o): Depends on linux-ptrace.h.
10874
10875 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10876
10877 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10878 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10879 (remote_prepare): New function with most of the TCP code from ...
10880 (remote_open): ... here. Detect PORT here unconditionally. Move also
10881 setting transport_is_reliable.
10882 * server.c (run_once): New variable.
10883 (gdbserver_usage): Document it.
10884 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10885 the first run if RUN_ONCE.
10886 * server.h (run_once, remote_prepare): New declarations.
10887
10888 2011-04-19 Tom Tromey <tromey@redhat.com>
10889
10890 * win32-low.c (handle_load_dll): Remove duplicate "the".
10891
10892 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10893
10894 Remove support for old Cygwin 1.5 versions.
10895 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10896 function to avoid warning.
10897 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10898 warning.
10899
10900 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10901
10902 * gdbserver/server.h (Macro _): Define it if not available.
10903
10904 2011-03-14 Michael Snyder <msnyder@vmware.com>
10905
10906 * hostio.c (handle_close): Remove unnecessary null test.
10907
10908 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10909
10910 * Makefile.in (maintainer-clean realclean distclean): Remove
10911 "make ... subdir_do" command.
10912
10913 2011-03-10 Michael Snyder <msnyder@vmware.com>
10914
10915 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10916
10917 * server.c (handle_v_run): Free alloced buffer on early return.
10918
10919 2011-03-09 Yao Qi <yao@codesourcery.com>
10920
10921 Revert:
10922 2011-03-04 Yao Qi <yao@codesourcery.com>
10923
10924 * Makefile.in: Remove GNU make feature --directory.
10925
10926 2011-03-05 Yao Qi <yao@codesourcery.com>
10927
10928 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10929 (subdir_do): New make target. Copied from gdb/Makefile.
10930 (maintainer-clean, realclean, distclean, clean): Call corresponding
10931 make targets in common/Makefile.
10932
10933 2011-02-11 Yao Qi <yao@codesourcery.com>
10934
10935 * configure.ac: Call AC_PROG_RANLIB.
10936 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10937 * configure: Regenerate.
10938
10939 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10940
10941 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10942
10943 2011-03-06 Yao Qi <yao@codesourcery.com>
10944
10945 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10946
10947 2011-03-05 Yao Qi <yao@codesourcery.com>
10948
10949 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10950 (subdir_do): New make target. Copied from gdb/Makefile.
10951 (maintainer-clean, realclean, distclean, clean): Call corresponding
10952 make targets in common/Makefile.
10953
10954 2011-03-04 Yao Qi <yao@codesourcery.com>
10955
10956 * Makefile.in: Remove GNU make feature --directory.
10957
10958 2011-03-04 Michael Snyder <msnyder@vmware.com>
10959
10960 * server.c (queue_stop_reply): Call xmalloc not malloc.
10961
10962 2011-03-02 Michael Snyder <msnyder@vmware.com>
10963
10964 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10965
10966 2011-02-28 Michael Snyder <msnyder@vmware.com>
10967
10968 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10969 (cmd_qtframe): Ditto.
10970 (cmd_qtbuffer): Ditto.
10971 (cmd_bigqtbuffer): Ditto.
10972
10973 * utils.c (decimal2str): Initialize 'width' to nine, then
10974 don't mess with it.
10975
10976 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10977
10978 * hostio.c (require_data): Free *data, not data.
10979
10980 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10981
10982 * hostio.c (require_data): Use free, not xfree.
10983
10984 2011-02-27 Michael Snyder <msnyder@vmware.com>
10985
10986 * server.c (handle_query): Discard unused value.
10987
10988 * hostio.c (require_data): Free malloc memory before returning
10989 error.
10990
10991 2011-02-26 Michael Snyder <msnyder@vmware.com>
10992
10993 * linux-low.c (list_threads): Call closedir for dirent.
10994
10995 2011-02-27 Michael Snyder <msnyder@vmware.com>
10996
10997 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10998 a case statement falls through.
10999
11000 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11001
11002 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11003 in comparison.
11004
11005 2011-02-26 Michael Snyder <msnyder@vmware.com>
11006
11007 * utils.c (decimal2str): Eliminate dead code and dead param.
11008 (pulongest): Drop dead param from call to decimal2str.
11009 (plongest): Ditto.
11010
11011 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11012
11013 Revert the following patch (not approved yet):
11014 2011-02-21 Hui Zhu <teawater@gmail.com>
11015 * tracepoint.c (tp_printf): New function.
11016 (eval_agent_expr): Handle gdb_agent_op_printf.
11017
11018 2011-02-21 Hui Zhu <teawater@gmail.com>
11019
11020 * tracepoint.c (tp_printf): New function.
11021 (eval_agent_expr): Handle gdb_agent_op_printf.
11022
11023 2011-02-18 Tom Tromey <tromey@redhat.com>
11024
11025 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11026 (tracepoint.o): Likewise.
11027 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11028 (gdb_agent_op_names): Likewise.
11029
11030 2011-02-18 Tom Tromey <tromey@redhat.com>
11031
11032 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11033 gdb_agent_op_rot>: New constants.
11034 (gdb_agent_op_names): Add pick and roll.
11035 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11036 cases.
11037
11038 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11039
11040 * aclocal.m4: Regenerated with aclocal-1.11.1.
11041
11042 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11043
11044 * server.c (handle_qxfer_traceframe_info): New.
11045 (qxfer_packets): Register "traceframe-info".
11046 (handle_query): Report support for qXfer:traceframe-info:read+.
11047 * tracepoint.c (match_blocktype): New.
11048 (traceframe_find_block_type): Rename to ...
11049 (traceframe_walk_blocks): ... this. Add callback filter argument,
11050 and use it.
11051 (traceframe_find_block_type): New, reimplemented on top of
11052 traceframe_walk_blocks.
11053 (build_traceframe_info_xml): New.
11054 (traceframe_read_info): New.
11055 * server.h (traceframe_read_info): Declare.
11056
11057 2011-02-11 Yao Qi <yao@codesourcery.com>
11058
11059 * configure.ac: Call AC_PROG_RANLIB.
11060 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11061 * configure: Regenerate.
11062
11063 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11064
11065 * server.c (gdb_read_memory): Change return semantics to allow
11066 partial transfers.
11067 (handle_search_memory_1): Adjust.
11068 (process_serial_event) <'m' packet>: Handle partial transfers.
11069 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11070
11071 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11072
11073 * regcache.c (init_register_cache): Initialize
11074 regcache->register_status.
11075 (free_register_cache): Release regcache->register_status.
11076 (regcache_cpy): Copy register_status.
11077 (registers_to_string): Print 'x's for unavailable registers.
11078 (supply_register): Mark the register's status valid or
11079 unavailable, depending on whether a buffer was passed in or not.
11080 (supply_register_zeroed): New.
11081 (supply_regblock): Mark the registers' status valid or
11082 unavailable, depending on whether a buffer was passed in or not.
11083 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11084 (struct regcache): New `register_status' field.
11085 (supply_register_zeroed): Declare.
11086 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11087 supply_register_zeroed, rather than passing a NULL buffer to
11088 supply_register.
11089 * tracepoint.c (fetch_traceframe_registers): Update comment.
11090
11091 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11092
11093 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11094 buffer explicit.
11095
11096 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11097
11098 * server.h (decode_xfer_write): Change prototype.
11099 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11100 and don't extract the annex here.
11101 * server.c (decode_xfer_read): Remove `annex' parameter,
11102 and don't extract the annex here.
11103 (decode_xfer): New.
11104 (struct qxfer): New.
11105 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11106 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11107 (handle_qxfer_statictrace): New functions, abstracted out from
11108 handle_query, and made to use the struct qxfer interface.
11109 (handle_threads_qxfer_proper): Rename to ...
11110 (handle_qxfer_threads_proper): ... this.
11111 (handle_threads_qxfer): Rename to ...
11112 (handle_qxfer_threads): ... this. Adjust.
11113 (qxfer_packets): New array.
11114 (handle_qxfer): New function.
11115 (handle_query): Use handle_qxfer.
11116
11117 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11118
11119 * gdbreplay.c: Shorten lines of >= 80 columns.
11120 * linux-low.c: Ditto.
11121 * linux-ppc-low.c: Ditto.
11122 * linux-s390-low.c: Ditto.
11123 * linux-sparc-low.c: Ditto.
11124 * linux-x86-low.c: Ditto.
11125 * linux-xtensa-low.c: Ditto.
11126 * mem-break.c: Ditto.
11127 * nto-low.c: Ditto.
11128 * regcache.h: Ditto.
11129 * remote-utils.c: Ditto.
11130 * server.c: Ditto.
11131 * server.h: Ditto.
11132 * thread-db.c: Ditto.
11133 * tracepoint.c: Ditto.
11134 * utils.c: Ditto.
11135 * win32-low.h: Ditto.
11136
11137 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11138
11139 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11140 update.
11141
11142 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11143
11144 * server.c (gdbserver_version): Update copyright year in version
11145 output.
11146 * gdbreplay.c (gdbreplay_version): Ditto.
11147
11148 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11149
11150 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11151 * linux-bfin-low.c: New file.
11152 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11153 PT_DATA_ADDR for BFIN targets.
11154 * Makefile.in (SFILES): Add linux-bfin-low.c.
11155 (clean): Remove reg-bfin.c.
11156 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11157 * README: Mention supported Blackfin targets.
11158
11159 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11160
11161 * .gitignore: New file.
11162
11163 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11164
11165 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11166
11167 2010-10-22 Jie Zhang <jie@codesourcery.com>
11168
11169 * Makefile.in: Add FLAGS_TO_PASS variable.
11170 (install): Remove dependency of install-only and recursively
11171 invoke make for install-only.
11172
11173 2010-10-04 Doug Evans <dje@google.com>
11174
11175 * Makefile.in (uninstall): Use $(DESTDIR).
11176
11177 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11178
11179 PR gdb/11842
11180
11181 * linux-x86-low.c (compat_siginfo_from_siginfo)
11182 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11183 si_code is < 0. Check for si_code == SI_TIMER before checking for
11184 si_code < 0.
11185
11186 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11187
11188 * lynx-i386-low.c: New file.
11189 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11190
11191 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11192
11193 * lynx-low.c (ptrace_request_to_str): Remove handling for
11194 request values that have been removed in LynxOS 5.x.
11195
11196 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11197
11198 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11199 <ptrace.h>
11200
11201 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11202
11203 * configure.ac: Add --enable-inprocess-agent option.
11204 * configure: Rebuilt.
11205
11206 2010-09-06 Yao Qi <yao@codesourcery.com>
11207
11208 * linux-low.c (linux_kill): Remove unused variable.
11209 (linux_stabilize_threads): Likewise.
11210 * server.c (start_inferior): Likewise.
11211 (queue_stop_reply_callback): Likewise.
11212 * tracepoint.c (do_action_at_tracepoint): Likewise.
11213
11214 2010-09-06 Yao Qi <yao@codesourcery.com>
11215
11216 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11217 on return.
11218
11219 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11220
11221 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11222
11223 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11224
11225 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11226 "$(IPA_DEPFILES)".
11227
11228 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11229
11230 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11231 gdbserver/lynx-ppc-low.c: New files.
11232 * Makefile.in (lynx_low_h): New variable.
11233 (lynx-low.o, lynx-ppc-low.o): New rules.
11234 * configure.ac: On LynxOS, link with -lnetinet.
11235 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11236 * configure: regenerate.
11237
11238 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11239
11240 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11241 * configure.ac: Add check for vasprintf and vsnprintf.
11242 * configure, config.in: Regenerate.
11243 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11244
11245 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11246
11247 * gdbreplay.c: Move include of alloca.h up, next to include of
11248 malloc.h.
11249 * server.h: Add include of malloc.h.
11250 * mem-break.c: Remove include of malloc.h.
11251 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11252
11253 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11254
11255 * Makefile.in (memmem.o): Build with -Wno-error.
11256
11257 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11258
11259 * utils.c (xsnprintf): Make non-static.
11260 * server.h: Add xsnprintf declaration.
11261 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11262 replace calls to snprintf by calls to xsnprintf throughout.
11263
11264 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11265
11266 * configure.ac: Add configure check for alloca.
11267 * configure, config.in: Regenerate.
11268 * server.h: Include alloca.h if it exists.
11269 * gdbreplay.c: Include alloca.h if it exists.
11270
11271 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11272
11273 * linux-low.c (__SIGRTMIN): Define if not already defined.
11274 (linux_create_inferior): Check for __ANDROID__ rather than
11275 __SIGRTMIN.
11276 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11277 are already deferred.
11278 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11279 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11280 stopped and already has a pending signal to report.
11281 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11282 a pending signal to report or is moving out of a jump pad.
11283 (linux_init_signals): Check for __ANDROID__ rather than
11284 __SIGRTMIN.
11285
11286 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11287
11288 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11289 debug_threads check. Avoid a linear search when not doing debug
11290 output.
11291
11292 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11293
11294 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11295 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11296 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11297 (process_event): Change local fd's type to gdb_fildes_t.
11298 (create_file_handler): Adjust prototype.
11299 (delete_file_handler): Adjust prototype.
11300 (handle_file_event): Adjust prototype. Use pfildes.
11301 (create_file_event): Adjsut prototype.
11302 * remote-utils.c (remote_desc, listen_desc): Change type to
11303 gdb_fildes_t.
11304 * server.h: New gdb_fildes_t typedef.
11305 [USE_WIN32API]: Include winsock2.h.
11306 (delete_file_handler, add_file_handler): Adjust prototypes.
11307 (pfildes): Declare.
11308 * utils.c (pfildes): New.
11309
11310 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11311
11312 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11313 * configure: Regenerate.
11314
11315 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11318 (linux_done_accessing_memory): ... this.
11319 (linux_target_ops): Adjust.
11320 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11321 * nto-low.c (nto_target_ops): Adjust comment.
11322 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11323 * spu-low.c (spu_target_ops): Adjust comment.
11324 * target.h (target_ops): Rename unprepare_to_access_memory field
11325 to done_accessing_memory.
11326 (unprepare_to_access_memory): Rename to ...
11327 (done_accessing_memory): ... this.
11328
11329 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11330
11331 * linux-low.c (linux_prepare_to_access_memory): New.
11332 (linux_unprepare_to_access_memory): New.
11333 (linux_target_ops): Install them.
11334 * server.c (read_memory): Rename to ...
11335 (gdb_read_memory): ... this. Use
11336 prepare_to_access_memory/prepare_to_access_memory.
11337 (write_memory): Rename to ...
11338 (gdb_write_memory): ... this. Use
11339 prepare_to_access_memory/prepare_to_access_memory.
11340 (handle_search_memory_1): Adjust.
11341 (process_serial_event): Adjust.
11342 * target.h (struct target_ops): New fields
11343 prepare_to_access_memory and unprepare_to_access_memory.
11344 (prepare_to_access_memory, unprepare_to_access_memory): New.
11345 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11346 prepare_to_access_memory/prepare_to_access_memory.
11347 * nto-low.c (nto_target_ops): Adjust.
11348 * spu-low.c (spu_target_ops): Adjust.
11349 * win32-low.c (win32_target_ops): Adjust.
11350
11351 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11352
11353 * Makefile.in (WARN_CFLAGS): Get it from configure.
11354 (WERROR_CFLAGS): New.
11355 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11356 * configure.ac: Introduce --enable-werror, which adds -Werror to
11357 the compiler command line. Enabled by default. Disable with
11358 --disable-werror. Add -Wdeclaration-after-statement
11359 Wpointer-arith and -Wformat-nonliteral to warning flags.
11360 * configure: Regenerate.
11361
11362 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11363
11364 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11365
11366 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11367
11368 * gdbreplay.c (remote_error): New.
11369 (gdbchar): New.
11370 (expect): Use gdbchar. Check for error reading from GDB.
11371 Clarify sync error output.
11372 (play): Check for errors writing to GDB.
11373 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11374 * remote-utils.c (getpkt): Check for errors writing to the remote
11375 descriptor.
11376
11377 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11378
11379 * linux-low.c (linux_wait_1): Move non-debugging code out of
11380 `debug_threads' control.
11381
11382 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11383
11384 * linux-low.c (linux_wait_1): Don't set last_status here.
11385 * server.c (push_event, queue_stop_reply_callback): Assert we're
11386 not pushing a TARGET_WAITKIND_IGNORE event.
11387 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11388 (myresume, handle_target_event): Set the thread's last_resume_kind
11389 and last_status from the target returned status.
11390
11391 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11392
11393 PR threads/10729
11394
11395 * linux-x86-low.c (update_debug_registers_callback): New.
11396 (i386_dr_low_set_addr): Use it.
11397 (i386_dr_low_get_addr): New.
11398 (i386_dr_low_set_control): Use update_debug_registers_callback.
11399 (i386_dr_low_get_control): New.
11400 (i386_dr_low_get_status): Adjust.
11401 * linux-low.c (linux_stop_lwp): New.
11402 * linux-low.h (linux_stop_lwp): Declare.
11403
11404 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11405 argument instead of a i386_debug_reg_state.
11406 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11407 a i386_debug_reg_state.
11408 (i386_insert_aligned_watchpoint): Adjust.
11409 (i386_remove_aligned_watchpoint): Adjust.
11410 (i386_low_stopped_data_address): Read the debug registers from the
11411 inferior instead of from the mirrors.
11412 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11413 (i386_dr_low_get_addr): Declare.
11414 (i386_dr_low_get_control): Declare.
11415 (i386_dr_low_get_status): Change prototype.
11416
11417 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11418 (i386_dr_low_get_addr): New.
11419 (i386_dr_low_get_control): New.
11420 (i386_dr_low_get_status): Adjust prototype. Return
11421 dr_status_mirror.
11422 (i386_initial_stuff): Clear dr_status_mirror and
11423 dr_control_mirror.
11424 (i386_get_thread_context): Adjust.
11425 (i386_set_thread_context): Adjust.
11426 (i386_thread_added): Adjust.
11427
11428 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11429
11430 * linux-low.h (linux_thread_area): Delete declaration.
11431
11432 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11433
11434 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11435 after its termination.
11436
11437 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11438
11439 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11440 (gdb_wants_all_stopped): Delete.
11441 (linux_wait_1): Don't call them.
11442 * server.c (handle_v_cont): Tag all threads as want-stopped.
11443 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11444 stopped as "client-wants-stopped".
11445
11446 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11447
11448 * Makefile.in (signals_h): New.
11449 (server_h): Depend on it.
11450 (server.o): Don't depend on $(signals_def).
11451 (signals.o): Depend on $(signals_def).
11452
11453 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11454
11455 * Makefile.in (signals_def): New.
11456 (server_h): Append include/gdb/signals.h and signals_def.
11457 (server.o): Append signals_def.
11458
11459 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11460
11461 * server.c (handle_target_event): Use target_signal_to_host for
11462 resume_info.sig initialization.
11463 * target.h (struct thread_resume) <sig>: New comment.
11464
11465 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11466
11467 * server.c (handle_query): strcpy() the returned string from paddress()
11468 instead of sprintf().
11469 * utils.c (paddress): Return phex_nz().
11470
11471 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11472
11473 * server.c (handle_v_cont): Call mourn_inferior if process
11474 just exited.
11475 (myresume): Likewise.
11476
11477 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11478
11479 Static tracepoints, and integration with UST.
11480
11481 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11482 * mem-break.c (uninsert_all_breakpoints)
11483 (reinsert_all_breakpoints): New.
11484 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11485 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11486 (gdb_agent_ust_loaded, helper_thread_id)
11487 (gdb_agent_helper_thread_id): New macros.
11488 (struct ipa_sym_addresses): Add addr_ust_loaded,
11489 addr_helper_thread_id, addr_cmd_buf.
11490 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11491 (in_process_agent_loaded_ust): New.
11492 (write_e_ust_not_loaded): New.
11493 (maybe_write_ipa_ust_not_loaded): New.
11494 (struct collect_static_trace_data_action): New.
11495 (enum tracepoint_type) <static_tracepoint>: New.
11496 (struct tracepoint) <handle>: Mention static tracepoints.
11497 (struct static_tracepoint_ctx): New.
11498 (CMD_BUF_SIZE): New.
11499 (add_tracepoint_action): Handle static tracepoint actions.
11500 (unprobe_marker_at): New.
11501 (clear_installed_tracepoints): Handle static tracepoints.
11502 (cmd_qtdp): Handle static tracepoints.
11503 (probe_marker_at): New.
11504 (cmd_qtstart): Handle static tracepoints.
11505 (response_tracepoint): Handle static tracepoints.
11506 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11507 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11508 (get_context_regcache): Handle static tracepoints.
11509 (do_action_at_tracepoint): Handle static tracepoint actions.
11510 (traceframe_find_block_type): Handle static trace data blocks.
11511 (traceframe_read_sdata): New.
11512 (download_tracepoints): Download static tracepoint actions.
11513 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11514 (GDB_PROBE_NAME): New.
11515 (ust_ops): New.
11516 (GET_UST_SYM): New.
11517 (USTF): New.
11518 (dlsym_ust): New.
11519 (ust_marker_to_static_tracepoint): New.
11520 (gdb_probe): New.
11521 (collect_ust_data_at_tracepoint): New.
11522 (gdb_ust_probe): New.
11523 (UNIX_PATH_MAX, SOCK_DIR): New.
11524 (gdb_ust_connect_sync_socket): New.
11525 (resume_thread, stop_thread): New.
11526 (run_inferior_command): New.
11527 (init_named_socket): New.
11528 (gdb_ust_socket_init): New.
11529 (cstr_to_hexstr): New.
11530 (next_st): New.
11531 (first_marker, next_marker): New.
11532 (response_ust_marker): New.
11533 (cmd_qtfstm, cmd_qtsstm): New.
11534 (unprobe_marker_at, probe_marker_at): New.
11535 (cmd_qtstmat, gdb_ust_thread): New.
11536 (gdb_ust_init): New.
11537 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11538 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11539 (ST_REGENTRY): New.
11540 (x86_64_st_collect_regmap): New.
11541 (X86_64_NUM_ST_COLLECT_GREGS): New.
11542 (AMD64_RIP_REGNUM): New.
11543 (supply_static_tracepoint_registers): New.
11544 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11545 (ST_REGENTRY): New.
11546 (i386_st_collect_regmap): New.
11547 (i386_NUM_ST_COLLECT_GREGS): New.
11548 (supply_static_tracepoint_registers): New.
11549 * server.c (handle_query): Handle qXfer:statictrace:read.
11550 <qSupported>: Report support for StaticTracepoints, and
11551 qXfer:statictrace:read features.
11552 * server.h (traceframe_read_sdata)
11553 (supply_static_tracepoint_registers): Declare.
11554 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11555 (unpack_varlen_hex): Include in IPA build.
11556 * Makefile.in (ustlibs, ustinc): New.
11557 (IPA_OBJS): Add remote-utils-ipa.o.
11558 ($(IPA_LIB)): Link -ldl and -lpthread.
11559 (UST_CFLAGS): New.
11560 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11561 * config.in, configure: Regenerate.
11562
11563 2010-06-20 Ian Lance Taylor <iant@google.com>
11564 Pedro Alves <pedro@codesourcery.com>
11565
11566 * linux-x86-low.c (always_true): Delete.
11567 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11568 trying to fool the compiler with always_true.
11569
11570 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11571
11572 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11573 conditions in gdbserver.
11574
11575 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11576
11577 * spu-low.c (spu_read_memory): Wrap around local store limit.
11578 (spu_write_memory): Likewise.
11579
11580 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11581
11582 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11583 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11584 LONGEST uses.
11585 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11586 uses.
11587 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11588 uses with LONGEST uses.
11589
11590 2010-06-14 Stan Shebs <stan@codesourcery.com>
11591 Pedro Alves <pedro@codesourcery.com>
11592
11593 Bytecode compiler.
11594
11595 * linux-x86-low.c: Include limits.h.
11596 (add_insns): New.
11597 (always_true): New.
11598 (EMIT_ASM): New.
11599 (EMIT_ASM32): New.
11600 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11601 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11602 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11603 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11604 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11605 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11606 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11607 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11608 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11609 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11610 (amd64_emit_void_call_2): New.
11611 (amd64_emit_ops): New.
11612 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11613 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11614 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11615 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11616 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11617 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11618 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11619 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11620 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11621 (i386_emit_stack_adjust, i386_emit_int_call_1)
11622 (i386_emit_void_call_2): New.
11623 (i386_emit_ops): New.
11624 (x86_emit_ops): New.
11625 (the_low_target): Install x86_emit_ops.
11626 * server.h (struct emit_ops): New.
11627 (get_raw_reg_func_addr): Declare.
11628 (current_insn_ptr, emit_error): Declare.
11629 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11630 (set_trace_state_variable_value): New defines.
11631 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11632 addr_get_trace_state_variable_value and
11633 addr_set_trace_state_variable_value.
11634 (symbol_list): New fields for get_raw_reg,
11635 get_trace_state_variable_value and set_trace_state_variable_value.
11636 (condfn): New typedef.
11637 (struct tracepoint): New field `compiled_cond'.
11638 (do_action_at_tracepoint): Clear compiled_cond.
11639 (get_trace_state_variable_value, set_trace_state_variable_value):
11640 Export in the IPA.
11641 (condition_true_at_tracepoint): If there's a compiled condition,
11642 run that.
11643 (current_insn_ptr, emit_error): New globals.
11644 (struct bytecode_address): New.
11645 (get_raw_reg_func_addr): New.
11646 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11647 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11648 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11649 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11650 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11651 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11652 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11653 (compile_tracepoint_condition, compile_bytecodes): New.
11654 * target.h (emit_ops): Forward declare.
11655 (struct target_ops): New field emit_ops.
11656 (target_emit_ops): New.
11657 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11658 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11659 * linux-low.c (linux_emit_ops): New.
11660 (linux_target_ops): Install it.
11661 * linux-low.h (struct linux_target_ops): New field emit_ops.
11662
11663 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11664
11665 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11666 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11667
11668 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11669 Stan Shebs <stan@codesourcery.com>
11670
11671 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11672 (all): Depend on $(extra_libraries).
11673 (install-only): Install the IPA.
11674 (IPA_OBJS, IPA_LIB): New.
11675 (clean): Remove the IPA lib.
11676 (IPAGENT_CFLAGS): New.
11677 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11678 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11679 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11680 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11681 * configure.ac: Check for atomic builtins support in the compiler.
11682 (IPA_DEPFILES, extra_libraries): Define.
11683 * configure.srv (ipa_obj): Add description.
11684 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11685 (i[34567]86-*-linux*): Set ipa_obj.
11686 (x86_64-*-linux*): Set ipa_obj.
11687 * linux-low.c (stabilizing_threads): New.
11688 (supports_fast_tracepoints): New.
11689 (linux_detach): Stabilize threads before detaching.
11690 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11691 the lwp is either not stabilizing, or is moving out of a jump pad.
11692 (linux_fast_tracepoint_collecting): New.
11693 (maybe_move_out_of_jump_pad): New.
11694 (enqueue_one_deferred_signal): New.
11695 (dequeue_one_deferred_signal): New.
11696 (linux_wait_for_event_1): If moving out of a jump pad, defer
11697 pending signals to later.
11698 (linux_stabilize_threads): New.
11699 (linux_wait_1): Check if threads need moving out of jump pads, and
11700 do it if so.
11701 (stuck_in_jump_pad_callback): New.
11702 (move_out_of_jump_pad_callback): New.
11703 (lwp_running): New.
11704 (linux_resume_one_lwp): Handle moving out of jump pads.
11705 (linux_set_resume_request): Dequeue deferred signals.
11706 (need_step_over_p): Also step over fast tracepoint jumps.
11707 (start_step_over): Also uninsert fast tracepoint jumps.
11708 (finish_step_over): Also reinsert fast tracepoint jumps.
11709 (linux_install_fast_tracepoint_jump): New.
11710 (linux_target_ops): Install linux_stabilize_threads and
11711 linux_install_fast_tracepoint_jump_pad.
11712 * linux-low.h (linux_target_ops) <get_thread_area,
11713 install_fast_tracepoint_jump_pad>: New fields.
11714 (struct lwp_info) <collecting_fast_tracepoint,
11715 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11716 (linux_get_thread_area): Declare.
11717 * linux-x86-low.c (jump_insn): New.
11718 (x86_get_thread_area): New.
11719 (append_insns): New.
11720 (push_opcode): New.
11721 (amd64_install_fast_tracepoint_jump_pad): New.
11722 (i386_install_fast_tracepoint_jump_pad): New.
11723 (x86_install_fast_tracepoint_jump_pad): New.
11724 (the_low_target): Install x86_get_thread_area and
11725 x86_install_fast_tracepoint_jump_pad.
11726 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11727 (struct fast_tracepoint_jump): New.
11728 (fast_tracepoint_jump_insn): New.
11729 (fast_tracepoint_jump_shadow): New.
11730 (find_fast_tracepoint_jump_at): New.
11731 (fast_tracepoint_jump_here): New.
11732 (delete_fast_tracepoint_jump): New.
11733 (set_fast_tracepoint_jump): New.
11734 (uninsert_fast_tracepoint_jumps_at): New.
11735 (reinsert_fast_tracepoint_jumps_at): New.
11736 (set_breakpoint_at): Use write_inferior_memory.
11737 (uninsert_raw_breakpoint): Use write_inferior_memory.
11738 (check_mem_read): Mask out fast tracepoint jumps.
11739 (check_mem_write): Mask out fast tracepoint jumps.
11740 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11741 (set_fast_tracepoint_jump): Declare.
11742 (delete_fast_tracepoint_jump)
11743 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11744 (reinsert_fast_tracepoint_jumps_at): Declare.
11745 * regcache.c: Don't compile many functions when building the
11746 in-process agent library.
11747 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11748 the register buffer in the heap.
11749 (free_register_cache): If the register buffer isn't owned by the
11750 regcache, don't free it.
11751 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11752 pre-existing register caches.
11753 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11754 type.
11755 (convert_ascii_to_int): : Constify `from' parameter type.
11756 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11757 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11758 the needed buffer in-place.
11759 (relocate_instruction): New.
11760 * server.c (handle_query) <qSymbols>: If the target supports
11761 tracepoints, give it a chance of looking up symbols. Report
11762 support for fast tracepoints.
11763 (handle_status): Stabilize threads.
11764 (process_serial_event): Adjust.
11765 * server.h (struct fast_tracepoint_jump): Forward declare.
11766 (struct process_info) <fast_tracepoint_jumps>: New field.
11767 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11768 (decode_X_packet, decode_M_packet): Adjust.
11769 (relocate_instruction): Declare.
11770 (in_process_agent_loaded): Declare.
11771 (tracepoint_look_up_symbols): Declare.
11772 (struct fast_tpoint_collect_status): Declare.
11773 (fast_tracepoint_collecting): Declare.
11774 (force_unlock_trace_buffer): Declare.
11775 (handle_tracepoint_bkpts): Declare.
11776 (initialize_low_tracepoint)
11777 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11778 * target.h (struct target_ops) <stabilize_threads,
11779 install_fast_tracepoint_jump_pad>: New fields.
11780 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11781 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11782 [HAVE_STDINT_H]: Include stdint.h.
11783 (trace_debug_1): Rename to ...
11784 (trace_vdebug): ... this.
11785 (trace_debug): Rename to ...
11786 (trace_debug_1): ... this. Add `level' parameter.
11787 (trace_debug): New.
11788 (ATTR_USED, ATTR_NOINLINE): New.
11789 (IP_AGENT_EXPORT): New.
11790 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11791 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11792 (about_to_request_buffer_space, trace_buffer_is_full)
11793 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11794 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11795 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11796 (traceframe_write_count, traceframes_created)
11797 (trace_state_variables)
11798 New renaming defines.
11799 (struct ipa_sym_addresses): New.
11800 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11801 (symbol_list): New.
11802 (ipa_sym_addrs): New.
11803 (all_tracepoint_symbols_looked_up): New.
11804 (in_process_agent_loaded): New.
11805 (write_e_ipa_not_loaded): New.
11806 (maybe_write_ipa_not_loaded): New.
11807 (tracepoint_look_up_symbols): New.
11808 (debug_threads) [IN_PROCESS_AGENT]: New.
11809 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11810 (UNKNOWN_SIDE_EFFECTS): New.
11811 (stop_tracing): New.
11812 (flush_trace_buffer): New.
11813 (stop_tracing_bkpt): New.
11814 (flush_trace_buffer_bkpt): New.
11815 (read_inferior_integer): New.
11816 (read_inferior_uinteger): New.
11817 (read_inferior_data_pointer): New.
11818 (write_inferior_data_pointer): New.
11819 (write_inferior_integer): New.
11820 (write_inferior_uinteger): New.
11821 (struct collect_static_trace_data_action): Delete.
11822 (enum tracepoint_type): New.
11823 (struct tracepoint) <type>: New field `type'.
11824 <actions_str, step_actions, step_actions_str>: Only include in
11825 GDBserver.
11826 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11827 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11828 (tracepoints): Use IP_AGENT_EXPORT.
11829 (last_tracepoint): Don't include in the IPA.
11830 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11831 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11832 (alloced_trace_state_variables): New.
11833 (trace_state_variables): Use IP_AGENT_EXPORT.
11834 (traceframe_t): Delete unused variable.
11835 (circular_trace_buffer): Don't include in the IPA.
11836 (trace_buffer_start): Delete.
11837 (struct trace_buffer_control): New.
11838 (trace_buffer_free): Delete.
11839 (struct ipa_trace_buffer_control): New.
11840 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11841 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11842 New.
11843 (trace_buffer_ctrl): New.
11844 (TRACE_BUFFER_CTRL_CURR): New.
11845 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11846 Reimplement as macros.
11847 (trace_buffer_wrap): Delete.
11848 (traceframe_write_count, traceframe_read_count)
11849 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11850 (struct tracepoint_hit_ctx) <type>: New field.
11851 (struct fast_tracepoint_ctx): New.
11852 (memory_barrier): New.
11853 (cmpxchg): New.
11854 (record_tracepoint_error): Update atomically in the IPA.
11855 (clear_inferior_trace_buffer): New.
11856 (about_to_request_buffer_space): New.
11857 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11858 updating the same buffer.
11859 (add_tracepoint): Default the tracepoint's type to trap
11860 tracepoint, and orig_size to -1.
11861 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11862 internal variables.
11863 (create_trace_state_variable): New parameter `gdb'. Handle it.
11864 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11865 (cmd_qtdp): Handle fast tracepoints.
11866 (cmd_qtdv): Adjust.
11867 (max_jump_pad_size): New.
11868 (gdb_jump_pad_head): New.
11869 (get_jump_space_head): New.
11870 (claim_jump_space): New.
11871 (sort_tracepoints): New.
11872 (MAX_JUMP_SIZE): New.
11873 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11874 IPA.
11875 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11876 support. Upload fast traceframes, and delete internal IPA
11877 breakpoints.
11878 (stop_tracing_handler): New.
11879 (flush_trace_buffer_handler): New.
11880 (cmd_qtstop): Upload fast tracepoints.
11881 (response_tracepoint): Handle fast tracepoints.
11882 (tracepoint_finished_step): Upload fast traceframes. Set the
11883 tracepoint hit context's tracepoint type.
11884 (handle_tracepoint_bkpts): New.
11885 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11886 type. Add comment about fast tracepoints.
11887 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11888 non-existing action_str field.
11889 (get_context_regcache): Handle fast tracepoints.
11890 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11891 to the regcache.
11892 (fast_tracepoint_from_jump_pad_address): New.
11893 (fast_tracepoint_from_ipa_tpoint_address): New.
11894 (collecting_t): New.
11895 (force_unlock_trace_buffer): New.
11896 (fast_tracepoint_collecting): New.
11897 (collecting): New.
11898 (gdb_collect): New.
11899 (write_inferior_data_ptr): New.
11900 (target_tp_heap): New.
11901 (target_malloc): New.
11902 (download_agent_expr): New.
11903 (UALIGN): New.
11904 (download_tracepoints): New.
11905 (download_trace_state_variables): New.
11906 (upload_fast_traceframes): New.
11907 (IPA_FIRST_TRACEFRAME): New.
11908 (IPA_NEXT_TRACEFRAME_1): New.
11909 (IPA_NEXT_TRACEFRAME): New.
11910 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11911 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11912 (gdb_jump_pad_buffer_end): New.
11913 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11914 (initialize_tracepoint): Adjust.
11915 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11916 buffer. Initialize the low module.
11917 * utils.c (PREFIX, TOOLNAME): New.
11918 (malloc_failure): Use PREFIX.
11919 (error): In the IPA, an error causes an exit.
11920 (fatal, warning): Use PREFIX.
11921 (internal_error): Use TOOLNAME.
11922 (NUMCELLS): Increase to 10.
11923 * configure, config.in: Regenerate.
11924
11925 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11926
11927 * server.c (handle_query) <qSupported>: Do two passes over the
11928 qSupported string to avoid nesting strtok.
11929
11930 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11931
11932 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11933 (CDEPS): New.
11934 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11935 -Wl,--dynamic-list.
11936 * configure: Regenerate.
11937 * proc-service.list: New.
11938
11939 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11940
11941 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11942 New comment.
11943
11944 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11945
11946 * gdbreplay.c (remote_open): Check error return from socket() call by
11947 its equality to -1 not by it being negative.
11948 * remote-utils.c (remote_open): Likewise.
11949
11950 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11951
11952 * config.h: Regenerate.
11953
11954 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11955
11956 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11957 doesn't provide PTRACE_GET_THREAD_AREA.
11958
11959 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11960
11961 * linux-m68k-low.c: Include <asm/ptrace.h>
11962 (ps_get_thread_area): Implement.
11963
11964 2010-05-03 Doug Evans <dje@google.com>
11965
11966 * event-loop.c (struct callback_event): New struct.
11967 (callback_list): New global.
11968 (append_callback_event, delete_callback_event): New functions.
11969 (process_callback): New function.
11970 (start_event_loop): Call it.
11971 * remote-utils.c (NOT_SCHEDULED): Define.
11972 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11973 moved out of readchar.
11974 (readchar): Rewrite. Call reschedule before returning.
11975 (reset_readchar): New function.
11976 (remote_close): Call it.
11977 (process_remaining, reschedule): New functions.
11978 * server.h (callback_handler_func): New typedef.
11979 (append_callback_event, delete_callback_event): Declare.
11980
11981 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11982
11983 * proc-service.c (ps_pglobal_lookup): Use
11984 thread_db_look_up_one_symbol.
11985 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11986 parameter. Use it instead of all_symbols_looked_up.
11987 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11988 field.
11989 (all_symbols_looked_up): Don't declare.
11990 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11991 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11992 field.
11993 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11994 Set all_symbols_looked_up here.
11995 (thread_db_look_up_one_symbol): New.
11996 (thread_db_get_tls_address): Adjust.
11997 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11998 thread_db object on the heap, and tentatively set it in the
11999 process structure.
12000 (thread_db_init): Don't set all_symbols_looked_up here.
12001 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12002
12003 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12004
12005 * linux-low.c (linux_kill, linux_detach): Adjust.
12006 (status_pending_p_callback): Remove redundant statement. Check
12007 for !TARGET_WAITIKIND_IGNORE, instead of
12008 TARGET_WAITKIND_STOPPED.
12009 (handle_tracepoints): Make sure LWP is locked. Adjust.
12010 (linux_wait_for_event_1): Adjust.
12011 (linux_cancel_breakpoints): New.
12012 (unsuspend_one_lwp): New.
12013 (unsuspend_all_lwps): New.
12014 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12015 (send_sigstop_callback): Change return type to int, add new
12016 `except' parameter and handle it.
12017 (suspend_and_send_sigstop_callback): New.
12018 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12019 pass them down. If SUSPEND, also increment the lwp's suspend
12020 count.
12021 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12022 (need_step_over_p): Don't consider suspended LWPs.
12023 (start_step_over): Adjust.
12024 (proceed_one_lwp): Change return type to int, add new `except'
12025 parameter and handle it.
12026 (unsuspend_and_proceed_one_lwp): New.
12027 (proceed_all_lwps): Use find_inferior instead of
12028 for_each_inferior.
12029 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12030 also decrement the suspend count of LWPs. Pass `except' down,
12031 instead of hacking its suspend count.
12032 (linux_pause_all): Add `freeze' parameter. Adjust.
12033 (linux_unpause_all): New.
12034 (linux_target_ops): Install linux_unpause_all.
12035 * server.c (handle_status): Adjust.
12036 * target.h (struct target_ops): New fields `unpause_all' and
12037 `cancel_breakpoints'. Add new parameter to `pause_all'.
12038 (pause_all): Add new `freeze' parameter.
12039 (unpause_all): New.
12040 (cancel_breakpoints): New.
12041 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12042 cancel breakpoints.
12043 (cmd_qtstart): Pause threads.
12044 (stop_tracing): Pause threads, and cancel breakpoints.
12045 * win32-low.c (win32_target_ops): Adjust.
12046
12047 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12048
12049 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12050 the inferior right away from here...
12051 (linux_wait_1): ... to here, and adjust to check the thread's
12052 last_resume_kind instead of the lwp's step or stop_expected flags.
12053
12054 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12055
12056 * README: Use consistent `GDB' and `GDBserver' spellings.
12057
12058 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12059
12060 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12061 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12062 (linux_detach_one_lwp): Assume the lwp is stopped.
12063 (any_thread_of): Delete.
12064 (linux_detach): Stop all lwps here. Don't blindly delete all
12065 breakpoints.
12066 (delete_lwp_callback): New.
12067 (linux_mourn): Delete all lwps of the process that is gone.
12068 (linux_wait_1): Don't delete the last lwp of the process here.
12069 * mem-break.h (mark_breakpoints_out): Declare.
12070 * mem-break.c (mark_breakpoints_out): New.
12071 (free_all_breakpoints): Use it.
12072 * server.c (handle_target_event): If the process is gone, mark
12073 breakpoints out.
12074 * thread-db.c (struct thread_db) <create_bp>: New field.
12075 (thread_db_enable_reporting): Fix prototype. Store a thread event
12076 breakpoint reference in the thread_db struct.
12077 (thread_db_load_search): Clear the thread_db object.
12078 (try_thread_db_load_1): Ditto.
12079 (switch_to_process): New.
12080 (disable_thread_event_reporting): Use it.
12081 (remove_thread_event_breakpoints): New.
12082 (thread_db_detach, thread_db_mourn): Use it.
12083
12084 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12085
12086 * linux-low.c (linux_enable_event_reporting): New.
12087 (linux_wait_for_event_1, handle_extended_wait): Use it.
12088
12089 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12090
12091 * linux-low.c (linux_kill_one_lwp, linux_kill)
12092 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12093 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12094 SIGSTOP even if the LWP is stopped.
12095 (send_sigstop_callback): New.
12096 (stop_all_lwps): Use send_sigstop_callback instead.
12097 (linux_resume_one_thread): Adjust.
12098 (proceed_one_lwp): Still proceed an LWP that the client has
12099 requested to stop, if we haven't reported it as stopped yet. Make
12100 sure that LWPs the client want stopped, have a pending SIGSTOP.
12101
12102 2010-04-26 Doug Evans <dje@google.com>
12103
12104 * server.c (handle_general_set): Make static.
12105
12106 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12107 Print received char after testing for error/eof instead of before.
12108 (input_interrupt): Tweak comment.
12109
12110 2010-04-23 Doug Evans <dje@google.com>
12111
12112 * server.c (start_inferior): Print inferior argv if --debug.
12113
12114 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12115
12116 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12117 * nto-x86-low.c: Include server.h
12118
12119 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12120
12121 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12122 be consistent with other sources of this directory.
12123 (init_registers_amd64): Correct name of source file of this function
12124 in the comment.
12125
12126 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12127
12128 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12129 64-bit executables.
12130
12131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12132
12133 * win32-i386-low.c: Add 64-bit support.
12134 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12135 (init_registers_amd64): Declare.
12136 (mappings): Add 64-bit version of array.
12137 (init_windows_x86): New function.
12138 (the_low_target): Change init_arch field to init_windows_x86.
12139
12140 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12141
12142 * win32-low.c: Adapt to support also 64-bit architecture.
12143 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12144 (get_image_name): Use SIZE_T type for local variable `done'.
12145 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12146 (toolhelp_get_dll_name): Idem.
12147 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12148 Use uintptr_t typecast to avoid warning.
12149 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12150 (handle_exception): Use phex_nz to avoid warning.
12151 (win32_wait): Remove unused local variable `process'.
12152
12153 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12154
12155 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12156 `amd64-avx.o'.
12157
12158 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12159
12160 * configure.ac: Use `ws2_32' library for srv_mingw.
12161 * configure: Regenerate.
12162 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12163 * remote-utils.c: Likewise.
12164
12165 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12166
12167 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12168 if __x86_64__ is defined.
12169
12170 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12171
12172 * configure: Regenerate.
12173
12174 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12175
12176 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12177 * target.h (target_ops): New get_tib_address field.
12178 * win32-low.h (win32_thread_info): Add thread_local_base field.
12179 * win32-low.c (child_add_thread): Add tlb argument.
12180 Set thread_local_base field to TLB.
12181 (get_child_debug_event): Adapt to child_add_thread change.
12182 (win32_get_tib_address): New function.
12183 (win32_target_ops): Set get_tib_address field to
12184 win32_get_tib_address.
12185 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12186
12187 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12188
12189 * linux-low.c (linux_mourn): Also remove the process.
12190 * server.c (handle_target_event): Don't remove the process here.
12191 * nto-low.c (nto_mourn): New.
12192 (nto_target_ops): Install it.
12193 * spu-low.c (spu_mourn): New.
12194 (spu_target_ops): Install it.
12195 * win32-low.c (win32_mourn): New.
12196 (win32_target_ops): Install it.
12197
12198 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12199
12200 * server.h (buffer_xml_printf): Remove redundant `;'.
12201
12202 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12203
12204 * regcache.c (set_register_cache): Invalidate regcaches before
12205 changing the register cache layout.
12206 (regcache_invalidate_one): Allow a NULL regcache.
12207 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12208 regcaches before changing the register cache layout or the target
12209 regsets.
12210
12211 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12212
12213 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12214 variable warning on Linux/x86-64.
12215
12216 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12217
12218 GDBserver disconnected tracing support.
12219
12220 * linux-low.c (linux_remove_process): Delete.
12221 (add_lwp): Don't set last_resume_kind here.
12222 (linux_kill): Use `mourn'.
12223 (linux_detach): Use `thread_db_detach', and `mourn'.
12224 (linux_mourn): New.
12225 (linux_attach_lwp_1): Adjust comment.
12226 (linux_attach): last_resume_kind moved the thread_info; adjust.
12227 (status_pending_p_callback): Adjust.
12228 (linux_wait_for_event_1): Adjust.
12229 (count_events_callback, select_singlestep_lwp_callback)
12230 (select_event_lwp_callback, cancel_breakpoints_callback)
12231 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12232 (proceed_one_lwp): Adjust.
12233 (linux_async): Add debug output.
12234 (linux_thread_stopped): New.
12235 (linux_pause_all): New.
12236 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12237 linux_pause_all.
12238 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12239 (thread_db_free): Delete declaration.
12240 (thread_db_detach, thread_db_mourn): Declare.
12241 * thread-db.c (thread_db_init): Use thread_db_mourn.
12242 (thread_db_free): Delete, split in two.
12243 (disable_thread_event_reporting): New.
12244 (thread_db_detach): New.
12245 (thread_db_mourn): New.
12246
12247 * server.h (struct thread_info) <last_resume_kind>: New field.
12248 <attached>: Add comment.
12249 <gdb_detached>: New field.
12250 (handler_func): Change return type to int.
12251 (handle_serial_event, handle_target_event): Ditto.
12252 (gdb_connected): Declare.
12253 (tracing): Delete.
12254 (disconnected_tracing): Declare.
12255 (stop_tracing): Declare.
12256
12257 * server.c (handle_query) <qSupported>: Report support for
12258 disconnected tracing.
12259 (queue_stop_reply_callback): Account for running threads.
12260 (gdb_wants_thread_stopped): New.
12261 (gdb_wants_all_threads_stopped): New.
12262 (gdb_reattached_process): New.
12263 (handle_status): Clear the `gdb_detached' flag of all processes.
12264 In all-stop, stop all threads.
12265 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12266 (process_serial_event): If the remote connection breaks, or if an
12267 exit was forced with "monitor exit", force an event loop exit.
12268 Handle disconnected tracing on detach.
12269 (handle_serial_event): Adjust.
12270 (handle_target_event): If GDB isn't connected, forward events back
12271 to the inferior, unless the last process exited, in which case,
12272 exit gdbserver. Adjust interface.
12273
12274 * remote-utils.c (remote_open): Don't block in accept. Instead
12275 register an event loop source on the listen socket file
12276 descriptor. Refactor bits into ...
12277 (listen_desc): ... this new global.
12278 (gdb_connected): ... this new function.
12279 (enable_async_notification): ... this new function.
12280 (handle_accept_event): ... this new function.
12281 (remote_close): Clear remote_desc.
12282
12283 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12284
12285 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12286 New fields.
12287 (mourn_inferior): Define.
12288 (target_process_qsupported): Avoid the dangling else problem.
12289 (thread_stopped): Define.
12290 (pause_all): Define.
12291 (target_waitstatus_to_string): Declare.
12292 * target.c (target_waitstatus_to_string): New.
12293
12294 * tracepoint.c (tracing): Make extern.
12295 (disconnected_tracing): New.
12296 (stop_tracing): Make extern. Handle tracing stops due to GDB
12297 disconnecting.
12298 (cmd_qtdisconnected): New.
12299 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12300 (handle_tracepoint_general_set): Handle QTDisconnected.
12301
12302 * event-loop.c (event_handler_func): Change return type to int.
12303 (process_event): Bail out if the event handler wants the event
12304 loop to stop.
12305 (handle_file_event): Ditto.
12306 (start_event_loop): Bail out if the event handler wants the event
12307 loop to stop.
12308
12309 * nto-low.c (nto_target_ops): Adjust.
12310 * spu-low.c (spu_wait): Don't remove the process here.
12311 (spu_target_ops): Adjust.
12312 * win32-low.c (win32_wait): Don't remove the process here.
12313 (win32_target_ops): Adjust.
12314
12315 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12316
12317 * regcache.c (realloc_register_cache): Invalidate inferior's
12318 regcache before recreating it.
12319
12320 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12321
12322 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12323
12324 2010-04-09 Stan Shebs <stan@codesourcery.com>
12325 Pedro Alves <pedro@codesourcery.com>
12326
12327 * server.h (LONGEST): New.
12328 (struct thread_info) <while_stepping>: New field.
12329 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12330 Declare.
12331 (initialize_tracepoint, handle_tracepoint_general_set)
12332 (handle_tracepoint_query, tracepoint_finished_step)
12333 (tracepoint_was_hit, release_while_stepping_state_list):
12334 (current_traceframe): Declare.
12335 * server.c (handle_general_set): Handle tracepoint packets.
12336 (read_memory): New.
12337 (write_memory): New.
12338 (handle_search_memory_1): Use read_memory.
12339 (handle_query): Report support for conditional tracepoints, trace
12340 state variables, and tracepoint sources. Handle tracepoint
12341 queries.
12342 (main): Initialize the tracepoints module.
12343 (process_serial_event): Handle traceframe reads/writes.
12344
12345 * linux-low.c (handle_tracepoints): New.
12346 (linux_wait_1): Call it.
12347 (linux_resume_one_lwp): Handle while-stepping.
12348 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12349 (linux_target_ops): Install them.
12350 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12351 New field.
12352 * linux-x86-low.c (x86_supports_tracepoints): New.
12353 (the_low_target). Install it.
12354
12355 * mem-break.h (delete_breakpoint): Declare.
12356 * mem-break.c (delete_breakpoint): Make external.
12357
12358 * target.h (struct target_ops): Add `supports_tracepoints',
12359 `read_pc', and `write_pc' fields.
12360 (target_supports_tracepoints): Define.
12361 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12362 (phex_nz): New.
12363
12364 * regcache.h (struct regcache) <registers_owned>: New field.
12365 (init_register_cache, regcache_cpy): Declare.
12366 (regcache_read_pc, regcache_write_pc): Declare.
12367 (register_cache_size): Declare.
12368 (supply_regblock): Declare.
12369 * regcache.c (init_register_cache): New.
12370 (new_register_cache): Use it.
12371 (regcache_cpy): New.
12372 (register_cache_size): New.
12373 (supply_regblock): New.
12374 (regcache_read_pc, regcache_write_pc): New.
12375
12376 * tracepoint.c: New.
12377
12378 * Makefile.in (OBS): Add tracepoint.o.
12379 (tracepoint.o): New rule.
12380
12381 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12382
12383 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12384 (i386-mmx.o): New.
12385 (i386-mmx.c): Likewise.
12386 (i386-mmx-linux.o): Likewise.
12387 (i386-mmx-linux.c): Likewise.
12388
12389 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12390 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12391 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12392 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12393
12394 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12395 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12396 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12397
12398 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12399
12400 * Makefile.in (clean): Updated.
12401 (i386-avx.o): New.
12402 (i386-avx.c): Likewise.
12403 (i386-avx-linux.o): Likewise.
12404 (i386-avx-linux.c): Likewise.
12405 (amd64-avx.o): Likewise.
12406 (amd64-avx.c): Likewise.
12407 (amd64-avx-linux.o): Likewise.
12408 (amd64-avx-linux.c): Likewise.
12409
12410 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12411 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12412 (srv_amd64_regobj): Add amd64-avx.o.
12413 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12414 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12415 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12416 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12417 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12418 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12419 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12420
12421 * i387-fp.c: Include "i386-xstate.h".
12422 (i387_xsave): New.
12423 (i387_cache_to_xsave): Likewise.
12424 (i387_xsave_to_cache): Likewise.
12425 (x86_xcr0): Likewise.
12426
12427 * i387-fp.h (i387_cache_to_xsave): Likewise.
12428 (i387_xsave_to_cache): Likewise.
12429 (x86_xcr0): Likewise.
12430
12431 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12432 * linux-crisv32-low.c (target_regsets): Likewise.
12433 * linux-m68k-low.c (target_regsets): Likewise.
12434 * linux-mips-low.c (target_regsets): Likewise.
12435 * linux-ppc-low.c (target_regsets): Likewise.
12436 * linux-s390-low.c (target_regsets): Likewise.
12437 * linux-sh-low.c (target_regsets): Likewise.
12438 * linux-sparc-low.c (target_regsets): Likewise.
12439 * linux-xtensa-low.c (target_regsets): Likewise.
12440
12441 * linux-low.c: Include <sys/uio.h>.
12442 (regsets_fetch_inferior_registers): Support nt_type.
12443 (regsets_store_inferior_registers): Likewise.
12444 (linux_process_qsupported): New.
12445 (linux_target_ops): Add linux_process_qsupported.
12446
12447 * linux-low.h (regset_info): Add nt_type.
12448 (linux_target_ops): Add process_qsupported.
12449
12450 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12451 and <sys/uio.h>.
12452 (init_registers_i386_avx_linux): New.
12453 (init_registers_amd64_avx_linux): Likewise.
12454 (xmltarget_i386_linux_no_xml): Likewise.
12455 (xmltarget_amd64_linux_no_xml): Likewise.
12456 (PTRACE_GETREGSET): Likewise.
12457 (PTRACE_SETREGSET): Likewise.
12458 (x86_fill_xstateregset): Likewise.
12459 (x86_store_xstateregset): Likewise.
12460 (use_xml): Likewise.
12461 (x86_linux_update_xmltarget): Likewise.
12462 (x86_linux_process_qsupported): Likewise.
12463 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12464 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12465 init_registers_i386_linux here. Call
12466 x86_linux_update_xmltarget.
12467 (the_low_target): Add x86_linux_process_qsupported.
12468
12469 * server.c (handle_query): Call target_process_qsupported.
12470
12471 * target.h (target_ops): Add process_qsupported.
12472 (target_process_qsupported): New.
12473
12474 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12475
12476 * inferiors.c (add_thread): Set last_status kind to
12477 TARGET_WAITKIND_IGNORE.
12478 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12479 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12480 (linux_wait_1): Move `thread' local definition to block that uses
12481 it. Don't NULL initialize `event_child'.
12482 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12483 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12484 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12485
12486 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12487
12488 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12489 an extended waitstatus, or by a watchpoint.
12490 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12491 thread was stepping or has been stopped by a watchpoint.
12492
12493 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12494
12495 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12496 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12497 of another, then delete the previous, and validate all
12498 breakpoints.
12499 (validate_inserted_breakpoint): New.
12500 (delete_disabled_breakpoints): New.
12501 (validate_breakpoints): New.
12502 (check_mem_read): Validate breakpoints before trusting their
12503 shadow. Delete disabled breakpoints.
12504 (check_mem_write): Validate breakpoints before trusting they
12505 should be inserted. Delete disabled breakpoints.
12506 * mem-break.h (validate_breakpoints):
12507 * server.c (handle_query): Validate breakpoints when we see a
12508 qSymbol query.
12509
12510 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12511
12512 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12513 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12514 if we could tell there's a GDB breakpoint at stop_pc.
12515 (need_step_over_p): Don't do a step over if we find a GDB
12516 breakpoint at the resume PC.
12517
12518 * mem-break.c (struct raw_breakpoint): New.
12519 (enum bkpt_type): New type `gdb_breakpoint'.
12520 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12521 fields. New field `raw'.
12522 (find_raw_breakpoint_at): New.
12523 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12524 breakpoint instead.
12525 (set_breakpoint_at): Adjust.
12526 (delete_raw_breakpoint): New.
12527 (release_breakpoint): New.
12528 (delete_breakpoint): Rename to...
12529 (delete_breakpoint_1): ... this. Add proc parameter. Use
12530 release_breakpoint. Return ENOENT.
12531 (delete_breakpoint): Reimplement.
12532 (find_breakpoint_at): Delete.
12533 (find_gdb_breakpoint_at): New.
12534 (delete_breakpoint_at): Delete.
12535 (set_gdb_breakpoint_at): New.
12536 (delete_gdb_breakpoint_at): New.
12537 (gdb_breakpoint_here): New.
12538 (set_reinsert_breakpoint): Use release_breakpoint.
12539 (uninsert_breakpoint): Rename to ...
12540 (uninsert_raw_breakpoint): ... this.
12541 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12542 (reinsert_raw_breakpoint): Change parameter type to
12543 raw_breakpoint.
12544 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12545 instead.
12546 (check_breakpoints): Adjust. Use release_breakpoint.
12547 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12548 (breakpoint_inserted_here): Ditto.
12549 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12550 Don't trust the breakpoint's shadow if it is not inserted.
12551 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12552 (delete_all_breakpoints): Adjust.
12553 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12554 use delete_breakpoint_1.
12555
12556 * mem-break.h (breakpoints_supported): Delete declaration.
12557 (set_gdb_breakpoint_at): Declare.
12558 (gdb_breakpoint_here): Declare.
12559 (delete_breakpoint_at): Delete.
12560 (delete_gdb_breakpoint_at): Declare.
12561
12562 * server.h (struct raw_breakpoint): Forward declare.
12563 (struct process_info): New field `raw_breakpoints'.
12564
12565 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12566 breakpoints.
12567
12568 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12569
12570 * linux-low.c (status_pending_p_callback): Fix comment.
12571 (linux_wait_for_event_1): Move most of the internal breakpoint
12572 handling from here...
12573 (linux_wait_1): ... to here.
12574 (count_events_callback): New.
12575 (select_singlestep_lwp_callback): New.
12576 (select_event_lwp_callback): New.
12577 (cancel_breakpoints_callback): New.
12578 (select_event_lwp): New.
12579 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12580 priority to all LWPs that have had events that should be reported
12581 to the client. Cancel breakpoints when about to reporting the
12582 event to the client, not while stopping lwps. No longer cancel
12583 finished single-steps here.
12584 (cancel_finished_single_step): Delete.
12585 (cancel_finished_single_steps): Delete.
12586
12587 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12588
12589 * mem-break.c (enum bkpt_type): New.
12590 (struct breakpoint): New field `type'.
12591 (set_breakpoint_at): Change return type to struct breakpoint
12592 pointer. Set type to `other_breakpoint' by default.
12593 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12594 in the breakpoint list.
12595 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12596 (reinsert_breakpoint): Rename to ...
12597 (reinsert_raw_breakpoint): ... this.
12598 (reinsert_breakpoints_at): Adjust.
12599 * mem-break.h (struct breakpoint): Declare.
12600 (set_breakpoint_at): Change return type to struct breakpoint
12601 pointer.
12602
12603 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12604
12605 * server.c (handle_query): Assign, not compare.
12606
12607 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12608
12609 Teach linux gdbserver to step-over-breakpoints.
12610
12611 * linux-low.c (can_hardware_single_step): New.
12612 (supports_breakpoints): New.
12613 (handle_extended_wait): If stopping threads, read the stop pc of
12614 the new cloned LWP.
12615 (get_pc): New.
12616 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12617 low target doesn't support retrieving the PC.
12618 (add_lwp): Set last_resume_kind to resume_continue.
12619 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12620 (linux_attach): Don't clear stop_expected. Set the lwp's
12621 last_resume_kind to resume_stop.
12622 (linux_detach_one_lwp): Don't check for removed breakpoints.
12623 (check_removed_breakpoint): Delete.
12624 (status_pending_p): Rename to ...
12625 (status_pending_p_callback): ... this. Don't check for removed
12626 breakpoints. Don't consider threads that are stopped from GDB's
12627 perspective.
12628 (linux_wait_for_lwp): Always read the stop_pc here.
12629 (cancel_breakpoint): New.
12630 (step_over_bkpt): New global.
12631 (linux_wait_for_event_1): Implement stepping over breakpoints.
12632 (gdb_wants_lwp_stopped): New.
12633 (gdb_wants_all_stopped): New.
12634 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12635 single-step traps here. Store the thread's last reported target
12636 wait status.
12637 (send_sigstop): Don't clear stop_expected. Always set it,
12638 instead.
12639 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12640 (cancel_finished_single_step): New.
12641 (cancel_finished_single_steps): New.
12642 (wait_for_sigstop): Don't cancel finished single-step traps here.
12643 (linux_resume_one_lwp): Don't check for removed breakpoints.
12644 Don't set `step' on non-hardware step archs.
12645 (linux_set_resume_request): Ignore resume_stop requests if already
12646 stopping or stopped. Set the lwp's last_resume_kind.
12647 (resume_status_pending_p): Don't check for removed breakpoints.
12648 (need_step_over_p): New.
12649 (start_step_over): New.
12650 (finish_step_over): New.
12651 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12652 requests. Clear the thread's last reported target waitstatus.
12653 Don't use the `suspended' flag. Don't consider pending breakpoints.
12654 (linux_resume): Start a step-over if necessary.
12655 (proceed_one_lwp): New.
12656 (proceed_all_lwps): New.
12657 (unstop_all_lwps): New.
12658 * linux-low.h (struct lwp_info): Rewrite comment for the
12659 `suspended' flag. Add the `stop_pc' field. Delete the
12660 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12661 Add `'last_resume_kind' and `need_step_over' fields.
12662 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12663 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12664 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12665 (set_raw_breakpoint_at): New.
12666 (set_breakpoint_at): Rewrite to use it.
12667 (reinsert_breakpoint_handler): Delete.
12668 (set_reinsert_breakpoint): New.
12669 (reinsert_breakpoint_by_bp): Delete.
12670 (delete_reinsert_breakpoints): New.
12671 (uninsert_breakpoint): Rewrite.
12672 (uninsert_breakpoints_at): New.
12673 (reinsert_breakpoint): Rewrite.
12674 (reinsert_breakpoints_at): New.
12675 (check_breakpoints): Rewrite.
12676 (breakpoint_here): New.
12677 (breakpoint_inserted_here): New.
12678 (check_mem_read): Adjust.
12679 * mem-break.h (breakpoints_supported, breakpoint_here)
12680 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12681 (reinsert_breakpoint_by_bp): Delete declaration.
12682 (delete_reinsert_breakpoints): Declare.
12683 (reinsert_breakpoint): Delete declaration.
12684 (reinsert_breakpoints_at): Declare.
12685 (uninsert_breakpoint): Delete declaration.
12686 (uninsert_breakpoints_at): Declare.
12687 (check_breakpoints): Adjust prototype.
12688 * server.h: Adjust include order.
12689 (struct thread_info): Declare here. Add a `last_status' field.
12690
12691 2010-03-23 Michael Snyder <msnyder@vmware.com>
12692
12693 * server.c (crc32): New function.
12694 (handle_query): Add handling for 'qCRC:' request.
12695
12696 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12697
12698 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12699 lwp had been stopped by a watchpoint.
12700
12701 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12702
12703 * server.h (internal_error): Declare.
12704 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12705 * utils.c (internal_error): New function.
12706
12707 2010-03-15 Andreas Schwab <schwab@redhat.com>
12708
12709 * configure.srv: Fix typo setting srv_regobj.
12710
12711 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12712
12713 * linux-low.c (fetch_register): Avoid passing a non string literal
12714 format to `error'.
12715 (usr_store_inferior_registers): Ditto.
12716
12717 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12718
12719 * linux-low.c (linux_write_memory): Bail out early if peeking
12720 memory failed.
12721
12722 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12723
12724 * linux-low.h (struct lwp_info): New fields
12725 `stopped_by_watchpoint' and `stopped_data_address'.
12726 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12727 here, and cache them in the lwp object.
12728 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12729 directly.
12730 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12731 field.
12732 (linux_stopped_by_watchpoint): Rewrite.
12733 (linux_stopped_data_address): Rewrite.
12734
12735 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12736
12737 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12738 switching the current inferior, not before.
12739
12740 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12741
12742 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12743 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12744 i386-linux.c and amd64-linux.c.
12745 (reg-i386.o): Removed.
12746 (reg-i386.c): Likewise.
12747 (reg-i386-linux.o): Likewise.
12748 (reg-i386-linux.c): Likewise.
12749 (reg-x86-64.o): Likewise.
12750 (reg-x86-64.c): Likewise.
12751 (reg-x86-64-linux.o): Likewise.
12752 (reg-x86-64-linux.c): Likewise.
12753 (i386.o): New.
12754 (i386.c): Likewise.
12755 (i386-linux.o): Likewise.
12756 (i386-linux.c): Likewise.
12757 (amd64.o): Likewise.
12758 (amd64.c): Likewise.
12759 (amd64-linux.o): Likewise.
12760 (amd64-linux.c): Likewise.
12761
12762 * configure.srv (srv_i386_regobj): New.
12763 (srv_i386_linux_regobj): Likewise.
12764 (srv_amd64_regobj): Likewise.
12765 (srv_amd64_linux_regobj): Likewise.
12766 (srv_i386_32bit_xmlfiles): Likewise.
12767 (srv_i386_64bit_xmlfiles): Likewise.
12768 (srv_i386_xmlfiles): Likewise.
12769 (srv_amd64_xmlfiles): Likewise.
12770 (srv_i386_linux_xmlfiles): Likewise.
12771 (srv_amd64_linux_xmlfiles): Likewise.
12772 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12773 srv_xmlfiles to $srv_i386_xmlfiles.
12774 (i[34567]86-*-mingw32ce*): Likewise.
12775 (i[34567]86-*-mingw*): Likewise.
12776 (i[34567]86-*-nto*): Likewise.
12777 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12778 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12779 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12780 (x86_64-*-linux*): Likewise.
12781
12782 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12783 (init_registers_amd64_linux): New.
12784 (x86_arch_setup): Replace init_registers_x86_64_linux with
12785 init_registers_amd64_linux.
12786
12787 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12788
12789 * configure.ac: Check for libdl. If it is not available link against
12790 static libthread_db.
12791 * configure: Regenerate.
12792
12793 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12794
12795 PR9605
12796
12797 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12798 handing a read watchpoint.
12799 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12800
12801 2010-02-12 Doug Evans <dje@google.com>
12802
12803 * linux-low.c (linux_supports_tracefork_flag): Document.
12804 (linux_look_up_symbols): Add comment.
12805
12806 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12807
12808 * regcache.c (supply_register): Clear regcache if buf is NULL.
12809
12810 2010-02-02 Nicolas Roche <roche@sourceware.org>
12811 Joel Brobecker <brobecker@adacore.com>
12812
12813 * inferiors.c (find_inferior): Add function documentation.
12814 (unloaded_dll): Handle the case where the unloaded dll has not
12815 been previously registered in the dll list.
12816
12817 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12818
12819 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12820 (thumb2_breakpoint): New.
12821 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12822
12823 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12824
12825 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12826 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12827 breakpoints.
12828
12829 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12830
12831 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12832
12833 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12834
12835 * linux-s390-low.c (s390_collect_ptrace_register)
12836 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12837
12838 2010-01-21 Doug Evans <dje@google.com>
12839
12840 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12841 (PTRACE_ARG4_TYPE): New macro.
12842 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12843 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12844 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12845 (usr_store_inferior_registers): Ditto.
12846 (linux_read_memory, linux_write_memory): Ditto.
12847 (linux_test_for_tracefork): Ditto.
12848
12849 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12850 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12851
12852 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12853
12854 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12855 target.
12856
12857 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12858
12859 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12860 prototype to take a regcache. Adjust.
12861
12862 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12863
12864 * regcache.h (struct thread_info): Forward declare.
12865 (struct regcache): New.
12866 (new_register_cache): Adjust prototype.
12867 (get_thread_regcache): Declare.
12868 (free_register_cache): Adjust prototype.
12869 (registers_to_string, registers_from_string): Ditto.
12870 (supply_register, supply_register_by_name, collect_register)
12871 (collect_register_as_string, collect_register_by_name): Ditto.
12872 * regcache.c (struct inferior_regcache_data): Delete.
12873 (get_regcache): Rename to ...
12874 (get_thread_regcache): ... this. Adjust. Switch inferior before
12875 fetching registers.
12876 (regcache_invalidate_one): Adjust.
12877 (regcache_invalidate): Fix prototype.
12878 (new_register_cache): Return the new register cache.
12879 (free_register_cache): Change prototype.
12880 (realloc_register_cache): Adjust.
12881 (registers_to_string): Change prototype to take a regcache. Adjust.
12882 (registers_from_string): Ditto.
12883 (register_data): Ditto.
12884 (supply_register): Ditto.
12885 (supply_register_by_name): Ditto.
12886 (collect_register): Ditto.
12887 (collect_register_as_string): Ditto.
12888 (collect_register_by_name): Ditto.
12889 * server.c (process_serial_event): Adjust.
12890 * linux-low.h (regset_fill_func, regset_store_func): Change
12891 prototype.
12892 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12893 Change prototype.
12894 * linux-low.c (get_stop_pc): Adjust.
12895 (check_removed_breakpoint): Adjust.
12896 (linux_wait_for_event): Adjust.
12897 (linux_resume_one_lwp): Adjust.
12898 (fetch_register): Add regcache parameter. Adjust.
12899 (usr_store_inferior_registers): Ditto.
12900 (regsets_fetch_inferior_registers): Ditto.
12901 (regsets_store_inferior_registers): Ditto.
12902 (linux_fetch_registers, linux_store_registers): Ditto.
12903 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12904 regcache. Adjust.
12905 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12906 Ditto.
12907 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12908 prototype to take a regcache.
12909 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12910 * remote-utils.c (convert_ascii_to_int, outreg)
12911 (prepare_resume_reply): Change prototype to take a regcache.
12912 Adjust.
12913 * target.h (struct target_ops) <fetch_registers, store_registers>:
12914 Change prototype to take a regcache.
12915 (fetch_inferior_registers, store_inferior_registers): Change
12916 prototype to take a regcache. Adjust.
12917 * proc-service.c (ps_lgetregs): Adjust.
12918 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12919 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12920 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12921 take a regcache. Adjust.
12922 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12923 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12924 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12925 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12926 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12927 (cris_cannot_fetch_register):
12928 (cris_breakpoint_at): Change prototype to take a regcache.
12929 Adjust.
12930 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12931 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12932 to take a regcache. Adjust.
12933 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12934 Adjust.
12935 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12936 take a regcache. Adjust.
12937 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12938 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12939 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12940 * linux-mips-low.c (mips_get_pc):
12941 (mips_set_pc): Change prototype to take a regcache. Adjust.
12942 (mips_reinsert_addr): Adjust.
12943 (mips_collect_register): Change prototype to take a regcache.
12944 Adjust.
12945 (mips_supply_register):
12946 (mips_collect_register_32bit, mips_supply_register_32bit)
12947 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12948 (mips_store_fpregset): Ditto.
12949 * linux-ppc-low.c (ppc_supply_ptrace_register)
12950 (ppc_supply_ptrace_register): Ditto.
12951 (parse_spufs_run): Adjust.
12952 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12953 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12954 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12955 take a regcache. Adjust.
12956 * linux-s390-low.c (s390_collect_ptrace_register)
12957 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12958 (s390_set_pc): Change prototype to take a regcache. Adjust.
12959 (s390_arch_setup): Adjust.
12960 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12961 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12962 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12963 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12964 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12965 regcache. Adjust.
12966 (sparc_breakpoint_at): Adjust.
12967 * linux-xtensa-low.c (xtensa_fill_gregset):
12968 (xtensa_store_gregset):
12969 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12970 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12971 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12972 prototype to take a regcache. Adjust.
12973 * win32-arm-low.c (arm_fetch_inferior_register)
12974 (arm_store_inferior_register): Change prototype to take a
12975 regcache. Adjust.
12976 * win32-i386-low.c (i386_fetch_inferior_register)
12977 (i386_store_inferior_register): Change prototype to take a
12978 regcache. Adjust.
12979 * win32-low.c (child_fetch_inferior_registers)
12980 (child_store_inferior_registers): Change prototype to take a
12981 regcache. Adjust.
12982 (win32_wait): Adjust.
12983 (win32_fetch_inferior_registers): Change prototype to take a
12984 regcache. Adjust.
12985 (win32_store_inferior_registers): Adjust.
12986 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12987 store_inferior_register>: Change prototype to take a regcache.
12988
12989 2010-01-20 Doug Evans <dje@google.com>
12990
12991 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12992 #ifdef.
12993 (linux_wait_for_event1, linux_init_signals): Ditto.
12994 (W_STOPCODE): Provide definition if missing.
12995
12996 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12997
12998 * linux-low.c (linux_core_of_thread): New.
12999 (compare_ints, show_process, list_threads): New.
13000 (linux_qxfer_osdata): Report threads and cores.
13001 (linux_target_op): Register linux_core_of_thread.
13002 * remote-utils.c (prepare_resume_reply): Report the core.
13003 (buffer_xml_printf): Support %d specifier.
13004 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13005 New.
13006 (handle_query): Handle qXfer:threads. Announce availability
13007 thereof.
13008 * target.h (struct target_ops): New field core_of_thread.
13009
13010 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13011
13012 * Makefile.in (clean): Remove new generated files.
13013 (reg-s390.o, reg-s390.c): Remove rules.
13014 (reg-s390x.o, reg-s390x.c): Likewise.
13015 (s390-linux32.o, s390-linux32.c): Add rules.
13016 (s390-linux64.o, s390-linux64.c): Likewise.
13017 (s390x-linux64.o, s390x-linux64.c): Likewise.
13018 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13019 * linux-s390-low.c: Include <elf.h>.
13020 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13021 (init_registers_s390): Remove prototype.
13022 (init_registers_s390x): Likewise.
13023 (init_registers_s390_linux32): Add prototype.
13024 (init_registers_s390_linux64): Likewise.
13025 (init_registers_s390x_linux64): Likewise.
13026 (s390_num_regs_3264): New define.
13027 (s390_regmap_3264): New global variable.
13028 (s390_cannot_fetch_register): Remove obsolete check.
13029 (s390_cannot_store_register): Likewise.
13030 (s390_collect_ptrace_register): Handle upper/lower register halves.
13031 (s390_supply_ptrace_register): Likewise.
13032 (s390_fill_gregset): Update to register number changes.
13033 (s390_get_hwcap): New routine.
13034 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13035 Install appropriate regmap and register set.
13036
13037 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13038
13039 * server.c (gdbserver_version): Update copyright year to 2010.
13040 * gdbreplay.c (gdbreplay_version): Likewise.
13041
13042 2009-12-28 Doug Evans <dje@google.com>
13043
13044 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13045 elf/external.h. Include <elf.h> instead but only if necessary.
13046
13047 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13048
13049 * linux-low.c (linux_remove_process): Remove `detaching'
13050 parameter. Don't release/detach from thread_db here.
13051 (linux_kill): Release/detach from thread_db here, ...
13052 (linux_detach): ... and here, before actually detaching.
13053 (linux_wait_1): ... and here, when a process exits.
13054 * thread-db.c (any_thread_of): New.
13055 (thread_db_free): Switch the current inferior to a thread of the
13056 passed in process.
13057
13058 2009-12-21 Doug Evans <dje@google.com>
13059
13060 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13061
13062 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13063 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13064 warning ifndef __NR_tkill. Move setting of errno there too.
13065 Delete unnecessary resetting of errno after syscall.
13066 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13067
13068 * configure.ac: Check for dladdr.
13069 * config.in: Regenerate.
13070 * configure: Regenerate.
13071 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13072 (try_thread_db_load): Update.
13073
13074 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13075
13076 2009-12-18 Doug Evans <dje@google.com>
13077
13078 * event-loop.c: Include unistd.h if it exists.
13079
13080 * linux-low.c (my_waitpid): Move definition away from being in
13081 between linux_tracefork_child/linux_test_for_tracefork.
13082
13083 * gdb_proc_service.h (psaddr_t): Fix type.
13084 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13085 signature to match glibc.
13086
13087 2009-12-16 Doug Evans <dje@google.com>
13088
13089 * linux-low.c (linux_read_memory): Fix argument to read.
13090
13091 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13092
13093 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13094 events, don't leave current_inferior pointing at null.
13095
13096 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13097
13098 * win32-low.c (LOG): Delete.
13099 (OUTMSG): Output to stderr.
13100 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13101 on compile time LOG macro.
13102 (win32_wait): Fix debug output.
13103
13104 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13105
13106 * win32-low.c (win32_add_one_solib): If the dll name is
13107 "ntdll.dll", prepend the system directory to the dll path.
13108
13109 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13112
13113 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13114 Vladimir Prus <vladimir@codesourcery.com>
13115
13116 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13117 * configure.ac: Check for __mcoldfire__ and set
13118 gdb_cv_m68k_is_coldfire.
13119 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13120 reg-cf.o and reg-m68k.o.
13121 * configure: Regenerated.
13122
13123 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13124
13125 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13126 Pass it to thread_db_free.
13127 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13128 proper `detaching' argument to linux_remove_process.
13129 * linux-low.h (thread_db_free): Add `detaching' parameter.
13130 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13131 to thread_db_free.
13132 (thread_db_free): Add `detaching' parameter. Only
13133 call td_ta_clear_event if detaching from process.
13134
13135 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13136
13137 * thread-db.c (thread_db_free): Fix typo.
13138
13139 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13140
13141 PR gdb/10838
13142 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13143
13144 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13145
13146 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13147 with an i686 compiler.
13148 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13149 needed.
13150 * configure: Rebuilt.
13151
13152 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13153
13154 PR gdb/10783
13155
13156 * server.c (handle_search_memory_1): Correct read_addr initialization
13157 in loop for searching subsequent chunks.
13158
13159 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13160
13161 * configure.ac: New --with-libthread-db option.
13162 * thread-db.c: Allow direct dependence on libthread_db.
13163 (thread_db_free): Adjust.
13164 * config.in: Regenerate.
13165 * configure: Likewise.
13166
13167 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13168
13169 PR gdb/10757
13170 * thread-db.c (attach_thread): New function.
13171 (maybe_attach_thread): Return success/failure.
13172 (find_new_threads_callback): Adjust.
13173 (thread_db_find_new_threads): Loop until no new threads.
13174
13175 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13176
13177 * proc-service.c (ps_lgetregs): Formatting.
13178
13179 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13180
13181 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13182 * configure.ac: Adjust.
13183 * linux-low.h (struct process_info_private): Move members to struct
13184 thread_db.
13185 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13186 * linux-low.c (linux_remove_process): Adjust.
13187 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13188 * server.c (handle_query): Move code ...
13189 (handle_monitor_command): ... here. New function.
13190 * target.h (struct target_ops): New member.
13191 * thread-db.c (struct thread_db): New.
13192 (libthread_db_search_path): New variable.
13193 (thread_db_create_event, thread_db_enable_reporting)
13194 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13195 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13196 (try_thread_db_load_1, dladdr_to_soname): New functions.
13197 (try_thread_db_load, thread_db_load_search): New functions.
13198 (thread_db_init): Search for libthread_db.
13199 (thread_db_free): New function.
13200 (thread_db_handle_monitor_command): Likewise.
13201 * config.in: Regenerate.
13202 * configure: Regenerate.
13203
13204 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13205
13206 * spu-low.c (spu_kill): Wait for inferior to terminate.
13207 Call clear_inferiors.
13208 (spu_detach): Call clear_inferiors.
13209
13210 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13211
13212 * aclocal.m4: Regenerate.
13213 * config.in: Likewise.
13214 * configure: Likewise.
13215
13216 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13217
13218 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13219 (parse_spufs_run): New function.
13220 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13221 (ppc_breakpoint_at): Handle SPU breakpoints.
13222
13223 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13224
13225 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13226 (SPUFS_MAGIC): Define.
13227 (spu_enumerate_spu_ids): New function.
13228 (linux_qxfer_spu): New function.
13229 (linux_target_ops): Install linux_qxfer_spu.
13230
13231 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13232
13233 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13234 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13235 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13236 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13237 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13238 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13239 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13240 (init_registers_powerpc_cell32l): Add prototype.
13241 (init_registers_powerpc_cell64l): Likewise.
13242 (ppc_arch_setup): Detect Cell/B.E. architecture.
13243
13244 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13245
13246 * Makefile.in (datarootdir): New variable.
13247
13248 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13249
13250 * linux-low.c (linux_write_memory): Update debugging output.
13251 * Makefile.in (clean): Add new descriptions.
13252 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13253 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13254 * configure.srv: Add new files for arm*-*-linux*.
13255 * linux-arm-low.c: Add new declarations.
13256 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13257 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13258 (HWCAP_VFPv3D16): New.
13259 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13260 instead of __IWMMXT__.
13261 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13262 (arm_arch_setup): New.
13263 (target_regsets): Remove #ifdef. Add VFP regset.
13264 (the_low_target): Use arm_arch_setup.
13265
13266 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13269 the main thread again.
13270
13271 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13272
13273 Adding Neutrino gdbserver.
13274 * configure: Regenerated.
13275 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13276 * configure.srv (i[34567]86-*-nto*): New target.
13277 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13278 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13279 (nto_comctrl) [__QNX__]: New function.
13280 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13281
13282 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13283
13284 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13285 srv_tgtobj.
13286
13287 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13288 Pedro Alves <pedro@codesourcery.com>
13289
13290 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13291 don't support CONTEXT_EXTENDED_REGISTERS.
13292 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13293 (the_low_target): Install them.
13294 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13295 failing with ERROR_PIPE_NOT_CONNECTED.
13296
13297 2009-06-30 Doug Evans <dje@google.com>
13298 Pierre Muller <muller@ics.u-strasbg.fr>
13299
13300 Add h/w watchpoint support to x86-linux, win32-i386.
13301 * Makefile.in (SFILES): Add i386-low.c
13302 (i386_low_h): Define.
13303 (i386-low.o): Add dependencies.
13304 (linux-x86-low.o): Add i386-low.h dependency.
13305 (win32-i386-low.o): Ditto.
13306 * i386-low.c: New file.
13307 * i386-low.h: New file.
13308 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13309 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13310 * linux-low.c (linux_add_process): Initialize arch_private.
13311 (linux_remove_process): Free arch_private.
13312 (add_lwp): Initialize arch_private.
13313 (delete_lwp): Free arch_private.
13314 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13315 provided.
13316 * linux-low.h (process_info_private): New member arch_private.
13317 (lwp_info): New member arch_private.
13318 (linux_target_ops): New members new_process, new_thread,
13319 prepare_to_resume.
13320 (ptid_of): New macro.
13321 * linux-x86-low.c: Include stddef.h, i386-low.h.
13322 (arch_process_info): New struct.
13323 (arch_lwp_info): New struct.
13324 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13325 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13326 (i386_dr_low_get_status): New function.
13327 (x86_insert_point, x86_remove_point): New functions.
13328 (x86_stopped_by_watchpoint): New function.
13329 (x86_stopped_data_address): New function.
13330 (x86_linux_new_process, x86_linux_new_thread): New functions.
13331 (x86_linux_prepare_to_resume): New function.
13332 (the_low_target): Add entries for insert_point, remove_point,
13333 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13334 prepare_to_resume.
13335 * server.c (debug_hw_points): New global.
13336 (monitor_show_help): Document set debug-hw-points.
13337 (handle_query): Process "set debug-hw-points".
13338 * server.h (debug_hw_points): Declare.
13339 (paddress): Declare.
13340 * utils.c (NUMCELLS, CELLSIZE): New macros.
13341 (get_sell, xsnprintf, paddress): New functions.
13342 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13343 remove_point, stopped_by_watchpoint, stopped_data_address.
13344 * win32-i386-low.c: Include i386-low.h.
13345 (debug_reg_state): Replaces dr.
13346 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13347 (i386_dr_low_get_status): New function.
13348 (i386_insert_point, i386_remove_point): New functions.
13349 (i386_stopped_by_watchpoint): New function.
13350 (i386_stopped_data_address): New function.
13351 (i386_initial_stuff): Update.
13352 (get_thread_context,set_thread_context,i386_thread_added): Update.
13353 (the_low_target): Add entries for insert_point,
13354 remove_point, stopped_by_watchpoint, stopped_data_address.
13355 * win32-low.c (win32_insert_watchpoint): New function.
13356 (win32_remove_watchpoint): New function.
13357 (win32_stopped_by_watchpoint): New function.
13358 (win32_stopped_data_address): New function.
13359 (win32_target_ops): Add entries for insert_watchpoint,
13360 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13361 * win32-low.h (win32_target_ops): New members insert_point,
13362 remove_point, stopped_by_watchpoint, stopped_data_address.
13363
13364 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13365
13366 * server.c (process_serial_event): Re-return unsupported, not
13367 error, if the type isn't recognized. Re-allow supporting only
13368 insert or remove packets. Also call require_running for
13369 breakpoints. Add missing break statement to default case. Tidy.
13370 * target.h (struct target_ops): Rename insert_watchpoint to
13371 insert_point, and remove_watchpoint to remove_point.
13372
13373 * linux-low.h (struct linux_target_ops): Likewise.
13374 * linux-low.c (linux_insert_watchpoint): Rename to ...
13375 (linux_insert_point): ... this. Adjust.
13376 (linux_remove_watchpoint): Rename to ...
13377 (linux_remove_point): ... this. Adjust.
13378 (linux_target_ops): Adjust.
13379 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13380 (cris_insert_point): ... this.
13381 (cris_remove_watchpoint): Rename to ...
13382 (cris_remove_point): ... this.
13383 (the_low_target): Adjust.
13384
13385 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13386
13387 * server.c (handle_v_kill): Pass signal_pid to
13388 kill_inferior if multi_process is zero.
13389
13390 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13391
13392 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13393 * target.h (target_ops): Comment for *_watchpoint to make it clear
13394 the functions can get types '0' and '1'.
13395
13396 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13397
13398 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13399 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13400 * regcache.c (get_regcache): Likewise.
13401 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13402 * win32-low.c (child_fetch_inferior_registers): Remove check for
13403 regno 0.
13404
13405 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13406 Pedro Alves <pedro@codesourcery.com>
13407
13408 * target.h (struct target_ops) <supports_multi_process>: New
13409 callback.
13410 (target_supports_multi_process): New.
13411 * server.c (handle_query): Even if GDB reports support, only
13412 enable multi-process if the target also supports it. Report
13413 multi-process support only if the target backend supports it.
13414 * linux-low.c (linux_supports_multi_process): New function.
13415 (linux_target_ops): Install it as target_supports_multi_process
13416 callback.
13417
13418 2009-05-24 Doug Evans <dje@google.com>
13419
13420 Global renaming of find_thread_pid to find_thread_ptid.
13421 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13422 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13423 All callers updated.
13424
13425 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13426 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13427 directly.
13428
13429 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13430 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13431 (linux_resume_one_lwp): Ditto.
13432
13433 2009-05-23 Doug Evans <dje@google.com>
13434
13435 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13436 from struct inferior_list_entry * to struct lwp_info *.
13437 All callers updated.
13438
13439 2009-05-13 Doug Evans <dje@google.com>
13440
13441 * linux-x86-low.c: Don't include assert.h.
13442 (x86_siginfo_fixup): Use fatal, not assert.
13443 (x86_arch_setup): Fix comment.
13444
13445 2009-05-12 Doug Evans <dje@google.com>
13446
13447 Biarch support for i386/amd64 gdbserver.
13448 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13449 Add linux-x86-low.c.
13450 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13451 (linux-x86-low.o): Add.
13452 * linux-x86-64-low.c: Delete.
13453 * linux-i386-low.c: Delete.
13454 * linux-x86-low.c: New file.
13455 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13456 linux-x86-low.o.
13457 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13458 linux-x86-low.o.
13459 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13460 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13461 (linux_child_pid_to_exec_file): New function.
13462 (elf_64_header_p, elf_64_file_p): New functions.
13463 (siginfo_fixup): New function.
13464 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13465 give target a chance to convert layout.
13466 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13467 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13468
13469 2009-05-07 Doug Evans <dje@google.com>
13470
13471 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13472 (regsets_store_inferior_registers): Ditto.
13473
13474 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13475
13476 PR server/10048
13477
13478 * linux-low.c (must_set_ptrace_flags): Delete.
13479 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13480 of the global.
13481 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13482 `lwp->must_set_ptrace_flags' instead.
13483 (linux_wait_for_event_1): Set ptrace options here.
13484 (linux_wait_1): ... not here.
13485
13486 2009-04-30 Doug Evans <dje@google.com>
13487
13488 * inferiors.c (started_inferior_callback): New function.
13489 (attached_inferior_callback): New function.
13490 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13491 * server.c (print_started_pid, print_attached_pid): New functions.
13492 (detach_or_kill_for_exit): New function.
13493 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13494 * server.h (have_started_inferiors_p): Declare.
13495 (have_attached_inferiors_p): Declare.
13496
13497 * inferiors.c (remove_process): Fix memory leak, free process.
13498 * linux-low.c (linux_remove_process): New function.
13499 (linux_kill): Call it instead of remove_process.
13500 (linux_detach, linux_wait_1): Ditto.
13501
13502 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13503
13504 * configure.srv: Add x86 Windows CE target.
13505
13506 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13507
13508 * inferiors.c (get_thread_process): Make global.
13509 * server.h (get_thread_process): Add prototype.
13510 * thread-db.c (find_one_thread): Use get_thread_process
13511 instead of current_process.
13512 (thread_db_get_tls_address): Do not crash if called when
13513 thread layer is not yet initialized.
13514
13515 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13516
13517 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13518 * spu-low.c (current_tid): Rename to ...
13519 (current_ptid): ... this.
13520 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13521 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13522 ptid_get_lwp (current_ptid) instead of current_tid.
13523 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13524 instead of current_tid. Use find_process_pid to verify pid
13525 argument is valid. Pass proper argument to remove_process.
13526 (spu_thread_alive): Compare current_ptid instead of current_tid.
13527 (spu_resume): Likewise.
13528
13529 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13530
13531 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13532 variable.
13533
13534 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13535
13536 Implement the multiprocess extensions, and add linux multiprocess
13537 support.
13538
13539 * server.h (ULONGEST): Declare.
13540 (struct ptid, ptid_t): New.
13541 (minus_one_ptid, null_ptid): Declare.
13542 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13543 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13544 (struct inferior_list_entry): Change `id' type from unsigned from
13545 to ptid_t.
13546 (struct sym_cache, struct breakpoint, struct
13547 process_info_private): Forward declare.
13548 (struct process_info): Declare.
13549 (current_process): Declare.
13550 (all_processes): Declare.
13551 (initialize_inferiors): Declare.
13552 (add_thread): Adjust to use ptid_t.
13553 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13554 (add_process, remove_process, find_thread_pid): Declare.
13555 (find_inferior_id): Adjust to use ptid_t.
13556 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13557 (multi_process): Declare.
13558 (push_event): Adjust to use ptid_t.
13559 (read_ptid, write_ptid): Declare.
13560 (prepare_resume_reply): Adjust to use ptid_t.
13561 (clear_symbol_cache): Declare.
13562 * inferiors.c (all_processes): New.
13563 (null_ptid, minus_one_ptid): New.
13564 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13565 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13566 (add_thread): Change unsigned long to ptid. Remove gdb_id
13567 parameter. Adjust.
13568 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13569 (gdb_id_to_thread): Rename to ...
13570 (find_thread_pid): ... this. Change unsigned long to ptid.
13571 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13572 (loaded_dll, pull_pid_from_list): Adjust.
13573 (add_process, remove_process, find_process_pid)
13574 (get_thread_process, current_process, initialize_inferiors): New.
13575 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13576 (struct target_waitstatus) <related_pid>: Ditto.
13577 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13578 return type to int.
13579 (struct target_ops) <join>: Add `pid' argument.
13580 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13581 (struct target_ops) <wait>: Add `ptid' field. Change return type
13582 to ptid.
13583 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13584 (mywait): Add `ptid' argument. Change return type to ptid_t.
13585 (target_pid_to_str): Declare.
13586 * target.c (set_desired_inferior): Adjust to use ptids.
13587 (mywait): Add new `ptid' argument. Adjust.
13588 (target_pid_to_str): New.
13589 * mem-break.h (free_all_breakpoints): Declare.
13590 * mem-break.c (breakpoints): Delelete.
13591 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13592 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13593 to use per-process breakpoint list.
13594 (free_all_breakpoints): New.
13595 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13596 (symbol_cache, all_symbols_looked_up): Delete.
13597 (hexchars): New.
13598 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13599 read_ptid): New.
13600 (prepare_resume_reply): Change ptid argument's type from unsigned
13601 long to ptid_t. Adjust. Implement W;process and X;process.
13602 (free_sym_cache, clear_symbol_cache): New.
13603 (look_up_one_symbol): Adjust to per-process symbol cache. *
13604 * server.c (cont_thread, general_thread, step_thread): Change type
13605 to ptid_t.
13606 (attached): Delete.
13607 (multi_process): New.
13608 (last_ptid): Change type to ptid_t.
13609 (struct vstop_notif) <ptid>: Change type to ptid_t.
13610 (queue_stop_reply, push_event): Change `ptid' argument's type to
13611 ptid_t.
13612 (discard_queued_stop_replies): Add `pid' argument.
13613 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13614 changes. Don't reference the `attached' global.
13615 (attach_inferior): Adjust to mywait interface changes.
13616 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13617 features. Handle and report "multiprocess+". Handle
13618 "qAttached:PID".
13619 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13620 changes.
13621 (handle_v_kill): New.
13622 (handle_v_stopped): Adjust to use target_pid_to_str.
13623 (handle_v_requests): Allow multiple attaches and runs when
13624 multiprocess extensions are in effect. Handle "vKill".
13625 (myresume): Adjust to use ptids.
13626 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13627 (handle_status): Adjust to discard_queued_stop_replies interface
13628 change.
13629 (first_thread_of, kill_inferior_callback)
13630 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13631 (main): Call initialize_inferiors. Adjust to use ptids, killing
13632 and detaching from all inferiors. Handle multiprocess packet
13633 variants.
13634 * linux-low.h: Include gdb_proc_service.h.
13635 (struct process_info_private): New.
13636 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13637 <lwpid_of>: Use ptid_get_lwp.
13638 (get_lwp_thread): Adjust.
13639 (struct lwp_info): Add `dead' member.
13640 (find_lwp_pid): Declare.
13641 * linux-low.c (thread_db_active): Delete.
13642 (new_inferior): Adjust comment.
13643 (inferior_pid): Delete.
13644 (linux_add_process): New.
13645 (handle_extended_wait): Adjust.
13646 (add_lwp): Change unsigned long to ptid.
13647 (linux_create_inferior): Add process to processes table. Adjust
13648 to use ptids. Don't set new_inferior here.
13649 (linux_attach_lwp): Rename to ...
13650 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13651 it. Adjust to use ptids.
13652 (linux_attach_lwp): New.
13653 (linux_attach): Add process to processes table. Don't set
13654 new_inferior here.
13655 (struct counter): New.
13656 (second_thread_of_pid_p, last_thread_of_process_p): New.
13657 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13658 multiple processes.
13659 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13660 processes. Remove process from process table.
13661 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13662 to multiple processes.
13663 (any_thread_of): New.
13664 (linux_detach): Add `pid' argument, and handle it. Remove process
13665 from processes table.
13666 (linux_join): Add `pid' argument. Handle it.
13667 (linux_thread_alive): Change unsighed long argument to ptid_t.
13668 Consider dead lwps as not being alive.
13669 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13670 threads we're not interested in.
13671 (same_lwp, find_lwp_pid): New.
13672 (linux_wait_for_lwp): Change `pid' argument's type from int to
13673 ptid_t. Adjust.
13674 (linux_wait_for_event): Rename to ...
13675 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13676 from int to ptid_t. Adjust.
13677 (linux_wait_for_event): New.
13678 (linux_wait_1): Add `ptid' argument. Change return type to
13679 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13680 that exit from the process table.
13681 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13682 Adjust.
13683 (mark_lwp_dead): New.
13684 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13685 stopping all threads, mark its main lwp as dead.
13686 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13687 ptids.
13688 (fetch_register, usr_store_inferior_registers)
13689 (regsets_fetch_inferior_registers)
13690 (regsets_store_inferior_registers, linux_read_memory)
13691 (linux_write_memory): Inline `inferior_pid'.
13692 (linux_look_up_symbols): Adjust to use per-process
13693 `thread_db_active'.
13694 (linux_request_interrupt): Adjust to use ptids.
13695 (linux_read_auxv): Inline `inferior_pid'.
13696 (initialize_low): Don't reference thread_db_active.
13697 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13698 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13699 (ps_getpid): Return the pid of the current inferior.
13700 * thread-db.c (proc_handle, thread_agent): Delete.
13701 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13702 per-process data.
13703 (find_one_thread): Change argument type to ptid_t. Adjust to
13704 per-process data.
13705 (maybe_attach_thread): Adjust to per-process data and ptids.
13706 (thread_db_find_new_threads): Ditto.
13707 (thread_db_init): Ditto.
13708 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13709 processes table. Adjust to use ptids.
13710 (spu_kill, spu_detach): Adjust interface. Remove process from
13711 processes table.
13712 (spu_join, spu_thread_alive): Adjust interface.
13713 (spu_wait): Adjust interface. Remove process from processes
13714 table. Adjust to use ptids.
13715 * win32-low.c (current_inferior_tid): Delete.
13716 (current_inferior_ptid): New.
13717 (debug_event_ptid): New.
13718 (thread_rec): Take a ptid. Adjust.
13719 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13720 (child_delete_thread): Ditto.
13721 (do_initial_child_stuff): Add `attached' argument. Add process to
13722 processes table.
13723 (child_fetch_inferior_registers, child_store_inferior_registers):
13724 Adjust.
13725 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13726 (win32_attach): Pass 1 to do_initial_child_stuff.
13727 (win32_kill): Adjust interface. Remove process from processes
13728 table.
13729 (win32_detach): Ditto.
13730 (win32_join): Adjust interface.
13731 (win32_thread_alive): Take a ptid.
13732 (win32_resume): Adjust to use ptids.
13733 (get_child_debug_event): Ditto.
13734 (win32_wait): Adjust interface. Remove exiting process from
13735 processes table.
13736
13737 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13738
13739 Non-stop mode support.
13740
13741 * server.h (non_stop): Declare.
13742 (gdb_client_data, handler_func): Declare.
13743 (delete_file_handler, add_file_handler, start_event_loop):
13744 Declare.
13745 (handle_serial_event, handle_target_event, push_event)
13746 (putpkt_notif): Declare.
13747 * target.h (enum resume_kind): New.
13748 (struct thread_resume): Replace `step' field by `kind' field.
13749 (TARGET_WNOHANG): Define.
13750 (struct target_ops) <wait>: Add `options' argument.
13751 <supports_non_stop, async, start_non_stop>: New fields.
13752 (target_supports_non_stop, target_async): New.
13753 (start_non_stop): Declare.
13754 (mywait): Add `options' argument.
13755 * target.c (mywait): Add `options' argument. Print child exit
13756 notifications here.
13757 (start_non_stop): New.
13758 * server.c (non_stop, own_buf, mem_buf): New globals.
13759 (struct vstop_notif): New.
13760 (notif_queue): New global.
13761 (queue_stop_reply, push_event, discard_queued_stop_replies)
13762 (send_next_stop_reply): New.
13763 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13764 interface changes.
13765 (attach_inferior): In non-stop mode, don't wait for the target
13766 here.
13767 (handle_general_set): Handle QNonStop.
13768 (handle_query): When handling qC, return the current general
13769 thread, instead of the first thread of the list.
13770 (handle_query): If the backend supports non-stop mode, include
13771 QNonStop+ in the qSupported query response.
13772 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13773 and non-stop mode.
13774 (handle_v_attach, handle_v_run): Handle non-stop mode.
13775 (handle_v_stopped): New.
13776 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13777 (myresume): Adjust to use resume_kind. Handle non-stop.
13778 (queue_stop_reply_callback): New.
13779 (handle_status): Handle non-stop mode.
13780 (main): Clear non_stop flag on reconnection. Use the event-loop.
13781 Refactor serial protocol handling from here ...
13782 (process_serial_event): ... to this new function. When GDB
13783 selects any thread, select one here. In non-stop mode, wait until
13784 GDB acks all pending events before exiting.
13785 (handle_serial_event, handle_target_event): New.
13786 * remote-utils.c (remote_open): Install remote_desc in the event
13787 loop.
13788 (remote_close): Remove remote_desc from the event loop.
13789 (putpkt_binary): Rename to...
13790 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13791 (putpkt_binary): New as wrapper around putpkt_binary_1.
13792 (putpkt_notif): New.
13793 (prepare_resume_reply): In non-stop mode, don't change the
13794 general_thread.
13795 * event-loop.c: New.
13796 * Makefile.in (OBJ): Add event-loop.o.
13797 (event-loop.o): New rule.
13798
13799 * linux-low.h (pid_of): Moved here.
13800 (lwpid_of): New.
13801 (get_lwp_thread): Use lwpid_of.
13802 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13803 * linux-low.c (pid_of): Delete.
13804 (inferior_pid): Use lwpid_of.
13805 (linux_event_pipe): New.
13806 (target_is_async_p): New.
13807 (delete_lwp): New.
13808 (handle_extended_wait): Use lwpid_of.
13809 (add_lwp): Don't set lwpid field.
13810 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13811 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13812 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13813 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13814 first. Adjust to linux_wait_for_event interface changes. Use
13815 lwpid_of.
13816 (linux_detach): Don't delete the main lwp here.
13817 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13818 (status_pending_p): Don't consider explicitly suspended lwps.
13819 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13820 pointer. Add OPTIONS argument. Change return type to int. Use
13821 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13822 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13823 pointer. Add status pointer argument. Return a pid instead of a
13824 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13825 changes. In non-stop mode, don't switch to a random thread.
13826 (linux_wait): Rename to...
13827 (linux_wait_1): ... this. Add target_options argument, and handle
13828 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13829 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13830 clean exit and signal exit code. Don't stop all threads in
13831 non-stop mode. In all-stop mode, only stop all threads when
13832 reporting a stop to GDB. Handle explicit thread stop requests.
13833 (async_file_flush, async_file_mark): New.
13834 (linux_wait): New.
13835 (send_sigstop): Use lwpid_of.
13836 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13837 interface changes. In non-stop mode, don't switch to a random
13838 thread.
13839 (linux_resume_one_lwp): Use lwpid_of.
13840 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13841 (linux_resume_one_thread): ... this. Handle resume_stop. In
13842 non-stop mode, don't look for pending flag in all threads.
13843 (resume_status_pending_p): Don't consider explicitly suspended
13844 threads.
13845 (my_waitpid): Reimplement. Emulate __WALL.
13846 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13847 Use lwpid_of.
13848 (sigchld_handler, linux_supports_non_stop, linux_async)
13849 (linux_start_non_stop): New.
13850 (linux_target_ops): Register linux_supports_non_stop, linux_async
13851 and linux_start_non_stop.
13852 (initialize_low): Install SIGCHLD handler.
13853 * thread-db.c (thread_db_create_event, find_one_thread)
13854 (thread_db_get_tls_address): Use lwpid_of.
13855 * win32-low.c (win32_detach): Adjust to use resume_kind.
13856 (win32_wait): Add `options' argument.
13857 * spu-low.c (spu_resume): Adjust to use resume_kind.
13858 (spu_wait): Add `options' argument.
13859
13860 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13861
13862 Decouple target code from remote protocol.
13863
13864 * target.h (enum target_waitkind): New.
13865 (struct target_waitstatus): New.
13866 (struct target_ops) <wait>: Return an unsigned long. Take a
13867 target_waitstatus pointer instead of a char pointer.
13868 (mywait): Likewise.
13869 * target.c (mywait): Change prototype to return an unsigned long.
13870 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13871 * server.h (thread_from_wait, old_thread_from_wait): Delete
13872 declarations.
13873 (prepare_resume_reply): Change prototype to take a
13874 target_waitstatus.
13875 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13876 (last_status, last_ptid): New.
13877 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13878 pid instead of a signal.
13879 (attach_inferior): Remove "status" and "signal" parameters.
13880 Adjust.
13881 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13882 not as an address.
13883 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13884 (handle_v_requests, myresume): Remove "status" and "signal"
13885 parameters. Adjust.
13886 (handle_status): New.
13887 (main): Delete local `status'. Adjust.
13888 * remote-utils.c: Include target.h.
13889 (prepare_resume_reply): Change prototype to take a
13890 target_waitstatus. Adjust.
13891
13892 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13893 interface.
13894 * spu-low.c (spu_wait): Adjust.
13895 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13896 Delete.
13897 (win32_wait): Adjust.
13898
13899 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13900
13901 * target.h (struct thread_resume): Delete leave_stopped member.
13902 (struct target_ops): Add a `n' argument to the `resume' callback.
13903 * server.c (start_inferior): Adjust.
13904 (handle_v_cont, myresume): Adjust.
13905 * linux-low.c (check_removed_breakpoint): Adjust to resume
13906 interface change, and to removed leave_stopped field.
13907 (resume_ptr): Delete.
13908 (struct thread_resume_array): New.
13909 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13910 resume interface change.
13911 (linux_continue_one_thread, linux_queue_one_thread)
13912 (resume_status_pending_p): Check if the resume field is NULL
13913 instead of checking the leave_stopped member.
13914 (linux_resume): Adjust to the target resume interface change.
13915 * spu-low.c (spu_resume): Adjust to the target resume interface
13916 change.
13917 * win32-low.c (win32_detach, win32_resume): Ditto.
13918
13919 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13920
13921 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13922 flag.
13923 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13924 pending.
13925 (linux_continue_one_thread): Only preserve the stepping flag if
13926 there's a pending breakpoint.
13927
13928 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13929
13930 * server.c (main): After the inferior having exited, call
13931 remote_close before exiting gdbserver.
13932
13933 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13934
13935 Fix size of FPSCR in Power 7 processors.
13936 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13937 (PPC_FEATURE_HAS_DFP): New #define.
13938 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13939 size of the FPSCR.
13940
13941 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13942
13943 * server.c (handle_query) Whitespace and formatting.
13944
13945 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13946
13947 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13948 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13949 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13950 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13951 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13952 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13953 Makefile.in, configure.ac: Fix whitespace throughout.
13954 * configure: Regenerate.
13955
13956 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13957
13958 * inferiors.c (find_inferior): Make it safe for the callback
13959 function to delete the currently iterated inferior.
13960
13961 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13962
13963 * Makefile.in (linuw_low_h): Move higher.
13964 (thread-db.o): Depend on $(linux_low_h).
13965
13966 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13967
13968 Rename "process" to "lwp" throughout.
13969
13970 * linux-low.c (all_processes): Rename to...
13971 (all_lwps): ... this.
13972 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13973 (add_process): Rename to ...
13974 (add_lwp): ... this. Adjust.
13975 (linux_create_inferior): Adjust.
13976 (linux_attach_lwp): Adjust.
13977 (linux_attach): Adjust.
13978 (linux_kill_one_process): Rename to ...
13979 (linux_kill_one_lwp): ... this. Adjust.
13980 (linux_kill): Adjust.
13981 (linux_detach_one_process): Rename to ...
13982 (linux_detach_one_lwp): ... this. Adjust.
13983 (linux_detach): Adjust.
13984 (check_removed_breakpoint): Adjust.
13985 (status_pending_p): Adjust.
13986 (linux_wait_for_process): Rename to ...
13987 (linux_wait_for_lwp): ... this. Adjust.
13988 (linux_wait_for_event): Adjust.
13989 (send_sigstop): Adjust.
13990 (wait_for_sigstop): Adjust.
13991 (stop_all_processes): Rename to ...
13992 (stop_all_lwps): ... this.
13993 (linux_resume_one_process): Rename to ...
13994 (linux_resume_one_lwp): ... this. Adjust.
13995 (linux_set_resume_request, linux_continue_one_thread)
13996 (linux_queue_one_thread, resume_status_pending_p)
13997 (usr_store_inferior_registers, regsets_store_inferior_registers)
13998 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13999 Adjust.
14000 * linux-low.h (get_process): Rename to ...
14001 (get_lwp): ... this. Adjust.
14002 (get_thread_process): Rename to ...
14003 (get_thread_lwp): ... this. Adjust.
14004 (get_process_thread): Rename to ...
14005 (get_lwp_thread): ... this. Adjust.
14006 (struct process_info): Rename to ...
14007 (struct lwp_info): ... this.
14008 (all_processes): Rename to ...
14009 (all_lwps): ... this.
14010 * proc-service.c (ps_lgetregs): Adjust.
14011 * thread-db.c (thread_db_create_event, find_one_thread)
14012 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14013
14014 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14015
14016 * server.c (handle_query): Handle "qAttached".
14017
14018 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14019
14020 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14021 GPLv3, update license URL.
14022
14023 2009-03-01 Doug Evans <dje@google.com>
14024
14025 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14026 (server_h): Add gdb_signals.h.
14027 (signals.o): Update.
14028 * server.h (target_signal_from_host,target_signal_to_host_p)
14029 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14030
14031 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14032
14033 * remote-utils.c (getpkt): Also generate remote-debug
14034 information if noack_mode is set.
14035
14036 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14037
14038 * server.c (handle_query): Report qXfer:siginfo:read and
14039 qXfer:siginfo:write as supported and handle them.
14040 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14041 * linux-low.c (linux_xfer_siginfo): New.
14042 (linux_target_ops): Set it.
14043
14044 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14045
14046 * server.c (gdbserver_usage): Mention --remote-debug.
14047 (main): Accept '--remote-debug' switch.
14048
14049 2009-01-18 Doug Evans <dje@google.com>
14050
14051 * regcache.c (new_register_cache): No need to check result of xcalloc.
14052 * server.c (handle_search_memory): Back out calls to xmalloc,
14053 result is checked and error is returned to user upon failure.
14054 (handle_query): Ditto. Add more checks for result of malloc.
14055 (handle_v_cont): Check result of malloc, report error back to
14056 user upon failure.
14057 (handle_v_run): Ditto. Call freeargv.
14058 * server.h (freeargv): Declare.
14059 * utils.c (freeargv): New fn.
14060
14061 2009-01-15 Doug Evans <dje@google.com>
14062
14063 * gdbreplay.c (perror_with_name): Make arg const char *.
14064 * server.h (target_signal_to_name): Make return type const char *.
14065 * thread-db.c (thread_db_err_str): Make return type const char *.
14066 * utils.c (perror_with_name): Make arg const char *.
14067
14068 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14069
14070 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14071 when handling a EXIT_PROCESS_DEBUG_EVENT.
14072
14073 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14074
14075 * gdbreplay.c (gdbreplay_version): Update copyright year.
14076 * server.c (gdbserver_version): Likewise.
14077
14078 2009-01-05 Doug Evans <dje@google.com>
14079
14080 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14081 (handle_extended_wait): Improve comment.
14082
14083 2008-12-13 Doug Evans <dje@google.com>
14084
14085 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14086 * server.h (ATTR_MALLOC): New macro.
14087 (xmalloc,xcalloc,xstrdup): Declare.
14088 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14089 * inferiors.c: Ditto.
14090 * linux-low.c: Ditto.
14091 * mem-break.c: Ditto.
14092 * regcache.c: Ditto.
14093 * remote-utils.c: Ditto.
14094 * server.c: Ditto.
14095 * target.c: Ditto.
14096 * win32-low.c: Ditto.
14097
14098 2008-12-12 Doug Evans <dje@google.com>
14099
14100 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14101 in debugging printf.
14102
14103 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14104
14105 2008-12-09 Doug Evans <dje@google.com>
14106
14107 * linux-low.h (struct process_info): Delete member tid, unused.
14108 * thread-db.c (find_one_thread): Update.
14109 (maybe_attach_thread): Update.
14110
14111 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14112
14113 * target.h (struct target_ops): Add qxfer_osdata member.
14114 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14115 and dirent.h.
14116 (linux_qxfer_osdata): New functions.
14117 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14118 callback.
14119 * server.c (handle_query): Handle "qXfer:osdata:read:".
14120 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14121 (buffer_xml_printf): New functions.
14122 * server.h (struct buffer): New.
14123 (buffer_grow_str, buffer_grow_str0): New macros.
14124 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14125 (buffer_xml_printf): Declare.
14126
14127 2008-11-24 Doug Evans <dje@google.com>
14128
14129 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14130
14131 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * server.c (handle_v_run): Always use the supplied argument list.
14134
14135 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14136
14137 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14138 (xtensa_regmap_table): Add entry for scompare1.
14139
14140 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14141
14142 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14143 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14144 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14145 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14146 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14147 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14148 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14149 XML target descriptions.
14150 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14151 when inferior is running on an ISA 2.05 or later processor. Add
14152 special case to return offset for full 64-bit slot of FPSCR when
14153 in 32-bits.
14154
14155 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14156
14157 * Makefile.in (SFILES, clean): Added sparc64 files.
14158 (reg-sparc64.o, reg-sparc64.c): New.
14159 * configure.srv (sparc*-*-linux*): New configuration.
14160 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14161 syscall arguments for SPARC.
14162 (regsets_store_inferior_registers): Likewise.
14163 * linux-sparc-low.c: New file.
14164
14165 2008-10-21 Doug Evans <dje@google.com>
14166
14167 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14168 (READLINE_DIR,READLINE_DEP): Delete.
14169 (INTERNAL_CFLAGS): Update.
14170 (LINTFLAGS): Update.
14171
14172 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14173
14174 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14175 whole argv from the last run, not just argv[0].
14176
14177 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14178
14179 * regcache.c (new_register_cache): Return NULL if the register
14180 cache size isn't known yet.
14181 (free_register_cache): Avoid dereferencing a NULL regcache.
14182
14183 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * configure.srv: Merge MIPS and MIPS64.
14186
14187 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14188
14189 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14190
14191 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14192
14193 * Makefile.in: Add required vsx dependencies.
14194
14195 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14196 Declare init_registers_powerpc_vsx32l.
14197 Declare init_registers_powerpc_vsx64l.
14198 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14199 (ppc_arch_setup): Check for VSX in hwcap.
14200 (ppc_fill_vsxregset): New function.
14201 (ppc_store_vsxregset): New function.
14202 Add new VSX entry in regset_info target_regsets.
14203
14204 * configure.srv: Add new VSX dependencies.
14205
14206 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14207
14208 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14209 (remote_open): Set or clear transport_is_reliable.
14210 (putpkt_binary): Don't expect acks in noack mode.
14211 (getpkt): Don't send ack/nac in noack mode.
14212 * server.c (handle_general_set): Handle QStartNoAckMode.
14213 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14214 qSupported.
14215 (main): Reset noack_mode on every connection.
14216 * server.h (noack_mode): Declare.
14217
14218 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14219
14220 * Makefile.in (GDBREPLAY_OBS): New variable.
14221 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14222
14223 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14224 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14227 (usr_store_inferior_registers): Likewise.
14228 (regsets_store_inferior_registers): Likewise.
14229
14230 2008-07-31 Rolf Jansen <rj@surtec.com>
14231 Pedro Alves <pedro@codesourcery.com>
14232
14233 * configure.ac: Check for memmem declaration.
14234 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14235 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14236 (disable_packet_qfThreadInfo): Unconditionally compile.
14237 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14238 * configure, config.in: Regenerate.
14239
14240 2008-07-28 Doug Kwan <dougkwan@google.com>
14241
14242 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14243 (linux_write_memory): Remove declaration of errno.
14244
14245 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14246
14247 * linux-low.c (handle_extended_wait): Do not use "status"
14248 variable uninitialized.
14249
14250 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14251
14252 * server.c (handle_v_attach): Inhibit reporting dll changes.
14253
14254 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14255
14256 * remote-utils.c (prepare_resume_reply): If requested, don't
14257 output "thread:TID" in the T stop reply.
14258
14259 * server.c (disable_packet_vCont, disable_packet_Tthread)
14260 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14261 (handle_query): If requested, disable support for qC, qfThreadInfo
14262 and qsThreadInfo.
14263 (handle_v_requests): If requested, disable support for vCont.
14264 (gdbserver_show_disableable): New.
14265 (main): Handle --disable-packet and --disable-packet=LIST.
14266
14267 * server.h (disable_packet_vCont, disable_packet_Tthread)
14268 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14269
14270 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14271
14272 * server.c (gdbserver_usage): Mention --version.
14273
14274 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14275
14276 * Makefile.in (gdbreplay.o): New rule.
14277
14278 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14279
14280 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14281 message, not gdbserver.
14282
14283 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14284 Nathan Sidwell <nathan@codesourcery.com>
14285 Joseph Myers <joseph@codesourcery.com>
14286
14287 * acinclude.m4: Include ../../config/acx.m4.
14288 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14289 * configure, config.in: Regenerate.
14290 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14291 * server.c (gdbserver_version): Print PKGVERSION.
14292 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14293 (main): Adjust gdbserver_usage calls.
14294 * gdbreplay.c (version, host_name): Add declarations.
14295 (gdbreplay_version, gdbreplay_usage): New.
14296 (main): Accept --version and --help options.
14297
14298 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14299
14300 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14301 (arm_breakpoint_at): Handle Thumb.
14302 (the_low_target): Add comment.
14303
14304 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14305
14306 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14307
14308 2008-05-09 Doug Evans <dje@google.com>
14309
14310 * server.h (decode_search_memory_packet): Declare.
14311 * remote-utils.c (decode_search_memory_packet): New fn.
14312 * server.c (handle_search_memory_1): New fn.
14313 (handle_search_memory): New fn.
14314 (handle_query): Process qSearch:memory packets.
14315
14316 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14317
14318 * regcache.c (registers_length): Remove.
14319 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14320 full register packet.
14321 * regcache.h (registers_length): Remove prototype.
14322 * server.h (PBUFSIZ): Define to 16384.
14323
14324 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14325
14326 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14327 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14328 powerpc-64l.o, and powerpc-altivec64l.o.
14329 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14330 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14331 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14332 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14333 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14334 to srv_xmlfiles.
14335
14336 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14337 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14338 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14339 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14340 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14341 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14342 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14343 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14344 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14345 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14346 (clean): Update.
14347
14348 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14349 (init_registers_powerpc_32l): ... this new prototype.
14350 (init_registers_powerpc_32): Remove, replace by ...
14351 (init_registers_powerpc_altivec32l): ... this new prototype.
14352 (init_registers_powerpc_e500): Remove, replace by ...
14353 (init_registers_powerpc_e500l): ... this new prototype.
14354 (init_registers_ppc64): Remove, replace by ...
14355 (init_registers_powerpc_64l): ... this new prototype.
14356 (init_registers_powerpc_64): Remove, replace by ...
14357 (init_registers_powerpc_altivec64l): ... this new prototype.
14358 (ppc_num_regs): Set to 73.
14359 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14360 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14361 (ppc_cannot_store_register): Handle orig_r3 and trap.
14362 (ppc_arch_setup): Update init_registers_... calls.
14363 (ppc_fill_gregset): Handle orig_r3 and trap.
14364
14365 * inferiors.c (clear_inferiors): Reset current_inferior.
14366
14367 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14368
14369 * acinclude.m4: Add override.m4.
14370 * configure: Regenerate.
14371
14372 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14373
14374 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14375 initial call to init_register_ppc64.
14376
14377 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14378
14379 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14380 single powerpc*-*-linux* case.
14381 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14382
14383 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14384
14385 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14386 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14387 from reg_xmlfiles.
14388 * linux-ppc-low.c: Include <elf.h>.
14389 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14390 (ppc_hwcap): New global variable.
14391 (ppc_regmap): Remove __SPE__ #ifdef sections.
14392 (ppc_regmap_e500): New global variable.
14393 (ppc_cannot_store_register): Update __SPE__ special case.
14394 (ppc_get_hwcap): New function.
14395 (ppc_arch_setup): Use it to determine whether inferior supports
14396 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14397 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14398 Do not access registers if target does not support AltiVec.
14399 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14400 Do not access registers if target does not support SPE.
14401 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14402
14403 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * linux-low.c (disabled_regsets, num_regsets): New.
14406 (use_regsets_p): Delete.
14407 (linux_wait_for_process): Clear disabled_regsets.
14408 (regsets_fetch_inferior_registers): Check and set it.
14409 (regsets_store_inferior_registers): Likewise.
14410 (linux_fetch_registers, linux_store_registers): Do not use
14411 use_regsets_p.
14412 (initialize_low): Allocate disabled_regsets.
14413
14414 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14415
14416 * Makefile.in (LIBOBJS): New.
14417 (OBS): Use LIBOBJS.
14418 (memmem.o): New rule.
14419 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14420 * configure: Regenerated.
14421
14422 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14423
14424 * server.c (handle_query): Never return "unsupported" for
14425 qXfer:features:read queries.
14426
14427 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14428
14429 * server.c (get_features_xml): Fix inverted condition.
14430 (handle_query): Always support qXfer:feature:read.
14431
14432 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * server.c (wrapper_argv): New.
14435 (start_inferior): Handle wrapper_argv. If set, expect an extra
14436 trap.
14437 (gdbserver_usage): Document --wrapper.
14438 (main): Parse --wrapper.
14439
14440 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14441
14442 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14443 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14444 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14445 (ppc_set_pc): Likewise.
14446 (ppc_arch_setup): New function.
14447 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14448 of collect_register.
14449 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14450
14451 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14452
14453 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14454 instead of linux-ppc64-low.o.
14455 * linux-ppc64-low.c: Remove file.
14456 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14457 (linux-ppc64-low.o): Remove rule.
14458
14459 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14460 (init_registers_powerpc_64): Likewise.
14461 (ppc_regmap): Conditionally define depending on __powerpc64__.
14462 (ppc_cannot_store_register): Do not special-case "fpscr" when
14463 compiled on __powerpc64__.
14464 (ppc_collect_ptrace_register): New function.
14465 (ppc_supply_ptrace_register): New function.
14466 (ppc_breakpoint): Change type to "unsigned int".
14467 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14468 (the_low_target): Conditionally provide initializers for the
14469 arch_setup member depending on __powerpc64__. Install
14470 collect_ptrace_register and supply_ptrace_register members.
14471
14472 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14473
14474 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14475 * server.c (gdbserver_xmltarget): Define.
14476 (get_features_xml): Use it to replace "target.xml" and arch_string.
14477
14478 * configure.srv: Remove srv_xmltarget. Add XML files that were
14479 mentioned there to srv_xmlfiles instead. Remove conditional tests
14480 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14481 srv_xmlfiles and srv_regobj to include all possible choices.
14482 * configure.ac (srv_xmltarget): Remove.
14483 (srv_xmlfiles): Do not add "target.xml".
14484 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14485 checks for supplementary target information.
14486 * configure: Regenerate.
14487 * Makefile.in (XML_TARGET): Remove.
14488 (target.xml): Remove rule.
14489 (clean): Do not clean up target.xml.
14490 (.PRECIOUS): Do not mention target.xml.
14491
14492 * target.h (struct target_ops): Remove arch_string member.
14493 * linux-low.c (linux_arch_string): Remove.
14494 (linux_target_ops): Remove arch_string initializer.
14495 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14496 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14497 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14498 * spu-low.c (spu_arch_string): Remove.
14499 (spu_target_ops): Remove arch_string initializer.
14500 * win32-low.c (win32_arch_string): Remove.
14501 (win32_target_ops): Remove arch_string initializer.
14502 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14503 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14504 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14505
14506 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14507
14508 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14509 by collect_ptrace_register and supply_ptrace_register hooks.
14510 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14511 instead of checking for the_low_target.left_pad_xfer.
14512 (usr_store_inferior_registers): Use collect_ptrace_register callback
14513 instead of checking for the_low_target.left_pad_xfer.
14514
14515 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14516 (s390_supply_ptrace_register): Likewise.
14517 (s390_fill_gregset): Call s390_collect_ptrace_register.
14518 (the_low_target): Update.
14519
14520 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14521 (ppc_supply_ptrace_register): Likewise.
14522 (the_low_target): Update.
14523
14524 * linux-i386-low.c (the_low_target): Update.
14525 * linux-x86-64-low.c (the_low_target): Update.
14526
14527 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14528
14529 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14530 reg-s390.o and reg-s390x.o.
14531
14532 * linux-low.c (new_inferior): New global variable.
14533 (linux_create_inferior, linux_attach): Set it.
14534 (linux_wait_for_process): Call the_low_target.arch_setup after the
14535 target has stopped for the first time.
14536 (initialize_low): Do not call the_low_target.arch_setup.
14537
14538 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14539 (s390_set_pc): Likewise.
14540 (s390_arch_setup): New function.
14541 (the_low_target): Use s390_arch_setup as arch_setup routine.
14542
14543 * regcache.c (realloc_register_cache): New function.
14544 (set_register_cache): Call it for each existing regcache.
14545
14546 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14547
14548 * server.h (init_registers): Remove prototype.
14549
14550 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14551 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14552 instead of init_registers ().
14553 * linux-arm-low.c (init_registers_arm): Add prototype.
14554 (init_registers_arm_with_iwmmxt): Likewise.
14555 (the_low_target): Add initializer for arch_setup field.
14556 * linux-cris-low.c (init_registers_cris): Add prototype.
14557 (the_low_target): Add initializer for arch_setup field.
14558 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14559 (the_low_target): Add initializer for arch_setup field.
14560 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14561 (the_low_target): Add initializer for arch_setup field.
14562 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14563 (the_low_target): Add initializer for arch_setup field.
14564 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14565 (the_low_target): Add initializer for arch_setup field.
14566 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14567 (the_low_target): Add initializer for arch_setup field.
14568 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14569 (init_registers_mips64_linux): Likewise.
14570 (the_low_target): Add initializer for arch_setup field.
14571 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14572 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14573 (the_low_target): Add initializer for arch_setup field.
14574 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14575 (init_registers_powerpc_64): Likewise.
14576 (the_low_target): Add initializer for arch_setup field.
14577 * linux-s390-low.c (init_registers_s390): Add prototype.
14578 (init_registers_s390x): Likewise.
14579 (the_low_target): Add initializer for arch_setup field.
14580 * linux-sh-low.c (init_registers_sh): Add prototype.
14581 (the_low_target): Add initializer for arch_setup field.
14582 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14583 (the_low_target): Add initializer for arch_setup field.
14584 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14585 (the_low_target): Add initializer for arch_setup field.
14586
14587 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14588 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14589 instead of init_registers ().
14590 * win32-arm-low.c (init_registers_arm): Add prototype.
14591 (the_low_target): Add initializer for arch_setup field.
14592 * win32-i386-low.c (init_registers_i386): Add prototype.
14593 (the_low_target): Add initializer for arch_setup field.
14594
14595 * spu-low.c (init_registers_spu): Add prototype.
14596 (initialize_low): Call initialie_registers_spu () instead of
14597 initialize_registers ().
14598
14599 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14600
14601 * server.c (handle_v_requests): When handling the vRun and vAttach
14602 packets, if already debugging a process, don't kill it. Return an
14603 error instead.
14604
14605 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * server.c (handle_query): Correct length check.
14608
14609 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14610
14611 * win32-low.c (do_initial_child_stuff): Add process handle
14612 parameter. Set current_process_handle and current_process_id from the
14613 parameters. Clear globals.
14614 (win32_create_inferior): Don't set current_process_handle and
14615 current_process_id here. Instead pass them on the call to
14616 do_initial_child_stuff.
14617 (win32_attach): Likewise.
14618 (win32_clear_inferiors): New.
14619 (win32_kill): Don't close the current process handle or the
14620 current thread handle here. Instead call win32_clear_inferiors.
14621 (win32_detach): Don't open a new handle to the process. Call
14622 win32_clear_inferiors.
14623 (win32_join): Don't rely on current_process_handle; open a new
14624 handle using the process id.
14625 (win32_wait): Call win32_clear_inferiors when the inferior process
14626 has exited.
14627
14628 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14629
14630 * server.c (monitor_show_help): Add "exit".
14631
14632 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14633
14634 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14635 (clean): Add reg-xtensa.c.
14636 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14637 * configure.srv (xtensa*-*-linux*) New target.
14638 * linux-xtensa-low.c: New.
14639 * xtensa-xtregs.c: New.
14640
14641 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14642
14643 * hostio.c: Don't include errno.h.
14644 (errno_to_fileio_errno): Move to hostio-errno.
14645 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14646 error number outputting to the target->hostio_last_error callback.
14647 (hostio_packet_error): Use FILEIO_EINVAL directly.
14648 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14649 calls to hostio_error.
14650 * hostio-errno.c: New.
14651 * server.h (hostio_last_error_from_errno): Declare.
14652 * target.h (target_ops): Add hostio_last_error member.
14653 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14654 as hostio_last_error handler.
14655 * spu-low.c (spu_target_ops): Likewise.
14656 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14657 (wince_hostio_last_error): New functions.
14658 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14659 as hostio_last_error handler.
14660 (win32_target_ops) [!_WIN32_WCE]: Register
14661 hostio_last_error_from_errno as hostio_last_error handler.
14662 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14663 (hostio-errno.o): New rule.
14664 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14665 * configure.srv (srv_hostio_err_objs): New variable. Default to
14666 hostio-errno.o.
14667 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14668 * configure: Regenerate.
14669
14670 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14671
14672 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14673 (linux_kill, linux_detach): Clean up the process list.
14674 * remote-utils.c (remote_open): Improve port number parsing.
14675 (putpkt_binary, input_interrupt): Only send interrupts if the target
14676 is running.
14677 * server.c (extended_protocol): Make static.
14678 (attached): Define earlier.
14679 (exit_requested, response_needed, program_argv): New variables.
14680 (target_running): New.
14681 (start_inferior): Clear attached here.
14682 (attach_inferior): Set attached here.
14683 (require_running): Define.
14684 (handle_query): Use require_running and target_running. Implement
14685 "monitor exit".
14686 (handle_v_attach, handle_v_run): New.
14687 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14688 (gdbserver_usage): Update.
14689 (main): Redo argument parsing. Handle --debug and --multi. Handle
14690 --attach along with other options or after the port. Save
14691 program_argv. Support no initial program. Resynchronize
14692 communication with GDB after an error. Handle "monitor exit".
14693 Use require_running and target_running. Always allow the extended
14694 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14695 restart in extended mode.
14696 * README: Refer to the GDB manual. Update --attach usage.
14697
14698 2007-12-20 Andreas Schwab <schwab@suse.de>
14699
14700 * linux-low.c (STACK_SIZE): Define.
14701 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14702 (linux_test_for_tracefork): Likewise.
14703
14704 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * linux-low.c (linux_wait_for_event): Update messages. Do not
14707 reinsert auto-delete breakpoints.
14708 * mem-break.c (struct breakpoint): Change return type of handler to
14709 int.
14710 (set_breakpoint_at): Update handler type.
14711 (reinsert_breakpoint_handler): Return 1 instead of calling
14712 delete_breakpoint.
14713 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14714 setting a new one.
14715 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14716 * mem-break.h (set_breakpoint_at): Update handler type.
14717 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14718 * win32-low.c (auto_delete_breakpoint): New.
14719 (get_child_debug_event): Use it.
14720
14721 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * configure.ac: Check for pread and pwrite.
14724 * hostio.c (handle_pread): Fall back to lseek and read.
14725 (handle_pwrite): Fall back to lseek and write.
14726 * config.in, configure: Regenerated.
14727
14728 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * server.c (myresume): Add own_buf argument.
14731 (main): Update calls.
14732
14733 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14736 * remote-utils.c (remote_open): Do not call disable_async_io.
14737 (block_async_io): Delete.
14738 (unblock_async_io): Make static.
14739 (initialize_async_io): New.
14740 * server.c (handle_v_cont): Handle async I/O here.
14741 (myresume): Likewise. Move other common resume tasks here...
14742 (main): ... from here. Call initialize_async_io. Disable async
14743 I/O before the main loop.
14744 * server.h (initialize_async_io): Declare.
14745 (block_async_io, unblock_async_io): Delete prototypes.
14746 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14747
14748 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14749
14750 * remote-utils.c (readchar): Allow binary data in received messages.
14751
14752 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14753
14754 * win32-low.c (attaching): New global.
14755 (win32_create_inferior): Clear the `attaching' global.
14756 (win32_attach): Set the `attaching' global.
14757 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14758 attaching. Only set a breakpoint at the entry point if not
14759 attaching.
14760
14761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14762
14763 * server.c (main): Don't report dll events on the initial
14764 connection on attaches.
14765
14766 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14767
14768 * server.c (main): Relax numerical bases supported for the pid of
14769 the --attach command line argument.
14770
14771 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14772
14773 * win32-low.c (win32_attach): Call OpenProcess before
14774 DebugActiveProcess, not after. Add last error output to error
14775 call.
14776
14777 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14778
14779 * win32-low.c (win32_get_thread_context)
14780 (win32_set_thread_context): New functions.
14781 (thread_rec): Use win32_get_thread_context.
14782 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14783 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14784 field.
14785
14786 2007-12-03 Leo Zayas
14787 Pedro Alves <pedro_alves@portugalmail.pt>
14788
14789 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14790 global variables.
14791 (child_add_thread): Minor cleanup.
14792 (child_continue): Resume artificially suspended threads before
14793 calling ContinueDebugEvent.
14794 (suspend_one_thread): New.
14795 (fake_breakpoint_event): New.
14796 (get_child_debug_event): Change return type to int. Check here if
14797 gdb sent an interrupt request. If a soft interrupt was requested,
14798 fake a breakpoint event. Return 0 if there is no event to handle,
14799 and 1 otherwise.
14800 (win32_wait): Don't check here if gdb sent an interrupt request.
14801 Ensure there is a valid event to handle.
14802 (win32_request_interrupt): Add soft interruption method as last
14803 resort.
14804
14805 2007-12-03 Leo Zayas
14806 Pedro Alves <pedro_alves@portugalmail.pt>
14807
14808 * win32-low.h (win32_thread_info): Add descriptions to the
14809 structure members. Replace `suspend_count' counter by a
14810 `suspended' flag.
14811 * win32-low.c (thread_rec): Update condition of when to get the
14812 context from the inferior. Rely on ContextFlags being set if it
14813 has already been retrieved. Only suspend the inferior thread if
14814 we haven't already. Warn if that fails.
14815 (continue_one_thread): s/suspend_count/suspended/. Only call
14816 ResumeThread once. Warn if that fails.
14817
14818 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14819
14820 * win32-low.c (win32_wait): Don't read from the inferior when it
14821 has already exited.
14822
14823 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14824
14825 * Makefile.in (win32_low_h): New variable.
14826 (win32-low.o): Add dependency on $(win32_low_h).
14827 (win32-arm-low.o, win32-i386-low.o): New rules.
14828
14829 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * hostio.c: Correct copyright year.
14832
14833 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14834
14835 * Makefile.in (OBS): Add hostio.o.
14836 (hostio.o): New rule.
14837 * server.h (handle_vFile): Declare.
14838 * hostio.c: New file.
14839 * server.c (handle_v_requests): Take packet_len and new_packet_len
14840 for binary packets. Call handle_vFile.
14841 (main): Update call to handle_v_requests.
14842
14843 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14844
14845 * linux-low.c: Include <sched.h>.
14846
14847 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14848
14849 * linux-low.c (linux_tracefork_grandchild): New.
14850 (linux_tracefork_child): Use clone.
14851 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14852
14853 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14854
14855 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14856
14857 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14860
14861 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14862
14863 * inferiors.c (change_inferior_id): Delete.
14864 (add_pid_to_list, pull_pid_from_list): New.
14865 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14866 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14867 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14868 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14869 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14870 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14871 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14872 (using_threads): Always set to 1.
14873 (handle_extended_wait): New.
14874 (add_process): Do not set TID.
14875 (linux_create_inferior): Set must_set_ptrace_flags.
14876 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14877 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14878 (linux_thread_alive): Rename TID argument to LWPID.
14879 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14880 (linux_wait_for_event): Do not use TID or check using_threads. Update
14881 call to dead_thread_notify. Call handle_extended_wait.
14882 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14883 (send_sigstop): Delete sigstop_sent.
14884 (wait_for_sigstop): Avoid TID.
14885 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14886 (linux_test_for_tracefork): New.
14887 (linux_lookup_signals): Use thread_db_active and
14888 linux_supports_tracefork_flag.
14889 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14890 * linux-low.h (get_process_thread): Avoid TID.
14891 (struct process_ifo): Move thread_known and tid to the end. Remove
14892 sigstop_sent.
14893 (linux_attach_lwp, thread_db_init): Update prototypes.
14894 * server.h (change_inferior_id): Delete prototype.
14895 (add_pid_to_list, pull_pid_from_list): New prototypes.
14896 * thread-db.c (thread_db_use_events): New.
14897 (find_first_thread): Rename to...
14898 (find_one_thread): ...this. Update callers and messages. Do not
14899 call fatal. Check thread_db_use_events. Do not call
14900 change_inferior_id or new_thread_notify.
14901 (maybe_attach_thread): Update. Do not call new_thread_notify.
14902 (thread_db_init): Set thread_db_use_events. Check use_events.
14903 * utils.c (fatal, warning): Correct message prefix.
14904
14905 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * Makefile.in (clean): Remove new files.
14908 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14909 (powerpc-64.o, powerpc-64.c): New rules.
14910 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14911 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14912 with SPE.
14913 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14914 SPE targets.
14915 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14916 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14917 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14918 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14919 (target_regsets): Add AltiVec and SPE register sets.
14920 * configure.ac: Check for AltiVec and SPE.
14921 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14922 (ppc_fill_vrregset, ppc_store_vrregset): New.
14923 (target_regsets): Add AltiVec register set.
14924 * configure: Regenerated.
14925
14926 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14927
14928 * linux-low.c (O_LARGEFILE): Define.
14929 (linux_read_memory): Use /proc/PID/mem.
14930 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14931 * configure, config.in: Regenerated.
14932
14933 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14934
14935 * linux-low.c (linux_wait_for_event): Do not pass signals while
14936 single-stepping.
14937
14938 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14939
14940 * win32-low.c (create_process): New.
14941 (win32_create_inferior): Use create_process instead of
14942 CreateProcess. If create_process failed retry appending an ".exe"
14943 suffix. Store the GetLastError result immediatelly after
14944 create_process calls and use it on the call to error.
14945
14946 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14947
14948 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14949
14950 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14951
14952 * configure.ac: Switch license to GPLv3.
14953
14954 2007-08-01 Michael Snyder <msnyder@access-company.com>
14955
14956 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14957
14958 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14959
14960 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14961 typedef.
14962 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14963 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14964 CloseToolhelp32Snapshot.
14965 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14966 CloseToolhelp32Snapshot.
14967
14968 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14969
14970 * server.c (main): Check for inferior exit before main loop.
14971
14972 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14973
14974 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14975 instead of on tmp_desc.
14976
14977 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14978 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14981 (add_thread): Minor cleanups.
14982 (clear_inferiors): Move lower in the file. Clear the DLL
14983 list.
14984 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14985 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14986 (xml_escape_text): New.
14987 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14988 for qSupported.
14989 (handle_v_cont): Report errors.
14990 (gdbserver_version): Update.
14991 (main): Correct size of own_buf. Do not report initial DLL events.
14992 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14993 (unloaded_dll, xml_escape_text): New.
14994 * win32-low.c (enum target_waitkind): Update comments.
14995 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14996 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14997 (win32_EnumProcessModules, win32_GetModuleInformation)
14998 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14999 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15000 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15001 (win32_Module32First, win32_Module32Next, load_toolhelp)
15002 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15003 (get_child_debug_event): Handle DLL events.
15004 (win32_wait): Likewise.
15005
15006 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15007
15008 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15009 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15010
15011 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15012
15013 * win32-low.c (handle_output_debug_string): Ignore event if not
15014 waiting.
15015
15016 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15017
15018 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15019
15020 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15023
15024 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * inferiors.c (change_inferior_id): Add comment.
15027 * linux-low.c (check_removed_breakpoint): Add an early
15028 prototype. Improve debug output.
15029 (linux_attach): Doc update.
15030 (linux_detach_one_process, linux_detach): Clean up before releasing
15031 each process.
15032 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15033 * linux-low.h (struct process_info): Doc improvement.
15034 * mem-break.c (delete_all_breakpoints): New.
15035 * mem-break.h (delete_all_breakpoints): New prototype.
15036 * thread-db.c (find_first_thread): New.
15037 (thread_db_create_event): Call it instead of
15038 thread_db_find_new_threads. Clean up unused variables.
15039 (maybe_attach_thread): Remove first thread handling.
15040 (thread_db_find_new_threads): Use find_first_thread.
15041 (thread_db_get_tls_address): Likewise.
15042
15043 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * thread-db.c (thread_db_find_new_threads): Add prototype.
15046 (thread_db_create_event): Check for the main thread before adding
15047 a new thread.
15048 (maybe_attach_thread): Only enable event reporting if TID == 0.
15049 (thread_db_get_tls_address): Check for new threads.
15050
15051 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15052
15053 * linux-low.c (linux_create_inferior): Try execv before execvp.
15054 * spu-low.c (spu_create_inferior): Likewise.
15055
15056 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15057
15058 * linux-low.c (linux_create_inferior): Change execv to execvp.
15059 * spu-low.c (spu_create_inferior): Likewies.
15060
15061 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15062
15063 * Makefile.in (clean): Clean new files instead of deleted ones.
15064 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15065 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15066 rules.
15067 * configure.srv: Specify XML files and new regformats for MIPS and
15068 MIPS64 GNU/Linux.
15069 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15070 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15071 an entry for the restart register.
15072 (mips_cannot_fetch_register, mips_cannot_store_register)
15073 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15074 register names to match the XML descriptions.
15075 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15076 restart register instead of $0.
15077
15078 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15079 Markus Deuling <deuling@de.ibm.com>
15080
15081 * remote-utils.c (decode_xfer_write): New function.
15082 * server.h (decode_xfer_write): Add prototype.
15083 * server.c (handle_query): Add PACKET_LEN argument. Support
15084 qXfer:spu:read and qXfer:spu:write packets.
15085 (main): Pass packet_len to handle_query.
15086 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15087 * target.h (target_ops): Add qxfer_spu.
15088
15089 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15090
15091 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15092 accessing non-seekable spufs files.
15093
15094 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15095
15096 * server.c (handle_query): Add reply for qC packet.
15097
15098 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15099 Leo Zayas <lerele@champenstudios@com>
15100
15101 * server.h (check_remote_input_interrupt_request): New function.
15102 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15103 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15104 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15105 (check_remote_input_interrupt_request): New function.
15106 * server.h (check_remote_input_interrupt_request): Declare.
15107 * win32-low.c (winapi_DebugBreakProcess,
15108 winapi_GenerateConsoleCtrlEvent): New typedefs.
15109 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15110 to 250 ms.
15111 (win32_wait): Check for remote interrupt request
15112 with check_remote_input_interrupt_request.
15113 (win32_request_interrupt): New function.
15114 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15115
15116 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15117
15118 * win32-low.c (debug_registers_changed,
15119 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15120 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15121 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15122 (thread_rec): Get context using the low target.
15123 (child_add_thread): Call thread_added on the low target,
15124 which does the same thing.
15125 (regptr): Delete.
15126 (do_initial_child_stuff): Remove debug registers references.
15127 Set context using the low target. Resume threads after
15128 setting the contexts.
15129 (child_continue): Remove dead variable. Remove debug
15130 registers references.
15131 (child_fetch_inferior_registers): Go through the low target.
15132 (do_child_store_inferior_registers): Remove.
15133 (child_store_inferior_registers): Go through the low target.
15134 (win32_resume): Remove debug registers references.
15135 Set context using the low target.
15136 (handle_exception): Change return type to void. Don't record
15137 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15138 first chance exception.
15139 (get_child_debug_event): Change return type to void. Remove
15140 goto loop. Always return after waiting for debug event.
15141 (win32_wait): Convert to switch statement. Handle spurious
15142 events.
15143
15144 * win32-i386-low.c (debug_registers_changed,
15145 debug_registers_used): New.
15146 (initial_stuff): Rename to ...
15147 (i386_initial_stuff): ... this. Clear debug registers
15148 state variables.
15149 (store_debug_registers): Delete.
15150 (i386_get_thread_context): New.
15151 (load_debug_registers): Delete.
15152 (i386_set_thread_context): New.
15153 (i386_thread_added): New.
15154 (single_step): Rename to ...
15155 (i386_single_step): ... this.
15156 (do_fetch_inferior_registers): Rename to ...
15157 (i386_fetch_inferior_register): ... this.
15158 (i386_store_inferior_register): New.
15159 (the_low_target): Adapt to new interface.
15160
15161 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15162 (arm_get_thread_context): New.
15163 (arm_set_thread_context): New.
15164 (regptr): New.
15165 (do_fetch_inferior_registers): Rename to ...
15166 (arm_fetch_inferior_register): ... this.
15167 (arm_store_inferior_register): New.
15168 (arm_wince_breakpoint): Reimplement as unsigned long.
15169 (arm_wince_breakpoint_len): Define.
15170 (the_low_target): Adapt to new interface.
15171
15172 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15173 load_debug_registers. Add get_thread_context, set_thread_context,
15174 thread_added and store_inferior_register. Rename
15175 fetch_inferior_registers to fetch_inferior_register.
15176 (regptr): Remove declaration.
15177
15178 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15179
15180 * linux-low.c (linux_detach): Change return type to int. Return 0.
15181 * spu-low.c (spu_detach): Likewise.
15182
15183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15184
15185 * target.h (target_ops): Change return type of detach to int.
15186 Add join.
15187 (join_inferior): New.
15188 * server.c (main): Don't skip detach support on mingw32.
15189 If the inferior doesn't support detaching return error.
15190 Call join_inferior instead of using waitpid.
15191 * linux-low.c (linux_join): New.
15192 (linux_target_op): Add linux_join.
15193 * spu-low.c (spu_join): New.
15194 (spu_target_ops): Add spu_join.
15195 * win32-low.c (win32_detach): Adapt to new interface.
15196 Reopen current_process_handle before detaching. Issue a child
15197 resume before detaching.
15198 (win32_join): New.
15199 (win32_target_op): Add win32_join.
15200
15201 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15202
15203 * win32-low.c (win32-attach): Fix return value.
15204 * target.h (target_ops): Describe ATTACH return values.
15205
15206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15207
15208 * win32-low.c (GETPROCADDRESS): Define.
15209 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15210 (winapi_DebugSetProcessKillOnExit): Likewise.
15211 (win32_create_inferior): Force usage of ansi CreateProcessA.
15212 (win32_attach): Use GETPROCADDRESS.
15213 (win32_detach): Likewise.
15214
15215 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15216
15217 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15218
15219 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15220
15221 * win32-low.c: Commit leftover changes from 2007-03-29.
15222
15223 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15224
15225 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15226 fields short instead of int. Add explicit padding.
15227 (i387_cache_to_fsave): Remove unnecessary casts.
15228 (i387_fsave_to_cache): Doc fix.
15229 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15230
15231 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15234 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15235
15236 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15237
15238 * configure.srv (arm*-*-mingw32ce*): Move near the other
15239 arm targets.
15240
15241 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15242
15243 * configure.ac: Add errno checking.
15244 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15245 sys/file.h and malloc.h.
15246 (AC_CHECK_DECLS): Add perror.
15247 (srv_mingwce): Handle.
15248 * configure.srv (i[34567]86-*-cygwin*): Add
15249 win32-i386-low.o to srv_tgtobj.
15250 (i[34567]86-*-mingw*): Likewise.
15251 (arm*-*-mingw32ce*): Add case.
15252 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15253 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15254 [__MINGW32CE__] (strerror): New function.
15255 [__MINGW32CE__] (errno): Define to GetLastError.
15256 [__MINGW32CE__] (COUNTOF): New macro.
15257 (remote_open): Remove extra close call.
15258 * mem-break.c (delete_breakpoint_at): New function.
15259 * mem-break.h (delete_breakpoint_at): Declare.
15260 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15261 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15262 [USE_WIN32API] (read, write): Add char* casts.
15263 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15264 * server.h: Include wincecompat.h on Windows CE.
15265 [HAVE_ERRNO_H]: Check.
15266 (perror): Declare if not declared.
15267 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15268 (perror_with_name): Remove errno declaration.
15269 * wincecompat.h: New.
15270 * wincecompat.c: New.
15271 * win32-low.h: New.
15272 * win32-arm-low.c: New.
15273 * win32-i386-low.c: New.
15274 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15275 (OUTMSG2): Make it safe.
15276 (_T): New macro.
15277 (COUNTOF): New macro.
15278 (NUM_REGS): Get it from the low target.
15279 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15280 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15281 (thread_rec): Let low target handle debug registers.
15282 (child_add_thread): Likewise.
15283 (child_init_thread_list): Likewise.
15284 (continue_one_thread): Likewise.
15285 (regptr): New.
15286 (do_child_fetch_inferior_registers): Move to ...
15287 * win32-i386-low.c: ... here, and rename to ...
15288 (do_fetch_inferior_registers): ... this.
15289 * win32-low.c (child_fetch_inferior_registers):
15290 Go through the low target.
15291 (do_child_store_inferior_registers): Use regptr.
15292 (strwinerror): New function.
15293 (win32_create_inferior): Handle Windows CE.
15294 Use strwinerror instead of strerror on Windows error
15295 codes. Add program to the error output.
15296 Don't close the main thread handle on Windows CE.
15297 (win32_attach): Use coredll.dll on Windows CE.
15298 (win32_kill): Close current process and current
15299 thread handles.
15300 (win32_detach): Use coredll.dll on Windows CE.
15301 (win32_resume): Let low target handle debug registers, and
15302 step request.
15303 (handle_exception): Add/Remove initial breakpoint. Avoid
15304 non-existant WSTOPSIG on Windows CE.
15305 (win32_read_inferior_memory): Cast to remove warning.
15306 (win32_arch_string): Go through the low target.
15307 (initialize_low): Call set_breakpoint_data with the low
15308 target's breakpoint.
15309 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15310 FOP_REGNUM, mappings): Move to ...
15311 * win32-i386-low.c: ... here.
15312 * win32-low.c (win32_thread_info): Move to ...
15313 * win32-low.h: ... here.
15314 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15315 win32-arm-low.c and wincecompat.c.
15316 (all:): Add $EXEEXT.
15317 (install-only:): Likewise.
15318 (gdbserver:): Likewise.
15319 (gdbreplay:): Likewise.
15320 * config.in: Regenerate.
15321 * configure: Regenerate.
15322
15323 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15324
15325 * win32-low.c: Rename typedef thread_info to
15326 win32_thread_info throughout.
15327
15328 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15329
15330 * win32-i386-low.c: Rename to ...
15331 * win32-low.c: ... this.
15332 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15333 * Makefile.in: Likewise.
15334
15335 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15336
15337 * remote-utils.c (monitor_output): Constify msg parameter.
15338 * server.h (monitor_output): Likewise.
15339 * win32-i386-low.c (handle_output_debug_string): New.
15340 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15341 handle_output_debug_string.
15342 (get_child_debug_event): Likewise.
15343
15344 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15345
15346 * server.c (main): Correct strtoul check.
15347
15348 2007-03-27 Jon Ringle <jon@ringle.org>
15349
15350 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15351
15352 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15353
15354 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15355
15356 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15357
15358 * terminal.h: Check HAVE_SGTTY_H.
15359
15360 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15361
15362 * remote-utils.c (remote_open): Print out the assigned port number.
15363
15364 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15365
15366 * remote-utils.c (monitor_output): New function.
15367 * server.c (debug_threads): Define here.
15368 (monitor_show_help): New function.
15369 (handle_query): Handle qRcmd.
15370 (main): Do not handle 'd' packet.
15371 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15372 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15373 of debug_threads.
15374
15375 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15376
15377 * Makefile.in (EXEEXT): New.
15378 (clean): Use $(EXEEXT).
15379
15380 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15381
15382 * target.h (target_ops): Rename send_signal to request_interrupt,
15383 and remove enum target_signal parameter.
15384 * linux-low.c (linux_request_interrupt): Rename from
15385 linux_send_signal, and always send SIGINT.
15386 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15387 and always send SIGINT.
15388 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15389 of send_signal.
15390 (input_interrupt): Likewise.
15391
15392 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15393
15394 * server.c (get_features_xml): Check if target implemented
15395 arch_string.
15396 * win32-i386-low.c (win32_arch_string): New.
15397 (win32_target_ops): Add win32_arch_string as arch_string member.
15398
15399 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15400
15401 * spu-low.c (spu_arch_string): New.
15402 (spu_target_ops): Add spu_arch_string.
15403
15404 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15405
15406 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15407 * configure.ac: Do not check for terminal.h.
15408 * configure, config.in: Regenerated.
15409
15410 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * Makefile.in (OBS): Add $(XML_BUILTIN).
15413 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15414 (clean): Update.
15415 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15416 (arm-with-iwmmxt.c): New.
15417 * config.in, configure: Regenerate.
15418 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15419 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15420 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15421 (arm*-*-linux*): Add iWMMXt and regset support.
15422 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15423 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15424 (arm_store_wmmxregset, target_regsets): New.
15425 * server.c (get_features_xml): Take annex argument. Check builtin
15426 XML documents.
15427 (handle_query): Handle multiple annexes.
15428
15429 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15430
15431 * remote-utils.c [USE_WIN32API] (read, write): Define.
15432 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15433 write.
15434
15435 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * linux-i386-low.c (the_low_target): Set arch_string.
15438 * linux-x86-64-low.c (the_low_target): Likewise.
15439 * linux-low.c (linux_arch_string): New.
15440 (linux_target_ops): Add it.
15441 * linux-low.h (struct linux_target_ops): Add arch_string.
15442 * server.c (write_qxfer_response): Use const void * for DATA.
15443 (get_features_xml): New.
15444 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15445 * target.h (struct target_ops): Add arch_string method.
15446
15447 2007-01-03 Denis Pilat <denis.pilat@st.com>
15448 Daniel Jacobowitz <dan@codesourcery.com>
15449
15450 * linux-low.c (linux_kill): Handle being called with no threads.
15451 * win32-i386-low.c (win32_kill): Likewise.
15452 (get_child_debug_event): Clear current_process_handle.
15453
15454 2006-12-30 Denis PILAT <denis.pilat@st.com>
15455 Daniel Jacobowitz <dan@codesourcery.com>
15456
15457 * remote-utils.c (remote_open): Check the type of specified
15458 serial port devices before opening them.
15459 * server.c (main): Kill the inferior if an error occurs during
15460 the first remote_open.
15461
15462 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15463
15464 * README: Update supported targets.
15465
15466 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15467
15468 * Makefile.in (clean): Remove reg-mips64.c.
15469 (reg-mips64.c, reg-mips64.o): New rules.
15470 * configure.srv: Handle mips64. Include regset support for mips.
15471 * linux-mips-low.c (union mips_register): New.
15472 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15473 (mips_breakpoint, mips_breakpoint_at): Use int.
15474 (mips_collect_register, mips_supply_register)
15475 (mips_collect_register_32bit, mips_supply_register_32bit)
15476 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15477 (mips_store_fpregset, target_regsets): New.
15478 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15479
15480 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15481
15482 * configure.srv: Add target "spu*-*-*".
15483 * Makefile.in (clean): Remove reg-spu.c.
15484 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15485 * spu-low.c: New file.
15486
15487 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15488
15489 * configure.ac: Correct td_thr_tls_get_addr test.
15490 * configure: Regenerated.
15491
15492 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * linux-low.c (linux_wait_for_event): Reformat. Use the
15495 pass_signals array.
15496 * remote-utils.c (decode_address_to_semicolon): New.
15497 * server.c (pass_signals, handle_general_set): New.
15498 (handle_query): Mention QPassSignals for qSupported.
15499 (main): Call handle_general_set.
15500 * server.h (pass_signals, decode_address_to_semicolon): New.
15501
15502 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15503
15504 * server.c (handle_query): Correct error handling for read_auxv.
15505
15506 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15507
15508 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15509 and srv_linux_thread_db to yes.
15510 * linux-s390-low.c (s390_fill_gregset): New function.
15511 (target_regsets): Define data structure.
15512
15513 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15514
15515 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15516 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15517 * config.in, configure: Regenerated.
15518 * inferiors.c (gdb_id_to_thread): New function.
15519 (gdb_id_to_thread_id): Use it.
15520 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15521 * linux-low.h (struct process_info): Add th member.
15522 (thread_db_get_tls_address): New prototype.
15523 * remote-utils.c (decode_address): Make non-static.
15524 * server.c (handle_query): Handle qGetTLSAddr.
15525 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15526 * target.h (struct target_ops): Add get_tls_address.
15527 * thread-db.c (maybe_attach_thread): Save the thread handle.
15528 (thread_db_get_tls_address): New.
15529
15530 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15533 (linux_resume_one_process): Take a siginfo_t *. Update all
15534 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15535 (struct pending_signals): Add a siginfo_t.
15536 (linux_wait_for_process): Always set last_status.
15537 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15538 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15539 * linux-low.h (struct process_info): Add last_status.
15540
15541 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * remote-utils.c (try_rle): New function.
15544 (putpkt_binary): Use it.
15545
15546 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15549 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15550 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15551 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15552 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15553 point registers.
15554
15555 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15556
15557 * server.c (terminal_fd): New variable.
15558 (old_foreground_pgrp): Likewise.
15559 (restore_old_foreground_pgrp): New function.
15560 (start_inferior): Record the terminal file descriptor in terminal_fd
15561 and its original foreground group in old_foreground_pgrp. Register
15562 restore_old_foreground_pgrp with atexit().
15563
15564 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * server.c (handle_query): Correct qPart to qXfer.
15567
15568 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * configure.ac: Check for more headers which are missing on
15571 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15572 * configure.srv: Add Cygwin and mingw32.
15573 * remote-utils.c: Don't include headers unconditionally which
15574 are missing on mingw32. Include <winsock.h> for mingw32.
15575 (remote_open): Adjust for mingw32 support. Flush
15576 standard error after writing to it.
15577 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15578 (unblock_async_io, enable_async_io, disable_async_io)
15579 (readchar, getpkt): Update for Winsock support.
15580 (prepare_resume_reply): Expect a protocol signal number.
15581 * server.c: Disable <sys/wait.h> on mingw32.
15582 (start_inferior): Adjust for mingw32 support. Flush
15583 standard error after writing to it.
15584 (attach_inferior): Likewise. Use protocol signal
15585 numbers.
15586 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15587 and names.
15588 * win32-i386-low.c: New file.
15589 * Makefile.in (XM_CLIBS): Set.
15590 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15591 (win32-i386-low.o): New dependency rule.
15592 * linux-low.c (linux_wait): Use target signal numbers.
15593 * target.h (struct target_ops): Doc fix.
15594 * server.h (target_signal_to_name): New prototype.
15595 * gdbreplay.c: Don't include headers unconditionally which
15596 are missing on mingw32. Include <winsock.h> for mingw32.
15597 (remote_close, remote_open): Adjust for Winsock support.
15598 * configure, config.in: Regenerated.
15599
15600 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15601
15602 * server.c (decode_xfer_read, write_qxfer_response): New.
15603 (handle_query): Take a packet length argument. Handle
15604 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15605 the qSupported response.
15606 (main): Update call to handle_query.
15607
15608 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15611 (putpkt_binary): Renamed from putpkt and adjusted for binary
15612 data.
15613 (putpkt): New wrapper for putpkt_binary.
15614 (readchar): Don't mask off the high bit.
15615 (decode_X_packet): New function.
15616 * server.c (main): Call putpkt_binary if a handler sets the packet
15617 length. Save the length of the incoming packet. Handle 'X'.
15618 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15619
15620 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15621
15622 * server.c (handle_query): Handle qSupported.
15623
15624 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * remote-utils.c (all_symbols_looked_up): New variable.
15627 (look_up_one_symbol): Check it.
15628 * server.h (look_up_one_symbol): New declaration.
15629 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15630
15631 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * Makefile.in (linux-arm-low.o): Update dependencies.
15634 * linux-arm-low.c: Include "gdb_proc_service.h".
15635 (PTRACE_GET_THREAD_AREA): Define.
15636 (ps_get_thread_area): New function.
15637
15638 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15639
15640 * configure.srv (m68k*-*-uclinux*): New target.
15641 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15642 (linux_resume_one_process): Remove extraneous cast.
15643 (linux_read_offsets): New.
15644 (linux_target_op): Add linux_read_offsets on mmuless systems.
15645 * server.c (handle_query): Add qOffsets logic.
15646 * target.h (struct target_ops): Add read_offsets.
15647
15648 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15649
15650 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15651 (PTRACE_GET_THREAD_AREA): Define.
15652 (ps_get_thread_area): New function.
15653 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15654 (linux-x86-64-low.o): Update.
15655
15656 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15657
15658 * configure.ac: Remove checks for prfpregset_t.
15659 * gdb_proc_service.h: New file.
15660 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15661 new "gdb_proc_service.h".
15662 * proc-service.c: Likewise.
15663 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15664 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15665 * Makefile.in (gdb_proc_service_h): Updated.
15666 * configure, config.in: Regenerated.
15667
15668 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * remote-utils.c (prepare_resume_reply): Move declaration
15671 of gdb_id_from_wait to the top of the block.
15672
15673 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15674
15675 * linux-low.c (regsets_store_inferior_registers): Read the regset
15676 from the target before filling it.
15677
15678 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * server.c (attach_inferior): Return SIGTRAP for a successful
15681 attach.
15682
15683 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * Makefile.in (OBS): Add version.o.
15686 (STAGESTUFF): Delete.
15687 (version.o): Add dependencies.
15688 (version.c): Replace rule.
15689 (clean): Remove version.c.
15690 * server.c (gdbserver_version): New.
15691 (gdbserver_usage): Use printf.
15692 (main): Handle --version and --help.
15693 * server.h (version, host_name): Add declarations.
15694
15695 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15696
15697 * linux-arm-low.c:
15698 * linux-arm-low.c:
15699 * inferiors.c:
15700 * i387-fp.h:
15701 * i387-fp.c:
15702 * gdbreplay.c:
15703 * regcache.c:
15704 * proc-service.c:
15705 * mem-break.h:
15706 * mem-break.c:
15707 * linux-x86-64-low.c:
15708 * linux-sh-low.c:
15709 * linux-s390-low.c:
15710 * linux-ppc64-low.c:
15711 * linux-ppc-low.c:
15712 * linux-mips-low.c:
15713 * linux-m68k-low.c:
15714 * linux-m32r-low.c:
15715 * linux-low.h:
15716 * linux-low.c:
15717 * linux-ia64-low.c:
15718 * linux-i386-low.c:
15719 * linux-crisv32-low.c:
15720 * thread-db.c:
15721 * terminal.h:
15722 * target.h:
15723 * target.c:
15724 * server.h:
15725 * server.c:
15726 * remote-utils.c:
15727 * regcache.h:
15728 * utils.c:
15729 * Makefile.in:
15730 * configure.ac:
15731 * gdbserver.1: Add (C) after Copyright. Update the FSF
15732 address.
15733
15734 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15737 (arm_breakpoint_at): Recognize both breakpoints.
15738 (the_low_target): Use the correct breakpoint instruction.
15739
15740 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15741
15742 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15743 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15744 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15745 (the_low_target): Update.
15746
15747 2005-10-25 Andreas Schwab <schwab@suse.de>
15748
15749 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15750
15751 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15752 (ia64_num_regs): Reduce to 462.
15753
15754 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15755
15756 * acinclude.m4: Correct quoting.
15757 * aclocal.m4: Regenerated.
15758
15759 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15760 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15761 (thread_db_init): Call thread_db_err_str.
15762 * configure.ac: Check for TD_VERSION.
15763 * config.in, configure: Regenerated.
15764
15765 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15766
15767 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15768
15769 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15772 is not available. Define HAVE_PTRACE_GETREGS if it is.
15773 * config.in, configure: Regenerated.
15774 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15775 * linux-i386-low.c, linux-m68k-low.c: Update to use
15776 HAVE_PTRACE_GETREGS.
15777 * linux-low.c (regsets_fetch_inferior_registers)
15778 (regsets_store_inferior_registers): Only return 0 if we processed
15779 GENERAL_REGS.
15780 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15781 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15782
15783 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * inferiors.c (struct thread_info): Add gdb_id.
15786 (add_thread): Add gdb_id argument.
15787 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15788 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15789 calls to add_thread.
15790 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15791 * server.c (handle_query): Use thread_to_gdb_id.
15792 (handle_v_cont, main): Use gdb_id_to_thread_id.
15793 * server.h (add_thread): Update prototype.
15794 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15795 prototypes.
15796
15797 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15798
15799 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15800 left-padded registers.
15801 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15802 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15803
15804 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15805
15806 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15807 * configure: Regenerate.
15808 * config.in: Regenerate.
15809 * server.h (NEED_DECLARATION_STRERROR):
15810 Replace with !HAVE_DECL_STRERROR.
15811
15812 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15813
15814 * linux-low.c (linux_wait, linux_send_signal): Don't test
15815 an unsigned long variable for > 0 if it could be MAX_ULONG.
15816 * server.c (myresume): Likewise.
15817 * target.c (set_desired_inferior): Likewise.
15818
15819 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15820
15821 * configure.ac: Simplify and improve check for socklen_t.
15822 * configure, config.in: Regenerate.
15823
15824 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * acconfig.h: Remove.
15827 * configure.ac: Add a test for socklen_t. Use three-argument
15828 AC_DEFINE throughout.
15829 * config.in: Regenerated using autoheader 2.59.
15830 * configure: Regenerated.
15831
15832 * gdbreplay.c (socklen_t): Provide a default.
15833 (remote_open): Use socklen_t.
15834 * remote-utils.c (socklen_t): Provide a default.
15835 (remote_open): Use socklen_t.
15836 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15837 unsigned char.
15838
15839 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15840 char for buffers.
15841 * linux-low.c (linux_read_memory, linux_write_memory)
15842 (linux_read_auxv): Likewise.
15843 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15844 (check_mem_write): Likewise.
15845 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15846 Likewise.
15847 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15848 (registers_from_string, register_data): Likewise.
15849 * server.c (handle_query, main): Likewise.
15850 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15851 (decode_M_packet): Likewise.
15852 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15853 * target.h (struct target_ops): Update read_memory, write_memory,
15854 and read_auxv.
15855 (read_inferior_memory, write_inferior_memory): Update.
15856 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15857 to unsigned char *.
15858 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15859 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15860 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15861 linux-s390-low.c, linux-sh-low.c: Update for changes in
15862 read_inferior_memory and the_low_target->breakpoint.
15863
15864 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15867 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15868 * configure.srv: Add powerpc64-*-linux*.
15869 * linux-ppc64-low.c: New file.
15870
15871 2005-05-23 Orjan Friberg <orjanf@axis.com>
15872
15873 * linux-cris-low.c: New file with support for CRIS.
15874 * linux-crisv32-low.c: Ditto for CRISv32.
15875 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15876 (clean): Add reg-cris.c and reg-crisv32.c.
15877 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15878 reg-crisv32.o, and reg-crisv32.c to make rules.
15879 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15880 recognized targets.
15881
15882 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15883
15884 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15885 of sizeof (PTRACE_XFER_TYPE).
15886 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15887
15888 2005-05-12 Orjan Friberg <orjanf@axis.com>
15889
15890 * target.h (struct target_ops): Add insert_watchpoint,
15891 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15892 pointers for hardware watchpoint support.
15893 * linux-low.h (struct linux_target_ops): Ditto.
15894 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15895 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15896 to linux_target_ops.
15897 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15898 reply packet.
15899 * server.c (main): Recognize 'Z' and 'z' packets.
15900
15901 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15902
15903 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15904 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15905 (the_low_target): Add new members.
15906
15907 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15908
15909 * proc-service.c (ps_lgetregs): Search all_processes instead of
15910 all_threads.
15911
15912 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15913
15914 * server.c (start_inferior): Change return type to int.
15915 (attach_inferior): Change sigptr to int *.
15916 (handle_v_cont, handle_v_requests): Change signal to int *.
15917 (main): Change signal to int.
15918
15919 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15920
15921 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15922 * configure.srv: Add m32r*-*-linux*.
15923 * linux-m32r-low.c: New file.
15924
15925 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15926
15927 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15928
15929 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15930
15931 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15932 Take unsigned long arguments for PIDs.
15933 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15934 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15935 (wait_for_sigstop, linux_resume_one_process)
15936 (regsets_fetch_inferior_registers, linux_send_signal)
15937 (linux_read_auxv): Likewise. Update the types of variables holding
15938 PIDs. Update format string specifiers.
15939 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15940 * remote-utils.c (prepare_resume_reply): Likewise.
15941 * server.c (cont_thread, general_thread, step_thread)
15942 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15943 unsigned long.
15944 (handle_query): Update format specifiers.
15945 (handle_v_cont, main): Use strtoul for thread IDs.
15946 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15947 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15948 (general_thread, step_thread, thread_from_wait)
15949 (old_thread_from_wait): Update.
15950 * target.h (struct thread_resume): Use unsigned long for THREAD.
15951 (struct target_ops): Use unsigned long for arguments to attach and
15952 thread_alive.
15953
15954 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * acinclude.m4: Include bfd/bfd.m4 directly.
15957 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15958 <agriffis@toolchain.org>.
15959 * aclocal.m4, configure: Regenerated.
15960
15961 2005-01-07 Andrew Cagney <cagney@gnu.org>
15962
15963 * configure.ac: Rename configure.in, require autoconf 2.59.
15964 * configure: Re-generate.
15965
15966 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15967
15968 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15969 LIBS when finished.
15970 * aclocal.m4: Regenerated.
15971 * configure: Regenerated.
15972
15973 2004-11-21 Andreas Schwab <schwab@suse.de>
15974
15975 * linux-m68k-low.c (m68k_num_gregs): Define.
15976 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15977 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15978 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15979 (m68k_breakpoint_at): New. Add to the_low_target.
15980
15981 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15982 srv_linux_thread_db to yes.
15983
15984 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15985
15986 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15987 (ARCH_SET_FS): Likewise.
15988 (ARCH_GET_FS): Likewise.
15989 (ARCH_GET_GS): Likewise.
15990
15991 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15992
15993 * linux-i386-low.c (ps_get_thread_area): New.
15994 * linux-x86-64-low.c (ps_get_thread_area): New.
15995 * linux-low.c: Include <sys/syscall.h>.
15996 (linux_kill_one_process): Don't kill the first thread here.
15997 (linux_kill): Kill the first thread here.
15998 (kill_lwp): New function.
15999 (send_sigstop, linux_send_signal): Use it.
16000 * proc-service.c: Clean up #ifdefs.
16001 (fpregset_info): Delete.
16002 (ps_lgetregs): Update and enable implementation.
16003 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16004 implementations.
16005 * remote-utils.c (struct sym_cache, symbol_cache): New.
16006 (input_interrupt): Print a clearer message.
16007 (async_io_enabled): New variable.
16008 (enable_async_io, disable_async_io): Use it. Update comments.
16009 (look_up_one_symbol): Use the symbol cache.
16010 * thread-db.c (thread_db_look_up_symbols): New function.
16011 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16012
16013 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16014
16015 * configure.in: Test for -rdynamic.
16016 * configure: Regenerated.
16017 * Makefile (INTERNAL_LDFLAGS): New.
16018 (gdbserver, gdbreplay): Use it.
16019
16020 2004-09-02 Andrew Cagney <cagney@gnu.org>
16021
16022 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16023
16024 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16025
16026 * linux-low.c (linux_wait): Clear all_processes list also.
16027
16028 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16029
16030 * linux-low.c: Include <errno.h>. Remove extern declaration of
16031 errno.
16032
16033 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16034
16035 * gdbreplay.c, server.h, utils.c: Update copyright years.
16036
16037 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16038
16039 * server.c (main): Print child status or termination signal from
16040 variable 'signal', not 'sig'.
16041
16042 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16043
16044 * linux-low.c (linux_read_memory): Change return type to
16045 int. Check for and return error from ptrace().
16046 * target.c (read_inferior_memory): Change return type to int. Pass
16047 back return status from the_target->read_memory().
16048 * target.h (struct target_ops): Adapt *read_memory() prototype.
16049 Update comment.
16050 (read_inferior_memory): Adapt prototype.
16051 * server.c (main): Return an error packet if
16052 read_inferior_memory() returns an error.
16053
16054 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16055
16056 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16057 Unify with other clean targets.
16058
16059 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16060
16061 * server.c (handle_v_cont): Call set_desired_inferior.
16062
16063 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16064
16065 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16066
16067 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16068
16069 * linux-low.c (linux_wait): Unblock async I/O.
16070 (linux_resume): Block and enable async I/O.
16071 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16072 * server.h (block_async_io, unblock_async_io): Add prototypes.
16073
16074 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16075
16076 * remote-utils.c (remote_open): Print a status notice after
16077 opening a TCP port.
16078 * server.c (attach_inferior): Print a status notice after
16079 attaching.
16080
16081 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16082
16083 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16084
16085 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16086
16087 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16088 error packet.
16089 * server.c, target.h: Update copyright years.
16090
16091 2004-02-25 Roland McGrath <roland@redhat.com>
16092
16093 * target.h (struct target_ops): New member `read_auxv'.
16094 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16095 * linux-low.c (linux_read_auxv): New function.
16096 (linux_target_ops): Initialize `read_auxv' member to that.
16097
16098 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16099
16100 Committed by Jim Blandy <jimb@redhat.com>.
16101
16102 * linux-s390-low.c (s390_num_regs): Update.
16103 (s390_regmap): Remove control registers. Use __s390x__ predefine
16104 instead of GPR_SIZE to distiguish s390 and s390x targets.
16105
16106 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16107
16108 * linux-low.c: Update copyright year.
16109 (check_removed_breakpoint): Clear pending_is_breakpoint.
16110 (linux_set_resume_request, linux_queue_one_thread)
16111 (resume_status_pending_p): New functions.
16112 (linux_continue_one_thread): Use process->resume.
16113 (linux_resume): Only resume threads if there are no pending events.
16114 * linux-low.h (struct process_info): Add resume request
16115 pointer.
16116
16117 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * regcache.c (new_register_cache): Clear the allocated register
16120 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16121
16122 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16123
16124 * linux-low.c (linux_resume): Take a struct thread_resume *
16125 argument.
16126 (linux_wait): Update call.
16127 (resume_ptr): New static variable.
16128 (linux_continue_one_thread): Renamed from
16129 linux_continue_one_process. Use resume_ptr.
16130 (linux_resume): Use linux_continue_one_thread.
16131 * server.c (handle_v_cont, handle_v_requests): New functions.
16132 (myresume): New function.
16133 (main): Handle 'v' case.
16134 * target.h (struct thread_resume): New type.
16135 (struct target_ops): Change argument of "resume" to struct
16136 thread_resume *.
16137 (myresume): Delete macro.
16138
16139 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16140
16141 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16142 (uninstall): Support DESTDIR.
16143
16144 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16145
16146 * configure.srv: Add xscale*linux copy of arm*linux entry.
16147
16148 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16149
16150 * linux-arm-low.c (arm_reinsert_addr): New function.
16151 (the_low_target): Add arm_reinsert_addr.
16152
16153 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16154
16155 * mem-break.c: Remove whitespace at end of file.
16156
16157 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16158
16159 * configure.in: Check whether we need to prototype strerror.
16160 * server.h: Optionally prototype strerror.
16161 * gdbreplay.c (perror_with_name): Use strerror.
16162 * linux-low.c (linux_attach_lwp): Use strerror.
16163 * utils.c (perror_with_name): Use strerror.
16164 * config.in, configure: Regenerated.
16165
16166 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16167
16168 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16169 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16170
16171 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16172
16173 * Makefile.in (SFILES): Update.
16174 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16175 low-sun3.c: Remove files.
16176
16177 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16178
16179 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16180 (linux_detach_one_process, linux_detach): New functions.
16181 (linux_target_ops): Add linux_detach.
16182 * server.c (main): Handle 'D' packet.
16183 * target.h (struct target_ops): Add "detach" member.
16184 (detach_inferior): Define.
16185
16186 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16187
16188 From Kelley Cook <kelleycook@wideopenwest.com>:
16189 * configure.srv: Accept i[34567]86 variants.
16190
16191 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16192
16193 * linux-low.c (linux_wait_for_event): Correct comment typos.
16194 (linux_resume_one_process): Call check_removed_breakpoint.
16195 (linux_send_signal): New function.
16196 (linux_target_ops): Add linux_send_signal.
16197 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16198 of kill.
16199 * target.h (struct target_ops): Add send_signal.
16200
16201 2003-05-29 Jim Blandy <jimb@redhat.com>
16202
16203 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16204 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16205 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16206 away part of the register's value.
16207
16208 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16209
16210 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16211 (linux_wait_for_event, linux_init_signals): Likewise.
16212
16213 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16214
16215 * configure.in: Check for stdlib.h.
16216 * configure: Regenerated.
16217 * config.in: Regenerated.
16218
16219 2003-01-04 Andreas Schwab <schwab@suse.de>
16220
16221 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16222
16223 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16224
16225 * Makefile.in: Remove obsolete code.
16226
16227 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16228
16229 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16230 defined(PT_FPR0_HI).
16231
16232 2002-11-17 Stuart Hughes <seh@zee2.com>
16233
16234 * linux-arm-low.c (arm_num_regs): Increase.
16235 (arm_regmap): Include status register.
16236
16237 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16238
16239 * linux-low.c (register_addr): Remove incorrect -1 check.
16240
16241 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16242
16243 * linux-low.c (linux_create_inferior): Call setpgid. Return
16244 the new PID.
16245 (unstopped_p, linux_signal_pid): Remove.
16246 (linux_target_ops): Remove linux_signal_pid.
16247 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16248 global instead of target method.
16249 * target.h (struct target_ops): Remove signal_pid. Update comment
16250 for create_inferior.
16251 * server.c (signal_pid): New variable.
16252 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16253 gdbserver. Set the child to be the foreground process group.
16254 (attach_inferior): Set signal_pid.
16255
16256 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16257
16258 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16259
16260 2002-08-20 Jim Blandy <jimb@redhat.com>
16261
16262 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16263 default for this.
16264
16265 2002-08-01 Andrew Cagney <cagney@redhat.com>
16266
16267 * Makefile.in: Make chill references obsolete.
16268
16269 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16270
16271 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16272 * configure: Regenerate.
16273 * config.in: Regenerate.
16274
16275 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16276
16277 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16278 (perror_with_name, remote_close, remote_open, expect, play): Static.
16279
16280 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16281
16282 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16283 byte offsets instead of an array of indexes.
16284 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16285
16286 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16287
16288 * regcache.c: Add comment.
16289
16290 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16291
16292 * thread-db.c: New file.
16293 * proc-service.c: New file.
16294 * acinclude.m4: New file.
16295 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16296 proc-service.o, and thread-db.o.
16297 (linux-low.o): Add USE_THREAD_DB.
16298 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16299 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16300 * aclocal.m4: Regenerated.
16301 * config.in: Regenerated.
16302 * configure: Regenerated.
16303 * configure.in: Check for proc_service.h, sys/procfs.h,
16304 thread_db.h, and linux/elf.h headrs.
16305 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16306 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16307 Check for -lthread_db and thread support.
16308 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16309 PowerPC, and SuperH.
16310 * i387-fp.c: Constify arguments.
16311 * i387-fp.h: Likewise.
16312 * inferiors.c: (struct thread_info): Renamed from
16313 `struct inferior_info'. Remove PID member. Use generic inferior
16314 list header. All uses updated.
16315 (inferiors, signal_pid): Removed.
16316 (all_threads): New variable.
16317 (get_thread): Define.
16318 (add_inferior_to_list): New function.
16319 (for_each_inferior): New function.
16320 (change_inferior_id): New function.
16321 (add_inferior): Removed.
16322 (remove_inferior): New function.
16323 (add_thread): New function.
16324 (free_one_thread): New function.
16325 (remove_thread): New function.
16326 (clear_inferiors): Use for_each_inferior and free_one_thread.
16327 (find_inferior): New function.
16328 (find_inferior_id): New function.
16329 (inferior_target_data): Update argument type.
16330 (set_inferior_target_data): Likewise.
16331 (inferior_regcache_data): Likewise.
16332 (set_inferior_regcache_data): Likewise.
16333 * linux-low.c (linux_bp_reinsert): Remove.
16334 (all_processes, stopping_threads, using_thrads)
16335 (struct pending_signals, debug_threads, pid_of): New.
16336 (inferior_pid): Replace with macro.
16337 (struct inferior_linux_data): Remove.
16338 (get_stop_pc, add_process): New functions.
16339 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16340 Use add_process and add_thread.
16341 (linux_attach_lwp): New function, based on old linux_attach. Use
16342 add_process and add_thread. Set stop_expected for new threads.
16343 (linux_attach): New function.
16344 (linux_kill_one_process): New function.
16345 (linux_kill): Kill all LWPs.
16346 (linux_thread_alive): Use find_inferior_id.
16347 (check_removed_breakpoints, status_pending_p): New functions.
16348 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16349 Update. Use WNOHANG. Wait for cloned processes also. Update process
16350 struct for the found process.
16351 (linux_wait_for_event): New function.
16352 (linux_wait): Use it. Support LWPs.
16353 (send_sigstop, wait_for_sigstop, stop_all_processes)
16354 (linux_resume_one_process, linux_continue_one_process): New functions.
16355 (linux_resume): Support LWPs.
16356 (REGISTER_RAW_SIZE): Remove.
16357 (fetch_register): Use register_size instead. Call supply_register.
16358 (usr_store_inferior_registers): Likewise. Call collect_register.
16359 Fix recursive case.
16360 (regsets_fetch_inferior_registers): Improve error message.
16361 (regsets_store_inferior_registers): Add debugging.
16362 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16363 (unstopped_p, linux_signal_pid): New functions.
16364 (linux_target_ops): Add linux_signal_pid.
16365 (linux_init_signals): New function.
16366 (initialize_low): Call it. Initialize using_threads.
16367 * regcache.c (inferior_regcache_data): Add valid
16368 flag.
16369 (get_regcache): Fetch registers lazily. Add fetch argument
16370 and update all callers.
16371 (regcache_invalidate_one, regcache_invalidate): New
16372 functions.
16373 (new_register_cache): Renamed from create_register_cache.
16374 Return the new regcache.
16375 (free_register_cache): Change argument to a void *.
16376 (registers_to_string, registers_from_string): Call get_regcache
16377 with fetch flag set.
16378 (register_data): Make static. Pass fetch flag to get_regcache.
16379 (supply_register): Call get_regcache with fetch flag clear.
16380 (collect_register): Call get_regcache with fetch flag set.
16381 (collect_register_as_string): New function.
16382 * regcache.h: Update.
16383 * remote-utils.c (putpkt): Flush after debug output and use
16384 stderr.
16385 Handle input interrupts while waiting for an ACK.
16386 (input_interrupt): Use signal_pid method.
16387 (getpkt): Flush after debug output and use stderr.
16388 (outreg): Use collect_register_as_string.
16389 (new_thread_notify, dead_thread_notify): New functions.
16390 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16391 and general_thread.
16392 (look_up_one_symbol): Flush after debug output.
16393 * server.c (step_thread, server_waiting): New variables.
16394 (start_inferior): Don't use signal_pid. Update call to mywait.
16395 (attach_inferior): Update call to mywait.
16396 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16397 (main): Don't fetch/store registers explicitly. Use
16398 set_desired_inferior. Support proposed ``Hs'' packet. Update
16399 calls to mywait.
16400 * server.h: Update.
16401 (struct inferior_list, struct_inferior_list_entry): New.
16402 * target.c (set_desired_inferior): New.
16403 (write_inferior_memory): Constify.
16404 (mywait): New function.
16405 * target.h: Update.
16406 (struct target_ops): New signal_pid method.
16407 (mywait): Removed macro, added prototype.
16408
16409 * linux-low.h (regset_func): Removed.
16410 (regset_fill_func, regset_store_func): New.
16411 (enum regset_type): New.
16412 (struct regset_info): Add type field. Use new operation types.
16413 (struct linux_target_ops): stop_pc renamed to get_pc.
16414 Add decr_pc_after_break and breakpoint_at.
16415 (get_process, get_thread_proess, get_process_thread)
16416 (strut process_info, all_processes, linux_attach_lwp)
16417 (thread_db_init): New.
16418
16419 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16420 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16421 (the_low_target): Add new members.
16422 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16423 (i386_store_fpxregset): Constify.
16424 (target_regsets): Add new kind identifier.
16425 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16426 (i386_set_pc): Add debugging.
16427 (i386_breakpoint_at): New function.
16428 (the_low_target): Add new members.
16429 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16430 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16431 (mips_breakpoint_at): New.
16432 (the_low_target): Add new members.
16433 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16434 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16435 (the_low_target): Add new members.
16436 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16437 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16438 (the_low_target): Add new members.
16439 * linux-x86-64-low.c (target_regsets): Add new kind
16440 identifier.
16441
16442 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16443
16444 From Martin Pool <mbp@samba.org>:
16445 * server.c (gdbserver_usage): New function.
16446 (main): Call it.
16447
16448 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16449
16450 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16451 stop_at -> stop_pc.
16452
16453 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16454
16455 * Makefile.in: Remove obsolete code.
16456
16457 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16458
16459 * linux-low.c (regsets_fetch_inferior_registers),
16460 (regsets_store_inferior_registers): Removed cast to int from
16461 ptrace() calls.
16462 * regcache.h: Added declaration of struct inferior_info.
16463
16464 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16465
16466 * inferiors.c (struct inferior_info): Add regcache_data.
16467 (add_inferior): Call create_register_cache.
16468 (clear_inferiors): Call free_register_cache.
16469 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16470 * regcache.c (struct inferior_regcache_data): New.
16471 (registers): Remove.
16472 (get_regcache): New function.
16473 (create_register_cache, free_register_cache): New functions.
16474 (set_register_cache): Don't initialize the register cache here.
16475 (registers_to_string, registers_from_string, register_data): Call
16476 get_regcache.
16477 * regcache.h: Add prototypes.
16478 * server.h: Likewise.
16479
16480 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16481
16482 * mem-break.c: New file.
16483 * mem-break.h: New file.
16484 * Makefile.in: Add mem-break.o rule; update server.h
16485 dependencies.
16486 * inferiors.c (struct inferior_info): Add target_data
16487 member.
16488 (clear_inferiors): Free target_data member if set.
16489 (inferior_target_data, set_inferior_target_data): New functions.
16490 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16491 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16492 * linux-low.c (linux_bp_reinsert): New variable.
16493 (struct inferior_linux_data): New.
16494 (linux_create_inferior): Use set_inferior_target_data.
16495 (linux_attach): Likewise. Call add_inferior.
16496 (linux_wait_for_one_inferior): New function.
16497 (linux_wait): Call it.
16498 (linux_write_memory): Add const.
16499 (initialize_low): Call set_breakpoint_data.
16500 * linux-low.h (struct linux_target_ops): Add breakpoint
16501 handling members.
16502 * server.c (attach_inferior): Remove extra add_inferior
16503 call.
16504 * server.h: Include mem-break.h. Update inferior.c
16505 prototypes.
16506 * target.c (read_inferior_memory)
16507 (write_inferior_memory): New functions.
16508 * target.h (read_inferior_memory)
16509 (write_inferior_memory): Change macros to prototypes.
16510 (struct target_ops): Update comments. Add const to write_memory
16511 definition.
16512
16513 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16514
16515 * linux-low.c (usr_store_inferior_registers): Support
16516 registers which are allowed to fail to store.
16517 * linux-low.h (linux_target_ops): Likewise.
16518 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16519 (ppc_cannot_store_register): FPSCR may not be storable.
16520
16521 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16522
16523 * server.h: Include <string.h> if HAVE_STRING_H.
16524 * ChangeLog: Correct paths in last ChangeLog entry.
16525
16526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16527
16528 * linux-low.h: Remove obsolete prototypes.
16529 (struct linux_target_ops): New.
16530 (extern the_low_target): New.
16531 * linux-low.c (num_regs, regmap): Remove declarations.
16532 (register_addr): Use the_low_target explicitly.
16533 (fetch_register): Likewise.
16534 (usr_fetch_inferior_registers): Likewise.
16535 (usr_store_inferior_registers): Likewise.
16536 * linux-arm-low.c (num_regs): Remove.
16537 (arm_num_regs): Define.
16538 (arm_regmap): Renamed from regmap, made static.
16539 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16540 made static.
16541 (arm_cannot_store_register): Renamed from cannot_store_register,
16542 made static.
16543 (the_low_target): New.
16544 * linux-i386-low.c (num_regs): Remove.
16545 (i386_num_regs): Define.
16546 (i386_regmap): Renamed from regmap, made static.
16547 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16548 made static.
16549 (i386_cannot_store_register): Renamed from cannot_store_register,
16550 made static.
16551 (the_low_target): New.
16552 * linux-ia64-low.c (num_regs): Remove.
16553 (ia64_num_regs): Define.
16554 (ia64_regmap): Renamed from regmap, made static.
16555 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16556 made static.
16557 (ia64_cannot_store_register): Renamed from cannot_store_register,
16558 made static.
16559 (the_low_target): New.
16560 * linux-m68k-low.c (num_regs): Remove.
16561 (m68k_num_regs): Define.
16562 (m68k_regmap): Renamed from regmap, made static.
16563 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16564 made static.
16565 (m68k_cannot_store_register): Renamed from cannot_store_register,
16566 made static.
16567 (the_low_target): New.
16568 * linux-mips-low.c (num_regs): Remove.
16569 (mips_num_regs): Define.
16570 (mips_regmap): Renamed from regmap, made static.
16571 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16572 made static.
16573 (mips_cannot_store_register): Renamed from cannot_store_register,
16574 made static.
16575 (the_low_target): New.
16576 * linux-ppc-low.c (num_regs): Remove.
16577 (ppc_num_regs): Define.
16578 (ppc_regmap): Renamed from regmap, made static.
16579 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16580 made static.
16581 (ppc_cannot_store_register): Renamed from cannot_store_register,
16582 made static.
16583 (the_low_target): New.
16584 * linux-s390-low.c (num_regs): Remove.
16585 (s390_num_regs): Define.
16586 (s390_regmap): Renamed from regmap, made static.
16587 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16588 made static.
16589 (s390_cannot_store_register): Renamed from cannot_store_register,
16590 made static.
16591 (the_low_target): New.
16592 * linux-sh-low.c (num_regs): Remove.
16593 (sh_num_regs): Define.
16594 (sh_regmap): Renamed from regmap, made static.
16595 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16596 made static.
16597 (sh_cannot_store_register): Renamed from cannot_store_register,
16598 made static.
16599 (the_low_target): New.
16600 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16601 (the_low_target): New.
16602
16603 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16604
16605 * Makefile.in: Add stamp-h target.
16606 * configure.in: Create stamp-h.
16607 * configure: Regenerated.
16608
16609 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16610
16611 * inferiors.c: New file.
16612 * target.c: New file.
16613 * target.h: New file.
16614 * Makefile.in: Add target.o and inferiors.o. Update
16615 dependencies.
16616 * linux-low.c (inferior_pid): New static variable,
16617 moved from server.c.
16618 (linux_create_inferior): Renamed from create_inferior.
16619 Call add_inferior. Return 0 on success instead of a PID.
16620 (linux_attach): Renamed from myattach.
16621 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16622 (linux_thread_alive): Renamed from mythread_alive.
16623 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16624 child dies.
16625 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16626 (regsets_store_inferior_registers): Correct error message.
16627 Add missing ``return 0''.
16628 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16629 (linux_store_registers): Renamed from store_inferior_registers.
16630 (linux_read_memory): Renamed from read_inferior_memory.
16631 (linux_write_memory): Renamed from write_inferior_memory.
16632 (linux_target_ops): New structure.
16633 (initialize_low): Call set_target_ops ().
16634 * remote-utils.c (unhexify): New function.
16635 (hexify): New function.
16636 (input_interrupt): Send signals to ``signal_pid''.
16637 * server.c (inferior_pid): Remove.
16638 (start_inferior): Update create_inferior call.
16639 (attach_inferior): Call add_inferior.
16640 (handle_query): New function.
16641 (main): Call handle_query for `q' packets.
16642 * server.h: Include "target.h". Remove obsolete prototypes.
16643 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16644
16645 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16646
16647 * Makefile.in: Add WARN_CFLAGS. Update configury
16648 dependencies.
16649 * configure.in: Check for <string.h>
16650 * configure: Regenerate.
16651 * config.in: Regenerate.
16652 * gdbreplay.c: Include needed system headers.
16653 (remote_open): Remove strchr prototype.
16654 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16655 * regcache.c (supply_register): Change buf argument to const void *.
16656 (supply_register_by_name): Likewise.
16657 (collect_register): Change buf argument to void *.
16658 (collect_register_by_name): Likewise.
16659 * regcache.h: Add missing prototypes.
16660 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16661 * server.c (handle_query): New function.
16662 (attached): New static variable, moved out of main.
16663 (main): Quiet longjmp clobber warnings.
16664 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16665 * utils.c (error): Remove NORETURN.
16666 (fatal): Likewise.