Remove ptid_match
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-07-03 Tom Tromey <tom@tromey.com>
2
3 * server.c: Update.
4
5 2018-07-03 Tom Tromey <tom@tromey.com>
6
7 * linux-low.c: Update.
8
9 2018-07-03 Tom Tromey <tom@tromey.com>
10
11 * target.c: Update.
12
13 2018-07-03 Tom Tromey <tom@tromey.com>
14
15 * linux-low.c: Update.
16 * linux-mips-low.c: Update.
17 * lynx-low.c: Update.
18 * nto-low.c: Update.
19 * remote-utils.c: Update.
20 * server.c: Update.
21 * spu-low.c: Update.
22 * target.c: Update.
23 * thread-db.c: Update.
24
25 2018-07-03 Tom Tromey <tom@tromey.com>
26
27 * linux-low.c: Update.
28 * linux-mips-low.c: Update.
29 * lynx-low.c: Update.
30 * mem-break.c: Update.
31 * nto-low.c: Update.
32 * remote-utils.c: Update.
33 * server.c: Update.
34 * spu-low.c: Update.
35 * target.c: Update.
36 * tracepoint.c: Update.
37
38 2018-07-03 Tom Tromey <tom@tromey.com>
39
40 * linux-low.c: Update.
41 * linux-ppc-low.c: Update.
42 * linux-x86-low.c: Update.
43 * proc-service.c: Update.
44 * server.c: Update.
45 * spu-low.c: Update.
46 * thread-db.c: Update.
47 * win32-low.c: Update.
48
49 2018-07-03 Tom Tromey <tom@tromey.com>
50
51 * linux-low.c: Update.
52 * lynx-low.c: Update.
53 * nto-low.c: Update.
54 * remote-utils.c: Update.
55 * spu-low.c: Update.
56 * thread-db.c: Update.
57 * win32-low.c: Update.
58
59 2018-06-29 Joel Brobecker <brobecker@adacore.com>
60
61 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
62 parameter in call to 'amd64_create_target_description'.
63
64 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
65
66 * x86-tdesc.h: Remove executable permission flag.
67
68 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
69
70 * configure.ac: Remove AC_PREREQ, add missing quoting.
71 * configure: Re-generate.
72 * config.in: Re-generate.
73 * aclocal.m4: Re-generate.
74
75 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
76
77 * tracepoint.h (current_traceframe): Remove declaration.
78
79 2018-06-18 Alan Hayward <alan.hayward@arm.com>
80
81 * linux-aarch64-low.c (is_sve_tdesc): New function.
82 (aarch64_sve_regs_copy_to_regcache): Likewise.
83 (aarch64_sve_regs_copy_from_regcache): Likewise.
84 (aarch64_regs_info): Add SVE checks.
85 (initialize_low_arch): Initialize SVE.
86
87 2018-06-18 Alan Hayward <alan.hayward@arm.com>
88
89 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
90
91 2018-06-11 Alan Hayward <alan.hayward@arm.com>
92
93 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
94 (initialize_low_tracepoint): Likewise
95 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
96 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
97 param.
98 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
99 checks.
100 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
101
102 2018-06-11 Alan Hayward <alan.hayward@arm.com>
103
104 * server.h (PBUFSIZ): Increase size
105
106 2018-06-11 Alan Hayward <alan.hayward@arm.com>
107
108 * regcache.c (regcache::raw_compare): New function.
109 * regcache.h (regcache::raw_compare): New declaration.
110
111 2018-06-11 Alan Hayward <alan.hayward@arm.com>
112
113 * regcache.c (new_register_cache): Use new.
114 (free_register_cache): Use delete.
115 (register_data): Use const.
116 (supply_register): Move body inside regcache.
117 (regcache::raw_supply): New override function.
118 (collect_register): Move body inside regcache.
119 (regcache::raw_collect): New override function.
120 (regcache::get_register_status): New override function.
121 * regcache.h (struct regcache): Inherit from reg_buffer_common.
122
123 2018-06-09 Tom Tromey <tom@tromey.com>
124
125 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
126 declare queue.
127 (event_queue): Use std::queue.
128 (gdb_event_xfree): Remove.
129 (initialize_event_loop, process_event, wait_for_event): Update.
130
131 2018-06-08 Stan Cox <scox@redhat.com>
132
133 * win32-low.c (win32_create_inferior): last_ptid and last_status
134 moved to client_state.
135
136 2018-06-08 Pedro Alves <palves@redhat.com>
137
138 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
139 common/common-exceptions.o, common/common-utils.o,
140 common/errors.o, common/print-utils.o and utils.o.
141 * gdbreplay.c: Include "common-defs.h" instead of the two
142 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
143 string.h or alloca.h.
144 (perror_with_name): Delete.
145 (remote_open): Use xstrdup instead of strdup.
146 (main): Rename to ...
147 (captured_main): ... this.
148 (main): New.
149
150 2018-06-08 Tom Tromey <tom@tromey.com>
151
152 * linux-low.c (linux_low_read_btrace): Update.
153
154 2018-06-04 Stan Cox <scox@redhat.com>
155
156 * server.h (struct client_state): New.
157 * server.c (cont_thread, general_thread, multi_process)
158 (report_fork_events, report_vfork_events, report_exec_events)
159 (report_thread_events, swbreak_feature, hwbreak_feature)
160 (vCont_supported, disable_randomization, pass_signals)
161 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
162 Moved to client_state.
163 * remote-utils.c (remote_debug, noack_mode)
164 (transport_is_reliable): Moved to client_state.
165 * tracepoint.c (current_traceframe): Moved to client_state.
166
167 Update all callers.
168 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
169 linux-low.c, remote-utils.h, target.c: Use client_state.
170
171 2018-05-31 Alan Hayward <alan.hayward@arm.com>
172
173 * configure.srv: Add new c/h file.
174
175 2018-05-31 Alan Hayward <alan.hayward@arm.com>
176
177 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
178 null VQ.
179
180 2018-05-25 Maciej W. Rozycki <macro@mips.com>
181
182 * gdb.arch/mips-fpregset-core.exp: New test.
183 * gdb.arch/mips-fpregset-core.c: New test source.
184
185 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
186
187 PR server/23198
188 * hostio.c (require_int): Do not report overflow for integers
189 between 0xfffffff and 0x7fffffff.
190
191 2018-05-22 Maciej W. Rozycki <macro@mips.com>
192
193 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
194 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
195 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
196 functions.
197 (the_low_target): Wire them.
198
199 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
200
201 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
202 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
203 mode. Call collect_register_by_name with vscr using
204 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
205 (ppc_store_vrregset): Add and set vscr_offset variable as in
206 ppc_fill_vrregset. Call supply_register_by_name with vscr using
207 vscr_offset.
208
209 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
210
211 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
212 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
213 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
214
215 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
216
217 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
218 (ppc_store_vsxregset): Likewise.
219 (ppc_fill_vrregset): Likewise.
220 (ppc_store_vrregset): Likewise.
221 (ppc_fill_evrregset): Likewise.
222 (ppc_store_evrregset): Likewise.
223 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
224 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
225 needed.
226
227 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
228
229 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
230 wordsize of the inferior. Call ppc_linux_target_wordsize.
231
232 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
233
234 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
235 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
236 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
237 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
238 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
239 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
240 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
241 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
242 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
243 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
244 (tdesc_powerpc_e500l): Remove.
245 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
246 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
247 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
248 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
249 linux-ppc-tdesc.h.
250 (ppc_arch_setup): Remove target description matching code. Fill a
251 ppc_linux_features struct and call ppc_linux_match_description
252 with it.
253
254 2018-05-22 Maciej W. Rozycki <macro@mips.com>
255
256 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
257 width of the requested register exceeds the width of the
258 `ptrace' data type.
259 (mips_cannot_store_register): Likewise.
260
261 2018-05-21 Maciej W. Rozycki <macro@mips.com>
262
263 * linux-mips-low.c (mips_fetch_register): New function. Update
264 preceding comment.
265 (mips_store_gregset): Supply 0 rather than $restart for $zero.
266 (the_low_target): Wire `mips_fetch_register'.
267
268 2018-05-10 Joel Brobecker <brobecker@adacore.com>
269
270 * lynx-i386-low.c (LYNXOS_178): New macro.
271 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
272 the layout on LynxOS-178.
273 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
274 handle floating point registers that are not supported by
275 LynxOS-178.
276
277 2018-05-10 Tom Tromey <tom@tromey.com>
278
279 * configure: Rebuild.
280
281 2018-05-10 Joel Brobecker <brobecker@adacore.com>
282
283 PR server/23158:
284 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
285 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
286 Use it to set the expedite_regs field in the given tdesc.
287 * x86-tdesc.h: New file.
288 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
289 Adjust following the addition of the new expedite_regs parameter
290 to init_target_desc.
291 * linux-tic6x-low.c (tic6x_read_description): Likewise.
292 * linux-x86-tdesc.c: #include "x86-tdesc.h".
293 (i386_linux_read_description, amd64_linux_read_description):
294 Adjust following the addition of the new expedite_regs parameter
295 to init_target_desc.
296 * lynx-i386-low.c: #include "x86-tdesc.h".
297 (lynx_i386_arch_setup): Adjust following the addition of the new
298 expedite_regs parameter to init_target_desc.
299 * nto-x86-low.c: #include "x86-tdesc.h".
300 (nto_x86_arch_setup): Adjust following the addition of the new
301 expedite_regs parameter to init_target_desc.
302 * win32-i386-low.c: #include "x86-tdesc.h".
303 (i386_arch_setup): Adjust following the addition of the new
304 expedite_regs parameter to init_target_desc.
305
306 2018-05-10 Joel Brobecker <brobecker@adacore.com>
307
308 PR server/23158:
309 * win32-low.c (win32_create_inferior): Add call to my_wait
310 setting last_status global.
311
312 2018-05-10 Joel Brobecker <brobecker@adacore.com>
313
314 PR server/23158:
315 * win32-low.c (create_process): Only call gdb_tilde_expand if
316 inferior_cwd is not NULL.
317
318 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
319
320 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
321 registers to the cache if their values have changed.
322 (i387_xsave_to_cache): Provide default values for x87 control
323 registers when these features are available, but disabled.
324 * regcache.c (supply_register_by_name_zeroed): New function.
325 * regcache.h (supply_register_by_name_zeroed): Declare new
326 function.
327
328 2018-05-07 Tom Tromey <tom@tromey.com>
329
330 * configure: Rebuild.
331
332 2018-05-04 Tom Tromey <tom@tromey.com>
333
334 * configure: Rebuild.
335
336 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
337 Pedro Alves <palves@redhat.com>
338
339 * linux-aarch64-low.c (aarch64_stopped_data_address):
340 Likewise.
341
342 2018-04-27 Tom Tromey <tom@tromey.com>
343
344 * configure: Rebuild.
345
346 2018-04-23 Tom Tromey <tom@tromey.com>
347
348 * configure: Rebuild.
349
350 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
351
352 * Makefile.in (depcomp): Add "..".
353 (all_deps_files): New and use it.
354
355 2018-04-18 Alan Hayward <alan.hayward@arm.com>
356
357 * configure.srv (aarch64*-*-linux*): Don't include xml.
358 (i[34567]86-*-cygwin*): Likewise.
359 (i[34567]86-*-linux*): Likewise.
360 (i[34567]86-*-lynxos*): Likewise.
361 (i[34567]86-*-mingw32ce*): Likewise.
362 (i[34567]86-*-mingw*): Likewise.
363 (i[34567]86-*-nto*): Likewise.
364 (tic6x-*-uclinux): Likewise.
365 (x86_64-*-linux*): Likewise.
366 (x86_64-*-mingw*): Likewise.
367 (x86_64-*-cygwin*): Likewise.
368
369 2018-04-18 Alan Hayward <alan.hayward@arm.com>
370
371 * tdesc.c: Remove xml parameter.
372
373 2018-04-18 Alan Hayward <alan.hayward@arm.com>
374
375 * server.c (get_features_xml): Remove cast.
376 * tdesc.c (void target_desc::accept): Fill in function.
377 (tdesc_get_features_xml): Remove old xml creation.
378 (print_xml_feature::visit_pre): Add xml vistor.
379 * tdesc.h (struct target_desc): Make xmltarget mutable.
380 (tdesc_get_features_xml): Remove declaration.
381
382 2018-04-18 Alan Hayward <alan.hayward@arm.com>
383
384 * tdesc.c (tdesc_architecture_name): Add new function.
385 (tdesc_osabi_name): Likewise.
386 (tdesc_get_features_xml): Use new functions.
387
388 2018-04-18 Alan Hayward <alan.hayward@arm.com>
389
390 * tdesc.c (tdesc_create_flags): Remove.
391 (tdesc_add_flag): Likewise.
392 (tdesc_named_type): Likewise.
393 (tdesc_create_union): Likewise.
394 (tdesc_create_struct): Likewise.
395 (tdesc_create_vector): Likewise.
396 (tdesc_add_bitfield): Likewise.
397 (tdesc_add_field): Likewise.
398 (tdesc_set_struct_size): Likewise.
399
400 2018-04-18 Alan Hayward <alan.hayward@arm.com>
401
402 * tdesc.c (~target_desc): Remove implictly deleted items.
403 (init_target_desc): Iterate all features.
404 (tdesc_get_features_xml): Use vector.
405 (tdesc_create_feature): Create feature.
406 * tdesc.h (tdesc_feature) Remove
407 (target_desc): Add features.
408
409 2018-04-18 Alan Hayward <alan.hayward@arm.com>
410
411 * Makefile.in: Add common/tdesc.c
412 * tdesc.c (init_target_desc): init all reg_defs from register
413 vector.
414 (tdesc_create_reg): Create tdesc_reg.
415 * tdesc.h (tdesc_feature): Add register vector.
416
417 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
418
419 * tdesc.h (struct target_desc) <features>: Change type to
420 std::vector<std::string>.
421 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
422 changes.
423 (tdesc_get_features_xml): Likewise.
424 (tdesc_create_feature): Likewise.
425
426 2018-03-26 Alan Hayward <alan.hayward@arm.com>
427
428 * regcache.c (find_register_by_number): Return a ref.
429 (find_regno): Use references.
430 (register_size): Likewise.
431 (register_data): Likewise.
432 * tdesc.c (target_desc::~target_desc): Remove free calls.
433 (target_desc::operator==): Use std::vector compare.
434 (init_target_desc): Use reference.
435 (tdesc_create_reg): Use reg constructors.
436 * tdesc.h (struct target_desc): Replace pointer with object.
437
438 2018-03-23 Alan Hayward <alan.hayward@arm.com>
439
440 * regcache.c (find_register_by_number): Make static.
441 (find_regno): Use find_register_by_number
442 * regcache.h (struct reg): Remove declaration.
443
444 2018-03-23 Alan Hayward <alan.hayward@arm.com>
445
446 * tdesc.c (target_desc::~target_desc): Move to here.
447 (target_desc::operator==): Likewise.
448 * tdesc.h (target_desc::~target_desc): Move from here.
449 (target_desc::operator==): Likewise.
450
451 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
452
453 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
454
455 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
456
457 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
458 S390_TDESC_GS.
459 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
460 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
461 and init_registers_s390_gs_linux64.
462
463 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
464
465 * linux-s390-low.c (s390_fill_gs): Remove function.
466 (s390_fill_gsbc): Remove function.
467 (s390_regsets): Set fill functions for the guarded storage regsets
468 to NULL.
469
470 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
471
472 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
473 the word size. Add comment.
474 (s390_get_wordsize): New function.
475 (s390_arch_setup): No longer select a temporary tdesc to fetch the
476 pswm with it. Instead, use s390_get_wordsize to determine the
477 word size first and derive the correct tdesc from that directly.
478
479 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
480
481 * Makefile.in: Include silent-rules.mk.
482 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
483 (COMPILE): Add ECHO_CXX.
484 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
485 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
486 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
487 (version-generated.c): Add ECHO_GEN.
488 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
489 (IPAGENT_COMPILE): Add ECHO_CXX.
490 (%-generated.c): Add ECHO_REGDAT.
491
492 2018-03-14 Tom Tromey <tom@tromey.com>
493
494 PR cli/14977:
495 * ax.c (ax_printf): Special case for NULL.
496
497 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
498
499 * linux-low.c (linux_qxfer_libraries_svr4): Use
500 xml_escape_text_append.
501
502 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
505
506 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * server.c (handle_general_set): Remove unnecessary xstrdup.
509
510 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
511
512 * server.c (parse_debug_format_options): Adjust to
513 delim_string_to_char_ptr_vec changes.
514 * thread-db.c (thread_db_load_search): Adjust to
515 dirnames_to_char_ptr_vec changes.
516
517 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
518
519 * target.h (target_enable_btrace, target_disable_btrace)
520 (target_read_btrace, target_read_btrace_conf): Turn macro into
521 inline function. Throw error if target method is not defined.
522 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
523 check for btrace target method. Be prepared to handle exceptions
524 from btrace target methods.
525
526 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
527
528 * server.c (captured_main): Change order of error message printed
529 when the current working directory cannot be found.
530
531 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
532
533 * server.c: Include "filenames.h" and "pathstuff.h".
534 (program_name): Delete variable.
535 (program_path): New anonymous class.
536 (get_exec_wrapper): Use "program_path" instead of
537 "program_name".
538 (handle_v_run): Likewise.
539 (captured_main): Likewise.
540 (process_serial_event): Likewise.
541
542 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
543
544 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
545 (OBJS): Add "pathstuff.o".
546 * server.c (current_directory): New global variable.
547 (captured_main): Initialize "current_directory".
548
549 2018-02-26 Alan Hayward <alan.hayward@arm.com>
550
551 * tdesc.c: Use common/tdesc.h.
552 * tdesc.h: Likewise.
553
554 2018-02-20 Alan Hayward <alan.hayward@arm.com>
555 Simon Marchi <simon.marchi@ericsson.com>
556
557 * Makefile.in: Switch order of make rules.
558
559 2018-02-19 Alan Hayward <alan.hayward@arm.com>
560
561 * Makefile.in: Add common directory in build.
562 * configure.ac: Add common reference.
563 * configure: Regenerate.
564
565 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
566
567 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
568 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
569 * spu-low.c (spu_target_ops): Likewise.
570 * win32-low.c (win32_target_ops): Likewise.
571 * server.c (supported_btrace_packets): Report packets unconditionally.
572 * target.h (target_ops) <supports_btrace>: Remove.
573 (target_supports_btrace): Remove.
574
575 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
576
577 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
578 (handle_btrace_disable): Change return type to void. Use exceptions
579 to report errors.
580 (handle_btrace_general_set): Catch exception and copy message to
581 return message.
582
583 2018-02-08 Tom Tromey <tom@tromey.com>
584
585 * linux-low.c (install_software_single_step_breakpoints): Use
586 make_scoped_restore.
587 * inferiors.c (make_cleanup_restore_current_thread): Remove.
588 (do_restore_current_thread_cleanup): Remove.
589 * gdbthread.h (make_cleanup_restore_current_thread): Don't
590 declare.
591
592 2018-02-08 Tom Tromey <tom@tromey.com>
593
594 * mem-break.c (set_raw_breakpoint_at): Use
595 gdb::unique_xmalloc_ptr.
596
597 2018-01-30 Pedro Alves <palves@redhat.com>
598
599 PR gdb/13211
600 * target.c (target_terminal::terminal_state): Rename to ...
601 (target_terminal::m_terminal_state): ... this.
602
603 2018-01-19 James Clarke <jrtc27@jrtc27.com>
604
605 * linux-low.c (handle_extended_wait): Surround call to
606 thread_db_notice_clone with #ifdef USE_THREAD_DB.
607
608 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
609
610 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
611 linux_ptrace_attach_fail_reason_string now returning an
612 std::string.
613 (linux_attach): Likewise.
614 * thread-db.c (attach_thread): Likewise.
615
616 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
617
618 PR gdb/21559
619 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
620 checking for fs_base/gs_base fields in struct user_regs_struct.
621 * configure: Regenerate.
622
623 2018-01-16 Yao Qi <yao.qi@linaro.org>
624
625 PR gdb/18749
626 * linux-low.c (fetch_register): Call supply_register instead of
627 error.
628
629 2018-01-08 Yao Qi <yao.qi@linaro.org>
630 Simon Marchi <simon.marchi@ericsson.com>
631
632 * Makefile.in (OBS): Remove selftest.o.
633 * configure.ac: Set srv_selftest_objs if $development is true.
634 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
635 * configure: Re-generated.
636 * server.c (captured_main): Wrap variable selftest_filter with
637 GDB_SELF_TEST.
638
639 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * server.c (parse_debug_format_options): Return std::string.
642 (handle_monitor_command, captured_main): Adjust.
643
644 2018-01-05 Pedro Alves <palves@redhat.com>
645
646 PR gdb/18653
647 * server.c (captured_main): Pass quiet=false to
648 save_original_signals_state.
649
650 2018-01-01 Joel Brobecker <brobecker@adacore.com>
651
652 * gdbreplay.c (gdbreplay_version): Update copyright year in
653 version message.
654 * server.c (gdbserver_version): Likewise.
655
656 2017-12-08 Tom Tromey <tom@tromey.com>
657
658 * ax.c (ax_printf): Update.
659
660 2017-12-07 Yao Qi <yao.qi@linaro.org>
661
662 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
663 aarch64_linux_read_description.
664 * linux-amd64-ipa.c (idx2mask): New array.
665 (get_ipa_tdesc): Move idx2mask out.
666 (initialize_low_tracepoint): Initialize target descriptions.
667 * linux-i386-ipa.c (idx2mask): New array.
668 (get_ipa_tdesc): Move idx2mask out.
669 (initialize_low_tracepoint): Initialize target descriptions.
670
671 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
672
673 * tdesc.c (struct tdesc_type): Change return type.
674 (tdesc_add_flag): Change parameter type.
675 (tdesc_add_bitfield): Likewise.
676 (tdesc_add_field): Likewise.
677 (tdesc_set_struct_size): Likewise.
678
679 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
680
681 * regcache.c (registers_to_string): Remove unused variable.
682
683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * inferiors.c (for_each_inferior_with_data): Remove.
686 * inferiors.h (for_each_inferior_with_data): Remove.
687 * server.c (handle_qxfer_threads_worker): Change parameter type.
688 (handle_qxfer_threads_proper): Use for_each_thread.
689
690 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
691
692 * inferiors.c (for_each_inferior): Remove.
693 (clear_inferiors): Use for_each_thread.
694 * inferiors.h (for_each_inferior): Remove.
695 * linux-low.c (linux_wait_for_event_filtered): Use
696 for_each_thread.
697 (linux_stabilize_threads): Likewise.
698 * regcache.c (regcache_release): Likewise.
699 * server.c (gdb_wants_all_threads_stopped): Likewise.
700 (clear_pending_status_callback): Remove.
701 (handle_status): Use for_each_thread.
702 (captured_main): Likewise.
703 * win32-low.c (child_init_thread_list): Likewise.
704 (win32_clear_inferiors): Likewise.
705 (fake_breakpoint_event): Likewise.
706
707 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * inferiors.h (find_inferior): Remove.
710 * inferiors.c (find_inferior): Remove.
711
712 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
713
714 * linux-low.c (resume_status_pending_p): Update comment.
715 (need_step_over_p): Update comment.
716
717 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
718
719 * linux-low.c (proceed_one_lwp): Return void, change parameter
720 type.
721 (unsuspend_and_proceed_one_lwp): Likewise.
722 (proceed_all_lwps): Use for_each_thread.
723 (unstop_all_lwps): Likewise.
724
725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
726
727 * linux-low.c (linux_resume_one_thread): Return void, take
728 parameter directly.
729 (linux_resume): Use for_each_thread.
730
731 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
732
733 * linux-low.c (send_sigstop_callback): Return void, change
734 parameter type. Rename to...
735 (send_sigstop): ... this.
736 (suspend_and_send_sigstop_callback): Return void, change parameter
737 type. Rename to...
738 (suspend_and_send_sigstop): ... this.
739 (stop_all_lwps): Use for_each_thread.
740
741 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
742
743 * linux-low.c (lwp_running): Return bool, remove unused
744 argument.
745 (linux_stabilize_threads): Use find_thread.
746
747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * linux-low.c (select_singlestep_lwp_callback): Remove.
750 (count_events_callback): Remove.
751 (select_event_lwp_callback): Remove.
752 (select_event_lwp): Use find_thread/for_each_thread.
753
754 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * linux-low.c (not_stopped_callback): Return bool, take filter
757 argument directly.
758 (linux_wait_for_event_filtered): Use find_thread.
759 (linux_wait_1): Likewise.
760
761 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
762
763 * linux-low.c (same_lwp): Remove.
764 (find_lwp_pid): Use find_thread.
765
766 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
767
768 * linux-low.c (delete_lwp_callback): Remove.
769 (linux_mourn): Use for_each_thread.
770
771 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
772
773 * linux-low.c (linux_detach_lwp_callback): Return void, remove
774 args parameter, don't check for pid.
775 (linux_detach): Use for_each_thread.
776
777 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
778
779 * linux-low.c (struct counter): Remove.
780 (second_thread_of_pid_p): Remove.
781 (last_thread_of_process_p): Use find_thread.
782
783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
784
785 * inferiors.c (find_inferior_in_random): Remove.
786 * inferiors.h (find_inferior_in_random): Remove.
787 * linux-low.c (status_pending_p_callback): Return bool, accept
788 parameter ptid directly.
789 (linux_wait_for_event_filtered): Use find_thread_in_random.
790 (linux_wait_1): Likewise.
791
792 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
793
794 * inferiors.c (find_inferior_id): Remove.
795 (find_thread_ptid): Move implemention from find_inferior_id to
796 here.
797 * inferiors.h (find_inferior_id): Remove.
798 * server.c (handle_status): Use find_thread_ptid.
799 (process_serial_event): Likewise.
800 * thread-db.c (find_one_thread): Likewise.
801 (thread_db_thread_handle): Likewise.
802 * win32-low.c (thread_rec): Likewise.
803 (child_delete_thread): Likewise.
804 (win32_thread_alive): Likewise.
805 (get_child_debug_event): Likewise.
806
807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
808
809 * linux-mips-low.c (update_watch_registers_callback): Return
810 void, remove pid_p parameter, don't check for pid.
811 (mips_insert_point, mips_remove_point): Use for_each_thread.
812
813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
814
815 * lynx.low (lynx_delete_thread_callback): Remove.
816 (lynx_mourn): Use for_each_thread.
817
818 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
819
820 * regcache.c (regcache_invalidate_one): Remove.
821 (regcache_invalidate_pid): use for_each_thread.
822
823 2017-11-26 Tom Tromey <tom@tromey.com>
824
825 * linux-low.c (linux_create_inferior): Update.
826
827 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
828
829 * spu-low.c (spu_create_inferior): Fix typo in argument name.
830
831 2017-11-24 Alan Hayward <alan.hayward@arm.com>
832
833 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
834 * linux-aarch64-low.c (initialize_low_arch): Call init func.
835 * linux-aarch64-tdesc-selftest.c: New file.
836 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
837
838 2017-11-24 Alan Hayward <alan.hayward@arm.com>
839
840 * configure.srv: Add new file.
841 * linux-aarch64-low.c (initialize_low_arch): Call init func.
842 * linux-aarch64-tdesc-selftest.c: New file.
843 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
844
845 2017-11-24 Alan Hayward <alan.hayward@arm.com>
846
847 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
848 * linux-aarch64-low.c (initialize_low_arch): Remove init.
849 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
850
851 2017-11-24 Alan Hayward <alan.hayward@arm.com>
852
853 * configure.srv: Add new files.
854 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
855 aarch64_linux_read_description.
856 * linux-aarch64-low.c (aarch64_linux_read_description):
857 Merge with aarch64_arch_setup.
858 (aarch64_arch_setup): Call aarch64_linux_read_description.
859 * linux-aarch64-tdesc.c: New file.
860 * linux-aarch64-tdesc.h: New file.
861
862 2017-11-24 Yao Qi <yao.qi@linaro.org>
863
864 * configure.srv: Set $srv_regobj for tic6x-linux.
865 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
866 (tic6x_read_description): Move some code to tic6x_arch_setup.
867 (tic6x_tdesc_test): New function.
868 (initialize_low_arch): Call selftests::register_test.
869
870 2017-11-22 Yao Qi <yao.qi@linaro.org>
871
872 * remote-utils.c (prepare_resume_reply): Use memcpy.
873
874 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
875
876 * linux-low.c (kill_one_lwp_callback): Return void, take
877 argument directly, don't filter on pid.
878 (linux_kill): Use for_each_thread.
879
880 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
881
882 * linux-low.c (need_step_over_p): Return bool, remove dummy
883 argument.
884 (linux_resume, proceed_all_lwps): Use find_thread.
885
886 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
887
888 * linux-low.c (resume_status_pending_p): Return bool, remove
889 flag_p argument.
890 (linux_resume): Use find_thread.
891
892 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
893
894 * linux-low.c (struct thread_resume_array): Remove.
895 (linux_set_resume_request): Return void, take arguments
896 directly.
897 (linux_resume): Use for_each_thread.
898
899 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
900
901 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
902 return bool, remove data argument.
903 (linux_stabilize_threads): Use find_thread.
904
905 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
906
907 * linux-low.c (unsuspend_one_lwp): Remove.
908 (unsuspend_all_lwps): Use for_each_thread, inline code from
909 unsuspend_one_lwp.
910
911 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
912
913 * gdbthread.h (find_thread): Add overload with ptid_t filter.
914 * linux-low.c (struct iterate_over_lwps_args): Remove.
915 (iterate_over_lwps_filter): Remove.
916 (iterate_over_lwps): Use find_thread.
917
918 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
919
920 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
921 (linux_handle_new_gdb_connection): Use for_each_thread, inline
922 code from reset_lwp_ptrace_options_callback.
923
924 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
925
926 * linux-arm-low.c (struct update_registers_data): Remove.
927 (update_registers_callback): Return void, take arguments
928 directly, don't check thread's pid.
929 (arm_insert_point, arm_remove_point): Use for_each_thread.
930
931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
932
933 * win32-low.c (continue_one_thread): Return void, take argument
934 directly.
935 (child_continue): Use for_each_thread.
936
937 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
938
939 * win32-i386-low.c (update_debug_registers_callback): Rename
940 to ...
941 (update_debug_registers): ... this, return void, remove pid_p arg.
942 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
943
944 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
945
946 * inferiors.h (struct process_info): Add constructor, initialize
947 fields..
948 <syscalls_to_catch>: Change type to std::vector<int>.
949 * inferiors.c (add_process): Allocate process_info with new.
950 (remove_process): Free process_info with delete.
951 * linux-low.c (handle_extended_wait): Adjust.
952 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
953 * server.c (handle_general_set): Adjust.
954
955 2017-11-16 Pedro Alves <palves@redhat.com>
956
957 * remote-utils.c (remote_close): Block SIGIO signals instead of
958 uninstalling the SIGIO handler.
959
960 2017-11-16 Alan Hayward <alan.hayward@arm.com>
961
962 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
963
964 2017-11-16 Yao Qi <yao.qi@linaro.org>
965
966 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
967 (tic6x_store_gregset): Likewise.
968 (tic6x_usrregs_info): Move it up.
969
970 2017-11-15 Alan Hayward <alan.hayward@arm.com>
971
972 * Makefile.in: Update arch rules.
973 * configure.srv: Explicitly mark arch/ files.
974
975 2017-11-13 Andreas Schwab <schwab@suse.de>
976
977 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
978 function.
979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
980
981 2017-11-06 Pedro Alves <palves@redhat.com>
982
983 * config.in, configure: Regenerate.
984
985 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
986
987 * target.c (struct thread_search): Remove.
988 (thread_search_callback): Remove.
989 (prepare_to_access_memory): Use for_each_thread instead of
990 find_inferior. Inline code from thread_search_callback.
991
992 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
993
994 * server.c (struct visit_actioned_threads_data): Remove.
995 (visit_actioned_threads): Change prototype to take arguments
996 directly.
997 (resume): Use find_thread instead of find_inferior.
998
999 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1000
1001 * server.c (queue_stop_reply_callback): Change prototype, return
1002 void.
1003 (find_status_pending_thread_callback): Remove.
1004 (handle_status): Replace find_inferior with find_thread and
1005 for_each_thread.
1006
1007 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1008
1009 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1010 with REGNO.
1011 (aarch64_store_gregset): Likewise.
1012 (aarch64_fill_fpregset): Likewise.
1013 (aarch64_store_fpregset): Likewise.
1014
1015 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1016
1017 * gdbthread.h (find_thread, for_each_thread): New functions.
1018 * inferiors.c (thread_of_pid): Remove.
1019 (find_any_thread_of_pid): Use find_thread.
1020 * linux-low.c (num_lwps): Use for_each_thread.
1021
1022 2017-10-17 Yao Qi <yao.qi@linaro.org>
1023
1024 * Makefile.in: Remove one rule.
1025 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1026
1027 2017-10-17 Yao Qi <yao.qi@linaro.org>
1028
1029 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1030 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1031
1032 2017-10-17 Yao Qi <yao.qi@linaro.org>
1033
1034 * configure.srv: Rename arm.o with arch/arm.o.
1035
1036 2017-10-17 Yao Qi <yao.qi@linaro.org>
1037
1038 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1039 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1040 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1041 (arch-i386.o, arch-amd64.o): Remove rules.
1042 (arch/%.o): New rule.
1043 Update POSTCOMPILE and COMPILE.pre.
1044 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1045 * configure: Re-generated.
1046 * configure.srv: Replace arch-i386.o with arch/i386.o.
1047 Replace arch-amd64.o with arch/amd64.o.
1048
1049 2017-10-16 Yao Qi <yao.qi@linaro.org>
1050
1051 * configure: Regenerated.
1052
1053 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1054
1055 * inferiors.h: (struct inferior_list): Remove.
1056 (struct inferior_list_entry); Remove.
1057 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1058 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1059 get_first_inferior): Remove.
1060 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1061 find_inferior_id, find_inferior_in_random): Change signature.
1062 * inferiors.c (all_threads): Change type to
1063 std::list<thread_info *>.
1064 (get_thread): Remove macro.
1065 (find_inferior, find_inferior_id): Change signature, implement
1066 using find_thread.
1067 (find_inferior_in_random): Change signature, implement using
1068 find_thread_in_random.
1069 (for_each_inferior, for_each_inferior_with_data): Change
1070 signature, implement using for_each_thread.
1071 (add_inferior_to_list, remove_inferior): Remove.
1072 (add_thread, get_first_thread, thread_of_pid,
1073 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1074 (get_first_inferior, one_inferior_p, clear_inferior_list):
1075 Remove.
1076 (clear_inferiors, get_thread_process): Update.
1077 * gdbthread.h: Include <list>.
1078 (struct thread_info) <entry>: Remove field.
1079 <id>: New field.
1080 (all_threads): Change type to std::list<thread_info *>.
1081 (get_first_inferior): Add doc.
1082 (find_thread, for_each_thread, find_thread_in_random): New
1083 functions.
1084 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1085 * linux-arm-low.c (update_registers_callback): Update.
1086 * linux-low.c (second_thread_of_pid_p): Update.
1087 (kill_one_lwp_callback, linux_detach_lwp_callback,
1088 delete_lwp_callback, status_pending_p_callback, same_lwp,
1089 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1090 iterate_over_lwps, not_stopped_callback,
1091 resume_stopped_resumed_lwps, count_events_callback,
1092 select_singlestep_lwp_callback, select_event_lwp_callback,
1093 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1094 suspend_and_send_sigstop_callback, wait_for_sigstop,
1095 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1096 lwp_running, linux_set_resume_request, resume_status_pending_p,
1097 need_step_over_p, start_step_over, linux_resume_one_thread,
1098 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1099 reset_lwp_ptrace_options_callback): Update.
1100 * linux-mips-low.c (update_watch_registers_callback): Update.
1101 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1102 Update.
1103 (free_register_cache_thread_one): Remove.
1104 (regcache_release): Update.
1105 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1106 handle_qxfer_threads_worker): Update.
1107 (handle_query): Update, use list iterator.
1108 (visit_actioned_threads, handle_pending_status,
1109 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1110 clear_pending_status_callback, set_pending_status_callback,
1111 find_status_pending_thread_callback, handle_status,
1112 process_serial_event): Update.
1113 * target.c (thread_search_callback): Update.
1114 * thread-db.c (thread_db_get_tls_address): Update.
1115 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1116 Update.
1117 * win32-i386-low.c (update_debug_registers_callback): Update.
1118 * win32-low.c (delete_thread_info, child_delete_thread,
1119 continue_one_thread, suspend_one_thread,
1120 get_child_debug_event): Adjust.
1121
1122 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1123
1124 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1125 * inferiors.h: Include <list>.
1126 (struct process_info) <entry>: Remove field.
1127 <pid>: New field.
1128 (pid_of): Change macro to function.
1129 (ptid_of, lwpid_of): Remove macro.
1130 (all_processes): Change type to std::list<process_info *>.
1131 (ALL_PROCESSES): Remove macro.
1132 (for_each_process, find_process): New function.
1133 * inferiors.c (all_processes): Change type to
1134 std::list<process_info *>.
1135 (find_thread_process): Adjust.
1136 (add_process): Likewise.
1137 (remove_process): Likewise.
1138 (find_process_pid): Likewise.
1139 (get_first_process): Likewise.
1140 (started_inferior_callback): Remove.
1141 (have_started_inferiors_p): Adjust.
1142 (attached_inferior_callback): Remove.
1143 (have_attached_inferiors_p): Adjust.
1144 * linux-low.c (check_zombie_leaders): Likewise.
1145 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1146 (x86_linux_update_xmltarget): Adjust.
1147 * server.c (handle_query): Likewise.
1148 (gdb_reattached_process): Remove.
1149 (handle_status): Adjust.
1150 (kill_inferior_callback): Likewise.
1151 (detach_or_kill_inferior): Remove.
1152 (print_started_pid): Likewise.
1153 (print_attached_pid): Likewise.
1154 (detach_or_kill_for_exit): Update.
1155 (process_serial_event): Likewise.
1156 * linux-arm-low.c (arm_new_fork): Likewise.
1157
1158 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1159
1160 * dll.h: Include <list>.
1161 (struct dll_info): Add constructor.
1162 <entry>: Remove field.
1163 (all_dlls): Change type to std::list<dll_info>.
1164 * dll.c: Include <algorithm>.
1165 (get_dll): Remove macro.
1166 (all_dlls): Change type to std::list<dll_info *>.
1167 (free_one_dll): Remove.
1168 (match_dll): Likewise.
1169 (loaded_dll): Adjust.
1170 (unloaded_dll): Adjust to all_dlls type change, use
1171 std::find_if. Inline code from match_dll.
1172 (clear_dlls): Adjust to all_dlls type change.
1173 * server.c (emit_dll_description): Remove.
1174 (handle_qxfer_libraries): Adjust to all_dlls type change,
1175 integrate emit_dll_description's functionality.
1176
1177 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * linux-low.h (struct linux_target_ops) <delete_process>: New
1180 field.
1181 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1182 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1183 (struct linux_target_ops): Add delete_process callback.
1184 * linux-arm-low.c (arm_delete_process): New.
1185 (struct linux_target_ops): Add delete_process callback.
1186 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1187 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1188 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1189 * linux-mips-low.c (mips_linux_delete_process): New.
1190 (struct linux_target_ops): Add delete_process callback.
1191 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1192 * linux-s390-low.c (struct linux_target_ops): Likewise.
1193 * linux-sh-low.c (struct linux_target_ops): Likewise.
1194 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1195 * linux-tile-low.c (struct linux_target_ops): Likewise.
1196 * linux-x86-low.c (x86_linux_delete_process): New.
1197 (struct linux_target_ops): Add delete_process callback.
1198 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1199
1200 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * linux-aarch64-low.c (the_low_target): Add thread delete
1203 callback.
1204 * linux-arm-low.c (arm_delete_thread): New function.
1205 (the_low_target): Add thread delete callback.
1206 * linux-bfin-low.c (the_low_target): Likewise.
1207 * linux-crisv32-low.c (the_low_target): Likewise.
1208 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1209 set.
1210 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1211 field.
1212 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1213 * linux-mips-low.c (mips_linux_delete_thread): New function.
1214 (the_low_target): Add thread delete callback.
1215 * linux-ppc-low.c (the_low_target): Likewise.
1216 * linux-s390-low.c (the_low_target): Likewise.
1217 * linux-sh-low.c (the_low_target): Likewise.
1218 * linux-tic6x-low.c (the_low_target): Likewise.
1219 * linux-tile-low.c (the_low_target): Likewise.
1220 * linux-x86-low.c (the_low_target): Likewise.
1221 * linux-xtensa-low.c (the_low_target): Likewise.
1222
1223 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1224
1225 * win32-low.c: Include "common-inferior.h".
1226
1227 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1228
1229 * inferiors.c (set_inferior_cwd): New function.
1230 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1231 (handle_query): Inform that QSetWorkingDir is supported.
1232 * win32-low.c (create_process): Pass the inferior's cwd to
1233 CreateProcess.
1234
1235 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1236
1237 * inferiors.c (current_inferior_cwd): New global variable.
1238 (get_inferior_cwd): New function.
1239 * inferiors.h (struct process_info) <cwd>: New field.
1240
1241 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1242
1243 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1244 (OBS): Add gdb_tilde_expand.o.
1245
1246 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1249 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1250
1251 2017-09-29 Pedro Alves <palves@redhat.com>
1252
1253 * ax.c (gdb_parse_agent_expr): Constify.
1254 * ax.h (gdb_parse_agent_expr): Constify.
1255 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1256 Constify.
1257 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1258 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1259 * remote-utils.h (read_ptid): Constify.
1260 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1261 (process_point_options, process_serial_event): Constify.
1262 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1263 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1264 (cmd_qtbuffer): Constify.
1265
1266 2017-09-29 Pedro Alves <palves@redhat.com>
1267
1268 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1269 fails.
1270
1271 2017-09-29 Pedro Alves <palves@redhat.com>
1272
1273 * linux-low.c (handle_extended_wait): Pass parent thread instead
1274 of process to thread_db_notice_clone.
1275 * linux-low.h (thread_db_notice_clone): Replace parent process
1276 parameter with parent thread parameter.
1277 * thread-db.c (find_one_thread): Add comment.
1278 (thread_db_notice_clone): Replace parent process parameter with
1279 parent thread parameter. Temporarily switch to the parent thread.
1280
1281 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1282
1283 * gdbthread.h: Include "common-gdbthread.h".
1284 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1285 "if" when validating the ptid.
1286 * remote-utils.c: Include "gdbthread.h".
1287 (prepare_resume_reply): Use "switch_to_thread".
1288 * target.c (done_accessing_memory): Likewise.
1289
1290 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1291
1292 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1293 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1294 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1295 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1296 s390x-gs-linux64-ipa.o to ipa_obj.
1297 * linux-s390-low.c (HWCAP_S390_GS): New define.
1298 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1299 New functions.
1300 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1301 (s390_arch_setup): Check for guarded-storage support and choose
1302 appropriate tdesc.
1303 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1304 init_registers_s390x_gs_linux64.
1305 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1306 enum value.
1307 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1308 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1309
1310 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1313
1314 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1315
1316 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1317 (thread_db_thread_handle): Declare.
1318 * linux-low.c (linux_target_ops): Initialize thread_handle.
1319 * server.c (handle_qxfer_threads_worker): Add support for
1320 "handle" attribute.
1321 * target.h (struct target_ops): Add new function pointer,
1322 thread_handle.
1323 (target_thread_handle): Define.
1324 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1325 field in lwp.
1326 (thread_db_thread_handle): New function.
1327
1328 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1329
1330 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1331 * linux-low.h (thread_db_notice_clone): Declare.
1332 * thread-db.c (thread_db_notice_clone): New function.
1333
1334 2017-09-21 Pedro Alves <palves@redhat.com>
1335
1336 * server.c (gdb_read_memory, handle_status, process_serial_event)
1337 (handle_serial_event, handle_target_event): Adjust to
1338 set_desired_thread prototype change.
1339 * target.c (set_desired_thread): Remove 'use_general' parameter
1340 and adjust.
1341 * target.h (set_desired_thread): Remove 'use_general' parameter.
1342
1343 2017-09-20 Tom Tromey <tom@tromey.com>
1344
1345 * target.c (target_terminal::terminal_state): Define.
1346 (target_terminal::init): Rename from target_terminal_init.
1347 (target_terminal::inferior): Rename from
1348 target_terminal_inferior.
1349 (target_terminal::ours): Rename from target_terminal_ours.
1350 (target_terminal::ours_for_output, target_terminal::info): New.
1351
1352 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1353
1354 * server.c (accumulate_file_name_length): Remove.
1355 (emit_dll_description): Adjust to std::string change.
1356 (handle_qxfer_libraries): Use std::string to hold document.
1357
1358 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1359
1360 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1361 return type of xml_escape_text.
1362 * server.c (emit_dll_description): Likewise.
1363
1364 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1365
1366 * server.c (captured_main): Accept argument for --selftest.
1367 Update run_tests call.
1368 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1369 when registering selftests.
1370
1371 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1372
1373 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1374 instead of "VEC" for "target_desc.reg_defs".
1375 (regcache_cpy): Likewise.
1376 (registers_to_string): Likewise.
1377 (registers_from_string): Likewise.
1378 (find_regno): Likewise.
1379 (supply_regblock): Likewise.
1380 (regcache_raw_read_unsigned): Likewise.
1381 * tdesc.c (init_target_desc): Likewise.
1382 (tdesc_create_reg): Likewise.
1383 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1384 (struct target_desc) <reg_defs>: Convert to "std::vector".
1385 (target_desc): Do not initialize "reg_defs".
1386 (~target_desc): Update code to use "std::vector" instead of "VEC"
1387 for "target_desc.reg_defs".
1388 (operator==): Likewise.
1389
1390 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1391
1392 * inferiors.h (thread_to_gdb_id): Remove.
1393 * inferiors.c (thread_to_gdb_id): Remove.
1394 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1395 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1396 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1397 Likewise.
1398 * nto-low.c (nto_fetch_registers, nto_store_registers,
1399 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1400
1401 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * inferiors.h (gdb_id_to_thread_id): Remove.
1404 * inferiors.c (gdb_id_to_thread_id): Remove.
1405 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1406 removal. Move pid declaration closer to where it's used.
1407
1408 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1409
1410 * server.c (handle_detach): New function.
1411 (process_serial_event): Move code out, call handle_detach.
1412
1413 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1414
1415 * server.c (require_running): Rename to ...
1416 (require_running_or_return): ... this ...
1417 (require_running_or_break): ... and this.
1418 (handle_query, process_serial_event): Adjust.
1419
1420 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * linux-low.c (linux_set_resume_request): Remove unused
1423 variables.
1424
1425 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * server.c (first_thread_of): Remove.
1428 (process_serial_event): Replace usage of first_thread_of with
1429 find_any_thread_of_pid.
1430 * tracepoint.c (same_process_p): Remove.
1431 (gdb_agent_about_to_close): Replace usage of same_process_p with
1432 find_any_thread_of_pid.
1433 * linux-x86-low.c (same_process_callback): Remove.
1434 (x86_arch_setup_process_callback): Replace usage of
1435 same_process_callback with find_any_thread_of_pid.
1436 * thread-db.c (any_thread_of): Remove.
1437 (switch_to_process): Replace usage of any_thread_of with
1438 find_any_thread_of_pid.
1439 * inferiors.c (thread_pid_matches_callback): Remove.
1440 (find_thread_process): Adjust to use find_any_thread_of_pid.
1441
1442 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1443
1444 * regcache.c (get_thread_regcache): Guard calls to "memset"
1445 with "!VEC_empty".
1446
1447 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1448
1449 * linux-low.c (handle_extended_wait): Use
1450 "allocate_target_description" instead of "XNEW".
1451 * linux-x86-low.c (initialize_low_arch): Likewise.
1452
1453 2017-09-05 Yao Qi <yao.qi@linaro.org>
1454
1455 * configure.srv (srv_i386_regobj): Remove.
1456 (srv_amd64_regobj): Remove.
1457 (srv_regobj): Set it to "" for x86 non-linux targets.
1458 * linux-x86-tdesc.c (i386_linux_read_description):
1459 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1460 (init_registers_i386): Remove the declaration.
1461 (tdesc_i386): Remove the declaration.
1462 (lynx_i386_arch_setup): Call i386_create_target_description.
1463 * nto-x86-low.c: Likewise.
1464 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1465 [!__x86_64__]: include arch/i386.h.
1466 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1467
1468 2017-09-05 Yao Qi <yao.qi@linaro.org>
1469
1470 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1471 i386/amd64-XXX-linux from it.
1472
1473 2017-09-05 Yao Qi <yao.qi@linaro.org>
1474
1475 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1476 false.
1477 (ipa_amd64_linux_regobj): Remove.
1478 (ipa_x32_linux_regobj): Remove.
1479
1480 2017-09-05 Yao Qi <yao.qi@linaro.org>
1481
1482 * Makefile.in (arch-amd64.o): New rule.
1483 * configure.srv: Append arch-amd64.o.
1484 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1485 (get_ipa_tdesc): Call amd64_linux_read_description.
1486 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1487 and init_registers_amd64_XXX.
1488 * linux-x86-low.c (x86_linux_read_description): Call
1489 amd64_linux_read_description.
1490 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1491 (initialize_low_arch): Don't call init_registers_x32_XXX and
1492 init_registers_amd64_XXX.
1493 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1494 and tdesc_amd64_XXX.
1495 [__x86_64__] (amd64_tdesc_test): New function.
1496 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1497 and init_registers_amd64_XXX.
1498 * linux-x86-tdesc.c: Include arch/amd64.h.
1499 (xcr0_to_tdesc_idx): New function.
1500 (i386_linux_read_description): New function.
1501 (amd64_get_ipa_tdesc_idx): New function.
1502 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1503 (amd64_get_ipa_tdesc): Declare.
1504
1505 2017-09-05 Yao Qi <yao.qi@linaro.org>
1506
1507 * configure.srv (srv_i386_linux_xmlfiles): Remove
1508 i386/i386-XXX-linux.xml from it.
1509
1510 2017-09-05 Yao Qi <yao.qi@linaro.org>
1511
1512 * configure.srv: Set srv_i386_linux_regobj empty if $development
1513 is false.
1514 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1515 initialize_low_tdesc.
1516 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1517 with #if initialize_low_tdesc.
1518 * linux-x86-tdesc-selftest.c: New file.
1519 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1520
1521 2017-09-05 Yao Qi <yao.qi@linaro.org>
1522
1523 * Makefile.in (arch-i386.o): New rule.
1524 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1525 (x86_64-*-linux*): Likewise.
1526 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1527 include arch/i386.h.
1528 (i386_linux_read_description): Remove code and call
1529 i386_create_target_description.
1530 * tdesc.c (allocate_target_description): New function.
1531 * tdesc.h (set_tdesc_architecture): Remove declaration.
1532 (set_tdesc_osabi): Likewise.
1533
1534 2017-09-05 Yao Qi <yao.qi@linaro.org>
1535
1536 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1537 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1538 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1539 .xmltarget.
1540 * server.c (get_features_xml): Call tdesc_get_features_xml.
1541 * tdesc.c (set_tdesc_architecture): New function.
1542 (set_tdesc_osabi): New function.
1543 (tdesc_get_features_xml): New function.
1544 (tdesc_create_feature): Add an argument.
1545 * tdesc.h (struct target_desc) <features>: New field.
1546 <arch, osabi>: New field.
1547 (~target_desc): xfree features, arch, and osabi.
1548 (target_desc::oerator==): Don't compare .xmltarget.
1549 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1550 (set_tdesc_osabi): Likewise.
1551 (tdesc_get_features_xml): Likewise.
1552
1553 2017-09-05 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-x86-tdesc.c: Include selftest.h.
1556 (i386_tdesc_test): New function.
1557 (initialize_low_tdesc): Call selftests::register_test.
1558 * tdesc.h: Include regdef.h.
1559 (target_desc): Override operator == and !=.
1560
1561 2017-09-05 Yao Qi <yao.qi@linaro.org>
1562
1563 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1564 (ipa_obj): Likewise.
1565 * linux-i386-ipa.c: Include common/x86-xstate.h
1566 (get_ipa_tdesc): Call i386_linux_read_description.
1567 (initialize_low_tracepoint): Don't call init_registers_XXX
1568 functions, call initialize_low_tdesc instead.
1569 * linux-x86-low.c (x86_linux_read_description): Call
1570 i386_linux_read_description.
1571 (initialize_low_arch): Don't call init_registers_i386_XXX
1572 functions, call initialize_low_tdesc.
1573 * linux-x86-tdesc.c: New file.
1574 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1575 (i386_get_ipa_tdesc_idx): Declare.
1576 (i386_get_ipa_tdesc): Declare.
1577 (initialize_low_tdesc): Declare.
1578
1579 2017-09-05 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1582 instead of 0.
1583
1584 2017-09-05 Yao Qi <yao.qi@linaro.org>
1585
1586 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1587 * regcache.c (get_thread_regcache): Use VEC_length.
1588 (init_register_cache): Likewise.
1589 (regcache_cpy): Likewise.
1590 (registers_to_string): Iterate reg_defs via VEC_iterate.
1591 (find_regno): Likewise.
1592 (find_register_by_number): Use VEC_index.
1593 (register_size): Call find_register_by_number.
1594 (register_data): Call find_register_by_number.
1595 (supply_regblock): Use VEC_length.
1596 (regcache_raw_read_unsigned): Likewise.
1597 * tdesc.c (init_target_desc): Iterate reg_defs via
1598 VEC_iterate.
1599 (default_description): Update initializer.
1600 (copy_target_description): Don't update field num_registers.
1601 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1602 <num_registers>: Remove.
1603
1604 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1605
1606 * Makefile.in (.SECONDARY): Define target.
1607
1608 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1609
1610 * linux-low.c (linux_wait_1): Adjust.
1611 * server.c (queue_stop_reply_callback): Adjust.
1612
1613 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1614
1615 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1616 QEnvironmentUnset and QEnvironmentReset packets.
1617 (handle_query): Inform remote that QEnvironmentHexEncoded,
1618 QEnvironmentUnset and QEnvironmentReset are supported.
1619
1620 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * inferiors.h (inferior_target_data): Rename to ...
1623 (thread_target_data): ... this.
1624 (inferior_regcache_data): Rename to ...
1625 (thread_regcache_data): ... this.
1626 (set_inferior_regcache_data): Rename to ...
1627 (set_thread_regcache_data): ... this.
1628 * inferiors.c (inferior_target_data): Rename to ...
1629 (thread_target_data): ... this.
1630 (inferior_regcache_data): Rename to ...
1631 (thread_regcache_data): ... this.
1632 (set_inferior_regcache_data): Rename to ...
1633 (set_thread_regcache_data): ... this.
1634 (free_one_thread): Update.
1635 * linux-low.h (get_thread_lwp): Update.
1636 * regcache.c (get_thread_regcache): Update.
1637 (regcache_invalidate_thread): Update.
1638 (free_register_cache_thread): Update.
1639 * win32-i386-low.c (update_debug_registers_callback): Update.
1640 (win32_get_current_dr): Update.
1641 * win32-low.c (thread_rec): Update.
1642 (delete_thread_info): Update.
1643 (continue_one_thread): Update.
1644 (suspend_one_thread): Update.
1645
1646 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * inferiors.c (set_inferior_target_data): Remove.
1649 * inferiors.h (set_inferior_target_data): Remove.
1650
1651 2017-08-18 Yao Qi <yao.qi@linaro.org>
1652
1653 * Makefile.in (OBS): Add selftest.o.
1654 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1655 * configure, config.in: Re-generated.
1656 * server.c: Include common/sefltest.h.
1657 (captured_main): Handle option --selftest.
1658
1659 2017-08-09 Yao Qi <yao.qi@linaro.org>
1660
1661 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1662 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1663 i386-avx-mpx.o and i386-mmx.o.
1664 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1665 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1666 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1667 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1668 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1669 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1670 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1671 i386/amd64-avx-mpx.xml.
1672
1673 2017-08-09 Yao Qi <yao.qi@linaro.org>
1674
1675 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1676 and x32-avx-avx512.o.
1677 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1678 i386/x32-avx-avx512.xml.
1679
1680 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1681
1682 * tracepoint.h (enum class fast_tpoint_collect_result): New
1683 enumeration.
1684 (fast_tracepoint_collecting): Change return type to
1685 fast_tpoint_collect_result.
1686 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1687 * linux-low.h: Include tracepoint.h.
1688 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1689 fast_tpoint_collect_result.
1690 * linux-low.c (handle_tracepoints): Adjust.
1691 (linux_fast_tracepoint_collecting): Change return type to
1692 fast_tpoint_collect_result.
1693 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1694 linux_wait_1, stuck_in_jump_pad_callback,
1695 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1696 proceed_one_lwp): Adjust to type change.
1697
1698 2017-07-10 Yao Qi <yao.qi@linaro.org>
1699
1700 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1701
1702 2017-06-29 Yao Qi <yao.qi@linaro.org>
1703
1704 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1705 Remove.
1706 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1707
1708 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1711
1712 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1713
1714 * linux-low.c (linux_create_inferior): Adjust code to access the
1715 environment information via 'gdb_environ' class.
1716 * lynx-low.c (lynx_create_inferior): Likewise.
1717 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1718 (get_environ): Return a pointer to 'our_environ'.
1719 (captured_main): Initialize 'our_environ'.
1720 * server.h (get_environ): Adjust prototype.
1721 * spu-low.c (spu_create_inferior): Adjust code to access the
1722 environment information via 'gdb_environ' class.
1723
1724 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1725
1726 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1727 usage of "register" keyword.
1728
1729 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1730
1731 * configure: Re-generate.
1732
1733 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1734
1735 * configure: Re-generate.
1736
1737 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1738
1739 * Makefile.in (COMPILE.pre): Add "-x c++".
1740
1741 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1742
1743 * fork-child.c: Conditionally include <signal.h>.
1744
1745 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1746
1747 * server.c (handle_general_set): Handle new packet
1748 "QStartupWithShell".
1749 (handle_query): Add "QStartupWithShell" to the list of supported
1750 packets.
1751 (gdbserver_usage): Add help text explaining the
1752 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1753 options.
1754 (captured_main): Recognize and act upon the presence of the new
1755 CLI options.
1756
1757 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1758 Pedro Alves <palves@redhat.com>
1759
1760 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1761 * configure: Regenerate.
1762 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1763 "fork-inferior.o".
1764 (i[34567]86-*-lynxos*): Likewise.
1765 (spu*-*-*): Likewise.
1766 * fork-child.c: New file.
1767 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1768 and "environ.h".
1769 (linux_ptrace_fun): New function.
1770 (linux_create_inferior): Adjust function prototype to reflect
1771 change on "target.h". Adjust function code to use
1772 "fork_inferior".
1773 (linux_request_interrupt): Delete "signal_pid".
1774 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1775 (lynx_ptrace_fun): New function.
1776 (lynx_create_inferior): Adjust function prototype to reflect
1777 change on "target.h". Adjust function code to use
1778 "fork_inferior".
1779 * nto-low.c (nto_create_inferior): Adjust function prototype and
1780 code to reflect change on "target.h". Update comments.
1781 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1782 "common-terminal.h" and "environ.h".
1783 (terminal_fd): Moved to fork-child.c.
1784 (old_foreground_pgrp): Likewise.
1785 (restore_old_foreground_pgrp): Likewise.
1786 (last_status): Make it global.
1787 (last_ptid): Likewise.
1788 (our_environ): New variable.
1789 (startup_with_shell): Likewise.
1790 (program_name): Likewise.
1791 (program_argv): Rename to...
1792 (program_args): ...this.
1793 (wrapper_argv): New variable.
1794 (start_inferior): Delete function.
1795 (get_exec_wrapper): New function.
1796 (get_exec_file): Likewise.
1797 (get_environ): Likewise.
1798 (prefork_hook): Likewise.
1799 (post_fork_inferior): Likewise.
1800 (postfork_hook): Likewise.
1801 (postfork_child_hook): Likewise.
1802 (handle_v_run): Update code to deal with arguments coming from the
1803 remote host. Update calls from "start_inferior" to
1804 "create_inferior".
1805 (captured_main): Likewise. Initialize environment variable. Call
1806 "have_job_control".
1807 * server.h (post_fork_inferior): New prototype.
1808 (get_environ): Likewise.
1809 (last_status): Declare.
1810 (last_ptid): Likewise.
1811 (signal_pid): Likewise.
1812 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1813 (spu_ptrace_fun): New function.
1814 (spu_create_inferior): Adjust function prototype to reflect change
1815 on "target.h". Adjust function code to use "fork_inferior".
1816 * target.c (target_terminal_init): New function.
1817 (target_terminal_inferior): Likewise.
1818 (target_terminal_ours): Likewise.
1819 * target.h: Include <vector>.
1820 (struct target_ops) <create_inferior>: Update prototype.
1821 (create_inferior): Update macro.
1822 * utils.c (gdb_flush_out_err): New function.
1823 * win32-low.c (win32_create_inferior): Adjust function prototype
1824 and code to reflect change on "target.h".
1825
1826 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1827
1828 * inferiors.c (switch_to_thread): New function.
1829
1830 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1831
1832 * Makefile.in (SFILE): Add "common/job-control.c".
1833 (OBS): Add "job-control.o".
1834
1835 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1836
1837 * Makefile: Remove "@host_makefile_frag@".
1838
1839 2017-05-05 Pedro Alves <palves@redhat.com>
1840
1841 * configure: Regenerate.
1842
1843 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1844
1845 * configure: Regenerate.
1846
1847 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1848
1849 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1850 software_single_step change of return type to
1851 std::vector<CORE_ADDR>.
1852 * linux-low.c (install_software_single_step_breakpoints):
1853 Likewise.
1854 * linux-low.h (install_software_single_step_breakpoints):
1855 Likewise.
1856
1857 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1858
1859 * remote-utils.c: Include "gdb_termios.h" instead of
1860 "terminal.h".
1861 * terminal.h: Delete file.
1862
1863 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1864
1865 * server.c: Include <vector>.
1866 <program_argv, wrapper_argv>: Convert to std::vector.
1867 (start_inferior): Rewrite function to use C++.
1868 (handle_v_run): Likewise. Update code that calculates the argv
1869 based on the vRun packet; use C++.
1870 (captured_main): Likewise.
1871
1872 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1873
1874 * server.c (handle_v_cont): Initialize thread_resume::thread
1875 with null_ptid.
1876
1877 2017-04-05 Pedro Alves <palves@redhat.com>
1878
1879 * configure: Regenerate.
1880
1881 2017-04-05 Pedro Alves <palves@redhat.com>
1882
1883 * gdbreplay.c (sync_error): Constify.
1884 * linux-x86-low.c (push_opcode): Constify.
1885
1886 2017-04-05 Pedro Alves <palves@redhat.com>
1887
1888 * win32-low.c (get_child_debug_event)
1889 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1890 Report TARGET_WAITKIND_SPURIOUS instead.
1891
1892 2017-04-05 Pedro Alves <palves@redhat.com>
1893
1894 * remote-utils.c (remote_prepare, remote_open): Constify.
1895 * remote-utils.h (remote_prepare, remote_open): Constify.
1896 * server.c (captured_main): Constify 'port' handling.
1897
1898 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * Makefile.in (clean): Clear .deps.
1901
1902 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * .gitignore: Remove generated files, replace with wildcard.
1905 * (clean): Replace removal of generated files with wildcard.
1906 (version.c): Replace with...
1907 (version-generated.c): ...this.
1908 (xml-builtin.c): Replace with...
1909 (xml-builtin-generated.c): ...this.
1910 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1911 (%.c: *regformats*): Replace with...
1912 (%-generated.c: *regformats*): ...this.
1913
1914 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1915
1916 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1917 (xtensa_fill_gregset): Call collect_register_by_name for
1918 threadptr register.
1919 (xtensa_store_gregset): Call supply_register_by_name for
1920 threadptr register.
1921
1922 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1923
1924 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1925 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1926 (xtensa_store_gregset): Call supply_register for all registers in
1927 a0_regnum..a0_regnum + C0_NREGS range.
1928
1929 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1930
1931 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1932 (ax-ipa.o: ax.c): Remove.
1933 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1934 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1935 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1936 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1937 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1938
1939 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1940
1941 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1942 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1943 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1944 (errors-ipa.o: ../common/errors.c): Remove.
1945 (format-ipa.o: ../common/format.c): Remove.
1946 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1947
1948 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1949
1950 * Makefile.in (%-ipa.o: %.c): New rule.
1951 (tracepoint-ipa.o: tracepoint.c): Remove.
1952 (utils-ipa.o: utils.c): Remove.
1953 (remote-utils-ipa.o: remote-utils.c): Remove.
1954 (regcache-ipa.o: regcache.c): Remove.
1955 (i386-linux-ipa.o: i386-linux.c): Remove.
1956 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1957 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1958 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1959 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1960 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1961 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1962 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1963 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1964 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1965 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1966 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1967 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1968 (aarch64-ipa.o: aarch64.c): Remove.
1969 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1970 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1971 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1972 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1973 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1974 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1975 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1976 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1977 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1978 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1979 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1980 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1981 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1982 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1983 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1984 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1985 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1986 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1987 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1988 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1989 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1990 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1991 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1992 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1993 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1994 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1995 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1996 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1997 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1998 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1999 (tdesc-ipa.o: tdesc.c): Remove.
2000 (x32-linux-ipa.o: x32-linux.c): Remove.
2001 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2002 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2003
2004 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2005
2006 * Makefile.in (%.o: ../arch/%.c): New rule.
2007 (arm.o: ../arch/arm.c): Remove.
2008 (arm-linux.o: ../arch/arm-linux.c): Remove.
2009 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2010 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2011
2012 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2013
2014 * Makefile.in (%.o: ../nat/%.c): New rule.
2015 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2016 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2017 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2018 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2019 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2020 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2021 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2022 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2023 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2024 (linux-personality.o: ../nat/linux-personality.c): Remove.
2025 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2026 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2027 (x86-linux.o: ../nat/x86-linux.c): Remove.
2028 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2029 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2030
2031 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2032
2033 * Makefile.in (%.o: ../common/%.c): New rule.
2034 (signals.o: ../common/signals.c): Remove.
2035 (print-utils.o: ../common/print-utils.c): Remove.
2036 (rsp-low.o: ../common/rsp-low.c): Remove.
2037 (common-utils.o: ../common/common-utils.c): Remove.
2038 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2039 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2040 (vec.o: ../common/vec.c): Remove.
2041 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2042 (xml-utils.o: ../common/xml-utils.c): Remove.
2043 (ptid.o: ../common/ptid.c): Remove.
2044 (buffer.o: ../common/buffer.c): Remove.
2045 (format.o: ../common/format.c): Remove.
2046 (filestuff.o: ../common/filestuff.c): Remove.
2047 (agent.o: ../common/agent.c): Remove.
2048 (errors.o: ../common/errors.c): Remove.
2049 (environ.o: ../common/environ.c): Remove.
2050 (common-debug.o: ../common/common-debug.c): Remove.
2051 (cleanups.o: ../common/cleanups.c): Remove.
2052 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2053 (fileio.o: ../common/fileio.c): Remove.
2054 (common-regcache.o: ../common/common-regcache.c): Remove.
2055 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2056 (new-op.o: ../common/new-op.c): Remove.
2057 (btrace-common.o: ../common/btrace-common.c): Remove.
2058
2059 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2060
2061 * Makefile.in (%.o: ../target/%.c): New rule.
2062 (waitstatus.o: ../target/waitstatus.c): Remove.
2063
2064 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2065
2066 * Makefile.in
2067 (%.c: ../regformats/%.dat,
2068 (%.c: ../regformats/arm/%.dat,
2069 (%.c: ../regformats/i386/%.dat,
2070 (%.c: ../regformats/rs6000/%.dat): New rules.
2071 (aarch64.c): Remove.
2072 (reg-arm.c): Remove.
2073 (arm-with-iwmmxt.c): Remove.
2074 (arm-with-vfpv2.c): Remove.
2075 (arm-with-vfpv3.c): Remove.
2076 (arm-with-neon.c): Remove.
2077 (reg-bfin.c): Remove.
2078 (reg-cris.c): Remove.
2079 (reg-crisv32.c): Remove.
2080 (i386.c): Remove.
2081 (i386-linux.c): Remove.
2082 (i386-avx.c): Remove.
2083 (i386-avx-linux.c): Remove.
2084 (i386-avx-avx512.c): Remove.
2085 (i386-avx-avx512-linux.c): Remove.
2086 (i386-mpx.c): Remove.
2087 (i386-mpx-linux.c): Remove.
2088 (i386-avx-mpx-avx512-pku.c): Remove.
2089 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2090 (i386-avx-mpx.c): Remove.
2091 (i386-avx-mpx-linux.c): Remove.
2092 (i386-mmx.c): Remove.
2093 (i386-mmx-linux.c): Remove.
2094 (reg-ia64.c): Remove.
2095 (reg-m32r.c): Remove.
2096 (reg-m68k.c): Remove.
2097 (reg-cf.c): Remove.
2098 (mips-linux.c): Remove.
2099 (mips-dsp-linux.c): Remove.
2100 (mips64-linux.c): Remove.
2101 (mips64-dsp-linux.c): Remove.
2102 (nios2-linux.c): Remove.
2103 (powerpc-32.c): Remove.
2104 (powerpc-32l.c): Remove.
2105 (powerpc-altivec32l.c): Remove.
2106 (powerpc-cell32l.c): Remove.
2107 (powerpc-vsx32l.c): Remove.
2108 (powerpc-isa205-32l.c): Remove.
2109 (powerpc-isa205-altivec32l.c): Remove.
2110 (powerpc-isa205-vsx32l.c): Remove.
2111 (powerpc-e500l.c): Remove.
2112 (powerpc-64l.c): Remove.
2113 (powerpc-altivec64l.c): Remove.
2114 (powerpc-cell64l.c): Remove.
2115 (powerpc-vsx64l.c): Remove.
2116 (powerpc-isa205-64l.c): Remove.
2117 (powerpc-isa205-altivec64l.c): Remove.
2118 (powerpc-isa205-vsx64l.c): Remove.
2119 (s390-linux32.c): Remove.
2120 (s390-linux32v1.c): Remove.
2121 (s390-linux32v2.c): Remove.
2122 (s390-linux64.c): Remove.
2123 (s390-linux64v1.c): Remove.
2124 (s390-linux64v2.c): Remove.
2125 (s390-te-linux64.c): Remove.
2126 (s390-vx-linux64.c): Remove.
2127 (s390-tevx-linux64.c): Remove.
2128 (s390x-linux64.c): Remove.
2129 (s390x-linux64v1.c): Remove.
2130 (s390x-linux64v2.c): Remove.
2131 (s390x-te-linux64.c): Remove.
2132 (s390x-vx-linux64.c): Remove.
2133 (s390x-tevx-linux64.c): Remove.
2134 (tic6x-c64xp-linux.c): Remove.
2135 (tic6x-c64x-linux.c): Remove.
2136 (tic6x-c62x-linux.c): Remove.
2137 (reg-sh.c): Remove.
2138 (reg-sparc64.c): Remove.
2139 (reg-spu.c): Remove.
2140 (amd64.c): Remove.
2141 (amd64-linux.c): Remove.
2142 (amd64-avx.c): Remove.
2143 (amd64-avx-linux.c): Remove.
2144 (amd64-avx-avx512.c): Remove.
2145 (amd64-avx-avx512-linux.c): Remove.
2146 (amd64-mpx.c): Remove.
2147 (amd64-mpx-linux.c): Remove.
2148 (amd64-avx-mpx-avx512-pku.c): Remove.
2149 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2150 (amd64-avx-mpx.c): Remove.
2151 (amd64-avx-mpx-linux.c): Remove.
2152 (x32.c): Remove.
2153 (x32-linux.c): Remove.
2154 (x32-avx.c): Remove.
2155 (x32-avx-linux.c): Remove.
2156 (x32-avx-avx512.c): Remove.
2157 (x32-avx-avx512-linux.c): Remove.
2158 (reg-xtensa.c): Remove.
2159 (reg-tilegx.c): Remove.
2160 (reg-tilegx32.c): Remove.
2161
2162 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2163
2164 * Makefile.in (SFILES): Add "common/environ.c".
2165 (OBJS): Add "common/environ.h".
2166
2167 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2168
2169 * configure.ac: Check if the fs_base and gs_base members of
2170 `struct user_regs_struct' exist.
2171 * config.in: Regenerated.
2172 * configure: Likewise.
2173
2174 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2175
2176 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2177 target_read_memory.
2178 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2179 (get_next_pcs_syscall_next_pc): Likewise.
2180
2181 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2182
2183 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2184 * nto-x86-low.c: Likewise.
2185
2186 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2187
2188 * Makefile.in: Include disable-implicit-rules.mk.
2189
2190 2016-11-23 Pedro Alves <palves@redhat.com>
2191
2192 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2193 (debug_vprintf): Use std::chrono::steady_clock instead of
2194 gettimeofday. Use '.' instead of ':'.
2195 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2196 (get_timestamp): Use std::chrono::steady_clock instead of
2197 gettimeofday.
2198
2199 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2200
2201 * Makefile.in: Fix whitespace formatting.
2202
2203 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2204
2205 * Makefile.in (SFILES, OBS): Flatten list and order
2206 alphabetically.
2207
2208 2016-11-23 Pedro Alves <palves@redhat.com>
2209
2210 * event-loop.c (handle_file_event): Use warning.
2211 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2212 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2213 Use warning.
2214
2215 2016-11-23 Pedro Alves <palves@redhat.com>
2216
2217 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2218 output.
2219 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2220 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2221 debug_printf and debug_flush for debug output.
2222 * server.c (handle_general_set): Likewise.
2223 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2224 output.
2225
2226 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2227
2228 * Makefile.in (.c.o): Replace rule with ...
2229 (%.o: %.c): ... this one.
2230
2231 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2232
2233 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2234 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2235 make.
2236 * configure.ac: Remove checks for the make program.
2237 * configure: Re-generate.
2238
2239 2016-10-28 Pedro Alves <palves@redhat.com>
2240
2241 * Makefile.in (CXX_DIALECT): Get from configure.
2242 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2243 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2244 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2245 * config.in: Regenerate.
2246 * configure: Regenerate.
2247
2248 2016-10-27 Yao Qi <yao.qi@linaro.org>
2249
2250 * linux-low.c (linux_supports_range_stepping): Return true if
2251 can_software_single_step return true.
2252
2253 2016-10-27 Yao Qi <yao.qi@linaro.org>
2254
2255 * inferiors.c (find_inferior_in_random): New function.
2256 * inferiors.h (find_inferior_in_random): Declare.
2257 * linux-low.c (linux_wait_for_event_filtered): Call
2258 find_inferior_in_random instead of find_inferior.
2259
2260 2016-10-27 Yao Qi <yao.qi@linaro.org>
2261
2262 * linux-low.c (linux_wait_1): If single-step breakpoints are
2263 inserted, remove them.
2264
2265 2016-10-26 Pedro Alves <palves@redhat.com>
2266
2267 * linux-low.c (handle_extended_wait): Link parent/child fork
2268 threads.
2269 (linux_wait_1): Unlink them.
2270 (linux_set_resume_request): Ignore resume requests for
2271 already-resumed and unhandled fork child threads.
2272 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2273 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2274 New functions.
2275 (handle_v_requests) <vCont>: Don't call require_running.
2276 * server.h (in_queued_stop_replies): New declaration.
2277
2278 2016-10-24 Yao Qi <yao.qi@linaro.org>
2279
2280 PR server/20733
2281 * linux-aarch64-low.c (append_insns): Cast the return value to
2282 'uint32_t *'.
2283
2284 2016-10-10 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2287
2288 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2289
2290 * target.c (target_supports_multi_process): New function, moved
2291 from...
2292 * target.h (target_supports_multi_process): ... here. Remove
2293 macro.
2294
2295 2016-10-05 Tom Tromey <tom@tromey.com>
2296
2297 PR remote/20655:
2298 * tracepoint.c (handle_tracepoint_bkpts): Check
2299 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2300
2301 2016-10-05 Yao Qi <yao.qi@linaro.org>
2302
2303 * configure.srv: Update the path of arm-*.xml files.
2304
2305 2016-10-05 Terry Guo <terry.guo@arm.com>
2306 Yao Qi <yao.qi@linaro.org>
2307
2308 * Makefile.in: Adjust the path of rules.
2309 * configure.srv: Update the path of xml files.
2310 * regformats/arm-with-iwmmxt.dat: Regenerated.
2311 * regformats/arm-with-neon.dat: Likewise.
2312 * regformats/arm-with-vfpv2.dat: Likewise.
2313 * regformats/arm-with-vfpv3.dat Likewise.
2314
2315 2016-09-30 Yao Qi <yao.qi@linaro.org>
2316
2317 PR gdbserver/20627
2318 * target.c (target_stop_and_wait): Don't call
2319 target_continue_no_signal, use resume_stop instead.
2320
2321 2016-09-26 Yao Qi <yao.qi@linaro.org>
2322
2323 * linux-low.c (linux_wait_1): Call debug_exit.
2324
2325 2016-09-23 Pedro Alves <palves@redhat.com>
2326
2327 * Makefile.in (SFILES): Add common/new-op.c.
2328 (OBS): Add common/new-op.o.
2329 (new-op.o): New rule.
2330
2331 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2332
2333 * .gitinore: Ignore more files.
2334
2335 2016-09-21 Yao Qi <yao.qi@linaro.org>
2336
2337 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2338 23.
2339
2340 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2341
2342 * server.c (start_inferior): Call target_mourn_inferior instead of
2343 mourn_inferior; pass ptid_t argument to it.
2344 (resume): Likewise.
2345 (handle_target_event): Likewise.
2346 * target.c (target_mourn_inferior): New function.
2347 * target.h (mourn_inferior): Delete macro.
2348
2349 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2350
2351 * linux-low.c (lwp_is_stepping): New function.
2352
2353 2016-09-06 Carl Love <cel@us.ibm.com>
2354
2355 * server.c (start_inferior): Fixed comment, requested comment change
2356 didn't get updated correctly. Removed reference to ptrace () call as
2357 it is only true on Linux systems.
2358
2359 2016-09-06 Carl Love <cel@us.ibm.com>
2360
2361 * server.c (start_inferior): Do not call
2362 function target_post_create_inferior () if the
2363 inferior process has already exited.
2364
2365 2016-09-05 Pedro Alves <palves@redhat.com>
2366
2367 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2368 (COMPILE.pre, CC_LD): Use CXX directly.
2369 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2370 * acinclude.m4: Don't include build-with-cxx.m4.
2371 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2372 * configure: Regenerate.
2373
2374 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2375
2376 PR gdb/19495
2377 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2378 call writing data to own_buf.
2379
2380 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2381
2382 * target.c (mywait): Call target_wait instead of
2383 the_target->wait.
2384 (target_wait): New function.
2385
2386 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2387
2388 * server.c (start_inferior): New variable 'ptid'. Replace calls
2389 to the_target->resume by target_continue{,_no_signal}, depending
2390 on the case.
2391 * target.c (target_stop_and_wait): Call target_continue_no_signal
2392 instead of the_target->resume.
2393 (target_continue): New function.
2394
2395 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2396
2397 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2398
2399 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2400
2401 PR server/20491
2402 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2403 ps_prochandle.
2404 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2405 * linux-arm-low.c (ps_get_thread_area): Likewise.
2406 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2407 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2408 * linux-mips-low.c (ps_get_thread_area): Likewise.
2409 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2410 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2411 * linux-x86-low.c (ps_get_thread_area): Likewise.
2412 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2413
2414 2016-08-19 Pedro Alves <palves@redhat.com>
2415
2416 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2417
2418 2016-08-19 Pedro Alves <palves@redhat.com>
2419
2420 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2421 comment. Use memcpy instead of casting through unsigned long.
2422
2423 2016-08-19 Pedro Alves <palves@redhat.com>
2424
2425 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2426 allocating around 0x80000000.
2427
2428 2016-08-19 Pedro Alves <palves@redhat.com>
2429
2430 PR gdb/20415
2431 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2432 (x32-avx512-linux-ipa.o): New rules.
2433 * configure.ac (x86_64-*-linux*): New x32 check.
2434 * configure.srv (ipa_x32_linux_regobj): New.
2435 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2436 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2437 descriptions.
2438 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2439 descriptions.
2440 * configure: Regenerate.
2441
2442 2016-08-09 Pedro Alves <palves@redhat.com>
2443
2444 PR gdb/18653
2445 * Makefile.in (OBS): Add signals-state-save-restore.o.
2446 (signals-state-save-restore.o): New rule.
2447 * config.in: Regenerate.
2448 * configure: Regenerate.
2449 * linux-low.c: Include "signals-state-save-restore.h".
2450 (linux_create_inferior): Call
2451 restore_original_signals_state.
2452 * server.c: Include "dispositions-save-restore.h".
2453 (captured_main): Call save_original_signals_state.
2454
2455 2016-08-05 Pedro Alves <palves@redhat.com>
2456
2457 * configure: Regenerate.
2458
2459 2016-08-04 Yao Qi <yao.qi@linaro.org>
2460
2461 * linux-low.c (regsets_fetch_inferior_registers): Check
2462 errno is ESRCH or not.
2463
2464 2016-08-02 Yao Qi <yao.qi@linaro.org>
2465
2466 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2467 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2468 (thread_db_load_search): Update.
2469 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2470 td_ta_set_event and td_ta_event_getmsg.
2471
2472 2016-07-26 Pedro Alves <palves@redhat.com>
2473
2474 PR server/20414
2475 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2476 of unsigned long for 64-bit registers and use uint32_t instead of
2477 unsigned int for 32-bit registers.
2478
2479 2016-07-26 Pedro Alves <palves@redhat.com>
2480
2481 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2482 to 'ptrace'.
2483
2484 2016-07-21 Tom Tromey <tom@tromey.com>
2485
2486 * configure: Rebuild.
2487
2488 2016-07-21 Yao Qi <yao.qi@linaro.org>
2489
2490 * mem-break.c (find_gdb_breakpoint): Cast bp to
2491 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2492
2493 2016-07-21 Yao Qi <yao.qi@linaro.org>
2494
2495 * server.c (handle_v_requests): Support s and S actions
2496 if target_supports_software_single_step return true.
2497
2498 2016-07-21 Yao Qi <yao.qi@linaro.org>
2499
2500 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2501 is resume_step, call maybe_hw_step.
2502 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2503 and unstop them.
2504 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2505 breakpoints or not.
2506 (proceed_one_lwp): If resume request is resume_step, install
2507 reinsert breakpoints and call maybe_hw_step.
2508
2509 2016-07-21 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-low.c (proceed_one_lwp): Declare.
2512 (linux_resume_one_thread): Remove local variable 'step'.
2513 Lift code enqueue signal. Call proceed_one_lwp instead of
2514 linux_resume_one_lwp.
2515
2516 2016-07-21 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-low.c (linux_resume_one_thread): Call
2519 enqueue_pending_signal.
2520
2521 2016-07-21 Yao Qi <yao.qi@linaro.org>
2522
2523 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2524 * inferiors.c (do_restore_current_thread_cleanup): New function.
2525 (make_cleanup_restore_current_thread): Likewise.
2526 * linux-low.c (install_software_single_step_breakpoints): Call
2527 make_cleanup_restore_current_thread. Switch current_thread to
2528 thread.
2529
2530 2016-07-21 Yao Qi <yao.qi@linaro.org>
2531
2532 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2533 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2534 (clone_one_breakpoint): Likewise.
2535 (delete_reinsert_breakpoints): Change parameter to thread.
2536 Callers updated.
2537 (has_reinsert_breakpoints): Likewise.
2538 (uninsert_reinsert_breakpoints): Likewise.
2539 (reinsert_reinsert_breakpoints): Likewise.
2540 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2541 (delete_reinsert_breakpoints): Likewise.
2542 (reinsert_reinsert_breakpoints): Likewise.
2543 (uninsert_reinsert_breakpoints): Likewise.
2544 (has_reinsert_breakpoints): Likewise.
2545
2546 2016-07-21 Yao Qi <yao.qi@linaro.org>
2547
2548 * inferiors.c (get_thread_process): Make parameter const.
2549 * inferiors.h (get_thread_process): Update declaration.
2550 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2551 Add new parameters child_thread and parent_thread. Callers
2552 updated.
2553 * mem-break.h (clone_all_breakpoints): Update declaration.
2554
2555 2016-07-21 Yao Qi <yao.qi@linaro.org>
2556
2557 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2558 <command_list, handler>: Remove.
2559 (struct gdb_breakpoint): New.
2560 (struct other_breakpoint): New.
2561 (struct reinsert_breakpoint): New.
2562 (is_gdb_breakpoint): New function.
2563 (any_persistent_commands): Update command_list if
2564 is_gdb_breakpoint returns true.
2565 (set_breakpoint): Create breakpoints according to their types.
2566 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2567 (set_gdb_breakpoint_1): Likewise.
2568 (set_gdb_breakpoint): Likewise.
2569 (clear_breakpoint_conditions): Change parameter type to
2570 'struct gdb_breakpoint *'.
2571 (clear_breakpoint_commands): Likewise.
2572 (clear_breakpoint_conditions_and_commands): Likewise.
2573 (add_condition_to_breakpoint): Likewise.
2574 (add_breakpoint_condition): Likewise.
2575 (add_commands_to_breakpoint): Likewise.
2576 (check_breakpoints): Check other_breakpoint.
2577 (clone_one_breakpoint): Clone breakpopint according to its type.
2578 * mem-break.h (struct gdb_breakpoint): Declare.
2579 (set_gdb_breakpoint): Update declaration.
2580 (clear_breakpoint_conditions_and_commands): Likewise.
2581 (add_breakpoint_condition): Likewise.
2582 (add_breakpoint_commands): Likewise.
2583 * server.c (process_point_options): Change parameter type to
2584 'struct gdb_breakpoint *'.
2585
2586 2016-07-21 Yao Qi <yao.qi@linaro.org>
2587
2588 * mem-break.c (set_breakpoint_at): Rename it to ...
2589 (set_breakpoint_type_at): ... it.
2590 (set_breakpoint_at): Call set_breakpoint_type_at.
2591 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2592 * mem-break.h (set_breakpoint_at): Update comments.
2593
2594 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2595
2596 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2597 to buf parameter.
2598 (nios2_store_gregset): Likewise.
2599
2600 2016-07-01 Pedro Alves <palves@redhat.com>
2601 Antoine Tremblay <antoine.tremblay@ericsson.com>
2602
2603 * linux-low.c: Change interface to take the target lwp_info
2604 pointer directly and return void. Handle detaching from a zombie
2605 thread.
2606 (linux_detach_lwp_callback): New function.
2607 (linux_detach): Detach from the leader thread after detaching from
2608 the clone threads.
2609
2610 2016-06-28 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2613 for variable new_offset.
2614 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2615 (aarch64_ftrace_insn_reloc_cb): Likewise.
2616 (aarch64_ftrace_insn_reloc_tb): Likewise.
2617 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2618 PRIx64 instead of PRIx32.
2619
2620 2016-06-28 Yao Qi <yao.qi@linaro.org>
2621
2622 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2623 (the_low_target): Install arm_get_syscall_trapinfo.
2624
2625 2016-06-28 Yao Qi <yao.qi@linaro.org>
2626
2627 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2628 function.
2629 (the_low_target): Install aarch64_get_syscall_trapinfo.
2630
2631 2016-06-28 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2634 Callers updated.
2635 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2636 Remove parameter sysno.
2637 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2638 sysret.
2639
2640 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2641
2642 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2643 (s390_emit_ne_goto): Likewise.
2644 (s390_emit_lt_goto): Likewise.
2645 (s390_emit_le_goto): Likewise.
2646 (s390_emit_gt_goto): Likewise.
2647 (s390_emit_ge_goto): Likewise.
2648 (s390x_emit_eq_goto): Likewise.
2649 (s390x_emit_ne_goto): Likewise.
2650 (s390x_emit_lt_goto): Likewise.
2651 (s390x_emit_le_goto): Likewise.
2652 (s390x_emit_gt_goto): Likewise.
2653 (s390x_emit_ge_goto): Likewise.
2654 (s390_emit_ops_impl): Mark variable static.
2655 (s390x_emit_ops): Likewise.
2656
2657 2016-06-17 Yao Qi <yao.qi@linaro.org>
2658
2659 * linux-low.c (handle_extended_wait): Call
2660 uninsert_reinsert_breakpoints for the parent process. Remove
2661 reinsert breakpoints from the child process. Reinsert them to
2662 the parent process when vfork is done.
2663 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2664 (reinsert_reinsert_breakpoints): New function.
2665 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2666 (reinsert_reinsert_breakpoints): Declare.
2667
2668 2016-06-17 Yao Qi <yao.qi@linaro.org>
2669
2670 * linux-low.c (handle_extended_wait): If the parent is doing
2671 step-over, remove the reinsert breakpoints from the forked child.
2672
2673 2016-06-17 Yao Qi <yao.qi@linaro.org>
2674
2675 * linux-low.c (unsuspend_all_lwps): Declare.
2676 (linux_low_filter_event): If thread exited, call finish_step_over.
2677 If step-over is finished, unsuspend other threads.
2678
2679 2016-06-17 Yao Qi <yao.qi@linaro.org>
2680
2681 * linux-low.c (linux_resume_one_lwp_throw): Assert
2682 has_reinsert_breakpoints returns false.
2683 * mem-break.c (delete_disabled_breakpoints): Assert
2684 bp type isn't reinsert_breakpoint.
2685
2686 2016-06-17 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-low.c (maybe_hw_step): New function.
2689 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2690 (finish_step_over): Switch current_thread to lwp temporarily,
2691 and assert has_reinsert_breakpoints returns true.
2692 (proceed_one_lwp): Call maybe_hw_step.
2693 * mem-break.c (has_reinsert_breakpoints): New function.
2694 * mem-break.h (has_reinsert_breakpoints): Declare.
2695
2696 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2697
2698 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2699
2700 2016-05-17 Yao Qi <yao.qi@linaro.org>
2701
2702 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2703 instead of find_inferior.
2704
2705 2016-05-05 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2708 Initialize res to zero.
2709
2710 2016-05-05 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2713 to uint32_t.
2714
2715 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2716
2717 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2718 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2719 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2720
2721 2016-04-28 Par Olsson <par.olsson@windriver.com>
2722 Simon Marchi <simon.marchi@ericsson.com>
2723
2724 * tracepoint.c (write_inferior_int8): New function.
2725 (cmd_qtenable_disable): Write enable flag using
2726 write_inferior_int8.
2727
2728 2016-04-25 Yao Qi <yao.qi@linaro.org>
2729
2730 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2731 (need_step_over_p): Return zero if the LWP has pending signals
2732 can be delivered on software single step target.
2733
2734 2016-04-25 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2737 return instead of error.
2738
2739 2016-04-22 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2742 to 23.
2743
2744 2016-04-22 Yao Qi <yao.qi@linaro.org>
2745
2746 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2747 signal when stepping over breakpoint with software single
2748 step.
2749
2750 2016-04-21 Pedro Alves <palves@redhat.com>
2751
2752 * linux-s390-low.c (s390_collect_ptrace_register)
2753 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2754 add casts.
2755 (s390_check_regset): Use void * instead of gdb_byte *.
2756
2757 2016-04-20 Pedro Alves <palves@redhat.com>
2758
2759 * configure: Renegerate.
2760
2761 2016-04-20 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2764 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2765 number 16.
2766 (arm_store_gregset): Likewise.
2767
2768 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2769
2770 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2771 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2772 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2773 (amd64-avx-mpx-linux.c): New rules.
2774 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2775 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2776 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2777 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2778 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2779 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2780 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2783 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2784 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2785 * linux-x86-low.c (x86_linux_read_description): Add case for
2786 X86_XSTATE_AVX_MPX_MASK.
2787 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2788 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2789 init_registers_i386_avx_mpx_linux.
2790 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2791 (initialize_low_tracepoint): Call
2792 init_registers_i386_avx_mpx_linux.
2793 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2794 (initialize_low_tracepoint): Call
2795 init_registers_amd64_avx_mpx_linux.
2796 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2797 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2798 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2799 declarations.
2800
2801 2016-04-18 Pedro Alves <palves@redhat.com>
2802
2803 * configure: Regenerate.
2804
2805 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2806
2807 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2808 (aarch64_emit_sub): Likewise.
2809
2810 2016-04-12 Pedro Alves <palves@redhat.com>
2811
2812 * utils.c (prepare_to_throw_exception): Delete.
2813
2814 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2815
2816 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2817
2818 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2819
2820 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2821
2822 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2823
2824 * linux-aarch64-ipa.c: Add <elf.h> include.
2825 * linux-ppc-ipa.c: Add <elf.h> include.
2826 * linux-s390-ipa.c: Add <elf.h> include.
2827
2828 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2829
2830 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2831 (get_raw_reg_ptr): Likewise.
2832 (get_trace_state_variable_value_ptr): Likewise.
2833 (set_trace_state_variable_value_ptr): Likewise.
2834 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2835 char *.
2836
2837 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2838 Marcin Kościelnicki <koriakin@0x04.net>
2839
2840 PR/17221
2841 * linux-ppc-low.c (emit_insns): New function.
2842 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2843 (ppc_emit_prologue): New function.
2844 (ppc_emit_epilogue): New function.
2845 (ppc_emit_add): New function.
2846 (ppc_emit_sub): New function.
2847 (ppc_emit_mul): New function.
2848 (ppc_emit_lsh): New function.
2849 (ppc_emit_rsh_signed): New function.
2850 (ppc_emit_rsh_unsigned): New function.
2851 (ppc_emit_ext): New function.
2852 (ppc_emit_zero_ext): New function.
2853 (ppc_emit_log_not): New function.
2854 (ppc_emit_bit_and): New function.
2855 (ppc_emit_bit_or): New function.
2856 (ppc_emit_bit_xor): New function.
2857 (ppc_emit_bit_not): New function.
2858 (ppc_emit_equal): New function.
2859 (ppc_emit_less_signed): New function.
2860 (ppc_emit_less_unsigned): New function.
2861 (ppc_emit_ref): New function.
2862 (ppc_emit_const): New function.
2863 (ppc_emit_reg): New function.
2864 (ppc_emit_pop): New function.
2865 (ppc_emit_stack_flush): New function.
2866 (ppc_emit_swap): New function.
2867 (ppc_emit_stack_adjust): New function.
2868 (ppc_emit_call): New function.
2869 (ppc_emit_int_call_1): New function.
2870 (ppc_emit_void_call_2): New function.
2871 (ppc_emit_if_goto): New function.
2872 (ppc_emit_goto): New function.
2873 (ppc_emit_eq_goto): New function.
2874 (ppc_emit_ne_goto): New function.
2875 (ppc_emit_lt_goto): New function.
2876 (ppc_emit_le_goto): New function.
2877 (ppc_emit_gt_goto): New function.
2878 (ppc_emit_ge_goto): New function.
2879 (ppc_write_goto_address): New function.
2880 (ppc_emit_ops_impl): New static variable.
2881 (ppc64v1_emit_prologue): New function.
2882 (ppc64v2_emit_prologue): New function.
2883 (ppc64_emit_epilogue): New function.
2884 (ppc64_emit_add): New function.
2885 (ppc64_emit_sub): New function.
2886 (ppc64_emit_mul): New function.
2887 (ppc64_emit_lsh): New function.
2888 (ppc64_emit_rsh_signed): New function.
2889 (ppc64_emit_rsh_unsigned): New function.
2890 (ppc64_emit_ext): New function.
2891 (ppc64_emit_zero_ext): New function.
2892 (ppc64_emit_log_not): New function.
2893 (ppc64_emit_bit_and): New function.
2894 (ppc64_emit_bit_or): New function.
2895 (ppc64_emit_bit_xor): New function.
2896 (ppc64_emit_bit_not): New function.
2897 (ppc64_emit_equal): New function.
2898 (ppc64_emit_less_signed): New function.
2899 (ppc64_emit_less_unsigned): New function.
2900 (ppc64_emit_ref): New function.
2901 (ppc64_emit_const): New function.
2902 (ppc64v1_emit_reg): New function.
2903 (ppc64v2_emit_reg): New function.
2904 (ppc64_emit_pop): New function.
2905 (ppc64_emit_stack_flush): New function.
2906 (ppc64_emit_swap): New function.
2907 (ppc64v1_emit_call): New function.
2908 (ppc64v2_emit_call): New function.
2909 (ppc64v1_emit_int_call_1): New function.
2910 (ppc64v2_emit_int_call_1): New function.
2911 (ppc64v1_emit_void_call_2): New function.
2912 (ppc64v2_emit_void_call_2): New function.
2913 (ppc64_emit_if_goto): New function.
2914 (ppc64_emit_eq_goto): New function.
2915 (ppc64_emit_ne_goto): New function.
2916 (ppc64_emit_lt_goto): New function.
2917 (ppc64_emit_le_goto): New function.
2918 (ppc64_emit_gt_goto): New function.
2919 (ppc64_emit_ge_goto): New function.
2920 (ppc64v1_emit_ops_impl): New static variable.
2921 (ppc64v2_emit_ops_impl): New static variable.
2922 (ppc_emit_ops): New function.
2923 (linux_low_target): Wire in ppc_emit_ops.
2924
2925 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2926 Marcin Kościelnicki <koriakin@0x04.net>
2927
2928 PR/17221
2929 * Makefile.in: Add powerpc-*-ipa.o
2930 * configure.srv: Add ipa_obj for powerpc*-linux.
2931 * linux-ppc-ipa.c: New file.
2932 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2933 includes.
2934 (PPC_FIELD): New macro.
2935 (PPC_SEXT): New macro.
2936 (PPC_OP6): New macro.
2937 (PPC_BO): New macro.
2938 (PPC_LI): New macro.
2939 (PPC_BD): New macro.
2940 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2941 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2942 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2943 (ppc_get_thread_area): New function.
2944 (is_elfv2_inferior): New function.
2945 (gen_ds_form): New function.
2946 (GEN_STD): New macro.
2947 (GEN_STDU): New macro.
2948 (GEN_LD): New macro.
2949 (GEN_LDU): New macro.
2950 (gen_d_form): New function.
2951 (GEN_ADDI): New macro.
2952 (GEN_ADDIS): New macro.
2953 (GEN_LI): New macro.
2954 (GEN_LIS): New macro.
2955 (GEN_ORI): New macro.
2956 (GEN_ORIS): New macro.
2957 (GEN_LWZ): New macro.
2958 (GEN_STW): New macro.
2959 (GEN_STWU): New macro.
2960 (gen_xfx_form): New function.
2961 (GEN_MFSPR): New macro.
2962 (GEN_MTSPR): New macro.
2963 (GEN_MFCR): New macro.
2964 (GEN_MTCR): New macro.
2965 (GEN_SYNC): New macro.
2966 (GEN_LWSYNC): New macro.
2967 (gen_x_form): New function.
2968 (GEN_OR): New macro.
2969 (GEN_MR): New macro.
2970 (GEN_LWARX): New macro.
2971 (GEN_STWCX): New macro.
2972 (GEN_CMPW): New macro.
2973 (gen_md_form): New function.
2974 (GEN_RLDICL): New macro.
2975 (GEN_RLDICR): New macro.
2976 (gen_i_form): New function.
2977 (GEN_B): New macro.
2978 (GEN_BL): New macro.
2979 (gen_b_form): New function.
2980 (GEN_BNE): New macro.
2981 (GEN_LOAD): New macro.
2982 (GEN_STORE): New macro.
2983 (gen_limm): New function.
2984 (gen_atomic_xchg): New function.
2985 (gen_call): New function.
2986 (ppc_relocate_instruction): New function.
2987 (ppc_install_fast_tracepoint_jump_pad): New function.
2988 (ppc_get_min_fast_tracepoint_insn_len): New function.
2989 (ppc_get_ipa_tdesc_idx): New function.
2990 (the_low_target): Wire in the new functions.
2991 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2992 tdescs.
2993 * linux-ppc-tdesc.h: New file.
2994
2995 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2996
2997 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2998 (alloc_jump_pad_buffer): New function.
2999 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3000 (alloc_jump_pad_buffer): New function.
3001 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3002 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3003 (alloc_jump_pad_buffer): New function.
3004 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3005 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3006 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3007 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3008
3009 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3010
3011 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3012 * linux-amd64-ipa.c: Likewise.
3013 * linux-i386-ipa.c: Likewise.
3014 * linux-s390-ipa.c: Likewise.
3015 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3016 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3017 set_trace_state_variable_value_ptr.
3018 (struct ipa_sym_addresses): Likewise.
3019 (symbol_list): Likewise.
3020 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3021 accessing gdb_collect directly.
3022 (gdb_collect_ptr_type): New typedef.
3023 (get_raw_reg_ptr_type): New typedef.
3024 (get_trace_state_variable_value_ptr_type): New typedef.
3025 (set_trace_state_variable_value_ptr_type): New typedef.
3026 (gdb_collect_ptr): New global.
3027 (get_raw_reg_ptr): New global.
3028 (get_trace_state_variable_value_ptr): New global.
3029 (set_trace_state_variable_value_ptr): New global.
3030 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3031 accessing get_raw_reg directly.
3032 (get_get_tsv_func_addr): Likewise for
3033 get_trace_state_variable_value_ptr.
3034 (get_set_tsv_func_addr): Likewise for
3035 set_trace_state_variable_value_ptr.
3036 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3037
3038 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3039
3040 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3041
3042 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3043
3044 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3045 packets.
3046 (relocate_instruction): Remove own_buf.
3047 * server.c (own_buf): Make global.
3048 (handle_v_requests): Make global.
3049 * server.h (own_buf): New declaration.
3050 (handle_v_requests): New prototype.
3051
3052 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3053
3054 PR 18377
3055 * linux-s390-low.c (add_insns): New function.
3056 (s390_emit_prologue): New function.
3057 (s390_emit_epilogue): New function.
3058 (s390_emit_add): New function.
3059 (s390_emit_sub): New function.
3060 (s390_emit_mul): New function.
3061 (s390_emit_lsh): New function.
3062 (s390_emit_rsh_signed): New function.
3063 (s390_emit_rsh_unsigned): New function.
3064 (s390_emit_ext): New function.
3065 (s390_emit_log_not): New function.
3066 (s390_emit_bit_and): New function.
3067 (s390_emit_bit_or): New function.
3068 (s390_emit_bit_xor): New function.
3069 (s390_emit_bit_not): New function.
3070 (s390_emit_equal): New function.
3071 (s390_emit_less_signed): New function.
3072 (s390_emit_less_unsigned): New function.
3073 (s390_emit_ref): New function.
3074 (s390_emit_if_goto): New function.
3075 (s390_emit_goto): New function.
3076 (s390_write_goto_address): New function.
3077 (s390_emit_litpool): New function.
3078 (s390_emit_const): New function.
3079 (s390_emit_call): New function.
3080 (s390_emit_reg): New function.
3081 (s390_emit_pop): New function.
3082 (s390_emit_stack_flush): New function.
3083 (s390_emit_zero_ext): New function.
3084 (s390_emit_swap): New function.
3085 (s390_emit_stack_adjust): New function.
3086 (s390_emit_set_r2): New function.
3087 (s390_emit_int_call_1): New function.
3088 (s390_emit_void_call_2): New function.
3089 (s390_emit_eq_goto): New function.
3090 (s390_emit_ne_goto): New function.
3091 (s390_emit_lt_goto): New function.
3092 (s390_emit_le_goto): New function.
3093 (s390_emit_gt_goto): New function.
3094 (s390_emit_ge_goto): New function.
3095 (s390x_emit_prologue): New function.
3096 (s390x_emit_epilogue): New function.
3097 (s390x_emit_add): New function.
3098 (s390x_emit_sub): New function.
3099 (s390x_emit_mul): New function.
3100 (s390x_emit_lsh): New function.
3101 (s390x_emit_rsh_signed): New function.
3102 (s390x_emit_rsh_unsigned): New function.
3103 (s390x_emit_ext): New function.
3104 (s390x_emit_log_not): New function.
3105 (s390x_emit_bit_and): New function.
3106 (s390x_emit_bit_or): New function.
3107 (s390x_emit_bit_xor): New function.
3108 (s390x_emit_bit_not): New function.
3109 (s390x_emit_equal): New function.
3110 (s390x_emit_less_signed): New function.
3111 (s390x_emit_less_unsigned): New function.
3112 (s390x_emit_ref): New function.
3113 (s390x_emit_if_goto): New function.
3114 (s390x_emit_const): New function.
3115 (s390x_emit_call): New function.
3116 (s390x_emit_reg): New function.
3117 (s390x_emit_pop): New function.
3118 (s390x_emit_stack_flush): New function.
3119 (s390x_emit_zero_ext): New function.
3120 (s390x_emit_swap): New function.
3121 (s390x_emit_stack_adjust): New function.
3122 (s390x_emit_int_call_1): New function.
3123 (s390x_emit_void_call_2): New function.
3124 (s390x_emit_eq_goto): New function.
3125 (s390x_emit_ne_goto): New function.
3126 (s390x_emit_lt_goto): New function.
3127 (s390x_emit_le_goto): New function.
3128 (s390x_emit_gt_goto): New function.
3129 (s390x_emit_ge_goto): New function.
3130 (s390_emit_ops): New function.
3131 (struct linux_target_ops): Fill in emit_ops hook.
3132
3133 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3134
3135 PR 18377
3136 * Makefile.in: Add s390 IPA files.
3137 * configure.srv: Build IPA for s390.
3138 * linux-s390-ipa.c: New file.
3139 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3140 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3141 (tdesc_s390_linux32): Likewise.
3142 (init_registers_s390_linux32v1): Likewise.
3143 (tdesc_s390_linux32v1): Likewise.
3144 (init_registers_s390_linux32v2): Likewise.
3145 (tdesc_s390_linux32v2): Likewise.
3146 (init_registers_s390_linux64): Likewise.
3147 (tdesc_s390_linux64): Likewise.
3148 (init_registers_s390_linux64v1): Likewise.
3149 (tdesc_s390_linux64v1): Likewise.
3150 (init_registers_s390_linux64v2): Likewise.
3151 (tdesc_s390_linux64v2): Likewise.
3152 (init_registers_s390_te_linux64): Likewise.
3153 (tdesc_s390_te_linux64): Likewise.
3154 (init_registers_s390_vx_linux64): Likewise.
3155 (tdesc_s390_vx_linux64): Likewise.
3156 (init_registers_s390_tevx_linux64): Likewise.
3157 (tdesc_s390_tevx_linux64): Likewise.
3158 (init_registers_s390x_linux64): Likewise.
3159 (tdesc_s390x_linux64): Likewise.
3160 (init_registers_s390x_linux64v1): Likewise.
3161 (tdesc_s390x_linux64v1): Likewise.
3162 (init_registers_s390x_linux64v2): Likewise.
3163 (tdesc_s390x_linux64v2): Likewise.
3164 (init_registers_s390x_te_linux64): Likewise.
3165 (tdesc_s390x_te_linux64): Likewise.
3166 (init_registers_s390x_vx_linux64): Likewise.
3167 (tdesc_s390x_vx_linux64): Likewise.
3168 (init_registers_s390x_tevx_linux64): Likewise.
3169 (tdesc_s390x_tevx_linux64): Likewise.
3170 (have_hwcap_s390_vx): New static variable.
3171 (s390_arch_setup): Fill have_hwcap_s390_vx.
3172 (s390_get_thread_area): New function.
3173 (s390_ft_entry_gpr_esa): New const.
3174 (s390_ft_entry_gpr_zarch): New const.
3175 (s390_ft_entry_misc): New const.
3176 (s390_ft_entry_fr): New const.
3177 (s390_ft_entry_vr): New const.
3178 (s390_ft_main_31): New const.
3179 (s390_ft_main_64): New const.
3180 (s390_ft_exit_fr): New const.
3181 (s390_ft_exit_vr): New const.
3182 (s390_ft_exit_misc): New const.
3183 (s390_ft_exit_gpr_esa): New const.
3184 (s390_ft_exit_gpr_zarch): New const.
3185 (append_insns): New function.
3186 (s390_relocate_instruction): New function.
3187 (s390_install_fast_tracepoint_jump_pad): New function.
3188 (s390_get_min_fast_tracepoint_insn_len): New function.
3189 (s390_get_ipa_tdesc_idx): New function.
3190 (struct linux_target_ops): Wire in the above functions.
3191 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3192 * linux-s390-tdesc.h: New file.
3193
3194 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3195
3196 * linux-s390-low.c (s390_supports_tracepoints): New function.
3197 (struct linux_target_ops): Fill supports_tracepoints hook.
3198
3199 2016-03-18 Yao Qi <yao.qi@linaro.org>
3200
3201 * linux-low.c (lwp_signal_can_be_delivered): New function.
3202 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3203
3204 2016-03-18 Yao Qi <yao.qi@linaro.org>
3205
3206 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3207 0 if signal is enqueued. Remove 'signal' from one debugging
3208 message. Move one debugging message to some lines below.
3209 Remove code setting 'signal' to 0.
3210
3211 2016-03-18 Yao Qi <yao.qi@linaro.org>
3212
3213 * linux-low.c (linux_low_filter_event): Remove redundant
3214 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3215
3216 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3217
3218 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3219 (struct linux_target_ops): Wire in the above.
3220
3221 2016-03-03 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-low.c: Update comments to start_step_over.
3224
3225 2016-03-03 Yao Qi <yao.qi@linaro.org>
3226
3227 PR server/19736
3228 * linux-low.c (handle_extended_wait): Set child suspended
3229 if event_lwp->bp_reinsert isn't zero.
3230
3231 2016-03-02 Yao Qi <yao.qi@linaro.org>
3232
3233 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3234 enqueue_pending_signal.
3235
3236 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3237
3238 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3239 is actually loaded.
3240
3241 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3242
3243 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3244 (s390_regmap_3264) [!__s390x__]: New global.
3245 (s390_collect_ptrace_register): Skip map entries containing -1.
3246 (s390_supply_ptrace_register): Ditto.
3247 (s390_fill_gprs_high): New function.
3248 (s390_store_gprs_high): New function.
3249 (s390_regsets): Add NT_S390_HIGH_GPRS.
3250 (s390_get_hwcap): Enable on 31-bit.
3251 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3252 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3253 Detect NT_S390_HIGH_GPRS.
3254 (s390_usrregs_info_3264): Enable on 31-bit.
3255 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3256 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3257
3258 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3259
3260 PR gdb/13808
3261 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3262 * configure.srv: Ditto.
3263 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3264 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3265 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3266 (init_registers_amd64_linux): Remove prototype.
3267 (tdesc_amd64_linux): Remove declaration.
3268 (get_ipa_tdesc): New function.
3269 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3270 initialize remaining tdescs.
3271 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3272 (init_registers_i386_linux): Remove prototype.
3273 (tdesc_i386_linux): Remove declaration.
3274 (get_ipa_tdesc): New function.
3275 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3276 initialize remaining tdescs.
3277 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3278 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3279 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3280 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3281 (x86_get_ipa_tdesc_idx): New function.
3282 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3283 * linux-x86-tdesc.h: New file.
3284 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3285 (target_get_ipa_tdesc_idx): New macro.
3286 * tracepoint.c (ipa_tdesc_idx): New macro.
3287 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3288 (symbol_list): Add ipa_tdesc_idx.
3289 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3290 (ipa_tdesc): Remove.
3291 (ipa_tdesc_idx): New variable.
3292 (get_context_regcache): Use get_ipa_tdesc.
3293 (gdb_collect): Ditto.
3294 (gdb_probe): Ditto.
3295 * tracepoint.h (get_ipa_tdesc): New prototype.
3296 (ipa_tdesc): Remove.
3297
3298 2016-02-24 Pedro Alves <palves@redhat.com>
3299
3300 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3301 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3302 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3303 Factor out common code between the USE_SIGTRAP_SIGINFO and
3304 !USE_SIGTRAP_SIGINFO blocks.
3305 (linux_low_filter_event): Call save_stop_reason instead of
3306 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3307 Update comments.
3308 (linux_wait_1): Update comments.
3309
3310 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3311
3312 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3313 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3314 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3315 ppc_insert_point, ppc_remove_point.
3316
3317 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3318
3319 * linux-s390-low.c (s390_supports_z_point_type): New function.
3320 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3321
3322 2016-02-16 Yao Qi <yao.qi@linaro.org>
3323
3324 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3325 PC. Get pc from regcache_read_pc.
3326
3327 2016-02-12 Yao Qi <yao.qi@linaro.org>
3328
3329 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3330 or linux_get_pc_32bit.
3331 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3332
3333 2016-02-12 Yao Qi <yao.qi@linaro.org>
3334
3335 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3336 arm_linux_get_next_pcs_fixup.
3337
3338 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3339
3340 * tracepoint.c (x_tracepoint_action_download): Change
3341 write_inferior_data_ptr to write_inferior_data_pointer.
3342 (cmd_qtstart): Likewise.
3343 (write_inferior_data_ptr): Remove.
3344 (download_agent_expr): Change write_inferior_data_ptr to
3345 write_inferior_data_pointer.
3346 (download_tracepoint_1): Likewise.
3347 (download_tracepoint): Likewise.
3348 (download_trace_state_variables): Likewise.
3349
3350 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3351 Marcin Kościelnicki <koriakin@0x04.net>
3352
3353 * tracepoint.c (struct tracepoint_action_ops): Remove.
3354 (struct tracepoint_action): Remove ops.
3355 (m_tracepoint_action_download, r_tracepoint_action_download)
3356 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3357 size and offset accordingly.
3358 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3359 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3360 (tracepoint_action_send, tracepoint_action_download): New functions.
3361 Helpers for trace action handlers.
3362 (add_tracepoint_action): Remove setup actions ops.
3363 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3364
3365 2016-02-10 Yao Qi <yao.qi@linaro.org>
3366
3367 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3368
3369 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3370
3371 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3372 to AC_OUTPUT.
3373 * configure: Regenerate.
3374
3375 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3378 void * to gdb_byte *.
3379 * linux-low.c (siginfo_fixup): Likewise.
3380 (linux_xfer_siginfo): Likewise.
3381 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3382 Likewise.
3383 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3384
3385 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3386
3387 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3388 to srv_tgtobj.
3389 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3390 to srv_tgtobj.
3391 * linux-x86-low.c [__x86_64__]: Include
3392 "nat/amd64-linux-siginfo.h".
3393 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3394 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3395 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3396 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3397 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3398 (cpt_si_fd, si_timerid, si_overrun): Move from
3399 nat/amd64-linux-siginfo.c.
3400 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3401
3402 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3403
3404 * server.c (skip_to_semicolon): Remove.
3405 (process_point_options): Use strchrnul instead of
3406 skip_to_semicolon.
3407
3408 2016-01-26 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3411 * linux-low.c (install_software_single_step_breakpoints): Don't
3412 call regcache_read_pc.
3413 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3414 argument pc.
3415
3416 2016-01-26 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-low.c (install_software_single_step_breakpoints): Call
3419 regcache_read_pc instead of get_pc.
3420
3421 2016-01-26 Yao Qi <yao.qi@linaro.org>
3422
3423 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3424 (unblock_async_io): Rename to ...
3425 (block_unblock_async_io): ... it. New function.
3426 (enable_async_io): Don't install SIGIO handler. Unblock it
3427 instead.
3428 (disable_async_io): Don't ignore SIGIO. Block it instead.
3429 (initialize_async_io): Install SIGIO handler. Don't call
3430 unblock_async_io.
3431
3432 2016-01-26 Yao Qi <yao.qi@linaro.org>
3433
3434 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3435 first character is '\003', call *the_target->request_interrupt.
3436
3437 2016-01-25 Yao Qi <yao.qi@linaro.org>
3438
3439 * remote-utils.c (new_thread_notify): Remove.
3440 (dead_thread_notify): Likewise.
3441 * remote-utils.h (new_thread_notify): Remove declaration.
3442 (dead_thread_notify): Likewise.
3443
3444 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3445
3446 * gdb.trace/pending.exp: Fix expected message on continue.
3447
3448 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3449
3450 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3451 it works properly on big-endian machines where sizeof (CORE_ADDR)
3452 != sizeof (void *).
3453
3454 2016-01-21 Pedro Alves <palves@redhat.com>
3455
3456 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3457 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3458 * configure: Regenerate.
3459
3460 2016-01-21 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3463 is_thumb and set it according to CPSR saved on the stack.
3464 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3465 arm_sigreturn_next_pc.
3466
3467 2016-01-18 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-low.c (linux_set_pc_64bit): New function.
3470 (linux_get_pc_64bit): New function.
3471 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3472 Declare.
3473 * linux-sparc-low.c (debug_threads): Remove declaration.
3474 (sparc_get_pc): Remove.
3475 (the_low_target): Use linux_get_pc_64bit instead of
3476 sparc_get_pc.
3477 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3478 (the_low_target): Use linux_get_pc_64bit and
3479 linux_set_pc_64bit.
3480
3481 2016-01-18 Yao Qi <yao.qi@linaro.org>
3482
3483 * linux-arm-low.c (debug_threads): Remove declaration.
3484 (arm_get_pc, arm_set_pc): Remove.
3485 (the_low_target): Use linux_get_pc_32bit and
3486 linux_set_pc_32bit.
3487 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3488 (the_low_target): Use linux_get_pc_32bit and
3489 linux_set_pc_32bit.
3490 * linux-cris-low.c (debug_threads): Remove declaration.
3491 (cris_get_pc, cris_set_pc,): Remove.
3492 (the_low_target): Use linux_get_pc_32bit and
3493 linux_set_pc_32bit.
3494 * linux-crisv32-low.c (debug_threads): Remove declaration.
3495 (cris_get_pc, cris_set_pc): Remove.
3496 (the_low_target): Use linux_get_pc_32bit and
3497 linux_set_pc_32bit.
3498 * linux-low.c: Include inttypes.h.
3499 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3500 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3501 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3502 (the_low_target): Use linux_get_pc_32bit and
3503 linux_set_pc_32bit.
3504 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3505 (the_low_target): Use linux_get_pc_32bit and
3506 linux_set_pc_32bit.
3507 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3508 (the_low_target): Use linux_get_pc_32bit and
3509 linux_set_pc_32bit.
3510 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3511 (the_low_target): Use linux_get_pc_32bit and
3512 linux_set_pc_32bit.
3513 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3514 (the_low_target): Use linux_get_pc_32bit and
3515 linux_set_pc_32bit.
3516
3517 2016-01-18 Gary Benson <gbenson@redhat.com>
3518
3519 * configure.ac (AC_FUNC_FORK): New check.
3520 * config.in: Regenerate.
3521 * configure: Likewise.
3522
3523 2016-01-14 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3526 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3527 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3528 arm_get_next_pcs_ctor.
3529
3530 2016-01-12 Josh Stone <jistone@redhat.com>
3531 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3532
3533 * inferiors.h: Include "gdb_vecs.h".
3534 (struct process_info): Add syscalls_to_catch.
3535 * inferiors.c (remove_process): Free syscalls_to_catch.
3536 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3537 syscall_return stops.
3538 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3539 * server.c (handle_general_set): Handle QCatchSyscalls.
3540 (handle_query): Report support for QCatchSyscalls.
3541 * target.h (struct target_ops): Add supports_catch_syscall.
3542 (target_supports_catch_syscall): New macro.
3543 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3544 (struct lwp_info): Add syscall_state.
3545 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3546 Maintain syscall_state and syscalls_to_catch across exec.
3547 (get_syscall_trapinfo): New function, proxy to the_low_target.
3548 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3549 (linux_low_filter_event): Toggle syscall_state entry/return for
3550 syscall traps, and set it ignored for all others.
3551 (gdb_catching_syscalls_p): New function.
3552 (gdb_catch_this_syscall_p): New function.
3553 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3554 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3555 (linux_supports_catch_syscall): New function.
3556 (linux_target_ops): Install it.
3557 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3558 (the_low_target): Install it.
3559
3560 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3561
3562 * acinclude.m4: Include new ../warning.m4 file.
3563 * configure: Regenerated.
3564 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3565
3566 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3567
3568 * ax.c (is_goto_target): Mark static.
3569 * linux-low.c (register_addr): Likewise.
3570 (linux_fetch_registers, linux_store_registers): Likewise.
3571 * mem-break.c (any_persistent_commands): Fix old prototype.
3572 (add_commands_to_breakpoint): Mark static.
3573 * regcache.c (find_register_by_name): Delete unused func.
3574 * remote-utils.c (hex_or_minus_one): Mark static.
3575 * server.c (monitor_show_help): Mark static.
3576 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3577 handle_v_requests): Likewise.
3578
3579 2016-01-12 Pedro Alves <palves@redhat.com>
3580
3581 Remove use of the registered trademark symbol throughout.
3582
3583 2016-01-08 Yao Qi <yao.qi@linaro.org>
3584
3585 * remote-utils.c (getpkt): If c is '\003', call target hook
3586 request_interrupt.
3587
3588 2016-01-06 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3591 linux-aarch32-low.c.
3592 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3593 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3594 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3595 (thumb2_breakpoint): Declare.
3596 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3597 linux-aarch32-low.h.
3598 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3599 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3600 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3601
3602 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3603
3604 * gdbreplay.c (gdbreplay_version): Change copyright year in
3605 version message.
3606 * server.c (gdbserver_version): Likewise.
3607
3608 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3609
3610 * server.c (crc32_table): Delete.
3611 (crc32): Use libiberty's xcrc32 function.
3612
3613 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3614
3615 * lynx-low.c (lynx_delete_thread_callback): New function.
3616 (lynx_mourn): Properly delete our process and all of its
3617 threads. Remove call to clear_inferiors.
3618
3619 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3620
3621 * target.c (thread_search_callback): Add check that
3622 the thread_stopped target callback is not NULL before
3623 calling it.
3624
3625 2015-12-21 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3628 arm breakpoint.
3629
3630 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3631
3632 * server.c (handle_query): Call target_supports_software_single_step.
3633
3634 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3635
3636 * linux-low.c (single_step): New function.
3637 (linux_resume_one_lwp_throw): Call single_step.
3638 (start_step_over): Likewise.
3639
3640 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3641
3642 * Makefile.in (SFILES): Append arch/arm-linux.c,
3643 arch/arm-get-next-pcs.c.
3644 (arm-linux.o): New rule.
3645 (arm-get-next-pcs.o): New rule.
3646 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3647 arm-linux.o.
3648 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3649 to linux-aarch32-low.c.
3650 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3651 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3652 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3653 (thumb2_breakpoint_len): Likewise.
3654 (arm_is_thumb_mode): Make non-static.
3655 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3656 from linux-aarch32-low.c.
3657 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3658 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3659 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3660 (thumb2_breakpoint_len): Likewise.
3661 (arm_is_thumb_mode): New declaration.
3662 * linux-arm-low.c: Include arch/arm-linux.h
3663 aarch/arm-get-next-pcs.h, sys/syscall.h.
3664 (get_next_pcs_ops): New struct.
3665 (get_next_pcs_addr_bits_remove): New function.
3666 (get_next_pcs_is_thumb): New function.
3667 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3668 (arm_sigreturn_next_pc): Likewise.
3669 (get_next_pcs_syscall_next_pc): Likewise.
3670 (arm_gdbserver_get_next_pcs): Likewise.
3671 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3672 Initialize.
3673 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3674 * server.h: Include gdb_vecs.h.
3675
3676 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3677
3678 * Makefile.in (SFILES): Append common/common-regcache.c.
3679 (OBS): Append common-regcache.o.
3680 (common-regcache.o): New rule.
3681 * regcache.c (init_register_cache): Initialize cache to
3682 REG_UNAVAILABLE.
3683 (regcache_raw_read_unsigned): New function.
3684 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3685 register_status enum.
3686
3687 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3688
3689 * linux-aarch64-low.c (the_low_targets): Rename
3690 breakpoint_reinsert_addr to get_next_pcs.
3691 * linux-arm-low.c (the_low_targets): Likewise.
3692 * linux-bfin-low.c (the_low_targets): Likewise.
3693 * linux-cris-low.c (the_low_targets): Likewise.
3694 * linux-crisv32-low.c (the_low_targets): Likewise.
3695 * linux-low.c (can_software_single_step): Likewise.
3696 (install_software_single_step_breakpoints): New function.
3697 (start_step_over): Use install_software_single_step_breakpoints.
3698 * linux-low.h: New CORE_ADDR vector.
3699 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3700 get_next_pcs.
3701 * linux-mips-low.c (the_low_targets): Likewise.
3702 * linux-nios2-low.c (the_low_targets): Likewise.
3703 * linux-sparc-low.c (the_low_targets): Likewise.
3704
3705 2015-12-17 Pedro Alves <palves@redhat.com>
3706
3707 * linux-low.c (linux_kill_one_lwp): Remove references to
3708 LinuxThreads.
3709 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3710 to 'kill'.
3711 (linux_init_signals): Delete.
3712 (initialize_low): Adjust.
3713 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3714
3715 2015-12-16 Pedro Alves <palves@redhat.com>
3716
3717 * configure.ac (compiler warning flags): When testing a
3718 -Wno-foo option, check whether -Wfoo works instead.
3719 * configure: Regenerate.
3720
3721 2015-12-11 Don Breazeal <donb@codesourcery.com>
3722
3723 * server.c (process_serial_event): Don't exit from gdbserver
3724 in remote mode if there are still active inferiors.
3725
3726 2015-12-11 Yao Qi <yao.qi@linaro.org>
3727
3728 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3729 arm_breakpoint_at if the process is 32-bit.
3730
3731 2015-12-11 Yao Qi <yao.qi@linaro.org>
3732
3733 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3734 arm breakpoint.
3735
3736 2015-12-07 Yao Qi <yao.qi@linaro.org>
3737
3738 * configure.srv: Append arm.o to srv_tgtobj for
3739 aarch64*-*-linux* target.
3740 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3741 from linux-arm-low.c.
3742 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3743 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3744 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3745 (thumb2_breakpoint_len): Likewise.
3746 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3747 (arm_breakpoint_kinds): Likewise.
3748 (arm_breakpoint_kind_from_pc): Likewise.
3749 (arm_sw_breakpoint_from_kind): Likewise.
3750 (arm_breakpoint_kind_from_current_state): Likewise.
3751 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3752 (arm_sw_breakpoint_from_kind): Declare.
3753 (arm_breakpoint_kind_from_current_state): Declare.
3754 (arm_breakpoint_at): Declare.
3755 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3756 arm_sw_breakpoint_from_kind if process is 32-bit.
3757 (aarch64_breakpoint_kind_from_pc): New function.
3758 (aarch64_breakpoint_kind_from_current_state): New function.
3759 (the_low_target): Initialize fields breakpoint_kind_from_pc
3760 and breakpoint_kind_from_current_state.
3761 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3762 linux-aarch32-low.c.
3763 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3764 (arm_breakpoint, arm_breakpoint_len): Likewise.
3765 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3766 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3767 (arm_is_thumb_mode): Likewise.
3768 (arm_breakpoint_at): Likewise.
3769 (arm_breakpoint_kind_from_pc): Likewise.
3770 (arm_sw_breakpoint_from_kind): Likewise.
3771 (arm_breakpoint_kind_from_current_state): Likewise.
3772
3773 Revert:
3774 2015-08-04 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3777 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3778 * server.c (extended_protocol): Remove "static".
3779 * server.h (extended_protocol): Declare it.
3780
3781 2015-12-04 Josh Stone <jistone@redhat.com>
3782
3783 * target.h (struct target_ops) <arch_setup>: Rename to ...
3784 (struct target_ops) <post_create_inferior>: ... this.
3785 (target_arch_setup): Rename to ...
3786 (target_post_create_inferior): ... this, calling post_create_inferior.
3787 * server.c (start_inferior): Update target_arch_setup calls to
3788 target_post_create_inferior.
3789 * linux-low.c (linux_low_ptrace_options): Forward declare.
3790 (linux_arch_setup): Update its comment for general use.
3791 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3792 (struct linux_target_ops): Use linux_post_create_inferior.
3793 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3794 to post_create_inferior.
3795 * nto-low.c (struct nto_target_ops): Likewise.
3796 * spu-low.c (struct spu_target_ops): Likewise.
3797 * win32-low.c (struct win32_target_ops): Likewise.
3798
3799 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3800
3801 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3802
3803 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3804
3805 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3806 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3807 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3808 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3809 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3810 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3811 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3812 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3813 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3814 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3815 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3816 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3817
3818 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819
3820 * linux-low.c (linux_look_up_symbols): Don't call
3821 linux_supports_traceclone.
3822 * linux-low.h (thread_db_init): Remove use_events argument.
3823 * thread-db.c (thread_db_use_event): Remove global variable.
3824 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3825 (struct thread_db) <td_create_bp>: Remove field.
3826 (thread_db_create_event): Remove function.
3827 (thread_db_enable_reporting): Likewise.
3828 (find_one_thread): Don't check for thread_db_use_events.
3829 (attach_thread): Likewise.
3830 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3831 (try_thread_db_load_1): Don't check for thread_db_use_events.
3832 (thread_db_init): Remove use_events argument and thread events
3833 handling.
3834 (remove_thread_event_breakpoints): Remove function.
3835 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3836
3837 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3838
3839 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3840 New function.
3841 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3842 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3844 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3845 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3846 Initialize.
3847 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3848 New function.
3849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3850 * linux-low.c (can_hardware_single_step): Use
3851 supports_hardware_single_step.
3852 (can_software_single_step): New function.
3853 (start_step_over): Call can_software_single_step.
3854 (linux_supports_hardware_single_step): New function.
3855 (struct target_ops) <supports_software_single_step>: Initialize.
3856 * linux-low.h (struct linux_target_ops)
3857 <supports_hardware_single_step>: Initialize.
3858 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3860 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3861 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3862 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3864 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3866 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3867 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3868 Initialize.
3869 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3870 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3871 Initialize.
3872 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3873 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3874 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3875 New function.
3876 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3877 * target.h (struct target_ops): <supports_software_single_step>:
3878 New field.
3879 (target_supports_software_single_step): New macro.
3880
3881 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3882
3883 * linux-low.c (linux_wait_1): Fix pc advance condition.
3884 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3885 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3886
3887 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3888
3889 * linux-arm-low.c (arm_is_thumb_mode): New function.
3890 (arm_breakpoint_at): Use arm_is_thumb_mode.
3891 (arm_breakpoint_kind_from_current_state): New function.
3892 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3893 Initialize.
3894 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3895 (linux_breakpoint_kind_from_current_state): New function.
3896 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3897 * linux-low.h (struct linux_target_ops)
3898 <breakpoint_kind_from_current_state>: New field.
3899 * target.h (struct target_ops): Likewise.
3900 (target_breakpoint_kind_from_current_state): New macro.
3901
3902 2015-11-30 Pedro Alves <palves@redhat.com>
3903
3904 * linux-low.c (linux_resume): Wake up the event loop before
3905 returning.
3906
3907 2015-11-30 Pedro Alves <palves@redhat.com>
3908
3909 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3910 check.
3911 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3912 to -1.
3913 * target.c (struct thread_search): New structure.
3914 (thread_search_callback): New function.
3915 (prev_general_thread): New global.
3916 (prepare_to_access_memory, done_accessing_memory): New functions.
3917 * target.h (prepare_to_access_memory, done_accessing_memory):
3918 Replace macros with function declarations.
3919
3920 2015-11-30 Pedro Alves <palves@redhat.com>
3921
3922 PR 14618
3923 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3924 report TARGET_WAITKIND_NO_RESUMED.
3925 * remote-utils.c (prepare_resume_reply): Handle
3926 TARGET_WAITKIND_NO_RESUMED.
3927 * server.c (report_no_resumed): New global.
3928 (handle_query) <qSupported>: Handle "no-resumed+". Report
3929 "no-resumed+" support.
3930 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3931 return error if the client doesn't support no-resumed events.
3932 (push_stop_notification): New function.
3933 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3934 events if the client supports them.
3935
3936 2015-11-30 Pedro Alves <palves@redhat.com>
3937
3938 * linux-low.c (thread_still_has_status_pending_p): Don't check
3939 vCont;t here.
3940 (lwp_resumed): New function.
3941 (status_pending_p_callback): Return early if the LWP is not
3942 supposed to be resumed.
3943
3944 2015-11-30 Pedro Alves <palves@redhat.com>
3945
3946 * linux-low.c (handle_extended_wait): Assert that the LWP's
3947 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3948 thread create events, leave the new child's status pending.
3949 (linux_low_filter_event): If GDB wants to hear about thread exit
3950 events, leave the LWP marked dead and don't delete it.
3951 (linux_wait_for_event_filtered): Don't check for thread exit.
3952 (filter_exit_event): New function.
3953 (linux_wait_1): Use it, when returning an exit event.
3954 (linux_resume_one_lwp_throw): Assert that the LWP's
3955 waitstatus is TARGET_WAITKIND_IGNORE.
3956 * remote-utils.c (prepare_resume_reply): Handle
3957 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3958 * server.c (report_thread_events): New global.
3959 (handle_general_set): Handle QThreadEvents.
3960 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3961 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3962 TARGET_WAITKIND_THREAD_EXITED.
3963 * server.h (report_thread_events): Declare.
3964
3965 2015-11-30 Pedro Alves <palves@redhat.com>
3966
3967 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3968 the thread's last_resume_kind was resume_stop.
3969
3970 2015-11-30 Pedro Alves <palves@redhat.com>
3971
3972 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3973 before returning.
3974
3975 2015-11-30 Pedro Alves <palves@redhat.com>
3976
3977 * server.c (handle_v_requests): Handle vCtrlC.
3978
3979 2015-11-30 Pedro Alves <palves@redhat.com>
3980
3981 * gdbthread.h (find_any_thread_of_pid): Declare.
3982 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3983 functions.
3984 * server.c (handle_query): If current_thread is NULL, look for
3985 another thread of the selected process.
3986
3987 2015-11-26 Daniel Colascione <dancol@dancol.org>
3988 Simon Marchi <simon.marchi@ericsson.com>
3989
3990 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3991 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3992 name in reply.
3993 * target.h (struct target_ops) <thread_name>: New field.
3994 (target_thread_name): New macro.
3995
3996 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3997
3998 * regcache.h (regcache_invalidate_pid): Add declaration.
3999 * regcache.c (regcache_invalidate_pid): New function, extracted
4000 from regcache_invalidate.
4001 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4002 Add trivial documentation comment.
4003 * lynx-low.c: Use regcache_invalidate_pid instead of
4004 regcache_invalidate.
4005
4006 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4007
4008 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4009 and Elf64_auxv_t if the target is Android.
4010
4011 2015-11-22 Doug Evans <xdje42@gmail.com>
4012
4013 * target.h: #include <sys/types.h>.
4014
4015 2015-11-19 Pedro Alves <palves@redhat.com>
4016
4017 * linux-low.c (linux_process_qsupported): Change prototype.
4018 Adjust.
4019 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4020 Change prototype.
4021 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4022 and adjust to loop over all features.
4023 * server.c (handle_query) <qSupported>: Adjust to call
4024 target_process_qsupported once, passing it a vector of unprocessed
4025 features.
4026 * target.h (struct target_ops) <process_qsupported>: Change
4027 prototype.
4028 (target_process_qsupported): Adjust.
4029
4030 2015-11-19 Pedro Alves <palves@redhat.com>
4031
4032 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4033 mode.
4034 * configure: Regenerate.
4035
4036 2015-11-19 Pedro Alves <palves@redhat.com>
4037
4038 * configure: Regenerate.
4039
4040 2015-11-19 Yao Qi <yao.qi@linaro.org>
4041
4042 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4043 type to uint32_t.
4044
4045 2015-11-19 Yao Qi <yao.qi@linaro.org>
4046
4047 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4048 (struct aarch64_operand): Move enum out.
4049
4050 2015-11-19 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4053 struct user_fpsimd_state *.
4054 (aarch64_store_fpregset): Likewise.
4055
4056 2015-11-19 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4059 struct user_pt_regs *.
4060 (aarch64_store_gregset): Likewise.
4061
4062 2015-11-18 Pedro Alves <palves@redhat.com>
4063
4064 * Makefile.in (all_object_files): Add $IPA_OBJS.
4065
4066 2015-11-17 Pedro Alves <palves@redhat.com>
4067
4068 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4069 GDB_SIGNAL_0 and gdb_signal_to_string.
4070
4071 2015-11-17 Pedro Alves <palves@redhat.com>
4072
4073 * win32-low.c (handle_output_debug_string): Remove parameter.
4074 (win32_kill): Remove our_status local and adjust call to
4075 handle_output_debug_string.
4076 (get_child_debug_event): Adjust call to
4077 handle_output_debug_string.
4078
4079 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4080
4081 * linux-mips-low.c (mips_fill_gregset): Add cast.
4082 (mips_store_gregset): Likewise.
4083 (mips_fill_fpregset): Likewise.
4084 (mips_store_fpregset): Likewise.
4085
4086 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4089 priv.
4090
4091 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4092
4093 * linux-mips-low.c (mips_linux_new_thread): Change type of
4094 watch_type to enum target_hw_bp_type.
4095
4096 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4097
4098 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4099 Change return type to arm_hwbp_type.
4100
4101 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4102
4103 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4104 (arm_store_gregset): Likewise.
4105 * linux-arm-low.c (arm_get_hwcap): Likewise.
4106 (arm_read_description): Likewise.
4107
4108 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4109
4110 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4111
4112 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4113
4114 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4115 (ppc_fill_vsxregset): Likewise.
4116 (ppc_store_vsxregset): Likewise.
4117 (ppc_fill_vrregset): Likewise.
4118 (ppc_store_vrregset): Likewise.
4119 (ppc_fill_evrregset): Likewise.
4120 (ppc_store_evrregset): Likewise.
4121
4122 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4123
4124 * linux-ppc-low.c (ppc_usrregs_info): Remove
4125 forward-declaration.
4126 (ppc_arch_setup): Move lower in file.
4127
4128 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4129
4130 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4131 (ps_pdwrite): Likewise.
4132
4133 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4134
4135 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4136 to after assert checks.
4137
4138 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4139
4140 * proc-service.c (ps_pdread): Add/adjust casts.
4141 (ps_pdwrite): Add/adjust casts.
4142
4143 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4144
4145 * server.c (handle_search_memory_1): Cast return value of
4146 memmem.
4147
4148 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4149
4150 * server.c (write_qxfer_response): Change type of data to
4151 gdb_byte *.
4152
4153 2015-10-29 Pedro Alves <palves@redhat.com>
4154
4155 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4156
4157 2015-10-29 Pedro Alves <palves@redhat.com>
4158
4159 * tracepoint.c (clear_installed_tracepoints): Add casts.
4160
4161 2015-10-29 Pedro Alves <palves@redhat.com>
4162
4163 * server.c (handle_v_cont, process_serial_event): Add enum
4164 gdb_signal casts to signal parsing code.
4165
4166 2015-10-29 Pedro Alves <palves@redhat.com>
4167
4168 * linux-low.h (NULL_REGSET): Define.
4169 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4170 * linux-arm-low.c (arm_regsets): Likewise.
4171 * linux-crisv32-low.c (cris_regsets): Likewise.
4172 * linux-m68k-low.c (m68k_regsets): Likewise.
4173 * linux-mips-low.c (mips_regsets): Likewise.
4174 * linux-nios2-low.c (nios2_regsets): Likewise.
4175 * linux-ppc-low.c (ppc_regsets): Likewise.
4176 * linux-s390-low.c (s390_regsets): Likewise.
4177 * linux-sh-low.c (sh_regsets): Likewise.
4178 * linux-sparc-low.c (sparc_regsets): Likewise.
4179 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4180 * linux-tile-low.c (tile_regsets): Likewise.
4181 * linux-x86-low.c (x86_regsets): Likewise.
4182 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4183
4184 2015-10-29 Pedro Alves <palves@redhat.com>
4185
4186 * linux-low.h (NULL_REGSET): Define.
4187 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4188 * linux-arm-low.c (arm_regsets): Likewise.
4189 * linux-crisv32-low.c (cris_regsets): Likewise.
4190 * linux-m68k-low.c (m68k_regsets): Likewise.
4191 * linux-mips-low.c (mips_regsets): Likewise.
4192 * linux-nios2-low.c (nios2_regsets): Likewise.
4193 * linux-ppc-low.c (ppc_regsets): Likewise.
4194 * linux-s390-low.c (s390_regsets): Likewise.
4195 * linux-sh-low.c (sh_regsets): Likewise.
4196 * linux-sparc-low.c (sparc_regsets): Likewise.
4197 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4198 * linux-tile-low.c (tile_regsets): Likewise.
4199 * linux-x86-low.c (x86_regsets): Likewise.
4200 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4201
4202 2015-10-26 Doug Evans <dje@google.com>
4203
4204 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4205
4206 2015-10-26 Doug Evans <dje@google.com>
4207
4208 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4209
4210 2015-10-26 Doug Evans <dje@google.com>
4211
4212 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4213 for debug_printf.
4214 (attach_thread, find_new_threads_callback): Ditto.
4215
4216 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4217
4218 * mem-break.h (set_breakpoint_data): Remove.
4219
4220 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4221
4222 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4223 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4224 (initialize_low): Remove set_breakpoint_data call.
4225 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4226 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4227 (initialize_low): Remove set_breakpoint_data call.
4228 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4229 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4230 (initialize_low): Remove set_breakpoint_data call.
4231
4232 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4233
4234 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4235 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4236 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4237 * target.h (target_breakpoint_kind_from_pc): New macro.
4238
4239 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4240
4241 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4242 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4243 the default breakpoint kind.
4244
4245 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4246
4247 * linux-arm-low.c (arm_supports_z_point_type): Add software
4248 breakpoint support.
4249
4250 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4251
4252 * linux-arm-low.c: Refactor breakpoint definitions.
4253 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4254 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4255
4256 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4257
4258 * Makefile.in: Add arm.c/o.
4259 * configure.srv: Likewise.
4260 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4261 (arm_breakpoint_kind_from_pc): New function.
4262 (arm_sw_breakpoint_from_kind): Return proper kind.
4263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4264
4265 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4266
4267 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4268 removal.
4269 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4270 (struct raw_breakpoint) <size>: Remove.
4271 (struct raw_breakpoint) <kind>: Add.
4272 (bp_size): New function.
4273 (bp_opcode): Likewise.
4274 (find_raw_breakpoint_at): Adjust for kind.
4275 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4276 (remove_memory_breakpoint): Adjust for kind call bp_size.
4277 (set_raw_breakpoint_at): Adjust for kind.
4278 (set_breakpoint): Likewise.
4279 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4280 (delete_raw_breakpoint): Adjust for kind.
4281 (delete_breakpoint): Likewise.
4282 (find_gdb_breakpoint): Likewise.
4283 (set_gdb_breakpoint_1): Likewise.
4284 (set_gdb_breakpoint): Likewise.
4285 (delete_gdb_breakpoint_1): Likewise.
4286 (delete_gdb_breakpoint): Likewise.
4287 (uninsert_raw_breakpoint): Likewise.
4288 (reinsert_raw_breakpoint): Likewise.
4289 (set_breakpoint_data): Remove.
4290 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4291 (check_mem_read): Adjust for kind call bp_size.
4292 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4293 (clone_one_breakpoint): Adjust for kind.
4294 * mem-break.h (set_gdb_breakpoint): Likewise.
4295 (delete_gdb_breakpoint): Likewise.
4296 * server.c (process_serial_event): Likewise.
4297
4298 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4299
4300 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4301 (struct linux_target_ops) <breakpoint>: Remove.
4302 (struct linux_target_ops) <breakpoint_len>: Remove.
4303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4305 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4306 (arm_sw_breakpoint_from_kind): New function.
4307 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4308 (struct linux_target_ops) <breakpoint>: Remove.
4309 (struct linux_target_ops) <breakpoint_len>: Remove.
4310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4312 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4313 (struct linux_target_ops) <breakpoint>: Remove.
4314 (struct linux_target_ops) <breakpoint_len>: Remove.
4315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4317 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4318 (struct linux_target_ops) <breakpoint>: Remove.
4319 (struct linux_target_ops) <breakpoint_len>: Remove.
4320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4322 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4323 and sw_breakpoint_from_kind to increment the pc.
4324 (linux_breakpoint_kind_from_pc): New function.
4325 (linux_sw_breakpoint_from_kind): New function.
4326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4327 (initialize_low): Call breakpoint_kind_from_pc and
4328 sw_breakpoint_from_kind to replace breakpoint_data/len.
4329 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4330 New field.
4331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4332 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4333 (struct linux_target_ops) <breakpoint>: Remove.
4334 (struct linux_target_ops) <breakpoint_len>: Remove.
4335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4337 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4338 (struct linux_target_ops) <breakpoint>: Remove.
4339 (struct linux_target_ops) <breakpoint_len>: Remove.
4340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4342 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4343 (struct linux_target_ops) <breakpoint>: Remove.
4344 (struct linux_target_ops) <breakpoint_len>: Remove.
4345 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4346 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4347 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4348 (struct linux_target_ops) <breakpoint>: Remove.
4349 (struct linux_target_ops) <breakpoint_len>: Remove.
4350 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4351 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4352 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4353 (struct linux_target_ops) <breakpoint>: Remove.
4354 (struct linux_target_ops) <breakpoint_len>: Remove.
4355 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4356 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4357 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4358 (struct linux_target_ops) <breakpoint>: Remove.
4359 (struct linux_target_ops) <breakpoint_len>: Remove.
4360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4362 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4363 (struct linux_target_ops) <breakpoint>: Remove.
4364 (struct linux_target_ops) <breakpoint_len>: Remove.
4365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4367 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4368 (struct linux_target_ops) <breakpoint>: Remove.
4369 (struct linux_target_ops) <breakpoint_len>: Remove.
4370 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4371 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4372 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4373 (struct linux_target_ops) <breakpoint>: Remove.
4374 (struct linux_target_ops) <breakpoint_len>: Remove.
4375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4377 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4378 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4379 (struct linux_target_ops) <breakpoint>: Remove.
4380 (struct linux_target_ops) <breakpoint_len>: Remove.
4381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4383 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4384 (struct linux_target_ops) <breakpoint>: Remove.
4385 (struct linux_target_ops) <breakpoint_len>: Remove.
4386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4388
4389 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4390
4391 * linux-cris-low.c (cris_get_pc): Remove void arg.
4392
4393 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4394
4395 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4396 variable name.
4397
4398 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4399
4400 * inferiors.c (thread_pid_matches_callback): New function.
4401 (find_thread_process): New function.
4402 (remove_thread): Reset current_thread.
4403 (remove_process): Assert threads have been removed first.
4404
4405 2015-10-15 Yao Qi <yao.qi@linaro.org>
4406
4407 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4408 if it is 3.
4409 (aarch64_remove_point): Likewise.
4410 * regcache.c (regcache_register_size): New function.
4411
4412 2015-10-12 Yao Qi <yao.qi@linaro.org>
4413
4414 * linux-aarch64-low.c: Update all callers as emit_load_store
4415 is renamed to aarch64_emit_load_store.
4416
4417 2015-10-12 Yao Qi <yao.qi@linaro.org>
4418
4419 * linux-aarch64-low.c: Update all callers of function renaming
4420 from emit_insn to aarch64_emit_insn.
4421
4422 2015-10-12 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4425 arch/aarch64-insn.h.
4426 (struct aarch64_memory_operand): Likewise.
4427 (ENCODE): Likewise.
4428 (emit_insn): Move to arch/aarch64-insn.c.
4429 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4430 (emit_load_store): Move to arch/aarch64-insn.c.
4431 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4432 (can_encode_int32): Remove.
4433
4434 2015-10-12 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4437 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4438 (aarch64_relocate_instruction): Likewise.
4439 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4440 (struct aarch64_insn_visitor): Likewise.
4441
4442 2015-10-12 Yao Qi <yao.qi@linaro.org>
4443
4444 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4445 (struct aarch64_insn_visitor): New.
4446 (struct aarch64_insn_relocation_data): New.
4447 (aarch64_ftrace_insn_reloc_b): New function.
4448 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4449 (aarch64_ftrace_insn_reloc_cb): Likewise.
4450 (aarch64_ftrace_insn_reloc_tb): Likewise.
4451 (aarch64_ftrace_insn_reloc_adr): Likewise.
4452 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4453 (aarch64_ftrace_insn_reloc_others): Likewise.
4454 (visitor): New.
4455 (aarch64_relocate_instruction): Use visitor.
4456
4457 2015-10-12 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4460 int. Add argument buf.
4461 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4462 aarch64_relocate_instruction.
4463
4464 2015-10-12 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4467 argument insn. Remove local variable insn. Don't call
4468 target_read_uint32.
4469 (aarch64_install_fast_tracepoint_jump_pad): Call
4470 target_read_uint32.
4471
4472 2015-09-30 Yao Qi <yao.qi@linaro.org>
4473
4474 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4475 (emit_load_store_pair): Likewise.
4476
4477 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4478
4479 * dll.c (match_dll): Add cast(s).
4480 (unloaded_dll): Likewise.
4481 * linux-low.c (second_thread_of_pid_p): Likewise.
4482 (delete_lwp_callback): Likewise.
4483 (count_events_callback): Likewise.
4484 (select_event_lwp_callback): Likewise.
4485 (linux_set_resume_request): Likewise.
4486 * server.c (accumulate_file_name_length): Likewise.
4487 (emit_dll_description): Likewise.
4488 (handle_qxfer_threads_worker): Likewise.
4489 (visit_actioned_threads): Likewise.
4490 * thread-db.c (any_thread_of): Likewise.
4491 * tracepoint.c (same_process_p): Likewise.
4492 (match_blocktype): Likewise.
4493 (build_traceframe_info_xml): Likewise.
4494
4495 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4496
4497 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4498 assignment.
4499 (gdb_unparse_agent_expr): Likewise.
4500 * hostio.c (require_data): Likewise.
4501 (handle_pread): Likewise.
4502 * linux-low.c (disable_regset): Likewise.
4503 (fetch_register): Likewise.
4504 (store_register): Likewise.
4505 (get_dynamic): Likewise.
4506 (linux_qxfer_libraries_svr4): Likewise.
4507 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4508 (set_fast_tracepoint_jump): Likewise.
4509 (uninsert_fast_tracepoint_jumps_at): Likewise.
4510 (reinsert_fast_tracepoint_jumps_at): Likewise.
4511 (validate_inserted_breakpoint): Likewise.
4512 (clone_agent_expr): Likewise.
4513 * regcache.c (init_register_cache): Likewise.
4514 * remote-utils.c (putpkt_binary_1): Likewise.
4515 (decode_M_packet): Likewise.
4516 (decode_X_packet): Likewise.
4517 (look_up_one_symbol): Likewise.
4518 (relocate_instruction): Likewise.
4519 (monitor_output): Likewise.
4520 * server.c (handle_search_memory): Likewise.
4521 (handle_qxfer_exec_file): Likewise.
4522 (handle_qxfer_libraries): Likewise.
4523 (handle_qxfer): Likewise.
4524 (handle_query): Likewise.
4525 (handle_v_cont): Likewise.
4526 (handle_v_run): Likewise.
4527 (captured_main): Likewise.
4528 * target.c (write_inferior_memory): Likewise.
4529 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4530 * tracepoint.c (init_trace_buffer): Likewise.
4531 (add_tracepoint_action): Likewise.
4532 (add_traceframe): Likewise.
4533 (add_traceframe_block): Likewise.
4534 (cmd_qtdpsrc): Likewise.
4535 (cmd_qtdv): Likewise.
4536 (cmd_qtstatus): Likewise.
4537 (response_source): Likewise.
4538 (response_tsv): Likewise.
4539 (cmd_qtnotes): Likewise.
4540 (gdb_collect): Likewise.
4541 (initialize_tracepoint): Likewise.
4542
4543 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4544
4545 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4546 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4547 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4548 <NOP>: New.
4549 (enum aarch64_condition_codes): New enum.
4550 (w0): New static global.
4551 (fp): Likewise.
4552 (lr): Likewise.
4553 (struct aarch64_memory_operand) <type>: New
4554 MEMORY_OPERAND_POSTINDEX type.
4555 (postindex_memory_operand): New helper function.
4556 (emit_ret): New function.
4557 (emit_load_store_pair): New function, factored out of emit_stp
4558 with support for MEMORY_OPERAND_POSTINDEX.
4559 (emit_stp): Rewrite using emit_load_store_pair.
4560 (emit_ldp): New function.
4561 (emit_load_store): Likewise.
4562 (emit_ldr): Mention post-index instruction in comment.
4563 (emit_ldrh): New function.
4564 (emit_ldrb): New function.
4565 (emit_ldrsw): Mention post-index instruction in comment.
4566 (emit_str): Likewise.
4567 (emit_subs): New function.
4568 (emit_cmp): Likewise.
4569 (emit_and): Likewise.
4570 (emit_orr): Likewise.
4571 (emit_orn): Likewise.
4572 (emit_eor): Likewise.
4573 (emit_mvn): Likewise.
4574 (emit_lslv): Likewise.
4575 (emit_lsrv): Likewise.
4576 (emit_asrv): Likewise.
4577 (emit_mul): Likewise.
4578 (emit_sbfm): Likewise.
4579 (emit_sbfx): Likewise.
4580 (emit_ubfm): Likewise.
4581 (emit_ubfx): Likewise.
4582 (emit_csinc): Likewise.
4583 (emit_cset): Likewise.
4584 (emit_nop): Likewise.
4585 (emit_ops_insns): New helper function.
4586 (emit_pop): Likewise.
4587 (emit_push): Likewise.
4588 (aarch64_emit_prologue): New function.
4589 (aarch64_emit_epilogue): Likewise.
4590 (aarch64_emit_add): Likewise.
4591 (aarch64_emit_sub): Likewise.
4592 (aarch64_emit_mul): Likewise.
4593 (aarch64_emit_lsh): Likewise.
4594 (aarch64_emit_rsh_signed): Likewise.
4595 (aarch64_emit_rsh_unsigned): Likewise.
4596 (aarch64_emit_ext): Likewise.
4597 (aarch64_emit_log_not): Likewise.
4598 (aarch64_emit_bit_and): Likewise.
4599 (aarch64_emit_bit_or): Likewise.
4600 (aarch64_emit_bit_xor): Likewise.
4601 (aarch64_emit_bit_not): Likewise.
4602 (aarch64_emit_equal): Likewise.
4603 (aarch64_emit_less_signed): Likewise.
4604 (aarch64_emit_less_unsigned): Likewise.
4605 (aarch64_emit_ref): Likewise.
4606 (aarch64_emit_if_goto): Likewise.
4607 (aarch64_emit_goto): Likewise.
4608 (aarch64_write_goto_address): Likewise.
4609 (aarch64_emit_const): Likewise.
4610 (aarch64_emit_call): Likewise.
4611 (aarch64_emit_reg): Likewise.
4612 (aarch64_emit_pop): Likewise.
4613 (aarch64_emit_stack_flush): Likewise.
4614 (aarch64_emit_zero_ext): Likewise.
4615 (aarch64_emit_swap): Likewise.
4616 (aarch64_emit_stack_adjust): Likewise.
4617 (aarch64_emit_int_call_1): Likewise.
4618 (aarch64_emit_void_call_2): Likewise.
4619 (aarch64_emit_eq_goto): Likewise.
4620 (aarch64_emit_ne_goto): Likewise.
4621 (aarch64_emit_lt_goto): Likewise.
4622 (aarch64_emit_le_goto): Likewise.
4623 (aarch64_emit_gt_goto): Likewise.
4624 (aarch64_emit_ge_got): Likewise.
4625 (aarch64_emit_ops_impl): New static global variable.
4626 (aarch64_emit_ops): New target function, return
4627 &aarch64_emit_ops_impl.
4628 (struct linux_target_ops): Install it.
4629
4630 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4631
4632 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4633 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4634 aarch64-ipa.o.
4635 * linux-aarch64-ipa.c: New file.
4636 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4637 and endian.h.
4638 (aarch64_get_thread_area): New target method.
4639 (extract_signed_bitfield): New helper function.
4640 (aarch64_decode_ldr_literal): New function.
4641 (enum aarch64_opcodes): New enum.
4642 (struct aarch64_register): New struct.
4643 (struct aarch64_operand): New struct.
4644 (x0): New static global.
4645 (x1): Likewise.
4646 (x2): Likewise.
4647 (x3): Likewise.
4648 (x4): Likewise.
4649 (w2): Likewise.
4650 (ip0): Likewise.
4651 (sp): Likewise.
4652 (xzr): Likewise.
4653 (aarch64_register): New helper function.
4654 (register_operand): Likewise.
4655 (immediate_operand): Likewise.
4656 (struct aarch64_memory_operand): New struct.
4657 (offset_memory_operand): New helper function.
4658 (preindex_memory_operand): Likewise.
4659 (enum aarch64_system_control_registers): New enum.
4660 (ENCODE): New macro.
4661 (emit_insn): New helper function.
4662 (emit_b): New function.
4663 (emit_bcond): Likewise.
4664 (emit_cb): Likewise.
4665 (emit_tb): Likewise.
4666 (emit_blr): Likewise.
4667 (emit_stp): Likewise.
4668 (emit_ldp_q_offset): Likewise.
4669 (emit_stp_q_offset): Likewise.
4670 (emit_load_store): Likewise.
4671 (emit_ldr): Likewise.
4672 (emit_ldrsw): Likewise.
4673 (emit_str): Likewise.
4674 (emit_ldaxr): Likewise.
4675 (emit_stxr): Likewise.
4676 (emit_stlr): Likewise.
4677 (emit_data_processing_reg): Likewise.
4678 (emit_data_processing): Likewise.
4679 (emit_add): Likewise.
4680 (emit_sub): Likewise.
4681 (emit_mov): Likewise.
4682 (emit_movk): Likewise.
4683 (emit_mov_addr): Likewise.
4684 (emit_mrs): Likewise.
4685 (emit_msr): Likewise.
4686 (emit_sevl): Likewise.
4687 (emit_wfe): Likewise.
4688 (append_insns): Likewise.
4689 (can_encode_int32_in): New helper function.
4690 (aarch64_relocate_instruction): New function.
4691 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4692 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4693 (struct linux_target_ops): Install aarch64_get_thread_area,
4694 aarch64_install_fast_tracepoint_jump_pad and
4695 aarch64_get_min_fast_tracepoint_insn_len.
4696
4697 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4698
4699 * Makefile.in (aarch64-insn.o): New rule.
4700 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4701
4702 2015-09-21 Yao Qi <yao.qi@linaro.org>
4703
4704 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4705
4706 2015-09-21 Yao Qi <yao.qi@linaro.org>
4707
4708 * tracepoint.c (max_jump_pad_size): Remove.
4709
4710 2015-09-18 Yao Qi <yao.qi@linaro.org>
4711
4712 * linux-aarch64-low.c: Don't include sys/uio.h.
4713 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4714
4715 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4716
4717 * tracepoint.c (eval_result_type): Change prototype.
4718 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4719
4720 2015-09-15 Pedro Alves <palves@redhat.com>
4721
4722 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4723 Check whether to report exec events instead of checking whether
4724 multiprocess is enabled.
4725
4726 2015-09-15 Pedro Alves <palves@redhat.com>
4727
4728 PR remote/18965
4729 * remote-utils.c (prepare_resume_reply): Merge
4730 TARGET_WAITKIND_VFORK_DONE switch case with the
4731 TARGET_WAITKIND_FORKED case.
4732
4733 2015-09-15 Yao Qi <yao.qi@linaro.org>
4734
4735 * server.c (handle_query): Check string comparison using
4736 "else if" instead of "if".
4737
4738 2015-09-15 Yao Qi <yao.qi@linaro.org>
4739
4740 * server.c (vCont_supported): New global variable.
4741 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4742 matches. Append ";vContSupported+" to own_buf.
4743 (handle_v_requests): Append ";s;S" to own_buf if target supports
4744 hardware single step or vCont_supported is false.
4745 (capture_main): Set vCont_supported to zero.
4746
4747 2015-09-15 Yao Qi <yao.qi@linaro.org>
4748
4749 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4750 it to ...
4751 (linux_supports_hardware_single_step): ... New function.
4752 (linux_target_ops): Update.
4753 * lynx-low.c (lynx_target_ops): Set field
4754 supports_hardware_single_step to target_can_do_hardware_single_step.
4755 * nto-low.c (nto_target_ops): Likewise.
4756 * spu-low.c (spu_target_ops): Likewise.
4757 * win32-low.c (win32_target_ops): Likewise.
4758 * target.c (target_can_do_hardware_single_step): New function.
4759 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4760 Remove. <supports_hardware_single_step>: New field.
4761 (target_supports_conditional_breakpoints): Remove.
4762 (target_supports_hardware_single_step): New macro.
4763 (target_can_do_hardware_single_step): Declare.
4764 * server.c (handle_query): Use target_supports_hardware_single_step
4765 instead of target_supports_conditional_breakpoints.
4766
4767 2015-09-15 Yao Qi <yao.qi@linaro.org>
4768
4769 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4770 function.
4771 (struct linux_target_ops the_low_target): Install
4772 aarch64_linux_siginfo_fixup.
4773
4774 2015-09-11 Don Breazeal <donb@codesourcery.com>
4775 Luis Machado <lgustavo@codesourcery.com>
4776
4777 * linux-low.c (linux_mourn): Static declaration.
4778 (linux_arch_setup): Move in front of
4779 handle_extended_wait.
4780 (linux_arch_setup_thread): New function.
4781 (handle_extended_wait): Handle exec events. Call
4782 linux_arch_setup_thread. Make event_lwp argument a
4783 pointer-to-a-pointer.
4784 (check_zombie_leaders): Do not check stopped threads.
4785 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4786 (linux_low_filter_event): Add lwp and thread for exec'ing
4787 non-leader thread if leader thread has been deleted.
4788 Refactor code into linux_arch_setup_thread and call it.
4789 Pass child lwp pointer by reference to handle_extended_wait.
4790 (linux_wait_for_event_filtered): Update comment.
4791 (linux_wait_1): Prevent clobbering exec event status.
4792 (linux_supports_exec_events): New function.
4793 (linux_target_ops) <supports_exec_events>: Initialize new member.
4794 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4795 new member.
4796 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4797 * server.c (report_exec_events): New global variable.
4798 (handle_query): Handle qSupported query for exec-events feature.
4799 (captured_main): Initialize report_exec_events.
4800 * server.h (report_exec_events): Declare new global variable.
4801 * target.h (struct target_ops) <supports_exec_events>: New
4802 member.
4803 (target_supports_exec_events): New macro.
4804 * win32-low.c (win32_target_ops) <supports_exec_events>:
4805 Initialize new member.
4806
4807 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4808
4809 * linux-low.c (linux_low_enable_btrace): Remove.
4810 (linux_target_ops): Replace linux_low_enable_btrace with
4811 linux_enable_btrace.
4812
4813 2015-09-03 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-aarch64-low.c (aarch64_insert_point): Call
4816 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4817 returns true.
4818
4819 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4820
4821 * linux-low.c (check_stopped_by_breakpoint): Use
4822 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4823
4824 2015-08-27 Pedro Alves <palves@redhat.com>
4825
4826 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4827
4828 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4829
4830 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4831 the XNEW-family equivalent.
4832 (compile_bytecodes): Likewise.
4833 * dll.c (loaded_dll): Likewise.
4834 * event-loop.c (append_callback_event): Likewise.
4835 (create_file_handler): Likewise.
4836 (create_file_event): Likewise.
4837 * hostio.c (handle_open): Likewise.
4838 * inferiors.c (add_thread): Likewise.
4839 (add_process): Likewise.
4840 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4841 * linux-arm-low.c (arm_new_process): Likewise.
4842 (arm_new_thread): Likewise.
4843 * linux-low.c (add_to_pid_list): Likewise.
4844 (linux_add_process): Likewise.
4845 (handle_extended_wait): Likewise.
4846 (add_lwp): Likewise.
4847 (enqueue_one_deferred_signal): Likewise.
4848 (enqueue_pending_signal): Likewise.
4849 (linux_resume_one_lwp_throw): Likewise.
4850 (linux_resume_one_thread): Likewise.
4851 (linux_read_memory): Likewise.
4852 (linux_write_memory): Likewise.
4853 * linux-mips-low.c (mips_linux_new_process): Likewise.
4854 (mips_linux_new_thread): Likewise.
4855 (mips_add_watchpoint): Likewise.
4856 * linux-x86-low.c (initialize_low_arch): Likewise.
4857 * lynx-low.c (lynx_add_process): Likewise.
4858 * mem-break.c (set_raw_breakpoint_at): Likewise.
4859 (set_breakpoint): Likewise.
4860 (add_condition_to_breakpoint): Likewise.
4861 (add_commands_to_breakpoint): Likewise.
4862 (clone_agent_expr): Likewise.
4863 (clone_one_breakpoint): Likewise.
4864 * regcache.c (new_register_cache): Likewise.
4865 * remote-utils.c (look_up_one_symbol): Likewise.
4866 * server.c (queue_stop_reply): Likewise.
4867 (start_inferior): Likewise.
4868 (queue_stop_reply_callback): Likewise.
4869 (handle_target_event): Likewise.
4870 * spu-low.c (fetch_ppc_memory): Likewise.
4871 (store_ppc_memory): Likewise.
4872 * target.c (set_target_ops): Likewise.
4873 * thread-db.c (thread_db_load_search): Likewise.
4874 (try_thread_db_load_1): Likewise.
4875 * tracepoint.c (add_tracepoint): Likewise.
4876 (add_tracepoint_action): Likewise.
4877 (create_trace_state_variable): Likewise.
4878 (cmd_qtdpsrc): Likewise.
4879 (cmd_qtro): Likewise.
4880 (add_while_stepping_state): Likewise.
4881 * win32-low.c (child_add_thread): Likewise.
4882 (get_image_name): Likewise.
4883
4884 2015-08-25 Yao Qi <yao.qi@linaro.org>
4885
4886 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4887
4888 2015-08-25 Yao Qi <yao.qi@linaro.org>
4889
4890 * Makefile.in (aarch64-linux.o): New rule.
4891 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4892 srv_tgtobj.
4893 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4894 (aarch64_init_debug_reg_state): Make it extern.
4895 (aarch64_linux_prepare_to_resume): Remove.
4896
4897 2015-08-25 Yao Qi <yao.qi@linaro.org>
4898
4899 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4900 lwp_arch_private_info and ptid_of_lwp.
4901
4902 2015-08-25 Yao Qi <yao.qi@linaro.org>
4903
4904 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4905 Find proc_info by find_process_pid. All callers updated.
4906
4907 2015-08-25 Yao Qi <yao.qi@linaro.org>
4908
4909 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4910 Remove.
4911 (debug_reg_change_callback): Remove.
4912 (aarch64_notify_debug_reg_change): Remove.
4913
4914 2015-08-25 Yao Qi <yao.qi@linaro.org>
4915
4916 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4917 Call current_lwp_ptid.
4918
4919 2015-08-25 Yao Qi <yao.qi@linaro.org>
4920
4921 * linux-aarch64-low.c (debug_reg_change_callback): Use
4922 debug_printf.
4923
4924 2015-08-25 Yao Qi <yao.qi@linaro.org>
4925
4926 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4927
4928 2015-08-25 Yao Qi <yao.qi@linaro.org>
4929
4930 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4931
4932 2015-08-25 Yao Qi <yao.qi@linaro.org>
4933
4934 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4935 the code.
4936
4937 2015-08-25 Yao Qi <yao.qi@linaro.org>
4938
4939 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4940 Remove.
4941 (debug_reg_change_callback): Remove argument entry and add argument
4942 lwp. Remove local variable thread. Don't print thread id in the
4943 debugging output. Don't check whether pid of thread equals to pid.
4944 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4945 iterate_over_lwps instead find_inferior.
4946
4947 2015-08-24 Pedro Alves <palves@redhat.com>
4948
4949 * inferiors.c (get_first_process): New function.
4950 * inferiors.h (get_first_process): New declaration.
4951 * remote-utils.c (read_ptid): Default to the first process in the
4952 list, instead of to the current thread's process.
4953
4954 2015-08-24 Pedro Alves <palves@redhat.com>
4955
4956 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4957 * event-loop.c: Likewise.
4958 * remote-utils.c: Likewise.
4959 * tracepoint.c: Likewise.
4960
4961 2015-08-24 Pedro Alves <palves@redhat.com>
4962
4963 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4964 ptid_get_lwp.
4965
4966 2015-08-21 Pedro Alves <palves@redhat.com>
4967
4968 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4969 instead of literal 1.
4970
4971 2015-08-21 Pedro Alves <palves@redhat.com>
4972
4973 * tdesc.c (default_description): Explicitly zero-initialize.
4974
4975 2015-08-21 Pedro Alves <palves@redhat.com>
4976
4977 PR gdb/18749
4978 * inferiors.c (remove_thread): Discard any pending stop reply for
4979 this thread.
4980 * server.c (remove_all_on_match_pid): Rename to ...
4981 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4982 instead of a pid.
4983 (discard_queued_stop_replies): Change parameter to a ptid. Now
4984 extern.
4985 (handle_v_kill, kill_inferior_callback, captured_main)
4986 (process_serial_event): Adjust.
4987 * server.h (discard_queued_stop_replies): Declare.
4988
4989 2015-08-21 Pedro Alves <palves@redhat.com>
4990
4991 * linux-low.c (wait_for_sigstop): Always switch to no thread
4992 selected if the previously current thread dies.
4993 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4994 process instead of the current thread's.
4995 * remote-utils.c (input_interrupt): Don't check if there's no
4996 current thread.
4997 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4998 current thread to the general thread fails, error out.
4999 (handle_qxfer_auxv, handle_qxfer_libraries)
5000 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5001 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5002 (handle_query): Check if there's a thread selected instead of
5003 checking whether there's any thread in the thread list.
5004 (handle_qxfer_threads, handle_qxfer_btrace)
5005 (handle_qxfer_btrace_conf): Don't error out early if there's no
5006 thread in the thread list.
5007 (handle_v_cont, myresume): Don't set the current thread to the
5008 continue thread.
5009 (process_serial_event) <Hg handling>: Also set thread_id if the
5010 previous general thread is still alive.
5011 (process_serial_event) <g/G handling>: If setting the current
5012 thread to the general thread fails, error out.
5013 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5014 thread's lwp instead of the current thread's.
5015 * target.c (set_desired_thread): If the desired thread was not
5016 found, leave the current thread pointing to NULL. Return an int
5017 (boolean) indicating success.
5018 * target.h (set_desired_thread): Change return type to int.
5019
5020 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5021
5022 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5023 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5024 #includes.
5025 (ps_get_thread_area): New function.
5026
5027 2015-08-19 Gary Benson <gbenson@redhat.com>
5028
5029 * hostio.c (handle_pread): Do not attempt to read more data
5030 than hostio_reply_with_data can fit in a packet.
5031
5032 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5033
5034 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5035
5036 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5037
5038 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5039
5040 2015-08-06 Pedro Alves <palves@redhat.com>
5041
5042 * tracepoint.c (expr_eval_result): Now an int.
5043
5044 2015-08-06 Pedro Alves <palves@redhat.com>
5045
5046 * gdbthread.h (struct regcache): Forward declare.
5047 (struct thread_info) <regcache_data>: Now a struct regcache
5048 pointer.
5049 * inferiors.c (inferior_regcache_data)
5050 (set_inferior_regcache_data): Now work with struct regcache
5051 pointers.
5052 * inferiors.h (struct regcache): Forward declare.
5053 (inferior_regcache_data, set_inferior_regcache_data): Now work
5054 with struct regcache pointers.
5055 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5056 (free_register_cache_thread): Remove struct regcache pointer
5057 casts.
5058
5059 2015-08-06 Pedro Alves <palves@redhat.com>
5060
5061 * server.c (captured_main): On error, print the exception message
5062 to stderr, and if run_once is set, throw a quit.
5063
5064 2015-08-06 Pedro Alves <palves@redhat.com>
5065
5066 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5067 the current thread.
5068
5069 2015-08-06 Pedro Alves <palves@redhat.com>
5070
5071 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5072 reading beyond the passed in buffer length.
5073
5074 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5075
5076 * tracepoint.c (symbol_list) <required>: Remove.
5077
5078 2015-08-06 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5081 count if stopping and suspending threads.
5082 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5083 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5084 (linux_detach): Complete an ongoing step-over.
5085 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5086 throughout.
5087 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5088 (linux_wait_1): If passing a signal to the inferior after
5089 finishing a step-over, unsuspend and re-resume all lwps. If we
5090 see a single-step event but the thread should be continuing, don't
5091 pass the trap to gdb.
5092 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5093 internal_error instead of gdb_assert.
5094 (enqueue_pending_signal): New function.
5095 (check_ptrace_stopped_lwp_gone): Add debug output.
5096 (start_step_over): Use internal_error instead of gdb_assert.
5097 (complete_ongoing_step_over): New function.
5098 (linux_resume_one_thread): Don't resume a suspended thread.
5099 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5100 it stepping.
5101
5102 2015-08-06 Pedro Alves <palves@redhat.com>
5103
5104 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5105 (linux_thread_alive): Use lwp_is_marked_dead.
5106 (extended_event_reported): Delete.
5107 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5108 instead of extended_event_reported.
5109 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5110 as well.
5111 (lwp_is_marked_dead): New function.
5112 (lwp_running): Use lwp_is_marked_dead.
5113 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5114 comment.
5115
5116 2015-08-06 Pedro Alves <palves@redhat.com>
5117
5118 * linux-low.c (linux_wait_1): Move fork event output out of the
5119 !report_to_gdb check. Pass event_child->waitstatus to
5120 target_waitstatus_to_string instead of ourstatus.
5121
5122 2015-08-04 Yao Qi <yao.qi@linaro.org>
5123
5124 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5125 if current_thread is 32 bit.
5126
5127 2015-08-04 Yao Qi <yao.qi@linaro.org>
5128
5129 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5130 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5131 * server.c (extended_protocol): Remove "static".
5132 * server.h (extended_protocol): Declare it.
5133
5134 2015-08-04 Yao Qi <yao.qi@linaro.org>
5135
5136 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5137 both aarch64 and aarch32.
5138 (aarch64_set_pc): Likewise.
5139
5140 2015-08-04 Yao Qi <yao.qi@linaro.org>
5141
5142 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5143 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5144 arm-with-neon.xml to srv_xmlfiles.
5145 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5146 (is_64bit_tdesc): New function.
5147 (aarch64_linux_read_description): New function.
5148 (aarch64_arch_setup): Call aarch64_linux_read_description.
5149 (regs_info): Rename to regs_info_aarch64.
5150 (aarch64_regs_info): Return right regs_info.
5151 (initialize_low_arch): Call initialize_low_arch_aarch32.
5152
5153 2015-08-04 Yao Qi <yao.qi@linaro.org>
5154
5155 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5156 * linux-aarch32-low.c: New file.
5157 * linux-aarch32-low.h: New file.
5158 * linux-arm-low.c (arm_fill_gregset): Move it to
5159 linux-aarch32-low.c.
5160 (arm_store_gregset): Likewise.
5161 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5162 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5163 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5164 (regs_info): Rename to regs_info_arm.
5165 (arm_regs_info): Return regs_info_aarch32 if
5166 have_ptrace_getregset is 1 and target description is
5167 arm_with_neon or arm_with_vfpv3.
5168 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5169 Call initialize_low_arch_aarch32 instead.
5170
5171 2015-08-04 Yao Qi <yao.qi@linaro.org>
5172
5173 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5174 * linux-low.c: ... here.
5175 * linux-low.h (have_ptrace_getregset): Declare it.
5176
5177 2015-08-04 Pedro Alves <palves@redhat.com>
5178
5179 * thread-db.c (struct thread_db): Use new typedefs.
5180 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5181 CHK calls.
5182 (disable_thread_event_reporting): Cast result of dlsym to
5183 destination function pointer type.
5184 (thread_db_mourn): Use td_ta_delete_ftype.
5185
5186 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5187
5188 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5189 arch variant.
5190 (CDX_BREAKPOINT): Define for R2.
5191 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5192 (the_low_target): Add comments.
5193
5194 2015-07-30 Yao Qi <yao.qi@linaro.org>
5195
5196 * linux-arm-low.c (arm_hwcap): Remove it.
5197 (arm_read_description): New local variable arm_hwcap. Don't
5198 set arm_hwcap to zero.
5199
5200 2015-07-30 Yao Qi <yao.qi@linaro.org>
5201
5202 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5203 Use regcache->tdesc instead.
5204 (arm_store_wmmxregset): Likewise.
5205 (arm_fill_vfpregset): Likewise.
5206 (arm_store_vfpregset): Likewise.
5207
5208 2015-07-30 Yao Qi <yao.qi@linaro.org>
5209
5210 * linux-arm-low.c: Include arch/arm.h.
5211 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5212 (arm_store_gregset): Likewise.
5213
5214 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5215
5216 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5217 ptrace's 4th parameter.
5218
5219 2015-07-27 Yao Qi <yao.qi@linaro.org>
5220
5221 * configure.srv (case aarch64*-*-linux*): Don't set
5222 srv_linux_usrregs.
5223
5224 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5225
5226 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5227 sys/ptrace.h.
5228 * linux-arm-low.c: Likewise.
5229 * linux-cris-low.c: Likewise.
5230 * linux-crisv32-low.c: Likewise.
5231 * linux-low.c: Likewise.
5232 * linux-m68k-low.c: Likewise.
5233 * linux-mips-low.c: Likewise.
5234 * linux-nios2-low.c: Likewise.
5235 * linux-s390-low.c: Likewise.
5236 * linux-sparc-low.c: Likewise.
5237 * linux-tic6x-low.c: Likewise.
5238 * linux-tile-low.c: Likewise.
5239 * linux-x86-low.c: Likewise.
5240
5241 2015-07-24 Pedro Alves <palves@redhat.com>
5242
5243 * config.in: Regenerate.
5244 * configure: Regenerate.
5245
5246 2015-07-24 Pedro Alves <palves@redhat.com>
5247
5248 * acinclude.m4: Include ../ptrace.m4.
5249 * configure.ac: Call GDB_AC_PTRACE.
5250 * config.in, configure: Regenerate.
5251
5252 2015-07-24 Yao Qi <yao.qi@linaro.org>
5253
5254 * linux-low.c (linux_create_inferior): Remove setting to
5255 proc->priv->new_inferior.
5256 (linux_attach): Likewise.
5257 (linux_low_filter_event): Likewise.
5258 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5259
5260 2015-07-24 Yao Qi <yao.qi@linaro.org>
5261
5262 * linux-low.c (linux_arch_setup): New function.
5263 (linux_low_filter_event): If proc->tdesc is NULL and
5264 proc->attached is true, call the_low_target.arch_setup.
5265 Otherwise, keep status pending, and return.
5266 (linux_resume_one_lwp_throw): Don't call get_pc if
5267 thread->while_stepping isn't NULL. Don't call
5268 get_thread_regcache if proc->tdesc is NULL.
5269 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5270 (linux_target_ops): Install arch_setup.
5271 * server.c (start_inferior): Call the_target->arch_setup.
5272 * target.h (struct target_ops) <arch_setup>: New field.
5273 (target_arch_setup): New marco.
5274 * lynx-low.c (lynx_target_ops): Update.
5275 * nto-low.c (nto_target_ops): Update.
5276 * spu-low.c (spu_target_ops): Update.
5277 * win32-low.c (win32_target_ops): Update.
5278
5279 2015-07-24 Yao Qi <yao.qi@linaro.org>
5280
5281 * linux-low.c (linux_add_process): Don't set
5282 proc->priv->new_inferior.
5283 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5284 (linux_attach): Likewise.
5285
5286 2015-07-24 Yao Qi <yao.qi@linaro.org>
5287
5288 * server.c (start_inferior): Code refactor.
5289
5290 2015-07-24 Yao Qi <yao.qi@linaro.org>
5291
5292 * server.c (process_serial_event): Set general_thread.
5293
5294 2015-07-21 Yao Qi <yao.qi@linaro.org>
5295
5296 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5297 aarch64_linux_get_debug_reg_capacity.
5298
5299 2015-07-17 Yao Qi <yao.qi@linaro.org>
5300
5301 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5302 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5303 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5304 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5305 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5306 (AARCH64_HWP_ALIGNMENT): Likewise.
5307 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5308 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5309 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5310 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5311 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5312 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5313 (struct aarch64_debug_reg_state): Likewise.
5314 (struct arch_lwp_info): Likewise.
5315 (aarch64_align_watchpoint): Likewise.
5316 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5317 (aarch64_watchpoint_length): Likewise.
5318 (aarch64_point_encode_ctrl_reg): Likewise
5319 (aarch64_point_is_aligned): Likewise.
5320 (aarch64_align_watchpoint): Likewise.
5321 (aarch64_linux_set_debug_regs):
5322 (aarch64_dr_state_insert_one_point): Likewise.
5323 (aarch64_dr_state_remove_one_point): Likewise.
5324 (aarch64_handle_breakpoint): Likewise.
5325 (aarch64_handle_aligned_watchpoint): Likewise.
5326 (aarch64_handle_unaligned_watchpoint): Likewise.
5327 (aarch64_handle_watchpoint): Likewise.
5328
5329 2015-07-17 Yao Qi <yao.qi@linaro.org>
5330
5331 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5332 and don't aarch64_get_debug_reg_state. All callers update.
5333 (aarch64_handle_aligned_watchpoint): Likewise.
5334 (aarch64_handle_unaligned_watchpoint): Likewise.
5335 (aarch64_handle_watchpoint): Likewise.
5336 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5337 (aarch64_remove_point): Likewise.
5338
5339 2015-07-17 Yao Qi <yao.qi@linaro.org>
5340
5341 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5342 debug_printf.
5343 (aarch64_handle_unaligned_watchpoint): Likewise.
5344
5345 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5346
5347 Revert the previous 3 commits:
5348 Move gdb_regex* to common/
5349 Move linux_find_memory_regions_full & co.
5350 gdbserver build-id attribute generator
5351
5352 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5353 Jan Kratochvil <jan.kratochvil@redhat.com>
5354
5355 gdbserver build-id attribute generator.
5356 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5357 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5358 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5359 (find_phdr): New.
5360 (get_dynamic): Use find_pdhr to traverse program headers.
5361 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5362 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5363 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5364 (get_hex_build_id): New.
5365 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5366 to reply XML document.
5367
5368 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5369 Jan Kratochvil <jan.kratochvil@redhat.com>
5370
5371 * target.c: Include target/target-utils.h and fcntl.h.
5372 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5373 (target_fileio_read_stralloc): New functions.
5374
5375 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5376
5377 * Makefile.in (OBS): Add gdb_regex.o.
5378 (gdb_regex.o): New.
5379 * config.in: Rebuilt.
5380 * configure: Rebuilt.
5381
5382 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5383 Jan Kratochvil <jan.kratochvil@redhat.com>
5384
5385 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5386 * Makefile.in (OBS): Add target-utils.o.
5387 (linux-maps.o, target-utils.o): New.
5388 * configure.srv (srv_linux_obj): Add linux-maps.o.
5389
5390 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5391
5392 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5393 function, return 1.
5394 (the_low_target): Install it.
5395
5396 2015-07-14 Pedro Alves <palves@redhat.com>
5397
5398 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5399 Instead, ignore ECHILD, and throw an error for other errnos.
5400
5401 2015-07-10 Pedro Alves <palves@redhat.com>
5402
5403 * event-loop.c (struct callback_event) <data>: Change type to
5404 gdb_client_data instance instead of gdb_client_data pointer.
5405 (append_callback_event): Adjust.
5406
5407 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5408
5409 * linux-aarch64-low.c: Add comments for each linux_target_ops
5410 method. Remove comments already covered in target_ops and
5411 linux_target_ops definitions.
5412 (the_low_target): Add comments for each unimplemented method.
5413
5414 2015-07-09 Yao Qi <yao.qi@linaro.org>
5415
5416 * linux-aarch64-low.c (aarch64_regmap): Remove.
5417 (aarch64_usrregs_info): Remove.
5418 (regs_info): Set field usrregs to NULL.
5419
5420 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5421
5422 * linux-low.c: Include "rsp-low.h"
5423 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5424 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5425 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5426 (handle_btrace_enable_pt): New.
5427 (handle_btrace_general_set): Support "pt".
5428 (handle_btrace_conf_general_set): Support "pt:size".
5429
5430 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5431
5432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5433 Z_PACKET_SW_BP.
5434
5435 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5436
5437 * linux-aarch64-low.c: Remove comment about endianness.
5438 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5439 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5440 memcmp.
5441
5442 2015-06-24 Gary Benson <gbenson@redhat.com>
5443
5444 * linux-i386-ipa.c (stdint.h): Do not include.
5445 * lynx-i386-low.c (stdint.h): Likewise.
5446 * lynx-ppc-low.c (stdint.h): Likewise.
5447 * mem-break.c (stdint.h): Likewise.
5448 * thread-db.c (stdint.h): Likewise.
5449 * tracepoint.c (stdint.h): Likewise.
5450 * win32-low.c (stdint.h): Likewise.
5451
5452 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5453
5454 * server.c (write_qxfer_response): Update call to
5455 remote_escape_output.
5456
5457 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5458 Jan Kratochvil <jan.kratochvil@redhat.com>
5459
5460 Merge multiple hex conversions.
5461 * gdbreplay.c (tohex): Rename to 'fromhex'.
5462 (logchar): Use fromhex.
5463
5464 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5465
5466 * server.c (handle_qxfer_libraries): Set `version' attribute for
5467 <library-list>.
5468
5469 2015-06-10 Gary Benson <gbenson@redhat.com>
5470
5471 * target.h (struct target_ops) <multifs_open>: New field.
5472 <multifs_unlink>: Likewise.
5473 <multifs_readlink>: Likewise.
5474 * linux-low.c (nat/linux-namespaces.h): New include.
5475 (linux_target_ops): Initialize the_target->multifs_open,
5476 the_target->multifs_unlink and the_target->multifs_readlink.
5477 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5478 * hostio.c (hostio_fs_pid): New static variable.
5479 (hostio_handle_new_gdb_connection): New function.
5480 (handle_setfs): Likewise.
5481 (handle_open): Use the_target->multifs_open as appropriate.
5482 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5483 (handle_readlink): Use the_target->multifs_readlink as
5484 appropriate.
5485 (handle_vFile): Handle vFile:setfs packets.
5486 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5487 after target_handle_new_gdb_connection.
5488
5489 2015-06-10 Gary Benson <gbenson@redhat.com>
5490
5491 * configure.ac (AC_CHECK_FUNCS): Add setns.
5492 * config.in: Regenerate.
5493 * configure: Likewise.
5494 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5495 (linux-namespaces.o): New rule.
5496 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5497
5498 2015-06-09 Gary Benson <gbenson@redhat.com>
5499
5500 * hostio.c (handle_open): Process mode argument with
5501 fileio_to_host_mode.
5502
5503 2015-06-01 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5506 * linux-x86-low.c: Likewise.
5507
5508 2015-05-28 Don Breazeal <donb@codesourcery.com>
5509
5510 * linux-low.c (handle_extended_wait): Initialize
5511 thread_info.last_resume_kind for new fork children.
5512
5513 2015-05-15 Pedro Alves <palves@redhat.com>
5514
5515 * target.h (target_handle_new_gdb_connection): Rewrite using if
5516 wrapped in do/while.
5517
5518 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5519
5520 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5521 * configure, config.in: Regenerate.
5522 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5523 Declare typedef.
5524
5525 2015-05-12 Don Breazeal <donb@codesourcery.com>
5526
5527 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5528 PTRACE_EVENT_VFORK_DONE.
5529 (linux_low_ptrace_options, extended_event_reported): Add vfork
5530 events.
5531 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5532 and "vforkdone" for RSP 'T' Stop Reply Packet.
5533 * server.h (report_vfork_events): Declare
5534 global variable.
5535
5536 2015-05-12 Don Breazeal <donb@codesourcery.com>
5537
5538 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5539 (the_low_target) <new_fork>: Initialize new member.
5540 * linux-arm-low.c (arm_new_fork): New function.
5541 (the_low_target) <new_fork>: Initialize new member.
5542 * linux-low.c (handle_extended_wait): Call new target function
5543 new_fork.
5544 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5545 * linux-mips-low.c (mips_add_watchpoint): New function
5546 extracted from mips_insert_point.
5547 (the_low_target) <new_fork>: Initialize new member.
5548 (mips_linux_new_fork): New function.
5549 (mips_insert_point): Call mips_add_watchpoint.
5550 * linux-x86-low.c (x86_linux_new_fork): New function.
5551 (the_low_target) <new_fork>: Initialize new member.
5552
5553 2015-05-12 Don Breazeal <donb@codesourcery.com>
5554
5555 * linux-low.c (handle_extended_wait): Implement return value,
5556 rename argument 'event_child' to 'event_lwp', handle
5557 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5558 (linux_low_ptrace_options): New function.
5559 (linux_low_filter_event): Call linux_low_ptrace_options,
5560 use different argument fo linux_enable_event_reporting,
5561 use return value from handle_extended_wait.
5562 (extended_event_reported): New function.
5563 (linux_wait_1): Call extended_event_reported and set
5564 status to report fork events.
5565 (linux_write_memory): Add pid to debug message.
5566 (reset_lwp_ptrace_options_callback): New function.
5567 (linux_handle_new_gdb_connection): New function.
5568 (linux_target_ops): Initialize new structure member.
5569 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5570 * lynx-low.c: Initialize new structure member.
5571 * remote-utils.c (prepare_resume_reply): Implement stop reason
5572 "fork" for "T" stop message.
5573 * server.c (handle_query): Call handle_new_gdb_connection.
5574 * server.h (report_fork_events): Declare global flag.
5575 * target.h (struct target_ops) <handle_new_gdb_connection>:
5576 New member.
5577 (target_handle_new_gdb_connection): New macro.
5578 * win32-low.c: Initialize new structure member.
5579
5580 2015-05-12 Don Breazeal <donb@codesourcery.com>
5581
5582 * mem-break.c (APPEND_TO_LIST): Define macro.
5583 (clone_agent_expr): New function.
5584 (clone_one_breakpoint): New function.
5585 (clone_all_breakpoints): New function.
5586 * mem-break.h: Declare new functions.
5587
5588 2015-05-12 Don Breazeal <donb@codesourcery.com>
5589
5590 * linux-low.c (linux_supports_fork_events): New function.
5591 (linux_supports_vfork_events): New function.
5592 (linux_target_ops): Initialize new structure members.
5593 (initialize_low): Call linux_check_ptrace_features.
5594 * lynx-low.c (lynx_target_ops): Initialize new structure
5595 members.
5596 * server.c (report_fork_events, report_vfork_events):
5597 New global flags.
5598 (handle_query): Add new features to qSupported packet and
5599 response.
5600 (captured_main): Initialize new global variables.
5601 * target.h (struct target_ops) <supports_fork_events>:
5602 New member.
5603 <supports_vfork_events>: New member.
5604 (target_supports_fork_events): New macro.
5605 (target_supports_vfork_events): New macro.
5606 * win32-low.c (win32_target_ops): Initialize new structure
5607 members.
5608
5609 2015-05-12 Gary Benson <gbenson@redhat.com>
5610
5611 * server.c (handle_qxfer_exec_file): Use current process
5612 if annex is empty.
5613
5614 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5615
5616 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5617 Remove HAVE_PTRACE_GETREGS conditionals.
5618 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5619 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5620
5621 2015-05-08 Yao Qi <yao.qi@linaro.org>
5622
5623 * linux-low.c (linux_supports_conditional_breakpoints): New
5624 function.
5625 (linux_target_ops): Install new target method.
5626 * lynx-low.c (lynx_target_ops): Install NULL hook for
5627 supports_conditional_breakpoints.
5628 * nto-low.c (nto_target_ops): Likewise.
5629 * spu-low.c (spu_target_ops): Likewise.
5630 * win32-low.c (win32_target_ops): Likewise.
5631 * server.c (handle_query): Check
5632 target_supports_conditional_breakpoints.
5633 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5634 New field.
5635 (target_supports_conditional_breakpoints): New macro.
5636
5637 2015-05-06 Pedro Alves <palves@redhat.com>
5638
5639 PR server/18081
5640 * server.c (start_inferior): If the process exits, mourn it.
5641
5642 2015-04-21 Gary Benson <gbenson@redhat.com>
5643
5644 * hostio.c (fileio_open_flags_to_host): Factored out to
5645 fileio_to_host_openflags in common/fileio.c. Single use
5646 updated.
5647
5648 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5649
5650 * linux-xtensa-low.c (xtensa_fill_gregset)
5651 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5652 XCHAL_HAVE_LOOP.
5653
5654 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5655
5656 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5657 (regs_info): Replace usrregs pointer with NULL.
5658
5659 2015-04-17 Gary Benson <gbenson@redhat.com>
5660
5661 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5662 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5663 * server.c (handle_qxfer_exec_file): New function.
5664 (qxfer_packets): Add exec-file entry.
5665 (handle_query): Report qXfer:exec-file:read as supported packet.
5666
5667 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5668
5669 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5670
5671 2015-04-09 Gary Benson <gbenson@redhat.com>
5672
5673 * hostio-errno.c (errno_to_fileio_error): Remove function.
5674 Update caller to use remote_fileio_to_fio_error.
5675
5676 2015-04-09 Yao Qi <yao.qi@linaro.org>
5677
5678 * linux-low.c (linux_insert_point): Call
5679 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5680 (linux_remove_point): Call remove_memory_breakpoint if type is
5681 raw_bkpt_type_sw.
5682 * linux-x86-low.c (x86_insert_point): Don't call
5683 insert_memory_breakpoint.
5684 (x86_remove_point): Don't call remove_memory_breakpoint.
5685
5686 2015-04-01 Pedro Alves <palves@redhat.com>
5687 Cleber Rosa <crosa@redhat.com>
5688
5689 * server.c (gdbserver_usage): Reorganize and extend the usage
5690 message.
5691
5692 2015-03-24 Pedro Alves <palves@redhat.com>
5693
5694 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5695 output. Also dump TRAP_TRACE.
5696 (linux_low_filter_event): In debug output, distinguish a
5697 resume_stop SIGSTOP from a delayed SIGSTOP.
5698
5699 2015-03-24 Gary Benson <gbenson@redhat.com>
5700
5701 * linux-x86-low.c (x86_linux_new_thread): Moved to
5702 nat/x86-linux.c.
5703 (x86_linux_prepare_to_resume): Likewise.
5704
5705 2015-03-24 Gary Benson <gbenson@redhat.com>
5706
5707 * Makefile.in (x86-linux-dregs.o): New rule.
5708 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5709 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5710 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5711 (x86_linux_dr_get): Likewise.
5712 (x86_linux_dr_set): Likewise.
5713 (update_debug_registers_callback): Likewise.
5714 (x86_linux_dr_set_addr): Likewise.
5715 (x86_linux_dr_get_addr): Likewise.
5716 (x86_linux_dr_set_control): Likewise.
5717 (x86_linux_dr_get_control): Likewise.
5718 (x86_linux_dr_get_status): Likewise.
5719 (x86_linux_update_debug_registers): Likewise.
5720
5721 2015-03-24 Gary Benson <gbenson@redhat.com>
5722
5723 * linux-x86-low.c (x86_linux_update_debug_registers):
5724 New function, factored out from...
5725 (x86_linux_prepare_to_resume): ...this.
5726
5727 2015-03-24 Gary Benson <gbenson@redhat.com>
5728
5729 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5730 (x86_linux_dr_set): Likewise.
5731 (update_debug_registers_callback): Likewise.
5732 (x86_linux_dr_set_addr): Likewise.
5733 (x86_linux_dr_get_addr): Likewise.
5734 (x86_linux_dr_set_control): Likewise.
5735 (x86_linux_dr_get_control): Likewise.
5736 (x86_linux_dr_get_status): Likewise.
5737 (x86_linux_prepare_to_resume): Likewise.
5738
5739 2015-03-24 Gary Benson <gbenson@redhat.com>
5740
5741 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5742 Use perror_with_name. Pass string through gettext.
5743 (x86_linux_dr_set): Likewise.
5744
5745 2015-03-24 Gary Benson <gbenson@redhat.com>
5746
5747 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5748 (x86_linux_dr_set_addr): ...this.
5749 (x86_dr_low_get_addr): Rename to...
5750 (x86_linux_dr_get_addr): ...this.
5751 (x86_dr_low_set_control): Rename to...
5752 (x86_linux_dr_set_control): ...this.
5753 (x86_dr_low_get_control): Rename to...
5754 (x86_linux_dr_get_control): ...this.
5755 (x86_dr_low_get_status): Rename to...
5756 (x86_linux_dr_get_status): ...this.
5757 (x86_dr_low): Update with new function names.
5758
5759 2015-03-24 Gary Benson <gbenson@redhat.com>
5760
5761 * Makefile.in (x86-linux.o): New rule.
5762 * configure.srv: Add x86-linux.o to relevant targets.
5763 * linux-low.c (lwp_set_arch_private_info): New function.
5764 (lwp_arch_private_info): Likewise.
5765 * linux-x86-low.c: Include nat/x86-linux.h.
5766 (arch_lwp_info): Removed structure.
5767 (update_debug_registers_callback):
5768 Use lwp_set_debug_registers_changed.
5769 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5770 and lwp_set_debug_registers_changed.
5771 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5772
5773 2015-03-24 Gary Benson <gbenson@redhat.com>
5774
5775 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5776 * linux-arm-low.c (arm_new_thread): Likewise.
5777 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5778 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5779 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5780 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5781
5782 2015-03-24 Gary Benson <gbenson@redhat.com>
5783
5784 * linux-low.c (ptid_of_lwp): New function.
5785 (lwp_is_stopped): Likewise.
5786 (lwp_stop_reason): Likewise.
5787 * linux-x86-low.c (update_debug_registers_callback):
5788 Use lwp_is_stopped.
5789 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5790 lwp_stop_reason.
5791
5792 2015-03-24 Gary Benson <gbenson@redhat.com>
5793
5794 * linux-low.h (linux_stop_lwp): Remove declaration.
5795
5796 2015-03-24 Gary Benson <gbenson@redhat.com>
5797
5798 * linux-low.h: Include nat/linux-nat.h.
5799 * linux-low.c (iterate_over_lwps_args): New structure.
5800 (iterate_over_lwps_filter): New function.
5801 (iterate_over_lwps): Likewise.
5802 * linux-x86-low.c (update_debug_registers_callback):
5803 Update signature to what iterate_over_lwps expects.
5804 Remove PID check that iterate_over_lwps now performs.
5805 (x86_dr_low_set_addr): Use iterate_over_lwps.
5806 (x86_dr_low_set_control): Likewise.
5807
5808 2015-03-24 Gary Benson <gbenson@redhat.com>
5809
5810 * linux-x86-low.c (x86_debug_reg_state): New function.
5811 (x86_linux_prepare_to_resume): Use the above.
5812
5813 2015-03-24 Gary Benson <gbenson@redhat.com>
5814
5815 * linux-low.c (current_lwp_ptid): New function.
5816 * linux-x86-low.c: Include nat/linux-nat.h.
5817 (x86_dr_low_get_addr): Use current_lwp_ptid.
5818 (x86_dr_low_get_control): Likewise.
5819 (x86_dr_low_get_status): Likewise.
5820
5821 2015-03-20 Pedro Alves <palves@redhat.com>
5822
5823 * tracepoint.c (cmd_qtstatus): Make "str" const.
5824
5825 2015-03-20 Pedro Alves <palves@redhat.com>
5826
5827 * server.c (handle_general_set): Make "req_str" const.
5828
5829 2015-03-19 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (linux_resume_one_lwp): Rename to ...
5832 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5833 instead call perror_with_name.
5834 (check_ptrace_stopped_lwp_gone): New function.
5835 (linux_resume_one_lwp): Reimplement as wrapper around
5836 linux_resume_one_lwp_throw that swallows errors if the LWP is
5837 gone.
5838
5839 2015-03-19 Pedro Alves <palves@redhat.com>
5840
5841 * linux-low.c (count_events_callback, select_event_lwp_callback):
5842 No longer check whether the thread has resume_stop as last resume
5843 kind.
5844
5845 2015-03-19 Pedro Alves <palves@redhat.com>
5846
5847 * linux-low.c (count_events_callback, select_event_lwp_callback):
5848 Use the lwp's status_pending_p field, not the thread's.
5849
5850 2015-03-19 Pedro Alves <palves@redhat.com>
5851
5852 * linux-low.c (select_event_lwp_callback): Update comments to
5853 no longer mention SIGTRAP.
5854
5855 2015-03-18 Gary Benson <gbenson@redhat.com>
5856
5857 * server.c (handle_query): Do not report vFile:fstat as supported.
5858
5859 2015-03-11 Gary Benson <gbenson@redhat.com>
5860
5861 * hostio.c (sys/types.h): New include.
5862 (sys/stat.h): Likewise.
5863 (common-remote-fileio.h): Likewise.
5864 (handle_fstat): New function.
5865 (handle_vFile): Handle vFile:fstat packets.
5866
5867 2015-03-11 Gary Benson <gbenson@redhat.com>
5868
5869 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5870 struct stat.st_blocks and struct stat.st_blksize.
5871 * configure: Regenerate.
5872 * config.in: Likewise.
5873 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5874 (OBS): Add common-remote-fileio.o.
5875 (common-remote-fileio.o): New rule.
5876
5877 2015-03-09 Pedro Alves <palves@redhat.com>
5878
5879 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5880 'struct sockaddr' pointer in 'accept' call.
5881
5882 2015-03-09 Pedro Alves <palves@redhat.com>
5883
5884 Revert:
5885 2015-03-07 Pedro Alves <palves@redhat.com>
5886 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5887 or <winsock2.h> here. Instead include "gdb_socket.h".
5888 (remote_open): Use union gdb_sockaddr_u.
5889 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5890 or <winsock2.h> here. Instead include "gdb_socket.h".
5891 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5892 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5893 or <sys/un.h>.
5894 (init_named_socket, gdb_agent_helper_thread): Use union
5895 gdb_sockaddr_u.
5896
5897 2015-03-07 Pedro Alves <palves@redhat.com>
5898
5899 * configure.ac (build_warnings): Move
5900 -Wdeclaration-after-statement to the C-specific set.
5901 * configure: Regenerate.
5902
5903 2015-03-07 Pedro Alves <palves@redhat.com>
5904
5905 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5906 or <winsock2.h> here. Instead include "gdb_socket.h".
5907 (remote_open): Use union gdb_sockaddr_u.
5908 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5909 or <winsock2.h> here. Instead include "gdb_socket.h".
5910 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5911 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5912 or <sys/un.h>.
5913 (init_named_socket, gdb_agent_helper_thread): Use union
5914 gdb_sockaddr_u.
5915
5916 2015-03-07 Pedro Alves <palves@redhat.com>
5917
5918 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5919 instead.
5920
5921 2015-03-06 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-aarch64-low.c (aarch64_insert_point): Use
5924 show_debug_regs as a boolean.
5925 (aarch64_remove_point): Likewise.
5926
5927 2015-03-05 Pedro Alves <palves@redhat.com>
5928
5929 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5930 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5931 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5932 * nto-low.c (nto_target_ops): Likewise.
5933 * spu-low.c (spu_target_ops): Likewise.
5934 * win32-low.c (win32_target_ops): Likewise.
5935
5936 2015-03-04 Pedro Alves <palves@redhat.com>
5937
5938 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5939 Decide whether a breakpoint triggered based on the SIGTRAP's
5940 siginfo.si_code.
5941 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5942 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5943 (linux_low_filter_event): Check for breakpoints before checking
5944 watchpoints.
5945 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5946 siginfo.si_code.
5947 (linux_stopped_by_sw_breakpoint)
5948 (linux_supports_stopped_by_sw_breakpoint)
5949 (linux_stopped_by_hw_breakpoint)
5950 (linux_supports_stopped_by_hw_breakpoint): New functions.
5951 (linux_target_ops): Install new target methods.
5952
5953 2015-03-04 Pedro Alves <palves@redhat.com>
5954
5955 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5956 * server.c (swbreak_feature, hwbreak_feature): New globals.
5957 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5958 (captured_main): Clear swbreak_feature and hwbreak_feature.
5959 * server.h (swbreak_feature, hwbreak_feature): Declare.
5960 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5961 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5962 supports_stopped_by_hw_breakpoint>: New fields.
5963 (target_supports_stopped_by_sw_breakpoint)
5964 (target_stopped_by_sw_breakpoint)
5965 (target_supports_stopped_by_hw_breakpoint)
5966 (target_stopped_by_hw_breakpoint): Declare.
5967
5968 2015-03-04 Pedro Alves <palves@redhat.com>
5969
5970 enum lwp_stop_reason -> enum target_stop_reason
5971 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5972 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5973 (linux_wait_1, stuck_in_jump_pad_callback)
5974 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5975 (linux_stopped_by_watchpoint):
5976 * linux-low.h (enum lwp_stop_reason): Delete.
5977 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5978 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5979
5980 2015-03-04 Yao Qi <yao.qi@linaro.org>
5981
5982 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5983
5984 2015-03-03 Gary Benson <gbenson@redhat.com>
5985
5986 * hostio.c (handle_vFile): Fix prefix lengths.
5987
5988 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5989
5990 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5991 ptr_bits.
5992
5993 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5994
5995 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5996 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5997 (clean): Add "rm -f" for above C files.
5998 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5999 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6000 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6001 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6002 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6003 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6004 (init_registers_s390x_vx_linux64)
6005 (init_registers_s390x_tevx_linux64)
6006 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6007 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6008 declarations.
6009 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6010 (s390_store_vxrs_high): New functions.
6011 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6012 NT_S390_VXRS_HIGH.
6013 (s390_arch_setup): Add logic for selecting one of the new target
6014 descriptions. Activate the new vector regsets if applicable.
6015 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6016 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6017 and init_registers_s390x_tevx_linux64.
6018
6019 2015-03-01 Pedro Alves <palves@redhat.com>
6020
6021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6022 parameter.
6023
6024 2015-02-27 Pedro Alves <palves@redhat.com>
6025
6026 * linux-x86-low.c (u_debugreg_offset): New function.
6027 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6028
6029 2015-02-27 Pedro Alves <palves@redhat.com>
6030
6031 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6032 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6033 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6034 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6035 (ps_lsetfpregs, ps_getpid)
6036 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6037 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6038 (ps_lsetxregs, ps_plog): Declare.
6039
6040 2015-02-27 Pedro Alves <palves@redhat.com>
6041
6042 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6043 IP_AGENT_EXPORT_FUNC.
6044 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6045 IP_AGENT_EXPORT_FUNC.
6046 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6047 (IP_AGENT_EXPORT): Delete.
6048 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6049 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6050 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6051 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6052 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6053 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6054 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6055 (traceframe_read_count, traceframe_write_count)
6056 (traceframes_created, trace_state_variables, get_raw_reg)
6057 (get_trace_state_variable_value, set_trace_state_variable_value)
6058 (ust_loaded, helper_thread_id, cmd_buf): Use
6059 IPA_SYM_EXPORTED_NAME.
6060 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6061 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6062 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6063 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6064 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6065 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6066 EXTERN_C_PUSH/EXTERN_C_POP.
6067 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6068 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6069 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6070 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6071 (traceframe_write_count, traceframe_read_count)
6072 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6073 (about_to_request_buffer_space, get_trace_state_variable_value)
6074 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6075 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6076 EXTERN_C_PUSH/EXTERN_C_POP.
6077 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6078 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6079 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6080 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6081 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6082 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6083 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6084 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6085 Define.
6086 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6087 (IP_AGENT_EXPORT_VAR_DECL): Define.
6088 (tracing): Declare.
6089 (gdb_agent_get_raw_reg): Declare.
6090
6091 2015-02-27 Tom Tromey <tromey@redhat.com>
6092 Pedro Alves <palves@redhat.com>
6093
6094 Rename symbols whose names are reserved C++ keywords throughout.
6095
6096 2015-02-27 Pedro Alves <palves@redhat.com>
6097
6098 * Makefile.in (COMPILER): New, get it from autoconf.
6099 (CXX): Get from autoconf instead.
6100 (COMPILE.pre): Use COMPILER.
6101 (CC-LD): Rename to ...
6102 (CC_LD): ... this. Use COMPILER.
6103 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6104 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6105 * acinclude.m4: Include build-with-cxx.m4.
6106 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6107 Disable -Werror by default if building in C++ mode.
6108 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6109 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6110 the C++ compiler. Save/restore CXXFLAGS too.
6111 * configure: Regenerate.
6112
6113 2015-02-27 Pedro Alves <palves@redhat.com>
6114
6115 * acinclude.m4: Include libiberty.m4.
6116 * configure.ac: Call libiberty_INIT.
6117 * config.in, configure: Regenerate.
6118
6119 2015-02-26 Pedro Alves <palves@redhat.com>
6120
6121 * linux-low.c (linux_wait_1): When incrementing the PC past a
6122 program breakpoint always use the_low_target.breakpoint_len as
6123 increment, rather than the maximum between that and
6124 the_low_target.decr_pc_after_break.
6125
6126 2015-02-23 Pedro Alves <palves@redhat.com>
6127
6128 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6129 thread was doing a step-over; always adjust the PC if
6130 we stepped over a permanent breakpoint.
6131 (linux_wait_1): If we stepped over breakpoint that was on top of a
6132 permanent breakpoint, manually advance the PC past it.
6133
6134 2015-02-23 Pedro Alves <palves@redhat.com>
6135
6136 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6137 modes.
6138 (x86_fill_gregset, x86_store_gregset): Use it when handling
6139 $orig_eax.
6140
6141 2015-02-20 Pedro Alves <palves@redhat.com>
6142
6143 * thread-db.c: Include "nat/linux-procfs.h".
6144 (thread_db_init): Skip listing new threads if the kernel supports
6145 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6146
6147 2015-02-20 Pedro Alves <palves@redhat.com>
6148
6149 * linux-low.c (status_pending_p_callback): Use ptid_match.
6150
6151 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6152
6153 PR breakpoints/16812
6154 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6155 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6156 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6157
6158 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6159
6160 PR breakpoints/15956
6161 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6162
6163 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6164
6165 * linux-low.c (linux_low_btrace_conf): Print size.
6166 * server.c (handle_btrace_conf_general_set): New.
6167 (hanle_general_set): Call handle_btrace_conf_general_set.
6168 (handle_query): Report Qbtrace-conf:bts:size as supported.
6169
6170 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6171
6172 * linux-low.c (linux_low_enable_btrace): Update parameters.
6173 (linux_low_btrace_conf): New.
6174 (linux_target_ops)<to_btrace_conf>: Initialize.
6175 * server.c (current_btrace_conf): New.
6176 (handle_btrace_enable): Rename to ...
6177 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6178 to target_enable_btrace. Update comment. Update users.
6179 (handle_qxfer_btrace_conf): New.
6180 (qxfer_packets): Add btrace-conf entry.
6181 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6182 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6183 (target_ops)<read_btrace_conf>: New.
6184 (target_enable_btrace): Update parameters.
6185 (target_read_btrace_conf): New.
6186
6187 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6188
6189 * server.c (handle_btrace_general_set): Remove call to
6190 target_supports_btrace.
6191 (supported_btrace_packets): New.
6192 (handle_query): Call supported_btrace_packets.
6193 * target.h: include btrace-common.h.
6194 (btrace_target_info): Removed.
6195 (supports_btrace, target_supports_btrace): Update parameters.
6196
6197 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6198
6199 * Makefile.in (SFILES): Add common/btrace-common.c.
6200 (OBS): Add common/btrace-common.o.
6201 (btrace-common.o): Add build rules.
6202 * linux-low: Include btrace-common.h.
6203 (linux_low_read_btrace): Use struct btrace_data. Call
6204 btrace_data_init and btrace_data_fini.
6205
6206 2015-02-06 Pedro Alves <palves@redhat.com>
6207
6208 * thread-db.c (find_new_threads_callback): Add debug output.
6209
6210 2015-02-04 Pedro Alves <palves@redhat.com>
6211
6212 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6213 (resume_stopped_resumed_lwps): New function.
6214 (linux_wait_for_event_filtered): Use it.
6215
6216 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6217
6218 * Makefile.in (SFILES): Add linux-personality.c.
6219 (linux-personality.o): New rule.
6220 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6221 list of objects to be built.
6222 * linux-low.c: Include nat/linux-personality.h.
6223 (linux_create_inferior): Remove code to disable address space
6224 randomization (moved to ../nat/linux-personality.c). Create
6225 cleanup to disable address space randomization.
6226
6227 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6228
6229 * Makefile.in (posix-strerror.o): New rule.
6230 (mingw-strerror.o): Likewise.
6231 * configure: Regenerated.
6232 * configure.ac: Source file ../common/common.host. Initialize new
6233 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6234
6235 2015-01-14 Yao Qi <yao@codesourcery.com>
6236
6237 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6238 (ppc-linux.o): New rule.
6239 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6240 * configure.ac: AC_CHECK_FUNCS(getauxval).
6241 * config.in: Re-generated.
6242 * configure: Re-generated.
6243 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6244 ppc64_64bit_inferior_p
6245
6246 2015-01-14 Yao Qi <yao@codesourcery.com>
6247
6248 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6249 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6250 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6251 (PT_ORIG_R3, PT_TRAP): Likewise.
6252 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6253 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6254 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6255
6256 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6257
6258 * i387-fp.c (i387_cache_to_xsave): In look over
6259 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6260 zmmh_low_space field by use of zmmh_high_space.
6261
6262 2015-01-09 Pedro Alves <palves@redhat.com>
6263
6264 * linux-low.c (step_over_bkpt): Move higher up in the file.
6265 (handle_extended_wait): Don't store the stop_pc here.
6266 (get_stop_pc): Adjust comments and rename to ...
6267 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6268 stopped for a software breakpoint or hardware breakpoint.
6269 (thread_still_has_status_pending_p): New function.
6270 (status_pending_p_callback): Use
6271 thread_still_has_status_pending_p. If the event is no longer
6272 interesting, resume the LWP.
6273 (handle_tracepoints): Add assert.
6274 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6275 (wstatus_maybe_breakpoint): New function.
6276 (cancel_breakpoint): Delete function.
6277 (check_stopped_by_watchpoint): New function, factored out from
6278 linux_low_filter_event.
6279 (lp_status_maybe_breakpoint): Delete function.
6280 (linux_low_filter_event): Remove filter_ptid argument.
6281 Leave thread group exits pending here. Store the LWP's stop PC.
6282 Always leave events pending.
6283 (linux_wait_for_event_filtered): Pull all events out of the
6284 kernel, and leave them all pending.
6285 (count_events_callback, select_event_lwp_callback): Consider all
6286 events.
6287 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6288 (select_event_lwp): Only give preference to the stepping LWP in
6289 all-stop mode. Adjust comments.
6290 (ignore_event): New function.
6291 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6292 references to cancel_breakpoints. Adjust to renames. Also give
6293 equal priority to all LWPs that have had events in non-stop mode.
6294 If reporting a software breakpoint event, unadjust the LWP's PC.
6295 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6296 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6297 Adjust.
6298 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6299 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6300 (linux_stopped_by_watchpoint): Adjust.
6301 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6302 * linux-low.h (enum lwp_stop_reason): New.
6303 (struct lwp_info) <stop_pc>: Adjust comment.
6304 <stopped_by_watchpoint>: Delete field.
6305 <stop_reason>: New field.
6306 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6307 * mem-break.c (software_breakpoint_inserted_here)
6308 (hardware_breakpoint_inserted_here): New function.
6309 * mem-break.h (software_breakpoint_inserted_here)
6310 (hardware_breakpoint_inserted_here): Declare.
6311 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6312 (cancel_breakpoints): Delete.
6313 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6314 (upload_fast_traceframes): Remove references to
6315 cancel_breakpoints.
6316
6317 2015-01-09 Pedro Alves <palves@redhat.com>
6318
6319 * thread-db.c (find_new_threads_callback): Ignore thread if the
6320 kernel thread ID is -1.
6321
6322 2015-01-09 Pedro Alves <palves@redhat.com>
6323
6324 * linux-low.c (linux_attach_fail_reason_string): Move to
6325 nat/linux-ptrace.c, and rename.
6326 (linux_attach_lwp): Update comment.
6327 (attach_proc_task_lwp_callback): New function.
6328 (linux_attach): Adjust to rename and use
6329 linux_proc_attach_tgid_threads.
6330 (linux_attach_fail_reason_string): Delete declaration.
6331
6332 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6333
6334 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6335 * server.c (gdbserver_version): Likewise.
6336
6337 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6338
6339 * remote-utils.c: Include ctype.h.
6340 (input_interrupt): Explicitly handle the case when the char
6341 received is the NUL byte. Improve the printing of non-ASCII
6342 characters.
6343
6344 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6345
6346 * linux-low.c (linux_low_filter_event): Update call to
6347 linux_enable_event_reporting following the addition of
6348 a new parameter to that function.
6349
6350 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6351
6352 PR server/17457
6353 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6354 (AARCH64_FPCR_REGNO): Likewise.
6355 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6356 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6357 (aarch64_store_fpregset): Likewise.
6358
6359 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6360
6361 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6362 Remove FIXME comment about assumption about N.
6363
6364 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6365
6366 * configure.ac: If large-file support is disabled in GDBserver,
6367 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6368 * configure: Regenerate.
6369
6370 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6371
6372 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6373 warning upon ENODATA from ptrace.
6374 * linux-s390-low.c (s390_store_tdb): New.
6375 (s390_regsets): Add regset for NT_S390_TDB.
6376
6377 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6378
6379 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6380 without a fill_function.
6381 * linux-s390-low.c (s390_fill_last_break): Remove.
6382 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6383 (s390_arch_setup): Use regset's size instead of fill_function for
6384 loop end condition.
6385
6386 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6387
6388 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6389 the regset's store function when ptrace returned an error.
6390 * regcache.c (get_thread_regcache): Invalidate register cache
6391 before fetching inferior's registers.
6392
6393 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6394
6395 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6396 while-loop as for-loop.
6397 (regsets_store_inferior_registers): Likewise.
6398
6399 2014-11-28 Yao Qi <yao@codesourcery.com>
6400
6401 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6402 * config.in, configure: Re-generate.
6403 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6404 is defined.
6405
6406 2014-11-21 Yao Qi <yao@codesourcery.com>
6407
6408 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6409 (AC_CHECK_HEADERS): Remove malloc.h.
6410 * configure: Re-generated.
6411 * config.in: Re-generated.
6412 * server.h: Don't include alloca.h and malloc.h.
6413 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6414 Don't include malloc.h.
6415
6416 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6417
6418 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6419 corresponding ERRNO check in same block.
6420
6421 2014-11-12 Pedro Alves <palves@redhat.com>
6422
6423 * server.c (cont_thread): Update comment.
6424 (start_inferior, attach_inferior): No longer clear cont_thread.
6425 (handle_v_cont): No longer set cont_thread.
6426 (captured_main): Clear cont_thread each time a GDB connects.
6427
6428 2014-11-12 Pedro Alves <palves@redhat.com>
6429
6430 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6431 thread, and don't resume all threads if the Hc thread has exited.
6432
6433 2014-11-12 Pedro Alves <palves@redhat.com>
6434
6435 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6436 the process group instead of to a specific LWP.
6437
6438 2014-10-15 Pedro Alves <palves@redhat.com>
6439
6440 PR server/17487
6441 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6442 parameter.
6443 (arm_set_thread_context): Delete.
6444 (the_low_target): Adjust.
6445 * win32-i386-low.c (debug_registers_changed)
6446 (debug_registers_used): Delete.
6447 (update_debug_registers_callback): New function.
6448 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6449 needing to update their debug registers.
6450 (win32_get_current_dr): New function.
6451 (x86_dr_low_get_addr, x86_dr_low_get_control)
6452 (x86_dr_low_get_status): Fetch the debug register from the thread
6453 record's context.
6454 (i386_initial_stuff): Adjust.
6455 (i386_get_thread_context): Remove current_event parameter. Don't
6456 clear debug_registers_changed nor copy DR values to
6457 debug_reg_state.
6458 (i386_set_thread_context): Delete.
6459 (i386_prepare_to_resume): New function.
6460 (i386_thread_added): Mark the thread as needing to update irs
6461 debug registers.
6462 (the_low_target): Remove i386_set_thread_context and install
6463 i386_prepare_to_resume.
6464 * win32-low.c (win32_get_thread_context): Adjust.
6465 (win32_set_thread_context): Use SetThreadContext
6466 directly.
6467 (win32_prepare_to_resume): New function.
6468 (win32_require_context): New function, factored out from ...
6469 (thread_rec): ... this.
6470 (continue_one_thread): Call win32_prepare_to_resume on each thread
6471 we're about to continue.
6472 (win32_resume): Call win32_prepare_to_resume on the event thread.
6473 * win32-low.h (struct win32_thread_info)
6474 <debug_registers_changed>: New field.
6475 (struct win32_target_ops): Change prototype of set_thread_context,
6476 delete set_thread_context and add prepare_to_resume.
6477 (win32_require_context): New declaration.
6478
6479 2014-10-08 Gary Benson <gbenson@redhat.com>
6480
6481 * server.h: Do not include common-exceptions.h.
6482
6483 2014-10-08 Gary Benson <gbenson@redhat.com>
6484
6485 * server.h: Do not include cleanups.h.
6486
6487 2014-09-30 James Hogan <james.hogan@imgtec.com>
6488
6489 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6490 mips64-dsp-linux.c.
6491
6492 2014-09-23 Yao Qi <yao@codesourcery.com>
6493
6494 * linux-low.c (lp_status_maybe_breakpoint): New function.
6495 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6496 (count_events_callback): Likewise.
6497 (select_event_lwp_callback): Likewise.
6498 (cancel_breakpoints_callback): Likewise.
6499
6500 2014-09-19 Don Breazeal <donb@codesourcery.com>
6501
6502 * linux-low.c (handle_extended_wait): Call
6503 linux_ptrace_get_extended_event.
6504 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6505 linux_is_extended_waitstatus.
6506
6507 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6508
6509 * Makefile.in (CPPFLAGS): Define.
6510 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6511 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6512
6513 2014-09-16 Gary Benson <gbenson@redhat.com>
6514
6515 * inferiors.h (current_inferior): Renamed as...
6516 (current_thread): New variable. All uses updated.
6517 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6518 (maybe_move_out_of_jump_pad): Likewise.
6519 (cancel_breakpoint): Likewise.
6520 (linux_low_filter_event): Likewise.
6521 (wait_for_sigstop): Likewise.
6522 (linux_resume_one_lwp): Likewise.
6523 (need_step_over_p): Likewise.
6524 (start_step_over): Likewise.
6525 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6526 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6527 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6528 and save_inferior as saved_thread.
6529 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6530 saved_thread.
6531 (regcache_invalidate_thread): Likewise.
6532 * remote-utils.c (prepare_resume_reply): Likewise.
6533 * thread-db.c (thread_db_get_tls_address): Likewise.
6534 (disable_thread_event_reporting): Likewise.
6535 (remove_thread_event_breakpoints): Likewise.
6536 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6537 as saved_thread.
6538 * target.h (set_desired_inferior): Renamed as...
6539 (set_desired_thread): New declaration. All uses updated.
6540 * server.c (myresume): Updated comment to reference thread instead
6541 of inferior.
6542 (handle_serial_event): Likewise.
6543 (handle_target_event): Likewise.
6544
6545 2014-09-12 Tom Tromey <tromey@redhat.com>
6546 Gary Benson <gbenson@redhat.com>
6547
6548 * regcache.h: Include common-regcache.h.
6549 (regcache_read_pc): Don't declare.
6550 * regcache.c (get_thread_regcache_for_ptid): New function.
6551
6552 2014-09-11 Tom Tromey <tromey@redhat.com>
6553 Gary Benson <gbenson@redhat.com>
6554
6555 * symbol.c: New file.
6556 * Makefile.in (SFILES): Add symbol.c.
6557 (OBS): Add symbol.o.
6558
6559 2014-09-11 Gary Benson <gbenson@redhat.com>
6560
6561 * target.c (target_stop_ptid, target_continue_ptid): New
6562 functions.
6563
6564 2014-09-11 Tom Tromey <tromey@redhat.com>
6565 Gary Benson <gbenson@redhat.com>
6566
6567 * target.h: Include target/target.h.
6568 * target.c (target_read_memory, target_read_uint32)
6569 (target_write_memory): New functions.
6570
6571 2014-09-11 Gary Benson <gbenson@redhat.com>
6572
6573 * server.h (debug_hw_points): Don't declare.
6574 * server.c (debug_hw_points): Don't define. Replace all uses
6575 with show_debug_regs.
6576 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6577 all uses with show_debug_regs.
6578
6579 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6580
6581 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6582 endianness into account.
6583 (ppc_supply_ptrace_register): Likewise.
6584
6585 2014-09-03 James Hogan <james.hogan@imgtec.com>
6586
6587 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6588 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6589
6590 2014-09-03 Gary Benson <gbenson@redhat.com>
6591
6592 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6593 ALL_DEBUG_ADDRESS_REGISTERS.
6594
6595 2014-09-02 Gary Benson <gbenson@redhat.com>
6596
6597 * i386-low.h: Renamed as...
6598 * x86-low.h: New file. All type, function and variable name
6599 prefixes changed from "i386_" to "x86_". All references updated.
6600 * i386-low.c: Renamed as...
6601 * x86-low.c: New file. All type, function and variable name
6602 prefixes changed from "i386_" to "x86_". All references updated.
6603
6604 2014-09-02 Gary Benson <gbenson@redhat.com>
6605
6606 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6607 (x86_linux_new_thread): Likewise.
6608
6609 2014-08-29 Gary Benson <gbenson@redhat.com>
6610
6611 * server.h (setjmp.h): Do not include.
6612 (toplevel): Do not declare.
6613 (common-exceptions.h): Include.
6614 (cleanups.h): Likewise.
6615 * server.c (toplevel): Do not define.
6616 (exit_code): New static global.
6617 (detach_or_kill_for_exit_cleanup): New function.
6618 (main): New function. Original main renamed to...
6619 (captured_main): New function.
6620 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6621
6622 2014-08-29 Gary Benson <gbenson@redhat.com>
6623
6624 * Makefile.in (SFILES): Add common/common-exceptions.c.
6625 (OBS): Add common-exceptions.o.
6626 (common-exceptions.o): New rule.
6627 * utils.c (prepare_to_throw_exception): New function.
6628
6629 2014-08-29 Gary Benson <gbenson@redhat.com>
6630
6631 * config.in: Regenerate.
6632 * configure: Likewise.
6633
6634 2014-08-29 Gary Benson <gbenson@redhat.com>
6635
6636 * Makefile.in (SFILES): Add common/cleanups.c.
6637 (OBS): cleanups.o.
6638 (cleanups.o): New rule.
6639
6640 2014-08-29 Gary Benson <gbenson@redhat.com>
6641
6642 * utils.c (internal_vwarning): New function.
6643
6644 2014-08-28 Gary Benson <gbenson@redhat.com>
6645
6646 * utils.h (fatal): Remove declaration.
6647 * utils.c (fatal): Remove function.
6648
6649 2014-08-28 Gary Benson <gbenson@redhat.com>
6650
6651 * tracepoint.c (gdb_agent_init): Replace fatal with
6652 perror_with_name.
6653 (initialize_tracepoint): Likewise.
6654
6655 2014-08-28 Gary Benson <gbenson@redhat.com>
6656
6657 * remote-utils.c (remote_prepare): Replace fatal with error.
6658
6659 2014-08-28 Gary Benson <gbenson@redhat.com>
6660
6661 * linux-low.c (linux_async): Replace fatal with warning.
6662 Tidy up and return.
6663 (linux_start_non_stop): Return -1 if linux_async failed.
6664
6665 2014-08-28 Gary Benson <gbenson@redhat.com>
6666
6667 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6668 gdb_assert.
6669 (i386_dr_low_get_addr): Remove vague comment.
6670 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6671 gdb_assert.
6672
6673 2014-08-28 Gary Benson <gbenson@redhat.com>
6674
6675 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6676 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6677 internal_error.
6678 (linux_resume_one_lwp): Likewise.
6679 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6680 gdb_assert.
6681 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6682 with internal_error.
6683 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6684 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6685 (find_register_by_name): Replace fatal with internal_error.
6686 (find_regno): Likewise.
6687 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6688 * thread-db.c (thread_db_create_event): Likewise.
6689 (thread_db_load_search): Likewise.
6690 (try_thread_db_load_1): Likewise.
6691 * tracepoint.c (get_jump_space_head): Replace fatal with
6692 internal_error.
6693 (claim_trampoline_space): Likewise.
6694 (have_fast_tracepoint_trampoline_buffer): Likewise.
6695 (cmd_qtstart): Likewise.
6696 (stop_tracing): Likewise.
6697 (fast_tracepoint_collecting): Likewise.
6698 (target_malloc): Likewise.
6699 (download_tracepoint): Likewise.
6700 (download_trace_state_variables): Replace check with gdb_assert.
6701 (upload_fast_traceframes): Replace fatal with internal_error.
6702
6703 2014-08-19 Tom Tromey <tromey@redhat.com>
6704 Gary Benson <gbenson@redhat.com>
6705
6706 * Makefile.in (SFILES): Add common/common-debug.c.
6707 (OBS): Add common-debug.o.
6708 (common-debug.o): New rule.
6709 * debug.h (debug_printf): Don't declare.
6710 * debug.c (debug_printf): Renamed and rewritten as...
6711 (debug_vprintf): New function.
6712
6713 2014-08-19 Gary Benson <gbenson@redhat.com>
6714
6715 * utils.h: Do not include print-utils.h.
6716
6717 2014-08-19 Tom Tromey <tromey@redhat.com>
6718 Gary Benson <gbenson@redhat.com>
6719
6720 * server.h: Add static assertion.
6721 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6722
6723 2014-08-19 Tom Tromey <tromey@redhat.com>
6724 Gary Benson <gbenson@redhat.com>
6725
6726 * Makefile.in (SFILES): Add common/errors.c.
6727 (OBS): Add errors.o.
6728 (IPA_OBS): Add errors-ipa.o.
6729 (errors.o): New rule.
6730 (errors-ipa.o): Likewise.
6731 * utils.h (perror_with_name, error, warning): Don't declare.
6732 * utils.c (warning): Renamed and rewritten as...
6733 (vwarning): New function.
6734 (error): Renamed and rewritten as...
6735 (verror): New function.
6736 (internal_error): Renamed and rewritten as...
6737 (internal_verror): New function.
6738
6739 2014-08-07 Gary Benson <gbenson@redhat.com>
6740
6741 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6742 * configure: Regenerate.
6743 * config.in: Likewise.
6744 * server.h: Do not include errno.h.
6745 * event-loop.c: Likewise.
6746 * hostio-errno.c: Likewise.
6747 * linux-low.c: Likewise.
6748 * remote-utils.c: Likewise.
6749 * spu-low.c: Likewise.
6750 * utils.c: Likewise.
6751 * gdbreplay.c: Unconditionally include errno.h.
6752
6753 2014-08-07 Gary Benson <gbenson@redhat.com>
6754
6755 * server.h: Do not include string.h.
6756 * event-loop.c: Likewise.
6757 * linux-low.c: Likewise.
6758 * regcache.c: Likewise.
6759 * remote-utils.c: Likewise.
6760 * spu-low.c: Likewise.
6761 * utils.c: Likewise.
6762
6763 2014-08-07 Gary Benson <gbenson@redhat.com>
6764
6765 * server.h: Do not include gdb_assert.h.
6766
6767 2014-08-07 Gary Benson <gbenson@redhat.com>
6768
6769 * server.h: Do not include common-utils.h.
6770
6771 2014-08-07 Gary Benson <gbenson@redhat.com>
6772
6773 * server.h: Do not include ptid.h.
6774 * notif.h: Likewise.
6775
6776 2014-08-07 Gary Benson <gbenson@redhat.com>
6777
6778 * server.h: Do not include gdb_locale.h.
6779
6780 2014-08-07 Gary Benson <gbenson@redhat.com>
6781
6782 * server.h: Do not include gdb/signals.h.
6783 * win32-low.c: Likewise.
6784
6785 2014-08-07 Gary Benson <gbenson@redhat.com>
6786
6787 * server.h: Do not include pathmax.h.
6788
6789 2014-08-07 Gary Benson <gbenson@redhat.com>
6790
6791 * server.h: Do not include libiberty.h.
6792 * linux-bfin-low.c: Likewise.
6793
6794 2014-08-07 Gary Benson <gbenson@redhat.com>
6795
6796 * server.h: Do not include ansidecl.h.
6797
6798 2014-08-07 Gary Benson <gbenson@redhat.com>
6799
6800 * linux-x86-low.c: Do not include stddef.h.
6801 * lynx-ppc-low.c: Likewise.
6802 * tracepoint.c: Likewise.
6803
6804 2014-08-07 Gary Benson <gbenson@redhat.com>
6805
6806 * server.h: Do not include stdarg.h.
6807 * nto-low.c: Likewise.
6808
6809 2014-08-07 Gary Benson <gbenson@redhat.com>
6810
6811 * server.h: Do not include stdlib.h.
6812 * inferiors.c: Likewise.
6813 * linux-low.c: Likewise.
6814 * regcache.c: Likewise.
6815 * spu-low.c: Likewise.
6816 * tracepoint.c: Likewise.
6817 * utils.c: Likewise.
6818
6819 2014-08-07 Gary Benson <gbenson@redhat.com>
6820
6821 * server.h: Do not include stdio.h.
6822 * linux-low.c: Likewise.
6823 * remote-utils.c: Likewise.
6824 * spu-low.c: Likewise.
6825 * utils.c: Likewise.
6826 * wincecompat.c: Likewise.
6827
6828 2014-08-06 Gary Benson <gbenson@redhat.com>
6829
6830 * regcache.c (init_register_cache): Move conditionals inside if.
6831
6832 2014-08-06 Gary Benson <gbenson@redhat.com>
6833
6834 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6835
6836 2014-07-31 Gary Benson <gbenson@redhat.com>
6837
6838 * ax.h: Do not include server.h.
6839 * gdbthread.h: Likewise.
6840 * lynx-low.h: Likewise.
6841 * notif.h: Likewise.
6842
6843 2014-07-30 Gary Benson <gbenson@redhat.com>
6844
6845 * server.h: Include common-defs.h.
6846 Do not include config.h or build-gnulib-gdbserver/config.h.
6847
6848 2014-07-30 Gary Benson <gbenson@redhat.com>
6849
6850 * hostio-errno.c: Move server.h to top of includes list.
6851 * inferiors.c: Likewise.
6852 * linux-x86-low.c: Likewise.
6853 * notif.c: Include server.h.
6854
6855 2014-07-24 Tom Tromey <tromey@redhat.com>
6856 Gary Benson <gbenson@redhat.com>
6857
6858 * server.h (CORE_ADDR): Now unsigned.
6859
6860 2014-07-16 Pedro Alves <palves@redhat.com>
6861
6862 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6863
6864 2014-07-15 Pedro Alves <palves@redhat.com>
6865
6866 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6867 copy.
6868
6869 2014-07-11 Pedro Alves <palves@redhat.com>
6870
6871 * linux-low.c (kill_wait_lwp): New function, based on
6872 kill_one_lwp_callback, but use my_waitpid directly.
6873 (kill_one_lwp_callback, linux_kill): Use it.
6874
6875 2014-06-23 Pedro Alves <palves@redhat.com>
6876
6877 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6878 before setting DR0..DR3.
6879
6880 2014-06-20 Gary Benson <gbenson@redhat.com>
6881
6882 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6883 * configure: Regenerated.
6884 * config.in: Likewise.
6885
6886 2014-06-20 Gary Benson <gbenson@redhat.com>
6887
6888 * Makefile.in (SFILES): Update locations for files moved
6889 from common to nat.
6890 (object file files): Reordered.
6891
6892 2014-06-20 Gary Benson <gbenson@redhat.com>
6893
6894 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6895 (i386_dr_low_set_addr): Likewise.
6896 (i386_dr_low_get_addr): Likewise.
6897 (i386_dr_low_can_set_control): Likewise.
6898 (i386_dr_low_set_control): Likewise.
6899 (i386_dr_low_get_control): Likewise.
6900 (i386_dr_low_get_status): Likewise.
6901 (i386_get_debug_register_length): Likewise.
6902 * linux-x86-low.c (i386_dr_low_set_addr):
6903 Changed signature. Made static.
6904 (i386_dr_low_get_addr): Likewise.
6905 (i386_dr_low_set_control): Likewise.
6906 (i386_dr_low_get_control): Likewise.
6907 (i386_dr_low_get_status): Likewise.
6908 (i386_dr_low): New global variable.
6909 * win32-i386-low.c (i386_dr_low_set_addr):
6910 Changed signature. Made static.
6911 (i386_dr_low_get_addr): Likewise.
6912 (i386_dr_low_set_control): Likewise.
6913 (i386_dr_low_get_control): Likewise.
6914 (i386_dr_low_get_status): Likewise.
6915 (i386_dr_low): New global variable.
6916
6917 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6918
6919 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6920 * Makefile.in (AR, AR_FLAGS): Define.
6921 * configure: Regenerate.
6922
6923 2014-06-19 Gary Benson <gbenson@redhat.com>
6924
6925 * Makefile.in (i386-dregs.o): New rule.
6926 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6927 * i386-low.c (target.h): Remove include.
6928 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6929 (DR_CONTROL_SHIFT): Likewise.
6930 (DR_CONTROL_SIZE): Likewise.
6931 (DR_RW_EXECUTE): Likewise.
6932 (DR_RW_WRITE): Likewise.
6933 (DR_RW_READ): Likewise.
6934 (DR_RW_IORW): Likewise.
6935 (DR_LEN_1): Likewise.
6936 (DR_LEN_2): Likewise.
6937 (DR_LEN_4): Likewise.
6938 (DR_LEN_8): Likewise.
6939 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6940 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6941 (DR_ENABLE_SIZE): Likewise.
6942 (DR_LOCAL_SLOWDOWN): Likewise.
6943 (DR_GLOBAL_SLOWDOWN): Likewise.
6944 (DR_CONTROL_RESERVED): Likewise.
6945 (I386_DR_CONTROL_MASK): Likewise.
6946 (I386_DR_VACANT): Likewise.
6947 (I386_DR_LOCAL_ENABLE): Likewise.
6948 (I386_DR_GLOBAL_ENABLE): Likewise.
6949 (I386_DR_DISABLE): Likewise.
6950 (I386_DR_SET_RW_LEN): Likewise.
6951 (I386_DR_GET_RW_LEN): Likewise.
6952 (I386_DR_WATCH_HIT): Likewise.
6953 (i386_wp_op_t): Likewise.
6954 (i386_show_dr): Likewise.
6955 (i386_length_and_rw_bits): Likewise.
6956 (i386_insert_aligned_watchpoint): Likewise.
6957 (i386_remove_aligned_watchpoint): Likewise.
6958 (i386_handle_nonaligned_watchpoint): Likewise.
6959 i386_update_inferior_debug_regs(): Likewise.
6960 (i386_dr_insert_watchpoint): Likewise.
6961 (i386_dr_remove_watchpoint): Likewise.
6962 (i386_dr_region_ok_for_watchpoint): Likewise.
6963 (i386_dr_stopped_data_address): Likewise.
6964 (i386_dr_stopped_by_watchpoint): Likewise.
6965
6966 2014-06-19 Gary Benson <gbenson@redhat.com>
6967
6968 * i386-low.c (i386_dr_show): Renamed to
6969 i386_show_dr and made static. All uses updated.
6970 (i386_dr_length_and_rw_bits): Renamed to
6971 i386_length_and_rw_bits and made static.
6972 All uses updated.
6973 (i386_dr_insert_aligned_watchpoint): Renamed to
6974 i386_insert_aligned_watchpoint and made static.
6975 All uses updated.
6976 (i386_dr_remove_aligned_watchpoint): Renamed to
6977 i386_remove_aligned_watchpoint and made static.
6978 All uses updated.
6979 (i386_dr_update_inferior_debug_regs): Renamed to
6980 i386_update_inferior_debug_regs and made static.
6981 All uses updated.
6982
6983 2014-06-18 Gary Benson <gbenson@redhat.com>
6984
6985 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6986 (i386_dr_low_can_set_control): Likewise.
6987 (i386_get_debug_register_length): Likewise.
6988 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6989 (i386_dr_low_can_set_control): Likewise.
6990 (i386_get_debug_register_length): Likewise.
6991
6992 2014-06-17 Gary Benson <gbenson@redhat.com>
6993
6994 * i386-low.h (i386-dregs.h): New include.
6995 (DR_FIRSTADDR): Now in i386-dregs.h.
6996 (DR_LASTADDR): Likewise.
6997 (DR_NADDR): Likewise.
6998 (DR_STATUS): Likewise.
6999 (DR_CONTROL): Likewise.
7000 (i386_debug_reg_state): Likewise.
7001 (i386_dr_insert_watchpoint): Likewise.
7002 (i386_dr_remove_watchpoint): Likewise.
7003 (i386_dr_region_ok_for_watchpoint): Likewise.
7004 (i386_dr_stopped_data_address): Likewise.
7005 (i386_dr_stopped_by_watchpoint): Likewise.
7006 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7007
7008 2014-06-18 Gary Benson <gbenson@redhat.com>
7009
7010 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7011 i386_dr_insert_watchpoint.
7012 (i386_low_remove_watchpoint): Renamed to
7013 i386_dr_remove_watchpoint.
7014 (i386_low_region_ok_for_watchpoint): Renamed to
7015 i386_dr_region_ok_for_watchpoint.
7016 (i386_low_stopped_data_address): Renamed to
7017 i386_dr_stopped_data_address.
7018 (i386_low_stopped_by_watchpoint): Renamed to
7019 i386_dr_stopped_by_watchpoint.
7020 * i386-low.c (i386_show_dr): Renamed to
7021 i386_dr_show and made nonstatic. All uses updated.
7022 (i386_length_and_rw_bits): Renamed to
7023 i386_dr_length_and_rw_bits and made nonstatic.
7024 All uses updated.
7025 (i386_insert_aligned_watchpoint): Renamed to
7026 i386_dr_insert_aligned_watchpoint and made nonstatic.
7027 All uses updated.
7028 (i386_remove_aligned_watchpoint): Renamed to
7029 i386_dr_remove_aligned_watchpoint and made nonstatic.
7030 All uses updated.
7031 (i386_update_inferior_debug_regs): Renamed to
7032 i386_dr_update_inferior_debug_regs and made nonstatic.
7033 All uses updated.
7034 (i386_low_insert_watchpoint): Renamed to
7035 i386_dr_insert_watchpoint. All uses updated.
7036 (i386_low_remove_watchpoint): Renamed to
7037 i386_dr_remove_watchpoint. All uses updated.
7038 (i386_low_region_ok_for_watchpoint): Renamed to
7039 i386_dr_region_ok_for_watchpoint. All uses updated.
7040 (i386_low_stopped_data_address): Renamed to
7041 i386_dr_stopped_data_address. All uses updated.
7042 (i386_low_stopped_by_watchpoint): Renamed to
7043 i386_dr_stopped_by_watchpoint. All uses updated.
7044
7045 2014-06-18 Gary Benson <gbenson@redhat.com>
7046
7047 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7048 (i386_dr_low_can_set_control): Likewise.
7049 (i386_insert_aligned_watchpoint): New check.
7050
7051 2014-06-18 Gary Benson <gbenson@redhat.com>
7052
7053 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7054 Renamed to state.
7055
7056 2014-06-18 Gary Benson <gbenson@redhat.com>
7057
7058 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7059 instead of fatal and error.
7060 (i386_handle_nonaligned_watchpoint): Likewise.
7061
7062 2014-06-18 Gary Benson <gbenson@redhat.com>
7063
7064 * i386-low.c (i386_get_debug_register_length): New macro.
7065 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7066 (i386_show_dr): Use debug_printf instead of fprintf. Use
7067 phex to format values.
7068
7069 2014-06-18 Gary Benson <gbenson@redhat.com>
7070
7071 * i386-low.h: Comment changes.
7072 * i386-low.c: Likewise.
7073
7074 2014-06-18 Gary Benson <gbenson@redhat.com>
7075
7076 * i386-low.c: Whitespace changes.
7077
7078 2014-06-12 Tom Tromey <tromey@redhat.com>
7079
7080 * utils.c (freeargv): Remove.
7081
7082 2014-06-12 Tom Tromey <tromey@redhat.com>
7083
7084 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7085 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7086 (parse_debug_format_options): Likewise.
7087 (gdbserver_usage): Likewise.
7088 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7089 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7090 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7091 against libiberty.
7092 ($(LIBGNU)): Depend on libiberty.
7093 (all-lib): Recurse into all subdirs.
7094 (install-only): Invoke "install" target in subdirs.
7095 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7096 targets.
7097 * configure: Rebuild.
7098 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7099 for vasprintf, vsnprintf, or gettimeofday.
7100 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7101 srv_tgtobj.
7102
7103 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7104
7105 * development.sh: Delete.
7106 * Makefile.in (config.status): Adjust dependency on development.sh.
7107 * configure.ac: Adjust development.sh source call.
7108 * configure: Regenerate.
7109
7110 2014-06-02 Pedro Alves <palves@redhat.com>
7111
7112 * ax.c (gdb_free_agent_expr): New function.
7113 * ax.h (gdb_free_agent_expr): New declaration.
7114 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7115 list.
7116 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7117 static.
7118 (clear_breakpoint_conditions_and_commands): New function.
7119 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7120 (clear_breakpoint_conditions_and_commands): New declaration.
7121
7122 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7123
7124 * linux-aarch64-low.c (asm/ptrace.h): Include.
7125
7126 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7127
7128 Fix TLS access for -static -pthread.
7129 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7130 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7131 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7132
7133 2014-05-20 Pedro Alves <palves@redhat.com>
7134
7135 * linux-aarch64-low.c (aarch64_insert_point)
7136 (aarch64_remove_point): No longer check whether the type is
7137 supported here. Adjust to new interface.
7138 (the_low_target): Install aarch64_supports_z_point_type as
7139 supports_z_point_type method.
7140 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7141 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7142 instead of a Z packet char. Adjust.
7143 (arm_supports_z_point_type): New function.
7144 (arm_insert_point, arm_remove_point): Adjust to new interface.
7145 (the_low_target): Install arm_supports_z_point_type.
7146 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7147 (cris_insert_point, cris_remove_point): Adjust to new interface.
7148 Don't check whether the type is supported here.
7149 (the_low_target): Install cris_supports_z_point_type.
7150 * linux-low.c (linux_supports_z_point_type): New function.
7151 (linux_insert_point, linux_remove_point): Adjust to new interface.
7152 * linux-low.h (struct linux_target_ops) <insert_point,
7153 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7154 raw_breakpoint pointer parameter.
7155 <supports_z_point_type>: New method.
7156 * linux-mips-low.c (mips_supports_z_point_type): New function.
7157 (mips_insert_point, mips_remove_point): Adjust to new interface.
7158 Use mips_supports_z_point_type.
7159 (the_low_target): Install mips_supports_z_point_type.
7160 * linux-ppc-low.c (the_low_target): Install NULL as
7161 supports_z_point_type method.
7162 * linux-s390-low.c (the_low_target): Install NULL as
7163 supports_z_point_type method.
7164 * linux-sparc-low.c (the_low_target): Install NULL as
7165 supports_z_point_type method.
7166 * linux-x86-low.c (x86_supports_z_point_type): New function.
7167 (x86_insert_point): Adjust to new insert_point interface. Use
7168 insert_memory_breakpoint. Adjust to new
7169 i386_low_insert_watchpoint interface.
7170 (x86_remove_point): Adjust to remove_point interface. Use
7171 remove_memory_breakpoint. Adjust to new
7172 i386_low_remove_watchpoint interface.
7173 (the_low_target): Install x86_supports_z_point_type.
7174 * lynx-low.c (lynx_target_ops): Install NULL as
7175 supports_z_point_type callback.
7176 * nto-low.c (nto_supports_z_point_type): New.
7177 (nto_insert_point, nto_remove_point): Adjust to new interface.
7178 (nto_target_ops): Install nto_supports_z_point_type.
7179 * mem-break.c: Adjust intro comment.
7180 (struct raw_breakpoint) <raw_type, size>: New fields.
7181 <inserted>: Update comment.
7182 <shlib_disabled>: Delete field.
7183 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7184 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7185 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7186 (raw_bkpt_type_to_target_hw_bp_type): New function.
7187 (find_enabled_raw_code_breakpoint_at): New function.
7188 (find_raw_breakpoint_at): New type and size parameters. Use them.
7189 (insert_memory_breakpoint): New function, based off
7190 set_raw_breakpoint_at.
7191 (remove_memory_breakpoint): New function.
7192 (set_raw_breakpoint_at): Reimplement.
7193 (set_breakpoint): New, based on set_breakpoint_at.
7194 (set_breakpoint_at): Reimplement.
7195 (delete_raw_breakpoint): Go through the_target->remove_point
7196 instead of assuming memory breakpoints.
7197 (find_gdb_breakpoint_at): Delete.
7198 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7199 (find_gdb_breakpoint): New function.
7200 (set_gdb_breakpoint_at): Delete.
7201 (z_type_supported): New function.
7202 (set_gdb_breakpoint_1): New function, loosely based off
7203 set_gdb_breakpoint_at.
7204 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7205 (delete_gdb_breakpoint_at): Delete.
7206 (delete_gdb_breakpoint_1): New function, loosely based off
7207 delete_gdb_breakpoint_at.
7208 (delete_gdb_breakpoint): New function.
7209 (clear_gdb_breakpoint_conditions): Rename to ...
7210 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7211 breakpoint.
7212 (add_condition_to_breakpoint): Make static.
7213 (add_breakpoint_condition): Take a struct breakpoint pointer
7214 instead of an address. Adjust.
7215 (gdb_condition_true_at_breakpoint): Rename to ...
7216 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7217 z_type parameter.
7218 (gdb_condition_true_at_breakpoint): Reimplement.
7219 (add_breakpoint_commands): Take a struct breakpoint pointer
7220 instead of an address. Adjust.
7221 (gdb_no_commands_at_breakpoint): Rename to ...
7222 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7223 parameter. Return true if no breakpoint was found. Change debug
7224 output.
7225 (gdb_no_commands_at_breakpoint): Reimplement.
7226 (run_breakpoint_commands): Rename to ...
7227 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7228 and change return type to boolean.
7229 (run_breakpoint_commands): New function.
7230 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7231 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7232 breakpoint. Go through the_target->remove_point instead of
7233 assuming memory breakpoint.
7234 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7235 software and hardware breakpoints.
7236 (reinsert_raw_breakpoint): Go through the_target->insert_point
7237 instead of assuming memory breakpoint.
7238 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7239 software and hardware breakpoints.
7240 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7241 Check both software and hardware breakpoints.
7242 (validate_inserted_breakpoint): Assert the breakpoint is a
7243 software breakpoint. Set the inserted flag to -1 instead of
7244 setting shlib_disabled.
7245 (delete_disabled_breakpoints): Adjust.
7246 (validate_breakpoints): Only validate software breakpoints.
7247 Adjust to inserted flag change.
7248 (check_mem_read, check_mem_write): Skip breakpoint types other
7249 than software breakpoints. Adjust to inserted flag change.
7250 * mem-break.h (enum raw_bkpt_type): New enum.
7251 (raw_breakpoint, struct process_info): Forward declare.
7252 (Z_packet_to_target_hw_bp_type): Delete declaration.
7253 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7254 (set_gdb_breakpoint, delete_gdb_breakpoint)
7255 (clear_breakpoint_conditions): New declarations.
7256 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7257 (breakpoint_inserted_here): Update comment.
7258 (add_breakpoint_condition, add_breakpoint_commands): Replace
7259 address parameter with a breakpoint pointer parameter.
7260 (gdb_breakpoint_here): Update comment.
7261 (delete_gdb_breakpoint_at): Delete.
7262 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7263 * server.c (process_point_options): Take a struct breakpoint
7264 pointer instead of an address. Adjust.
7265 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7266 delete_gdb_breakpoint.
7267 * spu-low.c (spu_target_ops): Install NULL as
7268 supports_z_point_type method.
7269 * target.h: Include mem-break.h.
7270 (struct target_ops) <prepare_to_access_memory>: Update comment.
7271 <supports_z_point_type>: New field.
7272 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7273 instead of a char. Also take a raw breakpoint pointer.
7274 * win32-arm-low.c (the_low_target): Install NULL as
7275 supports_z_point_type.
7276 * win32-i386-low.c (i386_supports_z_point_type): New function.
7277 (i386_insert_point, i386_remove_point): Adjust to new interface.
7278 (the_low_target): Install i386_supports_z_point_type.
7279 * win32-low.c (win32_supports_z_point_type): New function.
7280 (win32_insert_point, win32_remove_point): Adjust to new interface.
7281 (win32_target_ops): Install win32_supports_z_point_type.
7282 * win32-low.h (struct win32_target_ops):
7283 <supports_z_point_type>: New method.
7284 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7285 instead of a char. Also take a raw breakpoint pointer.
7286
7287 2014-05-20 Pedro Alves <palves@redhat.com>
7288
7289 * mem-break.h: Include break-common.h.
7290 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7291 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7292 (Z_packet_to_target_hw_bp_type): New declaration.
7293 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7294 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7295 (Z_PACKET_ACCESS_WP): Delete macros.
7296 (Z_packet_to_hw_type): Delete function.
7297 * i386-low.h: Don't include break-common.h here.
7298 (Z_packet_to_hw_type): Delete declaration.
7299 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7300 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7301 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7302 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7303 * linux-aarch64-low.c: Don't include break-common.h here.
7304 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7305 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7306 (Z_packet_to_target_hw_bp_type): Delete function.
7307 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7308 function.
7309 (mips_insert_point, mips_remove_point): Use
7310 Z_packet_to_target_hw_bp_type.
7311
7312 2014-05-20 Pedro Alves <palves@redhat.com>
7313
7314 * linux-aarch64-low.c: Include break-common.h.
7315 (enum target_point_type): Delete.
7316 (Z_packet_to_point_type): Rename to ...
7317 (Z_packet_to_target_hw_bp_type): ... this, and return a
7318 target_hw_bp_type instead.
7319 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7320 instead of an enum target_point_type.
7321 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7322 breakpoint type.
7323 (aarch64_dr_state_insert_one_point)
7324 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7325 (aarch64_handle_aligned_watchpoint)
7326 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7327 Take an enum target_hw_bp_type instead of an enum
7328 target_point_type.
7329 (aarch64_supports_z_point_type): New function.
7330 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7331 use Z_packet_to_target_hw_bp_type.
7332
7333 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7334
7335 * configure.ac: Only use -Werror by default when DEVELOPMENT
7336 is true.
7337 * configure: Regenerate.
7338
7339 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7340
7341 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7342 * linux-x86-low.c (X86_64_USER_REGS): New.
7343 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7344
7345 2014-04-28 Yao Qi <yao@codesourcery.com>
7346
7347 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7348 name.
7349
7350 2014-04-25 Pedro Alves <palves@redhat.com>
7351
7352 PR server/16255
7353 * linux-low.c (linux_attach_fail_reason_string): New function.
7354 (linux_attach_lwp): Delete.
7355 (linux_attach_lwp_1): Rename to ...
7356 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7357 argument. Remove "initial" parameter. Return int instead of
7358 void. Don't error or warn here.
7359 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7360 failure to attach to the tgid. Call warning when failing to
7361 attach to an lwp.
7362 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7363 argument. Remove "initial" parameter. Return int instead of
7364 void. Don't error or warn here.
7365 (linux_attach_fail_reason_string): New declaration.
7366 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7367 interface change. Use linux_attach_fail_reason_string.
7368
7369 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7370 Walfred Tedeschi <walfred.tedeschi@intel.com>
7371
7372 * Makefile.in: Added rules to handle new files
7373 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7374 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7375 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7376 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7377 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7378 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7379 x32-avx512-linux.o.
7380 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7381 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7382 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7383 i386/x32-avx512.xml.
7384 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7385 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7386 i386/x32-avx512-linux.xml.
7387 * i387-fp.c (num_avx512_k_registers): New constant for number
7388 of K registers.
7389 (num_avx512_zmmh_low_registers): New constant for number of
7390 lower ZMM registers (0-15).
7391 (num_avx512_zmmh_high_registers): New constant for number of
7392 higher ZMM registers (16-31).
7393 (num_avx512_ymmh_registers): New contant for number of higher
7394 YMM registers (ymm16-31 added by avx521 on x86_64).
7395 (num_avx512_xmm_registers): New constant for number of higher
7396 XMM registers (xmm16-31 added by AVX512 on x86_64).
7397 (struct i387_xsave): Add space for AVX512 registers.
7398 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7399 Add code to handle AVX512 registers.
7400 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7401 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7402 prototypei from generated file.
7403 (tdesc_amd64_avx512_linux): Likewise.
7404 (init_registers_x32_avx512_linux): Likewise.
7405 (tdesc_x32_avx512_linux): Likewise.
7406 (init_registers_i386_avx512_linux): Likewise.
7407 (tdesc_i386_avx512_linux): Likewise.
7408 (x86_64_regmap): Add AVX512 registers.
7409 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7410 mask.
7411 (initialize_low_arch): Add code to initialize AVX512 registers.
7412
7413 2014-04-23 Pedro Alves <palves@redhat.com>
7414
7415 * mem-break.c (find_gdb_breakpoint_at): Make static.
7416 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7417
7418 2014-04-23 Pedro Alves <palves@redhat.com>
7419
7420 * i386-low.c: Don't include break-common.h here.
7421 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7422 prototype to take target_hw_bp_type as argument instead of a Z
7423 packet char.
7424 * i386-low.h: Include break-common.h here.
7425 (Z_packet_to_hw_type): Declare.
7426 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7427 prototypes.
7428 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7429 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7430 (x86_remove_point): Convert the packet number to a
7431 target_hw_bp_type before calling i386_low_remove_watchpoint.
7432 * win32-i386-low.c (i386_insert_point): Convert the packet number
7433 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7434 (i386_remove_point): Convert the packet number to a
7435 target_hw_bp_type before calling i386_low_remove_watchpoint.
7436
7437 2014-04-23 Pedro Alves <palves@redhat.com>
7438
7439 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7440
7441 2014-04-10 Pedro Alves <palves@redhat.com>
7442
7443 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7444 Check if the condition or command is NULL before checking if the
7445 breakpoint is known. On success, return true.
7446 * mem-break.h (add_breakpoint_condition): Document return.
7447 (add_breakpoint_commands): Add describing comment.
7448 * server.c (skip_to_semicolon): New function.
7449 (process_point_options): Use it.
7450
7451 2014-04-09 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7454 to lwpid_of.
7455
7456 2014-02-27 Pedro Alves <palves@redhat.com>
7457
7458 PR 12702
7459 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7460 macros.
7461 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7462 output.
7463 (last_thread_of_process_p): Take a PID argument instead of a
7464 thread pointer.
7465 (linux_wait_for_lwp): Delete.
7466 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7467 functions.
7468 (linux_low_filter_event): New function, party factored out from
7469 linux_wait_for_event.
7470 (linux_wait_for_event): Rename to ...
7471 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7472 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7473 sigsuspend. Check for zombie leaders.
7474 (linux_wait_for_event): Reimplement as wrapper around
7475 linux_wait_for_event_filtered.
7476 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7477 a normal or signal exit is seen, it's the whole process exiting.
7478 (wait_for_sigstop): No longer a for_each_inferior callback.
7479 Rewrite on top of linux_wait_for_event_filtered.
7480 (stop_all_lwps): Call wait_for_sigstop directly.
7481 * server.c (resume, handle_target_event): Handle
7482 TARGET_WAITKIND_NO_RESUMED.
7483
7484 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7485
7486 * win32-low.c (psapi_get_dll_name,
7487 * win32_CreateToolhelp32Snapshot): Delete.
7488 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7489 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7490 Delete.
7491 (handle_load_dll): Add function description.
7492 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7493
7494 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7495
7496 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7497 Add comment.
7498 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7499 base address when calling win32_add_one_solib.
7500 (handle_load_dll): Delete local variable load_addr.
7501 Remove 0x1000 offset applied to DLL base address when calling
7502 win32_add_one_solib.
7503 (handle_unload_dll): Add comment.
7504
7505 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7506
7507 * win32-low.c (win32_add_all_dlls): Renames
7508 win32_ensure_ntdll_loaded. Rewrite function documentation.
7509 Adjust implementation to always load all DLLs.
7510 Add 0x1000 offset to DLL base address when calling
7511 win32_add_one_solib.
7512 (child_initialization_done): New static global.
7513 (do_initial_child_stuff): Set child_initialization_done to
7514 zero during child initialization, and 1 after. Replace call
7515 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7516 Add comment.
7517 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7518 (handle_unload_dll): Add function documentation.
7519 (get_child_debug_event): Ignore load and unload DLL events
7520 during child initialization.
7521
7522 2014-02-20 Doug Evans <dje@google.com>
7523
7524 Remove global all_lwps.
7525 * inferiors.h (ptid_of): Move here from linux-low.h.
7526 (pid_of, lwpid_of): Ditto.
7527 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7528 parameter is a struct thread_info * now.
7529 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7530 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7531 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7532 directly.
7533 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7534 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7535 * linux-arm-low.c (update_registers_callback): Update, "entry"
7536 parameter is a struct thread_info * now.
7537 Fetch lwpid from current_inferior directly.
7538 (arm_insert_point): Pass &all_threads to find_inferior instead of
7539 &all_lwps.
7540 (arm_remove_point): Ditto.
7541 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7542 (arm_prepare_to_resume): Fetch pid from thread.
7543 (arm_read_description): Fetch lwpid from current_inferior directly.
7544 * linux-low.c (all_lwps): Delete.
7545 (delete_lwp): Delete call to remove_inferior.
7546 (handle_extended_wait): Fetch lwpid from thread.
7547 (add_lwp): Don't set lwp->entry.id. Remove call to
7548 add_inferior_to_list.
7549 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7550 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7551 (kill_one_lwp_callback): Ditto.
7552 (linux_kill): Don't dereference NULL pointer.
7553 Fetch ptid,lwpid from thread.
7554 (get_detach_signal): Fetch ptid from thread.
7555 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7556 Simplify call to regcache_invalidate_thread.
7557 (delete_lwp_callback): Update, "entry" parameter is a
7558 struct thread_info * now. Fetch pid from thread.
7559 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7560 (status_pending_p_callback): Update, "entry" parameter is a
7561 struct thread_info * now. Fetch ptid from thread.
7562 (find_lwp_pid): Update, "entry" parameter is a
7563 struct thread_info * now.
7564 (linux_wait_for_lwp): Fetch pid from thread.
7565 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7566 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7567 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7568 (dequeue_one_deferred_signal): Ditto.
7569 (cancel_breakpoint): Fetch ptid from current_inferior.
7570 (linux_wait_for_event): Pass &all_threads to find_inferior,
7571 not &all_lwps. Fetch ptid, lwpid from thread.
7572 (count_events_callback): Update, "entry" parameter is a
7573 struct thread_info * now.
7574 (select_singlestep_lwp_callback): Ditto.
7575 (select_event_lwp_callback): Ditto.
7576 (cancel_breakpoints_callback): Ditto.
7577 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7578 not &all_lwps.
7579 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7580 (unsuspend_one_lwp): Update, "entry" parameter is a
7581 struct thread_info * now.
7582 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7583 not &all_lwps.
7584 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7585 Fetch lwpid from thread, not lwp.
7586 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7587 Pass &all_threads to find_inferior, not &all_lwps.
7588 (send_sigstop): Fetch lwpid from thread, not lwp.
7589 (send_sigstop_callback): Update, "entry" parameter is a
7590 struct thread_info * now.
7591 (suspend_and_send_sigstop_callback): Ditto.
7592 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7593 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7594 struct thread_info * now.
7595 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7596 from thread, lwp.
7597 (lwp_running): Update, "entry" parameter is a
7598 struct thread_info * now.
7599 (stop_all_lwps): Fetch ptid from thread.
7600 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7601 (linux_resume_one_lwp): Fetch lwpid from thread.
7602 (linux_set_resume_request): Update, "entry" parameter is a
7603 struct thread_info * now. Fetch pid, lwpid from thread.
7604 (resume_status_pending_p): Update, "entry" parameter is a
7605 struct thread_info * now.
7606 (need_step_over_p): Ditto. Fetch lwpid from thread.
7607 (start_step_over): Fetch lwpid from thread.
7608 (linux_resume_one_thread): Update, "entry" parameter is a
7609 struct thread_info * now. Fetch lwpid from thread.
7610 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7611 (proceed_one_lwp): Update, "entry" parameter is a
7612 struct thread_info * now. Fetch lwpid from thread.
7613 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7614 struct thread_info * now.
7615 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7616 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7617 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7618 directly.
7619 (regsets_store_inferior_registers): Ditto.
7620 (fetch_register, store_register): Ditto.
7621 (linux_read_memory, linux_write_memory): Ditto.
7622 (linux_request_interrupt): Ditto.
7623 (linux_read_auxv): Ditto.
7624 (linux_xfer_siginfo): Ditto.
7625 (linux_qxfer_spu): Ditto.
7626 (linux_qxfer_libraries_svr4): Ditto.
7627 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7628 moved to inferiors.h.
7629 (get_lwp): Delete.
7630 (get_thread_lwp): Update.
7631 (struct lwp_info): Delete member "entry". Simplify comment for
7632 member "thread".
7633 (all_lwps): Delete.
7634 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7635 current_inferior directly.
7636 (update_watch_registers_callback): Update, "entry" parameter is a
7637 struct thread_info * now. Fetch pid from thread.
7638 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7639 (mips_insert_point): Fetch lwpid from current_inferior.
7640 Pass &all_threads to find_inferior, not &all_lwps.
7641 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7642 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7643 directly.
7644 (mips_stopped_data_address): Ditto.
7645 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7646 directly.
7647 * linux-tile-low.c (tile_arch_setup): Ditto.
7648 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7649 (update_debug_registers_callback): Update, "entry" parameter is a
7650 struct thread_info * now. Fetch pid from thread.
7651 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7652 Pass &all_threads to find_inferior, not &all_lwps.
7653 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7654 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7655 Pass &all_threads to find_inferior, not &all_lwps.
7656 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7657 (i386_dr_low_get_status): Ditto.
7658 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7659 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7660 (x86_linux_read_description): Ditto.
7661 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7662
7663 2014-02-20 Doug Evans <dje@google.com>
7664
7665 * inferiors.c (get_first_inferior): Fix buglet.
7666
7667 2014-02-19 Doug Evans <dje@google.com>
7668
7669 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7670 * inferiors.c (add_thread): Change result type to struct thread_info *.
7671 All callers updated.
7672 (add_lwp): Call add_thread here instead of in callers.
7673 All callers updated.
7674 * linux-low.h (get_lwp_thread): Rewrite.
7675 (struct lwp_info): New member "thread".
7676
7677 2014-02-19 Doug Evans <dje@google.com>
7678
7679 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7680 All callers updated.
7681
7682 2014-02-19 Doug Evans <dje@google.com>
7683
7684 * inferiors.c (add_thread): Fix whitespace.
7685
7686 2014-02-19 Doug Evans <dje@google.com>
7687
7688 * dll.c (clear_dlls): Replace accessing list implemention details
7689 with API function.
7690 * gdbthread.h (get_first_thread): Declare.
7691 * inferiors.c (for_each_inferior_with_data): New function.
7692 (get_first_thread): New function.
7693 (find_thread_ptid): Simplify.
7694 (get_first_inferior): New function.
7695 (clear_list): Delete.
7696 (one_inferior_p): New function.
7697 (clear_inferior_list): New function.
7698 (clear_inferiors): Update.
7699 * inferiors.h (for_each_inferior_with_data): Declare.
7700 (clear_inferior_list): Declare.
7701 (one_inferior_p): Declare.
7702 (get_first_inferior): Declare.
7703 * linux-low.c (linux_wait_for_event): Replace accessing list
7704 implemention details with API function.
7705 * server.c (target_running): Ditto.
7706 (accumulate_file_name_length): New function.
7707 (emit_dll_description): New function.
7708 (handle_qxfer_libraries): Replace accessing list implemention
7709 details with API function.
7710 (handle_qxfer_threads_worker): New function.
7711 (handle_qxfer_threads_proper): Replace accessing list implemention
7712 details with API function.
7713 (handle_query): Ditto.
7714 (visit_actioned_threads_callback_ftype): New typedef.
7715 (visit_actioned_threads_data): New struct.
7716 (visit_actioned_threads): Rewrite to be find_inferior callback.
7717 (resume): Call find_inferior.
7718 (handle_status): Replace accessing list implemention
7719 details with API function.
7720 (process_serial_event): Replace accessing list implemention details
7721 with API function.
7722 * target.c (set_desired_inferior): Replace accessing list implemention
7723 details with API function.
7724 * tracepoint.c (same_process_p): New function.
7725 (gdb_agent_about_to_close): Replace accessing list implemention
7726 details with API function.
7727 * win32-low.c (child_delete_thread): Replace accessing list
7728 implemention details with API function.
7729 (match_dll_by_basename): New function.
7730 (dll_is_loaded_by_basename): New function.
7731 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7732 details call to dll_is_loaded_by_basename.
7733
7734 2014-02-19 Doug Evans <dje@google.com>
7735
7736 * dll.h (struct dll_info): Add comment.
7737 * gdbthread.h (struct thread_info): Add comment.
7738 (current_ptid): Simplify.
7739 * inferiors.c (add_process): Update.
7740 (remove_process): Update.
7741 * inferiors.h (struct process_info): Rename member "head" to "entry".
7742 * linux-low.c (delete_lwp): Update.
7743 (add_lwp): Update.
7744 (last_thread_of_process_p): Update.
7745 (kill_one_lwp_callback, linux_kill): Update.
7746 (status_pending_p_callback): Update.
7747 (wait_for_sigstop): Update. Simplify read of ptid.
7748 (start_step_over): Update.
7749 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7750 (get_lwp_thread): Update.
7751 (struct lwp_info): Rename member "head" to "entry".
7752 * regcache.h (inferior_list_entry): Delete.
7753 * server.c (kill_inferior_callback): Update.
7754 (detach_or_kill_inferior_callback): Update.
7755 (print_started_pid): Update.
7756 (print_attached_pid): Update.
7757 (process_serial_event): Simplify read of ptid.
7758 * thread-db.c (thread_db_create_event): Update.
7759 (thread_db_get_tls_address): Update.
7760 * win32-low.c (current_inferior_ptid): Simplify.
7761
7762 2014-02-19 Tom Tromey <tromey@redhat.com>
7763
7764 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7765 argument.
7766 (target_supports_btrace): Update.
7767
7768 2014-02-14 Yao Qi <yao@codesourcery.com>
7769
7770 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7771 (rsp-low-ipa.o): New target.
7772
7773 2014-02-12 Tom Tromey <tromey@redhat.com>
7774
7775 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7776 convert_ascii_to_int.
7777 * regcache.c (registers_to_string): Likewise.
7778 * remote-utils.c (decode_M_packet): Likewise.
7779 * server.c (process_serial_event): Likewise.
7780
7781 2014-02-12 Tom Tromey <tromey@redhat.com>
7782
7783 * server.c (handle_query, handle_v_run): Use hex2bin, not
7784 unhexify.
7785 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7786
7787 2014-02-12 Tom Tromey <tromey@redhat.com>
7788
7789 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7790 convert_int_to_ascii.
7791 * regcache.c (registers_to_string, collect_register_as_string):
7792 Likewise.
7793 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7794 Likewise.
7795 * server.c (process_serial_event): Likewise.
7796 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7797 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7798
7799 2014-02-12 Tom Tromey <tromey@redhat.com>
7800
7801 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7802 bin2hex, not hexify.
7803 * tracepoint.c (cmd_qtstatus): Likewise.
7804
7805 2014-02-12 Tom Tromey <tromey@redhat.com>
7806
7807 * remote-utils.c (monitor_output): Pass explicit length to
7808 hexify.
7809
7810 2014-02-12 Tom Tromey <tromey@redhat.com>
7811
7812 * tracepoint.c: Include rsp-low.h.
7813 * server.c: Include rsp-low.h.
7814 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7815 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7816 declare.
7817 * remote-utils.c: Include rsp-low.h.
7818 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7819 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7820 (convert_int_to_ascii, convert_ascii_to_int): Move to
7821 common/rsp-low.c.
7822 * regcache.c: Include rsp-low.h.
7823 * ax.c: Include rsp-low.h.
7824 * Makefile.in (SFILES): Add common/rsp-low.c.
7825 (OBS): Add rsp-low.o.
7826 (rsp-low.o): New target.
7827
7828 2014-02-12 Tom Tromey <tromey@redhat.com>
7829
7830 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7831 Include print-utils.h.
7832 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7833 (plongest, thirty_two, phex_nz): Remove.
7834 * Makefile.in (SFILES): Add common/print-utils.c.
7835 (OBS): Add print-utils.o.
7836 (print-utils-ipa.o): New target.
7837 (print-utils.o): New target.
7838 (IPA_OBJS): Add print-utils-ipa.o.
7839
7840 2014-02-06 Tom Tromey <tromey@redhat.com>
7841
7842 * Makefile.in (SFILES): Fix indentation.
7843
7844 2014-02-05 Doug Evans <dje@google.com>
7845
7846 * linux-low.c (linux_wait_for_event): Improve comment.
7847 (linux_wait_1): Keep current_inferior in sync with event_child.
7848
7849 2014-01-22 Doug Evans <dje@google.com>
7850
7851 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7852
7853 2014-01-22 Doug Evans <dje@google.com>
7854
7855 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7856 * configure: Regenerate.
7857 * config.in: Regenerate.
7858 * Makefile.in (SFILES): Add debug.c.
7859 (OBS): Add debug.o.
7860 * debug.c: New file.
7861 * debug.h: New file.
7862 * linux-aarch64-low.c (*): Update all debugging printfs to use
7863 debug_printf instead of fprintf.
7864 * linux-arm-low.c (*): Ditto.
7865 * linux-cris-low.c (*): Ditto.
7866 * linux-crisv32-low.c (*): Ditto.
7867 * linux-m32r-low.c (*): Ditto.
7868 * linux-sparc-low.c (*): Ditto.
7869 * linux-x86.c (*): Ditto.
7870 * linux-low.c (*): Ditto.
7871 (linux_wait_1): Add calls to debug_enter, debug_exit.
7872 (linux_wait): Remove redundant debugging printf.
7873 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7874 (linux_resume, unstop_all_lwps): Ditto.
7875 * mem-break.c (*): Update all debugging printfs to use
7876 debug_printf instead of fprintf.
7877 * remote-utils.c (*): Ditto.
7878 * thread-db.c (*): Ditto.
7879 * server.c #include <ctype.h>, "gdb_vecs.h".
7880 (debug_threads): Moved to debug.c.
7881 (*): Update all debugging printfs to use debug_printf instead of
7882 fprintf.
7883 (start_inferior): Replace call to fflush with call to debug_flush.
7884 (monitor_show_help): Mention set debug-format.
7885 (parse_debug_format_options): New function.
7886 (handle_monitor_command): Handle "monitor set debug-format".
7887 (gdbserver_usage): Mention --debug-format.
7888 (main): Parse --debug-format.
7889 * server.h (debug_threads): Declaration moved to debug.h.
7890 #include "debug.h".
7891 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7892 trace_debug_1 that uses debug_printf.
7893 (tracepoint_look_up_symbols): Update all debugging printfs to use
7894 debug_printf instead of fprintf.
7895
7896 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7897
7898 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7899 sys/ptrace.h.
7900
7901 2014-01-17 Pedro Alves <palves@redhat.com>
7902
7903 PR build/16445
7904 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7905 defined after including gdb_proc_service.h.
7906
7907 2014-01-16 Doug Evans <dje@google.com>
7908
7909 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7910 (match_dll): Use it.
7911
7912 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7913
7914 * target.h (target_ops) <read_btrace>: Change parameters and
7915 return type to allow error reporting.
7916 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7917 trace reading errors on.
7918 * linux-low.c (linux_low_read_btrace): Pass trace reading
7919 errors on.
7920 (linux_low_disable_btrace): New.
7921
7922 2014-01-15 Doug Evans <dje@google.com>
7923
7924 * inferiors.c (thread_id_to_gdb_id): Delete.
7925 * inferiors.h (thread_id_to_gdb_id): Delete.
7926
7927 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7928
7929 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7930 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7931 versions.
7932
7933 2014-01-08 Pedro Alves <palves@redhat.com>
7934
7935 * server.c (handle_status): Don't discard previous queued stop
7936 replies or thread's pending status here.
7937 (main) <disconnection>: Do it here instead.
7938
7939 2014-01-08 Pedro Alves <palves@redhat.com>
7940
7941 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7942 * server.c (visit_actioned_threads, handle_pending_status): New
7943 function.
7944 (handle_v_cont): Factor out parts to ...
7945 (resume): ... this new function. If in all-stop, and a thread
7946 being resumed has a pending status, report it without actually
7947 resuming.
7948 (myresume): Adjust to use the new 'resume' function.
7949 (clear_pending_status_callback, set_pending_status_callback)
7950 (find_status_pending_thread_callback): New functions.
7951 (handle_status): Handle the case of multiple threads having
7952 interesting statuses to report. Report threads' real last signal
7953 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7954 with an interesting thread to report the status for, instead of
7955 always reporting the status of the first thread.
7956
7957 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7958
7959 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7960 * gdbreplay.c (gdbreplay_version): Likewise.
7961
7962 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7963
7964 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7965 iov.iov_len with the real length in use.
7966
7967 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7968
7969 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7970 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7971 for all targets that use win32-low.c.
7972 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7973 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7974
7975 2013-12-13 Pedro Alves <palves@redhat.com>
7976
7977 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7978 if equal to TARGET_WAITKIND_LOADED.
7979 * win32-low.c (cached_status): New static global.
7980 (win32_wait): Add declaration.
7981 (do_initial_child_stuff): Flush all initial pending debug events
7982 up to the initial breakpoint.
7983 (win32_wait): If CACHED_STATUS was set, return that instead
7984 of doing a real wait. Remove the code resuming the execution
7985 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7986 during the initial phase. Also remove the code changing
7987 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7988 TARGET_WAITKIND_STOPPED.
7989
7990 2013-12-11 Yao Qi <yao@codesourcery.com>
7991
7992 * notif.c (handle_notif_ack): Return 0 if no notification
7993 matches.
7994
7995 2013-11-20 Doug Evans <dje@google.com>
7996
7997 * linux-low.c (linux_set_resume_request): Fix comment.
7998
7999 2013-11-20 Doug Evans <dje@google.com>
8000
8001 * linux-low.c (resume_status_pending_p): Tweak comment.
8002
8003 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8004
8005 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8006 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8007 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8008 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8009 (srv_amd64_regobj): Add amd64-mpx.o.
8010 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8011 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8012 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8013 * i387-fp.c (num_pl_bnd_register) Added constant.
8014 (num_pl_bnd_cfg_registers) Added constant.
8015 (struct i387_xsave) Added reserved area and MPX fields.
8016 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8017 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8018 function.
8019 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8020 (init_registers_amd64_mpx_linux): Declare new function.
8021 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8022 (x86_64_regmap): Add MPX registers.
8023 (x86_linux_read_description): Add MPX case.
8024 (initialize_low_arch): Initialize MPX targets.
8025
8026 2013-11-18 Tom Tromey <tromey@redhat.com>
8027
8028 * configure: Rebuild.
8029 * configure.ac: Don't check for stdlib.h.
8030 * gdbreplay.c: Unconditionally include stdlib.h.
8031
8032 2013-11-18 Tom Tromey <tromey@redhat.com>
8033
8034 * config.in: Rebuild.
8035 * configure: Rebuild.
8036 * configure.ac: Don't use AC_HEADER_DIRENT.
8037
8038 2013-11-18 Tom Tromey <tromey@redhat.com>
8039
8040 * server.h: Don't check HAVE_STRING_H.
8041 * gdbreplay.c: Don't check HAVE_STRING_H.
8042 * configure: Rebuild.
8043
8044 2013-11-18 Tom Tromey <tromey@redhat.com>
8045
8046 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8047 LIBGNU.
8048
8049 2013-11-08 Tom Tromey <tromey@redhat.com>
8050
8051 * configure, config.in: Rebuild.
8052 * configure.ac: Remove unused configury.
8053
8054 2013-11-08 Tom Tromey <tromey@redhat.com>
8055
8056 * acinclude.m4: Include common.m4, codeset.m4.
8057 * configure, config.in: Rebuild.
8058 * configure.ac: Use GDB_AC_COMMON.
8059
8060 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8061
8062 * linux-s390-low.c (HWCAP_S390_TE): New define.
8063 (s390_arch_setup): Consider the TE field in the HWCAP for
8064 determining 'have_regset_tdb'.
8065
8066 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8067
8068 PR gdb/16014
8069 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8070 call to sizeof.
8071
8072 2013-10-02 Pedro Alves <palves@redhat.com>
8073
8074 * server.c (process_serial_event): Don't output "GDBserver
8075 exiting" if GDB is connected through stdio.
8076 * target.c (mywait): Likewise, be silent if GDB is connected
8077 through stdio.
8078
8079 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8080
8081 * lynx-low.c (lynx_add_threads_after_attach): New function.
8082 (lynx_attach): Remove call to add_thread. Add call to
8083 lynx_add_threads_after_attach instead.
8084
8085 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8086
8087 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8088 * config.in, configure: Regenerated.
8089
8090 2013-09-18 Yao Qi <yao@codesourcery.com>
8091
8092 PR server/15959
8093 * server.c (start_inferior): Clear 'resume_info'.
8094
8095 2013-09-16 Jiong Wang <jiwang@tilera.com>
8096
8097 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8098 for each register.
8099
8100 2013-09-16 Jiong Wang <jiwang@tilera.com>
8101
8102 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8103 linux-tile-low.o to srv_tgtobj.
8104
8105 2013-09-16 Will Newton <will.newton@linaro.org>
8106
8107 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8108 out regs.
8109
8110 2013-09-06 Pedro Alves <palves@redhat.com>
8111
8112 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8113 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8114 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8115 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8116 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8117 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8118
8119 2013-09-06 Pedro Alves <palves@redhat.com>
8120
8121 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8122 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8123
8124 2013-09-06 Pedro Alves <palves@redhat.com>
8125
8126 * linux-amd64-ipa.c: Include tracepoint.h.
8127 * linux-i386-ipa.c: Include tracepoint.h.
8128
8129 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8130
8131 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8132 (ps_get_thread_area): New function.
8133
8134 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8135
8136 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8137 (initialize_low_arch): Call init_registers_crisv32 rather than
8138 init_register_crisv32.
8139
8140 2013-09-05 Pedro Alves <palves@redhat.com>
8141
8142 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8143 to ...
8144 * hostio.h: ... this new file.
8145 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8146 win32-low.c: Include hostio.h.
8147
8148 2013-09-05 Pedro Alves <palves@redhat.com>
8149
8150 * server.h (gdb_client_data, handler_func, callback_handler_func)
8151 (delete_file_handler, add_file_handler, append_callback_event)
8152 (delete_callback_event, start_event_loop, initialize_event_loop):
8153 Move to event-loop.h and include it.
8154 * event-loop.h: New file.
8155
8156 2013-09-05 Pedro Alves <palves@redhat.com>
8157
8158 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8159 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8160 (loaded_dll, unloaded_dll): Move to ...
8161 * dll.h: ... this new file.
8162 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8163
8164 2013-09-05 Pedro Alves <palves@redhat.com>
8165
8166 * server.h (current_process, get_thread_process, all_processes)
8167 (add_inferior_to_list, for_each_inferior, current_inferior)
8168 (remove_inferior, add_process, remove_process, find_process_pid)
8169 (have_started_inferiors_p, have_attached_inferiors_p)
8170 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8171 (clear_inferiors, find_inferior, find_inferior_id)
8172 (inferior_target_data, set_inferior_target_data)
8173 (inferior_regcache_data, set_inferior_regcache_data): Move to
8174 inferiors.h, and include it.
8175 * inferiors.h: New file.
8176
8177 2013-09-05 Pedro Alves <palves@redhat.com>
8178
8179 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8180 Move ...
8181 * ax.h: ... here.
8182
8183 2013-09-05 Pedro Alves <palves@redhat.com>
8184
8185 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8186 tracepoint.h.
8187 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8188 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8189 (handle_tracepoint_general_set, handle_tracepoint_query)
8190 (tracepoint_finished_step, tracepoint_was_hit)
8191 (release_while_stepping_state_list, current_traceframe)
8192 (in_readonly_region, traceframe_read_mem)
8193 (fetch_traceframe_registers, traceframe_read_sdata)
8194 (traceframe_read_info, struct fast_tpoint_collect_status)
8195 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8196 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8197 (supply_fast_tracepoint_registers)
8198 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8199 (ipa_tdesc, claim_trampoline_space)
8200 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8201 (agent_mem_read, agent_get_trace_state_variable_value)
8202 (agent_set_trace_state_variable_value, agent_tsv_read)
8203 (agent_mem_read_string, get_raw_reg_func_addr)
8204 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8205 * tracepoint.h: ... this new file.
8206
8207 2013-09-05 Pedro Alves <palves@redhat.com>
8208
8209 * server.h (perror_with_name, error, fatal, warning, paddress)
8210 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8211 include it.
8212 * utils.h: New file.
8213
8214 2013-09-05 Pedro Alves <palves@redhat.com>
8215
8216 * server.h (remote_debug, noack_mode, transport_is_reliable)
8217 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8218 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8219 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8220 (write_enn, initialize_async_io, enable_async_io)
8221 (disable_async_io, check_remote_input_interrupt_request)
8222 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8223 (dead_thread_notify, prepare_resume_reply)
8224 (decode_address_to_semicolon, decode_address, decode_m_packet)
8225 (decode_M_packet, decode_X_packet, decode_xfer_write)
8226 (decode_search_memory_packet, unhexify, hexify)
8227 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8228 (look_up_one_symbol, relocate_instruction)
8229 (monitor_output): Move to remote-utils.h, and include it.
8230 * remote-utils.h: New file.
8231
8232 2013-09-05 Pedro Alves <palves@redhat.com>
8233
8234 * server.h (_): Delete.
8235
8236 2013-09-02 Pedro Alves <palves@redhat.com>
8237
8238 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8239 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8240 allocated.
8241 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8242
8243 2013-09-02 Pierre Muller <muller@sourceware.org>
8244
8245 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8246 or WriteProcessMemory complete successfully and handle
8247 ERROR_PARTIAL_COPY error.
8248
8249 2013-09-02 Pedro Alves <palves@redhat.com>
8250
8251 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8252 error instead of EIO.
8253
8254 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8255
8256 PR server/15604
8257 * linux-low.c: Include filestuff.h.
8258 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8259 * lynx-low.c: Include filestuff.h.
8260 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8261 * server.c: Include filestuff.h.
8262 (main): Call notice_open_fds.
8263 * spu-low.c: Include filestuff.h.
8264 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8265
8266 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8267
8268 * Makefile.in: Explain why ../target and ../nat are not
8269 listed as include file search paths.
8270 (linux-waitpid.o): New object file rule.
8271 * configure.srv (srv_native_linux_obj): New variable.
8272 Replace all occurrences of linux native object files with
8273 $srv_native_linux_obj.
8274 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8275 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8276 (linux_enable_event_reporting): Remove declaration.
8277 (my_waitpid): Moved to common/linux-waitpid.c.
8278 (linux_wait_for_event): Pass ptid when calling
8279 linux_enable_event_reporting.
8280 (linux_supports_tracefork_flag): Remove.
8281 (linux_enable_event_reporting): Likewise.
8282 (linux_tracefork_grandchild): Remove.
8283 (STACK_SIZE): Moved to common/linux-ptrace.c.
8284 (linux_tracefork_child): Remove.
8285 (linux_test_for_tracefork): Remove.
8286 (linux_look_up_symbols): Call linux_supports_traceclone.
8287 (initialize_low): Remove call to linux_test_for_tracefork.
8288 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8289 common/linux-ptrace.h.
8290 (PTRACE_TYPE_ARG4): Likewise.
8291 Include linux-ptrace.h.
8292
8293 2013-08-21 Pedro Alves <palves@redhat.com>
8294
8295 * config.in: Renegerate.
8296
8297 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8298
8299 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8300 (SFILES): Remove $(srcdir)/common/target-common.c and
8301 add $(srcdir)/target/waitstatus.c.
8302 (OBS): Remove target-common.o and add waitstatus.o.
8303 (server_h): Remove $(srcdir)/../common/target-common.h and
8304 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8305 and $(srcdir)/../target/waitstatus.h.
8306 (target-common.o): Remove.
8307 (waitstatus.o): New target object file.
8308 * target.h: Do not include target-common.h and
8309 include target/resume.h, target/wait.h and
8310 target/waitstatus.h.
8311
8312 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8313
8314 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8315 to PTRACE_TYPE_ARG3.
8316 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8317 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8318 PTRACE_TYPE_ARG4.
8319 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8320 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8321
8322 2013-07-27 Jie Zhang <jie@codesourcery.com>
8323 Daniel Jacobowitz <dan@codesourcery.com>
8324 Yao Qi <yao@codesourcery.com>
8325
8326 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8327 (mips-linux-watch.o): New rule.
8328 (mips_linux_watch_h): New variable.
8329 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8330 srv_tgtobj.
8331 * linux-mips-low.c: Include mips-linux-watch.h.
8332 (struct arch_process_info, struct arch_lwp_info): New.
8333 (update_watch_registers_callback): New function.
8334 (mips_linux_new_process, mips_linux_new_thread) New functions.
8335 (mips_linux_prepare_to_resume, mips_insert_point): New
8336 functions.
8337 (mips_remove_point, mips_stopped_by_watchpoint): New
8338 functions.
8339 (rsp_bp_type_to_target_hw_bp_type): New function.
8340 (mips_stopped_data_address): New function.
8341 (the_low_target): Add watchpoint support functions.
8342
8343 2013-07-27 Yao Qi <yao@codesourcery.com>
8344
8345 * i386-low.c: Include break-common.h.
8346 (enum target_hw_bp_type): Remove.
8347
8348 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8349
8350 * Makefile.in (SFILES): /common/target-common.c.
8351 (OBS): Add target-common.o.
8352 (server_h): Add $(srcdir)/../common/target-common.h.
8353 (target-common.o): New target.
8354 * server.c (queue_stop_reply_callback): Free
8355 status string after use.
8356 * target.c (target_waitstatus_to_string): Remove.
8357 * target.h: Include target-common.h.
8358 (resume_kind): Likewise.
8359 (target_waitkind): Likewise.
8360 (target_waitstatus): Likewise.
8361 (TARGET_WNOHANG): Likewise.
8362
8363 2013-07-04 Yao Qi <yao@codesourcery.com>
8364
8365 * Makefile.in (host_alias): Use @host_noncanonical@.
8366 (target_alias): Use @target_noncanonical@.
8367 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8368 ACX_NONCANONICAL_HOST.
8369 * configure: Regenerated.
8370
8371 Revert:
8372 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8373
8374 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8375 * configure: Rebuild.
8376 * Makefile.in (version_host, version_target): Get from configure.
8377 (version.c): Use $(version_host) and $(version_target).
8378
8379 2013-07-03 Pedro Alves <palves@redhat.com>
8380
8381 * Makefile.in (config.status): Depend on development.sh.
8382 * acinclude.m4: Include libmcheck.m4.
8383 * configure: Regenerate.
8384
8385 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8386
8387 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8388 attribute inside the parentheses.
8389 (winapi_DebugSetProcessKillOnExit): Ditto.
8390 (winapi_DebugBreakProcess): Ditto.
8391 (winapi_GenerateConsoleCtrlEvent): Ditto.
8392
8393 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8394
8395 * notif.h (notif_event): Add a dummy member to avoid compiler
8396 errors.
8397
8398 2013-07-01 Pedro Alves <palves@redhat.com>
8399
8400 * hostio.c (HOSTIO_PATH_MAX): Define.
8401 (require_filename, handle_open, handle_unlink, handle_readlink):
8402 Use it.
8403
8404 2013-07-01 Pedro Alves <palves@redhat.com>
8405
8406 * server.h: Include "pathmax.h".
8407 * linux-low.c: Don't include sys/param.h.
8408 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8409 MAXPATHLEN.
8410 * win32-low.c: Don't include sys/param.h.
8411 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8412
8413 2013-07-01 Pedro Alves <palves@redhat.com>
8414
8415 * event-loop.c: Don't check HAVE_UNISTD_H before including
8416 <unistd.h>.
8417 * gdbreplay.c: Likewise.
8418 * remote-utils.c: Likewise.
8419 * server.c: Likewise.
8420 * configure.ac: Don't check for unistd.h.
8421 * configure: Regenerate.
8422
8423 2013-06-28 Tom Tromey <tromey@redhat.com>
8424
8425 * Makefile.in (version.c): Use version.in, not
8426 common/version.in.
8427
8428 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8429
8430 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8431 * configure: Rebuild.
8432 * Makefile.in (version_host, version_target): Get from configure.
8433 (version.c): Use $(version_host) and $(version_target).
8434
8435 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8436
8437 Fix trace-status to output user name without trailing colon.
8438 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8439
8440 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8441
8442 Fix trace-status to output proper start-time and stop-time.
8443 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8444 output start time and stop time in hex as gdb expects.
8445
8446 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8447
8448 * tracepoint.c (build_traceframe_info_xml): Output trace state
8449 variables present in the trace buffer.
8450
8451 2013-06-24 Tom Tromey <tromey@redhat.com>
8452
8453 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8454 create-version.sh.
8455 (version.o): Remove.
8456 * gdbreplay.c: Include version.h.
8457 (version, host_name): Don't declare.
8458 * server.h: Include version.h.
8459 (version, host_name): Don't declare.
8460
8461 2013-06-12 Pedro Alves <palves@redhat.com>
8462
8463 * linux-x86-low.c (linux_is_elf64): Delete global.
8464 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8465 with local linux_pid_exe_is_elf_64_file use.
8466
8467 2013-06-11 Pedro Alves <palves@redhat.com>
8468
8469 * linux-low.c (regset_disabled, disable_regset): New functions.
8470 (regsets_fetch_inferior_registers)
8471 (regsets_store_inferior_registers): Use them.
8472 (initialize_regsets_info); Don't allocate the disabled_regsets
8473 array here.
8474 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8475 comment.
8476
8477 2013-06-11 Pedro Alves <palves@redhat.com>
8478
8479 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8480 xmalloc.
8481
8482 2013-06-11 Pedro Alves <palves@redhat.com>
8483
8484 * linux-x86-low.c (initialize_low_arch): Call
8485 init_registers_x32_avx_linux.
8486
8487 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8488
8489 Fix compatibility with Android Bionic.
8490 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8491 it is not empty.
8492
8493 2013-06-07 Pedro Alves <palves@redhat.com>
8494
8495 PR server/14823
8496 * Makefile.in (OBS): Add tdesc.o.
8497 (IPA_OBJS): Add tdesc-ipa.o.
8498 (tdesc-ipa.o): New rule.
8499 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8500 interface.
8501 * linux-low.c (new_inferior): Delete.
8502 (disabled_regsets, num_regsets): Delete.
8503 (linux_add_process): Adjust to set the new per-process
8504 new_inferior flag.
8505 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8506 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8507 was a stop. When calling arch_setup, switch the current inferior
8508 to the thread that got an event.
8509 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8510 (regsets_fetch_inferior_registers)
8511 (regsets_store_inferior_registers): New regsets_info parameter.
8512 Adjust to use it.
8513 (linux_register_in_regsets): New regs_info parameter. Adjust to
8514 use it.
8515 (register_addr, fetch_register, store_register): New usrregs_info
8516 parameter. Adjust to use it.
8517 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8518 parameter regs_info. Adjust to use it.
8519 (linux_fetch_registers): Get the current inferior's regs_info, and
8520 adjust to use it.
8521 (linux_store_registers): Ditto.
8522 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8523 (initialize_low): Don't initialize the target_regsets here. Call
8524 initialize_low_arch.
8525 * linux-low.h (target_regsets): Delete declaration.
8526 (struct regsets_info): New.
8527 (struct usrregs_info): New.
8528 (struct regs_info): New.
8529 (struct process_info_private) <new_inferior>: New field.
8530 (struct linux_target_ops): Delete the num_regs, regmap, and
8531 regset_bitmap fields. New field regs_info.
8532 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8533 * i387-fp.c (num_xmm_registers): Delete.
8534 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8535 calls to new interface.
8536 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8537 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8538 Infer the number of xmm registers from the regcache's target
8539 description.
8540 * i387-fp.h (num_xmm_registers): Delete.
8541 * inferiors.c (add_thread): Don't install the thread's regcache
8542 here.
8543 * proc-service.c (gregset_info): Fetch the current inferior's
8544 regs_info. Adjust to use it.
8545 * regcache.c: Include tdesc.h.
8546 (register_bytes, reg_defs, num_registers)
8547 (gdbserver_expedite_regs): Delete.
8548 (get_thread_regcache): If the thread doesn't have a regcache yet,
8549 create one, instead of aborting gdbserver.
8550 (regcache_invalidate_one): Rename to ...
8551 (regcache_invalidate_thread): ... this.
8552 (regcache_invalidate_one): New.
8553 (regcache_invalidate): Only invalidate registers of the current
8554 process.
8555 (init_register_cache): Add target_desc parameter, and use it.
8556 (new_register_cache): Ditto. Assert the target description has a
8557 non zero registers_size.
8558 (regcache_cpy): Add assertions. Adjust.
8559 (realloc_register_cache, set_register_cache): Delete.
8560 (registers_to_string, registers_from_string): Adjust.
8561 (find_register_by_name, find_regno, find_register_by_number)
8562 (register_cache_size): Add target_desc parameter, and use it.
8563 (free_register_cache_thread, free_register_cache_thread_one)
8564 (regcache_release, register_cache_size): New.
8565 (register_size): Add target_desc parameter, and use it.
8566 (register_data, supply_register, supply_register_zeroed)
8567 (supply_regblock, supply_register_by_name, collect_register)
8568 (collect_register_as_string, collect_register_by_name): Adjust.
8569 * regcache.h (struct target_desc): Forward declare.
8570 (struct regcache) <tdesc>: New field.
8571 (init_register_cache, new_register_cache): Add target_desc
8572 parameter.
8573 (regcache_invalidate_thread): Declare.
8574 (regcache_invalidate_one): Delete declaration.
8575 (regcache_release): Declare.
8576 (find_register_by_number, register_cache_size, register_size)
8577 (find_regno): Add target_desc parameter.
8578 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8579 declarations.
8580 * remote-utils.c: Include tdesc.h.
8581 (outreg, prepare_resume_reply): Adjust.
8582 * server.c: Include tdesc.h.
8583 (gdbserver_xmltarget): Delete declaration.
8584 (get_features_xml, process_serial_event): Adjust.
8585 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8586 declare.
8587 (struct process_info) <tdesc>: New field.
8588 (ipa_tdesc): Declare.
8589 * tdesc.c: New file.
8590 * tdesc.h: New file.
8591 * tracepoint.c: Include tdesc.h.
8592 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8593 (get_context_regcache): Adjust to pass ipa_tdesc down.
8594 (do_action_at_tracepoint): Adjust to get the register cache size
8595 from the context regcache's description.
8596 (traceframe_walk_blocks): Adjust to get the register cache size
8597 from the current trace frame's description.
8598 (traceframe_get_pc): Adjust to get current trace frame's
8599 description and pass it down.
8600 (gdb_collect): Adjust to get the register cache size from the
8601 IPA's description.
8602 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8603 (gdbserver_xmltarget): Delete.
8604 (initialize_low_tracepoint): Set the ipa's target description.
8605 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8606 (initialize_low_tracepoint): Set the ipa's target description.
8607 * linux-x86-low.c: Include tdesc.h.
8608 [__x86_64__] (is_64bit_tdesc): New.
8609 (ps_get_thread_area, x86_get_thread_area): Use it.
8610 (i386_cannot_store_register): Rename to ...
8611 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8612 (i386_cannot_fetch_register): Rename to ...
8613 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8614 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8615 to new interface.
8616 (target_regsets): Rename to ...
8617 (x86_regsets): ... this.
8618 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8619 interface.
8620 (x86_siginfo_fixup): Use is_64bit_tdesc.
8621 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8622 (tdesc_x32_avx_linux, tdesc_x32_linux)
8623 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8624 Declare.
8625 (x86_linux_update_xmltarget): Delete.
8626 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8627 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8628 (AMD64_LINUX_USER64_CS): New.
8629 (x86_linux_read_description): New, based on
8630 x86_linux_update_xmltarget.
8631 (same_process_callback): New.
8632 (x86_arch_setup_process_callback): New.
8633 (x86_linux_update_xmltarget): New.
8634 (x86_regsets_info): New.
8635 (amd64_linux_regs_info): New.
8636 (i386_linux_usrregs_info): New.
8637 (i386_linux_regs_info): New.
8638 (x86_linux_regs_info): New.
8639 (x86_arch_setup): Reimplement.
8640 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8641 (x86_emit_ops): Ditto.
8642 (the_low_target): Adjust. Install x86_linux_regs_info,
8643 x86_cannot_fetch_register, and x86_cannot_store_register.
8644 (initialize_low_arch): New.
8645 * linux-ia64-low.c (tdesc_ia64): Declare.
8646 (ia64_fetch_register): Adjust.
8647 (ia64_usrregs_info, regs_info): New globals.
8648 (ia64_regs_info): New function.
8649 (the_low_target): Adjust.
8650 (initialize_low_arch): New function.
8651 * linux-sparc-low.c (tdesc_sparc64): Declare.
8652 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8653 Adjust.
8654 (sparc_arch_setup): New function.
8655 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8656 (the_low_target): Adjust.
8657 (initialize_low_arch): New function.
8658 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8659 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8660 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8661 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8662 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8663 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8664 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8665 (tdesc_powerpc_isa205_vsx64l): Declare.
8666 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8667 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8668 (ppc_set_pc, ppc_get_hwcap): Adjust.
8669 (ppc_usrregs_info): Forward declare.
8670 (!__powerpc64__) ppc_regmap_adjusted: New global.
8671 (ppc_arch_setup): Adjust to the current process'es target
8672 description.
8673 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8674 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8675 (ppc_store_evrregset): Adjust.
8676 (target_regsets): Rename to ...
8677 (ppc_regsets): ... this, and make static.
8678 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8679 (ppc_regs_info): New function.
8680 (the_low_target): Adjust.
8681 (initialize_low_arch): New function.
8682 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8683 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8684 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8685 (tdesc_s390x_linux64v2): Declare.
8686 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8687 (s390_fill_gregset, s390_store_last_break): Adjust.
8688 (target_regsets): Rename to ...
8689 (s390_regsets): ... this, and make static.
8690 (s390_get_pc, s390_set_pc): Adjust.
8691 (s390_get_hwcap): New target_desc parameter, and use it.
8692 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8693 (s390_arch_setup): Adjust to set the current process'es target
8694 description. Don't adjust the regmap.
8695 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8696 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8697 (regs_info_3264): New globals.
8698 (s390_regs_info): New function.
8699 (the_low_target): Adjust.
8700 (initialize_low_arch): New function.
8701 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8702 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8703 [__mips64] (init_registers_mips_linux)
8704 (init_registers_mips_dsp_linux): Delete defines.
8705 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8706 (have_dsp): New global.
8707 (mips_read_description): New, based on mips_arch_setup.
8708 (mips_arch_setup): Reimplement.
8709 (get_usrregs_info): New function.
8710 (mips_cannot_fetch_register, mips_cannot_store_register)
8711 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8712 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8713 (target_regsets): Rename to ...
8714 (mips_regsets): ... this, and make static.
8715 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8716 (dsp_regs_info, regs_info): New globals.
8717 (mips_regs_info): New function.
8718 (the_low_target): Adjust.
8719 (initialize_low_arch): New function.
8720 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8721 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8722 Declare.
8723 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8724 (arm_read_description): New, with bits factored from
8725 arm_arch_setup.
8726 (arm_arch_setup): Reimplement.
8727 (target_regsets): Rename to ...
8728 (arm_regsets): ... this, and make static.
8729 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8730 (arm_regs_info): New function.
8731 (the_low_target): Adjust.
8732 (initialize_low_arch): New function.
8733 * linux-m68k-low.c (tdesc_m68k): Declare.
8734 (target_regsets): Rename to ...
8735 (m68k_regsets): ... this, and make static.
8736 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8737 (m68k_regs_info): New function.
8738 (m68k_arch_setup): New function.
8739 (the_low_target): Adjust.
8740 (initialize_low_arch): New function.
8741 * linux-sh-low.c (tdesc_sharch): Declare.
8742 (target_regsets): Rename to ...
8743 (sh_regsets): ... this, and make static.
8744 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8745 (sh_regs_info, sh_arch_setup): New functions.
8746 (the_low_target): Adjust.
8747 (initialize_low_arch): New function.
8748 * linux-bfin-low.c (tdesc_bfin): Declare.
8749 (bfin_arch_setup): New function.
8750 (bfin_usrregs_info, regs_info): New globals.
8751 (bfin_regs_info): New function.
8752 (the_low_target): Adjust.
8753 (initialize_low_arch): New function.
8754 * linux-cris-low.c (tdesc_cris): Declare.
8755 (cris_arch_setup): New function.
8756 (cris_usrregs_info, regs_info): New globals.
8757 (cris_regs_info): New function.
8758 (the_low_target): Adjust.
8759 (initialize_low_arch): New function.
8760 * linux-cris-low.c (tdesc_crisv32): Declare.
8761 (cris_arch_setup): New function.
8762 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8763 (cris_regs_info): New function.
8764 (the_low_target): Adjust.
8765 (initialize_low_arch): New function.
8766 * linux-m32r-low.c (tdesc_m32r): Declare.
8767 (m32r_arch_setup): New function.
8768 (m32r_usrregs_info, regs_info): New globals.
8769 (m32r_regs_info): Adjust.
8770 (initialize_low_arch): New function.
8771 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8772 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8773 (tic6x_usrregs_info): Forward declare.
8774 (tic6x_read_description): New function, based on ...
8775 (tic6x_arch_setup): ... this. Reimplement.
8776 (target_regsets): Rename to ...
8777 (tic6x_regsets): ... this, and make static.
8778 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8779 (tic6x_regs_info): New function.
8780 (the_low_target): Adjust.
8781 (initialize_low_arch): New function.
8782 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8783 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8784 (target_regsets): Rename to ...
8785 (xtensa_regsets): ... this, and make static.
8786 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8787 globals.
8788 (xtensa_arch_setup, xtensa_regs_info): New functions.
8789 (the_low_target): Adjust.
8790 (initialize_low_arch): New function.
8791 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8792 (nios2_arch_setup): Set the current process'es tdesc.
8793 (target_regsets): Rename to ...
8794 (nios2_regsets): ... this.
8795 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8796 (nios2_regs_info): New function.
8797 (the_low_target): Adjust.
8798 (initialize_low_arch): New function.
8799 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8800 (aarch64_arch_setup): Set the current process'es tdesc.
8801 (target_regsets): Rename to ...
8802 (aarch64_regsets): ... this.
8803 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8804 (aarch64_regs_info): New function.
8805 (the_low_target): Adjust.
8806 (initialize_low_arch): New function.
8807 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8808 globals.
8809 (target_regsets): Rename to ...
8810 (tile_regsets): ... this.
8811 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8812 (tile_regs_info): New function.
8813 (tile_arch_setup): Set the current process'es tdesc.
8814 (the_low_target): Adjust.
8815 (initialize_low_arch): New function.
8816 * spu-low.c (tdesc_spu): Declare.
8817 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8818 * win32-arm-low.c (tdesc_arm): Declare.
8819 (arm_arch_setup): New function.
8820 (the_low_target): Install arm_arch_setup instead of
8821 init_registers_arm.
8822 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8823 (init_windows_x86): Rename to ...
8824 (i386_arch_setup): ... this. Set `win32_tdesc'.
8825 (the_low_target): Adjust.
8826 * win32-low.c (win32_tdesc): New global.
8827 (child_add_thread): Don't create the thread cache here.
8828 (do_initial_child_stuff): Set the new process'es tdesc.
8829 * win32-low.h (struct target_desc): Forward declare.
8830 (win32_tdesc): Declare.
8831 * lynx-i386-low.c (tdesc_i386): Declare global.
8832 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8833 * lynx-low.c (lynx_tdesc): New global.
8834 (lynx_add_process): Set the new process'es tdesc.
8835 * lynx-low.h (struct target_desc): Forward declare.
8836 (lynx_tdesc): Declare global.
8837 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8838 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8839 * nto-low.c (nto_tdesc): New global.
8840 (do_attach): Set the new process'es tdesc.
8841 * nto-low.h (struct target_desc): Forward declare.
8842 (nto_tdesc): Declare.
8843 * nto-x86-low.c (tdesc_i386): Declare.
8844 (nto_x86_arch_setup): Set `nto_tdesc'.
8845
8846 2013-06-04 Gary Benson <gbenson@redhat.com>
8847
8848 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8849 to qSupported response when appropriate.
8850 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8851 with nonzero-length annex.
8852 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8853 arguments supplied in annex.
8854
8855 2013-05-31 Doug Evans <dje@google.com>
8856
8857 PR server/15594
8858 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8859 64 bits in 64-cross-32 environment.
8860
8861 2013-05-28 Pedro Alves <palves@redhat.com>
8862
8863 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8864 (aarch64-without-fpu.c): Delete rule.
8865 * configure.srv (aarch64*-*-linux*): Remove references to
8866 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8867 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8868 declaration.
8869
8870 2013-05-24 Pedro Alves <palves@redhat.com>
8871
8872 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8873 instead of strchr/decode_address. Error if the range isn't split
8874 with a ','. Don't assume there's be a ':' in the action.
8875
8876 2013-05-23 Yao Qi <yao@codesourcery.com>
8877 Pedro Alves <palves@redhat.com>
8878
8879 * linux-low.c (lwp_in_step_range): New function.
8880 (linux_wait_1): If the thread was range stepping and stopped
8881 outside the stepping range, report the stop to GDB. Otherwise,
8882 continue stepping. Add range stepping debug output.
8883 (linux_set_resume_request): Copy the step range from the resume
8884 request to the lwp.
8885 (linux_supports_range_stepping): New.
8886 (linux_target_ops) <supports_range_stepping>: Set to
8887 linux_supports_range_stepping.
8888 * linux-low.h (struct linux_target_ops)
8889 <supports_range_stepping>: New field.
8890 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8891 * linux-x86-low.c (x86_supports_range_stepping): New.
8892 (the_low_target) <supports_range_stepping>: Set to
8893 x86_supports_range_stepping.
8894 * server.c (handle_v_cont): Handle 'r' action.
8895 (handle_v_requests): Append ";r" if the target supports range
8896 stepping.
8897 * target.h (struct thread_resume) <step_range_start,
8898 step_range_end>: New fields.
8899 (struct target_ops) <supports_range_stepping>:
8900 New field.
8901 (target_supports_range_stepping): New macro.
8902
8903 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8904
8905 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8906 confusion in comment.
8907
8908 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8909
8910 * lynx-low.c (struct process_info_private): New type.
8911 (lynx_add_process): New function.
8912 (lynx_create_inferior, lynx_attach): Replace calls to
8913 add_process by calls to lynx_add_process.
8914 (lynx_resume): If PTID is null, then try using
8915 current_process()->private->last_wait_event_ptid.
8916 Add comments.
8917 (lynx_clear_inferiors): Delete. The contents of that function
8918 has been inlined in lynx_mourn;
8919 (lynx_wait_1): Save the ptid in the process's private data.
8920 (lynx_mourn): Free the process' private data. Replace call
8921 to lynx_clear_inferiors by call to clear_inferiors.
8922
8923 2013-05-17 Yao Qi <yao@codesourcery.com>
8924
8925 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8926 the right place.
8927
8928 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8929
8930 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8931 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8932 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8933 PT_TEXT_END_ADDR guards. Update comments.
8934 (linux_target_op) <read_offsets>: Conditionally define to
8935 linux_read_offsets if the target is UCLIBC and if it defines
8936 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8937
8938 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8939 Andrew Jenner <andrew@codesourcery.com>
8940
8941 * Makefile.in (SFILES): Add linux-nios2-low.c.
8942 (clean): Add action to delete nios2-linux.c.
8943 (nios2-linux.c): New rule.
8944 * configure.srv: Add nios2*-*-linux*.
8945 * linux-nios2-low.c: New.
8946
8947 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8948
8949 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8950
8951 2013-04-25 Hui Zhu <hui@codesourcery.com>
8952
8953 PR gdb/15186
8954 * ax.c (ax_printf): Add fflush.
8955
8956 2013-04-22 Tom Tromey <tromey@redhat.com>
8957
8958 * Makefile.in (SFILES): Add filestuff.c.
8959 (OBS): Add filestuff.o.
8960 (filestuff.o): New target.
8961 * config.in, configure: Rebuild.
8962 * configure.ac: Check for fdwalk, pipe2.
8963
8964 2013-04-17 Pedro Alves <palves@redhat.com>
8965
8966 * configure.ac (USE_THREAD_DB): Delete variable.
8967 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8968 Don't AC_SUBST USE_THREAD_DB.
8969 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8970 * config.in, configure: Regenerate.
8971
8972 2013-04-16 Pedro Alves <palves@redhat.com>
8973
8974 * linux-low.h (struct lwp_info) <thread_known>: Move under
8975 the USE_THREAD_DB #ifdef.
8976
8977 2013-04-16 Pedro Alves <palves@redhat.com>
8978
8979 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8980 (linux-low.o): Delete rule.
8981 * linux-low.h: Always include "gdb_thread_db.h" instead of
8982 conditionally including thread_db.h.
8983 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8984 HAVE_THREAD_DB_H.
8985
8986 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8987
8988 * Makefile.in (install-only): Fix make install regression.
8989
8990 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8991
8992 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8993 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8994 installation.
8995 * gdbserver.1: Remove.
8996
8997 2013-03-22 Pedro Alves <palves@redhat.com>
8998
8999 * linux-low.c (handle_extended_wait): Don't call
9000 linux_enable_event_reporting.
9001
9002 2013-03-15 Tony Theodore <tonyt@logyst.com>
9003
9004 PR build/9098:
9005 * Makefile.in (SHELL): Use @SHELL@.
9006
9007 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9008
9009 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9010 compiler warning.
9011
9012 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9013
9014 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9015 Remove extraneous NULL element.
9016
9017 2013-03-13 Yao Qi <yao@codesourcery.com>
9018
9019 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9020 'V' block in trace frame.
9021
9022 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9023
9024 * target.h (struct target_ops): Add btrace ops.
9025 (target_supports_btrace): New macro.
9026 (target_enable_btrace): New macro.
9027 (target_disable_btrace): New macro.
9028 (target_read_btrace): New macro.
9029 * gdbthread.h (struct thread_info): Add btrace field.
9030 * server.c: Include btrace-common.h.
9031 (handle_btrace_general_set): New function.
9032 (handle_btrace_enable): New function.
9033 (handle_btrace_disable): New function.
9034 (handle_general_set): Call handle_btrace_general_set.
9035 (handle_qxfer_btrace): New function.
9036 (struct qxfer qxfer_packets[]): Add btrace entry.
9037 * inferiors.c (remove_thread): Disable btrace.
9038 * linux-low: Include linux-btrace.h.
9039 (linux_low_enable_btrace): New function.
9040 (linux_low_read_btrace): New function.
9041 (linux_target_ops): Add btrace ops.
9042 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9043 Add srv_linux_btrace=yes.
9044 (x86_64-*-linux*): Add linux-btrace.o.
9045 Add srv_linux_btrace=yes.
9046 * configure.ac: Define HAVE_LINUX_BTRACE.
9047 * config.in: Regenerated.
9048 * configure: Regenerated.
9049
9050 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9051
9052 * server.c (handle_qxfer): Preserve error message if -3 is
9053 returned.
9054 (qxfer): Document the -3 return value.
9055
9056 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9057
9058 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9059 (linux_btrace_h): New variable.
9060 (linux-btrace.o): New rule.
9061
9062 2013-03-08 Stan Shebs <stan@codesourcery.com>
9063 Hafiz Abid Qadeer <abidh@codesourcery.com>
9064
9065 * tracepoint.c (trace_buffer_size): New global.
9066 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9067 (init_trace_buffer): Change to one-argument function. Allocate
9068 trace buffer memory.
9069 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9070 handle QTBuffer:size packet.
9071 (cmd_bigqtbuffer_size): New function.
9072 (initialize_tracepoint): Call init_trace_buffer with
9073 DEFAULT_TRACE_BUFFER_SIZE.
9074 * server.c (handle_query): Add QTBuffer:size in the
9075 supported packets.
9076
9077 2013-03-07 Yao Qi <yao@codesourcery.com>
9078
9079 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9080 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9081 of -1.
9082 (cmd_qtsp): Adjust condition. Do post increment.
9083 Set cur_action and cur_step_action back to 0.
9084
9085 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9086
9087 PR server/15236
9088 * linux-low.c (linux_write_memory): Return early success if LEN is
9089 zero.
9090
9091 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9092
9093 * configure.srv: Add x86_64-*-cygwin* as target.
9094
9095 2013-02-28 Tom Tromey <tromey@redhat.com>
9096
9097 * configure.ac: Invoke AC_SYS_LARGEFILE.
9098 * configure, config.in: Rebuild.
9099
9100 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9101
9102 * win32-low.c: Throughout, fix format strings and casts of
9103 printf-like functions to avoid type related warnings on all
9104 platforms.
9105 (get_child_debug_event): Print dwDebugEventCode as hex since
9106 that's how it's usually documented.
9107
9108 2013-02-28 Yao Qi <yao@codesourcery.com>
9109
9110 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9111 pulongest.
9112
9113 2013-02-27 Jiong Wang <jiwang@tilera.com>
9114
9115 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9116 (reg-tilegx32.c): New rule.
9117 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9118 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9119 different register info initializer according to elf class.
9120 (init_registers_tilgx32): New function. The tilegx32 register info
9121 initializer.
9122 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9123 (tile_store_gregset): Likewise.
9124
9125 2013-02-27 Yao Qi <yao@codesourcery.com>
9126
9127 * server.c (process_point_options): Print debug message when
9128 debug_threads is true.
9129
9130 2013-02-26 Yao Qi <yao@codesourcery.com>
9131
9132 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9133
9134 2013-02-19 Pedro Alves <palves@redhat.com>
9135 Kai Tietz <ktietz@redhat.com>
9136
9137 PR gdb/15161
9138
9139 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9140 instead of strtoul to extract address from packet.
9141 (process_serial_event) <'z'>: Likewise.
9142
9143 2013-02-18 Yao Qi <yao@codesourcery.com>
9144
9145 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9146
9147 2013-02-14 Pedro Alves <palves@redhat.com>
9148
9149 Plug memory leak.
9150
9151 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9152 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9153
9154 2013-02-14 Pedro Alves <palves@redhat.com>
9155
9156 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9157
9158 2013-02-14 Pedro Alves <palves@redhat.com>
9159
9160 * tracepoint.c (save_string): Delete.
9161 (add_tracepoint_action): Use savestring instead of save_string.
9162
9163 2013-02-12 Pedro Alves <palves@redhat.com>
9164
9165 * linux-xtensa-low.c: Ditto.
9166 * xtensa-xtregs.c: Ditto.
9167
9168 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9169
9170 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9171 thread_db.
9172
9173 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9174
9175 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9176 aarch64_num_wp_regs and aarch64_num_bp_regs to
9177 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9178
9179 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9180
9181 * linux-aarch64-low.c (ps_get_thread_area): Replace
9182 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9183
9184 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9185 Marcus Shawcroft <marcus.shawcroft@arm.com>
9186 Nigel Stephens <nigel.stephens@arm.com>
9187 Yufeng Zhang <yufeng.zhang@arm.com>
9188
9189 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9190 (aarch64.c, aarch64-without-fpu.c): New targets.
9191 * configure.srv (aarch64*-*-linux*): New.
9192 * linux-aarch64-low.c: New file.
9193
9194 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9195
9196 * linux-low.c (handle_extended_wait, linux_create_inferior)
9197 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9198 (dequeue_one_deferred_signal, linux_resume_one_thread)
9199 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9200 (linux_tracefork_grandchild, linux_test_for_tracefork)
9201 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9202 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9203 where the argument is 0.
9204
9205 2013-01-25 Yao Qi <yao@codesourcery.com>
9206
9207 * event-loop.c: Include "queue.h".
9208 (gdb_event_p): New typedef.
9209 (struct gdb_event) <next_event>: Remove.
9210 (event_queue): Change to QUEUE(gdb_event_p).
9211 (async_queue_event): Remove.
9212 (gdb_event_xfree): New.
9213 (initialize_event_loop): New.
9214 (process_event): Use API from QUEUE.
9215 (wait_for_event): Likewise.
9216 * server.c (main): Call initialize_event_loop.
9217 * server.h (initialize_event_loop): Declare.
9218
9219 2013-01-18 Yao Qi <yao@codesourcery.com>
9220
9221 * ax.h (struct eval_agent_expr_context): New.
9222 (gdb_eval_agent_expr): Update declaration.
9223 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9224 TFRAME. Add new argument CTX.
9225 * server.h (struct eval_agent_expr_context): Declare.
9226 (agent_mem_read, agent_tsv_read): Update declaration.
9227 (agent_mem_read_string): Likewise.
9228 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9229 (add_traceframe_block): Add new argument TPOINT.
9230 Increase TPOINT->traceframe_usage.
9231 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9232 eval_tracepoint_agent_expr.
9233 (condition_true_at_tracepoint): Likewise.
9234 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9235 (agent_mem_read_string, agent_tsv_read): Likewise.
9236
9237 2013-01-16 Yao Qi <yao@codesourcery.com>
9238
9239 * linux-low.c (linux_resume_one_lwp): Don't check
9240 'lwp->bp_reinsert != 0'.
9241
9242 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9243 Pedro Alves <palves@redhat.com>
9244
9245 * lynx-low.c (ptrace_request_to_str): Define a temporary
9246 macro and use it to simplify this function's implementation.
9247
9248 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9249
9250 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9251 sets errno.
9252
9253 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9254
9255 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9256
9257 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9258
9259 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9260
9261 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9262
9263 * lynx-low.c (lynx_resume): Use the resume_info parameter
9264 to determine the ptid for the lynx_ptrace call, unless
9265 it is equal to minus_one_ptid, in which case we use the
9266 ptid of the current_inferior.
9267 (lynx_wait_1): After having received a thread create/exit
9268 event, resume the inferior's execution using the signaling
9269 thread's ptid, rather than the old ptid.
9270
9271 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9272
9273 * lynx-low.c (lynx_resume): Delete variable ret.
9274
9275 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9276
9277 * gdbreplay.c (gdbreplay_version): Update copyright year.
9278 * server.c (gdbserver_version): Likewise.
9279
9280 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9281
9282 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9283 new thread.
9284
9285 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9286
9287 * lynx-low.c (ptrace_request_to_str): Add handling for
9288 PTRACE_GETTRACESIG.
9289
9290 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9291
9292 * lynx-low.c (lynx_attach): Delete variable new_process.
9293
9294 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9295
9296 * lynx-low.c (lynx_create_inferior): Delete variable
9297 new_process.
9298
9299 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9300
9301 * lynx-low.c (ptrace_request_to_str): Do not handle
9302 PTRACE_GETTHREADLIST if this macro does not exist.
9303
9304 2012-12-15 Yao Qi <yao@codesourcery.com>
9305
9306 * Makefile.in (OBS): Add notif.o.
9307 * notif.c, notif.h: New.
9308 * server.c: Include "notif.h".
9309 (struct vstop_notif) <next>: Remove.
9310 <base>: New field.
9311 (queue_stop_reply): Update.
9312 (push_event, send_next_stop_reply): Remove.
9313 (discard_queued_stop_replies): Update.
9314 (notif_stop): New variable.
9315 (handle_v_stopped): Remove.
9316 (handle_v_requests): Don't call handle_v_stopped. Call
9317 handle_ack_notif instead.
9318 (queue_stop_reply_callback): Call notif_event_enque instead
9319 of queue_stop_reply.
9320 (handle_status): Don't call send_next_stop_reply, call
9321 notif_write_event instead.
9322 (kill_inferior_callback): Likewise.
9323 (detach_or_kill_inferior_callback): Likewise.
9324 (main): Call initialize_notif.
9325 (process_serial_event): Call QUEUE_is_empty.
9326 (handle_target_event): Call notif_push instead of push event.
9327 * server.h (push_event): Remove declaration.
9328
9329 2012-12-10 Tom Tromey <tromey@redhat.com>
9330
9331 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9332 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9333 macros.
9334 (.c.o): Rewrite.
9335 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9336 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9337 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9338 (amd64-linux-ipa.o, ax.o): Rewrite.
9339 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9340 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9341 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9342 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9343 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9344 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9345 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9346 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9347 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9348 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9349 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9350 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9351 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9352 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9353 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9354 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9355 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9356 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9357 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9358 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9359 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9360 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9361 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9362 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9363 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9364 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9365 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9366 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9367 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9368 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9369 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9370 (reg-tilegx.o): Remove.
9371 (all_object_files): New macro.
9372 Include .deps files.
9373 * aclocal.m4, configure: Rebuild.
9374 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9375 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9376 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9377
9378 2012-12-05 Tom Tromey <tromey@redhat.com>
9379
9380 PR gdb/14917:
9381 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9382
9383 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9384
9385 * configure.ac: Check for linux/perf_event.h.
9386 * config.in: Regenerated.
9387 * configure: Regenerated.
9388
9389 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9390
9391 * hostio.c (handle_readlink): Decrease buffer size
9392 parameter passed to readlink by one byte.
9393
9394 2012-11-26 Yao Qi <yao@codesourcery.com>
9395
9396 * configure.ac (build_warnings): Append '-Wempty-body'.
9397 * configure: Regenerated.
9398 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9399 body.
9400
9401 2012-11-15 Pierre Muller <muller@sourceware.org>
9402
9403 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9404 * config.in: Regenerate.
9405 * configure: Regenerate.
9406 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9407 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9408 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9409 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9410 header.
9411 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9412 instead of <sys/wait.h> header.
9413 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9414
9415 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9416
9417 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9418 (various make rules): Remove -DGDBSERVER
9419
9420 2012-11-09 Yao Qi <yao@codesourcery.com>
9421
9422 * spu-low.c (current_ptid): Move it to ..
9423 * gdbthread.h: ... here. New.
9424 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9425 * server.c (myresume, process_serial_event): Likewise.
9426 * thread-db.c (thread_db_find_new_threads): Likewise.
9427 * tracepoint.c (run_inferior_command): Likewise.
9428
9429 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9430
9431 * server.c (handle_search_memory_1): Include access length in
9432 warning message.
9433
9434 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9435
9436 * linux-crisv32-low.c: Fix compile errors.
9437
9438 2012-09-04 Yao Qi <yao@codesourcery.com>
9439
9440 * tracepoint.c (cmd_qtsv): Adjust debug message.
9441 Don't check CUR_TPOINT.
9442
9443 2012-08-28 Yao Qi <yao@codesourcery.com>
9444
9445 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9446 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9447 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9448 Remove declarations of xmalloc, xreallloc, xstrdup and
9449 freeargv.
9450 * Makefile.in (libiberty_h): New.
9451 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9452 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9453
9454 2012-08-23 Yao Qi <yao@codesourcery.com>
9455
9456 * server.h: Remove declaration of 'xsnprintf'.
9457
9458 2012-08-22 Keith Seitz <keiths@redhat.com>
9459
9460 * server.h: Include build-gnulib-gbserver/config.h.
9461 * gdbreplay.c: Likewise.
9462
9463 2012-08-08 Doug Evans <dje@google.com>
9464
9465 * Makefile.in (SFILES): Add gdb_vecs.c.
9466 (OBS): Add gdb_vecs.o.
9467 (gdb_vecs_h, host_defs_h): New variables.
9468 (thread-db.o): Add $(gdb_vecs_h) dependency.
9469 (gdb_vecs.o): New rule.
9470 * thread-db.c: #include "gdb_vecs.h".
9471 (thread_db_load_search): Use a vector to iterate over path elements.
9472 Handle text appearing after "$pdir".
9473
9474 * configure.ac: Add check for strstr.
9475 * config.in: Regenerate.
9476 * configure: Regenerate.
9477
9478 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9479
9480 * hostio.c (handle_pread): If pread fails, fall back to attempting
9481 lseek/read.
9482 (handle_pwrite): Likewise for pwrite.
9483
9484 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9485
9486 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9487 between unsupported TYPE and unimplementable ADDR/LEN combination.
9488 (arm_insert_point): Act on new return value.
9489
9490 2012-07-31 Pedro Alves <palves@redhat.com>
9491
9492 * server.c (process_point_options): Only skip tokens if we find
9493 one that is unrecognized. Don't treat 'X' specially while
9494 skipping unrecognized tokens.
9495
9496 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9497
9498 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9499 to 4-byte-align HW breakpoint addresses for Thumb.
9500
9501 2012-07-27 Yao Qi <yao@codesourcery.com>
9502
9503 PR remote/14161.
9504
9505 * server.h: Declare gdb_agent_about_to_close.
9506 * target.c (kill_inferior): Include "agent.h".
9507 New. Send command 'kill'.
9508 * target.h (kill_inferior): Removed macro.
9509 * tracepoint.c (gdb_agent_about_to_close): New.
9510 (gdb_agent_helper_thread): Handle command 'close'.
9511 Wait endlessly until the inferior stops.
9512 Install gdb_agent_remove_socket to atexit hook.
9513 (agent_socket_name): New static variable.
9514 (gdb_agent_socket_init): Replace local variable 'name' with
9515 'agent_socket_name'.
9516 (gdb_agent_remove_socket): New.
9517
9518 2012-07-27 Yao Qi <yao@codesourcery.com>
9519
9520 * server.c (process_point_options): Stop at 'X' when parsing.
9521
9522 2012-07-19 Michael Eager <eager@eagercon.com>
9523
9524 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9525 to hw_execute.
9526 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9527 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9528 hardware breakpoint.
9529
9530 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9531
9532 * gdbserver/linux-low.c (initialize_low): Call
9533 linux_ptrace_init_warnings.
9534
9535 2012-07-02 Doug Evans <dje@google.com>
9536
9537 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9538 pointer to int.
9539
9540 2012-07-02 Stan Shebs <stan@codesourcery.com>
9541
9542 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9543 (ax.o): Add it to build rule.
9544 (ax-ipa.o): Ditto.
9545 (OBS): Add format.o.
9546 (IPA_OBS): Add format.o.
9547 * server.c (handle_query): Claim support for breakpoint commands.
9548 (process_point_options): Add command case.
9549 (process_serial_event): Leave running if there are printfs in
9550 effect.
9551 * mem-break.h (any_persistent_commands): Declare.
9552 (add_breakpoint_commands): Declare.
9553 (gdb_no_commands_at_breakpoint): Declare.
9554 (run_breakpoint_commands): Declare.
9555 * mem-break.c (struct point_command_list): New struct.
9556 (struct breakpoint): New field command_list.
9557 (any_persistent_commands): New function.
9558 (add_commands_to_breakpoint): New function.
9559 (add_breakpoint_commands): New function.
9560 (gdb_no_commands_at_breakpoint): New function.
9561 (run_breakpoint_commands): New function.
9562 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9563 locally.
9564 * ax.c: Include format.h.
9565 (ax_printf): New function.
9566 (gdb_eval_agent_expr): Add printf opcode.
9567
9568 2012-06-13 Yao Qi <yao@codesourcery.com>
9569
9570 * server.c (start_inferior): Remove duplicated writes to fields
9571 'last_resume_kind' and 'last_status' of 'current_inferior'.
9572
9573 2012-06-12 Yao Qi <yao@codesourcery.com>
9574 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9577 comment.
9578 * server.c (handle_v_cont): Extend comment.
9579
9580 2012-06-11 Yao Qi <yao@codesourcery.com>
9581
9582 * linux-low.c (linux_attach): Add 'static'.
9583
9584 2012-06-06 Yao Qi <yao@codesourcery.com>
9585
9586 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9587
9588 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9589
9590 Fix gcc -flto compilation warning.
9591 * server.c (main): Make variable multi_mode and attach volatile.
9592
9593 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9594
9595 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9596 if the platform doesn't know about it.
9597
9598 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9599
9600 * Makefile.in (SFILES): Add linux-tile-low.c.
9601 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9602 * configure.srv: Handle tilegx-*-linux*.
9603 * linux-tile-low.c: New file.
9604
9605 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9608
9609 2012-05-24 Pedro Alves <palves@redhat.com>
9610
9611 PR gdb/7205
9612
9613 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9614
9615 2012-05-24 Pedro Alves <palves@redhat.com>
9616
9617 PR gdb/7205
9618
9619 Replace target_signal with gdb_signal throughout.
9620
9621 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9622
9623 * linux-low.c (linux_store_registers): Avoid the copying sequence
9624 when no data has been retrieved by ptrace.
9625
9626 2012-05-22 Will Deacon <will.deacon@arm.com>
9627
9628 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9629 Include asm/ptrace.h.
9630 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9631 already defined.
9632
9633 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9634
9635 * linux-low.c (linux_store_registers): Don't re-retrieve data
9636 with ptrace that has already been obtained from /proc. Always
9637 copy any data retrieved with ptrace to the buffer supplied.
9638
9639 2012-05-11 Yao Qi <yao@codesourcery.com>
9640 Pedro Alves <palves@redhat.com>
9641
9642 * linux-low.c (enum stopping_threads_kind): New.
9643 (stopping_threads): Change type to `enum stopping_threads_kind'.
9644 (handle_extended_wait): If stopping and suspending threads, leave
9645 the new_lwp suspended too.
9646 (linux_wait_for_event): Adjust.
9647 (stop_all_lwps): Set `stopping_threads' to
9648 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9649 whether we're suspending threads or just stopping them. Assert no
9650 recursion happens.
9651
9652 2012-04-29 Yao Qi <yao@codesourcery.com>
9653
9654 * server.h: Move some code to ...
9655 * gdbthread.h: ... here. New.
9656 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9657 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9658 (nto-low.o, win32-low.o): Likewise.
9659 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9660 * regcache.c, remote-utils.c, server.c: Likewise.
9661 * target.c, tracepoint.c, win32-low.c: Likewise.
9662
9663 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9664
9665 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9666 (PTRACE_ARG4_TYPE): Likewise.
9667 (PTRACE_XFER_TYPE): Likewise.
9668 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9669 ptrace to PTRACE_ARG3_TYPE.
9670 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9671 (PTRACE_ARG4_TYPE): Likewise.
9672 (PTRACE_XFER_TYPE): Likewise.
9673 (linux_detach_one_lwp): Cast fourth argument of
9674 ptrace to long then PTRACE_ARG4_TYPE.
9675 (regsets_fetch_inferior_registers): Cast third argument of
9676 ptrace to long then PTRACE_ARG3_TYPE.
9677 (regsets_store_inferior_registers): Likewise.
9678
9679 2012-04-20 Pedro Alves <palves@redhat.com>
9680
9681 * configure: Regenerate.
9682
9683 2012-04-19 Pedro Alves <palves@redhat.com>
9684
9685 * Makefile.in (GNULIB_BUILDDIR): New.
9686 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9687 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9688 (all, install-only, uninstall, clean-info, all-lib, clean): No
9689 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9690 (maintainer-clean realclean distclean): Use subdir_do.
9691 (subdir_do): New.
9692 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9693 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9694 * acinclude.m4: Include acx_configure_dir.m4.
9695 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9696 calls. Call AC_PROG_RANLIB. Configure gnulib using
9697 ACX_CONFIGURE_DIR.
9698 (GNULIB): New.
9699 (GNULIB_STDINT_H): Adjust.
9700 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9701 * gdbreplay.c: Include build-gnulib/config.h.
9702 * server.h: Likewise.
9703 * aclocal.m4: Regenerate.
9704 * config.in: Regenerate.
9705 * configure: Regenerate.
9706
9707 2012-04-19 Pedro Alves <palves@redhat.com>
9708
9709 * Makefile.in (LIBGNU, INCGNU): Adjust.
9710 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9711 (all, install-only, uninstall, clean-info, all-lib, clean)
9712 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9713 * configure.ac: Adjust AC_OUTPUT output.
9714 * aclocal.m4: Regenerate.
9715 * configure: Regenerate.
9716
9717 2012-04-19 Pedro Alves <palves@redhat.com>
9718
9719 * Makefile.in (generated_files): New.
9720 (server_h): Remove the explicit dependency on config.h, and depend
9721 on $generated_files.
9722
9723 2012-04-19 Pedro Alves <palves@redhat.com>
9724
9725 * Makefile.in (INCGNU): Add -Ignulib.
9726
9727 2012-04-19 Pedro Alves <palves@redhat.com>
9728
9729 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9730 (INCGNU): ... this, and spell out -I here.
9731 (GNULIB_LIB): Rename to ...
9732 (LIBGNU): ... this.
9733 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9734
9735 2012-04-19 Pedro Alves <palves@redhat.com>
9736
9737 * config.in: Regenerate.
9738
9739 2012-04-19 Pedro Alves <palves@redhat.com>
9740
9741 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9742 * server.h (memmem): Remove declaration.
9743 * config.in: Regenerate.
9744 * configure: Regenerate.
9745
9746 2012-04-19 Yao Qi <yao@codesourcery.com>
9747
9748 * Makefile.in (SFILES): Add common/vec.c.
9749 (OBS): Add vec.o.
9750 (vec.o): New rule.
9751
9752 2012-04-19 Yao Qi <yao@codesourcery.com>
9753
9754 * remote-utils.c (prepare_resume_reply): Replace with macro
9755 target_core_of_thread.
9756 * server.c (handle_qxfer_threads_proper): Likewise.
9757 * target.h (traget_core_of_thread): New macro.
9758
9759 2012-04-18 Pedro Alves <palves@redhat.com>
9760
9761 * aclocal.m4: Regenerate.
9762 * configure: Regenerate.
9763
9764 2012-04-16 Yao Qi <yao@codesourcery.com>
9765
9766 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9767 duplicated on address.
9768
9769 2012-04-16 Yao Qi <yao@codesourcery.com>
9770
9771 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9772 (struct tracepoint_action_ops) <send>: New field.
9773 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9774 (agent_expr_send, x_tracepoint_action_send): New.
9775 (l_tracepoint_action_send): New.
9776 (cmd_qtdp): Download and install tracepoint
9777 according to `use_agent'.
9778 (run_inferior_command): Add one more parameter `len'.
9779 Update callers.
9780 (tracepoint_send_agent): New.
9781 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9782
9783 2012-04-16 Yao Qi <yao@codesourcery.com>
9784
9785 * tracepoint.c (download_tracepoints): Moved to ...
9786 (cmd_qtstart): ... here.
9787
9788 2012-04-14 Yao Qi <yao@codesourcery.com>
9789
9790 * tracepoint.c: Include inttypes.h.
9791 (struct collect_memory_action): Use sized types.
9792 (struct tracepoint): Likewise.
9793 (cmd_qtdp, stop_tracing): Update print specifiers.
9794 (cmd_qtp, response_tracepoint): Likewise.
9795 (collect_data_at_tracepoint): Likewise.
9796 (collect_data_at_step): Likewise.
9797
9798 2012-04-14 Yao Qi <yao@codesourcery.com>
9799
9800 Import gnulib module inttypes.
9801 * aclocal.m4, config.in, configure: Regenerated.
9802
9803 2012-04-14 Yao Qi <yao@codesourcery.com>
9804
9805 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9806 Makefile and config.status at last.
9807
9808 2012-04-13 Yao Qi <yao@codesourcery.com>
9809
9810 * tracepoint.c: Include stdint.h unconditionally.
9811
9812 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9813
9814 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9815 on BFD_HAVE_SYS_PROCFS_TYPE.
9816 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9817 * configure: Regenerate.
9818 * config.in: Likewise.
9819
9820 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9821
9822 * Makefile.in (clean): Also remove x32.c x32-linux.c
9823 x32-avx.c x32-avx-linux.c.
9824 (x32.o): New target.
9825 (x32.c): Likewise.
9826 (x32-linux.o): Likewise.
9827 (x32-linux.c): Likewise.
9828 (x32-avx.o): Likewise.
9829 (x32-avx.c): Likewise.
9830 (x32-avx-linux.o): Likewise.
9831 (x32-avx-linux.c): Likewise.
9832
9833 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9834 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9835 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9836 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9837 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9838 i386/x32-avx-linux.xml.
9839
9840 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9841 (init_registers_x32_avx_linux): Likwise.
9842 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9843 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9844
9845 2012-04-13 Pedro Alves <palves@redhat.com>
9846
9847 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9848 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9849 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9850 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9851 the sub-make.
9852
9853 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9854
9855 * linux-x86-low.c (compat_x32_clock_t): New.
9856 (compat_x32_siginfo_t): Likewise.
9857 (compat_x32_siginfo_from_siginfo): Likewise.
9858 (siginfo_from_compat_x32_siginfo): Likewise.
9859 (linux_is_elf64): Likewise.
9860 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9861 and siginfo_from_compat_x32_siginfo for x32.
9862 (x86_arch_setup): Set linux_is_elf64.
9863
9864 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9865
9866 PR gdb/13969
9867 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9868 e_machine field.
9869 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9870 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9871 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9872 compatible with process.
9873
9874 2012-04-12 Yao Qi <yao@codesourcery.com>
9875
9876 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9877 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9878 (install-only, install-info, clean): Handle sub dir gnulib.
9879 (all-lib, am--refresh): New targets.
9880 (memmem.o): Remove target.
9881 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9882 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9883 (AC_REPLACE_FUNCS): Remove memmem.
9884 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9885 (AC_OUTPUT): Generate Makefile in gnulib/.
9886 * aclocal.m4, config.in, configure: Regenerated.
9887
9888 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9889
9890 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9891
9892 2012-04-05 Pedro Alves <palves@redhat.com>
9893
9894 -Werror=strict-aliasing
9895
9896 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9897 pointer.
9898
9899 2012-04-04 Pedro Alves <palves@redhat.com>
9900
9901 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9902 (sparc_store_gregset_from_stack, sparc_store_gregset)
9903 (sparc_breakpoint_at): Fix formatting.
9904
9905 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9906
9907 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9908 are available.
9909 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9910 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9911 * config.in: Regenerate.
9912 * configure: Likewise.
9913
9914 2012-03-29 Pedro Alves <palves@redhat.com>
9915
9916 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9917 Correct ptrace arguments.
9918
9919 2012-03-28 Pedro Alves <palves@redhat.com>
9920
9921 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9922 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9923 (IA64_FR1_REGNUM): New defines.
9924 (ia64_fetch_register): New.
9925 (the_low_target): Install it.
9926 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9927 field.
9928 * linux-low.c (linux_fetch_registers): Try the
9929 the_low_target.fetch_register hook first.
9930
9931 * linux-arm-low.c (the_low_target): Adjust.
9932 * linux-bfin-low.c (the_low_target): Adjust.
9933 * linux-cris-low.c (the_low_target): Adjust.
9934 * linux-crisv32-low.c (the_low_target): Adjust.
9935 * linux-m32r-low.c (the_low_target): Adjust.
9936 * linux-m68k-low.c (the_low_target): Adjust.
9937 * linux-mips-low.c (the_low_target): Adjust.
9938 * linux-ppc-low.c (the_low_target): Adjust.
9939 * linux-s390-low.c (the_low_target): Adjust.
9940 * linux-sh-low.c (the_low_target): Adjust.
9941 * linux-sparc-low.c (the_low_target): Adjust.
9942 * linux-tic6x-low.c (the_low_target): Adjust.
9943 * linux-x86-low.c (the_low_target): Adjust.
9944 * linux-xtensa-low.c (the_low_target): Adjust.
9945
9946 2012-03-26 Pedro Alves <palves@redhat.com>
9947
9948 * server.c (handle_qxfer_libraries): Don't bail early if
9949 the_target->qxfer_libraries_svr4 is not NULL.
9950
9951 2012-03-26 Pedro Alves <palves@redhat.com>
9952
9953 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9954
9955 2012-03-23 Pedro Alves <palves@redhat.com>
9956
9957 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9958 "library-list-svr4" element's start tag when the the DSO list is
9959 empty.
9960
9961 2012-03-23 Pedro Alves <palves@redhat.com>
9962
9963 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9964 a variable whose type size is the same as the inferior's pointer
9965 size.
9966
9967 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9968
9969 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9970 struct siginfo.
9971 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9972 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9973 * linux-low.h: Include <signal.h>.
9974 (struct siginfo): Remove forward declaration.
9975 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9976 struct siginfo.
9977
9978 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9979
9980 * .gitignore: Ignore more files.
9981
9982 2012-03-19 Pedro Alves <palves@redhat.com>
9983 Jan Kratochvil <jan.kratochvil@redhat.com>
9984
9985 * server.c (cont_thread, general_thread): Add describing comments.
9986 (start_inferior): Clear `cont_thread'.
9987 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9988 of a process.
9989
9990 2012-03-15 Yao Qi <yao@codesourcery.com>
9991
9992 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9993 handling to ...
9994 (cmd_qtdp): ... here.
9995
9996 2012-03-15 Yao Qi <yao@codesourcery.com>
9997
9998 * tracepoint.c (struct tracepoint_action_ops): New.
9999 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10000 (m_tracepoint_action_download): New.
10001 (r_tracepoint_action_download): New.
10002 (x_tracepoint_action_download): New.
10003 (l_tracepoint_action_download): New.
10004 (add_tracepoint_action): Install `action->ops' according type.
10005 (download_tracepoint_1): Move code `download' function pointer
10006 of various tracepoint_action_ops.
10007
10008 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10009
10010 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10011 linux_ptrace_attach_warnings.
10012
10013 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10014
10015 * Makefile.in (linux-ptrace.o): New.
10016 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10017 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10018 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10019 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10020 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10021 of these targets.
10022 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10023
10024 2012-03-08 Yao Qi <yao@codesourcery.com>
10025 Pedro Alves <palves@redhat.com>
10026
10027 Fix PR server/13392.
10028 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10029 offset of JMP insn.
10030 * tracepoint.c (remove_tracepoint): New.
10031 (cmd_qtdp): Call remove_tracepoint when failed to install.
10032
10033 2012-03-07 Pedro Alves <palves@redhat.com>
10034
10035 * linux-low.c (get_detach_signal): New.
10036 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10037 Pass on pending signals to PTRACE_DETACH. Check the result of the
10038 ptrace call.
10039 * server.c (program_signals, program_signals_p): New.
10040 (handle_general_set): Handle QProgramSignals.
10041 * server.h (program_signals, program_signals_p): Declare.
10042
10043 2012-03-05 Pedro Alves <palves@redhat.com>
10044 Jan Kratochvil <jan.kratochvil@redhat.com>
10045
10046 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10047 New comment why.
10048
10049 2012-03-03 Yao Qi <yao@codesourcery.com>
10050
10051 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10052 agent_look_up_symbols.
10053
10054 2012-03-03 Yao Qi <yao@codesourcery.com>
10055
10056 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10057 (linux-x86-low.o): Likewise.
10058 * server.h: Remove in_process_agent_loaded.
10059 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10060 common/agent.c.
10061 Update callers.
10062
10063 2012-03-03 Yao Qi <yao@codesourcery.com>
10064
10065 * tracepoint.c (gdb_agent_capability): New global.
10066 (in_process_agent_loaded_ust): Renamed to
10067 `in_process_agent_supports_ust'.
10068 Update callers.
10069 (in_process_agent_supports_ust): Call agent_capability_check.
10070 (clear_installed_tracepoints): Assert that agent supports
10071 agent.
10072
10073 2012-03-03 Yao Qi <yao@codesourcery.com>
10074
10075 * linux-low.c (linux_supports_agent): New.
10076 (linux_target_ops): Initialize field `supports_agent' with
10077 linux_supports_agent.
10078 * target.h (struct target_ops) <supports_agent>: New.
10079 (target_supports_agent): New macro.
10080 * server.c (handle_general_set): Handle packet 'QAgent'.
10081 (handle_query): Send `QAgent+'.
10082 * Makefile.in (server.o): Depends on agent.h.
10083
10084 2012-03-03 Yao Qi <yao@codesourcery.com>
10085
10086 * Makefile.in (OBS): Add agent.o.
10087 Add new rule for agent.o.
10088 Track dependence of tracepoint.c on agent.h.
10089 * tracepoint.c (run_inferior_command_1):
10090 (run_inferior_command): Call agent_run_command.
10091 (gdb_ust_connect_sync_socket): Deleted. Move it to
10092 common/agent.c.
10093 (resume_thread, stop_thread): Likewise.
10094 (gdb_ust_socket_init): Renamed to ...
10095 (gdb_agent_socket_init): ... New.
10096 (gdb_ust_thread): Renamed to ...
10097 (gdb_agent_helper_thread): ... New.
10098 (gdb_ust_init): Move some code to ...
10099 (gdb_agent_init): ... here. New.
10100 [HAVE_UST]: Call gdb_ust_init.
10101 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10102 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10103 * config.in, configure: Regenerated.
10104
10105 2012-03-02 Pedro Alves <palves@redhat.com>
10106
10107 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10108 * linux-low.c (struct simple_pid_list): New.
10109 (stopped_pids): New a struct simple_pid_list pointer.
10110 (add_to_pid_list, pull_pid_from_list): New.
10111 (handle_extended_wait): Don't assume the first signal new children
10112 report is SIGSTOP. Adjust call to pull_pid_from_list.
10113 (linux_wait_for_lwp): Adjust.
10114
10115 2012-03-02 Yao Qi <yao@codesourcery.com>
10116
10117 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10118 debug log.
10119
10120 2012-03-02 Yao Qi <yao@codesourcery.com>
10121
10122 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10123 `stop_pc' and `tpoint'. Update caller.
10124
10125 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10126
10127 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10128 * linux-low.c (use_linux_regsets): New macro.
10129 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10130 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10131 (linux_register_in_regsets): New function.
10132 (usr_fetch_inferior_registers): Skip registers covered by
10133 regsets.
10134 (usr_store_inferior_registers): Likewise.
10135 (usr_fetch_inferior_registers): New macro.
10136 (usr_store_inferior_registers): Likewise.
10137 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10138 (linux_store_registers): Likewise.
10139 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10140 prototype.
10141 (init_registers_mips64_dsp_linux): Likewise.
10142 (init_registers_mips_linux): New macro.
10143 (init_registers_mips_dsp_linux): Likewise.
10144 (mips_dsp_num_regs): Likewise.
10145 (DSP_BASE, DSP_CONTROL): New fallback macros.
10146 (mips_base_regs): New macro.
10147 (mips_regmap): Use it. Fix the size.
10148 (mips_dsp_regmap): New variable.
10149 (mips_dsp_regset_bitmap): Likewise.
10150 (mips_arch_setup): New function.
10151 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10152 than mips_regmap.
10153 (mips_cannot_store_register): Likewise.
10154 (the_low_target): Update .arch_setup, .num_regs and .regmap
10155 initializers. Add .regset_bitmap initializer.
10156 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10157 initializer.
10158 * linux-bfin-low.c (the_low_target): Likewise.
10159 * linux-cris-low.c (the_low_target): Likewise.
10160 * linux-crisv32-low.c (the_low_target): Likewise.
10161 * linux-ia64-low.c (the_low_target): Likewise.
10162 * linux-m32r-low.c (the_low_target): Likewise.
10163 * linux-m68k-low.c (the_low_target): Likewise.
10164 * linux-ppc-low.c (the_low_target): Likewise.
10165 * linux-s390-low.c (the_low_target): Likewise.
10166 * linux-sh-low.c (the_low_target): Likewise.
10167 * linux-sparc-low.c (the_low_target): Likewise.
10168 * linux-tic6x-low.c (the_low_target): Likewise.
10169 * linux-x86-low.c (the_low_target): Likewise.
10170 * linux-xtensa-low.c (the_low_target): Likewise.
10171 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10172 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10173 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10174 srv_xmlfiles.
10175 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10176 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10177
10178 2012-02-29 Yao Qi <yao@codesourcery.com>
10179 Pedro Alves <palves@redhat.com>
10180
10181 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10182 `step_over_finished' is true.
10183
10184 2012-02-27 Pedro Alves <palves@redhat.com>
10185
10186 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10187 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10188
10189 2012-02-27 Pedro Alves <palves@redhat.com>
10190
10191 PR server/9684
10192 * linux-low.c (pid_is_stopped): New.
10193 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10194
10195 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10196
10197 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10198 of conditions.
10199
10200 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10201
10202 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10203
10204 2012-02-24 Luis Machado <lgustavo@codesourcery>
10205
10206 * server.c (handle_query): Advertise support for target-side
10207 breakpoint condition evaluation.
10208 (process_point_options): New function.
10209 (process_serial_event): When inserting a breakpoint, check for
10210 a target-side condition that should be evaluated.
10211
10212 * mem-break.c: Include regcache.h and ax.h.
10213 (point_cond_list_t): New data structure.
10214 (breakpoint) <cond_list>: New field.
10215 (find_gdb_breakpoint_at): Make non-static.
10216 (delete_gdb_breakpoint_at): Clear any target-side
10217 conditions.
10218 (clear_gdb_breakpoint_conditions): New function.
10219 (add_condition_to_breakpoint): Likewise.
10220 (add_breakpoint_condition): Likewise.
10221 (gdb_condition_true_at_breakpoint): Likewise.
10222 (gdb_breakpoint_here): Return result directly instead
10223 of going through a local variable.
10224
10225 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10226 (clear_gdb_breakpoint_conditions): Likewise.
10227 (add_breakpoint_condition): Likewise.
10228 (gdb_condition_true_at_breakpoint): Likewise.
10229
10230 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10231 (need_step_over_p): Take target-side breakpoint condition into
10232 consideration.
10233
10234 2012-02-24 Luis Machado <lgustavo@codesourcery>
10235
10236 * server.h: Include tracepoint.h.
10237 (agent_mem_read, agent_get_trace_state_variable_value,
10238 agent_set_trace_state_variable_value,
10239 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10240 get_set_tsv_func_addr): New prototypes.
10241
10242 * ax.h: New include file.
10243 * ax.c: New source file.
10244
10245 * tracepoint.c: Include ax.h.
10246 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10247 agent_expr, eval_result_type): Move to ax.h.
10248 (parse_agent_expr): Rename to ...
10249 (gdb_parse_agent_expr): ... this, make it non-static and move
10250 to ax.h.
10251 (unparse_agent_expr) Rename to ...
10252 (gdb_unparse_agent_expr): ... this, make it non-static and move
10253 to ax.h.
10254 (eval_agent_expr): Rename to ...
10255 (eval_tracepoint_agent_expr): ... this.
10256 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10257 forward declarations.
10258 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10259 (agent_get_trace_state_variable_value): New function.
10260 (agent_set_trace_state_variable_value): New function.
10261 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10262 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10263 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10264 (condition_true_at_tracepoint): Likewise.
10265 (parse_agent_expr): Rename to ...
10266 (gdb_parse_agent_expr): ... this and move to ax.c.
10267 (unparse_agent_expr): Rename to ...
10268 (gdb_unparse_agent_expr): ... this and move to ax.c.
10269 (gdb_agent_op_name): Move to ax.c.
10270 (eval_agent_expr): Rename to ...
10271 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10272 and move to ax.c.
10273 (eval_tracepoint_agent_expr): New function.
10274 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10275 non-static.
10276 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10277 ax.c.
10278 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10279 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10280 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10281 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10282 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10283 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10284 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10285 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10286 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10287 (compile_bytecodes): Remove forward declaration.
10288 (is_goto_target): Move to ax.c.
10289 (compile_bytecodes): Move to ax.c and call
10290 agent_get_trace_state_variable_value (...) and
10291 agent_set_trace_state_variable_value (...).
10292
10293 * Makefile.in: Update ax.c and IPA dependencies.
10294
10295 2012-02-24 Pedro Alves <palves@redhat.com>
10296
10297 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10298 (cmd_bigqtbuffer_circular): ... this. Only handle
10299 'QTBuffer:circular:'.
10300 (handle_tracepoint_general_set): Adjust.
10301
10302 2012-02-16 Yao Qi <yao@codesourcery.com>
10303
10304 * inferiors.c: Move code to ...
10305 * dll.c: .... here. New.
10306 * server.h: Declare clear_dlls.
10307 * Makefile.in (SFILES): Add dll.c.
10308 (OBS): Add dll.o
10309 (dll.o): New rule.
10310
10311 2012-02-11 Yao Qi <yao@codesourcery.com>
10312
10313 * server.c: (handle_monitor_command): Add a new parameter
10314 `own_buf'.
10315 (handle_query): Update caller.
10316
10317 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10318
10319 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10320 * configure, config.in: Regenerate.
10321 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10322 is not defined.
10323
10324 2012-02-02 Pedro Alves <palves@redhat.com>
10325
10326 Try SIGKILL first, then PTRACE_KILL.
10327 * linux-low.c (linux_kill_one_lwp): New.
10328 (linux_kill_one_lwp): Rename to ...
10329 (kill_one_lwp_callback): ... this. Use the new
10330 linux_kill_one_lwp.
10331
10332 2012-02-02 Pedro Alves <palves@redhat.com>
10333
10334 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10335 inferior.
10336
10337 2012-01-27 Pedro Alves <palves@redhat.com>
10338
10339 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10340 (elf_64_file_p): Make static.
10341 (linux_pid_exe_is_elf_64_file): New.
10342 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10343 Delete declarations.
10344 (linux_pid_exe_is_elf_64_file): Declare.
10345 * linux-x86-low.c (x86_arch_setup): Use
10346 linux_pid_exe_is_elf_64_file.
10347
10348 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10349
10350 * linux-low.c (linux_wait_for_event_1): Rename to ...
10351 (linux_wait_for_event): ... here and merge it with former
10352 linux_wait_for_event - new variable wait_ptid, use it.
10353 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10354
10355 2012-01-23 Pedro Alves <palves@redhat.com>
10356
10357 * server.c (main): Avoid yet another case of infinite loop while
10358 detaching/killing after a longjmp.
10359
10360 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10361
10362 Code cleanup.
10363 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10364
10365 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10366
10367 * hostio.c (handle_readlink): New function.
10368 (handle_vFile): Call it to handle "vFile:readlink" packets.
10369
10370 2012-01-20 Pedro Alves <palves@redhat.com>
10371 Ulrich Weigand <ulrich.weigand@linaro.org>
10372
10373 * server.c (handle_v_requests): Only support vAttach and vRun to
10374 start multiple processes when in extended protocol mode.
10375
10376 2012-01-17 Pedro Alves <palves@redhat.com>
10377
10378 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10379 memalign plus mprotect to allocate the scratch buffer.
10380
10381 2012-01-13 Pedro Alves <palves@redhat.com>
10382
10383 * server.c (attach_inferior): Clear `cont_thread'.
10384
10385 2012-01-13 Pedro Alves <palves@redhat.com>
10386
10387 * server.c (main): Avoid infinite loop while detaching/killing
10388 after a longjmp.
10389
10390 2012-01-09 Doug Evans <dje@google.com>
10391
10392 * server.c (start_inferior): Set last_ptid in --wrapper case.
10393
10394 2012-01-06 Yao Qi <yao@codesourcery.com>
10395
10396 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10397 defined.
10398 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10399
10400 2012-01-04 Yao Qi <yao@codesourcery.com>
10401
10402 * tracepoint.c (cmd_qtdp): Print debug message
10403 for static tracepoint.
10404
10405 2012-01-04 Yao Qi <yao@codesourcery.com>
10406
10407 * tracepoint.c (trace_vdebug): Differentiate debug message
10408 between gdbserver and IPA.
10409
10410 2012-01-03 Yao Qi <yao@codesourcery.com>
10411
10412 * tracepoint.c (tracepoint_was_hit): Don't collect for
10413 static tracepoint.
10414
10415 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10416
10417 * terminal.h: Reformat copyright header.
10418
10419 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10420
10421 * server.c (gdbserver_version): Update copyright year.
10422 * gdbreplay.c (gdbreplay_version): Likewise.
10423
10424 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10425
10426 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10427
10428 Revert:
10429 2011-12-18 Hui Zhu <teawater@gmail.com>
10430 * linux-low.c (linux_create_inferior): Save return value to ret.
10431
10432 2011-12-18 Hui Zhu <teawater@gmail.com>
10433
10434 * linux-low.c (linux_create_inferior): Save return value to ret.
10435
10436 2011-12-16 Doug Evans <dje@google.com>
10437
10438 * linux-low.c (linux_create_inferior): If stdio connection,
10439 redirect stdin from /dev/null, stdout to stderr.
10440 * remote-utils.c (remote_is_stdio): New static global.
10441 (remote_connection_is_stdio): New function.
10442 (remote_prepare): Handle stdio connection.
10443 (remote_open): Ditto.
10444 (remote_close): Don't close stdin for stdio connections.
10445 (read_prim,write_prim): New functions. Replace all calls to
10446 read/write to these.
10447 * server.c (main): Watch for "-" argument. Move call to
10448 remote_prepare before start_inferior.
10449 * server.h (STDIO_CONNECTION_NAME): New macro.
10450 (remote_connection_is_stdio): Declare.
10451
10452 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10453 in debugging output.
10454
10455 2011-12-15 Yao Qi <yao@codesourcery.com>
10456
10457 * tracepoint.c: Include sys/syscall.h.
10458 (gdb_ust_thread): Remove preprocessor conditional.
10459
10460 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-low.c (linux_detach_one_lwp): Call
10463 the_low_target.prepare_to_resume before detaching.
10464
10465 2011-12-14 Yao Qi <yao@codesourcery.com>
10466
10467 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10468 of write.
10469
10470 2011-12-14 Yao Qi <yao@codesourcery.com>
10471
10472 * i386-low.c (i386_low_stopped_data_address): Initialize local
10473 variable `control'.
10474
10475 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10476
10477 PR remote/13492
10478
10479 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10480 DR_CONTROL unless necessary. Extend comments.
10481 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10482 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10483
10484 2011-12-13 Yao Qi <yao@codesourcery.com>
10485
10486 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10487 macros.
10488 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10489
10490 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10491
10492 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10493 Print new debug message for such case.
10494
10495 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10496
10497 Fix overlapping memcpy.
10498 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10499 the read_inferior_memory transfer.
10500 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10501 write_inferior_memory transfer.
10502 (set_fast_tracepoint_jump): New variable buf. Use it for the
10503 read_inferior_memory and write_inferior_memory transfers.
10504 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10505 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10506 Use it for the write_inferior_memory transfer.
10507 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10508 buffers.
10509
10510 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10511
10512 * linux-low.c (fetch_register, store_register): Make code
10513 consistent, fix formatting.
10514
10515 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10516
10517 * linux-low.c (usr_store_inferior_registers): Factor out code
10518 to handle individual registers into...
10519 (store_register): ... this new function.
10520
10521 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10522
10523 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10524 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10525 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10526 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10527 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10528 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10529 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10530 (srv_xmlfiles): Add new XML files.
10531
10532 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10533 and <sys/uio.h>.
10534 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10535 (init_registers_s390_linux32v1): Add prototype.
10536 (init_registers_s390_linux32v2): Likewise.
10537 (init_registers_s390_linux64v1): Likewise.
10538 (init_registers_s390_linux64v2): Likewise.
10539 (init_registers_s390x_linux64v1): Likewise.
10540 (init_registers_s390x_linux64v2): Likewise.
10541 (s390_num_regs): Increment to 52.
10542 (s390_regmap): Add orig_r2 register.
10543 (s390_num_regs_3264): Increment to 68.
10544 (s390_regmap_3264): Add orig_r2 register.
10545 (s390_collect_ptrace_register): Handle orig_r2 register.
10546 (s390_supply_ptrace_register): Likewise.
10547 (s390_fill_last_break): New function.
10548 (s390_store_last_break): Likewise.
10549 (s390_fill_system_call): New function.
10550 (s390_store_system_call): Likewise.
10551 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10552 register sets.
10553 (s390_check_regset): New function.
10554 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10555 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10556 Update target_regsets for available register sets.
10557
10558 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10559 Jan Kratochvil <jan.kratochvil@redhat.com>
10560
10561 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10562 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10563 New.
10564 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10565 * linux-low.h (struct process_info_private): New member r_debug.
10566 * server.c (handle_qxfer_libraries): Call
10567 the_target->qxfer_libraries_svr4.
10568 (handle_qxfer_libraries_svr4): New function.
10569 (qxfer_packets): New entry "libraries-svr4".
10570 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10571 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10572 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10573 PACKET_qXfer_libraries_svr4.
10574
10575 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10576
10577 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10578 PSW address/mask between 8-byte and 16-byte formats.
10579 (s390_supply_ptrace_register): Likewise.
10580 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10581 basic addressing mode bit.
10582
10583 2011-11-24 Stan Shebs <stan@codesourcery.com>
10584
10585 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10586
10587 2011-11-17 Stan Shebs <stan@codesourcery.com>
10588
10589 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10590 (tracing_start_time): New global.
10591 (tracing_stop_time): New global.
10592 (tracing_user_name): New global.
10593 (tracing_notes): New global.
10594 (tracing_stop_note): New global.
10595 (cmd_qtstart): Set traceframe_usage, start_time.
10596 (stop_tracing): Set stop_time.
10597 (cmd_qtstatus): Report additional status.
10598 (cmd_qtp): New function.
10599 (handle_tracepoint_query): Call it.
10600 (cmd_qtnotes): New function.
10601 (handle_tracepoint_general_set): Call it.
10602 (get_timestamp): Rename from tsv_get_timestamp.
10603
10604 2011-11-14 Stan Shebs <stan@codesourcery.com>
10605 Kwok Cheung Yeung <kcy@codesourcery.com>
10606
10607 * linux-x86-low.c (small_jump_insn): New.
10608 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10609 trampoline and error message, build a trampoline and issue a small
10610 jump instruction to it.
10611 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10612 trampoline and error message.
10613 (x86_get_min_fast_tracepoint_insn_len): New.
10614 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10615 * linux-low.h (struct linux_target_ops): Add arguments to
10616 install_fast_tracepoint_jump_pad operation, add new operation.
10617 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10618 arguments.
10619 (linux_get_min_fast_tracepoint_insn_len): New function.
10620 (linux_target_op): Add new operation.
10621 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10622 (gdb_trampoline_buffer_end): Ditto.
10623 (gdb_trampoline_buffer_error): Ditto.
10624 (struct ipa_sym_addresses): Add fields for new IPA variables.
10625 (symbol_list): Add entries for new IPA variables.
10626 (struct tracepoint): Add fields to hold the address range of the
10627 trampoline used by the tracepoint.
10628 (trampoline_buffer_head): New static variable.
10629 (trampoline_buffer_tail): Ditto.
10630 (claim_trampoline_space): New function.
10631 (have_fast_tracepoint_trampoline_buffer): New function.
10632 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10633 structure.
10634 (install_fast_tracepoint): Ditto, also add error buffer argument.
10635 (cmd_qtminftpilen): New function.
10636 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10637 (fast_tracepoint_from_trampoline_address): New function.
10638 (fast_tracepoint_collecting): Handle trampoline as part of jump
10639 pad space.
10640 (set_trampoline_buffer_space): New function.
10641 (initialize_tracepoint): Initialize new IPA variables.
10642 * target.h (struct target_ops): Add arguments to
10643 install_fast_tracepoint_jump_pad operation, add new
10644 get_min_fast_tracepoint_insn_len operation.
10645 (target_get_min_fast_tracepoint_insn_len): New.
10646 (install_fast_tracepoint_jump_pad): Add arguments.
10647 * server.h (IPA_BUFSIZ): Define.
10648 * linux-i386-ipa.c: Include extra header files.
10649 (initialize_fast_tracepoint_trampoline_buffer): New function.
10650 (initialize_low_tracepoint): Call it.
10651 * server.h (set_trampoline_buffer_space): Declare.
10652 (claim_trampoline_space): Ditto.
10653 (have_fast_tracepoint_trampoline_buffer): Ditto.
10654
10655 2011-11-14 Yao Qi <yao@codesourcery.com>
10656
10657 * server.c (handle_query): Handle InstallInTrace for qSupported.
10658 * tracepoint.c (add_tracepoint): Sort list.
10659 (install_tracepoint, download_tracepoint): New.
10660 (cmd_qtdp): Call them to install and download tracepoints.
10661 (sort_tracepoints): Removed.
10662 (cmd_qtstart): Update.
10663
10664 2011-11-14 Yao Qi <yao@codesourcery.com>
10665
10666 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10667 * mem-break.h: Declare.
10668 * tracepoint.c (cmd_qtstart): Move some code to ...
10669 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10670 New.
10671 (download_tracepoints): Move some code to ...
10672 (download_tracepoint_1): ... here. New.
10673
10674 2011-11-08 Yao Qi <yao@codesourcery.com>
10675
10676 * remote-utils.c (relocate_instruction): A comment fix.
10677
10678 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10679
10680 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10681 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10682 dr_status_mirror and dr_control_mirror from debug_reg_state.
10683 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10684 (i386_initial_stuff): Remove use of deleted globals.
10685 (i386_get_thread_context, i386_set_thread_context,
10686 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10687 from debug_reg_state.
10688
10689 2011-11-05 Yao Qi <yao@codesourcery.com>
10690
10691 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10692 address as TPOINT's.
10693
10694 2011-11-02 Stan Shebs <stan@codesourcery.com>
10695
10696 * tracepoint.c (agent_mem_read_string): New function.
10697 (eval_agent_expr): Call it for tracenz.
10698 * server.c (handle_query): Report support for tracenz.
10699
10700 2011-11-02 Yao Qi <yao@codesourcery.com>
10701
10702 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10703
10704 2011-11-02 Yao Qi <yao@codesourcery.com>
10705
10706 * target.h: Fix a typo in comment.
10707
10708 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10709
10710 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10711 clobber the breakpoints' shadows with fast tracepoint jumps.
10712 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10713 * target.c (write_inferior_memory): Also pass MYADDR down to
10714 check_mem_write.
10715
10716 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10717
10718 * configure.ac: Check support for personality routine.
10719 * configure: Regenerate.
10720 * config.in: Likewise.
10721 * linux-low.c: Include <sys/personality.h>.
10722 Define ADDR_NO_RANDOMIZE if necessary.
10723 (linux_create_inferior): Disable address space randomization when
10724 forking inferior, if requested.
10725 (linux_supports_disable_randomization): New function.
10726 (linux_target_ops): Install it.
10727 * server.h (disable_randomization): Declare.
10728 * server.c (disable_randomization): New global variable.
10729 (handle_general_set): Handle QDisableRandomization.
10730 (handle_query): Likewise for qSupported.
10731 (main): Support --disable-randomization and --no-disable-randomization
10732 command line arguments.
10733 * target.h (struct target_ops): Add supports_disable_randomization.
10734 (target_supports_disable_randomization): New macro.
10735
10736 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10737
10738 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10739 ifdef check.
10740 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10741 [!PT_GETDSBT] (target_loadmap): New definition.
10742 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10743 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10744 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10745 and PT_GETDSBT to LINUX_LOADMAP.
10746 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10747 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10748
10749 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10750
10751 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10752 (arm_linux_hwbp_cap): New static variable.
10753 (arm_linux_get_hwbp_cap): Replace by ...
10754 (arm_linux_init_hwbp_cap): ... this new function.
10755 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10756 (arm_linux_get_hw_watchpoint_count): Likewise.
10757 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10758 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10759 (arm_prepare_to_resume): Use perror_with_name instead of error.
10760
10761 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10762
10763 * linux-arm-low.c: Include <signal.h>.
10764 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10765 (struct arm_linux_hwbp_cap): New data type.
10766 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10767 (struct arm_linux_hw_breakpoint): New data type.
10768 (MAX_BPTS, MAX_WPTS): Define.
10769 (struct arch_process_info, struct arch_lwp_info): New data types.
10770 (arm_linux_get_hwbp_cap): New function.
10771 (arm_linux_get_hw_breakpoint_count): Likewise.
10772 (arm_linux_get_hw_watchpoint_count): Likewise.
10773 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10774 (arm_hwbp_control_initialize): Likewise.
10775 (arm_hwbp_control_is_enabled): Likewise.
10776 (arm_hwbp_control_is_initialized): Likewise.
10777 (arm_hwbp_control_disable): Likewise.
10778 (arm_linux_hw_breakpoint_equal): Likewise.
10779 (arm_linux_hw_point_initialize): Likewise.
10780 (struct update_registers_data): New data structure.
10781 (update_registers_callback: New function.
10782 (arm_insert_point): Likewise.
10783 (arm_remove_point): Likewise.
10784 (arm_stopped_by_watchpoint): Likewise.
10785 (arm_stopped_data_address): Likewise.
10786 (arm_new_process): Likewise.
10787 (arm_new_thread): Likewise.
10788 (arm_prepare_to_resume): Likewise.
10789 (the_low_target): Register arm_insert_point, arm_remove_point,
10790 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10791 arm_new_thread, and arm_prepare_to_resume.
10792
10793 2011-09-15 Stan Shebs <stan@codesourcery.com>
10794
10795 * server.h (struct emit_ops): Add compare-goto fields.
10796 * tracepoint.c (gdb_agent_op_sizes): New table.
10797 (emit_eq_goto): New function.
10798 (emit_ne_goto): New function.
10799 (emit_lt_goto): New function.
10800 (emit_le_goto): New function.
10801 (emit_gt_goto): New function.
10802 (emit_ge_goto): New function.
10803 (is_goto_target): New function.
10804 (compile_bytecodes): Recognize special cases of compare-goto
10805 combinations and call specialized emitters for them.
10806 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10807 (amd64_emit_ne_goto): New function.
10808 (amd64_emit_lt_goto): New function.
10809 (amd64_emit_le_goto): New function.
10810 (amd64_emit_gt_goto): New function.
10811 (amd64_emit_ge_goto): New function.
10812 (amd64_emit_ops): Add the new functions.
10813 (i386_emit_eq_goto): New function.
10814 (i386_emit_ne_goto): New function.
10815 (i386_emit_lt_goto): New function.
10816 (i386_emit_le_goto): New function.
10817 (i386_emit_gt_goto): New function.
10818 (i386_emit_ge_goto): New function.
10819 (i386_emit_ops): Add the new functions.
10820
10821 2011-09-08 Stan Shebs <stan@codesourcery.com>
10822
10823 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10824 (i386_emit_epilogue): Restore %ebx.
10825
10826 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10827
10828 * server.c (step_thread): Remove definition.
10829 (process_serial_event): Don't handle Hs.
10830 * server.h (step_thread): Remove declaration.
10831 * target.c (set_desired_inferior): Remove use of step_thread.
10832
10833 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10834
10835 * linux-low.c: Include linux-procfs.h.
10836 (linux_attach_lwp_1): Update comments.
10837 (linux_attach): Scan for existing threads when attaching to a
10838 process that is the tgid.
10839 * Makefile.in: Update dependencies.
10840
10841 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10842
10843 * configure.srv: Add linux-procfs.o dependencies.
10844
10845 2011-08-14 Yao Qi <yao@codesourcery.com>
10846
10847 * target.h (struct target_ops): Fix indent.
10848 * win32-low.c (win32_target_ops): Fix comment.
10849
10850 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10851 Yao Qi <yao@codesourcery.com>
10852
10853 * Makefile.in (clean): Remove tic6x-*.c files.
10854 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10855 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10856 (tic6x-c64xp-linux.c): Likewise.
10857 * configure.srv: Add support for tic6x-*-uclinux.
10858 * linux-tic6x-low.c: New.
10859 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10860
10861 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10862 Yao Qi <yao@codesourcery.com>
10863
10864 * target.h (struct target_ops): Add read_loadmap.
10865 * linux-low.c (struct target_loadseg): New type.
10866 (struct target_loadmap): New type.
10867 (linux_read_loadmap): New function.
10868 (linux_target_ops): Add linux_read_loadmap.
10869 * server.c (handle_query): Support qXfer:fdpic:read packet.
10870 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10871 to NULL.
10872
10873 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10874
10875 * win32-low.c: Include <stdint.h>.
10876
10877 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10878
10879 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10880 to the inferior here.
10881 (i386_remove_aligned_watchpoint): Ditto.
10882 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10883 fit part of the watchpoint in the debug registers.
10884 (i386_update_inferior_debug_regs): New.
10885 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10886 registers, and only update the inferior on success.
10887 (i386_low_remove_watchpoint): Ditto.
10888
10889 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10890
10891 * linux-low.c (compare_ints, unique, list_threads, show_process,
10892 linux_core_of_thread): Delete.
10893 (linux_target_ops): Change linux_core_of_thread to
10894 linux_common_core_of_thread.
10895 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10896 * utils.c (malloc_failure): Change type of argument.
10897 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10898 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10899 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10900 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10901 (IPA_OBJS): Add common-utils-ipa.o.
10902 (ptid_h, linux_osdata_h): New macros.
10903 (server_h): Add common/common-utils.h, common/xml-utils.h,
10904 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10905 common/ptid.h.
10906 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10907 ptid.o, buffer.o): New rules.
10908 (linux-low.o): Add common/linux-osdata.h as a dependency.
10909 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10910 * configure.ac: Add AC_HEADER_DIRENT check.
10911 * config.in: Regenerate.
10912 * configure: Regenerate.
10913 * remote-utils.c (xml_escape_text): Delete.
10914 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10915 buffer_xml_printf): Move to common/buffer.c.
10916 * server.c (main): Remove call to initialize_inferiors.
10917 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10918 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10919 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10920 internal_error, gdb_assert, gdb_assert_fail): Delete.
10921 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10922 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10923 common/buffer.h.
10924 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10925 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10926 initialize_inferiors): Delete.
10927
10928 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10929
10930 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10931 symbol error.
10932
10933 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10934
10935 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10936 assertion.
10937 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10938
10939 2011-05-26 Yao Qi <yao@codesourcery.com>
10940
10941 * Makefile.in (thread-db.o): Track dependence to
10942 common/gdb_thread_db.h.
10943 * thread-db.c: include gdb_thread_db.h from right place.
10944
10945 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10946
10947 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10948 __FILE__ and __LINE__ to internal_error.
10949
10950 2011-05-13 Doug Evans <dje@google.com>
10951
10952 * thread-db.c (try_thread_db_load_from_sdir): New function.
10953 (try_thread_db_load_from_dir): New function.
10954 (thread_db_load_search): Handle $sdir, ignore $pdir.
10955 Remove trying of system directories if search of
10956 libthread-db-search-path fails, that is now done via $sdir.
10957
10958 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10959
10960 * server.c (handle_query): Add EnableDisableTracepoints to the list
10961 of supported features.
10962 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10963 tracepoints.
10964 (cmd_qtenable_disable): New.
10965 (cmd_qtstart): Install tracepoints even if disabled.
10966 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10967 receiving a QTEnable or QTDisable packet.
10968 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10969 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10970 tracepoints.
10971 (gdb_probe): Skip data collection if static tracepoint is disabled.
10972
10973 2011-05-10 Doug Evans <dje@google.com>
10974
10975 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10976
10977 2011-05-04 Doug Evans <dje@google.com>
10978
10979 * linux-low.c (linux_join): Skip process lookup.
10980 * spu-low.c (spu_join): Ditto.
10981 * server.c (join_inferiors_callback): Delete.
10982 (process_serial_event): For 'D' packet (detach) call join_inferior
10983 directly.
10984
10985 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10986
10987 * README: Don't mention xscale*-*-linux*.
10988 * configure.srv (xscale*-*-linux*): Don't handle target.
10989
10990 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10991
10992 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10993 casting pointers.
10994 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10995 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10996 (i386_emit_void_call_2): Likewise.
10997
10998 2011-04-26 Yao Qi <yao@codesourcery.com>
10999
11000 * linux-low.c: Move common macros to linux-ptrace.h.
11001 Include linux-ptrace.h.
11002 * Makefile.in (linux_ptrace_h): New.
11003 (linux-low.o): Depends on linux-ptrace.h.
11004
11005 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11006
11007 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11008 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11009 (remote_prepare): New function with most of the TCP code from ...
11010 (remote_open): ... here. Detect PORT here unconditionally. Move also
11011 setting transport_is_reliable.
11012 * server.c (run_once): New variable.
11013 (gdbserver_usage): Document it.
11014 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11015 the first run if RUN_ONCE.
11016 * server.h (run_once, remote_prepare): New declarations.
11017
11018 2011-04-19 Tom Tromey <tromey@redhat.com>
11019
11020 * win32-low.c (handle_load_dll): Remove duplicate "the".
11021
11022 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11023
11024 Remove support for old Cygwin 1.5 versions.
11025 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11026 function to avoid warning.
11027 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11028 warning.
11029
11030 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11031
11032 * gdbserver/server.h (Macro _): Define it if not available.
11033
11034 2011-03-14 Michael Snyder <msnyder@vmware.com>
11035
11036 * hostio.c (handle_close): Remove unnecessary null test.
11037
11038 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11039
11040 * Makefile.in (maintainer-clean realclean distclean): Remove
11041 "make ... subdir_do" command.
11042
11043 2011-03-10 Michael Snyder <msnyder@vmware.com>
11044
11045 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11046
11047 * server.c (handle_v_run): Free alloced buffer on early return.
11048
11049 2011-03-09 Yao Qi <yao@codesourcery.com>
11050
11051 Revert:
11052 2011-03-04 Yao Qi <yao@codesourcery.com>
11053
11054 * Makefile.in: Remove GNU make feature --directory.
11055
11056 2011-03-05 Yao Qi <yao@codesourcery.com>
11057
11058 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11059 (subdir_do): New make target. Copied from gdb/Makefile.
11060 (maintainer-clean, realclean, distclean, clean): Call corresponding
11061 make targets in common/Makefile.
11062
11063 2011-02-11 Yao Qi <yao@codesourcery.com>
11064
11065 * configure.ac: Call AC_PROG_RANLIB.
11066 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11067 * configure: Regenerate.
11068
11069 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11070
11071 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11072
11073 2011-03-06 Yao Qi <yao@codesourcery.com>
11074
11075 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11076
11077 2011-03-05 Yao Qi <yao@codesourcery.com>
11078
11079 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11080 (subdir_do): New make target. Copied from gdb/Makefile.
11081 (maintainer-clean, realclean, distclean, clean): Call corresponding
11082 make targets in common/Makefile.
11083
11084 2011-03-04 Yao Qi <yao@codesourcery.com>
11085
11086 * Makefile.in: Remove GNU make feature --directory.
11087
11088 2011-03-04 Michael Snyder <msnyder@vmware.com>
11089
11090 * server.c (queue_stop_reply): Call xmalloc not malloc.
11091
11092 2011-03-02 Michael Snyder <msnyder@vmware.com>
11093
11094 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11095
11096 2011-02-28 Michael Snyder <msnyder@vmware.com>
11097
11098 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11099 (cmd_qtframe): Ditto.
11100 (cmd_qtbuffer): Ditto.
11101 (cmd_bigqtbuffer): Ditto.
11102
11103 * utils.c (decimal2str): Initialize 'width' to nine, then
11104 don't mess with it.
11105
11106 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11107
11108 * hostio.c (require_data): Free *data, not data.
11109
11110 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11111
11112 * hostio.c (require_data): Use free, not xfree.
11113
11114 2011-02-27 Michael Snyder <msnyder@vmware.com>
11115
11116 * server.c (handle_query): Discard unused value.
11117
11118 * hostio.c (require_data): Free malloc memory before returning
11119 error.
11120
11121 2011-02-26 Michael Snyder <msnyder@vmware.com>
11122
11123 * linux-low.c (list_threads): Call closedir for dirent.
11124
11125 2011-02-27 Michael Snyder <msnyder@vmware.com>
11126
11127 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11128 a case statement falls through.
11129
11130 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11131
11132 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11133 in comparison.
11134
11135 2011-02-26 Michael Snyder <msnyder@vmware.com>
11136
11137 * utils.c (decimal2str): Eliminate dead code and dead param.
11138 (pulongest): Drop dead param from call to decimal2str.
11139 (plongest): Ditto.
11140
11141 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11142
11143 Revert the following patch (not approved yet):
11144 2011-02-21 Hui Zhu <teawater@gmail.com>
11145 * tracepoint.c (tp_printf): New function.
11146 (eval_agent_expr): Handle gdb_agent_op_printf.
11147
11148 2011-02-21 Hui Zhu <teawater@gmail.com>
11149
11150 * tracepoint.c (tp_printf): New function.
11151 (eval_agent_expr): Handle gdb_agent_op_printf.
11152
11153 2011-02-18 Tom Tromey <tromey@redhat.com>
11154
11155 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11156 (tracepoint.o): Likewise.
11157 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11158 (gdb_agent_op_names): Likewise.
11159
11160 2011-02-18 Tom Tromey <tromey@redhat.com>
11161
11162 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11163 gdb_agent_op_rot>: New constants.
11164 (gdb_agent_op_names): Add pick and roll.
11165 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11166 cases.
11167
11168 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11169
11170 * aclocal.m4: Regenerated with aclocal-1.11.1.
11171
11172 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11173
11174 * server.c (handle_qxfer_traceframe_info): New.
11175 (qxfer_packets): Register "traceframe-info".
11176 (handle_query): Report support for qXfer:traceframe-info:read+.
11177 * tracepoint.c (match_blocktype): New.
11178 (traceframe_find_block_type): Rename to ...
11179 (traceframe_walk_blocks): ... this. Add callback filter argument,
11180 and use it.
11181 (traceframe_find_block_type): New, reimplemented on top of
11182 traceframe_walk_blocks.
11183 (build_traceframe_info_xml): New.
11184 (traceframe_read_info): New.
11185 * server.h (traceframe_read_info): Declare.
11186
11187 2011-02-11 Yao Qi <yao@codesourcery.com>
11188
11189 * configure.ac: Call AC_PROG_RANLIB.
11190 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11191 * configure: Regenerate.
11192
11193 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11194
11195 * server.c (gdb_read_memory): Change return semantics to allow
11196 partial transfers.
11197 (handle_search_memory_1): Adjust.
11198 (process_serial_event) <'m' packet>: Handle partial transfers.
11199 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11200
11201 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11202
11203 * regcache.c (init_register_cache): Initialize
11204 regcache->register_status.
11205 (free_register_cache): Release regcache->register_status.
11206 (regcache_cpy): Copy register_status.
11207 (registers_to_string): Print 'x's for unavailable registers.
11208 (supply_register): Mark the register's status valid or
11209 unavailable, depending on whether a buffer was passed in or not.
11210 (supply_register_zeroed): New.
11211 (supply_regblock): Mark the registers' status valid or
11212 unavailable, depending on whether a buffer was passed in or not.
11213 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11214 (struct regcache): New `register_status' field.
11215 (supply_register_zeroed): Declare.
11216 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11217 supply_register_zeroed, rather than passing a NULL buffer to
11218 supply_register.
11219 * tracepoint.c (fetch_traceframe_registers): Update comment.
11220
11221 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11222
11223 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11224 buffer explicit.
11225
11226 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11227
11228 * server.h (decode_xfer_write): Change prototype.
11229 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11230 and don't extract the annex here.
11231 * server.c (decode_xfer_read): Remove `annex' parameter,
11232 and don't extract the annex here.
11233 (decode_xfer): New.
11234 (struct qxfer): New.
11235 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11236 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11237 (handle_qxfer_statictrace): New functions, abstracted out from
11238 handle_query, and made to use the struct qxfer interface.
11239 (handle_threads_qxfer_proper): Rename to ...
11240 (handle_qxfer_threads_proper): ... this.
11241 (handle_threads_qxfer): Rename to ...
11242 (handle_qxfer_threads): ... this. Adjust.
11243 (qxfer_packets): New array.
11244 (handle_qxfer): New function.
11245 (handle_query): Use handle_qxfer.
11246
11247 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11248
11249 * gdbreplay.c: Shorten lines of >= 80 columns.
11250 * linux-low.c: Ditto.
11251 * linux-ppc-low.c: Ditto.
11252 * linux-s390-low.c: Ditto.
11253 * linux-sparc-low.c: Ditto.
11254 * linux-x86-low.c: Ditto.
11255 * linux-xtensa-low.c: Ditto.
11256 * mem-break.c: Ditto.
11257 * nto-low.c: Ditto.
11258 * regcache.h: Ditto.
11259 * remote-utils.c: Ditto.
11260 * server.c: Ditto.
11261 * server.h: Ditto.
11262 * thread-db.c: Ditto.
11263 * tracepoint.c: Ditto.
11264 * utils.c: Ditto.
11265 * win32-low.h: Ditto.
11266
11267 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11268
11269 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11270 update.
11271
11272 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11273
11274 * server.c (gdbserver_version): Update copyright year in version
11275 output.
11276 * gdbreplay.c (gdbreplay_version): Ditto.
11277
11278 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11279
11280 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11281 * linux-bfin-low.c: New file.
11282 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11283 PT_DATA_ADDR for BFIN targets.
11284 * Makefile.in (SFILES): Add linux-bfin-low.c.
11285 (clean): Remove reg-bfin.c.
11286 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11287 * README: Mention supported Blackfin targets.
11288
11289 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11290
11291 * .gitignore: New file.
11292
11293 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11294
11295 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11296
11297 2010-10-22 Jie Zhang <jie@codesourcery.com>
11298
11299 * Makefile.in: Add FLAGS_TO_PASS variable.
11300 (install): Remove dependency of install-only and recursively
11301 invoke make for install-only.
11302
11303 2010-10-04 Doug Evans <dje@google.com>
11304
11305 * Makefile.in (uninstall): Use $(DESTDIR).
11306
11307 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11308
11309 PR gdb/11842
11310
11311 * linux-x86-low.c (compat_siginfo_from_siginfo)
11312 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11313 si_code is < 0. Check for si_code == SI_TIMER before checking for
11314 si_code < 0.
11315
11316 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11317
11318 * lynx-i386-low.c: New file.
11319 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11320
11321 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11322
11323 * lynx-low.c (ptrace_request_to_str): Remove handling for
11324 request values that have been removed in LynxOS 5.x.
11325
11326 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11327
11328 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11329 <ptrace.h>
11330
11331 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11332
11333 * configure.ac: Add --enable-inprocess-agent option.
11334 * configure: Rebuilt.
11335
11336 2010-09-06 Yao Qi <yao@codesourcery.com>
11337
11338 * linux-low.c (linux_kill): Remove unused variable.
11339 (linux_stabilize_threads): Likewise.
11340 * server.c (start_inferior): Likewise.
11341 (queue_stop_reply_callback): Likewise.
11342 * tracepoint.c (do_action_at_tracepoint): Likewise.
11343
11344 2010-09-06 Yao Qi <yao@codesourcery.com>
11345
11346 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11347 on return.
11348
11349 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11350
11351 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11352
11353 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11354
11355 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11356 "$(IPA_DEPFILES)".
11357
11358 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11359
11360 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11361 gdbserver/lynx-ppc-low.c: New files.
11362 * Makefile.in (lynx_low_h): New variable.
11363 (lynx-low.o, lynx-ppc-low.o): New rules.
11364 * configure.ac: On LynxOS, link with -lnetinet.
11365 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11366 * configure: regenerate.
11367
11368 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11369
11370 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11371 * configure.ac: Add check for vasprintf and vsnprintf.
11372 * configure, config.in: Regenerate.
11373 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11374
11375 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11376
11377 * gdbreplay.c: Move include of alloca.h up, next to include of
11378 malloc.h.
11379 * server.h: Add include of malloc.h.
11380 * mem-break.c: Remove include of malloc.h.
11381 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11382
11383 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11384
11385 * Makefile.in (memmem.o): Build with -Wno-error.
11386
11387 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11388
11389 * utils.c (xsnprintf): Make non-static.
11390 * server.h: Add xsnprintf declaration.
11391 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11392 replace calls to snprintf by calls to xsnprintf throughout.
11393
11394 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11395
11396 * configure.ac: Add configure check for alloca.
11397 * configure, config.in: Regenerate.
11398 * server.h: Include alloca.h if it exists.
11399 * gdbreplay.c: Include alloca.h if it exists.
11400
11401 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11402
11403 * linux-low.c (__SIGRTMIN): Define if not already defined.
11404 (linux_create_inferior): Check for __ANDROID__ rather than
11405 __SIGRTMIN.
11406 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11407 are already deferred.
11408 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11409 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11410 stopped and already has a pending signal to report.
11411 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11412 a pending signal to report or is moving out of a jump pad.
11413 (linux_init_signals): Check for __ANDROID__ rather than
11414 __SIGRTMIN.
11415
11416 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11417
11418 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11419 debug_threads check. Avoid a linear search when not doing debug
11420 output.
11421
11422 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11423
11424 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11425 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11426 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11427 (process_event): Change local fd's type to gdb_fildes_t.
11428 (create_file_handler): Adjust prototype.
11429 (delete_file_handler): Adjust prototype.
11430 (handle_file_event): Adjust prototype. Use pfildes.
11431 (create_file_event): Adjsut prototype.
11432 * remote-utils.c (remote_desc, listen_desc): Change type to
11433 gdb_fildes_t.
11434 * server.h: New gdb_fildes_t typedef.
11435 [USE_WIN32API]: Include winsock2.h.
11436 (delete_file_handler, add_file_handler): Adjust prototypes.
11437 (pfildes): Declare.
11438 * utils.c (pfildes): New.
11439
11440 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11441
11442 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11443 * configure: Regenerate.
11444
11445 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11446
11447 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11448 (linux_done_accessing_memory): ... this.
11449 (linux_target_ops): Adjust.
11450 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11451 * nto-low.c (nto_target_ops): Adjust comment.
11452 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11453 * spu-low.c (spu_target_ops): Adjust comment.
11454 * target.h (target_ops): Rename unprepare_to_access_memory field
11455 to done_accessing_memory.
11456 (unprepare_to_access_memory): Rename to ...
11457 (done_accessing_memory): ... this.
11458
11459 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11460
11461 * linux-low.c (linux_prepare_to_access_memory): New.
11462 (linux_unprepare_to_access_memory): New.
11463 (linux_target_ops): Install them.
11464 * server.c (read_memory): Rename to ...
11465 (gdb_read_memory): ... this. Use
11466 prepare_to_access_memory/prepare_to_access_memory.
11467 (write_memory): Rename to ...
11468 (gdb_write_memory): ... this. Use
11469 prepare_to_access_memory/prepare_to_access_memory.
11470 (handle_search_memory_1): Adjust.
11471 (process_serial_event): Adjust.
11472 * target.h (struct target_ops): New fields
11473 prepare_to_access_memory and unprepare_to_access_memory.
11474 (prepare_to_access_memory, unprepare_to_access_memory): New.
11475 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11476 prepare_to_access_memory/prepare_to_access_memory.
11477 * nto-low.c (nto_target_ops): Adjust.
11478 * spu-low.c (spu_target_ops): Adjust.
11479 * win32-low.c (win32_target_ops): Adjust.
11480
11481 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11482
11483 * Makefile.in (WARN_CFLAGS): Get it from configure.
11484 (WERROR_CFLAGS): New.
11485 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11486 * configure.ac: Introduce --enable-werror, which adds -Werror to
11487 the compiler command line. Enabled by default. Disable with
11488 --disable-werror. Add -Wdeclaration-after-statement
11489 Wpointer-arith and -Wformat-nonliteral to warning flags.
11490 * configure: Regenerate.
11491
11492 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11493
11494 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11495
11496 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11497
11498 * gdbreplay.c (remote_error): New.
11499 (gdbchar): New.
11500 (expect): Use gdbchar. Check for error reading from GDB.
11501 Clarify sync error output.
11502 (play): Check for errors writing to GDB.
11503 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11504 * remote-utils.c (getpkt): Check for errors writing to the remote
11505 descriptor.
11506
11507 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11508
11509 * linux-low.c (linux_wait_1): Move non-debugging code out of
11510 `debug_threads' control.
11511
11512 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11513
11514 * linux-low.c (linux_wait_1): Don't set last_status here.
11515 * server.c (push_event, queue_stop_reply_callback): Assert we're
11516 not pushing a TARGET_WAITKIND_IGNORE event.
11517 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11518 (myresume, handle_target_event): Set the thread's last_resume_kind
11519 and last_status from the target returned status.
11520
11521 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11522
11523 PR threads/10729
11524
11525 * linux-x86-low.c (update_debug_registers_callback): New.
11526 (i386_dr_low_set_addr): Use it.
11527 (i386_dr_low_get_addr): New.
11528 (i386_dr_low_set_control): Use update_debug_registers_callback.
11529 (i386_dr_low_get_control): New.
11530 (i386_dr_low_get_status): Adjust.
11531 * linux-low.c (linux_stop_lwp): New.
11532 * linux-low.h (linux_stop_lwp): Declare.
11533
11534 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11535 argument instead of a i386_debug_reg_state.
11536 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11537 a i386_debug_reg_state.
11538 (i386_insert_aligned_watchpoint): Adjust.
11539 (i386_remove_aligned_watchpoint): Adjust.
11540 (i386_low_stopped_data_address): Read the debug registers from the
11541 inferior instead of from the mirrors.
11542 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11543 (i386_dr_low_get_addr): Declare.
11544 (i386_dr_low_get_control): Declare.
11545 (i386_dr_low_get_status): Change prototype.
11546
11547 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11548 (i386_dr_low_get_addr): New.
11549 (i386_dr_low_get_control): New.
11550 (i386_dr_low_get_status): Adjust prototype. Return
11551 dr_status_mirror.
11552 (i386_initial_stuff): Clear dr_status_mirror and
11553 dr_control_mirror.
11554 (i386_get_thread_context): Adjust.
11555 (i386_set_thread_context): Adjust.
11556 (i386_thread_added): Adjust.
11557
11558 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11559
11560 * linux-low.h (linux_thread_area): Delete declaration.
11561
11562 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11563
11564 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11565 after its termination.
11566
11567 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11568
11569 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11570 (gdb_wants_all_stopped): Delete.
11571 (linux_wait_1): Don't call them.
11572 * server.c (handle_v_cont): Tag all threads as want-stopped.
11573 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11574 stopped as "client-wants-stopped".
11575
11576 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11577
11578 * Makefile.in (signals_h): New.
11579 (server_h): Depend on it.
11580 (server.o): Don't depend on $(signals_def).
11581 (signals.o): Depend on $(signals_def).
11582
11583 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11584
11585 * Makefile.in (signals_def): New.
11586 (server_h): Append include/gdb/signals.h and signals_def.
11587 (server.o): Append signals_def.
11588
11589 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11590
11591 * server.c (handle_target_event): Use target_signal_to_host for
11592 resume_info.sig initialization.
11593 * target.h (struct thread_resume) <sig>: New comment.
11594
11595 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11596
11597 * server.c (handle_query): strcpy() the returned string from paddress()
11598 instead of sprintf().
11599 * utils.c (paddress): Return phex_nz().
11600
11601 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11602
11603 * server.c (handle_v_cont): Call mourn_inferior if process
11604 just exited.
11605 (myresume): Likewise.
11606
11607 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11608
11609 Static tracepoints, and integration with UST.
11610
11611 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11612 * mem-break.c (uninsert_all_breakpoints)
11613 (reinsert_all_breakpoints): New.
11614 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11615 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11616 (gdb_agent_ust_loaded, helper_thread_id)
11617 (gdb_agent_helper_thread_id): New macros.
11618 (struct ipa_sym_addresses): Add addr_ust_loaded,
11619 addr_helper_thread_id, addr_cmd_buf.
11620 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11621 (in_process_agent_loaded_ust): New.
11622 (write_e_ust_not_loaded): New.
11623 (maybe_write_ipa_ust_not_loaded): New.
11624 (struct collect_static_trace_data_action): New.
11625 (enum tracepoint_type) <static_tracepoint>: New.
11626 (struct tracepoint) <handle>: Mention static tracepoints.
11627 (struct static_tracepoint_ctx): New.
11628 (CMD_BUF_SIZE): New.
11629 (add_tracepoint_action): Handle static tracepoint actions.
11630 (unprobe_marker_at): New.
11631 (clear_installed_tracepoints): Handle static tracepoints.
11632 (cmd_qtdp): Handle static tracepoints.
11633 (probe_marker_at): New.
11634 (cmd_qtstart): Handle static tracepoints.
11635 (response_tracepoint): Handle static tracepoints.
11636 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11637 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11638 (get_context_regcache): Handle static tracepoints.
11639 (do_action_at_tracepoint): Handle static tracepoint actions.
11640 (traceframe_find_block_type): Handle static trace data blocks.
11641 (traceframe_read_sdata): New.
11642 (download_tracepoints): Download static tracepoint actions.
11643 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11644 (GDB_PROBE_NAME): New.
11645 (ust_ops): New.
11646 (GET_UST_SYM): New.
11647 (USTF): New.
11648 (dlsym_ust): New.
11649 (ust_marker_to_static_tracepoint): New.
11650 (gdb_probe): New.
11651 (collect_ust_data_at_tracepoint): New.
11652 (gdb_ust_probe): New.
11653 (UNIX_PATH_MAX, SOCK_DIR): New.
11654 (gdb_ust_connect_sync_socket): New.
11655 (resume_thread, stop_thread): New.
11656 (run_inferior_command): New.
11657 (init_named_socket): New.
11658 (gdb_ust_socket_init): New.
11659 (cstr_to_hexstr): New.
11660 (next_st): New.
11661 (first_marker, next_marker): New.
11662 (response_ust_marker): New.
11663 (cmd_qtfstm, cmd_qtsstm): New.
11664 (unprobe_marker_at, probe_marker_at): New.
11665 (cmd_qtstmat, gdb_ust_thread): New.
11666 (gdb_ust_init): New.
11667 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11668 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11669 (ST_REGENTRY): New.
11670 (x86_64_st_collect_regmap): New.
11671 (X86_64_NUM_ST_COLLECT_GREGS): New.
11672 (AMD64_RIP_REGNUM): New.
11673 (supply_static_tracepoint_registers): New.
11674 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11675 (ST_REGENTRY): New.
11676 (i386_st_collect_regmap): New.
11677 (i386_NUM_ST_COLLECT_GREGS): New.
11678 (supply_static_tracepoint_registers): New.
11679 * server.c (handle_query): Handle qXfer:statictrace:read.
11680 <qSupported>: Report support for StaticTracepoints, and
11681 qXfer:statictrace:read features.
11682 * server.h (traceframe_read_sdata)
11683 (supply_static_tracepoint_registers): Declare.
11684 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11685 (unpack_varlen_hex): Include in IPA build.
11686 * Makefile.in (ustlibs, ustinc): New.
11687 (IPA_OBJS): Add remote-utils-ipa.o.
11688 ($(IPA_LIB)): Link -ldl and -lpthread.
11689 (UST_CFLAGS): New.
11690 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11691 * config.in, configure: Regenerate.
11692
11693 2010-06-20 Ian Lance Taylor <iant@google.com>
11694 Pedro Alves <pedro@codesourcery.com>
11695
11696 * linux-x86-low.c (always_true): Delete.
11697 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11698 trying to fool the compiler with always_true.
11699
11700 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11701
11702 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11703 conditions in gdbserver.
11704
11705 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11706
11707 * spu-low.c (spu_read_memory): Wrap around local store limit.
11708 (spu_write_memory): Likewise.
11709
11710 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11711
11712 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11713 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11714 LONGEST uses.
11715 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11716 uses.
11717 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11718 uses with LONGEST uses.
11719
11720 2010-06-14 Stan Shebs <stan@codesourcery.com>
11721 Pedro Alves <pedro@codesourcery.com>
11722
11723 Bytecode compiler.
11724
11725 * linux-x86-low.c: Include limits.h.
11726 (add_insns): New.
11727 (always_true): New.
11728 (EMIT_ASM): New.
11729 (EMIT_ASM32): New.
11730 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11731 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11732 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11733 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11734 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11735 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11736 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11737 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11738 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11739 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11740 (amd64_emit_void_call_2): New.
11741 (amd64_emit_ops): New.
11742 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11743 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11744 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11745 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11746 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11747 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11748 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11749 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11750 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11751 (i386_emit_stack_adjust, i386_emit_int_call_1)
11752 (i386_emit_void_call_2): New.
11753 (i386_emit_ops): New.
11754 (x86_emit_ops): New.
11755 (the_low_target): Install x86_emit_ops.
11756 * server.h (struct emit_ops): New.
11757 (get_raw_reg_func_addr): Declare.
11758 (current_insn_ptr, emit_error): Declare.
11759 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11760 (set_trace_state_variable_value): New defines.
11761 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11762 addr_get_trace_state_variable_value and
11763 addr_set_trace_state_variable_value.
11764 (symbol_list): New fields for get_raw_reg,
11765 get_trace_state_variable_value and set_trace_state_variable_value.
11766 (condfn): New typedef.
11767 (struct tracepoint): New field `compiled_cond'.
11768 (do_action_at_tracepoint): Clear compiled_cond.
11769 (get_trace_state_variable_value, set_trace_state_variable_value):
11770 Export in the IPA.
11771 (condition_true_at_tracepoint): If there's a compiled condition,
11772 run that.
11773 (current_insn_ptr, emit_error): New globals.
11774 (struct bytecode_address): New.
11775 (get_raw_reg_func_addr): New.
11776 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11777 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11778 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11779 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11780 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11781 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11782 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11783 (compile_tracepoint_condition, compile_bytecodes): New.
11784 * target.h (emit_ops): Forward declare.
11785 (struct target_ops): New field emit_ops.
11786 (target_emit_ops): New.
11787 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11788 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11789 * linux-low.c (linux_emit_ops): New.
11790 (linux_target_ops): Install it.
11791 * linux-low.h (struct linux_target_ops): New field emit_ops.
11792
11793 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11794
11795 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11796 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11797
11798 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11799 Stan Shebs <stan@codesourcery.com>
11800
11801 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11802 (all): Depend on $(extra_libraries).
11803 (install-only): Install the IPA.
11804 (IPA_OBJS, IPA_LIB): New.
11805 (clean): Remove the IPA lib.
11806 (IPAGENT_CFLAGS): New.
11807 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11808 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11809 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11810 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11811 * configure.ac: Check for atomic builtins support in the compiler.
11812 (IPA_DEPFILES, extra_libraries): Define.
11813 * configure.srv (ipa_obj): Add description.
11814 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11815 (i[34567]86-*-linux*): Set ipa_obj.
11816 (x86_64-*-linux*): Set ipa_obj.
11817 * linux-low.c (stabilizing_threads): New.
11818 (supports_fast_tracepoints): New.
11819 (linux_detach): Stabilize threads before detaching.
11820 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11821 the lwp is either not stabilizing, or is moving out of a jump pad.
11822 (linux_fast_tracepoint_collecting): New.
11823 (maybe_move_out_of_jump_pad): New.
11824 (enqueue_one_deferred_signal): New.
11825 (dequeue_one_deferred_signal): New.
11826 (linux_wait_for_event_1): If moving out of a jump pad, defer
11827 pending signals to later.
11828 (linux_stabilize_threads): New.
11829 (linux_wait_1): Check if threads need moving out of jump pads, and
11830 do it if so.
11831 (stuck_in_jump_pad_callback): New.
11832 (move_out_of_jump_pad_callback): New.
11833 (lwp_running): New.
11834 (linux_resume_one_lwp): Handle moving out of jump pads.
11835 (linux_set_resume_request): Dequeue deferred signals.
11836 (need_step_over_p): Also step over fast tracepoint jumps.
11837 (start_step_over): Also uninsert fast tracepoint jumps.
11838 (finish_step_over): Also reinsert fast tracepoint jumps.
11839 (linux_install_fast_tracepoint_jump): New.
11840 (linux_target_ops): Install linux_stabilize_threads and
11841 linux_install_fast_tracepoint_jump_pad.
11842 * linux-low.h (linux_target_ops) <get_thread_area,
11843 install_fast_tracepoint_jump_pad>: New fields.
11844 (struct lwp_info) <collecting_fast_tracepoint,
11845 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11846 (linux_get_thread_area): Declare.
11847 * linux-x86-low.c (jump_insn): New.
11848 (x86_get_thread_area): New.
11849 (append_insns): New.
11850 (push_opcode): New.
11851 (amd64_install_fast_tracepoint_jump_pad): New.
11852 (i386_install_fast_tracepoint_jump_pad): New.
11853 (x86_install_fast_tracepoint_jump_pad): New.
11854 (the_low_target): Install x86_get_thread_area and
11855 x86_install_fast_tracepoint_jump_pad.
11856 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11857 (struct fast_tracepoint_jump): New.
11858 (fast_tracepoint_jump_insn): New.
11859 (fast_tracepoint_jump_shadow): New.
11860 (find_fast_tracepoint_jump_at): New.
11861 (fast_tracepoint_jump_here): New.
11862 (delete_fast_tracepoint_jump): New.
11863 (set_fast_tracepoint_jump): New.
11864 (uninsert_fast_tracepoint_jumps_at): New.
11865 (reinsert_fast_tracepoint_jumps_at): New.
11866 (set_breakpoint_at): Use write_inferior_memory.
11867 (uninsert_raw_breakpoint): Use write_inferior_memory.
11868 (check_mem_read): Mask out fast tracepoint jumps.
11869 (check_mem_write): Mask out fast tracepoint jumps.
11870 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11871 (set_fast_tracepoint_jump): Declare.
11872 (delete_fast_tracepoint_jump)
11873 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11874 (reinsert_fast_tracepoint_jumps_at): Declare.
11875 * regcache.c: Don't compile many functions when building the
11876 in-process agent library.
11877 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11878 the register buffer in the heap.
11879 (free_register_cache): If the register buffer isn't owned by the
11880 regcache, don't free it.
11881 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11882 pre-existing register caches.
11883 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11884 type.
11885 (convert_ascii_to_int): : Constify `from' parameter type.
11886 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11887 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11888 the needed buffer in-place.
11889 (relocate_instruction): New.
11890 * server.c (handle_query) <qSymbols>: If the target supports
11891 tracepoints, give it a chance of looking up symbols. Report
11892 support for fast tracepoints.
11893 (handle_status): Stabilize threads.
11894 (process_serial_event): Adjust.
11895 * server.h (struct fast_tracepoint_jump): Forward declare.
11896 (struct process_info) <fast_tracepoint_jumps>: New field.
11897 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11898 (decode_X_packet, decode_M_packet): Adjust.
11899 (relocate_instruction): Declare.
11900 (in_process_agent_loaded): Declare.
11901 (tracepoint_look_up_symbols): Declare.
11902 (struct fast_tpoint_collect_status): Declare.
11903 (fast_tracepoint_collecting): Declare.
11904 (force_unlock_trace_buffer): Declare.
11905 (handle_tracepoint_bkpts): Declare.
11906 (initialize_low_tracepoint)
11907 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11908 * target.h (struct target_ops) <stabilize_threads,
11909 install_fast_tracepoint_jump_pad>: New fields.
11910 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11911 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11912 [HAVE_STDINT_H]: Include stdint.h.
11913 (trace_debug_1): Rename to ...
11914 (trace_vdebug): ... this.
11915 (trace_debug): Rename to ...
11916 (trace_debug_1): ... this. Add `level' parameter.
11917 (trace_debug): New.
11918 (ATTR_USED, ATTR_NOINLINE): New.
11919 (IP_AGENT_EXPORT): New.
11920 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11921 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11922 (about_to_request_buffer_space, trace_buffer_is_full)
11923 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11924 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11925 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11926 (traceframe_write_count, traceframes_created)
11927 (trace_state_variables)
11928 New renaming defines.
11929 (struct ipa_sym_addresses): New.
11930 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11931 (symbol_list): New.
11932 (ipa_sym_addrs): New.
11933 (all_tracepoint_symbols_looked_up): New.
11934 (in_process_agent_loaded): New.
11935 (write_e_ipa_not_loaded): New.
11936 (maybe_write_ipa_not_loaded): New.
11937 (tracepoint_look_up_symbols): New.
11938 (debug_threads) [IN_PROCESS_AGENT]: New.
11939 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11940 (UNKNOWN_SIDE_EFFECTS): New.
11941 (stop_tracing): New.
11942 (flush_trace_buffer): New.
11943 (stop_tracing_bkpt): New.
11944 (flush_trace_buffer_bkpt): New.
11945 (read_inferior_integer): New.
11946 (read_inferior_uinteger): New.
11947 (read_inferior_data_pointer): New.
11948 (write_inferior_data_pointer): New.
11949 (write_inferior_integer): New.
11950 (write_inferior_uinteger): New.
11951 (struct collect_static_trace_data_action): Delete.
11952 (enum tracepoint_type): New.
11953 (struct tracepoint) <type>: New field `type'.
11954 <actions_str, step_actions, step_actions_str>: Only include in
11955 GDBserver.
11956 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11957 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11958 (tracepoints): Use IP_AGENT_EXPORT.
11959 (last_tracepoint): Don't include in the IPA.
11960 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11961 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11962 (alloced_trace_state_variables): New.
11963 (trace_state_variables): Use IP_AGENT_EXPORT.
11964 (traceframe_t): Delete unused variable.
11965 (circular_trace_buffer): Don't include in the IPA.
11966 (trace_buffer_start): Delete.
11967 (struct trace_buffer_control): New.
11968 (trace_buffer_free): Delete.
11969 (struct ipa_trace_buffer_control): New.
11970 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11971 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11972 New.
11973 (trace_buffer_ctrl): New.
11974 (TRACE_BUFFER_CTRL_CURR): New.
11975 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11976 Reimplement as macros.
11977 (trace_buffer_wrap): Delete.
11978 (traceframe_write_count, traceframe_read_count)
11979 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11980 (struct tracepoint_hit_ctx) <type>: New field.
11981 (struct fast_tracepoint_ctx): New.
11982 (memory_barrier): New.
11983 (cmpxchg): New.
11984 (record_tracepoint_error): Update atomically in the IPA.
11985 (clear_inferior_trace_buffer): New.
11986 (about_to_request_buffer_space): New.
11987 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11988 updating the same buffer.
11989 (add_tracepoint): Default the tracepoint's type to trap
11990 tracepoint, and orig_size to -1.
11991 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11992 internal variables.
11993 (create_trace_state_variable): New parameter `gdb'. Handle it.
11994 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11995 (cmd_qtdp): Handle fast tracepoints.
11996 (cmd_qtdv): Adjust.
11997 (max_jump_pad_size): New.
11998 (gdb_jump_pad_head): New.
11999 (get_jump_space_head): New.
12000 (claim_jump_space): New.
12001 (sort_tracepoints): New.
12002 (MAX_JUMP_SIZE): New.
12003 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12004 IPA.
12005 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12006 support. Upload fast traceframes, and delete internal IPA
12007 breakpoints.
12008 (stop_tracing_handler): New.
12009 (flush_trace_buffer_handler): New.
12010 (cmd_qtstop): Upload fast tracepoints.
12011 (response_tracepoint): Handle fast tracepoints.
12012 (tracepoint_finished_step): Upload fast traceframes. Set the
12013 tracepoint hit context's tracepoint type.
12014 (handle_tracepoint_bkpts): New.
12015 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12016 type. Add comment about fast tracepoints.
12017 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12018 non-existing action_str field.
12019 (get_context_regcache): Handle fast tracepoints.
12020 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12021 to the regcache.
12022 (fast_tracepoint_from_jump_pad_address): New.
12023 (fast_tracepoint_from_ipa_tpoint_address): New.
12024 (collecting_t): New.
12025 (force_unlock_trace_buffer): New.
12026 (fast_tracepoint_collecting): New.
12027 (collecting): New.
12028 (gdb_collect): New.
12029 (write_inferior_data_ptr): New.
12030 (target_tp_heap): New.
12031 (target_malloc): New.
12032 (download_agent_expr): New.
12033 (UALIGN): New.
12034 (download_tracepoints): New.
12035 (download_trace_state_variables): New.
12036 (upload_fast_traceframes): New.
12037 (IPA_FIRST_TRACEFRAME): New.
12038 (IPA_NEXT_TRACEFRAME_1): New.
12039 (IPA_NEXT_TRACEFRAME): New.
12040 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12041 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12042 (gdb_jump_pad_buffer_end): New.
12043 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12044 (initialize_tracepoint): Adjust.
12045 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12046 buffer. Initialize the low module.
12047 * utils.c (PREFIX, TOOLNAME): New.
12048 (malloc_failure): Use PREFIX.
12049 (error): In the IPA, an error causes an exit.
12050 (fatal, warning): Use PREFIX.
12051 (internal_error): Use TOOLNAME.
12052 (NUMCELLS): Increase to 10.
12053 * configure, config.in: Regenerate.
12054
12055 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12056
12057 * server.c (handle_query) <qSupported>: Do two passes over the
12058 qSupported string to avoid nesting strtok.
12059
12060 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12061
12062 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12063 (CDEPS): New.
12064 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12065 -Wl,--dynamic-list.
12066 * configure: Regenerate.
12067 * proc-service.list: New.
12068
12069 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12070
12071 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12072 New comment.
12073
12074 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12075
12076 * gdbreplay.c (remote_open): Check error return from socket() call by
12077 its equality to -1 not by it being negative.
12078 * remote-utils.c (remote_open): Likewise.
12079
12080 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12081
12082 * config.h: Regenerate.
12083
12084 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12085
12086 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12087 doesn't provide PTRACE_GET_THREAD_AREA.
12088
12089 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12090
12091 * linux-m68k-low.c: Include <asm/ptrace.h>
12092 (ps_get_thread_area): Implement.
12093
12094 2010-05-03 Doug Evans <dje@google.com>
12095
12096 * event-loop.c (struct callback_event): New struct.
12097 (callback_list): New global.
12098 (append_callback_event, delete_callback_event): New functions.
12099 (process_callback): New function.
12100 (start_event_loop): Call it.
12101 * remote-utils.c (NOT_SCHEDULED): Define.
12102 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12103 moved out of readchar.
12104 (readchar): Rewrite. Call reschedule before returning.
12105 (reset_readchar): New function.
12106 (remote_close): Call it.
12107 (process_remaining, reschedule): New functions.
12108 * server.h (callback_handler_func): New typedef.
12109 (append_callback_event, delete_callback_event): Declare.
12110
12111 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12112
12113 * proc-service.c (ps_pglobal_lookup): Use
12114 thread_db_look_up_one_symbol.
12115 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12116 parameter. Use it instead of all_symbols_looked_up.
12117 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12118 field.
12119 (all_symbols_looked_up): Don't declare.
12120 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12121 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12122 field.
12123 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12124 Set all_symbols_looked_up here.
12125 (thread_db_look_up_one_symbol): New.
12126 (thread_db_get_tls_address): Adjust.
12127 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12128 thread_db object on the heap, and tentatively set it in the
12129 process structure.
12130 (thread_db_init): Don't set all_symbols_looked_up here.
12131 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12132
12133 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12134
12135 * linux-low.c (linux_kill, linux_detach): Adjust.
12136 (status_pending_p_callback): Remove redundant statement. Check
12137 for !TARGET_WAITIKIND_IGNORE, instead of
12138 TARGET_WAITKIND_STOPPED.
12139 (handle_tracepoints): Make sure LWP is locked. Adjust.
12140 (linux_wait_for_event_1): Adjust.
12141 (linux_cancel_breakpoints): New.
12142 (unsuspend_one_lwp): New.
12143 (unsuspend_all_lwps): New.
12144 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12145 (send_sigstop_callback): Change return type to int, add new
12146 `except' parameter and handle it.
12147 (suspend_and_send_sigstop_callback): New.
12148 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12149 pass them down. If SUSPEND, also increment the lwp's suspend
12150 count.
12151 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12152 (need_step_over_p): Don't consider suspended LWPs.
12153 (start_step_over): Adjust.
12154 (proceed_one_lwp): Change return type to int, add new `except'
12155 parameter and handle it.
12156 (unsuspend_and_proceed_one_lwp): New.
12157 (proceed_all_lwps): Use find_inferior instead of
12158 for_each_inferior.
12159 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12160 also decrement the suspend count of LWPs. Pass `except' down,
12161 instead of hacking its suspend count.
12162 (linux_pause_all): Add `freeze' parameter. Adjust.
12163 (linux_unpause_all): New.
12164 (linux_target_ops): Install linux_unpause_all.
12165 * server.c (handle_status): Adjust.
12166 * target.h (struct target_ops): New fields `unpause_all' and
12167 `cancel_breakpoints'. Add new parameter to `pause_all'.
12168 (pause_all): Add new `freeze' parameter.
12169 (unpause_all): New.
12170 (cancel_breakpoints): New.
12171 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12172 cancel breakpoints.
12173 (cmd_qtstart): Pause threads.
12174 (stop_tracing): Pause threads, and cancel breakpoints.
12175 * win32-low.c (win32_target_ops): Adjust.
12176
12177 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12180 the inferior right away from here...
12181 (linux_wait_1): ... to here, and adjust to check the thread's
12182 last_resume_kind instead of the lwp's step or stop_expected flags.
12183
12184 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12185
12186 * README: Use consistent `GDB' and `GDBserver' spellings.
12187
12188 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12189
12190 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12191 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12192 (linux_detach_one_lwp): Assume the lwp is stopped.
12193 (any_thread_of): Delete.
12194 (linux_detach): Stop all lwps here. Don't blindly delete all
12195 breakpoints.
12196 (delete_lwp_callback): New.
12197 (linux_mourn): Delete all lwps of the process that is gone.
12198 (linux_wait_1): Don't delete the last lwp of the process here.
12199 * mem-break.h (mark_breakpoints_out): Declare.
12200 * mem-break.c (mark_breakpoints_out): New.
12201 (free_all_breakpoints): Use it.
12202 * server.c (handle_target_event): If the process is gone, mark
12203 breakpoints out.
12204 * thread-db.c (struct thread_db) <create_bp>: New field.
12205 (thread_db_enable_reporting): Fix prototype. Store a thread event
12206 breakpoint reference in the thread_db struct.
12207 (thread_db_load_search): Clear the thread_db object.
12208 (try_thread_db_load_1): Ditto.
12209 (switch_to_process): New.
12210 (disable_thread_event_reporting): Use it.
12211 (remove_thread_event_breakpoints): New.
12212 (thread_db_detach, thread_db_mourn): Use it.
12213
12214 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12215
12216 * linux-low.c (linux_enable_event_reporting): New.
12217 (linux_wait_for_event_1, handle_extended_wait): Use it.
12218
12219 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12220
12221 * linux-low.c (linux_kill_one_lwp, linux_kill)
12222 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12223 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12224 SIGSTOP even if the LWP is stopped.
12225 (send_sigstop_callback): New.
12226 (stop_all_lwps): Use send_sigstop_callback instead.
12227 (linux_resume_one_thread): Adjust.
12228 (proceed_one_lwp): Still proceed an LWP that the client has
12229 requested to stop, if we haven't reported it as stopped yet. Make
12230 sure that LWPs the client want stopped, have a pending SIGSTOP.
12231
12232 2010-04-26 Doug Evans <dje@google.com>
12233
12234 * server.c (handle_general_set): Make static.
12235
12236 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12237 Print received char after testing for error/eof instead of before.
12238 (input_interrupt): Tweak comment.
12239
12240 2010-04-23 Doug Evans <dje@google.com>
12241
12242 * server.c (start_inferior): Print inferior argv if --debug.
12243
12244 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12245
12246 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12247 * nto-x86-low.c: Include server.h
12248
12249 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12250
12251 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12252 be consistent with other sources of this directory.
12253 (init_registers_amd64): Correct name of source file of this function
12254 in the comment.
12255
12256 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12257
12258 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12259 64-bit executables.
12260
12261 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12262
12263 * win32-i386-low.c: Add 64-bit support.
12264 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12265 (init_registers_amd64): Declare.
12266 (mappings): Add 64-bit version of array.
12267 (init_windows_x86): New function.
12268 (the_low_target): Change init_arch field to init_windows_x86.
12269
12270 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12271
12272 * win32-low.c: Adapt to support also 64-bit architecture.
12273 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12274 (get_image_name): Use SIZE_T type for local variable `done'.
12275 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12276 (toolhelp_get_dll_name): Idem.
12277 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12278 Use uintptr_t typecast to avoid warning.
12279 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12280 (handle_exception): Use phex_nz to avoid warning.
12281 (win32_wait): Remove unused local variable `process'.
12282
12283 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12284
12285 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12286 `amd64-avx.o'.
12287
12288 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12289
12290 * configure.ac: Use `ws2_32' library for srv_mingw.
12291 * configure: Regenerate.
12292 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12293 * remote-utils.c: Likewise.
12294
12295 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12296
12297 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12298 if __x86_64__ is defined.
12299
12300 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12301
12302 * configure: Regenerate.
12303
12304 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12305
12306 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12307 * target.h (target_ops): New get_tib_address field.
12308 * win32-low.h (win32_thread_info): Add thread_local_base field.
12309 * win32-low.c (child_add_thread): Add tlb argument.
12310 Set thread_local_base field to TLB.
12311 (get_child_debug_event): Adapt to child_add_thread change.
12312 (win32_get_tib_address): New function.
12313 (win32_target_ops): Set get_tib_address field to
12314 win32_get_tib_address.
12315 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12316
12317 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12318
12319 * linux-low.c (linux_mourn): Also remove the process.
12320 * server.c (handle_target_event): Don't remove the process here.
12321 * nto-low.c (nto_mourn): New.
12322 (nto_target_ops): Install it.
12323 * spu-low.c (spu_mourn): New.
12324 (spu_target_ops): Install it.
12325 * win32-low.c (win32_mourn): New.
12326 (win32_target_ops): Install it.
12327
12328 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12329
12330 * server.h (buffer_xml_printf): Remove redundant `;'.
12331
12332 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12333
12334 * regcache.c (set_register_cache): Invalidate regcaches before
12335 changing the register cache layout.
12336 (regcache_invalidate_one): Allow a NULL regcache.
12337 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12338 regcaches before changing the register cache layout or the target
12339 regsets.
12340
12341 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12342
12343 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12344 variable warning on Linux/x86-64.
12345
12346 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12347
12348 GDBserver disconnected tracing support.
12349
12350 * linux-low.c (linux_remove_process): Delete.
12351 (add_lwp): Don't set last_resume_kind here.
12352 (linux_kill): Use `mourn'.
12353 (linux_detach): Use `thread_db_detach', and `mourn'.
12354 (linux_mourn): New.
12355 (linux_attach_lwp_1): Adjust comment.
12356 (linux_attach): last_resume_kind moved the thread_info; adjust.
12357 (status_pending_p_callback): Adjust.
12358 (linux_wait_for_event_1): Adjust.
12359 (count_events_callback, select_singlestep_lwp_callback)
12360 (select_event_lwp_callback, cancel_breakpoints_callback)
12361 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12362 (proceed_one_lwp): Adjust.
12363 (linux_async): Add debug output.
12364 (linux_thread_stopped): New.
12365 (linux_pause_all): New.
12366 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12367 linux_pause_all.
12368 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12369 (thread_db_free): Delete declaration.
12370 (thread_db_detach, thread_db_mourn): Declare.
12371 * thread-db.c (thread_db_init): Use thread_db_mourn.
12372 (thread_db_free): Delete, split in two.
12373 (disable_thread_event_reporting): New.
12374 (thread_db_detach): New.
12375 (thread_db_mourn): New.
12376
12377 * server.h (struct thread_info) <last_resume_kind>: New field.
12378 <attached>: Add comment.
12379 <gdb_detached>: New field.
12380 (handler_func): Change return type to int.
12381 (handle_serial_event, handle_target_event): Ditto.
12382 (gdb_connected): Declare.
12383 (tracing): Delete.
12384 (disconnected_tracing): Declare.
12385 (stop_tracing): Declare.
12386
12387 * server.c (handle_query) <qSupported>: Report support for
12388 disconnected tracing.
12389 (queue_stop_reply_callback): Account for running threads.
12390 (gdb_wants_thread_stopped): New.
12391 (gdb_wants_all_threads_stopped): New.
12392 (gdb_reattached_process): New.
12393 (handle_status): Clear the `gdb_detached' flag of all processes.
12394 In all-stop, stop all threads.
12395 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12396 (process_serial_event): If the remote connection breaks, or if an
12397 exit was forced with "monitor exit", force an event loop exit.
12398 Handle disconnected tracing on detach.
12399 (handle_serial_event): Adjust.
12400 (handle_target_event): If GDB isn't connected, forward events back
12401 to the inferior, unless the last process exited, in which case,
12402 exit gdbserver. Adjust interface.
12403
12404 * remote-utils.c (remote_open): Don't block in accept. Instead
12405 register an event loop source on the listen socket file
12406 descriptor. Refactor bits into ...
12407 (listen_desc): ... this new global.
12408 (gdb_connected): ... this new function.
12409 (enable_async_notification): ... this new function.
12410 (handle_accept_event): ... this new function.
12411 (remote_close): Clear remote_desc.
12412
12413 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12414
12415 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12416 New fields.
12417 (mourn_inferior): Define.
12418 (target_process_qsupported): Avoid the dangling else problem.
12419 (thread_stopped): Define.
12420 (pause_all): Define.
12421 (target_waitstatus_to_string): Declare.
12422 * target.c (target_waitstatus_to_string): New.
12423
12424 * tracepoint.c (tracing): Make extern.
12425 (disconnected_tracing): New.
12426 (stop_tracing): Make extern. Handle tracing stops due to GDB
12427 disconnecting.
12428 (cmd_qtdisconnected): New.
12429 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12430 (handle_tracepoint_general_set): Handle QTDisconnected.
12431
12432 * event-loop.c (event_handler_func): Change return type to int.
12433 (process_event): Bail out if the event handler wants the event
12434 loop to stop.
12435 (handle_file_event): Ditto.
12436 (start_event_loop): Bail out if the event handler wants the event
12437 loop to stop.
12438
12439 * nto-low.c (nto_target_ops): Adjust.
12440 * spu-low.c (spu_wait): Don't remove the process here.
12441 (spu_target_ops): Adjust.
12442 * win32-low.c (win32_wait): Don't remove the process here.
12443 (win32_target_ops): Adjust.
12444
12445 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12446
12447 * regcache.c (realloc_register_cache): Invalidate inferior's
12448 regcache before recreating it.
12449
12450 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12451
12452 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12453
12454 2010-04-09 Stan Shebs <stan@codesourcery.com>
12455 Pedro Alves <pedro@codesourcery.com>
12456
12457 * server.h (LONGEST): New.
12458 (struct thread_info) <while_stepping>: New field.
12459 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12460 Declare.
12461 (initialize_tracepoint, handle_tracepoint_general_set)
12462 (handle_tracepoint_query, tracepoint_finished_step)
12463 (tracepoint_was_hit, release_while_stepping_state_list):
12464 (current_traceframe): Declare.
12465 * server.c (handle_general_set): Handle tracepoint packets.
12466 (read_memory): New.
12467 (write_memory): New.
12468 (handle_search_memory_1): Use read_memory.
12469 (handle_query): Report support for conditional tracepoints, trace
12470 state variables, and tracepoint sources. Handle tracepoint
12471 queries.
12472 (main): Initialize the tracepoints module.
12473 (process_serial_event): Handle traceframe reads/writes.
12474
12475 * linux-low.c (handle_tracepoints): New.
12476 (linux_wait_1): Call it.
12477 (linux_resume_one_lwp): Handle while-stepping.
12478 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12479 (linux_target_ops): Install them.
12480 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12481 New field.
12482 * linux-x86-low.c (x86_supports_tracepoints): New.
12483 (the_low_target). Install it.
12484
12485 * mem-break.h (delete_breakpoint): Declare.
12486 * mem-break.c (delete_breakpoint): Make external.
12487
12488 * target.h (struct target_ops): Add `supports_tracepoints',
12489 `read_pc', and `write_pc' fields.
12490 (target_supports_tracepoints): Define.
12491 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12492 (phex_nz): New.
12493
12494 * regcache.h (struct regcache) <registers_owned>: New field.
12495 (init_register_cache, regcache_cpy): Declare.
12496 (regcache_read_pc, regcache_write_pc): Declare.
12497 (register_cache_size): Declare.
12498 (supply_regblock): Declare.
12499 * regcache.c (init_register_cache): New.
12500 (new_register_cache): Use it.
12501 (regcache_cpy): New.
12502 (register_cache_size): New.
12503 (supply_regblock): New.
12504 (regcache_read_pc, regcache_write_pc): New.
12505
12506 * tracepoint.c: New.
12507
12508 * Makefile.in (OBS): Add tracepoint.o.
12509 (tracepoint.o): New rule.
12510
12511 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12512
12513 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12514 (i386-mmx.o): New.
12515 (i386-mmx.c): Likewise.
12516 (i386-mmx-linux.o): Likewise.
12517 (i386-mmx-linux.c): Likewise.
12518
12519 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12520 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12521 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12522 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12523
12524 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12525 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12526 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12527
12528 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12529
12530 * Makefile.in (clean): Updated.
12531 (i386-avx.o): New.
12532 (i386-avx.c): Likewise.
12533 (i386-avx-linux.o): Likewise.
12534 (i386-avx-linux.c): Likewise.
12535 (amd64-avx.o): Likewise.
12536 (amd64-avx.c): Likewise.
12537 (amd64-avx-linux.o): Likewise.
12538 (amd64-avx-linux.c): Likewise.
12539
12540 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12541 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12542 (srv_amd64_regobj): Add amd64-avx.o.
12543 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12544 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12545 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12546 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12547 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12548 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12549 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12550
12551 * i387-fp.c: Include "i386-xstate.h".
12552 (i387_xsave): New.
12553 (i387_cache_to_xsave): Likewise.
12554 (i387_xsave_to_cache): Likewise.
12555 (x86_xcr0): Likewise.
12556
12557 * i387-fp.h (i387_cache_to_xsave): Likewise.
12558 (i387_xsave_to_cache): Likewise.
12559 (x86_xcr0): Likewise.
12560
12561 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12562 * linux-crisv32-low.c (target_regsets): Likewise.
12563 * linux-m68k-low.c (target_regsets): Likewise.
12564 * linux-mips-low.c (target_regsets): Likewise.
12565 * linux-ppc-low.c (target_regsets): Likewise.
12566 * linux-s390-low.c (target_regsets): Likewise.
12567 * linux-sh-low.c (target_regsets): Likewise.
12568 * linux-sparc-low.c (target_regsets): Likewise.
12569 * linux-xtensa-low.c (target_regsets): Likewise.
12570
12571 * linux-low.c: Include <sys/uio.h>.
12572 (regsets_fetch_inferior_registers): Support nt_type.
12573 (regsets_store_inferior_registers): Likewise.
12574 (linux_process_qsupported): New.
12575 (linux_target_ops): Add linux_process_qsupported.
12576
12577 * linux-low.h (regset_info): Add nt_type.
12578 (linux_target_ops): Add process_qsupported.
12579
12580 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12581 and <sys/uio.h>.
12582 (init_registers_i386_avx_linux): New.
12583 (init_registers_amd64_avx_linux): Likewise.
12584 (xmltarget_i386_linux_no_xml): Likewise.
12585 (xmltarget_amd64_linux_no_xml): Likewise.
12586 (PTRACE_GETREGSET): Likewise.
12587 (PTRACE_SETREGSET): Likewise.
12588 (x86_fill_xstateregset): Likewise.
12589 (x86_store_xstateregset): Likewise.
12590 (use_xml): Likewise.
12591 (x86_linux_update_xmltarget): Likewise.
12592 (x86_linux_process_qsupported): Likewise.
12593 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12594 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12595 init_registers_i386_linux here. Call
12596 x86_linux_update_xmltarget.
12597 (the_low_target): Add x86_linux_process_qsupported.
12598
12599 * server.c (handle_query): Call target_process_qsupported.
12600
12601 * target.h (target_ops): Add process_qsupported.
12602 (target_process_qsupported): New.
12603
12604 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12605
12606 * inferiors.c (add_thread): Set last_status kind to
12607 TARGET_WAITKIND_IGNORE.
12608 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12609 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12610 (linux_wait_1): Move `thread' local definition to block that uses
12611 it. Don't NULL initialize `event_child'.
12612 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12613 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12614 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12615
12616 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12617
12618 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12619 an extended waitstatus, or by a watchpoint.
12620 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12621 thread was stepping or has been stopped by a watchpoint.
12622
12623 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12624
12625 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12626 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12627 of another, then delete the previous, and validate all
12628 breakpoints.
12629 (validate_inserted_breakpoint): New.
12630 (delete_disabled_breakpoints): New.
12631 (validate_breakpoints): New.
12632 (check_mem_read): Validate breakpoints before trusting their
12633 shadow. Delete disabled breakpoints.
12634 (check_mem_write): Validate breakpoints before trusting they
12635 should be inserted. Delete disabled breakpoints.
12636 * mem-break.h (validate_breakpoints):
12637 * server.c (handle_query): Validate breakpoints when we see a
12638 qSymbol query.
12639
12640 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12641
12642 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12643 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12644 if we could tell there's a GDB breakpoint at stop_pc.
12645 (need_step_over_p): Don't do a step over if we find a GDB
12646 breakpoint at the resume PC.
12647
12648 * mem-break.c (struct raw_breakpoint): New.
12649 (enum bkpt_type): New type `gdb_breakpoint'.
12650 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12651 fields. New field `raw'.
12652 (find_raw_breakpoint_at): New.
12653 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12654 breakpoint instead.
12655 (set_breakpoint_at): Adjust.
12656 (delete_raw_breakpoint): New.
12657 (release_breakpoint): New.
12658 (delete_breakpoint): Rename to...
12659 (delete_breakpoint_1): ... this. Add proc parameter. Use
12660 release_breakpoint. Return ENOENT.
12661 (delete_breakpoint): Reimplement.
12662 (find_breakpoint_at): Delete.
12663 (find_gdb_breakpoint_at): New.
12664 (delete_breakpoint_at): Delete.
12665 (set_gdb_breakpoint_at): New.
12666 (delete_gdb_breakpoint_at): New.
12667 (gdb_breakpoint_here): New.
12668 (set_reinsert_breakpoint): Use release_breakpoint.
12669 (uninsert_breakpoint): Rename to ...
12670 (uninsert_raw_breakpoint): ... this.
12671 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12672 (reinsert_raw_breakpoint): Change parameter type to
12673 raw_breakpoint.
12674 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12675 instead.
12676 (check_breakpoints): Adjust. Use release_breakpoint.
12677 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12678 (breakpoint_inserted_here): Ditto.
12679 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12680 Don't trust the breakpoint's shadow if it is not inserted.
12681 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12682 (delete_all_breakpoints): Adjust.
12683 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12684 use delete_breakpoint_1.
12685
12686 * mem-break.h (breakpoints_supported): Delete declaration.
12687 (set_gdb_breakpoint_at): Declare.
12688 (gdb_breakpoint_here): Declare.
12689 (delete_breakpoint_at): Delete.
12690 (delete_gdb_breakpoint_at): Declare.
12691
12692 * server.h (struct raw_breakpoint): Forward declare.
12693 (struct process_info): New field `raw_breakpoints'.
12694
12695 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12696 breakpoints.
12697
12698 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12699
12700 * linux-low.c (status_pending_p_callback): Fix comment.
12701 (linux_wait_for_event_1): Move most of the internal breakpoint
12702 handling from here...
12703 (linux_wait_1): ... to here.
12704 (count_events_callback): New.
12705 (select_singlestep_lwp_callback): New.
12706 (select_event_lwp_callback): New.
12707 (cancel_breakpoints_callback): New.
12708 (select_event_lwp): New.
12709 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12710 priority to all LWPs that have had events that should be reported
12711 to the client. Cancel breakpoints when about to reporting the
12712 event to the client, not while stopping lwps. No longer cancel
12713 finished single-steps here.
12714 (cancel_finished_single_step): Delete.
12715 (cancel_finished_single_steps): Delete.
12716
12717 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12718
12719 * mem-break.c (enum bkpt_type): New.
12720 (struct breakpoint): New field `type'.
12721 (set_breakpoint_at): Change return type to struct breakpoint
12722 pointer. Set type to `other_breakpoint' by default.
12723 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12724 in the breakpoint list.
12725 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12726 (reinsert_breakpoint): Rename to ...
12727 (reinsert_raw_breakpoint): ... this.
12728 (reinsert_breakpoints_at): Adjust.
12729 * mem-break.h (struct breakpoint): Declare.
12730 (set_breakpoint_at): Change return type to struct breakpoint
12731 pointer.
12732
12733 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12734
12735 * server.c (handle_query): Assign, not compare.
12736
12737 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12738
12739 Teach linux gdbserver to step-over-breakpoints.
12740
12741 * linux-low.c (can_hardware_single_step): New.
12742 (supports_breakpoints): New.
12743 (handle_extended_wait): If stopping threads, read the stop pc of
12744 the new cloned LWP.
12745 (get_pc): New.
12746 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12747 low target doesn't support retrieving the PC.
12748 (add_lwp): Set last_resume_kind to resume_continue.
12749 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12750 (linux_attach): Don't clear stop_expected. Set the lwp's
12751 last_resume_kind to resume_stop.
12752 (linux_detach_one_lwp): Don't check for removed breakpoints.
12753 (check_removed_breakpoint): Delete.
12754 (status_pending_p): Rename to ...
12755 (status_pending_p_callback): ... this. Don't check for removed
12756 breakpoints. Don't consider threads that are stopped from GDB's
12757 perspective.
12758 (linux_wait_for_lwp): Always read the stop_pc here.
12759 (cancel_breakpoint): New.
12760 (step_over_bkpt): New global.
12761 (linux_wait_for_event_1): Implement stepping over breakpoints.
12762 (gdb_wants_lwp_stopped): New.
12763 (gdb_wants_all_stopped): New.
12764 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12765 single-step traps here. Store the thread's last reported target
12766 wait status.
12767 (send_sigstop): Don't clear stop_expected. Always set it,
12768 instead.
12769 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12770 (cancel_finished_single_step): New.
12771 (cancel_finished_single_steps): New.
12772 (wait_for_sigstop): Don't cancel finished single-step traps here.
12773 (linux_resume_one_lwp): Don't check for removed breakpoints.
12774 Don't set `step' on non-hardware step archs.
12775 (linux_set_resume_request): Ignore resume_stop requests if already
12776 stopping or stopped. Set the lwp's last_resume_kind.
12777 (resume_status_pending_p): Don't check for removed breakpoints.
12778 (need_step_over_p): New.
12779 (start_step_over): New.
12780 (finish_step_over): New.
12781 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12782 requests. Clear the thread's last reported target waitstatus.
12783 Don't use the `suspended' flag. Don't consider pending breakpoints.
12784 (linux_resume): Start a step-over if necessary.
12785 (proceed_one_lwp): New.
12786 (proceed_all_lwps): New.
12787 (unstop_all_lwps): New.
12788 * linux-low.h (struct lwp_info): Rewrite comment for the
12789 `suspended' flag. Add the `stop_pc' field. Delete the
12790 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12791 Add `'last_resume_kind' and `need_step_over' fields.
12792 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12793 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12794 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12795 (set_raw_breakpoint_at): New.
12796 (set_breakpoint_at): Rewrite to use it.
12797 (reinsert_breakpoint_handler): Delete.
12798 (set_reinsert_breakpoint): New.
12799 (reinsert_breakpoint_by_bp): Delete.
12800 (delete_reinsert_breakpoints): New.
12801 (uninsert_breakpoint): Rewrite.
12802 (uninsert_breakpoints_at): New.
12803 (reinsert_breakpoint): Rewrite.
12804 (reinsert_breakpoints_at): New.
12805 (check_breakpoints): Rewrite.
12806 (breakpoint_here): New.
12807 (breakpoint_inserted_here): New.
12808 (check_mem_read): Adjust.
12809 * mem-break.h (breakpoints_supported, breakpoint_here)
12810 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12811 (reinsert_breakpoint_by_bp): Delete declaration.
12812 (delete_reinsert_breakpoints): Declare.
12813 (reinsert_breakpoint): Delete declaration.
12814 (reinsert_breakpoints_at): Declare.
12815 (uninsert_breakpoint): Delete declaration.
12816 (uninsert_breakpoints_at): Declare.
12817 (check_breakpoints): Adjust prototype.
12818 * server.h: Adjust include order.
12819 (struct thread_info): Declare here. Add a `last_status' field.
12820
12821 2010-03-23 Michael Snyder <msnyder@vmware.com>
12822
12823 * server.c (crc32): New function.
12824 (handle_query): Add handling for 'qCRC:' request.
12825
12826 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12827
12828 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12829 lwp had been stopped by a watchpoint.
12830
12831 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12832
12833 * server.h (internal_error): Declare.
12834 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12835 * utils.c (internal_error): New function.
12836
12837 2010-03-15 Andreas Schwab <schwab@redhat.com>
12838
12839 * configure.srv: Fix typo setting srv_regobj.
12840
12841 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12842
12843 * linux-low.c (fetch_register): Avoid passing a non string literal
12844 format to `error'.
12845 (usr_store_inferior_registers): Ditto.
12846
12847 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12848
12849 * linux-low.c (linux_write_memory): Bail out early if peeking
12850 memory failed.
12851
12852 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12853
12854 * linux-low.h (struct lwp_info): New fields
12855 `stopped_by_watchpoint' and `stopped_data_address'.
12856 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12857 here, and cache them in the lwp object.
12858 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12859 directly.
12860 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12861 field.
12862 (linux_stopped_by_watchpoint): Rewrite.
12863 (linux_stopped_data_address): Rewrite.
12864
12865 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12866
12867 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12868 switching the current inferior, not before.
12869
12870 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12871
12872 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12873 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12874 i386-linux.c and amd64-linux.c.
12875 (reg-i386.o): Removed.
12876 (reg-i386.c): Likewise.
12877 (reg-i386-linux.o): Likewise.
12878 (reg-i386-linux.c): Likewise.
12879 (reg-x86-64.o): Likewise.
12880 (reg-x86-64.c): Likewise.
12881 (reg-x86-64-linux.o): Likewise.
12882 (reg-x86-64-linux.c): Likewise.
12883 (i386.o): New.
12884 (i386.c): Likewise.
12885 (i386-linux.o): Likewise.
12886 (i386-linux.c): Likewise.
12887 (amd64.o): Likewise.
12888 (amd64.c): Likewise.
12889 (amd64-linux.o): Likewise.
12890 (amd64-linux.c): Likewise.
12891
12892 * configure.srv (srv_i386_regobj): New.
12893 (srv_i386_linux_regobj): Likewise.
12894 (srv_amd64_regobj): Likewise.
12895 (srv_amd64_linux_regobj): Likewise.
12896 (srv_i386_32bit_xmlfiles): Likewise.
12897 (srv_i386_64bit_xmlfiles): Likewise.
12898 (srv_i386_xmlfiles): Likewise.
12899 (srv_amd64_xmlfiles): Likewise.
12900 (srv_i386_linux_xmlfiles): Likewise.
12901 (srv_amd64_linux_xmlfiles): Likewise.
12902 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12903 srv_xmlfiles to $srv_i386_xmlfiles.
12904 (i[34567]86-*-mingw32ce*): Likewise.
12905 (i[34567]86-*-mingw*): Likewise.
12906 (i[34567]86-*-nto*): Likewise.
12907 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12908 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12909 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12910 (x86_64-*-linux*): Likewise.
12911
12912 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12913 (init_registers_amd64_linux): New.
12914 (x86_arch_setup): Replace init_registers_x86_64_linux with
12915 init_registers_amd64_linux.
12916
12917 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12918
12919 * configure.ac: Check for libdl. If it is not available link against
12920 static libthread_db.
12921 * configure: Regenerate.
12922
12923 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12924
12925 PR9605
12926
12927 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12928 handing a read watchpoint.
12929 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12930
12931 2010-02-12 Doug Evans <dje@google.com>
12932
12933 * linux-low.c (linux_supports_tracefork_flag): Document.
12934 (linux_look_up_symbols): Add comment.
12935
12936 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12937
12938 * regcache.c (supply_register): Clear regcache if buf is NULL.
12939
12940 2010-02-02 Nicolas Roche <roche@sourceware.org>
12941 Joel Brobecker <brobecker@adacore.com>
12942
12943 * inferiors.c (find_inferior): Add function documentation.
12944 (unloaded_dll): Handle the case where the unloaded dll has not
12945 been previously registered in the dll list.
12946
12947 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12948
12949 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12950 (thumb2_breakpoint): New.
12951 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12952
12953 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12954
12955 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12956 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12957 breakpoints.
12958
12959 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12960
12961 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12962
12963 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12964
12965 * linux-s390-low.c (s390_collect_ptrace_register)
12966 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12967
12968 2010-01-21 Doug Evans <dje@google.com>
12969
12970 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12971 (PTRACE_ARG4_TYPE): New macro.
12972 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12973 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12974 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12975 (usr_store_inferior_registers): Ditto.
12976 (linux_read_memory, linux_write_memory): Ditto.
12977 (linux_test_for_tracefork): Ditto.
12978
12979 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12980 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12981
12982 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12983
12984 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12985 target.
12986
12987 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12988
12989 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12990 prototype to take a regcache. Adjust.
12991
12992 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12993
12994 * regcache.h (struct thread_info): Forward declare.
12995 (struct regcache): New.
12996 (new_register_cache): Adjust prototype.
12997 (get_thread_regcache): Declare.
12998 (free_register_cache): Adjust prototype.
12999 (registers_to_string, registers_from_string): Ditto.
13000 (supply_register, supply_register_by_name, collect_register)
13001 (collect_register_as_string, collect_register_by_name): Ditto.
13002 * regcache.c (struct inferior_regcache_data): Delete.
13003 (get_regcache): Rename to ...
13004 (get_thread_regcache): ... this. Adjust. Switch inferior before
13005 fetching registers.
13006 (regcache_invalidate_one): Adjust.
13007 (regcache_invalidate): Fix prototype.
13008 (new_register_cache): Return the new register cache.
13009 (free_register_cache): Change prototype.
13010 (realloc_register_cache): Adjust.
13011 (registers_to_string): Change prototype to take a regcache. Adjust.
13012 (registers_from_string): Ditto.
13013 (register_data): Ditto.
13014 (supply_register): Ditto.
13015 (supply_register_by_name): Ditto.
13016 (collect_register): Ditto.
13017 (collect_register_as_string): Ditto.
13018 (collect_register_by_name): Ditto.
13019 * server.c (process_serial_event): Adjust.
13020 * linux-low.h (regset_fill_func, regset_store_func): Change
13021 prototype.
13022 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13023 Change prototype.
13024 * linux-low.c (get_stop_pc): Adjust.
13025 (check_removed_breakpoint): Adjust.
13026 (linux_wait_for_event): Adjust.
13027 (linux_resume_one_lwp): Adjust.
13028 (fetch_register): Add regcache parameter. Adjust.
13029 (usr_store_inferior_registers): Ditto.
13030 (regsets_fetch_inferior_registers): Ditto.
13031 (regsets_store_inferior_registers): Ditto.
13032 (linux_fetch_registers, linux_store_registers): Ditto.
13033 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13034 regcache. Adjust.
13035 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13036 Ditto.
13037 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13038 prototype to take a regcache.
13039 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13040 * remote-utils.c (convert_ascii_to_int, outreg)
13041 (prepare_resume_reply): Change prototype to take a regcache.
13042 Adjust.
13043 * target.h (struct target_ops) <fetch_registers, store_registers>:
13044 Change prototype to take a regcache.
13045 (fetch_inferior_registers, store_inferior_registers): Change
13046 prototype to take a regcache. Adjust.
13047 * proc-service.c (ps_lgetregs): Adjust.
13048 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13049 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13050 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13051 take a regcache. Adjust.
13052 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13053 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13054 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13055 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13056 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13057 (cris_cannot_fetch_register):
13058 (cris_breakpoint_at): Change prototype to take a regcache.
13059 Adjust.
13060 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13061 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13062 to take a regcache. Adjust.
13063 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13064 Adjust.
13065 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13066 take a regcache. Adjust.
13067 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13068 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13069 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13070 * linux-mips-low.c (mips_get_pc):
13071 (mips_set_pc): Change prototype to take a regcache. Adjust.
13072 (mips_reinsert_addr): Adjust.
13073 (mips_collect_register): Change prototype to take a regcache.
13074 Adjust.
13075 (mips_supply_register):
13076 (mips_collect_register_32bit, mips_supply_register_32bit)
13077 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13078 (mips_store_fpregset): Ditto.
13079 * linux-ppc-low.c (ppc_supply_ptrace_register)
13080 (ppc_supply_ptrace_register): Ditto.
13081 (parse_spufs_run): Adjust.
13082 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13083 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13084 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13085 take a regcache. Adjust.
13086 * linux-s390-low.c (s390_collect_ptrace_register)
13087 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13088 (s390_set_pc): Change prototype to take a regcache. Adjust.
13089 (s390_arch_setup): Adjust.
13090 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13091 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13092 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13093 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13094 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13095 regcache. Adjust.
13096 (sparc_breakpoint_at): Adjust.
13097 * linux-xtensa-low.c (xtensa_fill_gregset):
13098 (xtensa_store_gregset):
13099 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13100 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13101 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13102 prototype to take a regcache. Adjust.
13103 * win32-arm-low.c (arm_fetch_inferior_register)
13104 (arm_store_inferior_register): Change prototype to take a
13105 regcache. Adjust.
13106 * win32-i386-low.c (i386_fetch_inferior_register)
13107 (i386_store_inferior_register): Change prototype to take a
13108 regcache. Adjust.
13109 * win32-low.c (child_fetch_inferior_registers)
13110 (child_store_inferior_registers): Change prototype to take a
13111 regcache. Adjust.
13112 (win32_wait): Adjust.
13113 (win32_fetch_inferior_registers): Change prototype to take a
13114 regcache. Adjust.
13115 (win32_store_inferior_registers): Adjust.
13116 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13117 store_inferior_register>: Change prototype to take a regcache.
13118
13119 2010-01-20 Doug Evans <dje@google.com>
13120
13121 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13122 #ifdef.
13123 (linux_wait_for_event1, linux_init_signals): Ditto.
13124 (W_STOPCODE): Provide definition if missing.
13125
13126 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13127
13128 * linux-low.c (linux_core_of_thread): New.
13129 (compare_ints, show_process, list_threads): New.
13130 (linux_qxfer_osdata): Report threads and cores.
13131 (linux_target_op): Register linux_core_of_thread.
13132 * remote-utils.c (prepare_resume_reply): Report the core.
13133 (buffer_xml_printf): Support %d specifier.
13134 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13135 New.
13136 (handle_query): Handle qXfer:threads. Announce availability
13137 thereof.
13138 * target.h (struct target_ops): New field core_of_thread.
13139
13140 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13141
13142 * Makefile.in (clean): Remove new generated files.
13143 (reg-s390.o, reg-s390.c): Remove rules.
13144 (reg-s390x.o, reg-s390x.c): Likewise.
13145 (s390-linux32.o, s390-linux32.c): Add rules.
13146 (s390-linux64.o, s390-linux64.c): Likewise.
13147 (s390x-linux64.o, s390x-linux64.c): Likewise.
13148 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13149 * linux-s390-low.c: Include <elf.h>.
13150 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13151 (init_registers_s390): Remove prototype.
13152 (init_registers_s390x): Likewise.
13153 (init_registers_s390_linux32): Add prototype.
13154 (init_registers_s390_linux64): Likewise.
13155 (init_registers_s390x_linux64): Likewise.
13156 (s390_num_regs_3264): New define.
13157 (s390_regmap_3264): New global variable.
13158 (s390_cannot_fetch_register): Remove obsolete check.
13159 (s390_cannot_store_register): Likewise.
13160 (s390_collect_ptrace_register): Handle upper/lower register halves.
13161 (s390_supply_ptrace_register): Likewise.
13162 (s390_fill_gregset): Update to register number changes.
13163 (s390_get_hwcap): New routine.
13164 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13165 Install appropriate regmap and register set.
13166
13167 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13168
13169 * server.c (gdbserver_version): Update copyright year to 2010.
13170 * gdbreplay.c (gdbreplay_version): Likewise.
13171
13172 2009-12-28 Doug Evans <dje@google.com>
13173
13174 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13175 elf/external.h. Include <elf.h> instead but only if necessary.
13176
13177 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13178
13179 * linux-low.c (linux_remove_process): Remove `detaching'
13180 parameter. Don't release/detach from thread_db here.
13181 (linux_kill): Release/detach from thread_db here, ...
13182 (linux_detach): ... and here, before actually detaching.
13183 (linux_wait_1): ... and here, when a process exits.
13184 * thread-db.c (any_thread_of): New.
13185 (thread_db_free): Switch the current inferior to a thread of the
13186 passed in process.
13187
13188 2009-12-21 Doug Evans <dje@google.com>
13189
13190 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13191
13192 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13193 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13194 warning ifndef __NR_tkill. Move setting of errno there too.
13195 Delete unnecessary resetting of errno after syscall.
13196 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13197
13198 * configure.ac: Check for dladdr.
13199 * config.in: Regenerate.
13200 * configure: Regenerate.
13201 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13202 (try_thread_db_load): Update.
13203
13204 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13205
13206 2009-12-18 Doug Evans <dje@google.com>
13207
13208 * event-loop.c: Include unistd.h if it exists.
13209
13210 * linux-low.c (my_waitpid): Move definition away from being in
13211 between linux_tracefork_child/linux_test_for_tracefork.
13212
13213 * gdb_proc_service.h (psaddr_t): Fix type.
13214 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13215 signature to match glibc.
13216
13217 2009-12-16 Doug Evans <dje@google.com>
13218
13219 * linux-low.c (linux_read_memory): Fix argument to read.
13220
13221 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13222
13223 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13224 events, don't leave current_inferior pointing at null.
13225
13226 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13227
13228 * win32-low.c (LOG): Delete.
13229 (OUTMSG): Output to stderr.
13230 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13231 on compile time LOG macro.
13232 (win32_wait): Fix debug output.
13233
13234 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13235
13236 * win32-low.c (win32_add_one_solib): If the dll name is
13237 "ntdll.dll", prepend the system directory to the dll path.
13238
13239 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13240
13241 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13242
13243 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13244 Vladimir Prus <vladimir@codesourcery.com>
13245
13246 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13247 * configure.ac: Check for __mcoldfire__ and set
13248 gdb_cv_m68k_is_coldfire.
13249 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13250 reg-cf.o and reg-m68k.o.
13251 * configure: Regenerated.
13252
13253 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13254
13255 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13256 Pass it to thread_db_free.
13257 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13258 proper `detaching' argument to linux_remove_process.
13259 * linux-low.h (thread_db_free): Add `detaching' parameter.
13260 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13261 to thread_db_free.
13262 (thread_db_free): Add `detaching' parameter. Only
13263 call td_ta_clear_event if detaching from process.
13264
13265 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13266
13267 * thread-db.c (thread_db_free): Fix typo.
13268
13269 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13270
13271 PR gdb/10838
13272 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13273
13274 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13275
13276 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13277 with an i686 compiler.
13278 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13279 needed.
13280 * configure: Rebuilt.
13281
13282 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13283
13284 PR gdb/10783
13285
13286 * server.c (handle_search_memory_1): Correct read_addr initialization
13287 in loop for searching subsequent chunks.
13288
13289 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13290
13291 * configure.ac: New --with-libthread-db option.
13292 * thread-db.c: Allow direct dependence on libthread_db.
13293 (thread_db_free): Adjust.
13294 * config.in: Regenerate.
13295 * configure: Likewise.
13296
13297 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13298
13299 PR gdb/10757
13300 * thread-db.c (attach_thread): New function.
13301 (maybe_attach_thread): Return success/failure.
13302 (find_new_threads_callback): Adjust.
13303 (thread_db_find_new_threads): Loop until no new threads.
13304
13305 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13306
13307 * proc-service.c (ps_lgetregs): Formatting.
13308
13309 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13310
13311 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13312 * configure.ac: Adjust.
13313 * linux-low.h (struct process_info_private): Move members to struct
13314 thread_db.
13315 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13316 * linux-low.c (linux_remove_process): Adjust.
13317 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13318 * server.c (handle_query): Move code ...
13319 (handle_monitor_command): ... here. New function.
13320 * target.h (struct target_ops): New member.
13321 * thread-db.c (struct thread_db): New.
13322 (libthread_db_search_path): New variable.
13323 (thread_db_create_event, thread_db_enable_reporting)
13324 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13325 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13326 (try_thread_db_load_1, dladdr_to_soname): New functions.
13327 (try_thread_db_load, thread_db_load_search): New functions.
13328 (thread_db_init): Search for libthread_db.
13329 (thread_db_free): New function.
13330 (thread_db_handle_monitor_command): Likewise.
13331 * config.in: Regenerate.
13332 * configure: Regenerate.
13333
13334 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13335
13336 * spu-low.c (spu_kill): Wait for inferior to terminate.
13337 Call clear_inferiors.
13338 (spu_detach): Call clear_inferiors.
13339
13340 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13341
13342 * aclocal.m4: Regenerate.
13343 * config.in: Likewise.
13344 * configure: Likewise.
13345
13346 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13347
13348 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13349 (parse_spufs_run): New function.
13350 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13351 (ppc_breakpoint_at): Handle SPU breakpoints.
13352
13353 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13354
13355 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13356 (SPUFS_MAGIC): Define.
13357 (spu_enumerate_spu_ids): New function.
13358 (linux_qxfer_spu): New function.
13359 (linux_target_ops): Install linux_qxfer_spu.
13360
13361 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13362
13363 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13364 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13365 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13366 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13367 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13368 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13369 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13370 (init_registers_powerpc_cell32l): Add prototype.
13371 (init_registers_powerpc_cell64l): Likewise.
13372 (ppc_arch_setup): Detect Cell/B.E. architecture.
13373
13374 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13375
13376 * Makefile.in (datarootdir): New variable.
13377
13378 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13379
13380 * linux-low.c (linux_write_memory): Update debugging output.
13381 * Makefile.in (clean): Add new descriptions.
13382 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13383 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13384 * configure.srv: Add new files for arm*-*-linux*.
13385 * linux-arm-low.c: Add new declarations.
13386 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13387 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13388 (HWCAP_VFPv3D16): New.
13389 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13390 instead of __IWMMXT__.
13391 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13392 (arm_arch_setup): New.
13393 (target_regsets): Remove #ifdef. Add VFP regset.
13394 (the_low_target): Use arm_arch_setup.
13395
13396 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13399 the main thread again.
13400
13401 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13402
13403 Adding Neutrino gdbserver.
13404 * configure: Regenerated.
13405 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13406 * configure.srv (i[34567]86-*-nto*): New target.
13407 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13408 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13409 (nto_comctrl) [__QNX__]: New function.
13410 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13411
13412 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13413
13414 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13415 srv_tgtobj.
13416
13417 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13418 Pedro Alves <pedro@codesourcery.com>
13419
13420 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13421 don't support CONTEXT_EXTENDED_REGISTERS.
13422 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13423 (the_low_target): Install them.
13424 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13425 failing with ERROR_PIPE_NOT_CONNECTED.
13426
13427 2009-06-30 Doug Evans <dje@google.com>
13428 Pierre Muller <muller@ics.u-strasbg.fr>
13429
13430 Add h/w watchpoint support to x86-linux, win32-i386.
13431 * Makefile.in (SFILES): Add i386-low.c
13432 (i386_low_h): Define.
13433 (i386-low.o): Add dependencies.
13434 (linux-x86-low.o): Add i386-low.h dependency.
13435 (win32-i386-low.o): Ditto.
13436 * i386-low.c: New file.
13437 * i386-low.h: New file.
13438 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13439 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13440 * linux-low.c (linux_add_process): Initialize arch_private.
13441 (linux_remove_process): Free arch_private.
13442 (add_lwp): Initialize arch_private.
13443 (delete_lwp): Free arch_private.
13444 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13445 provided.
13446 * linux-low.h (process_info_private): New member arch_private.
13447 (lwp_info): New member arch_private.
13448 (linux_target_ops): New members new_process, new_thread,
13449 prepare_to_resume.
13450 (ptid_of): New macro.
13451 * linux-x86-low.c: Include stddef.h, i386-low.h.
13452 (arch_process_info): New struct.
13453 (arch_lwp_info): New struct.
13454 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13455 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13456 (i386_dr_low_get_status): New function.
13457 (x86_insert_point, x86_remove_point): New functions.
13458 (x86_stopped_by_watchpoint): New function.
13459 (x86_stopped_data_address): New function.
13460 (x86_linux_new_process, x86_linux_new_thread): New functions.
13461 (x86_linux_prepare_to_resume): New function.
13462 (the_low_target): Add entries for insert_point, remove_point,
13463 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13464 prepare_to_resume.
13465 * server.c (debug_hw_points): New global.
13466 (monitor_show_help): Document set debug-hw-points.
13467 (handle_query): Process "set debug-hw-points".
13468 * server.h (debug_hw_points): Declare.
13469 (paddress): Declare.
13470 * utils.c (NUMCELLS, CELLSIZE): New macros.
13471 (get_sell, xsnprintf, paddress): New functions.
13472 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13473 remove_point, stopped_by_watchpoint, stopped_data_address.
13474 * win32-i386-low.c: Include i386-low.h.
13475 (debug_reg_state): Replaces dr.
13476 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13477 (i386_dr_low_get_status): New function.
13478 (i386_insert_point, i386_remove_point): New functions.
13479 (i386_stopped_by_watchpoint): New function.
13480 (i386_stopped_data_address): New function.
13481 (i386_initial_stuff): Update.
13482 (get_thread_context,set_thread_context,i386_thread_added): Update.
13483 (the_low_target): Add entries for insert_point,
13484 remove_point, stopped_by_watchpoint, stopped_data_address.
13485 * win32-low.c (win32_insert_watchpoint): New function.
13486 (win32_remove_watchpoint): New function.
13487 (win32_stopped_by_watchpoint): New function.
13488 (win32_stopped_data_address): New function.
13489 (win32_target_ops): Add entries for insert_watchpoint,
13490 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13491 * win32-low.h (win32_target_ops): New members insert_point,
13492 remove_point, stopped_by_watchpoint, stopped_data_address.
13493
13494 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13495
13496 * server.c (process_serial_event): Re-return unsupported, not
13497 error, if the type isn't recognized. Re-allow supporting only
13498 insert or remove packets. Also call require_running for
13499 breakpoints. Add missing break statement to default case. Tidy.
13500 * target.h (struct target_ops): Rename insert_watchpoint to
13501 insert_point, and remove_watchpoint to remove_point.
13502
13503 * linux-low.h (struct linux_target_ops): Likewise.
13504 * linux-low.c (linux_insert_watchpoint): Rename to ...
13505 (linux_insert_point): ... this. Adjust.
13506 (linux_remove_watchpoint): Rename to ...
13507 (linux_remove_point): ... this. Adjust.
13508 (linux_target_ops): Adjust.
13509 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13510 (cris_insert_point): ... this.
13511 (cris_remove_watchpoint): Rename to ...
13512 (cris_remove_point): ... this.
13513 (the_low_target): Adjust.
13514
13515 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13516
13517 * server.c (handle_v_kill): Pass signal_pid to
13518 kill_inferior if multi_process is zero.
13519
13520 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13521
13522 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13523 * target.h (target_ops): Comment for *_watchpoint to make it clear
13524 the functions can get types '0' and '1'.
13525
13526 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13527
13528 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13529 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13530 * regcache.c (get_regcache): Likewise.
13531 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13532 * win32-low.c (child_fetch_inferior_registers): Remove check for
13533 regno 0.
13534
13535 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13536 Pedro Alves <pedro@codesourcery.com>
13537
13538 * target.h (struct target_ops) <supports_multi_process>: New
13539 callback.
13540 (target_supports_multi_process): New.
13541 * server.c (handle_query): Even if GDB reports support, only
13542 enable multi-process if the target also supports it. Report
13543 multi-process support only if the target backend supports it.
13544 * linux-low.c (linux_supports_multi_process): New function.
13545 (linux_target_ops): Install it as target_supports_multi_process
13546 callback.
13547
13548 2009-05-24 Doug Evans <dje@google.com>
13549
13550 Global renaming of find_thread_pid to find_thread_ptid.
13551 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13552 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13553 All callers updated.
13554
13555 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13556 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13557 directly.
13558
13559 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13560 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13561 (linux_resume_one_lwp): Ditto.
13562
13563 2009-05-23 Doug Evans <dje@google.com>
13564
13565 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13566 from struct inferior_list_entry * to struct lwp_info *.
13567 All callers updated.
13568
13569 2009-05-13 Doug Evans <dje@google.com>
13570
13571 * linux-x86-low.c: Don't include assert.h.
13572 (x86_siginfo_fixup): Use fatal, not assert.
13573 (x86_arch_setup): Fix comment.
13574
13575 2009-05-12 Doug Evans <dje@google.com>
13576
13577 Biarch support for i386/amd64 gdbserver.
13578 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13579 Add linux-x86-low.c.
13580 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13581 (linux-x86-low.o): Add.
13582 * linux-x86-64-low.c: Delete.
13583 * linux-i386-low.c: Delete.
13584 * linux-x86-low.c: New file.
13585 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13586 linux-x86-low.o.
13587 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13588 linux-x86-low.o.
13589 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13590 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13591 (linux_child_pid_to_exec_file): New function.
13592 (elf_64_header_p, elf_64_file_p): New functions.
13593 (siginfo_fixup): New function.
13594 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13595 give target a chance to convert layout.
13596 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13597 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13598
13599 2009-05-07 Doug Evans <dje@google.com>
13600
13601 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13602 (regsets_store_inferior_registers): Ditto.
13603
13604 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13605
13606 PR server/10048
13607
13608 * linux-low.c (must_set_ptrace_flags): Delete.
13609 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13610 of the global.
13611 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13612 `lwp->must_set_ptrace_flags' instead.
13613 (linux_wait_for_event_1): Set ptrace options here.
13614 (linux_wait_1): ... not here.
13615
13616 2009-04-30 Doug Evans <dje@google.com>
13617
13618 * inferiors.c (started_inferior_callback): New function.
13619 (attached_inferior_callback): New function.
13620 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13621 * server.c (print_started_pid, print_attached_pid): New functions.
13622 (detach_or_kill_for_exit): New function.
13623 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13624 * server.h (have_started_inferiors_p): Declare.
13625 (have_attached_inferiors_p): Declare.
13626
13627 * inferiors.c (remove_process): Fix memory leak, free process.
13628 * linux-low.c (linux_remove_process): New function.
13629 (linux_kill): Call it instead of remove_process.
13630 (linux_detach, linux_wait_1): Ditto.
13631
13632 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13633
13634 * configure.srv: Add x86 Windows CE target.
13635
13636 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13637
13638 * inferiors.c (get_thread_process): Make global.
13639 * server.h (get_thread_process): Add prototype.
13640 * thread-db.c (find_one_thread): Use get_thread_process
13641 instead of current_process.
13642 (thread_db_get_tls_address): Do not crash if called when
13643 thread layer is not yet initialized.
13644
13645 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13648 * spu-low.c (current_tid): Rename to ...
13649 (current_ptid): ... this.
13650 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13651 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13652 ptid_get_lwp (current_ptid) instead of current_tid.
13653 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13654 instead of current_tid. Use find_process_pid to verify pid
13655 argument is valid. Pass proper argument to remove_process.
13656 (spu_thread_alive): Compare current_ptid instead of current_tid.
13657 (spu_resume): Likewise.
13658
13659 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13660
13661 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13662 variable.
13663
13664 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13665
13666 Implement the multiprocess extensions, and add linux multiprocess
13667 support.
13668
13669 * server.h (ULONGEST): Declare.
13670 (struct ptid, ptid_t): New.
13671 (minus_one_ptid, null_ptid): Declare.
13672 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13673 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13674 (struct inferior_list_entry): Change `id' type from unsigned from
13675 to ptid_t.
13676 (struct sym_cache, struct breakpoint, struct
13677 process_info_private): Forward declare.
13678 (struct process_info): Declare.
13679 (current_process): Declare.
13680 (all_processes): Declare.
13681 (initialize_inferiors): Declare.
13682 (add_thread): Adjust to use ptid_t.
13683 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13684 (add_process, remove_process, find_thread_pid): Declare.
13685 (find_inferior_id): Adjust to use ptid_t.
13686 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13687 (multi_process): Declare.
13688 (push_event): Adjust to use ptid_t.
13689 (read_ptid, write_ptid): Declare.
13690 (prepare_resume_reply): Adjust to use ptid_t.
13691 (clear_symbol_cache): Declare.
13692 * inferiors.c (all_processes): New.
13693 (null_ptid, minus_one_ptid): New.
13694 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13695 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13696 (add_thread): Change unsigned long to ptid. Remove gdb_id
13697 parameter. Adjust.
13698 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13699 (gdb_id_to_thread): Rename to ...
13700 (find_thread_pid): ... this. Change unsigned long to ptid.
13701 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13702 (loaded_dll, pull_pid_from_list): Adjust.
13703 (add_process, remove_process, find_process_pid)
13704 (get_thread_process, current_process, initialize_inferiors): New.
13705 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13706 (struct target_waitstatus) <related_pid>: Ditto.
13707 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13708 return type to int.
13709 (struct target_ops) <join>: Add `pid' argument.
13710 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13711 (struct target_ops) <wait>: Add `ptid' field. Change return type
13712 to ptid.
13713 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13714 (mywait): Add `ptid' argument. Change return type to ptid_t.
13715 (target_pid_to_str): Declare.
13716 * target.c (set_desired_inferior): Adjust to use ptids.
13717 (mywait): Add new `ptid' argument. Adjust.
13718 (target_pid_to_str): New.
13719 * mem-break.h (free_all_breakpoints): Declare.
13720 * mem-break.c (breakpoints): Delelete.
13721 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13722 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13723 to use per-process breakpoint list.
13724 (free_all_breakpoints): New.
13725 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13726 (symbol_cache, all_symbols_looked_up): Delete.
13727 (hexchars): New.
13728 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13729 read_ptid): New.
13730 (prepare_resume_reply): Change ptid argument's type from unsigned
13731 long to ptid_t. Adjust. Implement W;process and X;process.
13732 (free_sym_cache, clear_symbol_cache): New.
13733 (look_up_one_symbol): Adjust to per-process symbol cache. *
13734 * server.c (cont_thread, general_thread, step_thread): Change type
13735 to ptid_t.
13736 (attached): Delete.
13737 (multi_process): New.
13738 (last_ptid): Change type to ptid_t.
13739 (struct vstop_notif) <ptid>: Change type to ptid_t.
13740 (queue_stop_reply, push_event): Change `ptid' argument's type to
13741 ptid_t.
13742 (discard_queued_stop_replies): Add `pid' argument.
13743 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13744 changes. Don't reference the `attached' global.
13745 (attach_inferior): Adjust to mywait interface changes.
13746 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13747 features. Handle and report "multiprocess+". Handle
13748 "qAttached:PID".
13749 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13750 changes.
13751 (handle_v_kill): New.
13752 (handle_v_stopped): Adjust to use target_pid_to_str.
13753 (handle_v_requests): Allow multiple attaches and runs when
13754 multiprocess extensions are in effect. Handle "vKill".
13755 (myresume): Adjust to use ptids.
13756 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13757 (handle_status): Adjust to discard_queued_stop_replies interface
13758 change.
13759 (first_thread_of, kill_inferior_callback)
13760 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13761 (main): Call initialize_inferiors. Adjust to use ptids, killing
13762 and detaching from all inferiors. Handle multiprocess packet
13763 variants.
13764 * linux-low.h: Include gdb_proc_service.h.
13765 (struct process_info_private): New.
13766 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13767 <lwpid_of>: Use ptid_get_lwp.
13768 (get_lwp_thread): Adjust.
13769 (struct lwp_info): Add `dead' member.
13770 (find_lwp_pid): Declare.
13771 * linux-low.c (thread_db_active): Delete.
13772 (new_inferior): Adjust comment.
13773 (inferior_pid): Delete.
13774 (linux_add_process): New.
13775 (handle_extended_wait): Adjust.
13776 (add_lwp): Change unsigned long to ptid.
13777 (linux_create_inferior): Add process to processes table. Adjust
13778 to use ptids. Don't set new_inferior here.
13779 (linux_attach_lwp): Rename to ...
13780 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13781 it. Adjust to use ptids.
13782 (linux_attach_lwp): New.
13783 (linux_attach): Add process to processes table. Don't set
13784 new_inferior here.
13785 (struct counter): New.
13786 (second_thread_of_pid_p, last_thread_of_process_p): New.
13787 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13788 multiple processes.
13789 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13790 processes. Remove process from process table.
13791 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13792 to multiple processes.
13793 (any_thread_of): New.
13794 (linux_detach): Add `pid' argument, and handle it. Remove process
13795 from processes table.
13796 (linux_join): Add `pid' argument. Handle it.
13797 (linux_thread_alive): Change unsighed long argument to ptid_t.
13798 Consider dead lwps as not being alive.
13799 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13800 threads we're not interested in.
13801 (same_lwp, find_lwp_pid): New.
13802 (linux_wait_for_lwp): Change `pid' argument's type from int to
13803 ptid_t. Adjust.
13804 (linux_wait_for_event): Rename to ...
13805 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13806 from int to ptid_t. Adjust.
13807 (linux_wait_for_event): New.
13808 (linux_wait_1): Add `ptid' argument. Change return type to
13809 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13810 that exit from the process table.
13811 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13812 Adjust.
13813 (mark_lwp_dead): New.
13814 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13815 stopping all threads, mark its main lwp as dead.
13816 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13817 ptids.
13818 (fetch_register, usr_store_inferior_registers)
13819 (regsets_fetch_inferior_registers)
13820 (regsets_store_inferior_registers, linux_read_memory)
13821 (linux_write_memory): Inline `inferior_pid'.
13822 (linux_look_up_symbols): Adjust to use per-process
13823 `thread_db_active'.
13824 (linux_request_interrupt): Adjust to use ptids.
13825 (linux_read_auxv): Inline `inferior_pid'.
13826 (initialize_low): Don't reference thread_db_active.
13827 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13828 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13829 (ps_getpid): Return the pid of the current inferior.
13830 * thread-db.c (proc_handle, thread_agent): Delete.
13831 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13832 per-process data.
13833 (find_one_thread): Change argument type to ptid_t. Adjust to
13834 per-process data.
13835 (maybe_attach_thread): Adjust to per-process data and ptids.
13836 (thread_db_find_new_threads): Ditto.
13837 (thread_db_init): Ditto.
13838 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13839 processes table. Adjust to use ptids.
13840 (spu_kill, spu_detach): Adjust interface. Remove process from
13841 processes table.
13842 (spu_join, spu_thread_alive): Adjust interface.
13843 (spu_wait): Adjust interface. Remove process from processes
13844 table. Adjust to use ptids.
13845 * win32-low.c (current_inferior_tid): Delete.
13846 (current_inferior_ptid): New.
13847 (debug_event_ptid): New.
13848 (thread_rec): Take a ptid. Adjust.
13849 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13850 (child_delete_thread): Ditto.
13851 (do_initial_child_stuff): Add `attached' argument. Add process to
13852 processes table.
13853 (child_fetch_inferior_registers, child_store_inferior_registers):
13854 Adjust.
13855 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13856 (win32_attach): Pass 1 to do_initial_child_stuff.
13857 (win32_kill): Adjust interface. Remove process from processes
13858 table.
13859 (win32_detach): Ditto.
13860 (win32_join): Adjust interface.
13861 (win32_thread_alive): Take a ptid.
13862 (win32_resume): Adjust to use ptids.
13863 (get_child_debug_event): Ditto.
13864 (win32_wait): Adjust interface. Remove exiting process from
13865 processes table.
13866
13867 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13868
13869 Non-stop mode support.
13870
13871 * server.h (non_stop): Declare.
13872 (gdb_client_data, handler_func): Declare.
13873 (delete_file_handler, add_file_handler, start_event_loop):
13874 Declare.
13875 (handle_serial_event, handle_target_event, push_event)
13876 (putpkt_notif): Declare.
13877 * target.h (enum resume_kind): New.
13878 (struct thread_resume): Replace `step' field by `kind' field.
13879 (TARGET_WNOHANG): Define.
13880 (struct target_ops) <wait>: Add `options' argument.
13881 <supports_non_stop, async, start_non_stop>: New fields.
13882 (target_supports_non_stop, target_async): New.
13883 (start_non_stop): Declare.
13884 (mywait): Add `options' argument.
13885 * target.c (mywait): Add `options' argument. Print child exit
13886 notifications here.
13887 (start_non_stop): New.
13888 * server.c (non_stop, own_buf, mem_buf): New globals.
13889 (struct vstop_notif): New.
13890 (notif_queue): New global.
13891 (queue_stop_reply, push_event, discard_queued_stop_replies)
13892 (send_next_stop_reply): New.
13893 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13894 interface changes.
13895 (attach_inferior): In non-stop mode, don't wait for the target
13896 here.
13897 (handle_general_set): Handle QNonStop.
13898 (handle_query): When handling qC, return the current general
13899 thread, instead of the first thread of the list.
13900 (handle_query): If the backend supports non-stop mode, include
13901 QNonStop+ in the qSupported query response.
13902 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13903 and non-stop mode.
13904 (handle_v_attach, handle_v_run): Handle non-stop mode.
13905 (handle_v_stopped): New.
13906 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13907 (myresume): Adjust to use resume_kind. Handle non-stop.
13908 (queue_stop_reply_callback): New.
13909 (handle_status): Handle non-stop mode.
13910 (main): Clear non_stop flag on reconnection. Use the event-loop.
13911 Refactor serial protocol handling from here ...
13912 (process_serial_event): ... to this new function. When GDB
13913 selects any thread, select one here. In non-stop mode, wait until
13914 GDB acks all pending events before exiting.
13915 (handle_serial_event, handle_target_event): New.
13916 * remote-utils.c (remote_open): Install remote_desc in the event
13917 loop.
13918 (remote_close): Remove remote_desc from the event loop.
13919 (putpkt_binary): Rename to...
13920 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13921 (putpkt_binary): New as wrapper around putpkt_binary_1.
13922 (putpkt_notif): New.
13923 (prepare_resume_reply): In non-stop mode, don't change the
13924 general_thread.
13925 * event-loop.c: New.
13926 * Makefile.in (OBJ): Add event-loop.o.
13927 (event-loop.o): New rule.
13928
13929 * linux-low.h (pid_of): Moved here.
13930 (lwpid_of): New.
13931 (get_lwp_thread): Use lwpid_of.
13932 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13933 * linux-low.c (pid_of): Delete.
13934 (inferior_pid): Use lwpid_of.
13935 (linux_event_pipe): New.
13936 (target_is_async_p): New.
13937 (delete_lwp): New.
13938 (handle_extended_wait): Use lwpid_of.
13939 (add_lwp): Don't set lwpid field.
13940 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13941 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13942 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13943 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13944 first. Adjust to linux_wait_for_event interface changes. Use
13945 lwpid_of.
13946 (linux_detach): Don't delete the main lwp here.
13947 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13948 (status_pending_p): Don't consider explicitly suspended lwps.
13949 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13950 pointer. Add OPTIONS argument. Change return type to int. Use
13951 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13952 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13953 pointer. Add status pointer argument. Return a pid instead of a
13954 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13955 changes. In non-stop mode, don't switch to a random thread.
13956 (linux_wait): Rename to...
13957 (linux_wait_1): ... this. Add target_options argument, and handle
13958 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13959 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13960 clean exit and signal exit code. Don't stop all threads in
13961 non-stop mode. In all-stop mode, only stop all threads when
13962 reporting a stop to GDB. Handle explicit thread stop requests.
13963 (async_file_flush, async_file_mark): New.
13964 (linux_wait): New.
13965 (send_sigstop): Use lwpid_of.
13966 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13967 interface changes. In non-stop mode, don't switch to a random
13968 thread.
13969 (linux_resume_one_lwp): Use lwpid_of.
13970 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13971 (linux_resume_one_thread): ... this. Handle resume_stop. In
13972 non-stop mode, don't look for pending flag in all threads.
13973 (resume_status_pending_p): Don't consider explicitly suspended
13974 threads.
13975 (my_waitpid): Reimplement. Emulate __WALL.
13976 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13977 Use lwpid_of.
13978 (sigchld_handler, linux_supports_non_stop, linux_async)
13979 (linux_start_non_stop): New.
13980 (linux_target_ops): Register linux_supports_non_stop, linux_async
13981 and linux_start_non_stop.
13982 (initialize_low): Install SIGCHLD handler.
13983 * thread-db.c (thread_db_create_event, find_one_thread)
13984 (thread_db_get_tls_address): Use lwpid_of.
13985 * win32-low.c (win32_detach): Adjust to use resume_kind.
13986 (win32_wait): Add `options' argument.
13987 * spu-low.c (spu_resume): Adjust to use resume_kind.
13988 (spu_wait): Add `options' argument.
13989
13990 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13991
13992 Decouple target code from remote protocol.
13993
13994 * target.h (enum target_waitkind): New.
13995 (struct target_waitstatus): New.
13996 (struct target_ops) <wait>: Return an unsigned long. Take a
13997 target_waitstatus pointer instead of a char pointer.
13998 (mywait): Likewise.
13999 * target.c (mywait): Change prototype to return an unsigned long.
14000 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14001 * server.h (thread_from_wait, old_thread_from_wait): Delete
14002 declarations.
14003 (prepare_resume_reply): Change prototype to take a
14004 target_waitstatus.
14005 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14006 (last_status, last_ptid): New.
14007 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14008 pid instead of a signal.
14009 (attach_inferior): Remove "status" and "signal" parameters.
14010 Adjust.
14011 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14012 not as an address.
14013 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14014 (handle_v_requests, myresume): Remove "status" and "signal"
14015 parameters. Adjust.
14016 (handle_status): New.
14017 (main): Delete local `status'. Adjust.
14018 * remote-utils.c: Include target.h.
14019 (prepare_resume_reply): Change prototype to take a
14020 target_waitstatus. Adjust.
14021
14022 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14023 interface.
14024 * spu-low.c (spu_wait): Adjust.
14025 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14026 Delete.
14027 (win32_wait): Adjust.
14028
14029 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14030
14031 * target.h (struct thread_resume): Delete leave_stopped member.
14032 (struct target_ops): Add a `n' argument to the `resume' callback.
14033 * server.c (start_inferior): Adjust.
14034 (handle_v_cont, myresume): Adjust.
14035 * linux-low.c (check_removed_breakpoint): Adjust to resume
14036 interface change, and to removed leave_stopped field.
14037 (resume_ptr): Delete.
14038 (struct thread_resume_array): New.
14039 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14040 resume interface change.
14041 (linux_continue_one_thread, linux_queue_one_thread)
14042 (resume_status_pending_p): Check if the resume field is NULL
14043 instead of checking the leave_stopped member.
14044 (linux_resume): Adjust to the target resume interface change.
14045 * spu-low.c (spu_resume): Adjust to the target resume interface
14046 change.
14047 * win32-low.c (win32_detach, win32_resume): Ditto.
14048
14049 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14050
14051 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14052 flag.
14053 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14054 pending.
14055 (linux_continue_one_thread): Only preserve the stepping flag if
14056 there's a pending breakpoint.
14057
14058 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14059
14060 * server.c (main): After the inferior having exited, call
14061 remote_close before exiting gdbserver.
14062
14063 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14064
14065 Fix size of FPSCR in Power 7 processors.
14066 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14067 (PPC_FEATURE_HAS_DFP): New #define.
14068 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14069 size of the FPSCR.
14070
14071 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14072
14073 * server.c (handle_query) Whitespace and formatting.
14074
14075 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14076
14077 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14078 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14079 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14080 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14081 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14082 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14083 Makefile.in, configure.ac: Fix whitespace throughout.
14084 * configure: Regenerate.
14085
14086 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14087
14088 * inferiors.c (find_inferior): Make it safe for the callback
14089 function to delete the currently iterated inferior.
14090
14091 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14092
14093 * Makefile.in (linuw_low_h): Move higher.
14094 (thread-db.o): Depend on $(linux_low_h).
14095
14096 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14097
14098 Rename "process" to "lwp" throughout.
14099
14100 * linux-low.c (all_processes): Rename to...
14101 (all_lwps): ... this.
14102 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14103 (add_process): Rename to ...
14104 (add_lwp): ... this. Adjust.
14105 (linux_create_inferior): Adjust.
14106 (linux_attach_lwp): Adjust.
14107 (linux_attach): Adjust.
14108 (linux_kill_one_process): Rename to ...
14109 (linux_kill_one_lwp): ... this. Adjust.
14110 (linux_kill): Adjust.
14111 (linux_detach_one_process): Rename to ...
14112 (linux_detach_one_lwp): ... this. Adjust.
14113 (linux_detach): Adjust.
14114 (check_removed_breakpoint): Adjust.
14115 (status_pending_p): Adjust.
14116 (linux_wait_for_process): Rename to ...
14117 (linux_wait_for_lwp): ... this. Adjust.
14118 (linux_wait_for_event): Adjust.
14119 (send_sigstop): Adjust.
14120 (wait_for_sigstop): Adjust.
14121 (stop_all_processes): Rename to ...
14122 (stop_all_lwps): ... this.
14123 (linux_resume_one_process): Rename to ...
14124 (linux_resume_one_lwp): ... this. Adjust.
14125 (linux_set_resume_request, linux_continue_one_thread)
14126 (linux_queue_one_thread, resume_status_pending_p)
14127 (usr_store_inferior_registers, regsets_store_inferior_registers)
14128 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14129 Adjust.
14130 * linux-low.h (get_process): Rename to ...
14131 (get_lwp): ... this. Adjust.
14132 (get_thread_process): Rename to ...
14133 (get_thread_lwp): ... this. Adjust.
14134 (get_process_thread): Rename to ...
14135 (get_lwp_thread): ... this. Adjust.
14136 (struct process_info): Rename to ...
14137 (struct lwp_info): ... this.
14138 (all_processes): Rename to ...
14139 (all_lwps): ... this.
14140 * proc-service.c (ps_lgetregs): Adjust.
14141 * thread-db.c (thread_db_create_event, find_one_thread)
14142 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14143
14144 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14145
14146 * server.c (handle_query): Handle "qAttached".
14147
14148 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14149
14150 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14151 GPLv3, update license URL.
14152
14153 2009-03-01 Doug Evans <dje@google.com>
14154
14155 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14156 (server_h): Add gdb_signals.h.
14157 (signals.o): Update.
14158 * server.h (target_signal_from_host,target_signal_to_host_p)
14159 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14160
14161 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14162
14163 * remote-utils.c (getpkt): Also generate remote-debug
14164 information if noack_mode is set.
14165
14166 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14167
14168 * server.c (handle_query): Report qXfer:siginfo:read and
14169 qXfer:siginfo:write as supported and handle them.
14170 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14171 * linux-low.c (linux_xfer_siginfo): New.
14172 (linux_target_ops): Set it.
14173
14174 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14175
14176 * server.c (gdbserver_usage): Mention --remote-debug.
14177 (main): Accept '--remote-debug' switch.
14178
14179 2009-01-18 Doug Evans <dje@google.com>
14180
14181 * regcache.c (new_register_cache): No need to check result of xcalloc.
14182 * server.c (handle_search_memory): Back out calls to xmalloc,
14183 result is checked and error is returned to user upon failure.
14184 (handle_query): Ditto. Add more checks for result of malloc.
14185 (handle_v_cont): Check result of malloc, report error back to
14186 user upon failure.
14187 (handle_v_run): Ditto. Call freeargv.
14188 * server.h (freeargv): Declare.
14189 * utils.c (freeargv): New fn.
14190
14191 2009-01-15 Doug Evans <dje@google.com>
14192
14193 * gdbreplay.c (perror_with_name): Make arg const char *.
14194 * server.h (target_signal_to_name): Make return type const char *.
14195 * thread-db.c (thread_db_err_str): Make return type const char *.
14196 * utils.c (perror_with_name): Make arg const char *.
14197
14198 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14199
14200 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14201 when handling a EXIT_PROCESS_DEBUG_EVENT.
14202
14203 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14204
14205 * gdbreplay.c (gdbreplay_version): Update copyright year.
14206 * server.c (gdbserver_version): Likewise.
14207
14208 2009-01-05 Doug Evans <dje@google.com>
14209
14210 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14211 (handle_extended_wait): Improve comment.
14212
14213 2008-12-13 Doug Evans <dje@google.com>
14214
14215 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14216 * server.h (ATTR_MALLOC): New macro.
14217 (xmalloc,xcalloc,xstrdup): Declare.
14218 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14219 * inferiors.c: Ditto.
14220 * linux-low.c: Ditto.
14221 * mem-break.c: Ditto.
14222 * regcache.c: Ditto.
14223 * remote-utils.c: Ditto.
14224 * server.c: Ditto.
14225 * target.c: Ditto.
14226 * win32-low.c: Ditto.
14227
14228 2008-12-12 Doug Evans <dje@google.com>
14229
14230 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14231 in debugging printf.
14232
14233 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14234
14235 2008-12-09 Doug Evans <dje@google.com>
14236
14237 * linux-low.h (struct process_info): Delete member tid, unused.
14238 * thread-db.c (find_one_thread): Update.
14239 (maybe_attach_thread): Update.
14240
14241 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14242
14243 * target.h (struct target_ops): Add qxfer_osdata member.
14244 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14245 and dirent.h.
14246 (linux_qxfer_osdata): New functions.
14247 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14248 callback.
14249 * server.c (handle_query): Handle "qXfer:osdata:read:".
14250 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14251 (buffer_xml_printf): New functions.
14252 * server.h (struct buffer): New.
14253 (buffer_grow_str, buffer_grow_str0): New macros.
14254 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14255 (buffer_xml_printf): Declare.
14256
14257 2008-11-24 Doug Evans <dje@google.com>
14258
14259 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14260
14261 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * server.c (handle_v_run): Always use the supplied argument list.
14264
14265 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14266
14267 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14268 (xtensa_regmap_table): Add entry for scompare1.
14269
14270 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14271
14272 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14273 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14274 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14275 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14276 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14277 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14278 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14279 XML target descriptions.
14280 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14281 when inferior is running on an ISA 2.05 or later processor. Add
14282 special case to return offset for full 64-bit slot of FPSCR when
14283 in 32-bits.
14284
14285 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14286
14287 * Makefile.in (SFILES, clean): Added sparc64 files.
14288 (reg-sparc64.o, reg-sparc64.c): New.
14289 * configure.srv (sparc*-*-linux*): New configuration.
14290 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14291 syscall arguments for SPARC.
14292 (regsets_store_inferior_registers): Likewise.
14293 * linux-sparc-low.c: New file.
14294
14295 2008-10-21 Doug Evans <dje@google.com>
14296
14297 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14298 (READLINE_DIR,READLINE_DEP): Delete.
14299 (INTERNAL_CFLAGS): Update.
14300 (LINTFLAGS): Update.
14301
14302 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14303
14304 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14305 whole argv from the last run, not just argv[0].
14306
14307 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14308
14309 * regcache.c (new_register_cache): Return NULL if the register
14310 cache size isn't known yet.
14311 (free_register_cache): Avoid dereferencing a NULL regcache.
14312
14313 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * configure.srv: Merge MIPS and MIPS64.
14316
14317 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14318
14319 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14320
14321 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14322
14323 * Makefile.in: Add required vsx dependencies.
14324
14325 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14326 Declare init_registers_powerpc_vsx32l.
14327 Declare init_registers_powerpc_vsx64l.
14328 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14329 (ppc_arch_setup): Check for VSX in hwcap.
14330 (ppc_fill_vsxregset): New function.
14331 (ppc_store_vsxregset): New function.
14332 Add new VSX entry in regset_info target_regsets.
14333
14334 * configure.srv: Add new VSX dependencies.
14335
14336 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14337
14338 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14339 (remote_open): Set or clear transport_is_reliable.
14340 (putpkt_binary): Don't expect acks in noack mode.
14341 (getpkt): Don't send ack/nac in noack mode.
14342 * server.c (handle_general_set): Handle QStartNoAckMode.
14343 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14344 qSupported.
14345 (main): Reset noack_mode on every connection.
14346 * server.h (noack_mode): Declare.
14347
14348 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14349
14350 * Makefile.in (GDBREPLAY_OBS): New variable.
14351 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14352
14353 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14354 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14357 (usr_store_inferior_registers): Likewise.
14358 (regsets_store_inferior_registers): Likewise.
14359
14360 2008-07-31 Rolf Jansen <rj@surtec.com>
14361 Pedro Alves <pedro@codesourcery.com>
14362
14363 * configure.ac: Check for memmem declaration.
14364 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14365 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14366 (disable_packet_qfThreadInfo): Unconditionally compile.
14367 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14368 * configure, config.in: Regenerate.
14369
14370 2008-07-28 Doug Kwan <dougkwan@google.com>
14371
14372 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14373 (linux_write_memory): Remove declaration of errno.
14374
14375 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14376
14377 * linux-low.c (handle_extended_wait): Do not use "status"
14378 variable uninitialized.
14379
14380 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14381
14382 * server.c (handle_v_attach): Inhibit reporting dll changes.
14383
14384 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14385
14386 * remote-utils.c (prepare_resume_reply): If requested, don't
14387 output "thread:TID" in the T stop reply.
14388
14389 * server.c (disable_packet_vCont, disable_packet_Tthread)
14390 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14391 (handle_query): If requested, disable support for qC, qfThreadInfo
14392 and qsThreadInfo.
14393 (handle_v_requests): If requested, disable support for vCont.
14394 (gdbserver_show_disableable): New.
14395 (main): Handle --disable-packet and --disable-packet=LIST.
14396
14397 * server.h (disable_packet_vCont, disable_packet_Tthread)
14398 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14399
14400 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14401
14402 * server.c (gdbserver_usage): Mention --version.
14403
14404 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * Makefile.in (gdbreplay.o): New rule.
14407
14408 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14409
14410 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14411 message, not gdbserver.
14412
14413 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14414 Nathan Sidwell <nathan@codesourcery.com>
14415 Joseph Myers <joseph@codesourcery.com>
14416
14417 * acinclude.m4: Include ../../config/acx.m4.
14418 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14419 * configure, config.in: Regenerate.
14420 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14421 * server.c (gdbserver_version): Print PKGVERSION.
14422 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14423 (main): Adjust gdbserver_usage calls.
14424 * gdbreplay.c (version, host_name): Add declarations.
14425 (gdbreplay_version, gdbreplay_usage): New.
14426 (main): Accept --version and --help options.
14427
14428 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14429
14430 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14431 (arm_breakpoint_at): Handle Thumb.
14432 (the_low_target): Add comment.
14433
14434 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14435
14436 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14437
14438 2008-05-09 Doug Evans <dje@google.com>
14439
14440 * server.h (decode_search_memory_packet): Declare.
14441 * remote-utils.c (decode_search_memory_packet): New fn.
14442 * server.c (handle_search_memory_1): New fn.
14443 (handle_search_memory): New fn.
14444 (handle_query): Process qSearch:memory packets.
14445
14446 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14447
14448 * regcache.c (registers_length): Remove.
14449 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14450 full register packet.
14451 * regcache.h (registers_length): Remove prototype.
14452 * server.h (PBUFSIZ): Define to 16384.
14453
14454 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14455
14456 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14457 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14458 powerpc-64l.o, and powerpc-altivec64l.o.
14459 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14460 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14461 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14462 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14463 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14464 to srv_xmlfiles.
14465
14466 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14467 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14468 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14469 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14470 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14471 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14472 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14473 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14474 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14475 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14476 (clean): Update.
14477
14478 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14479 (init_registers_powerpc_32l): ... this new prototype.
14480 (init_registers_powerpc_32): Remove, replace by ...
14481 (init_registers_powerpc_altivec32l): ... this new prototype.
14482 (init_registers_powerpc_e500): Remove, replace by ...
14483 (init_registers_powerpc_e500l): ... this new prototype.
14484 (init_registers_ppc64): Remove, replace by ...
14485 (init_registers_powerpc_64l): ... this new prototype.
14486 (init_registers_powerpc_64): Remove, replace by ...
14487 (init_registers_powerpc_altivec64l): ... this new prototype.
14488 (ppc_num_regs): Set to 73.
14489 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14490 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14491 (ppc_cannot_store_register): Handle orig_r3 and trap.
14492 (ppc_arch_setup): Update init_registers_... calls.
14493 (ppc_fill_gregset): Handle orig_r3 and trap.
14494
14495 * inferiors.c (clear_inferiors): Reset current_inferior.
14496
14497 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14498
14499 * acinclude.m4: Add override.m4.
14500 * configure: Regenerate.
14501
14502 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14503
14504 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14505 initial call to init_register_ppc64.
14506
14507 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14508
14509 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14510 single powerpc*-*-linux* case.
14511 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14512
14513 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14514
14515 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14516 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14517 from reg_xmlfiles.
14518 * linux-ppc-low.c: Include <elf.h>.
14519 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14520 (ppc_hwcap): New global variable.
14521 (ppc_regmap): Remove __SPE__ #ifdef sections.
14522 (ppc_regmap_e500): New global variable.
14523 (ppc_cannot_store_register): Update __SPE__ special case.
14524 (ppc_get_hwcap): New function.
14525 (ppc_arch_setup): Use it to determine whether inferior supports
14526 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14527 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14528 Do not access registers if target does not support AltiVec.
14529 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14530 Do not access registers if target does not support SPE.
14531 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14532
14533 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * linux-low.c (disabled_regsets, num_regsets): New.
14536 (use_regsets_p): Delete.
14537 (linux_wait_for_process): Clear disabled_regsets.
14538 (regsets_fetch_inferior_registers): Check and set it.
14539 (regsets_store_inferior_registers): Likewise.
14540 (linux_fetch_registers, linux_store_registers): Do not use
14541 use_regsets_p.
14542 (initialize_low): Allocate disabled_regsets.
14543
14544 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * Makefile.in (LIBOBJS): New.
14547 (OBS): Use LIBOBJS.
14548 (memmem.o): New rule.
14549 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14550 * configure: Regenerated.
14551
14552 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14553
14554 * server.c (handle_query): Never return "unsupported" for
14555 qXfer:features:read queries.
14556
14557 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14558
14559 * server.c (get_features_xml): Fix inverted condition.
14560 (handle_query): Always support qXfer:feature:read.
14561
14562 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14563
14564 * server.c (wrapper_argv): New.
14565 (start_inferior): Handle wrapper_argv. If set, expect an extra
14566 trap.
14567 (gdbserver_usage): Document --wrapper.
14568 (main): Parse --wrapper.
14569
14570 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14571
14572 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14573 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14574 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14575 (ppc_set_pc): Likewise.
14576 (ppc_arch_setup): New function.
14577 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14578 of collect_register.
14579 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14580
14581 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14582
14583 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14584 instead of linux-ppc64-low.o.
14585 * linux-ppc64-low.c: Remove file.
14586 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14587 (linux-ppc64-low.o): Remove rule.
14588
14589 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14590 (init_registers_powerpc_64): Likewise.
14591 (ppc_regmap): Conditionally define depending on __powerpc64__.
14592 (ppc_cannot_store_register): Do not special-case "fpscr" when
14593 compiled on __powerpc64__.
14594 (ppc_collect_ptrace_register): New function.
14595 (ppc_supply_ptrace_register): New function.
14596 (ppc_breakpoint): Change type to "unsigned int".
14597 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14598 (the_low_target): Conditionally provide initializers for the
14599 arch_setup member depending on __powerpc64__. Install
14600 collect_ptrace_register and supply_ptrace_register members.
14601
14602 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14603
14604 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14605 * server.c (gdbserver_xmltarget): Define.
14606 (get_features_xml): Use it to replace "target.xml" and arch_string.
14607
14608 * configure.srv: Remove srv_xmltarget. Add XML files that were
14609 mentioned there to srv_xmlfiles instead. Remove conditional tests
14610 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14611 srv_xmlfiles and srv_regobj to include all possible choices.
14612 * configure.ac (srv_xmltarget): Remove.
14613 (srv_xmlfiles): Do not add "target.xml".
14614 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14615 checks for supplementary target information.
14616 * configure: Regenerate.
14617 * Makefile.in (XML_TARGET): Remove.
14618 (target.xml): Remove rule.
14619 (clean): Do not clean up target.xml.
14620 (.PRECIOUS): Do not mention target.xml.
14621
14622 * target.h (struct target_ops): Remove arch_string member.
14623 * linux-low.c (linux_arch_string): Remove.
14624 (linux_target_ops): Remove arch_string initializer.
14625 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14626 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14627 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14628 * spu-low.c (spu_arch_string): Remove.
14629 (spu_target_ops): Remove arch_string initializer.
14630 * win32-low.c (win32_arch_string): Remove.
14631 (win32_target_ops): Remove arch_string initializer.
14632 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14633 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14634 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14635
14636 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14637
14638 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14639 by collect_ptrace_register and supply_ptrace_register hooks.
14640 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14641 instead of checking for the_low_target.left_pad_xfer.
14642 (usr_store_inferior_registers): Use collect_ptrace_register callback
14643 instead of checking for the_low_target.left_pad_xfer.
14644
14645 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14646 (s390_supply_ptrace_register): Likewise.
14647 (s390_fill_gregset): Call s390_collect_ptrace_register.
14648 (the_low_target): Update.
14649
14650 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14651 (ppc_supply_ptrace_register): Likewise.
14652 (the_low_target): Update.
14653
14654 * linux-i386-low.c (the_low_target): Update.
14655 * linux-x86-64-low.c (the_low_target): Update.
14656
14657 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14658
14659 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14660 reg-s390.o and reg-s390x.o.
14661
14662 * linux-low.c (new_inferior): New global variable.
14663 (linux_create_inferior, linux_attach): Set it.
14664 (linux_wait_for_process): Call the_low_target.arch_setup after the
14665 target has stopped for the first time.
14666 (initialize_low): Do not call the_low_target.arch_setup.
14667
14668 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14669 (s390_set_pc): Likewise.
14670 (s390_arch_setup): New function.
14671 (the_low_target): Use s390_arch_setup as arch_setup routine.
14672
14673 * regcache.c (realloc_register_cache): New function.
14674 (set_register_cache): Call it for each existing regcache.
14675
14676 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14677
14678 * server.h (init_registers): Remove prototype.
14679
14680 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14681 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14682 instead of init_registers ().
14683 * linux-arm-low.c (init_registers_arm): Add prototype.
14684 (init_registers_arm_with_iwmmxt): Likewise.
14685 (the_low_target): Add initializer for arch_setup field.
14686 * linux-cris-low.c (init_registers_cris): Add prototype.
14687 (the_low_target): Add initializer for arch_setup field.
14688 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14689 (the_low_target): Add initializer for arch_setup field.
14690 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14691 (the_low_target): Add initializer for arch_setup field.
14692 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14693 (the_low_target): Add initializer for arch_setup field.
14694 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14695 (the_low_target): Add initializer for arch_setup field.
14696 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14697 (the_low_target): Add initializer for arch_setup field.
14698 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14699 (init_registers_mips64_linux): Likewise.
14700 (the_low_target): Add initializer for arch_setup field.
14701 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14702 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14703 (the_low_target): Add initializer for arch_setup field.
14704 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14705 (init_registers_powerpc_64): Likewise.
14706 (the_low_target): Add initializer for arch_setup field.
14707 * linux-s390-low.c (init_registers_s390): Add prototype.
14708 (init_registers_s390x): Likewise.
14709 (the_low_target): Add initializer for arch_setup field.
14710 * linux-sh-low.c (init_registers_sh): Add prototype.
14711 (the_low_target): Add initializer for arch_setup field.
14712 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14713 (the_low_target): Add initializer for arch_setup field.
14714 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14715 (the_low_target): Add initializer for arch_setup field.
14716
14717 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14718 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14719 instead of init_registers ().
14720 * win32-arm-low.c (init_registers_arm): Add prototype.
14721 (the_low_target): Add initializer for arch_setup field.
14722 * win32-i386-low.c (init_registers_i386): Add prototype.
14723 (the_low_target): Add initializer for arch_setup field.
14724
14725 * spu-low.c (init_registers_spu): Add prototype.
14726 (initialize_low): Call initialie_registers_spu () instead of
14727 initialize_registers ().
14728
14729 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14730
14731 * server.c (handle_v_requests): When handling the vRun and vAttach
14732 packets, if already debugging a process, don't kill it. Return an
14733 error instead.
14734
14735 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * server.c (handle_query): Correct length check.
14738
14739 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14740
14741 * win32-low.c (do_initial_child_stuff): Add process handle
14742 parameter. Set current_process_handle and current_process_id from the
14743 parameters. Clear globals.
14744 (win32_create_inferior): Don't set current_process_handle and
14745 current_process_id here. Instead pass them on the call to
14746 do_initial_child_stuff.
14747 (win32_attach): Likewise.
14748 (win32_clear_inferiors): New.
14749 (win32_kill): Don't close the current process handle or the
14750 current thread handle here. Instead call win32_clear_inferiors.
14751 (win32_detach): Don't open a new handle to the process. Call
14752 win32_clear_inferiors.
14753 (win32_join): Don't rely on current_process_handle; open a new
14754 handle using the process id.
14755 (win32_wait): Call win32_clear_inferiors when the inferior process
14756 has exited.
14757
14758 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14759
14760 * server.c (monitor_show_help): Add "exit".
14761
14762 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14763
14764 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14765 (clean): Add reg-xtensa.c.
14766 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14767 * configure.srv (xtensa*-*-linux*) New target.
14768 * linux-xtensa-low.c: New.
14769 * xtensa-xtregs.c: New.
14770
14771 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14772
14773 * hostio.c: Don't include errno.h.
14774 (errno_to_fileio_errno): Move to hostio-errno.
14775 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14776 error number outputting to the target->hostio_last_error callback.
14777 (hostio_packet_error): Use FILEIO_EINVAL directly.
14778 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14779 calls to hostio_error.
14780 * hostio-errno.c: New.
14781 * server.h (hostio_last_error_from_errno): Declare.
14782 * target.h (target_ops): Add hostio_last_error member.
14783 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14784 as hostio_last_error handler.
14785 * spu-low.c (spu_target_ops): Likewise.
14786 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14787 (wince_hostio_last_error): New functions.
14788 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14789 as hostio_last_error handler.
14790 (win32_target_ops) [!_WIN32_WCE]: Register
14791 hostio_last_error_from_errno as hostio_last_error handler.
14792 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14793 (hostio-errno.o): New rule.
14794 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14795 * configure.srv (srv_hostio_err_objs): New variable. Default to
14796 hostio-errno.o.
14797 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14798 * configure: Regenerate.
14799
14800 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14803 (linux_kill, linux_detach): Clean up the process list.
14804 * remote-utils.c (remote_open): Improve port number parsing.
14805 (putpkt_binary, input_interrupt): Only send interrupts if the target
14806 is running.
14807 * server.c (extended_protocol): Make static.
14808 (attached): Define earlier.
14809 (exit_requested, response_needed, program_argv): New variables.
14810 (target_running): New.
14811 (start_inferior): Clear attached here.
14812 (attach_inferior): Set attached here.
14813 (require_running): Define.
14814 (handle_query): Use require_running and target_running. Implement
14815 "monitor exit".
14816 (handle_v_attach, handle_v_run): New.
14817 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14818 (gdbserver_usage): Update.
14819 (main): Redo argument parsing. Handle --debug and --multi. Handle
14820 --attach along with other options or after the port. Save
14821 program_argv. Support no initial program. Resynchronize
14822 communication with GDB after an error. Handle "monitor exit".
14823 Use require_running and target_running. Always allow the extended
14824 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14825 restart in extended mode.
14826 * README: Refer to the GDB manual. Update --attach usage.
14827
14828 2007-12-20 Andreas Schwab <schwab@suse.de>
14829
14830 * linux-low.c (STACK_SIZE): Define.
14831 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14832 (linux_test_for_tracefork): Likewise.
14833
14834 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * linux-low.c (linux_wait_for_event): Update messages. Do not
14837 reinsert auto-delete breakpoints.
14838 * mem-break.c (struct breakpoint): Change return type of handler to
14839 int.
14840 (set_breakpoint_at): Update handler type.
14841 (reinsert_breakpoint_handler): Return 1 instead of calling
14842 delete_breakpoint.
14843 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14844 setting a new one.
14845 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14846 * mem-break.h (set_breakpoint_at): Update handler type.
14847 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14848 * win32-low.c (auto_delete_breakpoint): New.
14849 (get_child_debug_event): Use it.
14850
14851 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14852
14853 * configure.ac: Check for pread and pwrite.
14854 * hostio.c (handle_pread): Fall back to lseek and read.
14855 (handle_pwrite): Fall back to lseek and write.
14856 * config.in, configure: Regenerated.
14857
14858 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * server.c (myresume): Add own_buf argument.
14861 (main): Update calls.
14862
14863 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14864
14865 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14866 * remote-utils.c (remote_open): Do not call disable_async_io.
14867 (block_async_io): Delete.
14868 (unblock_async_io): Make static.
14869 (initialize_async_io): New.
14870 * server.c (handle_v_cont): Handle async I/O here.
14871 (myresume): Likewise. Move other common resume tasks here...
14872 (main): ... from here. Call initialize_async_io. Disable async
14873 I/O before the main loop.
14874 * server.h (initialize_async_io): Declare.
14875 (block_async_io, unblock_async_io): Delete prototypes.
14876 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14877
14878 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14879
14880 * remote-utils.c (readchar): Allow binary data in received messages.
14881
14882 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14883
14884 * win32-low.c (attaching): New global.
14885 (win32_create_inferior): Clear the `attaching' global.
14886 (win32_attach): Set the `attaching' global.
14887 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14888 attaching. Only set a breakpoint at the entry point if not
14889 attaching.
14890
14891 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14892
14893 * server.c (main): Don't report dll events on the initial
14894 connection on attaches.
14895
14896 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14897
14898 * server.c (main): Relax numerical bases supported for the pid of
14899 the --attach command line argument.
14900
14901 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14902
14903 * win32-low.c (win32_attach): Call OpenProcess before
14904 DebugActiveProcess, not after. Add last error output to error
14905 call.
14906
14907 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14908
14909 * win32-low.c (win32_get_thread_context)
14910 (win32_set_thread_context): New functions.
14911 (thread_rec): Use win32_get_thread_context.
14912 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14913 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14914 field.
14915
14916 2007-12-03 Leo Zayas
14917 Pedro Alves <pedro_alves@portugalmail.pt>
14918
14919 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14920 global variables.
14921 (child_add_thread): Minor cleanup.
14922 (child_continue): Resume artificially suspended threads before
14923 calling ContinueDebugEvent.
14924 (suspend_one_thread): New.
14925 (fake_breakpoint_event): New.
14926 (get_child_debug_event): Change return type to int. Check here if
14927 gdb sent an interrupt request. If a soft interrupt was requested,
14928 fake a breakpoint event. Return 0 if there is no event to handle,
14929 and 1 otherwise.
14930 (win32_wait): Don't check here if gdb sent an interrupt request.
14931 Ensure there is a valid event to handle.
14932 (win32_request_interrupt): Add soft interruption method as last
14933 resort.
14934
14935 2007-12-03 Leo Zayas
14936 Pedro Alves <pedro_alves@portugalmail.pt>
14937
14938 * win32-low.h (win32_thread_info): Add descriptions to the
14939 structure members. Replace `suspend_count' counter by a
14940 `suspended' flag.
14941 * win32-low.c (thread_rec): Update condition of when to get the
14942 context from the inferior. Rely on ContextFlags being set if it
14943 has already been retrieved. Only suspend the inferior thread if
14944 we haven't already. Warn if that fails.
14945 (continue_one_thread): s/suspend_count/suspended/. Only call
14946 ResumeThread once. Warn if that fails.
14947
14948 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14949
14950 * win32-low.c (win32_wait): Don't read from the inferior when it
14951 has already exited.
14952
14953 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14954
14955 * Makefile.in (win32_low_h): New variable.
14956 (win32-low.o): Add dependency on $(win32_low_h).
14957 (win32-arm-low.o, win32-i386-low.o): New rules.
14958
14959 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * hostio.c: Correct copyright year.
14962
14963 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * Makefile.in (OBS): Add hostio.o.
14966 (hostio.o): New rule.
14967 * server.h (handle_vFile): Declare.
14968 * hostio.c: New file.
14969 * server.c (handle_v_requests): Take packet_len and new_packet_len
14970 for binary packets. Call handle_vFile.
14971 (main): Update call to handle_v_requests.
14972
14973 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c: Include <sched.h>.
14976
14977 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * linux-low.c (linux_tracefork_grandchild): New.
14980 (linux_tracefork_child): Use clone.
14981 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14982
14983 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14984
14985 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14986
14987 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14990
14991 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * inferiors.c (change_inferior_id): Delete.
14994 (add_pid_to_list, pull_pid_from_list): New.
14995 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14996 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14997 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14998 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14999 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15000 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15001 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15002 (using_threads): Always set to 1.
15003 (handle_extended_wait): New.
15004 (add_process): Do not set TID.
15005 (linux_create_inferior): Set must_set_ptrace_flags.
15006 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15007 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15008 (linux_thread_alive): Rename TID argument to LWPID.
15009 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15010 (linux_wait_for_event): Do not use TID or check using_threads. Update
15011 call to dead_thread_notify. Call handle_extended_wait.
15012 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15013 (send_sigstop): Delete sigstop_sent.
15014 (wait_for_sigstop): Avoid TID.
15015 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15016 (linux_test_for_tracefork): New.
15017 (linux_lookup_signals): Use thread_db_active and
15018 linux_supports_tracefork_flag.
15019 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15020 * linux-low.h (get_process_thread): Avoid TID.
15021 (struct process_ifo): Move thread_known and tid to the end. Remove
15022 sigstop_sent.
15023 (linux_attach_lwp, thread_db_init): Update prototypes.
15024 * server.h (change_inferior_id): Delete prototype.
15025 (add_pid_to_list, pull_pid_from_list): New prototypes.
15026 * thread-db.c (thread_db_use_events): New.
15027 (find_first_thread): Rename to...
15028 (find_one_thread): ...this. Update callers and messages. Do not
15029 call fatal. Check thread_db_use_events. Do not call
15030 change_inferior_id or new_thread_notify.
15031 (maybe_attach_thread): Update. Do not call new_thread_notify.
15032 (thread_db_init): Set thread_db_use_events. Check use_events.
15033 * utils.c (fatal, warning): Correct message prefix.
15034
15035 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15036
15037 * Makefile.in (clean): Remove new files.
15038 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15039 (powerpc-64.o, powerpc-64.c): New rules.
15040 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15041 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15042 with SPE.
15043 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15044 SPE targets.
15045 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15046 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15047 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15048 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15049 (target_regsets): Add AltiVec and SPE register sets.
15050 * configure.ac: Check for AltiVec and SPE.
15051 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15052 (ppc_fill_vrregset, ppc_store_vrregset): New.
15053 (target_regsets): Add AltiVec register set.
15054 * configure: Regenerated.
15055
15056 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * linux-low.c (O_LARGEFILE): Define.
15059 (linux_read_memory): Use /proc/PID/mem.
15060 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15061 * configure, config.in: Regenerated.
15062
15063 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15064
15065 * linux-low.c (linux_wait_for_event): Do not pass signals while
15066 single-stepping.
15067
15068 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15069
15070 * win32-low.c (create_process): New.
15071 (win32_create_inferior): Use create_process instead of
15072 CreateProcess. If create_process failed retry appending an ".exe"
15073 suffix. Store the GetLastError result immediatelly after
15074 create_process calls and use it on the call to error.
15075
15076 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15077
15078 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15079
15080 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15081
15082 * configure.ac: Switch license to GPLv3.
15083
15084 2007-08-01 Michael Snyder <msnyder@access-company.com>
15085
15086 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15087
15088 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15089
15090 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15091 typedef.
15092 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15093 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15094 CloseToolhelp32Snapshot.
15095 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15096 CloseToolhelp32Snapshot.
15097
15098 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15099
15100 * server.c (main): Check for inferior exit before main loop.
15101
15102 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15103
15104 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15105 instead of on tmp_desc.
15106
15107 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15108 Daniel Jacobowitz <dan@codesourcery.com>
15109
15110 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15111 (add_thread): Minor cleanups.
15112 (clear_inferiors): Move lower in the file. Clear the DLL
15113 list.
15114 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15115 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15116 (xml_escape_text): New.
15117 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15118 for qSupported.
15119 (handle_v_cont): Report errors.
15120 (gdbserver_version): Update.
15121 (main): Correct size of own_buf. Do not report initial DLL events.
15122 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15123 (unloaded_dll, xml_escape_text): New.
15124 * win32-low.c (enum target_waitkind): Update comments.
15125 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15126 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15127 (win32_EnumProcessModules, win32_GetModuleInformation)
15128 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15129 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15130 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15131 (win32_Module32First, win32_Module32Next, load_toolhelp)
15132 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15133 (get_child_debug_event): Handle DLL events.
15134 (win32_wait): Likewise.
15135
15136 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15137
15138 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15139 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15140
15141 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15142
15143 * win32-low.c (handle_output_debug_string): Ignore event if not
15144 waiting.
15145
15146 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15147
15148 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15149
15150 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15151
15152 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15153
15154 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * inferiors.c (change_inferior_id): Add comment.
15157 * linux-low.c (check_removed_breakpoint): Add an early
15158 prototype. Improve debug output.
15159 (linux_attach): Doc update.
15160 (linux_detach_one_process, linux_detach): Clean up before releasing
15161 each process.
15162 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15163 * linux-low.h (struct process_info): Doc improvement.
15164 * mem-break.c (delete_all_breakpoints): New.
15165 * mem-break.h (delete_all_breakpoints): New prototype.
15166 * thread-db.c (find_first_thread): New.
15167 (thread_db_create_event): Call it instead of
15168 thread_db_find_new_threads. Clean up unused variables.
15169 (maybe_attach_thread): Remove first thread handling.
15170 (thread_db_find_new_threads): Use find_first_thread.
15171 (thread_db_get_tls_address): Likewise.
15172
15173 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15174
15175 * thread-db.c (thread_db_find_new_threads): Add prototype.
15176 (thread_db_create_event): Check for the main thread before adding
15177 a new thread.
15178 (maybe_attach_thread): Only enable event reporting if TID == 0.
15179 (thread_db_get_tls_address): Check for new threads.
15180
15181 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15182
15183 * linux-low.c (linux_create_inferior): Try execv before execvp.
15184 * spu-low.c (spu_create_inferior): Likewise.
15185
15186 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15187
15188 * linux-low.c (linux_create_inferior): Change execv to execvp.
15189 * spu-low.c (spu_create_inferior): Likewies.
15190
15191 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * Makefile.in (clean): Clean new files instead of deleted ones.
15194 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15195 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15196 rules.
15197 * configure.srv: Specify XML files and new regformats for MIPS and
15198 MIPS64 GNU/Linux.
15199 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15200 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15201 an entry for the restart register.
15202 (mips_cannot_fetch_register, mips_cannot_store_register)
15203 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15204 register names to match the XML descriptions.
15205 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15206 restart register instead of $0.
15207
15208 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15209 Markus Deuling <deuling@de.ibm.com>
15210
15211 * remote-utils.c (decode_xfer_write): New function.
15212 * server.h (decode_xfer_write): Add prototype.
15213 * server.c (handle_query): Add PACKET_LEN argument. Support
15214 qXfer:spu:read and qXfer:spu:write packets.
15215 (main): Pass packet_len to handle_query.
15216 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15217 * target.h (target_ops): Add qxfer_spu.
15218
15219 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15220
15221 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15222 accessing non-seekable spufs files.
15223
15224 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15225
15226 * server.c (handle_query): Add reply for qC packet.
15227
15228 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15229 Leo Zayas <lerele@champenstudios@com>
15230
15231 * server.h (check_remote_input_interrupt_request): New function.
15232 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15233 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15234 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15235 (check_remote_input_interrupt_request): New function.
15236 * server.h (check_remote_input_interrupt_request): Declare.
15237 * win32-low.c (winapi_DebugBreakProcess,
15238 winapi_GenerateConsoleCtrlEvent): New typedefs.
15239 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15240 to 250 ms.
15241 (win32_wait): Check for remote interrupt request
15242 with check_remote_input_interrupt_request.
15243 (win32_request_interrupt): New function.
15244 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15245
15246 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15247
15248 * win32-low.c (debug_registers_changed,
15249 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15250 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15251 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15252 (thread_rec): Get context using the low target.
15253 (child_add_thread): Call thread_added on the low target,
15254 which does the same thing.
15255 (regptr): Delete.
15256 (do_initial_child_stuff): Remove debug registers references.
15257 Set context using the low target. Resume threads after
15258 setting the contexts.
15259 (child_continue): Remove dead variable. Remove debug
15260 registers references.
15261 (child_fetch_inferior_registers): Go through the low target.
15262 (do_child_store_inferior_registers): Remove.
15263 (child_store_inferior_registers): Go through the low target.
15264 (win32_resume): Remove debug registers references.
15265 Set context using the low target.
15266 (handle_exception): Change return type to void. Don't record
15267 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15268 first chance exception.
15269 (get_child_debug_event): Change return type to void. Remove
15270 goto loop. Always return after waiting for debug event.
15271 (win32_wait): Convert to switch statement. Handle spurious
15272 events.
15273
15274 * win32-i386-low.c (debug_registers_changed,
15275 debug_registers_used): New.
15276 (initial_stuff): Rename to ...
15277 (i386_initial_stuff): ... this. Clear debug registers
15278 state variables.
15279 (store_debug_registers): Delete.
15280 (i386_get_thread_context): New.
15281 (load_debug_registers): Delete.
15282 (i386_set_thread_context): New.
15283 (i386_thread_added): New.
15284 (single_step): Rename to ...
15285 (i386_single_step): ... this.
15286 (do_fetch_inferior_registers): Rename to ...
15287 (i386_fetch_inferior_register): ... this.
15288 (i386_store_inferior_register): New.
15289 (the_low_target): Adapt to new interface.
15290
15291 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15292 (arm_get_thread_context): New.
15293 (arm_set_thread_context): New.
15294 (regptr): New.
15295 (do_fetch_inferior_registers): Rename to ...
15296 (arm_fetch_inferior_register): ... this.
15297 (arm_store_inferior_register): New.
15298 (arm_wince_breakpoint): Reimplement as unsigned long.
15299 (arm_wince_breakpoint_len): Define.
15300 (the_low_target): Adapt to new interface.
15301
15302 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15303 load_debug_registers. Add get_thread_context, set_thread_context,
15304 thread_added and store_inferior_register. Rename
15305 fetch_inferior_registers to fetch_inferior_register.
15306 (regptr): Remove declaration.
15307
15308 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15309
15310 * linux-low.c (linux_detach): Change return type to int. Return 0.
15311 * spu-low.c (spu_detach): Likewise.
15312
15313 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15314
15315 * target.h (target_ops): Change return type of detach to int.
15316 Add join.
15317 (join_inferior): New.
15318 * server.c (main): Don't skip detach support on mingw32.
15319 If the inferior doesn't support detaching return error.
15320 Call join_inferior instead of using waitpid.
15321 * linux-low.c (linux_join): New.
15322 (linux_target_op): Add linux_join.
15323 * spu-low.c (spu_join): New.
15324 (spu_target_ops): Add spu_join.
15325 * win32-low.c (win32_detach): Adapt to new interface.
15326 Reopen current_process_handle before detaching. Issue a child
15327 resume before detaching.
15328 (win32_join): New.
15329 (win32_target_op): Add win32_join.
15330
15331 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15332
15333 * win32-low.c (win32-attach): Fix return value.
15334 * target.h (target_ops): Describe ATTACH return values.
15335
15336 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15337
15338 * win32-low.c (GETPROCADDRESS): Define.
15339 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15340 (winapi_DebugSetProcessKillOnExit): Likewise.
15341 (win32_create_inferior): Force usage of ansi CreateProcessA.
15342 (win32_attach): Use GETPROCADDRESS.
15343 (win32_detach): Likewise.
15344
15345 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15346
15347 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15348
15349 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15350
15351 * win32-low.c: Commit leftover changes from 2007-03-29.
15352
15353 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15354
15355 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15356 fields short instead of int. Add explicit padding.
15357 (i387_cache_to_fsave): Remove unnecessary casts.
15358 (i387_fsave_to_cache): Doc fix.
15359 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15360
15361 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15362
15363 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15364 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15365
15366 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15367
15368 * configure.srv (arm*-*-mingw32ce*): Move near the other
15369 arm targets.
15370
15371 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15372
15373 * configure.ac: Add errno checking.
15374 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15375 sys/file.h and malloc.h.
15376 (AC_CHECK_DECLS): Add perror.
15377 (srv_mingwce): Handle.
15378 * configure.srv (i[34567]86-*-cygwin*): Add
15379 win32-i386-low.o to srv_tgtobj.
15380 (i[34567]86-*-mingw*): Likewise.
15381 (arm*-*-mingw32ce*): Add case.
15382 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15383 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15384 [__MINGW32CE__] (strerror): New function.
15385 [__MINGW32CE__] (errno): Define to GetLastError.
15386 [__MINGW32CE__] (COUNTOF): New macro.
15387 (remote_open): Remove extra close call.
15388 * mem-break.c (delete_breakpoint_at): New function.
15389 * mem-break.h (delete_breakpoint_at): Declare.
15390 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15391 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15392 [USE_WIN32API] (read, write): Add char* casts.
15393 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15394 * server.h: Include wincecompat.h on Windows CE.
15395 [HAVE_ERRNO_H]: Check.
15396 (perror): Declare if not declared.
15397 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15398 (perror_with_name): Remove errno declaration.
15399 * wincecompat.h: New.
15400 * wincecompat.c: New.
15401 * win32-low.h: New.
15402 * win32-arm-low.c: New.
15403 * win32-i386-low.c: New.
15404 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15405 (OUTMSG2): Make it safe.
15406 (_T): New macro.
15407 (COUNTOF): New macro.
15408 (NUM_REGS): Get it from the low target.
15409 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15410 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15411 (thread_rec): Let low target handle debug registers.
15412 (child_add_thread): Likewise.
15413 (child_init_thread_list): Likewise.
15414 (continue_one_thread): Likewise.
15415 (regptr): New.
15416 (do_child_fetch_inferior_registers): Move to ...
15417 * win32-i386-low.c: ... here, and rename to ...
15418 (do_fetch_inferior_registers): ... this.
15419 * win32-low.c (child_fetch_inferior_registers):
15420 Go through the low target.
15421 (do_child_store_inferior_registers): Use regptr.
15422 (strwinerror): New function.
15423 (win32_create_inferior): Handle Windows CE.
15424 Use strwinerror instead of strerror on Windows error
15425 codes. Add program to the error output.
15426 Don't close the main thread handle on Windows CE.
15427 (win32_attach): Use coredll.dll on Windows CE.
15428 (win32_kill): Close current process and current
15429 thread handles.
15430 (win32_detach): Use coredll.dll on Windows CE.
15431 (win32_resume): Let low target handle debug registers, and
15432 step request.
15433 (handle_exception): Add/Remove initial breakpoint. Avoid
15434 non-existant WSTOPSIG on Windows CE.
15435 (win32_read_inferior_memory): Cast to remove warning.
15436 (win32_arch_string): Go through the low target.
15437 (initialize_low): Call set_breakpoint_data with the low
15438 target's breakpoint.
15439 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15440 FOP_REGNUM, mappings): Move to ...
15441 * win32-i386-low.c: ... here.
15442 * win32-low.c (win32_thread_info): Move to ...
15443 * win32-low.h: ... here.
15444 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15445 win32-arm-low.c and wincecompat.c.
15446 (all:): Add $EXEEXT.
15447 (install-only:): Likewise.
15448 (gdbserver:): Likewise.
15449 (gdbreplay:): Likewise.
15450 * config.in: Regenerate.
15451 * configure: Regenerate.
15452
15453 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15454
15455 * win32-low.c: Rename typedef thread_info to
15456 win32_thread_info throughout.
15457
15458 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15459
15460 * win32-i386-low.c: Rename to ...
15461 * win32-low.c: ... this.
15462 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15463 * Makefile.in: Likewise.
15464
15465 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15466
15467 * remote-utils.c (monitor_output): Constify msg parameter.
15468 * server.h (monitor_output): Likewise.
15469 * win32-i386-low.c (handle_output_debug_string): New.
15470 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15471 handle_output_debug_string.
15472 (get_child_debug_event): Likewise.
15473
15474 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15475
15476 * server.c (main): Correct strtoul check.
15477
15478 2007-03-27 Jon Ringle <jon@ringle.org>
15479
15480 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15481
15482 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15483
15484 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15485
15486 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15487
15488 * terminal.h: Check HAVE_SGTTY_H.
15489
15490 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15491
15492 * remote-utils.c (remote_open): Print out the assigned port number.
15493
15494 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * remote-utils.c (monitor_output): New function.
15497 * server.c (debug_threads): Define here.
15498 (monitor_show_help): New function.
15499 (handle_query): Handle qRcmd.
15500 (main): Do not handle 'd' packet.
15501 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15502 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15503 of debug_threads.
15504
15505 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15506
15507 * Makefile.in (EXEEXT): New.
15508 (clean): Use $(EXEEXT).
15509
15510 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15511
15512 * target.h (target_ops): Rename send_signal to request_interrupt,
15513 and remove enum target_signal parameter.
15514 * linux-low.c (linux_request_interrupt): Rename from
15515 linux_send_signal, and always send SIGINT.
15516 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15517 and always send SIGINT.
15518 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15519 of send_signal.
15520 (input_interrupt): Likewise.
15521
15522 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15523
15524 * server.c (get_features_xml): Check if target implemented
15525 arch_string.
15526 * win32-i386-low.c (win32_arch_string): New.
15527 (win32_target_ops): Add win32_arch_string as arch_string member.
15528
15529 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15530
15531 * spu-low.c (spu_arch_string): New.
15532 (spu_target_ops): Add spu_arch_string.
15533
15534 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15535
15536 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15537 * configure.ac: Do not check for terminal.h.
15538 * configure, config.in: Regenerated.
15539
15540 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * Makefile.in (OBS): Add $(XML_BUILTIN).
15543 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15544 (clean): Update.
15545 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15546 (arm-with-iwmmxt.c): New.
15547 * config.in, configure: Regenerate.
15548 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15549 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15550 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15551 (arm*-*-linux*): Add iWMMXt and regset support.
15552 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15553 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15554 (arm_store_wmmxregset, target_regsets): New.
15555 * server.c (get_features_xml): Take annex argument. Check builtin
15556 XML documents.
15557 (handle_query): Handle multiple annexes.
15558
15559 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * remote-utils.c [USE_WIN32API] (read, write): Define.
15562 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15563 write.
15564
15565 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15566
15567 * linux-i386-low.c (the_low_target): Set arch_string.
15568 * linux-x86-64-low.c (the_low_target): Likewise.
15569 * linux-low.c (linux_arch_string): New.
15570 (linux_target_ops): Add it.
15571 * linux-low.h (struct linux_target_ops): Add arch_string.
15572 * server.c (write_qxfer_response): Use const void * for DATA.
15573 (get_features_xml): New.
15574 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15575 * target.h (struct target_ops): Add arch_string method.
15576
15577 2007-01-03 Denis Pilat <denis.pilat@st.com>
15578 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * linux-low.c (linux_kill): Handle being called with no threads.
15581 * win32-i386-low.c (win32_kill): Likewise.
15582 (get_child_debug_event): Clear current_process_handle.
15583
15584 2006-12-30 Denis PILAT <denis.pilat@st.com>
15585 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * remote-utils.c (remote_open): Check the type of specified
15588 serial port devices before opening them.
15589 * server.c (main): Kill the inferior if an error occurs during
15590 the first remote_open.
15591
15592 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15593
15594 * README: Update supported targets.
15595
15596 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15597
15598 * Makefile.in (clean): Remove reg-mips64.c.
15599 (reg-mips64.c, reg-mips64.o): New rules.
15600 * configure.srv: Handle mips64. Include regset support for mips.
15601 * linux-mips-low.c (union mips_register): New.
15602 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15603 (mips_breakpoint, mips_breakpoint_at): Use int.
15604 (mips_collect_register, mips_supply_register)
15605 (mips_collect_register_32bit, mips_supply_register_32bit)
15606 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15607 (mips_store_fpregset, target_regsets): New.
15608 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15609
15610 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15611
15612 * configure.srv: Add target "spu*-*-*".
15613 * Makefile.in (clean): Remove reg-spu.c.
15614 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15615 * spu-low.c: New file.
15616
15617 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15618
15619 * configure.ac: Correct td_thr_tls_get_addr test.
15620 * configure: Regenerated.
15621
15622 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15623
15624 * linux-low.c (linux_wait_for_event): Reformat. Use the
15625 pass_signals array.
15626 * remote-utils.c (decode_address_to_semicolon): New.
15627 * server.c (pass_signals, handle_general_set): New.
15628 (handle_query): Mention QPassSignals for qSupported.
15629 (main): Call handle_general_set.
15630 * server.h (pass_signals, decode_address_to_semicolon): New.
15631
15632 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15633
15634 * server.c (handle_query): Correct error handling for read_auxv.
15635
15636 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15637
15638 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15639 and srv_linux_thread_db to yes.
15640 * linux-s390-low.c (s390_fill_gregset): New function.
15641 (target_regsets): Define data structure.
15642
15643 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15646 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15647 * config.in, configure: Regenerated.
15648 * inferiors.c (gdb_id_to_thread): New function.
15649 (gdb_id_to_thread_id): Use it.
15650 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15651 * linux-low.h (struct process_info): Add th member.
15652 (thread_db_get_tls_address): New prototype.
15653 * remote-utils.c (decode_address): Make non-static.
15654 * server.c (handle_query): Handle qGetTLSAddr.
15655 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15656 * target.h (struct target_ops): Add get_tls_address.
15657 * thread-db.c (maybe_attach_thread): Save the thread handle.
15658 (thread_db_get_tls_address): New.
15659
15660 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15663 (linux_resume_one_process): Take a siginfo_t *. Update all
15664 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15665 (struct pending_signals): Add a siginfo_t.
15666 (linux_wait_for_process): Always set last_status.
15667 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15668 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15669 * linux-low.h (struct process_info): Add last_status.
15670
15671 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15672
15673 * remote-utils.c (try_rle): New function.
15674 (putpkt_binary): Use it.
15675
15676 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15677
15678 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15679 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15680 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15681 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15682 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15683 point registers.
15684
15685 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15686
15687 * server.c (terminal_fd): New variable.
15688 (old_foreground_pgrp): Likewise.
15689 (restore_old_foreground_pgrp): New function.
15690 (start_inferior): Record the terminal file descriptor in terminal_fd
15691 and its original foreground group in old_foreground_pgrp. Register
15692 restore_old_foreground_pgrp with atexit().
15693
15694 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15695
15696 * server.c (handle_query): Correct qPart to qXfer.
15697
15698 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15699
15700 * configure.ac: Check for more headers which are missing on
15701 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15702 * configure.srv: Add Cygwin and mingw32.
15703 * remote-utils.c: Don't include headers unconditionally which
15704 are missing on mingw32. Include <winsock.h> for mingw32.
15705 (remote_open): Adjust for mingw32 support. Flush
15706 standard error after writing to it.
15707 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15708 (unblock_async_io, enable_async_io, disable_async_io)
15709 (readchar, getpkt): Update for Winsock support.
15710 (prepare_resume_reply): Expect a protocol signal number.
15711 * server.c: Disable <sys/wait.h> on mingw32.
15712 (start_inferior): Adjust for mingw32 support. Flush
15713 standard error after writing to it.
15714 (attach_inferior): Likewise. Use protocol signal
15715 numbers.
15716 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15717 and names.
15718 * win32-i386-low.c: New file.
15719 * Makefile.in (XM_CLIBS): Set.
15720 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15721 (win32-i386-low.o): New dependency rule.
15722 * linux-low.c (linux_wait): Use target signal numbers.
15723 * target.h (struct target_ops): Doc fix.
15724 * server.h (target_signal_to_name): New prototype.
15725 * gdbreplay.c: Don't include headers unconditionally which
15726 are missing on mingw32. Include <winsock.h> for mingw32.
15727 (remote_close, remote_open): Adjust for Winsock support.
15728 * configure, config.in: Regenerated.
15729
15730 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * server.c (decode_xfer_read, write_qxfer_response): New.
15733 (handle_query): Take a packet length argument. Handle
15734 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15735 the qSupported response.
15736 (main): Update call to handle_query.
15737
15738 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15739
15740 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15741 (putpkt_binary): Renamed from putpkt and adjusted for binary
15742 data.
15743 (putpkt): New wrapper for putpkt_binary.
15744 (readchar): Don't mask off the high bit.
15745 (decode_X_packet): New function.
15746 * server.c (main): Call putpkt_binary if a handler sets the packet
15747 length. Save the length of the incoming packet. Handle 'X'.
15748 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15749
15750 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * server.c (handle_query): Handle qSupported.
15753
15754 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15755
15756 * remote-utils.c (all_symbols_looked_up): New variable.
15757 (look_up_one_symbol): Check it.
15758 * server.h (look_up_one_symbol): New declaration.
15759 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15760
15761 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15762
15763 * Makefile.in (linux-arm-low.o): Update dependencies.
15764 * linux-arm-low.c: Include "gdb_proc_service.h".
15765 (PTRACE_GET_THREAD_AREA): Define.
15766 (ps_get_thread_area): New function.
15767
15768 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15769
15770 * configure.srv (m68k*-*-uclinux*): New target.
15771 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15772 (linux_resume_one_process): Remove extraneous cast.
15773 (linux_read_offsets): New.
15774 (linux_target_op): Add linux_read_offsets on mmuless systems.
15775 * server.c (handle_query): Add qOffsets logic.
15776 * target.h (struct target_ops): Add read_offsets.
15777
15778 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15781 (PTRACE_GET_THREAD_AREA): Define.
15782 (ps_get_thread_area): New function.
15783 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15784 (linux-x86-64-low.o): Update.
15785
15786 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15787
15788 * configure.ac: Remove checks for prfpregset_t.
15789 * gdb_proc_service.h: New file.
15790 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15791 new "gdb_proc_service.h".
15792 * proc-service.c: Likewise.
15793 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15794 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15795 * Makefile.in (gdb_proc_service_h): Updated.
15796 * configure, config.in: Regenerated.
15797
15798 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15799
15800 * remote-utils.c (prepare_resume_reply): Move declaration
15801 of gdb_id_from_wait to the top of the block.
15802
15803 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15804
15805 * linux-low.c (regsets_store_inferior_registers): Read the regset
15806 from the target before filling it.
15807
15808 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * server.c (attach_inferior): Return SIGTRAP for a successful
15811 attach.
15812
15813 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15814
15815 * Makefile.in (OBS): Add version.o.
15816 (STAGESTUFF): Delete.
15817 (version.o): Add dependencies.
15818 (version.c): Replace rule.
15819 (clean): Remove version.c.
15820 * server.c (gdbserver_version): New.
15821 (gdbserver_usage): Use printf.
15822 (main): Handle --version and --help.
15823 * server.h (version, host_name): Add declarations.
15824
15825 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15826
15827 * linux-arm-low.c:
15828 * linux-arm-low.c:
15829 * inferiors.c:
15830 * i387-fp.h:
15831 * i387-fp.c:
15832 * gdbreplay.c:
15833 * regcache.c:
15834 * proc-service.c:
15835 * mem-break.h:
15836 * mem-break.c:
15837 * linux-x86-64-low.c:
15838 * linux-sh-low.c:
15839 * linux-s390-low.c:
15840 * linux-ppc64-low.c:
15841 * linux-ppc-low.c:
15842 * linux-mips-low.c:
15843 * linux-m68k-low.c:
15844 * linux-m32r-low.c:
15845 * linux-low.h:
15846 * linux-low.c:
15847 * linux-ia64-low.c:
15848 * linux-i386-low.c:
15849 * linux-crisv32-low.c:
15850 * thread-db.c:
15851 * terminal.h:
15852 * target.h:
15853 * target.c:
15854 * server.h:
15855 * server.c:
15856 * remote-utils.c:
15857 * regcache.h:
15858 * utils.c:
15859 * Makefile.in:
15860 * configure.ac:
15861 * gdbserver.1: Add (C) after Copyright. Update the FSF
15862 address.
15863
15864 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15867 (arm_breakpoint_at): Recognize both breakpoints.
15868 (the_low_target): Use the correct breakpoint instruction.
15869
15870 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15873 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15874 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15875 (the_low_target): Update.
15876
15877 2005-10-25 Andreas Schwab <schwab@suse.de>
15878
15879 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15880
15881 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15882 (ia64_num_regs): Reduce to 462.
15883
15884 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15885
15886 * acinclude.m4: Correct quoting.
15887 * aclocal.m4: Regenerated.
15888
15889 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15890 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15891 (thread_db_init): Call thread_db_err_str.
15892 * configure.ac: Check for TD_VERSION.
15893 * config.in, configure: Regenerated.
15894
15895 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15896
15897 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15898
15899 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15900
15901 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15902 is not available. Define HAVE_PTRACE_GETREGS if it is.
15903 * config.in, configure: Regenerated.
15904 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15905 * linux-i386-low.c, linux-m68k-low.c: Update to use
15906 HAVE_PTRACE_GETREGS.
15907 * linux-low.c (regsets_fetch_inferior_registers)
15908 (regsets_store_inferior_registers): Only return 0 if we processed
15909 GENERAL_REGS.
15910 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15911 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15912
15913 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15914
15915 * inferiors.c (struct thread_info): Add gdb_id.
15916 (add_thread): Add gdb_id argument.
15917 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15918 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15919 calls to add_thread.
15920 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15921 * server.c (handle_query): Use thread_to_gdb_id.
15922 (handle_v_cont, main): Use gdb_id_to_thread_id.
15923 * server.h (add_thread): Update prototype.
15924 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15925 prototypes.
15926
15927 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15928
15929 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15930 left-padded registers.
15931 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15932 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15933
15934 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15935
15936 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15937 * configure: Regenerate.
15938 * config.in: Regenerate.
15939 * server.h (NEED_DECLARATION_STRERROR):
15940 Replace with !HAVE_DECL_STRERROR.
15941
15942 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * linux-low.c (linux_wait, linux_send_signal): Don't test
15945 an unsigned long variable for > 0 if it could be MAX_ULONG.
15946 * server.c (myresume): Likewise.
15947 * target.c (set_desired_inferior): Likewise.
15948
15949 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15950
15951 * configure.ac: Simplify and improve check for socklen_t.
15952 * configure, config.in: Regenerate.
15953
15954 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * acconfig.h: Remove.
15957 * configure.ac: Add a test for socklen_t. Use three-argument
15958 AC_DEFINE throughout.
15959 * config.in: Regenerated using autoheader 2.59.
15960 * configure: Regenerated.
15961
15962 * gdbreplay.c (socklen_t): Provide a default.
15963 (remote_open): Use socklen_t.
15964 * remote-utils.c (socklen_t): Provide a default.
15965 (remote_open): Use socklen_t.
15966 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15967 unsigned char.
15968
15969 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15970 char for buffers.
15971 * linux-low.c (linux_read_memory, linux_write_memory)
15972 (linux_read_auxv): Likewise.
15973 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15974 (check_mem_write): Likewise.
15975 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15976 Likewise.
15977 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15978 (registers_from_string, register_data): Likewise.
15979 * server.c (handle_query, main): Likewise.
15980 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15981 (decode_M_packet): Likewise.
15982 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15983 * target.h (struct target_ops): Update read_memory, write_memory,
15984 and read_auxv.
15985 (read_inferior_memory, write_inferior_memory): Update.
15986 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15987 to unsigned char *.
15988 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15989 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15990 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15991 linux-s390-low.c, linux-sh-low.c: Update for changes in
15992 read_inferior_memory and the_low_target->breakpoint.
15993
15994 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15997 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15998 * configure.srv: Add powerpc64-*-linux*.
15999 * linux-ppc64-low.c: New file.
16000
16001 2005-05-23 Orjan Friberg <orjanf@axis.com>
16002
16003 * linux-cris-low.c: New file with support for CRIS.
16004 * linux-crisv32-low.c: Ditto for CRISv32.
16005 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16006 (clean): Add reg-cris.c and reg-crisv32.c.
16007 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16008 reg-crisv32.o, and reg-crisv32.c to make rules.
16009 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16010 recognized targets.
16011
16012 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16013
16014 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16015 of sizeof (PTRACE_XFER_TYPE).
16016 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16017
16018 2005-05-12 Orjan Friberg <orjanf@axis.com>
16019
16020 * target.h (struct target_ops): Add insert_watchpoint,
16021 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16022 pointers for hardware watchpoint support.
16023 * linux-low.h (struct linux_target_ops): Ditto.
16024 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16025 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16026 to linux_target_ops.
16027 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16028 reply packet.
16029 * server.c (main): Recognize 'Z' and 'z' packets.
16030
16031 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16032
16033 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16034 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16035 (the_low_target): Add new members.
16036
16037 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16038
16039 * proc-service.c (ps_lgetregs): Search all_processes instead of
16040 all_threads.
16041
16042 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * server.c (start_inferior): Change return type to int.
16045 (attach_inferior): Change sigptr to int *.
16046 (handle_v_cont, handle_v_requests): Change signal to int *.
16047 (main): Change signal to int.
16048
16049 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16050
16051 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16052 * configure.srv: Add m32r*-*-linux*.
16053 * linux-m32r-low.c: New file.
16054
16055 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16056
16057 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16058
16059 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16060
16061 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16062 Take unsigned long arguments for PIDs.
16063 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16064 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16065 (wait_for_sigstop, linux_resume_one_process)
16066 (regsets_fetch_inferior_registers, linux_send_signal)
16067 (linux_read_auxv): Likewise. Update the types of variables holding
16068 PIDs. Update format string specifiers.
16069 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16070 * remote-utils.c (prepare_resume_reply): Likewise.
16071 * server.c (cont_thread, general_thread, step_thread)
16072 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16073 unsigned long.
16074 (handle_query): Update format specifiers.
16075 (handle_v_cont, main): Use strtoul for thread IDs.
16076 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16077 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16078 (general_thread, step_thread, thread_from_wait)
16079 (old_thread_from_wait): Update.
16080 * target.h (struct thread_resume): Use unsigned long for THREAD.
16081 (struct target_ops): Use unsigned long for arguments to attach and
16082 thread_alive.
16083
16084 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16085
16086 * acinclude.m4: Include bfd/bfd.m4 directly.
16087 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16088 <agriffis@toolchain.org>.
16089 * aclocal.m4, configure: Regenerated.
16090
16091 2005-01-07 Andrew Cagney <cagney@gnu.org>
16092
16093 * configure.ac: Rename configure.in, require autoconf 2.59.
16094 * configure: Re-generate.
16095
16096 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16097
16098 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16099 LIBS when finished.
16100 * aclocal.m4: Regenerated.
16101 * configure: Regenerated.
16102
16103 2004-11-21 Andreas Schwab <schwab@suse.de>
16104
16105 * linux-m68k-low.c (m68k_num_gregs): Define.
16106 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16107 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16108 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16109 (m68k_breakpoint_at): New. Add to the_low_target.
16110
16111 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16112 srv_linux_thread_db to yes.
16113
16114 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16115
16116 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16117 (ARCH_SET_FS): Likewise.
16118 (ARCH_GET_FS): Likewise.
16119 (ARCH_GET_GS): Likewise.
16120
16121 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16122
16123 * linux-i386-low.c (ps_get_thread_area): New.
16124 * linux-x86-64-low.c (ps_get_thread_area): New.
16125 * linux-low.c: Include <sys/syscall.h>.
16126 (linux_kill_one_process): Don't kill the first thread here.
16127 (linux_kill): Kill the first thread here.
16128 (kill_lwp): New function.
16129 (send_sigstop, linux_send_signal): Use it.
16130 * proc-service.c: Clean up #ifdefs.
16131 (fpregset_info): Delete.
16132 (ps_lgetregs): Update and enable implementation.
16133 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16134 implementations.
16135 * remote-utils.c (struct sym_cache, symbol_cache): New.
16136 (input_interrupt): Print a clearer message.
16137 (async_io_enabled): New variable.
16138 (enable_async_io, disable_async_io): Use it. Update comments.
16139 (look_up_one_symbol): Use the symbol cache.
16140 * thread-db.c (thread_db_look_up_symbols): New function.
16141 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16142
16143 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16144
16145 * configure.in: Test for -rdynamic.
16146 * configure: Regenerated.
16147 * Makefile (INTERNAL_LDFLAGS): New.
16148 (gdbserver, gdbreplay): Use it.
16149
16150 2004-09-02 Andrew Cagney <cagney@gnu.org>
16151
16152 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16153
16154 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16155
16156 * linux-low.c (linux_wait): Clear all_processes list also.
16157
16158 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16159
16160 * linux-low.c: Include <errno.h>. Remove extern declaration of
16161 errno.
16162
16163 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16164
16165 * gdbreplay.c, server.h, utils.c: Update copyright years.
16166
16167 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16168
16169 * server.c (main): Print child status or termination signal from
16170 variable 'signal', not 'sig'.
16171
16172 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16173
16174 * linux-low.c (linux_read_memory): Change return type to
16175 int. Check for and return error from ptrace().
16176 * target.c (read_inferior_memory): Change return type to int. Pass
16177 back return status from the_target->read_memory().
16178 * target.h (struct target_ops): Adapt *read_memory() prototype.
16179 Update comment.
16180 (read_inferior_memory): Adapt prototype.
16181 * server.c (main): Return an error packet if
16182 read_inferior_memory() returns an error.
16183
16184 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16185
16186 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16187 Unify with other clean targets.
16188
16189 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * server.c (handle_v_cont): Call set_desired_inferior.
16192
16193 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16194
16195 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16196
16197 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16198
16199 * linux-low.c (linux_wait): Unblock async I/O.
16200 (linux_resume): Block and enable async I/O.
16201 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16202 * server.h (block_async_io, unblock_async_io): Add prototypes.
16203
16204 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16205
16206 * remote-utils.c (remote_open): Print a status notice after
16207 opening a TCP port.
16208 * server.c (attach_inferior): Print a status notice after
16209 attaching.
16210
16211 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16212
16213 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16214
16215 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16216
16217 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16218 error packet.
16219 * server.c, target.h: Update copyright years.
16220
16221 2004-02-25 Roland McGrath <roland@redhat.com>
16222
16223 * target.h (struct target_ops): New member `read_auxv'.
16224 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16225 * linux-low.c (linux_read_auxv): New function.
16226 (linux_target_ops): Initialize `read_auxv' member to that.
16227
16228 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16229
16230 Committed by Jim Blandy <jimb@redhat.com>.
16231
16232 * linux-s390-low.c (s390_num_regs): Update.
16233 (s390_regmap): Remove control registers. Use __s390x__ predefine
16234 instead of GPR_SIZE to distiguish s390 and s390x targets.
16235
16236 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16237
16238 * linux-low.c: Update copyright year.
16239 (check_removed_breakpoint): Clear pending_is_breakpoint.
16240 (linux_set_resume_request, linux_queue_one_thread)
16241 (resume_status_pending_p): New functions.
16242 (linux_continue_one_thread): Use process->resume.
16243 (linux_resume): Only resume threads if there are no pending events.
16244 * linux-low.h (struct process_info): Add resume request
16245 pointer.
16246
16247 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16248
16249 * regcache.c (new_register_cache): Clear the allocated register
16250 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16251
16252 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16253
16254 * linux-low.c (linux_resume): Take a struct thread_resume *
16255 argument.
16256 (linux_wait): Update call.
16257 (resume_ptr): New static variable.
16258 (linux_continue_one_thread): Renamed from
16259 linux_continue_one_process. Use resume_ptr.
16260 (linux_resume): Use linux_continue_one_thread.
16261 * server.c (handle_v_cont, handle_v_requests): New functions.
16262 (myresume): New function.
16263 (main): Handle 'v' case.
16264 * target.h (struct thread_resume): New type.
16265 (struct target_ops): Change argument of "resume" to struct
16266 thread_resume *.
16267 (myresume): Delete macro.
16268
16269 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16270
16271 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16272 (uninstall): Support DESTDIR.
16273
16274 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16275
16276 * configure.srv: Add xscale*linux copy of arm*linux entry.
16277
16278 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16279
16280 * linux-arm-low.c (arm_reinsert_addr): New function.
16281 (the_low_target): Add arm_reinsert_addr.
16282
16283 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16284
16285 * mem-break.c: Remove whitespace at end of file.
16286
16287 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16288
16289 * configure.in: Check whether we need to prototype strerror.
16290 * server.h: Optionally prototype strerror.
16291 * gdbreplay.c (perror_with_name): Use strerror.
16292 * linux-low.c (linux_attach_lwp): Use strerror.
16293 * utils.c (perror_with_name): Use strerror.
16294 * config.in, configure: Regenerated.
16295
16296 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16297
16298 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16299 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16300
16301 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16302
16303 * Makefile.in (SFILES): Update.
16304 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16305 low-sun3.c: Remove files.
16306
16307 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16308
16309 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16310 (linux_detach_one_process, linux_detach): New functions.
16311 (linux_target_ops): Add linux_detach.
16312 * server.c (main): Handle 'D' packet.
16313 * target.h (struct target_ops): Add "detach" member.
16314 (detach_inferior): Define.
16315
16316 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16317
16318 From Kelley Cook <kelleycook@wideopenwest.com>:
16319 * configure.srv: Accept i[34567]86 variants.
16320
16321 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16322
16323 * linux-low.c (linux_wait_for_event): Correct comment typos.
16324 (linux_resume_one_process): Call check_removed_breakpoint.
16325 (linux_send_signal): New function.
16326 (linux_target_ops): Add linux_send_signal.
16327 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16328 of kill.
16329 * target.h (struct target_ops): Add send_signal.
16330
16331 2003-05-29 Jim Blandy <jimb@redhat.com>
16332
16333 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16334 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16335 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16336 away part of the register's value.
16337
16338 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16339
16340 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16341 (linux_wait_for_event, linux_init_signals): Likewise.
16342
16343 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16344
16345 * configure.in: Check for stdlib.h.
16346 * configure: Regenerated.
16347 * config.in: Regenerated.
16348
16349 2003-01-04 Andreas Schwab <schwab@suse.de>
16350
16351 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16352
16353 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16354
16355 * Makefile.in: Remove obsolete code.
16356
16357 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16358
16359 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16360 defined(PT_FPR0_HI).
16361
16362 2002-11-17 Stuart Hughes <seh@zee2.com>
16363
16364 * linux-arm-low.c (arm_num_regs): Increase.
16365 (arm_regmap): Include status register.
16366
16367 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16368
16369 * linux-low.c (register_addr): Remove incorrect -1 check.
16370
16371 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16372
16373 * linux-low.c (linux_create_inferior): Call setpgid. Return
16374 the new PID.
16375 (unstopped_p, linux_signal_pid): Remove.
16376 (linux_target_ops): Remove linux_signal_pid.
16377 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16378 global instead of target method.
16379 * target.h (struct target_ops): Remove signal_pid. Update comment
16380 for create_inferior.
16381 * server.c (signal_pid): New variable.
16382 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16383 gdbserver. Set the child to be the foreground process group.
16384 (attach_inferior): Set signal_pid.
16385
16386 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16387
16388 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16389
16390 2002-08-20 Jim Blandy <jimb@redhat.com>
16391
16392 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16393 default for this.
16394
16395 2002-08-01 Andrew Cagney <cagney@redhat.com>
16396
16397 * Makefile.in: Make chill references obsolete.
16398
16399 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16400
16401 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16402 * configure: Regenerate.
16403 * config.in: Regenerate.
16404
16405 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16406
16407 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16408 (perror_with_name, remote_close, remote_open, expect, play): Static.
16409
16410 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16411
16412 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16413 byte offsets instead of an array of indexes.
16414 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16415
16416 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16417
16418 * regcache.c: Add comment.
16419
16420 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16421
16422 * thread-db.c: New file.
16423 * proc-service.c: New file.
16424 * acinclude.m4: New file.
16425 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16426 proc-service.o, and thread-db.o.
16427 (linux-low.o): Add USE_THREAD_DB.
16428 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16429 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16430 * aclocal.m4: Regenerated.
16431 * config.in: Regenerated.
16432 * configure: Regenerated.
16433 * configure.in: Check for proc_service.h, sys/procfs.h,
16434 thread_db.h, and linux/elf.h headrs.
16435 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16436 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16437 Check for -lthread_db and thread support.
16438 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16439 PowerPC, and SuperH.
16440 * i387-fp.c: Constify arguments.
16441 * i387-fp.h: Likewise.
16442 * inferiors.c: (struct thread_info): Renamed from
16443 `struct inferior_info'. Remove PID member. Use generic inferior
16444 list header. All uses updated.
16445 (inferiors, signal_pid): Removed.
16446 (all_threads): New variable.
16447 (get_thread): Define.
16448 (add_inferior_to_list): New function.
16449 (for_each_inferior): New function.
16450 (change_inferior_id): New function.
16451 (add_inferior): Removed.
16452 (remove_inferior): New function.
16453 (add_thread): New function.
16454 (free_one_thread): New function.
16455 (remove_thread): New function.
16456 (clear_inferiors): Use for_each_inferior and free_one_thread.
16457 (find_inferior): New function.
16458 (find_inferior_id): New function.
16459 (inferior_target_data): Update argument type.
16460 (set_inferior_target_data): Likewise.
16461 (inferior_regcache_data): Likewise.
16462 (set_inferior_regcache_data): Likewise.
16463 * linux-low.c (linux_bp_reinsert): Remove.
16464 (all_processes, stopping_threads, using_thrads)
16465 (struct pending_signals, debug_threads, pid_of): New.
16466 (inferior_pid): Replace with macro.
16467 (struct inferior_linux_data): Remove.
16468 (get_stop_pc, add_process): New functions.
16469 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16470 Use add_process and add_thread.
16471 (linux_attach_lwp): New function, based on old linux_attach. Use
16472 add_process and add_thread. Set stop_expected for new threads.
16473 (linux_attach): New function.
16474 (linux_kill_one_process): New function.
16475 (linux_kill): Kill all LWPs.
16476 (linux_thread_alive): Use find_inferior_id.
16477 (check_removed_breakpoints, status_pending_p): New functions.
16478 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16479 Update. Use WNOHANG. Wait for cloned processes also. Update process
16480 struct for the found process.
16481 (linux_wait_for_event): New function.
16482 (linux_wait): Use it. Support LWPs.
16483 (send_sigstop, wait_for_sigstop, stop_all_processes)
16484 (linux_resume_one_process, linux_continue_one_process): New functions.
16485 (linux_resume): Support LWPs.
16486 (REGISTER_RAW_SIZE): Remove.
16487 (fetch_register): Use register_size instead. Call supply_register.
16488 (usr_store_inferior_registers): Likewise. Call collect_register.
16489 Fix recursive case.
16490 (regsets_fetch_inferior_registers): Improve error message.
16491 (regsets_store_inferior_registers): Add debugging.
16492 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16493 (unstopped_p, linux_signal_pid): New functions.
16494 (linux_target_ops): Add linux_signal_pid.
16495 (linux_init_signals): New function.
16496 (initialize_low): Call it. Initialize using_threads.
16497 * regcache.c (inferior_regcache_data): Add valid
16498 flag.
16499 (get_regcache): Fetch registers lazily. Add fetch argument
16500 and update all callers.
16501 (regcache_invalidate_one, regcache_invalidate): New
16502 functions.
16503 (new_register_cache): Renamed from create_register_cache.
16504 Return the new regcache.
16505 (free_register_cache): Change argument to a void *.
16506 (registers_to_string, registers_from_string): Call get_regcache
16507 with fetch flag set.
16508 (register_data): Make static. Pass fetch flag to get_regcache.
16509 (supply_register): Call get_regcache with fetch flag clear.
16510 (collect_register): Call get_regcache with fetch flag set.
16511 (collect_register_as_string): New function.
16512 * regcache.h: Update.
16513 * remote-utils.c (putpkt): Flush after debug output and use
16514 stderr.
16515 Handle input interrupts while waiting for an ACK.
16516 (input_interrupt): Use signal_pid method.
16517 (getpkt): Flush after debug output and use stderr.
16518 (outreg): Use collect_register_as_string.
16519 (new_thread_notify, dead_thread_notify): New functions.
16520 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16521 and general_thread.
16522 (look_up_one_symbol): Flush after debug output.
16523 * server.c (step_thread, server_waiting): New variables.
16524 (start_inferior): Don't use signal_pid. Update call to mywait.
16525 (attach_inferior): Update call to mywait.
16526 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16527 (main): Don't fetch/store registers explicitly. Use
16528 set_desired_inferior. Support proposed ``Hs'' packet. Update
16529 calls to mywait.
16530 * server.h: Update.
16531 (struct inferior_list, struct_inferior_list_entry): New.
16532 * target.c (set_desired_inferior): New.
16533 (write_inferior_memory): Constify.
16534 (mywait): New function.
16535 * target.h: Update.
16536 (struct target_ops): New signal_pid method.
16537 (mywait): Removed macro, added prototype.
16538
16539 * linux-low.h (regset_func): Removed.
16540 (regset_fill_func, regset_store_func): New.
16541 (enum regset_type): New.
16542 (struct regset_info): Add type field. Use new operation types.
16543 (struct linux_target_ops): stop_pc renamed to get_pc.
16544 Add decr_pc_after_break and breakpoint_at.
16545 (get_process, get_thread_proess, get_process_thread)
16546 (strut process_info, all_processes, linux_attach_lwp)
16547 (thread_db_init): New.
16548
16549 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16550 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16551 (the_low_target): Add new members.
16552 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16553 (i386_store_fpxregset): Constify.
16554 (target_regsets): Add new kind identifier.
16555 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16556 (i386_set_pc): Add debugging.
16557 (i386_breakpoint_at): New function.
16558 (the_low_target): Add new members.
16559 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16560 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16561 (mips_breakpoint_at): New.
16562 (the_low_target): Add new members.
16563 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16564 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16565 (the_low_target): Add new members.
16566 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16567 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16568 (the_low_target): Add new members.
16569 * linux-x86-64-low.c (target_regsets): Add new kind
16570 identifier.
16571
16572 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16573
16574 From Martin Pool <mbp@samba.org>:
16575 * server.c (gdbserver_usage): New function.
16576 (main): Call it.
16577
16578 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16579
16580 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16581 stop_at -> stop_pc.
16582
16583 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16584
16585 * Makefile.in: Remove obsolete code.
16586
16587 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16588
16589 * linux-low.c (regsets_fetch_inferior_registers),
16590 (regsets_store_inferior_registers): Removed cast to int from
16591 ptrace() calls.
16592 * regcache.h: Added declaration of struct inferior_info.
16593
16594 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16595
16596 * inferiors.c (struct inferior_info): Add regcache_data.
16597 (add_inferior): Call create_register_cache.
16598 (clear_inferiors): Call free_register_cache.
16599 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16600 * regcache.c (struct inferior_regcache_data): New.
16601 (registers): Remove.
16602 (get_regcache): New function.
16603 (create_register_cache, free_register_cache): New functions.
16604 (set_register_cache): Don't initialize the register cache here.
16605 (registers_to_string, registers_from_string, register_data): Call
16606 get_regcache.
16607 * regcache.h: Add prototypes.
16608 * server.h: Likewise.
16609
16610 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16611
16612 * mem-break.c: New file.
16613 * mem-break.h: New file.
16614 * Makefile.in: Add mem-break.o rule; update server.h
16615 dependencies.
16616 * inferiors.c (struct inferior_info): Add target_data
16617 member.
16618 (clear_inferiors): Free target_data member if set.
16619 (inferior_target_data, set_inferior_target_data): New functions.
16620 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16621 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16622 * linux-low.c (linux_bp_reinsert): New variable.
16623 (struct inferior_linux_data): New.
16624 (linux_create_inferior): Use set_inferior_target_data.
16625 (linux_attach): Likewise. Call add_inferior.
16626 (linux_wait_for_one_inferior): New function.
16627 (linux_wait): Call it.
16628 (linux_write_memory): Add const.
16629 (initialize_low): Call set_breakpoint_data.
16630 * linux-low.h (struct linux_target_ops): Add breakpoint
16631 handling members.
16632 * server.c (attach_inferior): Remove extra add_inferior
16633 call.
16634 * server.h: Include mem-break.h. Update inferior.c
16635 prototypes.
16636 * target.c (read_inferior_memory)
16637 (write_inferior_memory): New functions.
16638 * target.h (read_inferior_memory)
16639 (write_inferior_memory): Change macros to prototypes.
16640 (struct target_ops): Update comments. Add const to write_memory
16641 definition.
16642
16643 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16644
16645 * linux-low.c (usr_store_inferior_registers): Support
16646 registers which are allowed to fail to store.
16647 * linux-low.h (linux_target_ops): Likewise.
16648 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16649 (ppc_cannot_store_register): FPSCR may not be storable.
16650
16651 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16652
16653 * server.h: Include <string.h> if HAVE_STRING_H.
16654 * ChangeLog: Correct paths in last ChangeLog entry.
16655
16656 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16657
16658 * linux-low.h: Remove obsolete prototypes.
16659 (struct linux_target_ops): New.
16660 (extern the_low_target): New.
16661 * linux-low.c (num_regs, regmap): Remove declarations.
16662 (register_addr): Use the_low_target explicitly.
16663 (fetch_register): Likewise.
16664 (usr_fetch_inferior_registers): Likewise.
16665 (usr_store_inferior_registers): Likewise.
16666 * linux-arm-low.c (num_regs): Remove.
16667 (arm_num_regs): Define.
16668 (arm_regmap): Renamed from regmap, made static.
16669 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16670 made static.
16671 (arm_cannot_store_register): Renamed from cannot_store_register,
16672 made static.
16673 (the_low_target): New.
16674 * linux-i386-low.c (num_regs): Remove.
16675 (i386_num_regs): Define.
16676 (i386_regmap): Renamed from regmap, made static.
16677 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16678 made static.
16679 (i386_cannot_store_register): Renamed from cannot_store_register,
16680 made static.
16681 (the_low_target): New.
16682 * linux-ia64-low.c (num_regs): Remove.
16683 (ia64_num_regs): Define.
16684 (ia64_regmap): Renamed from regmap, made static.
16685 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16686 made static.
16687 (ia64_cannot_store_register): Renamed from cannot_store_register,
16688 made static.
16689 (the_low_target): New.
16690 * linux-m68k-low.c (num_regs): Remove.
16691 (m68k_num_regs): Define.
16692 (m68k_regmap): Renamed from regmap, made static.
16693 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16694 made static.
16695 (m68k_cannot_store_register): Renamed from cannot_store_register,
16696 made static.
16697 (the_low_target): New.
16698 * linux-mips-low.c (num_regs): Remove.
16699 (mips_num_regs): Define.
16700 (mips_regmap): Renamed from regmap, made static.
16701 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16702 made static.
16703 (mips_cannot_store_register): Renamed from cannot_store_register,
16704 made static.
16705 (the_low_target): New.
16706 * linux-ppc-low.c (num_regs): Remove.
16707 (ppc_num_regs): Define.
16708 (ppc_regmap): Renamed from regmap, made static.
16709 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16710 made static.
16711 (ppc_cannot_store_register): Renamed from cannot_store_register,
16712 made static.
16713 (the_low_target): New.
16714 * linux-s390-low.c (num_regs): Remove.
16715 (s390_num_regs): Define.
16716 (s390_regmap): Renamed from regmap, made static.
16717 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16718 made static.
16719 (s390_cannot_store_register): Renamed from cannot_store_register,
16720 made static.
16721 (the_low_target): New.
16722 * linux-sh-low.c (num_regs): Remove.
16723 (sh_num_regs): Define.
16724 (sh_regmap): Renamed from regmap, made static.
16725 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16726 made static.
16727 (sh_cannot_store_register): Renamed from cannot_store_register,
16728 made static.
16729 (the_low_target): New.
16730 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16731 (the_low_target): New.
16732
16733 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16734
16735 * Makefile.in: Add stamp-h target.
16736 * configure.in: Create stamp-h.
16737 * configure: Regenerated.
16738
16739 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16740
16741 * inferiors.c: New file.
16742 * target.c: New file.
16743 * target.h: New file.
16744 * Makefile.in: Add target.o and inferiors.o. Update
16745 dependencies.
16746 * linux-low.c (inferior_pid): New static variable,
16747 moved from server.c.
16748 (linux_create_inferior): Renamed from create_inferior.
16749 Call add_inferior. Return 0 on success instead of a PID.
16750 (linux_attach): Renamed from myattach.
16751 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16752 (linux_thread_alive): Renamed from mythread_alive.
16753 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16754 child dies.
16755 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16756 (regsets_store_inferior_registers): Correct error message.
16757 Add missing ``return 0''.
16758 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16759 (linux_store_registers): Renamed from store_inferior_registers.
16760 (linux_read_memory): Renamed from read_inferior_memory.
16761 (linux_write_memory): Renamed from write_inferior_memory.
16762 (linux_target_ops): New structure.
16763 (initialize_low): Call set_target_ops ().
16764 * remote-utils.c (unhexify): New function.
16765 (hexify): New function.
16766 (input_interrupt): Send signals to ``signal_pid''.
16767 * server.c (inferior_pid): Remove.
16768 (start_inferior): Update create_inferior call.
16769 (attach_inferior): Call add_inferior.
16770 (handle_query): New function.
16771 (main): Call handle_query for `q' packets.
16772 * server.h: Include "target.h". Remove obsolete prototypes.
16773 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16774
16775 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16776
16777 * Makefile.in: Add WARN_CFLAGS. Update configury
16778 dependencies.
16779 * configure.in: Check for <string.h>
16780 * configure: Regenerate.
16781 * config.in: Regenerate.
16782 * gdbreplay.c: Include needed system headers.
16783 (remote_open): Remove strchr prototype.
16784 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16785 * regcache.c (supply_register): Change buf argument to const void *.
16786 (supply_register_by_name): Likewise.
16787 (collect_register): Change buf argument to void *.
16788 (collect_register_by_name): Likewise.
16789 * regcache.h: Add missing prototypes.
16790 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16791 * server.c (handle_query): New function.
16792 (attached): New static variable, moved out of main.
16793 (main): Quiet longjmp clobber warnings.
16794 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16795 * utils.c (error): Remove NORETURN.
16796 (fatal): Likewise.
This page took 0.357187 seconds and 5 git commands to generate.