]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
include: 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d8dab6c3
MR
12018-05-25 Maciej W. Rozycki <macro@mips.com>
2
3 * gdb.arch/mips-fpregset-core.exp: New test.
4 * gdb.arch/mips-fpregset-core.c: New test source.
5
81e25b7c
EK
62018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
7
8 PR server/23198
9 * hostio.c (require_int): Do not report overflow for integers
10 between 0xfffffff and 0x7fffffff.
11
7e947ad3
MR
122018-05-22 Maciej W. Rozycki <macro@mips.com>
13
14 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
15 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
16 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
17 functions.
18 (the_low_target): Wire them.
19
1d75a658
PFC
202018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
21
22 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
23 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
24 mode. Call collect_register_by_name with vscr using
25 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
26 (ppc_store_vrregset): Add and set vscr_offset variable as in
27 ppc_fill_vrregset. Call supply_register_by_name with vscr using
28 vscr_offset.
29
d078308a
PFC
302018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
31
32 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
33 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
34 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
35
7273b5fc
PFC
362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
37
38 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
39 (ppc_store_vsxregset): Likewise.
40 (ppc_fill_vrregset): Likewise.
41 (ppc_store_vrregset): Likewise.
42 (ppc_fill_evrregset): Likewise.
43 (ppc_store_evrregset): Likewise.
44 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
45 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
46 needed.
47
2e077f5e
PFC
482018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
49
50 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
51 wordsize of the inferior. Call ppc_linux_target_wordsize.
52
bd64614e
PFC
532018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
54
55 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
56 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
57 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
58 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
59 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
60 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
61 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
62 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
63 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
64 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
65 (tdesc_powerpc_e500l): Remove.
66 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
67 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
68 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
69 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
70 linux-ppc-tdesc.h.
71 (ppc_arch_setup): Remove target description matching code. Fill a
72 ppc_linux_features struct and call ppc_linux_match_description
73 with it.
74
75d74cca
MR
752018-05-22 Maciej W. Rozycki <macro@mips.com>
76
77 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
78 width of the requested register exceeds the width of the
79 `ptrace' data type.
80 (mips_cannot_store_register): Likewise.
81
e4439e43
MR
822018-05-21 Maciej W. Rozycki <macro@mips.com>
83
84 * linux-mips-low.c (mips_fetch_register): New function. Update
85 preceding comment.
86 (mips_store_gregset): Supply 0 rather than $restart for $zero.
87 (the_low_target): Wire `mips_fetch_register'.
88
55271bf9
JB
892018-05-10 Joel Brobecker <brobecker@adacore.com>
90
91 * lynx-i386-low.c (LYNXOS_178): New macro.
92 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
93 the layout on LynxOS-178.
94 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
95 handle floating point registers that are not supported by
96 LynxOS-178.
97
1a34f210
TT
982018-05-10 Tom Tromey <tom@tromey.com>
99
100 * configure: Rebuild.
101
190852c8
JB
1022018-05-10 Joel Brobecker <brobecker@adacore.com>
103
104 PR server/23158:
105 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
106 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
107 Use it to set the expedite_regs field in the given tdesc.
108 * x86-tdesc.h: New file.
109 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
110 Adjust following the addition of the new expedite_regs parameter
111 to init_target_desc.
112 * linux-tic6x-low.c (tic6x_read_description): Likewise.
113 * linux-x86-tdesc.c: #include "x86-tdesc.h".
114 (i386_linux_read_description, amd64_linux_read_description):
115 Adjust following the addition of the new expedite_regs parameter
116 to init_target_desc.
117 * lynx-i386-low.c: #include "x86-tdesc.h".
118 (lynx_i386_arch_setup): Adjust following the addition of the new
119 expedite_regs parameter to init_target_desc.
120 * nto-x86-low.c: #include "x86-tdesc.h".
121 (nto_x86_arch_setup): Adjust following the addition of the new
122 expedite_regs parameter to init_target_desc.
123 * win32-i386-low.c: #include "x86-tdesc.h".
124 (i386_arch_setup): Adjust following the addition of the new
125 expedite_regs parameter to init_target_desc.
126
7dbac825
JB
1272018-05-10 Joel Brobecker <brobecker@adacore.com>
128
129 PR server/23158:
130 * win32-low.c (win32_create_inferior): Add call to my_wait
131 setting last_status global.
132
906994d9
JB
1332018-05-10 Joel Brobecker <brobecker@adacore.com>
134
135 PR server/23158:
136 * win32-low.c (create_process): Only call gdb_tilde_expand if
137 inferior_cwd is not NULL.
138
8ee22052
AB
1392018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
140
141 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
142 registers to the cache if their values have changed.
143 (i387_xsave_to_cache): Provide default values for x87 control
144 registers when these features are available, but disabled.
145 * regcache.c (supply_register_by_name_zeroed): New function.
146 * regcache.h (supply_register_by_name_zeroed): Declare new
147 function.
148
aff689d3
TT
1492018-05-07 Tom Tromey <tom@tromey.com>
150
151 * configure: Rebuild.
152
85e26832
TT
1532018-05-04 Tom Tromey <tom@tromey.com>
154
155 * configure: Rebuild.
156
a3b60e45
JK
1572018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
158 Pedro Alves <palves@redhat.com>
159
160 * linux-aarch64-low.c (aarch64_stopped_data_address):
161 Likewise.
162
632e107b
TT
1632018-04-27 Tom Tromey <tom@tromey.com>
164
165 * configure: Rebuild.
166
458412c3
TT
1672018-04-23 Tom Tromey <tom@tromey.com>
168
169 * configure: Rebuild.
170
f31c089e
SM
1712018-04-19 Simon Marchi <simon.marchi@ericsson.com>
172
173 * Makefile.in (depcomp): Add "..".
174 (all_deps_files): New and use it.
175
b319b098
AH
1762018-04-18 Alan Hayward <alan.hayward@arm.com>
177
178 * configure.srv (aarch64*-*-linux*): Don't include xml.
179 (i[34567]86-*-cygwin*): Likewise.
180 (i[34567]86-*-linux*): Likewise.
181 (i[34567]86-*-lynxos*): Likewise.
182 (i[34567]86-*-mingw32ce*): Likewise.
183 (i[34567]86-*-mingw*): Likewise.
184 (i[34567]86-*-nto*): Likewise.
185 (tic6x-*-uclinux): Likewise.
186 (x86_64-*-linux*): Likewise.
187 (x86_64-*-mingw*): Likewise.
188 (x86_64-*-cygwin*): Likewise.
189
3b74854b
AH
1902018-04-18 Alan Hayward <alan.hayward@arm.com>
191
192 * tdesc.c: Remove xml parameter.
193
e98577a9
AH
1942018-04-18 Alan Hayward <alan.hayward@arm.com>
195
196 * server.c (get_features_xml): Remove cast.
197 * tdesc.c (void target_desc::accept): Fill in function.
198 (tdesc_get_features_xml): Remove old xml creation.
199 (print_xml_feature::visit_pre): Add xml vistor.
200 * tdesc.h (struct target_desc): Make xmltarget mutable.
201 (tdesc_get_features_xml): Remove declaration.
202
d278f585
AH
2032018-04-18 Alan Hayward <alan.hayward@arm.com>
204
205 * tdesc.c (tdesc_architecture_name): Add new function.
206 (tdesc_osabi_name): Likewise.
207 (tdesc_get_features_xml): Use new functions.
208
eee8a18d
AH
2092018-04-18 Alan Hayward <alan.hayward@arm.com>
210
211 * tdesc.c (tdesc_create_flags): Remove.
212 (tdesc_add_flag): Likewise.
213 (tdesc_named_type): Likewise.
214 (tdesc_create_union): Likewise.
215 (tdesc_create_struct): Likewise.
216 (tdesc_create_vector): Likewise.
217 (tdesc_add_bitfield): Likewise.
218 (tdesc_add_field): Likewise.
219 (tdesc_set_struct_size): Likewise.
220
82ec9bc7
AH
2212018-04-18 Alan Hayward <alan.hayward@arm.com>
222
223 * tdesc.c (~target_desc): Remove implictly deleted items.
224 (init_target_desc): Iterate all features.
225 (tdesc_get_features_xml): Use vector.
226 (tdesc_create_feature): Create feature.
227 * tdesc.h (tdesc_feature) Remove
228 (target_desc): Add features.
229
ea3e7d71
AH
2302018-04-18 Alan Hayward <alan.hayward@arm.com>
231
232 * Makefile.in: Add common/tdesc.c
233 * tdesc.c (init_target_desc): init all reg_defs from register
234 vector.
235 (tdesc_create_reg): Create tdesc_reg.
236 * tdesc.h (tdesc_feature): Add register vector.
237
17d08cd4
SM
2382018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
239
240 * tdesc.h (struct target_desc) <features>: Change type to
241 std::vector<std::string>.
242 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
243 changes.
244 (tdesc_get_features_xml): Likewise.
245 (tdesc_create_feature): Likewise.
246
5cd3e386
AH
2472018-03-26 Alan Hayward <alan.hayward@arm.com>
248
249 * regcache.c (find_register_by_number): Return a ref.
250 (find_regno): Use references.
251 (register_size): Likewise.
252 (register_data): Likewise.
253 * tdesc.c (target_desc::~target_desc): Remove free calls.
254 (target_desc::operator==): Use std::vector compare.
255 (init_target_desc): Use reference.
256 (tdesc_create_reg): Use reg constructors.
257 * tdesc.h (struct target_desc): Replace pointer with object.
258
dff7492c
AH
2592018-03-23 Alan Hayward <alan.hayward@arm.com>
260
261 * regcache.c (find_register_by_number): Make static.
262 (find_regno): Use find_register_by_number
263 * regcache.h (struct reg): Remove declaration.
264
d80e5242
AH
2652018-03-23 Alan Hayward <alan.hayward@arm.com>
266
267 * tdesc.c (target_desc::~target_desc): Move to here.
268 (target_desc::operator==): Likewise.
269 * tdesc.h (target_desc::~target_desc): Move from here.
270 (target_desc::operator==): Likewise.
271
f69c5afb
AA
2722018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
273
274 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
275
ce29f843
AA
2762018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
277
278 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
279 S390_TDESC_GS.
280 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
281 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
282 and init_registers_s390_gs_linux64.
283
c49bd90b
AA
2842018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
285
286 * linux-s390-low.c (s390_fill_gs): Remove function.
287 (s390_fill_gsbc): Remove function.
288 (s390_regsets): Set fill functions for the guarded storage regsets
289 to NULL.
290
7edb9bd3
AA
2912018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
292
293 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
294 the word size. Add comment.
295 (s390_get_wordsize): New function.
296 (s390_arch_setup): No longer select a temporary tdesc to fetch the
297 pswm with it. Instead, use s390_get_wordsize to determine the
298 word size first and derive the correct tdesc from that directly.
299
39be3c7e
SM
3002018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
301
302 * Makefile.in: Include silent-rules.mk.
303 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
304 (COMPILE): Add ECHO_CXX.
305 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
306 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
307 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
308 (version-generated.c): Add ECHO_GEN.
309 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
310 (IPAGENT_COMPILE): Add ECHO_CXX.
311 (%-generated.c): Add ECHO_REGDAT.
312
3ae9ce5d
TT
3132018-03-14 Tom Tromey <tom@tromey.com>
314
315 PR cli/14977:
316 * ax.c (ax_printf): Special case for NULL.
317
e6a58aa8
SM
3182018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * linux-low.c (linux_qxfer_libraries_svr4): Use
321 xml_escape_text_append.
322
f6e8a41e
SM
3232018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
326
b9671caf
SM
3272018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
328
329 * server.c (handle_general_set): Remove unnecessary xstrdup.
330
e80aaf61
SM
3312018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * server.c (parse_debug_format_options): Adjust to
334 delim_string_to_char_ptr_vec changes.
335 * thread-db.c (thread_db_load_search): Adjust to
336 dirnames_to_char_ptr_vec changes.
337
b1223e78
MM
3382018-03-01 Markus Metzger <markus.t.metzger@intel.com>
339
340 * target.h (target_enable_btrace, target_disable_btrace)
341 (target_read_btrace, target_read_btrace_conf): Turn macro into
342 inline function. Throw error if target method is not defined.
343 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
344 check for btrace target method. Be prepared to handle exceptions
345 from btrace target methods.
346
81561546
SDJ
3472018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
348
349 * server.c (captured_main): Change order of error message printed
350 when the current working directory cannot be found.
351
25e3c82c
SDJ
3522018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
353
354 * server.c: Include "filenames.h" and "pathstuff.h".
355 (program_name): Delete variable.
356 (program_path): New anonymous class.
357 (get_exec_wrapper): Use "program_path" instead of
358 "program_name".
359 (handle_v_run): Likewise.
360 (captured_main): Likewise.
361 (process_serial_event): Likewise.
362
b4987c95
SDJ
3632018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
364
365 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
366 (OBJS): Add "pathstuff.o".
367 * server.c (current_directory): New global variable.
368 (captured_main): Initialize "current_directory".
369
f46cd62a
AH
3702018-02-26 Alan Hayward <alan.hayward@arm.com>
371
372 * tdesc.c: Use common/tdesc.h.
373 * tdesc.h: Likewise.
374
a543c5ca
AH
3752018-02-20 Alan Hayward <alan.hayward@arm.com>
376 Simon Marchi <simon.marchi@ericsson.com>
377
378 * Makefile.in: Switch order of make rules.
379
b5884fa7
AH
3802018-02-19 Alan Hayward <alan.hayward@arm.com>
381
382 * Makefile.in: Add common directory in build.
383 * configure.ac: Add common reference.
384 * configure: Regenerate.
385
de6242d3
MM
3862018-02-09 Markus Metzger <markus.t.metzger@intel.com>
387
388 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
389 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
390 * spu-low.c (spu_target_ops): Likewise.
391 * win32-low.c (win32_target_ops): Likewise.
392 * server.c (supported_btrace_packets): Report packets unconditionally.
393 * target.h (target_ops) <supports_btrace>: Remove.
394 (target_supports_btrace): Remove.
395
9ee23a85
MM
3962018-02-09 Markus Metzger <markus.t.metzger@intel.com>
397
398 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
399 (handle_btrace_disable): Change return type to void. Use exceptions
400 to report errors.
401 (handle_btrace_general_set): Catch exception and copy message to
402 return message.
403
8ce47547
TT
4042018-02-08 Tom Tromey <tom@tromey.com>
405
406 * linux-low.c (install_software_single_step_breakpoints): Use
407 make_scoped_restore.
408 * inferiors.c (make_cleanup_restore_current_thread): Remove.
409 (do_restore_current_thread_cleanup): Remove.
410 * gdbthread.h (make_cleanup_restore_current_thread): Don't
411 declare.
412
45dd3607
TT
4132018-02-08 Tom Tromey <tom@tromey.com>
414
415 * mem-break.c (set_raw_breakpoint_at): Use
416 gdb::unique_xmalloc_ptr.
417
e671cd59
PA
4182018-01-30 Pedro Alves <palves@redhat.com>
419
420 PR gdb/13211
421 * target.c (target_terminal::terminal_state): Rename to ...
422 (target_terminal::m_terminal_state): ... this.
423
a0aad537
JC
4242018-01-19 James Clarke <jrtc27@jrtc27.com>
425
426 * linux-low.c (handle_extended_wait): Surround call to
427 thread_db_notice_clone with #ifdef USE_THREAD_DB.
428
4d9b86e1
SM
4292018-01-17 Simon Marchi <simon.marchi@ericsson.com>
430
431 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
432 linux_ptrace_attach_fail_reason_string now returning an
433 std::string.
434 (linux_attach): Likewise.
435 * thread-db.c (attach_thread): Likewise.
436
f517c180
EA
4372018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
438
439 PR gdb/21559
440 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
441 checking for fs_base/gs_base fields in struct user_regs_struct.
442 * configure: Regenerate.
443
9a70f35c
YQ
4442018-01-16 Yao Qi <yao.qi@linaro.org>
445
446 PR gdb/18749
447 * linux-low.c (fetch_register): Call supply_register instead of
448 error.
449
605fd3c6
YQ
4502018-01-08 Yao Qi <yao.qi@linaro.org>
451 Simon Marchi <simon.marchi@ericsson.com>
452
453 * Makefile.in (OBS): Remove selftest.o.
454 * configure.ac: Set srv_selftest_objs if $development is true.
455 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
456 * configure: Re-generated.
457 * server.c (captured_main): Wrap variable selftest_filter with
458 GDB_SELF_TEST.
459
2cc05030
SM
4602018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
461
462 * server.c (parse_debug_format_options): Return std::string.
463 (handle_monitor_command, captured_main): Adjust.
464
e379cee6
PA
4652018-01-05 Pedro Alves <palves@redhat.com>
466
467 PR gdb/18653
468 * server.c (captured_main): Pass quiet=false to
469 save_original_signals_state.
470
82e1e79a
JB
4712018-01-01 Joel Brobecker <brobecker@adacore.com>
472
473 * gdbreplay.c (gdbreplay_version): Update copyright year in
474 version message.
475 * server.c (gdbserver_version): Likewise.
476
8e481c3b
TT
4772017-12-08 Tom Tromey <tom@tromey.com>
478
479 * ax.c (ax_printf): Update.
480
a8806230
YQ
4812017-12-07 Yao Qi <yao.qi@linaro.org>
482
483 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
484 aarch64_linux_read_description.
485 * linux-amd64-ipa.c (idx2mask): New array.
486 (get_ipa_tdesc): Move idx2mask out.
487 (initialize_low_tracepoint): Initialize target descriptions.
488 * linux-i386-ipa.c (idx2mask): New array.
489 (get_ipa_tdesc): Move idx2mask out.
490 (initialize_low_tracepoint): Initialize target descriptions.
491
d4a0e8b5
SM
4922017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
493
494 * tdesc.c (struct tdesc_type): Change return type.
495 (tdesc_add_flag): Change parameter type.
496 (tdesc_add_bitfield): Likewise.
497 (tdesc_add_field): Likewise.
498 (tdesc_set_struct_size): Likewise.
499
798a7429
SM
5002017-12-05 Simon Marchi <simon.marchi@ericsson.com>
501
502 * regcache.c (registers_to_string): Remove unused variable.
503
c0e15c9b
SM
5042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
505
506 * inferiors.c (for_each_inferior_with_data): Remove.
507 * inferiors.h (for_each_inferior_with_data): Remove.
508 * server.c (handle_qxfer_threads_worker): Change parameter type.
509 (handle_qxfer_threads_proper): Use for_each_thread.
510
f0045347
SM
5112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
512
513 * inferiors.c (for_each_inferior): Remove.
514 (clear_inferiors): Use for_each_thread.
515 * inferiors.h (for_each_inferior): Remove.
516 * linux-low.c (linux_wait_for_event_filtered): Use
517 for_each_thread.
518 (linux_stabilize_threads): Likewise.
519 * regcache.c (regcache_release): Likewise.
520 * server.c (gdb_wants_all_threads_stopped): Likewise.
521 (clear_pending_status_callback): Remove.
522 (handle_status): Use for_each_thread.
523 (captured_main): Likewise.
524 * win32-low.c (child_init_thread_list): Likewise.
525 (win32_clear_inferiors): Likewise.
526 (fake_breakpoint_event): Likewise.
527
9521758b
SM
5282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
529
530 * inferiors.h (find_inferior): Remove.
531 * inferiors.c (find_inferior): Remove.
532
8f86d7aa
SM
5332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
534
535 * linux-low.c (resume_status_pending_p): Update comment.
536 (need_step_over_p): Update comment.
537
e2b44075
SM
5382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
539
540 * linux-low.c (proceed_one_lwp): Return void, change parameter
541 type.
542 (unsuspend_and_proceed_one_lwp): Likewise.
543 (proceed_all_lwps): Use for_each_thread.
544 (unstop_all_lwps): Likewise.
545
c80825ff
SM
5462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
547
548 * linux-low.c (linux_resume_one_thread): Return void, take
549 parameter directly.
550 (linux_resume): Use for_each_thread.
551
df3e4dbe
SM
5522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * linux-low.c (send_sigstop_callback): Return void, change
555 parameter type. Rename to...
556 (send_sigstop): ... this.
557 (suspend_and_send_sigstop_callback): Return void, change parameter
558 type. Rename to...
559 (suspend_and_send_sigstop): ... this.
560 (stop_all_lwps): Use for_each_thread.
561
5a6b0a41
SM
5622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
563
564 * linux-low.c (lwp_running): Return bool, remove unused
565 argument.
566 (linux_stabilize_threads): Use find_thread.
567
39a64da5
SM
5682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * linux-low.c (select_singlestep_lwp_callback): Remove.
571 (count_events_callback): Remove.
572 (select_event_lwp_callback): Remove.
573 (select_event_lwp): Use find_thread/for_each_thread.
574
a1385b7b
SM
5752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
576
577 * linux-low.c (not_stopped_callback): Return bool, take filter
578 argument directly.
579 (linux_wait_for_event_filtered): Use find_thread.
580 (linux_wait_1): Likewise.
581
454296a2
SM
5822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-low.c (same_lwp): Remove.
585 (find_lwp_pid): Use find_thread.
586
6b2a85da
SM
5872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * linux-low.c (delete_lwp_callback): Remove.
590 (linux_mourn): Use for_each_thread.
591
798a38e8
SM
5922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * linux-low.c (linux_detach_lwp_callback): Return void, remove
595 args parameter, don't check for pid.
596 (linux_detach): Use for_each_thread.
597
e4eb0dec
SM
5982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
599
600 * linux-low.c (struct counter): Remove.
601 (second_thread_of_pid_p): Remove.
602 (last_thread_of_process_p): Use find_thread.
603
83e1b6c1
SM
6042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
605
606 * inferiors.c (find_inferior_in_random): Remove.
607 * inferiors.h (find_inferior_in_random): Remove.
608 * linux-low.c (status_pending_p_callback): Return bool, accept
609 parameter ptid directly.
610 (linux_wait_for_event_filtered): Use find_thread_in_random.
611 (linux_wait_1): Likewise.
612
8dc7b443
SM
6132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * inferiors.c (find_inferior_id): Remove.
616 (find_thread_ptid): Move implemention from find_inferior_id to
617 here.
618 * inferiors.h (find_inferior_id): Remove.
619 * server.c (handle_status): Use find_thread_ptid.
620 (process_serial_event): Likewise.
621 * thread-db.c (find_one_thread): Likewise.
622 (thread_db_thread_handle): Likewise.
623 * win32-low.c (thread_rec): Likewise.
624 (child_delete_thread): Likewise.
625 (win32_thread_alive): Likewise.
626 (get_child_debug_event): Likewise.
627
da25033c
SM
6282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
629
630 * linux-mips-low.c (update_watch_registers_callback): Return
631 void, remove pid_p parameter, don't check for pid.
632 (mips_insert_point, mips_remove_point): Use for_each_thread.
633
c91bb56b
SM
6342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * lynx.low (lynx_delete_thread_callback): Remove.
637 (lynx_mourn): Use for_each_thread.
638
634a3254
SM
6392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * regcache.c (regcache_invalidate_one): Remove.
642 (regcache_invalidate_pid): use for_each_thread.
643
41272101
TT
6442017-11-26 Tom Tromey <tom@tromey.com>
645
646 * linux-low.c (linux_create_inferior): Update.
647
f5291a6f
UW
6482017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
649
650 * spu-low.c (spu_create_inferior): Fix typo in argument name.
651
6654d750
AH
6522017-11-24 Alan Hayward <alan.hayward@arm.com>
653
654 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
655 * linux-aarch64-low.c (initialize_low_arch): Call init func.
656 * linux-aarch64-tdesc-selftest.c: New file.
657 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
658
6592017-11-24 Alan Hayward <alan.hayward@arm.com>
660
661 * configure.srv: Add new file.
662 * linux-aarch64-low.c (initialize_low_arch): Call init func.
663 * linux-aarch64-tdesc-selftest.c: New file.
664 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
665
49bdb7ee
AH
6662017-11-24 Alan Hayward <alan.hayward@arm.com>
667
668 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
669 * linux-aarch64-low.c (initialize_low_arch): Remove init.
670 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
671
d6d7ce56
AH
6722017-11-24 Alan Hayward <alan.hayward@arm.com>
673
674 * configure.srv: Add new files.
675 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
676 aarch64_linux_read_description.
677 * linux-aarch64-low.c (aarch64_linux_read_description):
678 Merge with aarch64_arch_setup.
679 (aarch64_arch_setup): Call aarch64_linux_read_description.
680 * linux-aarch64-tdesc.c: New file.
681 * linux-aarch64-tdesc.h: New file.
682
506fe5f4
YQ
6832017-11-24 Yao Qi <yao.qi@linaro.org>
684
685 * configure.srv: Set $srv_regobj for tic6x-linux.
686 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
687 (tic6x_read_description): Move some code to tic6x_arch_setup.
688 (tic6x_tdesc_test): New function.
689 (initialize_low_arch): Call selftests::register_test.
690
29f9a567
YQ
6912017-11-22 Yao Qi <yao.qi@linaro.org>
692
693 * remote-utils.c (prepare_resume_reply): Use memcpy.
694
578290ec
SM
6952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
696
697 * linux-low.c (kill_one_lwp_callback): Return void, take
698 argument directly, don't filter on pid.
699 (linux_kill): Use for_each_thread.
700
eca55aec
SM
7012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
702
703 * linux-low.c (need_step_over_p): Return bool, remove dummy
704 argument.
705 (linux_resume, proceed_all_lwps): Use find_thread.
706
25c28b4d
SM
7072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
708
709 * linux-low.c (resume_status_pending_p): Return bool, remove
710 flag_p argument.
711 (linux_resume): Use find_thread.
712
5fdda392
SM
7132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
714
715 * linux-low.c (struct thread_resume_array): Remove.
716 (linux_set_resume_request): Return void, take arguments
717 directly.
718 (linux_resume): Use for_each_thread.
719
fcb056a5
SM
7202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
721
722 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
723 return bool, remove data argument.
724 (linux_stabilize_threads): Use find_thread.
725
139720c5
SM
7262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
727
728 * linux-low.c (unsuspend_one_lwp): Remove.
729 (unsuspend_all_lwps): Use for_each_thread, inline code from
730 unsuspend_one_lwp.
731
6d1e5673
SM
7322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
733
734 * gdbthread.h (find_thread): Add overload with ptid_t filter.
735 * linux-low.c (struct iterate_over_lwps_args): Remove.
736 (iterate_over_lwps_filter): Remove.
737 (iterate_over_lwps): Use find_thread.
738
bbf550d5
SM
7392017-11-19 Simon Marchi <simon.marchi@ericsson.com>
740
741 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
742 (linux_handle_new_gdb_connection): Use for_each_thread, inline
743 code from reset_lwp_ptrace_options_callback.
744
00192f77
SM
7452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
746
747 * linux-arm-low.c (struct update_registers_data): Remove.
748 (update_registers_callback): Return void, take arguments
749 directly, don't check thread's pid.
750 (arm_insert_point, arm_remove_point): Use for_each_thread.
751
2bee2b6c
SM
7522017-11-19 Simon Marchi <simon.marchi@ericsson.com>
753
754 * win32-low.c (continue_one_thread): Return void, take argument
755 directly.
756 (child_continue): Use for_each_thread.
757
0b360f19
SM
7582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
759
760 * win32-i386-low.c (update_debug_registers_callback): Rename
761 to ...
762 (update_debug_registers): ... this, return void, remove pid_p arg.
763 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
764
f27866ba
SM
7652017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
766
767 * inferiors.h (struct process_info): Add constructor, initialize
768 fields..
769 <syscalls_to_catch>: Change type to std::vector<int>.
770 * inferiors.c (add_process): Allocate process_info with new.
771 (remove_process): Free process_info with delete.
772 * linux-low.c (handle_extended_wait): Adjust.
773 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
774 * server.c (handle_general_set): Adjust.
775
e849ea89
PA
7762017-11-16 Pedro Alves <palves@redhat.com>
777
778 * remote-utils.c (remote_close): Block SIGIO signals instead of
779 uninstalling the SIGIO handler.
780
1d0aa65c
AH
7812017-11-16 Alan Hayward <alan.hayward@arm.com>
782
783 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
784
3491a34c
YQ
7852017-11-16 Yao Qi <yao.qi@linaro.org>
786
787 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
788 (tic6x_store_gregset): Likewise.
789 (tic6x_usrregs_info): Move it up.
790
a602f924
AH
7912017-11-15 Alan Hayward <alan.hayward@arm.com>
792
793 * Makefile.in: Update arch rules.
794 * configure.srv: Explicitly mark arch/ files.
795
5616b6c3
AS
7962017-11-13 Andreas Schwab <schwab@suse.de>
797
798 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
799 function.
800 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
801
d1928160
PA
8022017-11-06 Pedro Alves <palves@redhat.com>
803
804 * config.in, configure: Regenerate.
805
bac608e7
SM
8062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
807
808 * target.c (struct thread_search): Remove.
809 (thread_search_callback): Remove.
810 (prepare_to_access_memory): Use for_each_thread instead of
811 find_inferior. Inline code from thread_search_callback.
812
eaddb425
SM
8132017-10-27 Simon Marchi <simon.marchi@ericsson.com>
814
815 * server.c (struct visit_actioned_threads_data): Remove.
816 (visit_actioned_threads): Change prototype to take arguments
817 directly.
818 (resume): Use find_thread instead of find_inferior.
819
99078d34
SM
8202017-10-27 Simon Marchi <simon.marchi@ericsson.com>
821
822 * server.c (queue_stop_reply_callback): Change prototype, return
823 void.
824 (find_status_pending_thread_callback): Remove.
825 (handle_status): Replace find_inferior with find_thread and
826 for_each_thread.
827
cc628f3d
AH
8282017-10-25 Alan Hayward <alan.hayward@arm.com>
829
830 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
831 with REGNO.
832 (aarch64_store_gregset): Likewise.
833 (aarch64_fill_fpregset): Likewise.
834 (aarch64_store_fpregset): Likewise.
835
4d3bb80e
SM
8362017-10-21 Simon Marchi <simon.marchi@ericsson.com>
837
838 * gdbthread.h (find_thread, for_each_thread): New functions.
839 * inferiors.c (thread_of_pid): Remove.
840 (find_any_thread_of_pid): Use find_thread.
841 * linux-low.c (num_lwps): Use for_each_thread.
842
7a7cdfa0
YQ
8432017-10-17 Yao Qi <yao.qi@linaro.org>
844
845 * Makefile.in: Remove one rule.
846 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
847
e675d170
YQ
8482017-10-17 Yao Qi <yao.qi@linaro.org>
849
850 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
851 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
852
7eb4e0f9
YQ
8532017-10-17 Yao Qi <yao.qi@linaro.org>
854
855 * configure.srv: Rename arm.o with arch/arm.o.
856
60d6cfc9
YQ
8572017-10-17 Yao Qi <yao.qi@linaro.org>
858
859 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
860 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
861 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
862 (arch-i386.o, arch-amd64.o): Remove rules.
863 (arch/%.o): New rule.
864 Update POSTCOMPILE and COMPILE.pre.
865 * configure.ac: Invoke AC_CONFIG_COMMANDS.
866 * configure: Re-generated.
867 * configure.srv: Replace arch-i386.o with arch/i386.o.
868 Replace arch-amd64.o with arch/amd64.o.
869
5bfda255
YQ
8702017-10-16 Yao Qi <yao.qi@linaro.org>
871
872 * configure: Regenerated.
873
9c80ecd6
SM
8742017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
875
876 * inferiors.h: (struct inferior_list): Remove.
877 (struct inferior_list_entry); Remove.
878 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
879 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
880 get_first_inferior): Remove.
881 (for_each_inferior, for_each_inferior_with_data, find_inferior,
882 find_inferior_id, find_inferior_in_random): Change signature.
883 * inferiors.c (all_threads): Change type to
884 std::list<thread_info *>.
885 (get_thread): Remove macro.
886 (find_inferior, find_inferior_id): Change signature, implement
887 using find_thread.
888 (find_inferior_in_random): Change signature, implement using
889 find_thread_in_random.
890 (for_each_inferior, for_each_inferior_with_data): Change
891 signature, implement using for_each_thread.
892 (add_inferior_to_list, remove_inferior): Remove.
893 (add_thread, get_first_thread, thread_of_pid,
894 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
895 (get_first_inferior, one_inferior_p, clear_inferior_list):
896 Remove.
897 (clear_inferiors, get_thread_process): Update.
898 * gdbthread.h: Include <list>.
899 (struct thread_info) <entry>: Remove field.
900 <id>: New field.
901 (all_threads): Change type to std::list<thread_info *>.
902 (get_first_inferior): Add doc.
903 (find_thread, for_each_thread, find_thread_in_random): New
904 functions.
905 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
906 * linux-arm-low.c (update_registers_callback): Update.
907 * linux-low.c (second_thread_of_pid_p): Update.
908 (kill_one_lwp_callback, linux_detach_lwp_callback,
909 delete_lwp_callback, status_pending_p_callback, same_lwp,
910 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
911 iterate_over_lwps, not_stopped_callback,
912 resume_stopped_resumed_lwps, count_events_callback,
913 select_singlestep_lwp_callback, select_event_lwp_callback,
914 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
915 suspend_and_send_sigstop_callback, wait_for_sigstop,
916 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
917 lwp_running, linux_set_resume_request, resume_status_pending_p,
918 need_step_over_p, start_step_over, linux_resume_one_thread,
919 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
920 reset_lwp_ptrace_options_callback): Update.
921 * linux-mips-low.c (update_watch_registers_callback): Update.
922 * regcache.c (regcache_invalidate_one, regcache_invalidate):
923 Update.
924 (free_register_cache_thread_one): Remove.
925 (regcache_release): Update.
926 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
927 handle_qxfer_threads_worker): Update.
928 (handle_query): Update, use list iterator.
929 (visit_actioned_threads, handle_pending_status,
930 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
931 clear_pending_status_callback, set_pending_status_callback,
932 find_status_pending_thread_callback, handle_status,
933 process_serial_event): Update.
934 * target.c (thread_search_callback): Update.
935 * thread-db.c (thread_db_get_tls_address): Update.
936 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
937 Update.
938 * win32-i386-low.c (update_debug_registers_callback): Update.
939 * win32-low.c (delete_thread_info, child_delete_thread,
940 continue_one_thread, suspend_one_thread,
941 get_child_debug_event): Adjust.
942
9179355e
SM
9432017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
944
945 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
946 * inferiors.h: Include <list>.
947 (struct process_info) <entry>: Remove field.
948 <pid>: New field.
949 (pid_of): Change macro to function.
950 (ptid_of, lwpid_of): Remove macro.
951 (all_processes): Change type to std::list<process_info *>.
952 (ALL_PROCESSES): Remove macro.
953 (for_each_process, find_process): New function.
954 * inferiors.c (all_processes): Change type to
955 std::list<process_info *>.
956 (find_thread_process): Adjust.
957 (add_process): Likewise.
958 (remove_process): Likewise.
959 (find_process_pid): Likewise.
960 (get_first_process): Likewise.
961 (started_inferior_callback): Remove.
962 (have_started_inferiors_p): Adjust.
963 (attached_inferior_callback): Remove.
964 (have_attached_inferiors_p): Adjust.
965 * linux-low.c (check_zombie_leaders): Likewise.
966 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
967 (x86_linux_update_xmltarget): Adjust.
968 * server.c (handle_query): Likewise.
969 (gdb_reattached_process): Remove.
970 (handle_status): Adjust.
971 (kill_inferior_callback): Likewise.
972 (detach_or_kill_inferior): Remove.
973 (print_started_pid): Likewise.
974 (print_attached_pid): Likewise.
975 (detach_or_kill_for_exit): Update.
976 (process_serial_event): Likewise.
977 * linux-arm-low.c (arm_new_fork): Likewise.
978
c9cb8905
SM
9792017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * dll.h: Include <list>.
982 (struct dll_info): Add constructor.
983 <entry>: Remove field.
984 (all_dlls): Change type to std::list<dll_info>.
985 * dll.c: Include <algorithm>.
986 (get_dll): Remove macro.
987 (all_dlls): Change type to std::list<dll_info *>.
988 (free_one_dll): Remove.
989 (match_dll): Likewise.
990 (loaded_dll): Adjust.
991 (unloaded_dll): Adjust to all_dlls type change, use
992 std::find_if. Inline code from match_dll.
993 (clear_dlls): Adjust to all_dlls type change.
994 * server.c (emit_dll_description): Remove.
995 (handle_qxfer_libraries): Adjust to all_dlls type change,
996 integrate emit_dll_description's functionality.
997
04ec7890
SM
9982017-10-12 Simon Marchi <simon.marchi@ericsson.com>
999
1000 * linux-low.h (struct linux_target_ops) <delete_process>: New
1001 field.
1002 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1003 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1004 (struct linux_target_ops): Add delete_process callback.
1005 * linux-arm-low.c (arm_delete_process): New.
1006 (struct linux_target_ops): Add delete_process callback.
1007 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1008 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1009 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1010 * linux-mips-low.c (mips_linux_delete_process): New.
1011 (struct linux_target_ops): Add delete_process callback.
1012 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1013 * linux-s390-low.c (struct linux_target_ops): Likewise.
1014 * linux-sh-low.c (struct linux_target_ops): Likewise.
1015 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1016 * linux-tile-low.c (struct linux_target_ops): Likewise.
1017 * linux-x86-low.c (x86_linux_delete_process): New.
1018 (struct linux_target_ops): Add delete_process callback.
1019 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1020
466eecee
SM
10212017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1022
1023 * linux-aarch64-low.c (the_low_target): Add thread delete
1024 callback.
1025 * linux-arm-low.c (arm_delete_thread): New function.
1026 (the_low_target): Add thread delete callback.
1027 * linux-bfin-low.c (the_low_target): Likewise.
1028 * linux-crisv32-low.c (the_low_target): Likewise.
1029 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1030 set.
1031 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1032 field.
1033 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1034 * linux-mips-low.c (mips_linux_delete_thread): New function.
1035 (the_low_target): Add thread delete callback.
1036 * linux-ppc-low.c (the_low_target): Likewise.
1037 * linux-s390-low.c (the_low_target): Likewise.
1038 * linux-sh-low.c (the_low_target): Likewise.
1039 * linux-tic6x-low.c (the_low_target): Likewise.
1040 * linux-tile-low.c (the_low_target): Likewise.
1041 * linux-x86-low.c (the_low_target): Likewise.
1042 * linux-xtensa-low.c (the_low_target): Likewise.
1043
b79f7801
YZ
10442017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1045
1046 * win32-low.c: Include "common-inferior.h".
1047
bc3b087d
SDJ
10482017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1049
1050 * inferiors.c (set_inferior_cwd): New function.
1051 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1052 (handle_query): Inform that QSetWorkingDir is supported.
1053 * win32-low.c (create_process): Pass the inferior's cwd to
1054 CreateProcess.
1055
d092c5a2
SDJ
10562017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1057
1058 * inferiors.c (current_inferior_cwd): New global variable.
1059 (get_inferior_cwd): New function.
1060 * inferiors.h (struct process_info) <cwd>: New field.
1061
7da0a886
SDJ
10622017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1063
1064 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1065 (OBS): Add gdb_tilde_expand.o.
1066
289a6840
SM
10672017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1070 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1071
256642e8
PA
10722017-09-29 Pedro Alves <palves@redhat.com>
1073
1074 * ax.c (gdb_parse_agent_expr): Constify.
1075 * ax.h (gdb_parse_agent_expr): Constify.
1076 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1077 Constify.
1078 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1079 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1080 * remote-utils.h (read_ptid): Constify.
1081 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1082 (process_point_options, process_serial_event): Constify.
1083 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1084 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1085 (cmd_qtbuffer): Constify.
1086
5b9ca4d4
PA
10872017-09-29 Pedro Alves <palves@redhat.com>
1088
1089 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1090 fails.
1091
94c207e0
PA
10922017-09-29 Pedro Alves <palves@redhat.com>
1093
1094 * linux-low.c (handle_extended_wait): Pass parent thread instead
1095 of process to thread_db_notice_clone.
1096 * linux-low.h (thread_db_notice_clone): Replace parent process
1097 parameter with parent thread parameter.
1098 * thread-db.c (find_one_thread): Add comment.
1099 (thread_db_notice_clone): Replace parent process parameter with
1100 parent thread parameter. Temporarily switch to the parent thread.
1101
75352e28
SDJ
11022017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1103
1104 * gdbthread.h: Include "common-gdbthread.h".
1105 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1106 "if" when validating the ptid.
1107 * remote-utils.c: Include "gdbthread.h".
1108 (prepare_resume_reply): Use "switch_to_thread".
1109 * target.c (done_accessing_memory): Likewise.
1110
ad339634
AA
11112017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1112
1113 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1114 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1115 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1116 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1117 s390x-gs-linux64-ipa.o to ipa_obj.
1118 * linux-s390-low.c (HWCAP_S390_GS): New define.
1119 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1120 New functions.
1121 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1122 (s390_arch_setup): Check for guarded-storage support and choose
1123 appropriate tdesc.
1124 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1125 init_registers_s390x_gs_linux64.
1126 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1127 enum value.
1128 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1129 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1130
cc4d742f
SM
11312017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1132
1133 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1134
f6327dcb
KB
11352017-09-21 Kevin Buettner <kevinb@redhat.com>
1136
1137 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1138 (thread_db_thread_handle): Declare.
1139 * linux-low.c (linux_target_ops): Initialize thread_handle.
1140 * server.c (handle_qxfer_threads_worker): Add support for
1141 "handle" attribute.
1142 * target.h (struct target_ops): Add new function pointer,
1143 thread_handle.
1144 (target_thread_handle): Define.
1145 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1146 field in lwp.
1147 (thread_db_thread_handle): New function.
1148
86299109
KB
11492017-09-21 Kevin Buettner <kevinb@redhat.com>
1150
1151 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1152 * linux-low.h (thread_db_notice_clone): Declare.
1153 * thread-db.c (thread_db_notice_clone): New function.
1154
f557a88a
PA
11552017-09-21 Pedro Alves <palves@redhat.com>
1156
1157 * server.c (gdb_read_memory, handle_status, process_serial_event)
1158 (handle_serial_event, handle_target_event): Adjust to
1159 set_desired_thread prototype change.
1160 * target.c (set_desired_thread): Remove 'use_general' parameter
1161 and adjust.
1162 * target.h (set_desired_thread): Remove 'use_general' parameter.
1163
223ffa71
TT
11642017-09-20 Tom Tromey <tom@tromey.com>
1165
1166 * target.c (target_terminal::terminal_state): Define.
1167 (target_terminal::init): Rename from target_terminal_init.
1168 (target_terminal::inferior): Rename from
1169 target_terminal_inferior.
1170 (target_terminal::ours): Rename from target_terminal_ours.
1171 (target_terminal::ours_for_output, target_terminal::info): New.
1172
04fd3ba9
SM
11732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1174
1175 * server.c (accumulate_file_name_length): Remove.
1176 (emit_dll_description): Adjust to std::string change.
1177 (handle_qxfer_libraries): Use std::string to hold document.
1178
5e187554
SM
11792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1180
1181 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1182 return type of xml_escape_text.
1183 * server.c (emit_dll_description): Likewise.
1184
1526853e
SM
11852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1186
1187 * server.c (captured_main): Accept argument for --selftest.
1188 Update run_tests call.
1189 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1190 when registering selftests.
1191
c4dfafab
SDJ
11922017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1193
1194 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1195 instead of "VEC" for "target_desc.reg_defs".
1196 (regcache_cpy): Likewise.
1197 (registers_to_string): Likewise.
1198 (registers_from_string): Likewise.
1199 (find_regno): Likewise.
1200 (supply_regblock): Likewise.
1201 (regcache_raw_read_unsigned): Likewise.
1202 * tdesc.c (init_target_desc): Likewise.
1203 (tdesc_create_reg): Likewise.
1204 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1205 (struct target_desc) <reg_defs>: Convert to "std::vector".
1206 (target_desc): Do not initialize "reg_defs".
1207 (~target_desc): Update code to use "std::vector" instead of "VEC"
1208 for "target_desc.reg_defs".
1209 (operator==): Likewise.
1210
124aceb4
SM
12112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * inferiors.h (thread_to_gdb_id): Remove.
1214 * inferiors.c (thread_to_gdb_id): Remove.
1215 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1216 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1217 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1218 Likewise.
1219 * nto-low.c (nto_fetch_registers, nto_store_registers,
1220 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1221
96cde54f
SM
12222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1223
1224 * inferiors.h (gdb_id_to_thread_id): Remove.
1225 * inferiors.c (gdb_id_to_thread_id): Remove.
1226 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1227 removal. Move pid declaration closer to where it's used.
1228
e8ca139e
SM
12292017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1230
1231 * server.c (handle_detach): New function.
1232 (process_serial_event): Move code out, call handle_detach.
1233
f8a4e119
SM
12342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1235
1236 * server.c (require_running): Rename to ...
1237 (require_running_or_return): ... this ...
1238 (require_running_or_break): ... and this.
1239 (handle_query, process_serial_event): Adjust.
1240
0eb0a407
SM
12412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1242
1243 * linux-low.c (linux_set_resume_request): Remove unused
1244 variables.
1245
785922a5
SM
12462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * server.c (first_thread_of): Remove.
1249 (process_serial_event): Replace usage of first_thread_of with
1250 find_any_thread_of_pid.
1251 * tracepoint.c (same_process_p): Remove.
1252 (gdb_agent_about_to_close): Replace usage of same_process_p with
1253 find_any_thread_of_pid.
1254 * linux-x86-low.c (same_process_callback): Remove.
1255 (x86_arch_setup_process_callback): Replace usage of
1256 same_process_callback with find_any_thread_of_pid.
1257 * thread-db.c (any_thread_of): Remove.
1258 (switch_to_process): Replace usage of any_thread_of with
1259 find_any_thread_of_pid.
1260 * inferiors.c (thread_pid_matches_callback): Remove.
1261 (find_thread_process): Adjust to use find_any_thread_of_pid.
1262
a059f00c
SDJ
12632017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1264
1265 * regcache.c (get_thread_regcache): Guard calls to "memset"
1266 with "!VEC_empty".
1267
cc397f3a
SDJ
12682017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1269
1270 * linux-low.c (handle_extended_wait): Use
1271 "allocate_target_description" instead of "XNEW".
1272 * linux-x86-low.c (initialize_low_arch): Likewise.
1273
22916b07
YQ
12742017-09-05 Yao Qi <yao.qi@linaro.org>
1275
1276 * configure.srv (srv_i386_regobj): Remove.
1277 (srv_amd64_regobj): Remove.
1278 (srv_regobj): Set it to "" for x86 non-linux targets.
1279 * linux-x86-tdesc.c (i386_linux_read_description):
1280 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1281 (init_registers_i386): Remove the declaration.
1282 (tdesc_i386): Remove the declaration.
1283 (lynx_i386_arch_setup): Call i386_create_target_description.
1284 * nto-x86-low.c: Likewise.
1285 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1286 [!__x86_64__]: include arch/i386.h.
1287 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1288
38602d55
YQ
12892017-09-05 Yao Qi <yao.qi@linaro.org>
1290
1291 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1292 i386/amd64-XXX-linux from it.
1293
44b886ff
YQ
12942017-09-05 Yao Qi <yao.qi@linaro.org>
1295
1296 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1297 false.
1298 (ipa_amd64_linux_regobj): Remove.
1299 (ipa_x32_linux_regobj): Remove.
1300
b4570e4b
YQ
13012017-09-05 Yao Qi <yao.qi@linaro.org>
1302
1303 * Makefile.in (arch-amd64.o): New rule.
1304 * configure.srv: Append arch-amd64.o.
1305 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1306 (get_ipa_tdesc): Call amd64_linux_read_description.
1307 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1308 and init_registers_amd64_XXX.
1309 * linux-x86-low.c (x86_linux_read_description): Call
1310 amd64_linux_read_description.
1311 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1312 (initialize_low_arch): Don't call init_registers_x32_XXX and
1313 init_registers_amd64_XXX.
1314 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1315 and tdesc_amd64_XXX.
1316 [__x86_64__] (amd64_tdesc_test): New function.
1317 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1318 and init_registers_amd64_XXX.
1319 * linux-x86-tdesc.c: Include arch/amd64.h.
1320 (xcr0_to_tdesc_idx): New function.
1321 (i386_linux_read_description): New function.
1322 (amd64_get_ipa_tdesc_idx): New function.
1323 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1324 (amd64_get_ipa_tdesc): Declare.
1325
d1f28ea2
YQ
13262017-09-05 Yao Qi <yao.qi@linaro.org>
1327
1328 * configure.srv (srv_i386_linux_xmlfiles): Remove
1329 i386/i386-XXX-linux.xml from it.
1330
25a93583
YQ
13312017-09-05 Yao Qi <yao.qi@linaro.org>
1332
1333 * configure.srv: Set srv_i386_linux_regobj empty if $development
1334 is false.
1335 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1336 initialize_low_tdesc.
1337 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1338 with #if initialize_low_tdesc.
1339 * linux-x86-tdesc-selftest.c: New file.
1340 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1341
5f035c07
YQ
13422017-09-05 Yao Qi <yao.qi@linaro.org>
1343
1344 * Makefile.in (arch-i386.o): New rule.
1345 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1346 (x86_64-*-linux*): Likewise.
1347 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1348 include arch/i386.h.
1349 (i386_linux_read_description): Remove code and call
1350 i386_create_target_description.
1351 * tdesc.c (allocate_target_description): New function.
1352 * tdesc.h (set_tdesc_architecture): Remove declaration.
1353 (set_tdesc_osabi): Likewise.
1354
0abe8a89
YQ
13552017-09-05 Yao Qi <yao.qi@linaro.org>
1356
1357 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1358 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1359 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1360 .xmltarget.
1361 * server.c (get_features_xml): Call tdesc_get_features_xml.
1362 * tdesc.c (set_tdesc_architecture): New function.
1363 (set_tdesc_osabi): New function.
1364 (tdesc_get_features_xml): New function.
1365 (tdesc_create_feature): Add an argument.
1366 * tdesc.h (struct target_desc) <features>: New field.
1367 <arch, osabi>: New field.
1368 (~target_desc): xfree features, arch, and osabi.
1369 (target_desc::oerator==): Don't compare .xmltarget.
1370 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1371 (set_tdesc_osabi): Likewise.
1372 (tdesc_get_features_xml): Likewise.
1373
0a188386
YQ
13742017-09-05 Yao Qi <yao.qi@linaro.org>
1375
1376 * linux-x86-tdesc.c: Include selftest.h.
1377 (i386_tdesc_test): New function.
1378 (initialize_low_tdesc): Call selftests::register_test.
1379 * tdesc.h: Include regdef.h.
1380 (target_desc): Override operator == and !=.
1381
f49ff000
YQ
13822017-09-05 Yao Qi <yao.qi@linaro.org>
1383
1384 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1385 (ipa_obj): Likewise.
1386 * linux-i386-ipa.c: Include common/x86-xstate.h
1387 (get_ipa_tdesc): Call i386_linux_read_description.
1388 (initialize_low_tracepoint): Don't call init_registers_XXX
1389 functions, call initialize_low_tdesc instead.
1390 * linux-x86-low.c (x86_linux_read_description): Call
1391 i386_linux_read_description.
1392 (initialize_low_arch): Don't call init_registers_i386_XXX
1393 functions, call initialize_low_tdesc.
1394 * linux-x86-tdesc.c: New file.
1395 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1396 (i386_get_ipa_tdesc_idx): Declare.
1397 (i386_get_ipa_tdesc): Declare.
1398 (initialize_low_tdesc): Declare.
1399
2b68ef2f
YQ
14002017-09-05 Yao Qi <yao.qi@linaro.org>
1401
1402 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1403 instead of 0.
1404
f7000548
YQ
14052017-09-05 Yao Qi <yao.qi@linaro.org>
1406
1407 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1408 * regcache.c (get_thread_regcache): Use VEC_length.
1409 (init_register_cache): Likewise.
1410 (regcache_cpy): Likewise.
1411 (registers_to_string): Iterate reg_defs via VEC_iterate.
1412 (find_regno): Likewise.
1413 (find_register_by_number): Use VEC_index.
1414 (register_size): Call find_register_by_number.
1415 (register_data): Call find_register_by_number.
1416 (supply_regblock): Use VEC_length.
1417 (regcache_raw_read_unsigned): Likewise.
1418 * tdesc.c (init_target_desc): Iterate reg_defs via
1419 VEC_iterate.
1420 (default_description): Update initializer.
1421 (copy_target_description): Don't update field num_registers.
1422 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1423 <num_registers>: Remove.
1424
50a421ac
SM
14252017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * Makefile.in (.SECONDARY): Define target.
1428
23fdd69e
SM
14292017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1430
1431 * linux-low.c (linux_wait_1): Adjust.
1432 * server.c (queue_stop_reply_callback): Adjust.
1433
0a2dde4a
SDJ
14342017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1435
1436 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1437 QEnvironmentUnset and QEnvironmentReset packets.
1438 (handle_query): Inform remote that QEnvironmentHexEncoded,
1439 QEnvironmentUnset and QEnvironmentReset are supported.
1440
6afd337d
SM
14412017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1442
1443 * inferiors.h (inferior_target_data): Rename to ...
1444 (thread_target_data): ... this.
1445 (inferior_regcache_data): Rename to ...
1446 (thread_regcache_data): ... this.
1447 (set_inferior_regcache_data): Rename to ...
1448 (set_thread_regcache_data): ... this.
1449 * inferiors.c (inferior_target_data): Rename to ...
1450 (thread_target_data): ... this.
1451 (inferior_regcache_data): Rename to ...
1452 (thread_regcache_data): ... this.
1453 (set_inferior_regcache_data): Rename to ...
1454 (set_thread_regcache_data): ... this.
1455 (free_one_thread): Update.
1456 * linux-low.h (get_thread_lwp): Update.
1457 * regcache.c (get_thread_regcache): Update.
1458 (regcache_invalidate_thread): Update.
1459 (free_register_cache_thread): Update.
1460 * win32-i386-low.c (update_debug_registers_callback): Update.
1461 (win32_get_current_dr): Update.
1462 * win32-low.c (thread_rec): Update.
1463 (delete_thread_info): Update.
1464 (continue_one_thread): Update.
1465 (suspend_one_thread): Update.
1466
a160cc46
SM
14672017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1468
1469 * inferiors.c (set_inferior_target_data): Remove.
1470 * inferiors.h (set_inferior_target_data): Remove.
1471
6d580b63
YQ
14722017-08-18 Yao Qi <yao.qi@linaro.org>
1473
1474 * Makefile.in (OBS): Add selftest.o.
1475 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1476 * configure, config.in: Re-generated.
1477 * server.c: Include common/sefltest.h.
1478 (captured_main): Handle option --selftest.
1479
f5a29eb0
YQ
14802017-08-09 Yao Qi <yao.qi@linaro.org>
1481
1482 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1483 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1484 i386-avx-mpx.o and i386-mmx.o.
1485 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1486 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1487 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1488 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1489 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1490 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1491 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1492 i386/amd64-avx-mpx.xml.
1493
57757c2f
YQ
14942017-08-09 Yao Qi <yao.qi@linaro.org>
1495
1496 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1497 and x32-avx-avx512.o.
1498 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1499 i386/x32-avx-avx512.xml.
1500
229d26fc
SM
15012017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * tracepoint.h (enum class fast_tpoint_collect_result): New
1504 enumeration.
1505 (fast_tracepoint_collecting): Change return type to
1506 fast_tpoint_collect_result.
1507 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1508 * linux-low.h: Include tracepoint.h.
1509 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1510 fast_tpoint_collect_result.
1511 * linux-low.c (handle_tracepoints): Adjust.
1512 (linux_fast_tracepoint_collecting): Change return type to
1513 fast_tpoint_collect_result.
1514 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1515 linux_wait_1, stuck_in_jump_pad_callback,
1516 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1517 proceed_one_lwp): Adjust to type change.
1518
2e1e43e1
YQ
15192017-07-10 Yao Qi <yao.qi@linaro.org>
1520
1521 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1522
adc764e7
YQ
15232017-06-29 Yao Qi <yao.qi@linaro.org>
1524
1525 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1526 Remove.
1527 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1528
a206891a
SM
15292017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1532
9a6c7d9c
SDJ
15332017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1534
1535 * linux-low.c (linux_create_inferior): Adjust code to access the
1536 environment information via 'gdb_environ' class.
1537 * lynx-low.c (lynx_create_inferior): Likewise.
1538 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1539 (get_environ): Return a pointer to 'our_environ'.
1540 (captured_main): Initialize 'our_environ'.
1541 * server.h (get_environ): Adjust prototype.
1542 * spu-low.c (spu_create_inferior): Adjust code to access the
1543 environment information via 'gdb_environ' class.
1544
ae3e2ccf
SM
15452017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1548 usage of "register" keyword.
1549
3e019bdc
SM
15502017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * configure: Re-generate.
1553
8465943a
SM
15542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * configure: Re-generate.
1557
cf0dd6f0
SM
15582017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1559
1560 * Makefile.in (COMPILE.pre): Add "-x c++".
1561
9845682b
SDJ
15622017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1563
1564 * fork-child.c: Conditionally include <signal.h>.
1565
aefd8b33
SDJ
15662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1567
1568 * server.c (handle_general_set): Handle new packet
1569 "QStartupWithShell".
1570 (handle_query): Add "QStartupWithShell" to the list of supported
1571 packets.
1572 (gdbserver_usage): Add help text explaining the
1573 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1574 options.
1575 (captured_main): Recognize and act upon the presence of the new
1576 CLI options.
1577
2090129c
SDJ
15782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1579 Pedro Alves <palves@redhat.com>
1580
1581 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1582 * configure: Regenerate.
1583 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1584 "fork-inferior.o".
1585 (i[34567]86-*-lynxos*): Likewise.
1586 (spu*-*-*): Likewise.
1587 * fork-child.c: New file.
1588 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1589 and "environ.h".
1590 (linux_ptrace_fun): New function.
1591 (linux_create_inferior): Adjust function prototype to reflect
1592 change on "target.h". Adjust function code to use
1593 "fork_inferior".
1594 (linux_request_interrupt): Delete "signal_pid".
1595 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1596 (lynx_ptrace_fun): New function.
1597 (lynx_create_inferior): Adjust function prototype to reflect
1598 change on "target.h". Adjust function code to use
1599 "fork_inferior".
1600 * nto-low.c (nto_create_inferior): Adjust function prototype and
1601 code to reflect change on "target.h". Update comments.
1602 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1603 "common-terminal.h" and "environ.h".
1604 (terminal_fd): Moved to fork-child.c.
1605 (old_foreground_pgrp): Likewise.
1606 (restore_old_foreground_pgrp): Likewise.
1607 (last_status): Make it global.
1608 (last_ptid): Likewise.
1609 (our_environ): New variable.
1610 (startup_with_shell): Likewise.
1611 (program_name): Likewise.
1612 (program_argv): Rename to...
1613 (program_args): ...this.
1614 (wrapper_argv): New variable.
1615 (start_inferior): Delete function.
1616 (get_exec_wrapper): New function.
1617 (get_exec_file): Likewise.
1618 (get_environ): Likewise.
1619 (prefork_hook): Likewise.
1620 (post_fork_inferior): Likewise.
1621 (postfork_hook): Likewise.
1622 (postfork_child_hook): Likewise.
1623 (handle_v_run): Update code to deal with arguments coming from the
1624 remote host. Update calls from "start_inferior" to
1625 "create_inferior".
1626 (captured_main): Likewise. Initialize environment variable. Call
1627 "have_job_control".
1628 * server.h (post_fork_inferior): New prototype.
1629 (get_environ): Likewise.
1630 (last_status): Declare.
1631 (last_ptid): Likewise.
1632 (signal_pid): Likewise.
1633 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1634 (spu_ptrace_fun): New function.
1635 (spu_create_inferior): Adjust function prototype to reflect change
1636 on "target.h". Adjust function code to use "fork_inferior".
1637 * target.c (target_terminal_init): New function.
1638 (target_terminal_inferior): Likewise.
1639 (target_terminal_ours): Likewise.
1640 * target.h: Include <vector>.
1641 (struct target_ops) <create_inferior>: Update prototype.
1642 (create_inferior): Update macro.
1643 * utils.c (gdb_flush_out_err): New function.
1644 * win32-low.c (win32_create_inferior): Adjust function prototype
1645 and code to reflect change on "target.h".
1646
043a4934
SDJ
16472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1648
1649 * inferiors.c (switch_to_thread): New function.
1650
15652511
SDJ
16512017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1652
1653 * Makefile.in (SFILE): Add "common/job-control.c".
1654 (OBS): Add "job-control.o".
1655
21ea5acd
SDJ
16562017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1657
1658 * Makefile: Remove "@host_makefile_frag@".
1659
e13cb306
PA
16602017-05-05 Pedro Alves <palves@redhat.com>
1661
1662 * configure: Regenerate.
1663
c94fee56
SDJ
16642017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1665
1666 * configure: Regenerate.
1667
a0ff9e1a
SM
16682017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1669
1670 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1671 software_single_step change of return type to
1672 std::vector<CORE_ADDR>.
1673 * linux-low.c (install_software_single_step_breakpoints):
1674 Likewise.
1675 * linux-low.h (install_software_single_step_breakpoints):
1676 Likewise.
1677
be628ab8
SDJ
16782017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1679
1680 * remote-utils.c: Include "gdb_termios.h" instead of
1681 "terminal.h".
1682 * terminal.h: Delete file.
1683
7c5ded6a
SDJ
16842017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1685
1686 * server.c: Include <vector>.
1687 <program_argv, wrapper_argv>: Convert to std::vector.
1688 (start_inferior): Rewrite function to use C++.
1689 (handle_v_run): Likewise. Update code that calculates the argv
1690 based on the vRun packet; use C++.
1691 (captured_main): Likewise.
1692
436252de
SM
16932017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1694
1695 * server.c (handle_v_cont): Initialize thread_resume::thread
1696 with null_ptid.
1697
9bf2a700
PA
16982017-04-05 Pedro Alves <palves@redhat.com>
1699
1700 * configure: Regenerate.
1701
a121b7c1
PA
17022017-04-05 Pedro Alves <palves@redhat.com>
1703
1704 * gdbreplay.c (sync_error): Constify.
1705 * linux-x86-low.c (push_opcode): Constify.
1706
21c8a587
PA
17072017-04-05 Pedro Alves <palves@redhat.com>
1708
1709 * win32-low.c (get_child_debug_event)
1710 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1711 Report TARGET_WAITKIND_SPURIOUS instead.
1712
fb32b4f7
PA
17132017-04-05 Pedro Alves <palves@redhat.com>
1714
1715 * remote-utils.c (remote_prepare, remote_open): Constify.
1716 * remote-utils.h (remote_prepare, remote_open): Constify.
1717 * server.c (captured_main): Constify 'port' handling.
1718
65dd1e59
SM
17192017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * Makefile.in (clean): Clear .deps.
1722
8fa5b777
SM
17232017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 * .gitignore: Remove generated files, replace with wildcard.
1726 * (clean): Replace removal of generated files with wildcard.
1727 (version.c): Replace with...
1728 (version-generated.c): ...this.
1729 (xml-builtin.c): Replace with...
1730 (xml-builtin-generated.c): ...this.
1731 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1732 (%.c: *regformats*): Replace with...
1733 (%-generated.c: *regformats*): ...this.
1734
a12e714b
MF
17352017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1736
1737 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1738 (xtensa_fill_gregset): Call collect_register_by_name for
1739 threadptr register.
1740 (xtensa_store_gregset): Call supply_register_by_name for
1741 threadptr register.
1742
1a09b50a
MF
17432017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1744
1745 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1746 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1747 (xtensa_store_gregset): Call supply_register for all registers in
1748 a0_regnum..a0_regnum + C0_NREGS range.
1749
1a01e7c6
SM
17502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1751
1752 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1753 (ax-ipa.o: ax.c): Remove.
1754 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1755 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1756 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1757 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1758 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1759
36bc18a8
SM
17602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1763 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1764 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1765 (errors-ipa.o: ../common/errors.c): Remove.
1766 (format-ipa.o: ../common/format.c): Remove.
1767 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1768
a8ebe3d5
SM
17692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1770
1771 * Makefile.in (%-ipa.o: %.c): New rule.
1772 (tracepoint-ipa.o: tracepoint.c): Remove.
1773 (utils-ipa.o: utils.c): Remove.
1774 (remote-utils-ipa.o: remote-utils.c): Remove.
1775 (regcache-ipa.o: regcache.c): Remove.
1776 (i386-linux-ipa.o: i386-linux.c): Remove.
1777 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1778 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1779 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1780 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1781 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1782 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1783 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1784 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1785 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1786 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1787 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1788 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1789 (aarch64-ipa.o: aarch64.c): Remove.
1790 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1791 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1792 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1793 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1794 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1795 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1796 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1797 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1798 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1799 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1800 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1801 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1802 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1803 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1804 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1805 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1806 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1807 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1808 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1809 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1810 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1811 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1812 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1813 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1814 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1815 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1816 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1817 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1818 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1819 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1820 (tdesc-ipa.o: tdesc.c): Remove.
1821 (x32-linux-ipa.o: x32-linux.c): Remove.
1822 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1823 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1824
50cfacb7
SM
18252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1826
1827 * Makefile.in (%.o: ../arch/%.c): New rule.
1828 (arm.o: ../arch/arm.c): Remove.
1829 (arm-linux.o: ../arch/arm-linux.c): Remove.
1830 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1831 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1832
c5a22423
SM
18332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1834
1835 * Makefile.in (%.o: ../nat/%.c): New rule.
1836 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1837 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1838 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1839 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1840 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1841 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1842 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1843 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1844 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1845 (linux-personality.o: ../nat/linux-personality.c): Remove.
1846 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1847 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1848 (x86-linux.o: ../nat/x86-linux.c): Remove.
1849 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1850 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1851
6bda016b
SM
18522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * Makefile.in (%.o: ../common/%.c): New rule.
1855 (signals.o: ../common/signals.c): Remove.
1856 (print-utils.o: ../common/print-utils.c): Remove.
1857 (rsp-low.o: ../common/rsp-low.c): Remove.
1858 (common-utils.o: ../common/common-utils.c): Remove.
1859 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1860 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1861 (vec.o: ../common/vec.c): Remove.
1862 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1863 (xml-utils.o: ../common/xml-utils.c): Remove.
1864 (ptid.o: ../common/ptid.c): Remove.
1865 (buffer.o: ../common/buffer.c): Remove.
1866 (format.o: ../common/format.c): Remove.
1867 (filestuff.o: ../common/filestuff.c): Remove.
1868 (agent.o: ../common/agent.c): Remove.
1869 (errors.o: ../common/errors.c): Remove.
1870 (environ.o: ../common/environ.c): Remove.
1871 (common-debug.o: ../common/common-debug.c): Remove.
1872 (cleanups.o: ../common/cleanups.c): Remove.
1873 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1874 (fileio.o: ../common/fileio.c): Remove.
1875 (common-regcache.o: ../common/common-regcache.c): Remove.
1876 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1877 (new-op.o: ../common/new-op.c): Remove.
1878 (btrace-common.o: ../common/btrace-common.c): Remove.
1879
21122961
SM
18802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1881
1882 * Makefile.in (%.o: ../target/%.c): New rule.
1883 (waitstatus.o: ../target/waitstatus.c): Remove.
1884
c362e621
SM
18852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1886
1887 * Makefile.in
1888 (%.c: ../regformats/%.dat,
1889 (%.c: ../regformats/arm/%.dat,
1890 (%.c: ../regformats/i386/%.dat,
1891 (%.c: ../regformats/rs6000/%.dat): New rules.
1892 (aarch64.c): Remove.
1893 (reg-arm.c): Remove.
1894 (arm-with-iwmmxt.c): Remove.
1895 (arm-with-vfpv2.c): Remove.
1896 (arm-with-vfpv3.c): Remove.
1897 (arm-with-neon.c): Remove.
1898 (reg-bfin.c): Remove.
1899 (reg-cris.c): Remove.
1900 (reg-crisv32.c): Remove.
1901 (i386.c): Remove.
1902 (i386-linux.c): Remove.
1903 (i386-avx.c): Remove.
1904 (i386-avx-linux.c): Remove.
1905 (i386-avx-avx512.c): Remove.
1906 (i386-avx-avx512-linux.c): Remove.
1907 (i386-mpx.c): Remove.
1908 (i386-mpx-linux.c): Remove.
1909 (i386-avx-mpx-avx512-pku.c): Remove.
1910 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1911 (i386-avx-mpx.c): Remove.
1912 (i386-avx-mpx-linux.c): Remove.
1913 (i386-mmx.c): Remove.
1914 (i386-mmx-linux.c): Remove.
1915 (reg-ia64.c): Remove.
1916 (reg-m32r.c): Remove.
1917 (reg-m68k.c): Remove.
1918 (reg-cf.c): Remove.
1919 (mips-linux.c): Remove.
1920 (mips-dsp-linux.c): Remove.
1921 (mips64-linux.c): Remove.
1922 (mips64-dsp-linux.c): Remove.
1923 (nios2-linux.c): Remove.
1924 (powerpc-32.c): Remove.
1925 (powerpc-32l.c): Remove.
1926 (powerpc-altivec32l.c): Remove.
1927 (powerpc-cell32l.c): Remove.
1928 (powerpc-vsx32l.c): Remove.
1929 (powerpc-isa205-32l.c): Remove.
1930 (powerpc-isa205-altivec32l.c): Remove.
1931 (powerpc-isa205-vsx32l.c): Remove.
1932 (powerpc-e500l.c): Remove.
1933 (powerpc-64l.c): Remove.
1934 (powerpc-altivec64l.c): Remove.
1935 (powerpc-cell64l.c): Remove.
1936 (powerpc-vsx64l.c): Remove.
1937 (powerpc-isa205-64l.c): Remove.
1938 (powerpc-isa205-altivec64l.c): Remove.
1939 (powerpc-isa205-vsx64l.c): Remove.
1940 (s390-linux32.c): Remove.
1941 (s390-linux32v1.c): Remove.
1942 (s390-linux32v2.c): Remove.
1943 (s390-linux64.c): Remove.
1944 (s390-linux64v1.c): Remove.
1945 (s390-linux64v2.c): Remove.
1946 (s390-te-linux64.c): Remove.
1947 (s390-vx-linux64.c): Remove.
1948 (s390-tevx-linux64.c): Remove.
1949 (s390x-linux64.c): Remove.
1950 (s390x-linux64v1.c): Remove.
1951 (s390x-linux64v2.c): Remove.
1952 (s390x-te-linux64.c): Remove.
1953 (s390x-vx-linux64.c): Remove.
1954 (s390x-tevx-linux64.c): Remove.
1955 (tic6x-c64xp-linux.c): Remove.
1956 (tic6x-c64x-linux.c): Remove.
1957 (tic6x-c62x-linux.c): Remove.
1958 (reg-sh.c): Remove.
1959 (reg-sparc64.c): Remove.
1960 (reg-spu.c): Remove.
1961 (amd64.c): Remove.
1962 (amd64-linux.c): Remove.
1963 (amd64-avx.c): Remove.
1964 (amd64-avx-linux.c): Remove.
1965 (amd64-avx-avx512.c): Remove.
1966 (amd64-avx-avx512-linux.c): Remove.
1967 (amd64-mpx.c): Remove.
1968 (amd64-mpx-linux.c): Remove.
1969 (amd64-avx-mpx-avx512-pku.c): Remove.
1970 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1971 (amd64-avx-mpx.c): Remove.
1972 (amd64-avx-mpx-linux.c): Remove.
1973 (x32.c): Remove.
1974 (x32-linux.c): Remove.
1975 (x32-avx.c): Remove.
1976 (x32-avx-linux.c): Remove.
1977 (x32-avx-avx512.c): Remove.
1978 (x32-avx-avx512-linux.c): Remove.
1979 (reg-xtensa.c): Remove.
1980 (reg-tilegx.c): Remove.
1981 (reg-tilegx32.c): Remove.
1982
1672e0d9
SDJ
19832017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1984
1985 * Makefile.in (SFILES): Add "common/environ.c".
1986 (OBJS): Add "common/environ.h".
1987
239b6d10
WT
19882017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1989
1990 * configure.ac: Check if the fs_base and gs_base members of
1991 `struct user_regs_struct' exist.
1992 * config.in: Regenerated.
1993 * configure: Likewise.
1994
694b382c
AT
19952017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1996
1997 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1998 target_read_memory.
1999 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2000 (get_next_pcs_syscall_next_pc): Likewise.
2001
7dc53023
LM
20022016-12-23 Luis Machado <lgustavo@codesourcery.com>
2003
2004 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2005 * nto-x86-low.c: Likewise.
2006
ad02e4fe
SM
20072016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2008
2009 * Makefile.in: Include disable-implicit-rules.mk.
2010
dcb07cfa
PA
20112016-11-23 Pedro Alves <palves@redhat.com>
2012
2013 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2014 (debug_vprintf): Use std::chrono::steady_clock instead of
2015 gettimeofday. Use '.' instead of ':'.
2016 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2017 (get_timestamp): Use std::chrono::steady_clock instead of
2018 gettimeofday.
2019
8629c02c
SM
20202016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2021
2022 * Makefile.in: Fix whitespace formatting.
2023
b593ecca
SM
20242016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2025
2026 * Makefile.in (SFILES, OBS): Flatten list and order
2027 alphabetically.
2028
9986ba08
PA
20292016-11-23 Pedro Alves <palves@redhat.com>
2030
2031 * event-loop.c (handle_file_event): Use warning.
2032 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2033 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2034 Use warning.
2035
4eefa7bc
PA
20362016-11-23 Pedro Alves <palves@redhat.com>
2037
2038 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2039 output.
2040 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2041 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2042 debug_printf and debug_flush for debug output.
2043 * server.c (handle_general_set): Likewise.
2044 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2045 output.
2046
5443506e
SM
20472016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2048
2049 * Makefile.in (.c.o): Replace rule with ...
2050 (%.o: %.c): ... this one.
2051
3b165252
SM
20522016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2053
2054 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2055 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2056 make.
2057 * configure.ac: Remove checks for the make program.
2058 * configure: Re-generate.
2059
0bcda685
PA
20602016-10-28 Pedro Alves <palves@redhat.com>
2061
2062 * Makefile.in (CXX_DIALECT): Get from configure.
2063 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2064 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2065 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2066 * config.in: Regenerate.
2067 * configure: Regenerate.
2068
c3805894
YQ
20692016-10-27 Yao Qi <yao.qi@linaro.org>
2070
2071 * linux-low.c (linux_supports_range_stepping): Return true if
2072 can_software_single_step return true.
2073
89342618
YQ
20742016-10-27 Yao Qi <yao.qi@linaro.org>
2075
2076 * inferiors.c (find_inferior_in_random): New function.
2077 * inferiors.h (find_inferior_in_random): Declare.
2078 * linux-low.c (linux_wait_for_event_filtered): Call
2079 find_inferior_in_random instead of find_inferior.
2080
e3652c84
YQ
20812016-10-27 Yao Qi <yao.qi@linaro.org>
2082
2083 * linux-low.c (linux_wait_1): If single-step breakpoints are
2084 inserted, remove them.
2085
5a04c4cf
PA
20862016-10-26 Pedro Alves <palves@redhat.com>
2087
2088 * linux-low.c (handle_extended_wait): Link parent/child fork
2089 threads.
2090 (linux_wait_1): Unlink them.
2091 (linux_set_resume_request): Ignore resume requests for
2092 already-resumed and unhandled fork child threads.
2093 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2094 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2095 New functions.
2096 (handle_v_requests) <vCont>: Don't call require_running.
2097 * server.h (in_queued_stop_replies): New declaration.
2098
cb93dc7f
YQ
20992016-10-24 Yao Qi <yao.qi@linaro.org>
2100
2101 PR server/20733
2102 * linux-aarch64-low.c (append_insns): Cast the return value to
2103 'uint32_t *'.
2104
a1078bea
YQ
21052016-10-10 Yao Qi <yao.qi@linaro.org>
2106
2107 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2108
1fb77080
SDJ
21092016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2110
2111 * target.c (target_supports_multi_process): New function, moved
2112 from...
2113 * target.h (target_supports_multi_process): ... here. Remove
2114 macro.
2115
39b5a3b9
TT
21162016-10-05 Tom Tromey <tom@tromey.com>
2117
2118 PR remote/20655:
2119 * tracepoint.c (handle_tracepoint_bkpts): Check
2120 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2121
c1d0b70a
YQ
21222016-10-05 Yao Qi <yao.qi@linaro.org>
2123
2124 * configure.srv: Update the path of arm-*.xml files.
2125
0a69eedb
YQ
21262016-10-05 Terry Guo <terry.guo@arm.com>
2127 Yao Qi <yao.qi@linaro.org>
2128
2129 * Makefile.in: Adjust the path of rules.
2130 * configure.srv: Update the path of xml files.
2131 * regformats/arm-with-iwmmxt.dat: Regenerated.
2132 * regformats/arm-with-neon.dat: Likewise.
2133 * regformats/arm-with-vfpv2.dat: Likewise.
2134 * regformats/arm-with-vfpv3.dat Likewise.
2135
17e16485
YQ
21362016-09-30 Yao Qi <yao.qi@linaro.org>
2137
2138 PR gdbserver/20627
2139 * target.c (target_stop_and_wait): Don't call
2140 target_continue_no_signal, use resume_stop instead.
2141
edeeb602
YQ
21422016-09-26 Yao Qi <yao.qi@linaro.org>
2143
2144 * linux-low.c (linux_wait_1): Call debug_exit.
2145
503b1c39
PA
21462016-09-23 Pedro Alves <palves@redhat.com>
2147
2148 * Makefile.in (SFILES): Add common/new-op.c.
2149 (OBS): Add common/new-op.o.
2150 (new-op.o): New rule.
2151
74172ecf
SM
21522016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2153
2154 * .gitinore: Ignore more files.
2155
fc6cda2e
YQ
21562016-09-21 Yao Qi <yao.qi@linaro.org>
2157
2158 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2159 23.
2160
bc1e6c81
SDJ
21612016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2162
2163 * server.c (start_inferior): Call target_mourn_inferior instead of
2164 mourn_inferior; pass ptid_t argument to it.
2165 (resume): Likewise.
2166 (handle_target_event): Likewise.
2167 * target.c (target_mourn_inferior): New function.
2168 * target.h (mourn_inferior): Delete macro.
2169
0e00e962
AA
21702016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2171
2172 * linux-low.c (lwp_is_stepping): New function.
2173
1d8cb77d
CL
21742016-09-06 Carl Love <cel@us.ibm.com>
2175
2176 * server.c (start_inferior): Fixed comment, requested comment change
2177 didn't get updated correctly. Removed reference to ptrace () call as
2178 it is only true on Linux systems.
2179
7313bced
CL
21802016-09-06 Carl Love <cel@us.ibm.com>
2181
2182 * server.c (start_inferior): Do not call
2183 function target_post_create_inferior () if the
2184 inferior process has already exited.
2185
cf6de44d
PA
21862016-09-05 Pedro Alves <palves@redhat.com>
2187
2188 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2189 (COMPILE.pre, CC_LD): Use CXX directly.
2190 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2191 * acinclude.m4: Don't include build-with-cxx.m4.
2192 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2193 * configure: Regenerate.
2194
c1da6748
AT
21952016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2196
2197 PR gdb/19495
2198 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2199 call writing data to own_buf.
2200
f2b9e3df
SDJ
22012016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2202
2203 * target.c (mywait): Call target_wait instead of
2204 the_target->wait.
2205 (target_wait): New function.
2206
049a8570
SDJ
22072016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2208
2209 * server.c (start_inferior): New variable 'ptid'. Replace calls
2210 to the_target->resume by target_continue{,_no_signal}, depending
2211 on the case.
2212 * target.c (target_stop_and_wait): Call target_continue_no_signal
2213 instead of the_target->resume.
2214 (target_continue): New function.
2215
3aa5cfa0
AT
22162016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2217
2218 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2219
754653a7
AZ
22202016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2221
2222 PR server/20491
2223 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2224 ps_prochandle.
2225 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2226 * linux-arm-low.c (ps_get_thread_area): Likewise.
2227 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2228 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2229 * linux-mips-low.c (ps_get_thread_area): Likewise.
2230 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2231 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2232 * linux-x86-low.c (ps_get_thread_area): Likewise.
2233 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2234
ed036b40
PA
22352016-08-19 Pedro Alves <palves@redhat.com>
2236
2237 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2238
c8ef42ee
PA
22392016-08-19 Pedro Alves <palves@redhat.com>
2240
2241 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2242 comment. Use memcpy instead of casting through unsigned long.
2243
9c235a72
PA
22442016-08-19 Pedro Alves <palves@redhat.com>
2245
2246 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2247 allocating around 0x80000000.
2248
201506da
PA
22492016-08-19 Pedro Alves <palves@redhat.com>
2250
2251 PR gdb/20415
2252 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2253 (x32-avx512-linux-ipa.o): New rules.
2254 * configure.ac (x86_64-*-linux*): New x32 check.
2255 * configure.srv (ipa_x32_linux_regobj): New.
2256 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2257 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2258 descriptions.
2259 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2260 descriptions.
2261 * configure: Regenerate.
2262
f348d89a
PA
22632016-08-09 Pedro Alves <palves@redhat.com>
2264
2265 PR gdb/18653
2266 * Makefile.in (OBS): Add signals-state-save-restore.o.
2267 (signals-state-save-restore.o): New rule.
2268 * config.in: Regenerate.
2269 * configure: Regenerate.
2270 * linux-low.c: Include "signals-state-save-restore.h".
2271 (linux_create_inferior): Call
2272 restore_original_signals_state.
2273 * server.c: Include "dispositions-save-restore.h".
2274 (captured_main): Call save_original_signals_state.
2275
1baf5149
PA
22762016-08-05 Pedro Alves <palves@redhat.com>
2277
2278 * configure: Regenerate.
2279
fcd4a73d
YQ
22802016-08-04 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-low.c (regsets_fetch_inferior_registers): Check
2283 errno is ESRCH or not.
2284
979659d0
YQ
22852016-08-02 Yao Qi <yao.qi@linaro.org>
2286
2287 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2288 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2289 (thread_db_load_search): Update.
2290 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2291 td_ta_set_event and td_ta_event_getmsg.
2292
6598661d
PA
22932016-07-26 Pedro Alves <palves@redhat.com>
2294
2295 PR server/20414
2296 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2297 of unsigned long for 64-bit registers and use uint32_t instead of
2298 unsigned int for 32-bit registers.
2299
9cf12d57
PA
23002016-07-26 Pedro Alves <palves@redhat.com>
2301
2302 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2303 to 'ptrace'.
2304
305450ed
TT
23052016-07-21 Tom Tromey <tom@tromey.com>
2306
2307 * configure: Rebuild.
2308
2583da7c
YQ
23092016-07-21 Yao Qi <yao.qi@linaro.org>
2310
2311 * mem-break.c (find_gdb_breakpoint): Cast bp to
2312 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2313
21536b36
YQ
23142016-07-21 Yao Qi <yao.qi@linaro.org>
2315
2316 * server.c (handle_v_requests): Support s and S actions
2317 if target_supports_software_single_step return true.
2318
8901d193
YQ
23192016-07-21 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2322 is resume_step, call maybe_hw_step.
2323 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2324 and unstop them.
2325 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2326 breakpoints or not.
2327 (proceed_one_lwp): If resume request is resume_step, install
2328 reinsert breakpoints and call maybe_hw_step.
2329
0e9a339e
YQ
23302016-07-21 Yao Qi <yao.qi@linaro.org>
2331
2332 * linux-low.c (proceed_one_lwp): Declare.
2333 (linux_resume_one_thread): Remove local variable 'step'.
2334 Lift code enqueue signal. Call proceed_one_lwp instead of
2335 linux_resume_one_lwp.
2336
4281b351
YQ
23372016-07-21 Yao Qi <yao.qi@linaro.org>
2338
2339 * linux-low.c (linux_resume_one_thread): Call
2340 enqueue_pending_signal.
2341
984a2c04
YQ
23422016-07-21 Yao Qi <yao.qi@linaro.org>
2343
2344 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2345 * inferiors.c (do_restore_current_thread_cleanup): New function.
2346 (make_cleanup_restore_current_thread): Likewise.
2347 * linux-low.c (install_software_single_step_breakpoints): Call
2348 make_cleanup_restore_current_thread. Switch current_thread to
2349 thread.
2350
bec903c9
YQ
23512016-07-21 Yao Qi <yao.qi@linaro.org>
2352
2353 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2354 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2355 (clone_one_breakpoint): Likewise.
2356 (delete_reinsert_breakpoints): Change parameter to thread.
2357 Callers updated.
2358 (has_reinsert_breakpoints): Likewise.
2359 (uninsert_reinsert_breakpoints): Likewise.
2360 (reinsert_reinsert_breakpoints): Likewise.
2361 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2362 (delete_reinsert_breakpoints): Likewise.
2363 (reinsert_reinsert_breakpoints): Likewise.
2364 (uninsert_reinsert_breakpoints): Likewise.
2365 (has_reinsert_breakpoints): Likewise.
2366
63c40ec7
YQ
23672016-07-21 Yao Qi <yao.qi@linaro.org>
2368
2369 * inferiors.c (get_thread_process): Make parameter const.
2370 * inferiors.h (get_thread_process): Update declaration.
2371 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2372 Add new parameters child_thread and parent_thread. Callers
2373 updated.
2374 * mem-break.h (clone_all_breakpoints): Update declaration.
2375
9aa76cd0
YQ
23762016-07-21 Yao Qi <yao.qi@linaro.org>
2377
2378 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2379 <command_list, handler>: Remove.
2380 (struct gdb_breakpoint): New.
2381 (struct other_breakpoint): New.
2382 (struct reinsert_breakpoint): New.
2383 (is_gdb_breakpoint): New function.
2384 (any_persistent_commands): Update command_list if
2385 is_gdb_breakpoint returns true.
2386 (set_breakpoint): Create breakpoints according to their types.
2387 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2388 (set_gdb_breakpoint_1): Likewise.
2389 (set_gdb_breakpoint): Likewise.
2390 (clear_breakpoint_conditions): Change parameter type to
2391 'struct gdb_breakpoint *'.
2392 (clear_breakpoint_commands): Likewise.
2393 (clear_breakpoint_conditions_and_commands): Likewise.
2394 (add_condition_to_breakpoint): Likewise.
2395 (add_breakpoint_condition): Likewise.
2396 (add_commands_to_breakpoint): Likewise.
2397 (check_breakpoints): Check other_breakpoint.
2398 (clone_one_breakpoint): Clone breakpopint according to its type.
2399 * mem-break.h (struct gdb_breakpoint): Declare.
2400 (set_gdb_breakpoint): Update declaration.
2401 (clear_breakpoint_conditions_and_commands): Likewise.
2402 (add_breakpoint_condition): Likewise.
2403 (add_breakpoint_commands): Likewise.
2404 * server.c (process_point_options): Change parameter type to
2405 'struct gdb_breakpoint *'.
2406
811f8301
YQ
24072016-07-21 Yao Qi <yao.qi@linaro.org>
2408
2409 * mem-break.c (set_breakpoint_at): Rename it to ...
2410 (set_breakpoint_type_at): ... it.
2411 (set_breakpoint_at): Call set_breakpoint_type_at.
2412 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2413 * mem-break.h (set_breakpoint_at): Update comments.
2414
b1c51e36
CLT
24152016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2416
2417 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2418 to buf parameter.
2419 (nios2_store_gregset): Likewise.
2420
ced2dffb
PA
24212016-07-01 Pedro Alves <palves@redhat.com>
2422 Antoine Tremblay <antoine.tremblay@ericsson.com>
2423
2424 * linux-low.c: Change interface to take the target lwp_info
2425 pointer directly and return void. Handle detaching from a zombie
2426 thread.
2427 (linux_detach_lwp_callback): New function.
2428 (linux_detach): Detach from the leader thread after detaching from
2429 the clone threads.
2430
2ac09a5b
YQ
24312016-06-28 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2434 for variable new_offset.
2435 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2436 (aarch64_ftrace_insn_reloc_cb): Likewise.
2437 (aarch64_ftrace_insn_reloc_tb): Likewise.
2438 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2439 PRIx64 instead of PRIx32.
2440
79e7fd4f
YQ
24412016-06-28 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2444 (the_low_target): Install arm_get_syscall_trapinfo.
2445
061fc021
YQ
24462016-06-28 Yao Qi <yao.qi@linaro.org>
2447
2448 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2449 function.
2450 (the_low_target): Install aarch64_get_syscall_trapinfo.
2451
4cc32bec
YQ
24522016-06-28 Yao Qi <yao.qi@linaro.org>
2453
2454 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2455 Callers updated.
2456 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2457 Remove parameter sysno.
2458 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2459 sysret.
2460
782c1122
AA
24612016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2462
2463 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2464 (s390_emit_ne_goto): Likewise.
2465 (s390_emit_lt_goto): Likewise.
2466 (s390_emit_le_goto): Likewise.
2467 (s390_emit_gt_goto): Likewise.
2468 (s390_emit_ge_goto): Likewise.
2469 (s390x_emit_eq_goto): Likewise.
2470 (s390x_emit_ne_goto): Likewise.
2471 (s390x_emit_lt_goto): Likewise.
2472 (s390x_emit_le_goto): Likewise.
2473 (s390x_emit_gt_goto): Likewise.
2474 (s390x_emit_ge_goto): Likewise.
2475 (s390_emit_ops_impl): Mark variable static.
2476 (s390x_emit_ops): Likewise.
2477
2e7b624b
YQ
24782016-06-17 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-low.c (handle_extended_wait): Call
2481 uninsert_reinsert_breakpoints for the parent process. Remove
2482 reinsert breakpoints from the child process. Reinsert them to
2483 the parent process when vfork is done.
2484 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2485 (reinsert_reinsert_breakpoints): New function.
2486 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2487 (reinsert_reinsert_breakpoints): Declare.
2488
8a81c5d7
YQ
24892016-06-17 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-low.c (handle_extended_wait): If the parent is doing
2492 step-over, remove the reinsert breakpoints from the forked child.
2493
f50bf8e5
YQ
24942016-06-17 Yao Qi <yao.qi@linaro.org>
2495
2496 * linux-low.c (unsuspend_all_lwps): Declare.
2497 (linux_low_filter_event): If thread exited, call finish_step_over.
2498 If step-over is finished, unsuspend other threads.
2499
8376a3cb
YQ
25002016-06-17 Yao Qi <yao.qi@linaro.org>
2501
2502 * linux-low.c (linux_resume_one_lwp_throw): Assert
2503 has_reinsert_breakpoints returns false.
2504 * mem-break.c (delete_disabled_breakpoints): Assert
2505 bp type isn't reinsert_breakpoint.
2506
f79b145d
YQ
25072016-06-17 Yao Qi <yao.qi@linaro.org>
2508
2509 * linux-low.c (maybe_hw_step): New function.
2510 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2511 (finish_step_over): Switch current_thread to lwp temporarily,
2512 and assert has_reinsert_breakpoints returns true.
2513 (proceed_one_lwp): Call maybe_hw_step.
2514 * mem-break.c (has_reinsert_breakpoints): New function.
2515 * mem-break.h (has_reinsert_breakpoints): Declare.
2516
0ae534d2
JT
25172016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2518
2519 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2520
fcdad592
YQ
25212016-05-17 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2524 instead of find_inferior.
2525
9e784964
YQ
25262016-05-05 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2529 Initialize res to zero.
2530
cf2ebb6e
YQ
25312016-05-05 Yao Qi <yao.qi@linaro.org>
2532
2533 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2534 to uint32_t.
2535
c1aebf87
UW
25362016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2537
2538 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2539 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2540 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2541
35fd2deb 25422016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2543 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2544
2545 * tracepoint.c (write_inferior_int8): New function.
2546 (cmd_qtenable_disable): Write enable flag using
2547 write_inferior_int8.
2548
484b3c32
YQ
25492016-04-25 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2552 (need_step_over_p): Return zero if the LWP has pending signals
2553 can be delivered on software single step target.
2554
85ba7d86
YQ
25552016-04-25 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2558 return instead of error.
2559
3539aa13
YQ
25602016-04-22 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2563 to 23.
2564
5b061e98
YQ
25652016-04-22 Yao Qi <yao.qi@linaro.org>
2566
2567 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2568 signal when stepping over breakpoint with software single
2569 step.
2570
3451269c
PA
25712016-04-21 Pedro Alves <palves@redhat.com>
2572
2573 * linux-s390-low.c (s390_collect_ptrace_register)
2574 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2575 add casts.
2576 (s390_check_regset): Use void * instead of gdb_byte *.
2577
a2358508
PA
25782016-04-20 Pedro Alves <palves@redhat.com>
2579
2580 * configure: Renegerate.
2581
6885166d
YQ
25822016-04-20 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2585 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2586 number 16.
2587 (arm_store_gregset): Likewise.
2588
2b863f51
WT
25892016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2590
2591 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2592 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2593 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2594 (amd64-avx-mpx-linux.c): New rules.
2595 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2596 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2597 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2598 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2599 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2600 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2601 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2602 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2603 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2604 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2605 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2606 * linux-x86-low.c (x86_linux_read_description): Add case for
2607 X86_XSTATE_AVX_MPX_MASK.
2608 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2609 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2610 init_registers_i386_avx_mpx_linux.
2611 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2612 (initialize_low_tracepoint): Call
2613 init_registers_i386_avx_mpx_linux.
2614 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2615 (initialize_low_tracepoint): Call
2616 init_registers_amd64_avx_mpx_linux.
2617 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2618 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2619 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2620 declarations.
2621
9b30624b
PA
26222016-04-18 Pedro Alves <palves@redhat.com>
2623
2624 * configure: Regenerate.
2625
45e3745e
AT
26262016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2627
2628 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2629 (aarch64_emit_sub): Likewise.
2630
2afc13ff
PA
26312016-04-12 Pedro Alves <palves@redhat.com>
2632
2633 * utils.c (prepare_to_throw_exception): Delete.
2634
6e774b13
SM
26352016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2638
4dca19f8
MK
26392016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2640
2641 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2642
d0a9981f
MK
26432016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2644
2645 * linux-aarch64-ipa.c: Add <elf.h> include.
2646 * linux-ppc-ipa.c: Add <elf.h> include.
2647 * linux-s390-ipa.c: Add <elf.h> include.
2648
252db07e
MK
26492016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2650
2651 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2652 (get_raw_reg_ptr): Likewise.
2653 (get_trace_state_variable_value_ptr): Likewise.
2654 (set_trace_state_variable_value_ptr): Likewise.
2655 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2656 char *.
2657
14e2b6d9
MK
26582016-03-31 Wei-cheng Wang <cole945@gmail.com>
2659 Marcin Kościelnicki <koriakin@0x04.net>
2660
2661 PR/17221
2662 * linux-ppc-low.c (emit_insns): New function.
2663 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2664 (ppc_emit_prologue): New function.
2665 (ppc_emit_epilogue): New function.
2666 (ppc_emit_add): New function.
2667 (ppc_emit_sub): New function.
2668 (ppc_emit_mul): New function.
2669 (ppc_emit_lsh): New function.
2670 (ppc_emit_rsh_signed): New function.
2671 (ppc_emit_rsh_unsigned): New function.
2672 (ppc_emit_ext): New function.
2673 (ppc_emit_zero_ext): New function.
2674 (ppc_emit_log_not): New function.
2675 (ppc_emit_bit_and): New function.
2676 (ppc_emit_bit_or): New function.
2677 (ppc_emit_bit_xor): New function.
2678 (ppc_emit_bit_not): New function.
2679 (ppc_emit_equal): New function.
2680 (ppc_emit_less_signed): New function.
2681 (ppc_emit_less_unsigned): New function.
2682 (ppc_emit_ref): New function.
2683 (ppc_emit_const): New function.
2684 (ppc_emit_reg): New function.
2685 (ppc_emit_pop): New function.
2686 (ppc_emit_stack_flush): New function.
2687 (ppc_emit_swap): New function.
2688 (ppc_emit_stack_adjust): New function.
2689 (ppc_emit_call): New function.
2690 (ppc_emit_int_call_1): New function.
2691 (ppc_emit_void_call_2): New function.
2692 (ppc_emit_if_goto): New function.
2693 (ppc_emit_goto): New function.
2694 (ppc_emit_eq_goto): New function.
2695 (ppc_emit_ne_goto): New function.
2696 (ppc_emit_lt_goto): New function.
2697 (ppc_emit_le_goto): New function.
2698 (ppc_emit_gt_goto): New function.
2699 (ppc_emit_ge_goto): New function.
2700 (ppc_write_goto_address): New function.
2701 (ppc_emit_ops_impl): New static variable.
2702 (ppc64v1_emit_prologue): New function.
2703 (ppc64v2_emit_prologue): New function.
2704 (ppc64_emit_epilogue): New function.
2705 (ppc64_emit_add): New function.
2706 (ppc64_emit_sub): New function.
2707 (ppc64_emit_mul): New function.
2708 (ppc64_emit_lsh): New function.
2709 (ppc64_emit_rsh_signed): New function.
2710 (ppc64_emit_rsh_unsigned): New function.
2711 (ppc64_emit_ext): New function.
2712 (ppc64_emit_zero_ext): New function.
2713 (ppc64_emit_log_not): New function.
2714 (ppc64_emit_bit_and): New function.
2715 (ppc64_emit_bit_or): New function.
2716 (ppc64_emit_bit_xor): New function.
2717 (ppc64_emit_bit_not): New function.
2718 (ppc64_emit_equal): New function.
2719 (ppc64_emit_less_signed): New function.
2720 (ppc64_emit_less_unsigned): New function.
2721 (ppc64_emit_ref): New function.
2722 (ppc64_emit_const): New function.
2723 (ppc64v1_emit_reg): New function.
2724 (ppc64v2_emit_reg): New function.
2725 (ppc64_emit_pop): New function.
2726 (ppc64_emit_stack_flush): New function.
2727 (ppc64_emit_swap): New function.
2728 (ppc64v1_emit_call): New function.
2729 (ppc64v2_emit_call): New function.
2730 (ppc64v1_emit_int_call_1): New function.
2731 (ppc64v2_emit_int_call_1): New function.
2732 (ppc64v1_emit_void_call_2): New function.
2733 (ppc64v2_emit_void_call_2): New function.
2734 (ppc64_emit_if_goto): New function.
2735 (ppc64_emit_eq_goto): New function.
2736 (ppc64_emit_ne_goto): New function.
2737 (ppc64_emit_lt_goto): New function.
2738 (ppc64_emit_le_goto): New function.
2739 (ppc64_emit_gt_goto): New function.
2740 (ppc64_emit_ge_goto): New function.
2741 (ppc64v1_emit_ops_impl): New static variable.
2742 (ppc64v2_emit_ops_impl): New static variable.
2743 (ppc_emit_ops): New function.
2744 (linux_low_target): Wire in ppc_emit_ops.
2745
a2174ba4
MK
27462016-03-31 Wei-cheng Wang <cole945@gmail.com>
2747 Marcin Kościelnicki <koriakin@0x04.net>
2748
2749 PR/17221
2750 * Makefile.in: Add powerpc-*-ipa.o
2751 * configure.srv: Add ipa_obj for powerpc*-linux.
2752 * linux-ppc-ipa.c: New file.
2753 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2754 includes.
2755 (PPC_FIELD): New macro.
2756 (PPC_SEXT): New macro.
2757 (PPC_OP6): New macro.
2758 (PPC_BO): New macro.
2759 (PPC_LI): New macro.
2760 (PPC_BD): New macro.
2761 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2762 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2763 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2764 (ppc_get_thread_area): New function.
2765 (is_elfv2_inferior): New function.
2766 (gen_ds_form): New function.
2767 (GEN_STD): New macro.
2768 (GEN_STDU): New macro.
2769 (GEN_LD): New macro.
2770 (GEN_LDU): New macro.
2771 (gen_d_form): New function.
2772 (GEN_ADDI): New macro.
2773 (GEN_ADDIS): New macro.
2774 (GEN_LI): New macro.
2775 (GEN_LIS): New macro.
2776 (GEN_ORI): New macro.
2777 (GEN_ORIS): New macro.
2778 (GEN_LWZ): New macro.
2779 (GEN_STW): New macro.
2780 (GEN_STWU): New macro.
2781 (gen_xfx_form): New function.
2782 (GEN_MFSPR): New macro.
2783 (GEN_MTSPR): New macro.
2784 (GEN_MFCR): New macro.
2785 (GEN_MTCR): New macro.
2786 (GEN_SYNC): New macro.
2787 (GEN_LWSYNC): New macro.
2788 (gen_x_form): New function.
2789 (GEN_OR): New macro.
2790 (GEN_MR): New macro.
2791 (GEN_LWARX): New macro.
2792 (GEN_STWCX): New macro.
2793 (GEN_CMPW): New macro.
2794 (gen_md_form): New function.
2795 (GEN_RLDICL): New macro.
2796 (GEN_RLDICR): New macro.
2797 (gen_i_form): New function.
2798 (GEN_B): New macro.
2799 (GEN_BL): New macro.
2800 (gen_b_form): New function.
2801 (GEN_BNE): New macro.
2802 (GEN_LOAD): New macro.
2803 (GEN_STORE): New macro.
2804 (gen_limm): New function.
2805 (gen_atomic_xchg): New function.
2806 (gen_call): New function.
2807 (ppc_relocate_instruction): New function.
2808 (ppc_install_fast_tracepoint_jump_pad): New function.
2809 (ppc_get_min_fast_tracepoint_insn_len): New function.
2810 (ppc_get_ipa_tdesc_idx): New function.
2811 (the_low_target): Wire in the new functions.
2812 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2813 tdescs.
2814 * linux-ppc-tdesc.h: New file.
2815
a13c4696
MK
28162016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2817
2818 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2819 (alloc_jump_pad_buffer): New function.
2820 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2821 (alloc_jump_pad_buffer): New function.
2822 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2823 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2824 (alloc_jump_pad_buffer): New function.
2825 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2826 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2827 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2828 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2829
1cda1512
MK
28302016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2831
2832 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2833 * linux-amd64-ipa.c: Likewise.
2834 * linux-i386-ipa.c: Likewise.
2835 * linux-s390-ipa.c: Likewise.
2836 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2837 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2838 set_trace_state_variable_value_ptr.
2839 (struct ipa_sym_addresses): Likewise.
2840 (symbol_list): Likewise.
2841 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2842 accessing gdb_collect directly.
2843 (gdb_collect_ptr_type): New typedef.
2844 (get_raw_reg_ptr_type): New typedef.
2845 (get_trace_state_variable_value_ptr_type): New typedef.
2846 (set_trace_state_variable_value_ptr_type): New typedef.
2847 (gdb_collect_ptr): New global.
2848 (get_raw_reg_ptr): New global.
2849 (get_trace_state_variable_value_ptr): New global.
2850 (set_trace_state_variable_value_ptr): New global.
2851 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2852 accessing get_raw_reg directly.
2853 (get_get_tsv_func_addr): Likewise for
2854 get_trace_state_variable_value_ptr.
2855 (get_set_tsv_func_addr): Likewise for
2856 set_trace_state_variable_value_ptr.
2857 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2858
72fb5488
SM
28592016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2860
2861 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2862
28170b88
MK
28632016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2864
2865 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2866 packets.
2867 (relocate_instruction): Remove own_buf.
2868 * server.c (own_buf): Make global.
2869 (handle_v_requests): Make global.
2870 * server.h (own_buf): New declaration.
2871 (handle_v_requests): New prototype.
2872
f39e8743
MK
28732016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2874
2875 PR 18377
2876 * linux-s390-low.c (add_insns): New function.
2877 (s390_emit_prologue): New function.
2878 (s390_emit_epilogue): New function.
2879 (s390_emit_add): New function.
2880 (s390_emit_sub): New function.
2881 (s390_emit_mul): New function.
2882 (s390_emit_lsh): New function.
2883 (s390_emit_rsh_signed): New function.
2884 (s390_emit_rsh_unsigned): New function.
2885 (s390_emit_ext): New function.
2886 (s390_emit_log_not): New function.
2887 (s390_emit_bit_and): New function.
2888 (s390_emit_bit_or): New function.
2889 (s390_emit_bit_xor): New function.
2890 (s390_emit_bit_not): New function.
2891 (s390_emit_equal): New function.
2892 (s390_emit_less_signed): New function.
2893 (s390_emit_less_unsigned): New function.
2894 (s390_emit_ref): New function.
2895 (s390_emit_if_goto): New function.
2896 (s390_emit_goto): New function.
2897 (s390_write_goto_address): New function.
2898 (s390_emit_litpool): New function.
2899 (s390_emit_const): New function.
2900 (s390_emit_call): New function.
2901 (s390_emit_reg): New function.
2902 (s390_emit_pop): New function.
2903 (s390_emit_stack_flush): New function.
2904 (s390_emit_zero_ext): New function.
2905 (s390_emit_swap): New function.
2906 (s390_emit_stack_adjust): New function.
2907 (s390_emit_set_r2): New function.
2908 (s390_emit_int_call_1): New function.
2909 (s390_emit_void_call_2): New function.
2910 (s390_emit_eq_goto): New function.
2911 (s390_emit_ne_goto): New function.
2912 (s390_emit_lt_goto): New function.
2913 (s390_emit_le_goto): New function.
2914 (s390_emit_gt_goto): New function.
2915 (s390_emit_ge_goto): New function.
2916 (s390x_emit_prologue): New function.
2917 (s390x_emit_epilogue): New function.
2918 (s390x_emit_add): New function.
2919 (s390x_emit_sub): New function.
2920 (s390x_emit_mul): New function.
2921 (s390x_emit_lsh): New function.
2922 (s390x_emit_rsh_signed): New function.
2923 (s390x_emit_rsh_unsigned): New function.
2924 (s390x_emit_ext): New function.
2925 (s390x_emit_log_not): New function.
2926 (s390x_emit_bit_and): New function.
2927 (s390x_emit_bit_or): New function.
2928 (s390x_emit_bit_xor): New function.
2929 (s390x_emit_bit_not): New function.
2930 (s390x_emit_equal): New function.
2931 (s390x_emit_less_signed): New function.
2932 (s390x_emit_less_unsigned): New function.
2933 (s390x_emit_ref): New function.
2934 (s390x_emit_if_goto): New function.
2935 (s390x_emit_const): New function.
2936 (s390x_emit_call): New function.
2937 (s390x_emit_reg): New function.
2938 (s390x_emit_pop): New function.
2939 (s390x_emit_stack_flush): New function.
2940 (s390x_emit_zero_ext): New function.
2941 (s390x_emit_swap): New function.
2942 (s390x_emit_stack_adjust): New function.
2943 (s390x_emit_int_call_1): New function.
2944 (s390x_emit_void_call_2): New function.
2945 (s390x_emit_eq_goto): New function.
2946 (s390x_emit_ne_goto): New function.
2947 (s390x_emit_lt_goto): New function.
2948 (s390x_emit_le_goto): New function.
2949 (s390x_emit_gt_goto): New function.
2950 (s390x_emit_ge_goto): New function.
2951 (s390_emit_ops): New function.
2952 (struct linux_target_ops): Fill in emit_ops hook.
2953
abd9baf9
MK
29542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2955
2956 PR 18377
2957 * Makefile.in: Add s390 IPA files.
2958 * configure.srv: Build IPA for s390.
2959 * linux-s390-ipa.c: New file.
2960 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2961 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2962 (tdesc_s390_linux32): Likewise.
2963 (init_registers_s390_linux32v1): Likewise.
2964 (tdesc_s390_linux32v1): Likewise.
2965 (init_registers_s390_linux32v2): Likewise.
2966 (tdesc_s390_linux32v2): Likewise.
2967 (init_registers_s390_linux64): Likewise.
2968 (tdesc_s390_linux64): Likewise.
2969 (init_registers_s390_linux64v1): Likewise.
2970 (tdesc_s390_linux64v1): Likewise.
2971 (init_registers_s390_linux64v2): Likewise.
2972 (tdesc_s390_linux64v2): Likewise.
2973 (init_registers_s390_te_linux64): Likewise.
2974 (tdesc_s390_te_linux64): Likewise.
2975 (init_registers_s390_vx_linux64): Likewise.
2976 (tdesc_s390_vx_linux64): Likewise.
2977 (init_registers_s390_tevx_linux64): Likewise.
2978 (tdesc_s390_tevx_linux64): Likewise.
2979 (init_registers_s390x_linux64): Likewise.
2980 (tdesc_s390x_linux64): Likewise.
2981 (init_registers_s390x_linux64v1): Likewise.
2982 (tdesc_s390x_linux64v1): Likewise.
2983 (init_registers_s390x_linux64v2): Likewise.
2984 (tdesc_s390x_linux64v2): Likewise.
2985 (init_registers_s390x_te_linux64): Likewise.
2986 (tdesc_s390x_te_linux64): Likewise.
2987 (init_registers_s390x_vx_linux64): Likewise.
2988 (tdesc_s390x_vx_linux64): Likewise.
2989 (init_registers_s390x_tevx_linux64): Likewise.
2990 (tdesc_s390x_tevx_linux64): Likewise.
2991 (have_hwcap_s390_vx): New static variable.
2992 (s390_arch_setup): Fill have_hwcap_s390_vx.
2993 (s390_get_thread_area): New function.
2994 (s390_ft_entry_gpr_esa): New const.
2995 (s390_ft_entry_gpr_zarch): New const.
2996 (s390_ft_entry_misc): New const.
2997 (s390_ft_entry_fr): New const.
2998 (s390_ft_entry_vr): New const.
2999 (s390_ft_main_31): New const.
3000 (s390_ft_main_64): New const.
3001 (s390_ft_exit_fr): New const.
3002 (s390_ft_exit_vr): New const.
3003 (s390_ft_exit_misc): New const.
3004 (s390_ft_exit_gpr_esa): New const.
3005 (s390_ft_exit_gpr_zarch): New const.
3006 (append_insns): New function.
3007 (s390_relocate_instruction): New function.
3008 (s390_install_fast_tracepoint_jump_pad): New function.
3009 (s390_get_min_fast_tracepoint_insn_len): New function.
3010 (s390_get_ipa_tdesc_idx): New function.
3011 (struct linux_target_ops): Wire in the above functions.
3012 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3013 * linux-s390-tdesc.h: New file.
3014
a4105d04
MK
30152016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3016
3017 * linux-s390-low.c (s390_supports_tracepoints): New function.
3018 (struct linux_target_ops): Fill supports_tracepoints hook.
3019
35ac8b3e
YQ
30202016-03-18 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-low.c (lwp_signal_can_be_delivered): New function.
3023 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3024
94610ec4
YQ
30252016-03-18 Yao Qi <yao.qi@linaro.org>
3026
3027 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3028 0 if signal is enqueued. Remove 'signal' from one debugging
3029 message. Move one debugging message to some lines below.
3030 Remove code setting 'signal' to 0.
3031
80aea927
YQ
30322016-03-18 Yao Qi <yao.qi@linaro.org>
3033
3034 * linux-low.c (linux_low_filter_event): Remove redundant
3035 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3036
b04fd3be
MK
30372016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3038
3039 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3040 (struct linux_target_ops): Wire in the above.
3041
c40c8d4b
YQ
30422016-03-03 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-low.c: Update comments to start_step_over.
3045
0f8288ae
YQ
30462016-03-03 Yao Qi <yao.qi@linaro.org>
3047
3048 PR server/19736
3049 * linux-low.c (handle_extended_wait): Set child suspended
3050 if event_lwp->bp_reinsert isn't zero.
3051
fdbd04a8
YQ
30522016-03-02 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3055 enqueue_pending_signal.
3056
6896a8fa
MK
30572016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3058
3059 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3060 is actually loaded.
3061
ab503087
MK
30622016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3063
3064 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3065 (s390_regmap_3264) [!__s390x__]: New global.
3066 (s390_collect_ptrace_register): Skip map entries containing -1.
3067 (s390_supply_ptrace_register): Ditto.
3068 (s390_fill_gprs_high): New function.
3069 (s390_store_gprs_high): New function.
3070 (s390_regsets): Add NT_S390_HIGH_GPRS.
3071 (s390_get_hwcap): Enable on 31-bit.
3072 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3073 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3074 Detect NT_S390_HIGH_GPRS.
3075 (s390_usrregs_info_3264): Enable on 31-bit.
3076 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3077 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3078
ae91f625
MK
30792016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3080
3081 PR gdb/13808
3082 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3083 * configure.srv: Ditto.
3084 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3085 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3086 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3087 (init_registers_amd64_linux): Remove prototype.
3088 (tdesc_amd64_linux): Remove declaration.
3089 (get_ipa_tdesc): New function.
3090 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3091 initialize remaining tdescs.
3092 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3093 (init_registers_i386_linux): Remove prototype.
3094 (tdesc_i386_linux): Remove declaration.
3095 (get_ipa_tdesc): New function.
3096 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3097 initialize remaining tdescs.
3098 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3099 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3100 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3101 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3102 (x86_get_ipa_tdesc_idx): New function.
3103 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3104 * linux-x86-tdesc.h: New file.
3105 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3106 (target_get_ipa_tdesc_idx): New macro.
3107 * tracepoint.c (ipa_tdesc_idx): New macro.
3108 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3109 (symbol_list): Add ipa_tdesc_idx.
3110 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3111 (ipa_tdesc): Remove.
3112 (ipa_tdesc_idx): New variable.
3113 (get_context_regcache): Use get_ipa_tdesc.
3114 (gdb_collect): Ditto.
3115 (gdb_probe): Ditto.
3116 * tracepoint.h (get_ipa_tdesc): New prototype.
3117 (ipa_tdesc): Remove.
3118
e7ad2f14
PA
31192016-02-24 Pedro Alves <palves@redhat.com>
3120
3121 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3122 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3123 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3124 Factor out common code between the USE_SIGTRAP_SIGINFO and
3125 !USE_SIGTRAP_SIGINFO blocks.
3126 (linux_low_filter_event): Call save_stop_reason instead of
3127 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3128 Update comments.
3129 (linux_wait_1): Update comments.
3130
657f9cde
WW
31312016-02-24 Wei-cheng Wang <cole945@gmail.com>
3132
3133 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3134 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3135 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3136 ppc_insert_point, ppc_remove_point.
3137
b00b61e1
MK
31382016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3139
3140 * linux-s390-low.c (s390_supports_z_point_type): New function.
3141 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3142
553cb527
YQ
31432016-02-16 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3146 PC. Get pc from regcache_read_pc.
3147
a5652c21
YQ
31482016-02-12 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3151 or linux_get_pc_32bit.
3152 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3153
ed443b61
YQ
31542016-02-12 Yao Qi <yao.qi@linaro.org>
3155
3156 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3157 arm_linux_get_next_pcs_fixup.
3158
020ecd38
MK
31592016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3160
3161 * tracepoint.c (x_tracepoint_action_download): Change
3162 write_inferior_data_ptr to write_inferior_data_pointer.
3163 (cmd_qtstart): Likewise.
3164 (write_inferior_data_ptr): Remove.
3165 (download_agent_expr): Change write_inferior_data_ptr to
3166 write_inferior_data_pointer.
3167 (download_tracepoint_1): Likewise.
3168 (download_tracepoint): Likewise.
3169 (download_trace_state_variables): Likewise.
3170
7cae9051
WW
31712016-02-11 Wei-cheng Wang <cole945@gmail.com>
3172 Marcin Kościelnicki <koriakin@0x04.net>
3173
3174 * tracepoint.c (struct tracepoint_action_ops): Remove.
3175 (struct tracepoint_action): Remove ops.
3176 (m_tracepoint_action_download, r_tracepoint_action_download)
3177 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3178 size and offset accordingly.
3179 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3180 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3181 (tracepoint_action_send, tracepoint_action_download): New functions.
3182 Helpers for trace action handlers.
3183 (add_tracepoint_action): Remove setup actions ops.
3184 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3185
9f6a71b4
YQ
31862016-02-10 Yao Qi <yao.qi@linaro.org>
3187
3188 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3189
1e94266c
SM
31902016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3191
3192 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3193 to AC_OUTPUT.
3194 * configure: Regenerate.
3195
8adce034
SM
31962016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3197
3198 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3199 void * to gdb_byte *.
3200 * linux-low.c (siginfo_fixup): Likewise.
3201 (linux_xfer_siginfo): Likewise.
3202 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3203 Likewise.
3204 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3205
93813b37
WT
32062016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3207
3208 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3209 to srv_tgtobj.
3210 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3211 to srv_tgtobj.
3212 * linux-x86-low.c [__x86_64__]: Include
3213 "nat/amd64-linux-siginfo.h".
3214 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3215 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3216 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3217 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3218 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3219 (cpt_si_fd, si_timerid, si_overrun): Move from
3220 nat/amd64-linux-siginfo.c.
3221 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3222
8424cc97
SM
32232016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3224
3225 * server.c (skip_to_semicolon): Remove.
3226 (process_point_options): Use strchrnul instead of
3227 skip_to_semicolon.
3228
4d18591b
YQ
32292016-01-26 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3232 * linux-low.c (install_software_single_step_breakpoints): Don't
3233 call regcache_read_pc.
3234 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3235 argument pc.
3236
d8020970
YQ
32372016-01-26 Yao Qi <yao.qi@linaro.org>
3238
3239 * linux-low.c (install_software_single_step_breakpoints): Call
3240 regcache_read_pc instead of get_pc.
3241
8b207339
YQ
32422016-01-26 Yao Qi <yao.qi@linaro.org>
3243
3244 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3245 (unblock_async_io): Rename to ...
3246 (block_unblock_async_io): ... it. New function.
3247 (enable_async_io): Don't install SIGIO handler. Unblock it
3248 instead.
3249 (disable_async_io): Don't ignore SIGIO. Block it instead.
3250 (initialize_async_io): Install SIGIO handler. Don't call
3251 unblock_async_io.
3252
18879fef
YQ
32532016-01-26 Yao Qi <yao.qi@linaro.org>
3254
3255 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3256 first character is '\003', call *the_target->request_interrupt.
3257
a0f8e08a
YQ
32582016-01-25 Yao Qi <yao.qi@linaro.org>
3259
3260 * remote-utils.c (new_thread_notify): Remove.
3261 (dead_thread_notify): Likewise.
3262 * remote-utils.h (new_thread_notify): Remove declaration.
3263 (dead_thread_notify): Likewise.
3264
cc5fd9ab
MK
32652016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3266
3267 * gdb.trace/pending.exp: Fix expected message on continue.
3268
99e8eb11
MK
32692016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3270
3271 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3272 it works properly on big-endian machines where sizeof (CORE_ADDR)
3273 != sizeof (void *).
3274
a994041d
PA
32752016-01-21 Pedro Alves <palves@redhat.com>
3276
3277 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3278 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3279 * configure: Regenerate.
3280
f7a6a40d
YQ
32812016-01-21 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3284 is_thumb and set it according to CPSR saved on the stack.
3285 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3286 arm_sigreturn_next_pc.
3287
6f69e520
YQ
32882016-01-18 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-low.c (linux_set_pc_64bit): New function.
3291 (linux_get_pc_64bit): New function.
3292 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3293 Declare.
3294 * linux-sparc-low.c (debug_threads): Remove declaration.
3295 (sparc_get_pc): Remove.
3296 (the_low_target): Use linux_get_pc_64bit instead of
3297 sparc_get_pc.
3298 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3299 (the_low_target): Use linux_get_pc_64bit and
3300 linux_set_pc_64bit.
3301
276d4552
YQ
33022016-01-18 Yao Qi <yao.qi@linaro.org>
3303
3304 * linux-arm-low.c (debug_threads): Remove declaration.
3305 (arm_get_pc, arm_set_pc): Remove.
3306 (the_low_target): Use linux_get_pc_32bit and
3307 linux_set_pc_32bit.
3308 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3309 (the_low_target): Use linux_get_pc_32bit and
3310 linux_set_pc_32bit.
3311 * linux-cris-low.c (debug_threads): Remove declaration.
3312 (cris_get_pc, cris_set_pc,): Remove.
3313 (the_low_target): Use linux_get_pc_32bit and
3314 linux_set_pc_32bit.
3315 * linux-crisv32-low.c (debug_threads): Remove declaration.
3316 (cris_get_pc, cris_set_pc): Remove.
3317 (the_low_target): Use linux_get_pc_32bit and
3318 linux_set_pc_32bit.
3319 * linux-low.c: Include inttypes.h.
3320 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3321 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3322 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3323 (the_low_target): Use linux_get_pc_32bit and
3324 linux_set_pc_32bit.
3325 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3326 (the_low_target): Use linux_get_pc_32bit and
3327 linux_set_pc_32bit.
3328 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3329 (the_low_target): Use linux_get_pc_32bit and
3330 linux_set_pc_32bit.
3331 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3332 (the_low_target): Use linux_get_pc_32bit and
3333 linux_set_pc_32bit.
3334 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3335 (the_low_target): Use linux_get_pc_32bit and
3336 linux_set_pc_32bit.
3337
eb0edac8
GB
33382016-01-18 Gary Benson <gbenson@redhat.com>
3339
3340 * configure.ac (AC_FUNC_FORK): New check.
3341 * config.in: Regenerate.
3342 * configure: Likewise.
3343
1b451dda
YQ
33442016-01-14 Yao Qi <yao.qi@linaro.org>
3345
3346 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3347 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3348 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3349 arm_get_next_pcs_ctor.
3350
82075af2
JS
33512016-01-12 Josh Stone <jistone@redhat.com>
3352 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3353
3354 * inferiors.h: Include "gdb_vecs.h".
3355 (struct process_info): Add syscalls_to_catch.
3356 * inferiors.c (remove_process): Free syscalls_to_catch.
3357 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3358 syscall_return stops.
3359 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3360 * server.c (handle_general_set): Handle QCatchSyscalls.
3361 (handle_query): Report support for QCatchSyscalls.
3362 * target.h (struct target_ops): Add supports_catch_syscall.
3363 (target_supports_catch_syscall): New macro.
3364 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3365 (struct lwp_info): Add syscall_state.
3366 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3367 Maintain syscall_state and syscalls_to_catch across exec.
3368 (get_syscall_trapinfo): New function, proxy to the_low_target.
3369 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3370 (linux_low_filter_event): Toggle syscall_state entry/return for
3371 syscall traps, and set it ignored for all others.
3372 (gdb_catching_syscalls_p): New function.
3373 (gdb_catch_this_syscall_p): New function.
3374 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3375 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3376 (linux_supports_catch_syscall): New function.
3377 (linux_target_ops): Install it.
3378 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3379 (the_low_target): Install it.
3380
8f13a3ce
MF
33812016-01-12 Mike Frysinger <vapier@gentoo.org>
3382
3383 * acinclude.m4: Include new ../warning.m4 file.
3384 * configure: Regenerated.
3385 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3386
5b3da067
MF
33872016-01-12 Mike Frysinger <vapier@gentoo.org>
3388
3389 * ax.c (is_goto_target): Mark static.
3390 * linux-low.c (register_addr): Likewise.
3391 (linux_fetch_registers, linux_store_registers): Likewise.
3392 * mem-break.c (any_persistent_commands): Fix old prototype.
3393 (add_commands_to_breakpoint): Mark static.
3394 * regcache.c (find_register_by_name): Delete unused func.
3395 * remote-utils.c (hex_or_minus_one): Mark static.
3396 * server.c (monitor_show_help): Mark static.
3397 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3398 handle_v_requests): Likewise.
3399
bc504a31
PA
34002016-01-12 Pedro Alves <palves@redhat.com>
3401
3402 Remove use of the registered trademark symbol throughout.
3403
5a0dd67a
YQ
34042016-01-08 Yao Qi <yao.qi@linaro.org>
3405
3406 * remote-utils.c (getpkt): If c is '\003', call target hook
3407 request_interrupt.
3408
b2ca446f
YQ
34092016-01-06 Yao Qi <yao.qi@linaro.org>
3410
3411 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3412 linux-aarch32-low.c.
3413 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3414 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3415 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3416 (thumb2_breakpoint): Declare.
3417 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3418 linux-aarch32-low.h.
3419 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3420 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3421 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3422
edd88788
JB
34232016-01-01 Joel Brobecker <brobecker@adacore.com>
3424
3425 * gdbreplay.c (gdbreplay_version): Change copyright year in
3426 version message.
3427 * server.c (gdbserver_version): Likewise.
3428
65da7f14
PP
34292015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3430
3431 * server.c (crc32_table): Delete.
3432 (crc32): Use libiberty's xcrc32 function.
3433
4abd5ed2
JB
34342015-12-22 Joel Brobecker <brobecker@adacore.com>
3435
3436 * lynx-low.c (lynx_delete_thread_callback): New function.
3437 (lynx_mourn): Properly delete our process and all of its
3438 threads. Remove call to clear_inferiors.
3439
0e50fe5c
JB
34402015-12-22 Joel Brobecker <brobecker@adacore.com>
3441
3442 * target.c (thread_search_callback): Add check that
3443 the thread_stopped target callback is not NULL before
3444 calling it.
3445
35adc03f
YQ
34462015-12-21 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3449 arm breakpoint.
3450
bd2b2909
AT
34512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3452
3453 * server.c (handle_query): Call target_supports_software_single_step.
3454
7fe5e27e
AT
34552015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3456
3457 * linux-low.c (single_step): New function.
3458 (linux_resume_one_lwp_throw): Call single_step.
3459 (start_step_over): Likewise.
3460
d9311bfa
AT
34612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3462
3463 * Makefile.in (SFILES): Append arch/arm-linux.c,
3464 arch/arm-get-next-pcs.c.
3465 (arm-linux.o): New rule.
3466 (arm-get-next-pcs.o): New rule.
3467 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3468 arm-linux.o.
3469 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3470 to linux-aarch32-low.c.
3471 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3472 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3473 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3474 (thumb2_breakpoint_len): Likewise.
3475 (arm_is_thumb_mode): Make non-static.
3476 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3477 from linux-aarch32-low.c.
3478 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3479 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3480 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3481 (thumb2_breakpoint_len): Likewise.
3482 (arm_is_thumb_mode): New declaration.
3483 * linux-arm-low.c: Include arch/arm-linux.h
3484 aarch/arm-get-next-pcs.h, sys/syscall.h.
3485 (get_next_pcs_ops): New struct.
3486 (get_next_pcs_addr_bits_remove): New function.
3487 (get_next_pcs_is_thumb): New function.
3488 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3489 (arm_sigreturn_next_pc): Likewise.
3490 (get_next_pcs_syscall_next_pc): Likewise.
3491 (arm_gdbserver_get_next_pcs): Likewise.
3492 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3493 Initialize.
3494 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3495 * server.h: Include gdb_vecs.h.
3496
68ce2059
AT
34972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3498
3499 * Makefile.in (SFILES): Append common/common-regcache.c.
3500 (OBS): Append common-regcache.o.
3501 (common-regcache.o): New rule.
3502 * regcache.c (init_register_cache): Initialize cache to
3503 REG_UNAVAILABLE.
3504 (regcache_raw_read_unsigned): New function.
3505 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3506 register_status enum.
3507
fa5308bd
AT
35082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3509
3510 * linux-aarch64-low.c (the_low_targets): Rename
3511 breakpoint_reinsert_addr to get_next_pcs.
3512 * linux-arm-low.c (the_low_targets): Likewise.
3513 * linux-bfin-low.c (the_low_targets): Likewise.
3514 * linux-cris-low.c (the_low_targets): Likewise.
3515 * linux-crisv32-low.c (the_low_targets): Likewise.
3516 * linux-low.c (can_software_single_step): Likewise.
3517 (install_software_single_step_breakpoints): New function.
3518 (start_step_over): Use install_software_single_step_breakpoints.
3519 * linux-low.h: New CORE_ADDR vector.
3520 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3521 get_next_pcs.
3522 * linux-mips-low.c (the_low_targets): Likewise.
3523 * linux-nios2-low.c (the_low_targets): Likewise.
3524 * linux-sparc-low.c (the_low_targets): Likewise.
3525
4a6ed09b
PA
35262015-12-17 Pedro Alves <palves@redhat.com>
3527
3528 * linux-low.c (linux_kill_one_lwp): Remove references to
3529 LinuxThreads.
3530 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3531 to 'kill'.
3532 (linux_init_signals): Delete.
3533 (initialize_low): Adjust.
3534 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3535
7544db95
PA
35362015-12-16 Pedro Alves <palves@redhat.com>
3537
3538 * configure.ac (compiler warning flags): When testing a
3539 -Wno-foo option, check whether -Wfoo works instead.
3540 * configure: Regenerate.
3541
8020350c
DB
35422015-12-11 Don Breazeal <donb@codesourcery.com>
3543
3544 * server.c (process_serial_event): Don't exit from gdbserver
3545 in remote mode if there are still active inferiors.
3546
db91f502
YQ
35472015-12-11 Yao Qi <yao.qi@linaro.org>
3548
3549 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3550 arm_breakpoint_at if the process is 32-bit.
3551
b37a6290
YQ
35522015-12-11 Yao Qi <yao.qi@linaro.org>
3553
3554 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3555 arm breakpoint.
3556
17b1509a
YQ
35572015-12-07 Yao Qi <yao.qi@linaro.org>
3558
3559 * configure.srv: Append arm.o to srv_tgtobj for
3560 aarch64*-*-linux* target.
3561 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3562 from linux-arm-low.c.
3563 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3564 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3565 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3566 (thumb2_breakpoint_len): Likewise.
3567 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3568 (arm_breakpoint_kinds): Likewise.
3569 (arm_breakpoint_kind_from_pc): Likewise.
3570 (arm_sw_breakpoint_from_kind): Likewise.
3571 (arm_breakpoint_kind_from_current_state): Likewise.
3572 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3573 (arm_sw_breakpoint_from_kind): Declare.
3574 (arm_breakpoint_kind_from_current_state): Declare.
3575 (arm_breakpoint_at): Declare.
3576 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3577 arm_sw_breakpoint_from_kind if process is 32-bit.
3578 (aarch64_breakpoint_kind_from_pc): New function.
3579 (aarch64_breakpoint_kind_from_current_state): New function.
3580 (the_low_target): Initialize fields breakpoint_kind_from_pc
3581 and breakpoint_kind_from_current_state.
3582 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3583 linux-aarch32-low.c.
3584 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3585 (arm_breakpoint, arm_breakpoint_len): Likewise.
3586 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3587 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3588 (arm_is_thumb_mode): Likewise.
3589 (arm_breakpoint_at): Likewise.
3590 (arm_breakpoint_kind_from_pc): Likewise.
3591 (arm_sw_breakpoint_from_kind): Likewise.
3592 (arm_breakpoint_kind_from_current_state): Likewise.
3593
3594 Revert:
3595 2015-08-04 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3598 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3599 * server.c (extended_protocol): Remove "static".
3600 * server.h (extended_protocol): Declare it.
3601
ece66d65
JS
36022015-12-04 Josh Stone <jistone@redhat.com>
3603
3604 * target.h (struct target_ops) <arch_setup>: Rename to ...
3605 (struct target_ops) <post_create_inferior>: ... this.
3606 (target_arch_setup): Rename to ...
3607 (target_post_create_inferior): ... this, calling post_create_inferior.
3608 * server.c (start_inferior): Update target_arch_setup calls to
3609 target_post_create_inferior.
3610 * linux-low.c (linux_low_ptrace_options): Forward declare.
3611 (linux_arch_setup): Update its comment for general use.
3612 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3613 (struct linux_target_ops): Use linux_post_create_inferior.
3614 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3615 to post_create_inferior.
3616 * nto-low.c (struct nto_target_ops): Likewise.
3617 * spu-low.c (struct spu_target_ops): Likewise.
3618 * win32-low.c (struct win32_target_ops): Likewise.
3619
e58c48b4
AT
36202015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3621
3622 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3623
fbec8956
AT
36242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3625
3626 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3627 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3628 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3629 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3630 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3631 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3632 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3633 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3634 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3635 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3636 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3637 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3638
9b4c5f87
AT
36392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3640
3641 * linux-low.c (linux_look_up_symbols): Don't call
3642 linux_supports_traceclone.
3643 * linux-low.h (thread_db_init): Remove use_events argument.
3644 * thread-db.c (thread_db_use_event): Remove global variable.
3645 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3646 (struct thread_db) <td_create_bp>: Remove field.
3647 (thread_db_create_event): Remove function.
3648 (thread_db_enable_reporting): Likewise.
3649 (find_one_thread): Don't check for thread_db_use_events.
3650 (attach_thread): Likewise.
3651 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3652 (try_thread_db_load_1): Don't check for thread_db_use_events.
3653 (thread_db_init): Remove use_events argument and thread events
3654 handling.
3655 (remove_thread_event_breakpoints): Remove function.
3656 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3657
7d00775e
AT
36582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3659
3660 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3661 New function.
3662 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3663 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3664 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3665 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3666 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3667 Initialize.
3668 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3669 New function.
3670 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3671 * linux-low.c (can_hardware_single_step): Use
3672 supports_hardware_single_step.
3673 (can_software_single_step): New function.
3674 (start_step_over): Call can_software_single_step.
3675 (linux_supports_hardware_single_step): New function.
3676 (struct target_ops) <supports_software_single_step>: Initialize.
3677 * linux-low.h (struct linux_target_ops)
3678 <supports_hardware_single_step>: Initialize.
3679 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3680 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3681 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3682 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3683 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3684 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3685 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3686 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3687 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3688 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3689 Initialize.
3690 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3691 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3692 Initialize.
3693 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3694 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3695 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3696 New function.
3697 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3698 * target.h (struct target_ops): <supports_software_single_step>:
3699 New field.
3700 (target_supports_software_single_step): New macro.
3701
2d97cd35
AT
37022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3703
3704 * linux-low.c (linux_wait_1): Fix pc advance condition.
3705 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3706 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3707
769ef81f
AT
37082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3709
3710 * linux-arm-low.c (arm_is_thumb_mode): New function.
3711 (arm_breakpoint_at): Use arm_is_thumb_mode.
3712 (arm_breakpoint_kind_from_current_state): New function.
3713 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3714 Initialize.
3715 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3716 (linux_breakpoint_kind_from_current_state): New function.
3717 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3718 * linux-low.h (struct linux_target_ops)
3719 <breakpoint_kind_from_current_state>: New field.
3720 * target.h (struct target_ops): Likewise.
3721 (target_breakpoint_kind_from_current_state): New macro.
3722
1bebeeca
PA
37232015-11-30 Pedro Alves <palves@redhat.com>
3724
3725 * linux-low.c (linux_resume): Wake up the event loop before
3726 returning.
3727
a67a9fae
PA
37282015-11-30 Pedro Alves <palves@redhat.com>
3729
3730 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3731 check.
3732 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3733 to -1.
3734 * target.c (struct thread_search): New structure.
3735 (thread_search_callback): New function.
3736 (prev_general_thread): New global.
3737 (prepare_to_access_memory, done_accessing_memory): New functions.
3738 * target.h (prepare_to_access_memory, done_accessing_memory):
3739 Replace macros with function declarations.
3740
f2faf941
PA
37412015-11-30 Pedro Alves <palves@redhat.com>
3742
3743 PR 14618
3744 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3745 report TARGET_WAITKIND_NO_RESUMED.
3746 * remote-utils.c (prepare_resume_reply): Handle
3747 TARGET_WAITKIND_NO_RESUMED.
3748 * server.c (report_no_resumed): New global.
3749 (handle_query) <qSupported>: Handle "no-resumed+". Report
3750 "no-resumed+" support.
3751 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3752 return error if the client doesn't support no-resumed events.
3753 (push_stop_notification): New function.
3754 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3755 events if the client supports them.
3756
a681f9c9
PA
37572015-11-30 Pedro Alves <palves@redhat.com>
3758
3759 * linux-low.c (thread_still_has_status_pending_p): Don't check
3760 vCont;t here.
3761 (lwp_resumed): New function.
3762 (status_pending_p_callback): Return early if the LWP is not
3763 supposed to be resumed.
3764
65706a29
PA
37652015-11-30 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (handle_extended_wait): Assert that the LWP's
3768 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3769 thread create events, leave the new child's status pending.
3770 (linux_low_filter_event): If GDB wants to hear about thread exit
3771 events, leave the LWP marked dead and don't delete it.
3772 (linux_wait_for_event_filtered): Don't check for thread exit.
3773 (filter_exit_event): New function.
3774 (linux_wait_1): Use it, when returning an exit event.
3775 (linux_resume_one_lwp_throw): Assert that the LWP's
3776 waitstatus is TARGET_WAITKIND_IGNORE.
3777 * remote-utils.c (prepare_resume_reply): Handle
3778 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3779 * server.c (report_thread_events): New global.
3780 (handle_general_set): Handle QThreadEvents.
3781 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3782 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3783 TARGET_WAITKIND_THREAD_EXITED.
3784 * server.h (report_thread_events): Declare.
3785
56cf4bed
PA
37862015-11-30 Pedro Alves <palves@redhat.com>
3787
3788 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3789 the thread's last_resume_kind was resume_stop.
3790
500c1d85
PA
37912015-11-30 Pedro Alves <palves@redhat.com>
3792
3793 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3794 before returning.
3795
de979965
PA
37962015-11-30 Pedro Alves <palves@redhat.com>
3797
3798 * server.c (handle_v_requests): Handle vCtrlC.
3799
34c65914
PA
38002015-11-30 Pedro Alves <palves@redhat.com>
3801
3802 * gdbthread.h (find_any_thread_of_pid): Declare.
3803 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3804 functions.
3805 * server.c (handle_query): If current_thread is NULL, look for
3806 another thread of the selected process.
3807
79efa585 38082015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3809 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3810
3811 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3812 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3813 name in reply.
3814 * target.h (struct target_ops) <thread_name>: New field.
3815 (target_thread_name): New macro.
3816
80d82c19
JB
38172015-11-23 Joel Brobecker <brobecker@adacore.com>
3818
3819 * regcache.h (regcache_invalidate_pid): Add declaration.
3820 * regcache.c (regcache_invalidate_pid): New function, extracted
3821 from regcache_invalidate.
3822 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3823 Add trivial documentation comment.
3824 * lynx-low.c: Use regcache_invalidate_pid instead of
3825 regcache_invalidate.
3826
64da5dd5
JB
38272015-11-23 Joel Brobecker <brobecker@adacore.com>
3828
3829 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3830 and Elf64_auxv_t if the target is Android.
3831
37ce4055
DE
38322015-11-22 Doug Evans <xdje42@gmail.com>
3833
3834 * target.h: #include <sys/types.h>.
3835
06e03fff
PA
38362015-11-19 Pedro Alves <palves@redhat.com>
3837
3838 * linux-low.c (linux_process_qsupported): Change prototype.
3839 Adjust.
3840 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3841 Change prototype.
3842 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3843 and adjust to loop over all features.
3844 * server.c (handle_query) <qSupported>: Adjust to call
3845 target_process_qsupported once, passing it a vector of unprocessed
3846 features.
3847 * target.h (struct target_ops) <process_qsupported>: Change
3848 prototype.
3849 (target_process_qsupported): Adjust.
3850
9a084706
PA
38512015-11-19 Pedro Alves <palves@redhat.com>
3852
3853 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3854 mode.
3855 * configure: Regenerate.
3856
dad44a1f
PA
38572015-11-19 Pedro Alves <palves@redhat.com>
3858
3859 * configure: Regenerate.
3860
231c0592
YQ
38612015-11-19 Yao Qi <yao.qi@linaro.org>
3862
3863 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3864 type to uint32_t.
3865
6c1c9a8b
YQ
38662015-11-19 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3869 (struct aarch64_operand): Move enum out.
3870
9caa3311
YQ
38712015-11-19 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3874 struct user_fpsimd_state *.
3875 (aarch64_store_fpregset): Likewise.
3876
6a69a054
YQ
38772015-11-19 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3880 struct user_pt_regs *.
3881 (aarch64_store_gregset): Likewise.
3882
1798301e
PA
38832015-11-18 Pedro Alves <palves@redhat.com>
3884
3885 * Makefile.in (all_object_files): Add $IPA_OBJS.
3886
ce7715e2
PA
38872015-11-17 Pedro Alves <palves@redhat.com>
3888
3889 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3890 GDB_SIGNAL_0 and gdb_signal_to_string.
3891
c0879059
PA
38922015-11-17 Pedro Alves <palves@redhat.com>
3893
3894 * win32-low.c (handle_output_debug_string): Remove parameter.
3895 (win32_kill): Remove our_status local and adjust call to
3896 handle_output_debug_string.
3897 (get_child_debug_event): Adjust call to
3898 handle_output_debug_string.
3899
1996e237
SM
39002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3901
3902 * linux-mips-low.c (mips_fill_gregset): Add cast.
3903 (mips_store_gregset): Likewise.
3904 (mips_fill_fpregset): Likewise.
3905 (mips_store_fpregset): Likewise.
3906
cbec665b
SM
39072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3908
3909 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3910 priv.
3911
eb3e3c67
SM
39122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3913
3914 * linux-mips-low.c (mips_linux_new_thread): Change type of
3915 watch_type to enum target_hw_bp_type.
3916
171de4b8
SM
39172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3920 Change return type to arm_hwbp_type.
3921
04248ead
SM
39222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3923
3924 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3925 (arm_store_gregset): Likewise.
3926 * linux-arm-low.c (arm_get_hwcap): Likewise.
3927 (arm_read_description): Likewise.
3928
04b3479c
SM
39292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3930
3931 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3932
2bc84e8a
SM
39332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3934
3935 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3936 (ppc_fill_vsxregset): Likewise.
3937 (ppc_store_vsxregset): Likewise.
3938 (ppc_fill_vrregset): Likewise.
3939 (ppc_store_vrregset): Likewise.
3940 (ppc_fill_evrregset): Likewise.
3941 (ppc_store_evrregset): Likewise.
3942
e6c5bb05
SM
39432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3944
3945 * linux-ppc-low.c (ppc_usrregs_info): Remove
3946 forward-declaration.
3947 (ppc_arch_setup): Move lower in file.
3948
7ea45d72
SM
39492015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3950
3951 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3952 (ps_pdwrite): Likewise.
3953
69291610
HW
39542015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3955
3956 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3957 to after assert checks.
3958
b42945fd
SM
39592015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * proc-service.c (ps_pdread): Add/adjust casts.
3962 (ps_pdwrite): Add/adjust casts.
3963
d6f85c84
SM
39642015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3965
3966 * server.c (handle_search_memory_1): Cast return value of
3967 memmem.
3968
f98cd059
SM
39692015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3970
3971 * server.c (write_qxfer_response): Change type of data to
3972 gdb_byte *.
3973
d2412fa5
PA
39742015-10-29 Pedro Alves <palves@redhat.com>
3975
3976 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3977
c17414a2
PA
39782015-10-29 Pedro Alves <palves@redhat.com>
3979
3980 * tracepoint.c (clear_installed_tracepoints): Add casts.
3981
e053fbc4
PA
39822015-10-29 Pedro Alves <palves@redhat.com>
3983
3984 * server.c (handle_v_cont, process_serial_event): Add enum
3985 gdb_signal casts to signal parsing code.
3986
add67df8
PA
39872015-10-29 Pedro Alves <palves@redhat.com>
3988
3989 * linux-low.h (NULL_REGSET): Define.
3990 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3991 * linux-arm-low.c (arm_regsets): Likewise.
3992 * linux-crisv32-low.c (cris_regsets): Likewise.
3993 * linux-m68k-low.c (m68k_regsets): Likewise.
3994 * linux-mips-low.c (mips_regsets): Likewise.
3995 * linux-nios2-low.c (nios2_regsets): Likewise.
3996 * linux-ppc-low.c (ppc_regsets): Likewise.
3997 * linux-s390-low.c (s390_regsets): Likewise.
3998 * linux-sh-low.c (sh_regsets): Likewise.
3999 * linux-sparc-low.c (sparc_regsets): Likewise.
4000 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4001 * linux-tile-low.c (tile_regsets): Likewise.
4002 * linux-x86-low.c (x86_regsets): Likewise.
4003 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4004
50bc912a
PA
40052015-10-29 Pedro Alves <palves@redhat.com>
4006
4007 * linux-low.h (NULL_REGSET): Define.
4008 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4009 * linux-arm-low.c (arm_regsets): Likewise.
4010 * linux-crisv32-low.c (cris_regsets): Likewise.
4011 * linux-m68k-low.c (m68k_regsets): Likewise.
4012 * linux-mips-low.c (mips_regsets): Likewise.
4013 * linux-nios2-low.c (nios2_regsets): Likewise.
4014 * linux-ppc-low.c (ppc_regsets): Likewise.
4015 * linux-s390-low.c (s390_regsets): Likewise.
4016 * linux-sh-low.c (sh_regsets): Likewise.
4017 * linux-sparc-low.c (sparc_regsets): Likewise.
4018 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4019 * linux-tile-low.c (tile_regsets): Likewise.
4020 * linux-x86-low.c (x86_regsets): Likewise.
4021 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4022
682b2546
DE
40232015-10-26 Doug Evans <dje@google.com>
4024
4025 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4026
963843d4
DE
40272015-10-26 Doug Evans <dje@google.com>
4028
4029 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4030
d41401ac
DE
40312015-10-26 Doug Evans <dje@google.com>
4032
4033 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4034 for debug_printf.
4035 (attach_thread, find_new_threads_callback): Ditto.
4036
3db28855
AT
40372015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4038
4039 * mem-break.h (set_breakpoint_data): Remove.
4040
fb78e89c
AT
40412015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4042
4043 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4044 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4045 (initialize_low): Remove set_breakpoint_data call.
4046 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4047 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4048 (initialize_low): Remove set_breakpoint_data call.
4049 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4050 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4051 (initialize_low): Remove set_breakpoint_data call.
4052
2e6ee069
AT
40532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4054
4055 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4056 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4057 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4058 * target.h (target_breakpoint_kind_from_pc): New macro.
4059
1652a986
AT
40602015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4061
4062 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4063 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4064 the default breakpoint kind.
4065
abeead09
AT
40662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4067
4068 * linux-arm-low.c (arm_supports_z_point_type): Add software
4069 breakpoint support.
4070
b0b4b501
AT
40712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4072
4073 * linux-arm-low.c: Refactor breakpoint definitions.
4074 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4075 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4076
8689682c
AT
40772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4078
4079 * Makefile.in: Add arm.c/o.
4080 * configure.srv: Likewise.
4081 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4082 (arm_breakpoint_kind_from_pc): New function.
4083 (arm_sw_breakpoint_from_kind): Return proper kind.
4084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4085
27165294
AT
40862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4087
4088 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4089 removal.
4090 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4091 (struct raw_breakpoint) <size>: Remove.
4092 (struct raw_breakpoint) <kind>: Add.
4093 (bp_size): New function.
4094 (bp_opcode): Likewise.
4095 (find_raw_breakpoint_at): Adjust for kind.
4096 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4097 (remove_memory_breakpoint): Adjust for kind call bp_size.
4098 (set_raw_breakpoint_at): Adjust for kind.
4099 (set_breakpoint): Likewise.
4100 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4101 (delete_raw_breakpoint): Adjust for kind.
4102 (delete_breakpoint): Likewise.
4103 (find_gdb_breakpoint): Likewise.
4104 (set_gdb_breakpoint_1): Likewise.
4105 (set_gdb_breakpoint): Likewise.
4106 (delete_gdb_breakpoint_1): Likewise.
4107 (delete_gdb_breakpoint): Likewise.
4108 (uninsert_raw_breakpoint): Likewise.
4109 (reinsert_raw_breakpoint): Likewise.
4110 (set_breakpoint_data): Remove.
4111 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4112 (check_mem_read): Adjust for kind call bp_size.
4113 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4114 (clone_one_breakpoint): Adjust for kind.
4115 * mem-break.h (set_gdb_breakpoint): Likewise.
4116 (delete_gdb_breakpoint): Likewise.
4117 * server.c (process_serial_event): Likewise.
4118
dd373349
AT
41192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4120
4121 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4122 (struct linux_target_ops) <breakpoint>: Remove.
4123 (struct linux_target_ops) <breakpoint_len>: Remove.
4124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4126 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4127 (arm_sw_breakpoint_from_kind): New function.
4128 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4129 (struct linux_target_ops) <breakpoint>: Remove.
4130 (struct linux_target_ops) <breakpoint_len>: Remove.
4131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4133 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4134 (struct linux_target_ops) <breakpoint>: Remove.
4135 (struct linux_target_ops) <breakpoint_len>: Remove.
4136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4138 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4139 (struct linux_target_ops) <breakpoint>: Remove.
4140 (struct linux_target_ops) <breakpoint_len>: Remove.
4141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4143 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4144 and sw_breakpoint_from_kind to increment the pc.
4145 (linux_breakpoint_kind_from_pc): New function.
4146 (linux_sw_breakpoint_from_kind): New function.
4147 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4148 (initialize_low): Call breakpoint_kind_from_pc and
4149 sw_breakpoint_from_kind to replace breakpoint_data/len.
4150 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4151 New field.
4152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4153 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4154 (struct linux_target_ops) <breakpoint>: Remove.
4155 (struct linux_target_ops) <breakpoint_len>: Remove.
4156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4158 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4159 (struct linux_target_ops) <breakpoint>: Remove.
4160 (struct linux_target_ops) <breakpoint_len>: Remove.
4161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4163 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4164 (struct linux_target_ops) <breakpoint>: Remove.
4165 (struct linux_target_ops) <breakpoint_len>: Remove.
4166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4168 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4169 (struct linux_target_ops) <breakpoint>: Remove.
4170 (struct linux_target_ops) <breakpoint_len>: Remove.
4171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4173 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4174 (struct linux_target_ops) <breakpoint>: Remove.
4175 (struct linux_target_ops) <breakpoint_len>: Remove.
4176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4178 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4179 (struct linux_target_ops) <breakpoint>: Remove.
4180 (struct linux_target_ops) <breakpoint_len>: Remove.
4181 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4182 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4183 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4184 (struct linux_target_ops) <breakpoint>: Remove.
4185 (struct linux_target_ops) <breakpoint_len>: Remove.
4186 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4187 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4188 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4189 (struct linux_target_ops) <breakpoint>: Remove.
4190 (struct linux_target_ops) <breakpoint_len>: Remove.
4191 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4192 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4193 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4194 (struct linux_target_ops) <breakpoint>: Remove.
4195 (struct linux_target_ops) <breakpoint_len>: Remove.
4196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4198 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4199 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4200 (struct linux_target_ops) <breakpoint>: Remove.
4201 (struct linux_target_ops) <breakpoint_len>: Remove.
4202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4203 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4204 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4205 (struct linux_target_ops) <breakpoint>: Remove.
4206 (struct linux_target_ops) <breakpoint_len>: Remove.
4207 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4208 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4209
4cd98a19
AT
42102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4211
4212 * linux-cris-low.c (cris_get_pc): Remove void arg.
4213
774ee6d2
AR
42142015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4215
4216 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4217 variable name.
4218
833dcd29
AR
42192015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4220
4221 * inferiors.c (thread_pid_matches_callback): New function.
4222 (find_thread_process): New function.
4223 (remove_thread): Reset current_thread.
4224 (remove_process): Assert threads have been removed first.
4225
8d689ee5
YQ
42262015-10-15 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4229 if it is 3.
4230 (aarch64_remove_point): Likewise.
4231 * regcache.c (regcache_register_size): New function.
4232
1c2e1515
YQ
42332015-10-12 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-aarch64-low.c: Update all callers as emit_load_store
4236 is renamed to aarch64_emit_load_store.
4237
e1c587c3
YQ
42382015-10-12 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-aarch64-low.c: Update all callers of function renaming
4241 from emit_insn to aarch64_emit_insn.
4242
b6542f81
YQ
42432015-10-12 Yao Qi <yao.qi@linaro.org>
4244
4245 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4246 arch/aarch64-insn.h.
4247 (struct aarch64_memory_operand): Likewise.
4248 (ENCODE): Likewise.
4249 (emit_insn): Move to arch/aarch64-insn.c.
4250 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4251 (emit_load_store): Move to arch/aarch64-insn.c.
4252 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4253 (can_encode_int32): Remove.
4254
246994ce
YQ
42552015-10-12 Yao Qi <yao.qi@linaro.org>
4256
4257 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4258 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4259 (aarch64_relocate_instruction): Likewise.
4260 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4261 (struct aarch64_insn_visitor): Likewise.
4262
0badd99f
YQ
42632015-10-12 Yao Qi <yao.qi@linaro.org>
4264
4265 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4266 (struct aarch64_insn_visitor): New.
4267 (struct aarch64_insn_relocation_data): New.
4268 (aarch64_ftrace_insn_reloc_b): New function.
4269 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4270 (aarch64_ftrace_insn_reloc_cb): Likewise.
4271 (aarch64_ftrace_insn_reloc_tb): Likewise.
4272 (aarch64_ftrace_insn_reloc_adr): Likewise.
4273 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4274 (aarch64_ftrace_insn_reloc_others): Likewise.
4275 (visitor): New.
4276 (aarch64_relocate_instruction): Use visitor.
4277
dfaffe9d
YQ
42782015-10-12 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4281 int. Add argument buf.
4282 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4283 aarch64_relocate_instruction.
4284
70b439f0
YQ
42852015-10-12 Yao Qi <yao.qi@linaro.org>
4286
4287 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4288 argument insn. Remove local variable insn. Don't call
4289 target_read_uint32.
4290 (aarch64_install_fast_tracepoint_jump_pad): Call
4291 target_read_uint32.
4292
7781c06f
YQ
42932015-09-30 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4296 (emit_load_store_pair): Likewise.
4297
9a3c8263
SM
42982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4299
4300 * dll.c (match_dll): Add cast(s).
4301 (unloaded_dll): Likewise.
4302 * linux-low.c (second_thread_of_pid_p): Likewise.
4303 (delete_lwp_callback): Likewise.
4304 (count_events_callback): Likewise.
4305 (select_event_lwp_callback): Likewise.
4306 (linux_set_resume_request): Likewise.
4307 * server.c (accumulate_file_name_length): Likewise.
4308 (emit_dll_description): Likewise.
4309 (handle_qxfer_threads_worker): Likewise.
4310 (visit_actioned_threads): Likewise.
4311 * thread-db.c (any_thread_of): Likewise.
4312 * tracepoint.c (same_process_p): Likewise.
4313 (match_blocktype): Likewise.
4314 (build_traceframe_info_xml): Likewise.
4315
224c3ddb
SM
43162015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4317
4318 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4319 assignment.
4320 (gdb_unparse_agent_expr): Likewise.
4321 * hostio.c (require_data): Likewise.
4322 (handle_pread): Likewise.
4323 * linux-low.c (disable_regset): Likewise.
4324 (fetch_register): Likewise.
4325 (store_register): Likewise.
4326 (get_dynamic): Likewise.
4327 (linux_qxfer_libraries_svr4): Likewise.
4328 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4329 (set_fast_tracepoint_jump): Likewise.
4330 (uninsert_fast_tracepoint_jumps_at): Likewise.
4331 (reinsert_fast_tracepoint_jumps_at): Likewise.
4332 (validate_inserted_breakpoint): Likewise.
4333 (clone_agent_expr): Likewise.
4334 * regcache.c (init_register_cache): Likewise.
4335 * remote-utils.c (putpkt_binary_1): Likewise.
4336 (decode_M_packet): Likewise.
4337 (decode_X_packet): Likewise.
4338 (look_up_one_symbol): Likewise.
4339 (relocate_instruction): Likewise.
4340 (monitor_output): Likewise.
4341 * server.c (handle_search_memory): Likewise.
4342 (handle_qxfer_exec_file): Likewise.
4343 (handle_qxfer_libraries): Likewise.
4344 (handle_qxfer): Likewise.
4345 (handle_query): Likewise.
4346 (handle_v_cont): Likewise.
4347 (handle_v_run): Likewise.
4348 (captured_main): Likewise.
4349 * target.c (write_inferior_memory): Likewise.
4350 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4351 * tracepoint.c (init_trace_buffer): Likewise.
4352 (add_tracepoint_action): Likewise.
4353 (add_traceframe): Likewise.
4354 (add_traceframe_block): Likewise.
4355 (cmd_qtdpsrc): Likewise.
4356 (cmd_qtdv): Likewise.
4357 (cmd_qtstatus): Likewise.
4358 (response_source): Likewise.
4359 (response_tsv): Likewise.
4360 (cmd_qtnotes): Likewise.
4361 (gdb_collect): Likewise.
4362 (initialize_tracepoint): Likewise.
4363
afbe19f8
PL
43642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4365
4366 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4367 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4368 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4369 <NOP>: New.
4370 (enum aarch64_condition_codes): New enum.
4371 (w0): New static global.
4372 (fp): Likewise.
4373 (lr): Likewise.
4374 (struct aarch64_memory_operand) <type>: New
4375 MEMORY_OPERAND_POSTINDEX type.
4376 (postindex_memory_operand): New helper function.
4377 (emit_ret): New function.
4378 (emit_load_store_pair): New function, factored out of emit_stp
4379 with support for MEMORY_OPERAND_POSTINDEX.
4380 (emit_stp): Rewrite using emit_load_store_pair.
4381 (emit_ldp): New function.
4382 (emit_load_store): Likewise.
4383 (emit_ldr): Mention post-index instruction in comment.
4384 (emit_ldrh): New function.
4385 (emit_ldrb): New function.
4386 (emit_ldrsw): Mention post-index instruction in comment.
4387 (emit_str): Likewise.
4388 (emit_subs): New function.
4389 (emit_cmp): Likewise.
4390 (emit_and): Likewise.
4391 (emit_orr): Likewise.
4392 (emit_orn): Likewise.
4393 (emit_eor): Likewise.
4394 (emit_mvn): Likewise.
4395 (emit_lslv): Likewise.
4396 (emit_lsrv): Likewise.
4397 (emit_asrv): Likewise.
4398 (emit_mul): Likewise.
4399 (emit_sbfm): Likewise.
4400 (emit_sbfx): Likewise.
4401 (emit_ubfm): Likewise.
4402 (emit_ubfx): Likewise.
4403 (emit_csinc): Likewise.
4404 (emit_cset): Likewise.
4405 (emit_nop): Likewise.
4406 (emit_ops_insns): New helper function.
4407 (emit_pop): Likewise.
4408 (emit_push): Likewise.
4409 (aarch64_emit_prologue): New function.
4410 (aarch64_emit_epilogue): Likewise.
4411 (aarch64_emit_add): Likewise.
4412 (aarch64_emit_sub): Likewise.
4413 (aarch64_emit_mul): Likewise.
4414 (aarch64_emit_lsh): Likewise.
4415 (aarch64_emit_rsh_signed): Likewise.
4416 (aarch64_emit_rsh_unsigned): Likewise.
4417 (aarch64_emit_ext): Likewise.
4418 (aarch64_emit_log_not): Likewise.
4419 (aarch64_emit_bit_and): Likewise.
4420 (aarch64_emit_bit_or): Likewise.
4421 (aarch64_emit_bit_xor): Likewise.
4422 (aarch64_emit_bit_not): Likewise.
4423 (aarch64_emit_equal): Likewise.
4424 (aarch64_emit_less_signed): Likewise.
4425 (aarch64_emit_less_unsigned): Likewise.
4426 (aarch64_emit_ref): Likewise.
4427 (aarch64_emit_if_goto): Likewise.
4428 (aarch64_emit_goto): Likewise.
4429 (aarch64_write_goto_address): Likewise.
4430 (aarch64_emit_const): Likewise.
4431 (aarch64_emit_call): Likewise.
4432 (aarch64_emit_reg): Likewise.
4433 (aarch64_emit_pop): Likewise.
4434 (aarch64_emit_stack_flush): Likewise.
4435 (aarch64_emit_zero_ext): Likewise.
4436 (aarch64_emit_swap): Likewise.
4437 (aarch64_emit_stack_adjust): Likewise.
4438 (aarch64_emit_int_call_1): Likewise.
4439 (aarch64_emit_void_call_2): Likewise.
4440 (aarch64_emit_eq_goto): Likewise.
4441 (aarch64_emit_ne_goto): Likewise.
4442 (aarch64_emit_lt_goto): Likewise.
4443 (aarch64_emit_le_goto): Likewise.
4444 (aarch64_emit_gt_goto): Likewise.
4445 (aarch64_emit_ge_got): Likewise.
4446 (aarch64_emit_ops_impl): New static global variable.
4447 (aarch64_emit_ops): New target function, return
4448 &aarch64_emit_ops_impl.
4449 (struct linux_target_ops): Install it.
4450
bb903df0
PL
44512015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4452
4453 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4454 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4455 aarch64-ipa.o.
4456 * linux-aarch64-ipa.c: New file.
4457 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4458 and endian.h.
4459 (aarch64_get_thread_area): New target method.
4460 (extract_signed_bitfield): New helper function.
4461 (aarch64_decode_ldr_literal): New function.
4462 (enum aarch64_opcodes): New enum.
4463 (struct aarch64_register): New struct.
4464 (struct aarch64_operand): New struct.
4465 (x0): New static global.
4466 (x1): Likewise.
4467 (x2): Likewise.
4468 (x3): Likewise.
4469 (x4): Likewise.
4470 (w2): Likewise.
4471 (ip0): Likewise.
4472 (sp): Likewise.
4473 (xzr): Likewise.
4474 (aarch64_register): New helper function.
4475 (register_operand): Likewise.
4476 (immediate_operand): Likewise.
4477 (struct aarch64_memory_operand): New struct.
4478 (offset_memory_operand): New helper function.
4479 (preindex_memory_operand): Likewise.
4480 (enum aarch64_system_control_registers): New enum.
4481 (ENCODE): New macro.
4482 (emit_insn): New helper function.
4483 (emit_b): New function.
4484 (emit_bcond): Likewise.
4485 (emit_cb): Likewise.
4486 (emit_tb): Likewise.
4487 (emit_blr): Likewise.
4488 (emit_stp): Likewise.
4489 (emit_ldp_q_offset): Likewise.
4490 (emit_stp_q_offset): Likewise.
4491 (emit_load_store): Likewise.
4492 (emit_ldr): Likewise.
4493 (emit_ldrsw): Likewise.
4494 (emit_str): Likewise.
4495 (emit_ldaxr): Likewise.
4496 (emit_stxr): Likewise.
4497 (emit_stlr): Likewise.
4498 (emit_data_processing_reg): Likewise.
4499 (emit_data_processing): Likewise.
4500 (emit_add): Likewise.
4501 (emit_sub): Likewise.
4502 (emit_mov): Likewise.
4503 (emit_movk): Likewise.
4504 (emit_mov_addr): Likewise.
4505 (emit_mrs): Likewise.
4506 (emit_msr): Likewise.
4507 (emit_sevl): Likewise.
4508 (emit_wfe): Likewise.
4509 (append_insns): Likewise.
4510 (can_encode_int32_in): New helper function.
4511 (aarch64_relocate_instruction): New function.
4512 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4513 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4514 (struct linux_target_ops): Install aarch64_get_thread_area,
4515 aarch64_install_fast_tracepoint_jump_pad and
4516 aarch64_get_min_fast_tracepoint_insn_len.
4517
787749ea
PL
45182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4519
4520 * Makefile.in (aarch64-insn.o): New rule.
4521 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4522
9812b2e6
YQ
45232015-09-21 Yao Qi <yao.qi@linaro.org>
4524
4525 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4526
18fe412b
YQ
45272015-09-21 Yao Qi <yao.qi@linaro.org>
4528
4529 * tracepoint.c (max_jump_pad_size): Remove.
4530
a0cc84cd
YQ
45312015-09-18 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-aarch64-low.c: Don't include sys/uio.h.
4534 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4535
d78908cf
WW
45362015-09-16 Wei-cheng Wang <cole945@gmail.com>
4537
4538 * tracepoint.c (eval_result_type): Change prototype.
4539 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4540
d57e0d50
PA
45412015-09-15 Pedro Alves <palves@redhat.com>
4542
4543 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4544 Check whether to report exec events instead of checking whether
4545 multiprocess is enabled.
4546
5a676acc
PA
45472015-09-15 Pedro Alves <palves@redhat.com>
4548
4549 PR remote/18965
4550 * remote-utils.c (prepare_resume_reply): Merge
4551 TARGET_WAITKIND_VFORK_DONE switch case with the
4552 TARGET_WAITKIND_FORKED case.
4553
7c5d0fad
YQ
45542015-09-15 Yao Qi <yao.qi@linaro.org>
4555
4556 * server.c (handle_query): Check string comparison using
4557 "else if" instead of "if".
4558
750ce8d1
YQ
45592015-09-15 Yao Qi <yao.qi@linaro.org>
4560
4561 * server.c (vCont_supported): New global variable.
4562 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4563 matches. Append ";vContSupported+" to own_buf.
4564 (handle_v_requests): Append ";s;S" to own_buf if target supports
4565 hardware single step or vCont_supported is false.
4566 (capture_main): Set vCont_supported to zero.
4567
70b90b91
YQ
45682015-09-15 Yao Qi <yao.qi@linaro.org>
4569
4570 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4571 it to ...
4572 (linux_supports_hardware_single_step): ... New function.
4573 (linux_target_ops): Update.
4574 * lynx-low.c (lynx_target_ops): Set field
4575 supports_hardware_single_step to target_can_do_hardware_single_step.
4576 * nto-low.c (nto_target_ops): Likewise.
4577 * spu-low.c (spu_target_ops): Likewise.
4578 * win32-low.c (win32_target_ops): Likewise.
4579 * target.c (target_can_do_hardware_single_step): New function.
4580 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4581 Remove. <supports_hardware_single_step>: New field.
4582 (target_supports_conditional_breakpoints): Remove.
4583 (target_supports_hardware_single_step): New macro.
4584 (target_can_do_hardware_single_step): Declare.
4585 * server.c (handle_query): Use target_supports_hardware_single_step
4586 instead of target_supports_conditional_breakpoints.
4587
ade90bde
YQ
45882015-09-15 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4591 function.
4592 (struct linux_target_ops the_low_target): Install
4593 aarch64_linux_siginfo_fixup.
4594
94585166
DB
45952015-09-11 Don Breazeal <donb@codesourcery.com>
4596 Luis Machado <lgustavo@codesourcery.com>
4597
4598 * linux-low.c (linux_mourn): Static declaration.
4599 (linux_arch_setup): Move in front of
4600 handle_extended_wait.
4601 (linux_arch_setup_thread): New function.
4602 (handle_extended_wait): Handle exec events. Call
4603 linux_arch_setup_thread. Make event_lwp argument a
4604 pointer-to-a-pointer.
4605 (check_zombie_leaders): Do not check stopped threads.
4606 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4607 (linux_low_filter_event): Add lwp and thread for exec'ing
4608 non-leader thread if leader thread has been deleted.
4609 Refactor code into linux_arch_setup_thread and call it.
4610 Pass child lwp pointer by reference to handle_extended_wait.
4611 (linux_wait_for_event_filtered): Update comment.
4612 (linux_wait_1): Prevent clobbering exec event status.
4613 (linux_supports_exec_events): New function.
4614 (linux_target_ops) <supports_exec_events>: Initialize new member.
4615 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4616 new member.
4617 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4618 * server.c (report_exec_events): New global variable.
4619 (handle_query): Handle qSupported query for exec-events feature.
4620 (captured_main): Initialize report_exec_events.
4621 * server.h (report_exec_events): Declare new global variable.
4622 * target.h (struct target_ops) <supports_exec_events>: New
4623 member.
4624 (target_supports_exec_events): New macro.
4625 * win32-low.c (win32_target_ops) <supports_exec_events>:
4626 Initialize new member.
4627
0568462b
MM
46282015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4629
4630 * linux-low.c (linux_low_enable_btrace): Remove.
4631 (linux_target_ops): Replace linux_low_enable_btrace with
4632 linux_enable_btrace.
4633
39edd165
YQ
46342015-09-03 Yao Qi <yao.qi@linaro.org>
4635
4636 * linux-aarch64-low.c (aarch64_insert_point): Call
4637 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4638 returns true.
4639
1db33b5a
UW
46402015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4641
4642 * linux-low.c (check_stopped_by_breakpoint): Use
4643 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4644
ab290430
PA
46452015-08-27 Pedro Alves <palves@redhat.com>
4646
4647 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4648
8d749320
SM
46492015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4650
6711b7f8
SM
4651 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4652 the XNEW-family equivalent.
8d749320
SM
4653 (compile_bytecodes): Likewise.
4654 * dll.c (loaded_dll): Likewise.
4655 * event-loop.c (append_callback_event): Likewise.
4656 (create_file_handler): Likewise.
4657 (create_file_event): Likewise.
4658 * hostio.c (handle_open): Likewise.
4659 * inferiors.c (add_thread): Likewise.
4660 (add_process): Likewise.
4661 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4662 * linux-arm-low.c (arm_new_process): Likewise.
4663 (arm_new_thread): Likewise.
4664 * linux-low.c (add_to_pid_list): Likewise.
4665 (linux_add_process): Likewise.
4666 (handle_extended_wait): Likewise.
4667 (add_lwp): Likewise.
4668 (enqueue_one_deferred_signal): Likewise.
4669 (enqueue_pending_signal): Likewise.
4670 (linux_resume_one_lwp_throw): Likewise.
4671 (linux_resume_one_thread): Likewise.
4672 (linux_read_memory): Likewise.
4673 (linux_write_memory): Likewise.
4674 * linux-mips-low.c (mips_linux_new_process): Likewise.
4675 (mips_linux_new_thread): Likewise.
4676 (mips_add_watchpoint): Likewise.
4677 * linux-x86-low.c (initialize_low_arch): Likewise.
4678 * lynx-low.c (lynx_add_process): Likewise.
4679 * mem-break.c (set_raw_breakpoint_at): Likewise.
4680 (set_breakpoint): Likewise.
4681 (add_condition_to_breakpoint): Likewise.
4682 (add_commands_to_breakpoint): Likewise.
4683 (clone_agent_expr): Likewise.
4684 (clone_one_breakpoint): Likewise.
4685 * regcache.c (new_register_cache): Likewise.
4686 * remote-utils.c (look_up_one_symbol): Likewise.
4687 * server.c (queue_stop_reply): Likewise.
4688 (start_inferior): Likewise.
4689 (queue_stop_reply_callback): Likewise.
4690 (handle_target_event): Likewise.
4691 * spu-low.c (fetch_ppc_memory): Likewise.
4692 (store_ppc_memory): Likewise.
4693 * target.c (set_target_ops): Likewise.
4694 * thread-db.c (thread_db_load_search): Likewise.
4695 (try_thread_db_load_1): Likewise.
4696 * tracepoint.c (add_tracepoint): Likewise.
4697 (add_tracepoint_action): Likewise.
4698 (create_trace_state_variable): Likewise.
4699 (cmd_qtdpsrc): Likewise.
4700 (cmd_qtro): Likewise.
4701 (add_while_stepping_state): Likewise.
4702 * win32-low.c (child_add_thread): Likewise.
4703 (get_image_name): Likewise.
4704
ed8b7b42
YQ
47052015-08-25 Yao Qi <yao.qi@linaro.org>
4706
4707 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4708
db3cb7cb
YQ
47092015-08-25 Yao Qi <yao.qi@linaro.org>
4710
4711 * Makefile.in (aarch64-linux.o): New rule.
4712 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4713 srv_tgtobj.
4714 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4715 (aarch64_init_debug_reg_state): Make it extern.
4716 (aarch64_linux_prepare_to_resume): Remove.
4717
f6011a1c
YQ
47182015-08-25 Yao Qi <yao.qi@linaro.org>
4719
4720 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4721 lwp_arch_private_info and ptid_of_lwp.
4722
88e2cf7e
YQ
47232015-08-25 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4726 Find proc_info by find_process_pid. All callers updated.
4727
5e35436e
YQ
47282015-08-25 Yao Qi <yao.qi@linaro.org>
4729
4730 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4731 Remove.
4732 (debug_reg_change_callback): Remove.
4733 (aarch64_notify_debug_reg_change): Remove.
4734
4a8a7965
YQ
47352015-08-25 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4738 Call current_lwp_ptid.
4739
32a271ee
YQ
47402015-08-25 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-aarch64-low.c (debug_reg_change_callback): Use
4743 debug_printf.
4744
0d51c8d7
YQ
47452015-08-25 Yao Qi <yao.qi@linaro.org>
4746
4747 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4748
31a43dd5
YQ
47492015-08-25 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4752
8ee52567
YQ
47532015-08-25 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4756 the code.
4757
ff3f0f45
YQ
47582015-08-25 Yao Qi <yao.qi@linaro.org>
4759
4760 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4761 Remove.
4762 (debug_reg_change_callback): Remove argument entry and add argument
4763 lwp. Remove local variable thread. Don't print thread id in the
4764 debugging output. Don't check whether pid of thread equals to pid.
4765 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4766 iterate_over_lwps instead find_inferior.
4767
3d40fbb5
PA
47682015-08-24 Pedro Alves <palves@redhat.com>
4769
4770 * inferiors.c (get_first_process): New function.
4771 * inferiors.h (get_first_process): New declaration.
4772 * remote-utils.c (read_ptid): Default to the first process in the
4773 list, instead of to the current thread's process.
4774
438e1e42
PA
47752015-08-24 Pedro Alves <palves@redhat.com>
4776
4777 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4778 * event-loop.c: Likewise.
4779 * remote-utils.c: Likewise.
4780 * tracepoint.c: Likewise.
4781
a8c6d4fc
PA
47822015-08-24 Pedro Alves <palves@redhat.com>
4783
4784 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4785 ptid_get_lwp.
4786
99b0bb12
PA
47872015-08-21 Pedro Alves <palves@redhat.com>
4788
4789 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4790 instead of literal 1.
4791
f8904751
PA
47922015-08-21 Pedro Alves <palves@redhat.com>
4793
4794 * tdesc.c (default_description): Explicitly zero-initialize.
4795
465a859e
PA
47962015-08-21 Pedro Alves <palves@redhat.com>
4797
4798 PR gdb/18749
4799 * inferiors.c (remove_thread): Discard any pending stop reply for
4800 this thread.
4801 * server.c (remove_all_on_match_pid): Rename to ...
4802 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4803 instead of a pid.
4804 (discard_queued_stop_replies): Change parameter to a ptid. Now
4805 extern.
4806 (handle_v_kill, kill_inferior_callback, captured_main)
4807 (process_serial_event): Adjust.
4808 * server.h (discard_queued_stop_replies): Declare.
4809
f0db101d
PA
48102015-08-21 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (wait_for_sigstop): Always switch to no thread
4813 selected if the previously current thread dies.
4814 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4815 process instead of the current thread's.
4816 * remote-utils.c (input_interrupt): Don't check if there's no
4817 current thread.
4818 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4819 current thread to the general thread fails, error out.
4820 (handle_qxfer_auxv, handle_qxfer_libraries)
4821 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4822 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4823 (handle_query): Check if there's a thread selected instead of
4824 checking whether there's any thread in the thread list.
4825 (handle_qxfer_threads, handle_qxfer_btrace)
4826 (handle_qxfer_btrace_conf): Don't error out early if there's no
4827 thread in the thread list.
4828 (handle_v_cont, myresume): Don't set the current thread to the
4829 continue thread.
4830 (process_serial_event) <Hg handling>: Also set thread_id if the
4831 previous general thread is still alive.
4832 (process_serial_event) <g/G handling>: If setting the current
4833 thread to the general thread fails, error out.
4834 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4835 thread's lwp instead of the current thread's.
4836 * target.c (set_desired_thread): If the desired thread was not
4837 found, leave the current thread pointing to NULL. Return an int
4838 (boolean) indicating success.
4839 * target.h (set_desired_thread): Change return type to int.
4840
40045d91
MF
48412015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4842
4843 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4844 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4845 #includes.
4846 (ps_get_thread_area): New function.
4847
45face3b
GB
48482015-08-19 Gary Benson <gbenson@redhat.com>
4849
4850 * hostio.c (handle_pread): Do not attempt to read more data
4851 than hostio_reply_with_data can fit in a packet.
4852
16d5f642
JB
48532015-08-18 Joel Brobecker <brobecker@adacore.com>
4854
4855 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4856
a738da3a
MF
48572015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4858
4859 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4860
33ebda9d
PA
48612015-08-06 Pedro Alves <palves@redhat.com>
4862
4863 * tracepoint.c (expr_eval_result): Now an int.
4864
a44892be
PA
48652015-08-06 Pedro Alves <palves@redhat.com>
4866
4867 * gdbthread.h (struct regcache): Forward declare.
4868 (struct thread_info) <regcache_data>: Now a struct regcache
4869 pointer.
4870 * inferiors.c (inferior_regcache_data)
4871 (set_inferior_regcache_data): Now work with struct regcache
4872 pointers.
4873 * inferiors.h (struct regcache): Forward declare.
4874 (inferior_regcache_data, set_inferior_regcache_data): Now work
4875 with struct regcache pointers.
4876 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4877 (free_register_cache_thread): Remove struct regcache pointer
4878 casts.
4879
608a1e46
PA
48802015-08-06 Pedro Alves <palves@redhat.com>
4881
4882 * server.c (captured_main): On error, print the exception message
4883 to stderr, and if run_once is set, throw a quit.
4884
f0ce0d3a
PA
48852015-08-06 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4888 the current thread.
4889
bf47e248
PA
48902015-08-06 Pedro Alves <palves@redhat.com>
4891
4892 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4893 reading beyond the passed in buffer length.
4894
b6b9ffcc
PL
48952015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4896
4897 * tracepoint.c (symbol_list) <required>: Remove.
4898
863d01bd
PA
48992015-08-06 Pedro Alves <palves@redhat.com>
4900
4901 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4902 count if stopping and suspending threads.
4903 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4904 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4905 (linux_detach): Complete an ongoing step-over.
4906 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4907 throughout.
4908 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4909 (linux_wait_1): If passing a signal to the inferior after
4910 finishing a step-over, unsuspend and re-resume all lwps. If we
4911 see a single-step event but the thread should be continuing, don't
4912 pass the trap to gdb.
4913 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4914 internal_error instead of gdb_assert.
4915 (enqueue_pending_signal): New function.
4916 (check_ptrace_stopped_lwp_gone): Add debug output.
4917 (start_step_over): Use internal_error instead of gdb_assert.
4918 (complete_ongoing_step_over): New function.
4919 (linux_resume_one_thread): Don't resume a suspended thread.
4920 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4921 it stepping.
4922
00db26fa
PA
49232015-08-06 Pedro Alves <palves@redhat.com>
4924
4925 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4926 (linux_thread_alive): Use lwp_is_marked_dead.
4927 (extended_event_reported): Delete.
4928 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4929 instead of extended_event_reported.
4930 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4931 as well.
4932 (lwp_is_marked_dead): New function.
4933 (lwp_running): Use lwp_is_marked_dead.
4934 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4935 comment.
4936
ad071a30
PA
49372015-08-06 Pedro Alves <palves@redhat.com>
4938
4939 * linux-low.c (linux_wait_1): Move fork event output out of the
4940 !report_to_gdb check. Pass event_child->waitstatus to
4941 target_waitstatus_to_string instead of ourstatus.
4942
524b57e6
YQ
49432015-08-04 Yao Qi <yao.qi@linaro.org>
4944
4945 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4946 if current_thread is 32 bit.
4947
6085d6f6
YQ
49482015-08-04 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4951 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4952 * server.c (extended_protocol): Remove "static".
4953 * server.h (extended_protocol): Declare it.
4954
8a7e4587
YQ
49552015-08-04 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4958 both aarch64 and aarch32.
4959 (aarch64_set_pc): Likewise.
4960
3b53ae99
YQ
49612015-08-04 Yao Qi <yao.qi@linaro.org>
4962
4963 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4964 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4965 arm-with-neon.xml to srv_xmlfiles.
4966 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4967 (is_64bit_tdesc): New function.
4968 (aarch64_linux_read_description): New function.
4969 (aarch64_arch_setup): Call aarch64_linux_read_description.
4970 (regs_info): Rename to regs_info_aarch64.
4971 (aarch64_regs_info): Return right regs_info.
4972 (initialize_low_arch): Call initialize_low_arch_aarch32.
4973
bd9e6534
YQ
49742015-08-04 Yao Qi <yao.qi@linaro.org>
4975
4976 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4977 * linux-aarch32-low.c: New file.
4978 * linux-aarch32-low.h: New file.
4979 * linux-arm-low.c (arm_fill_gregset): Move it to
4980 linux-aarch32-low.c.
4981 (arm_store_gregset): Likewise.
4982 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4983 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4984 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4985 (regs_info): Rename to regs_info_arm.
4986 (arm_regs_info): Return regs_info_aarch32 if
4987 have_ptrace_getregset is 1 and target description is
4988 arm_with_neon or arm_with_vfpv3.
4989 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4990 Call initialize_low_arch_aarch32 instead.
4991
ded48a5e
YQ
49922015-08-04 Yao Qi <yao.qi@linaro.org>
4993
4994 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4995 * linux-low.c: ... here.
4996 * linux-low.h (have_ptrace_getregset): Declare it.
4997
96e9210f
PA
49982015-08-04 Pedro Alves <palves@redhat.com>
4999
5000 * thread-db.c (struct thread_db): Use new typedefs.
5001 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5002 CHK calls.
5003 (disable_thread_event_reporting): Cast result of dlsym to
5004 destination function pointer type.
5005 (thread_db_mourn): Use td_ta_delete_ftype.
5006
af60a1ef
SL
50072015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5008
5009 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5010 arch variant.
5011 (CDX_BREAKPOINT): Define for R2.
5012 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5013 (the_low_target): Add comments.
5014
e8b41681
YQ
50152015-07-30 Yao Qi <yao.qi@linaro.org>
5016
5017 * linux-arm-low.c (arm_hwcap): Remove it.
5018 (arm_read_description): New local variable arm_hwcap. Don't
5019 set arm_hwcap to zero.
5020
89abb039
YQ
50212015-07-30 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5024 Use regcache->tdesc instead.
5025 (arm_store_wmmxregset): Likewise.
5026 (arm_fill_vfpregset): Likewise.
5027 (arm_store_vfpregset): Likewise.
5028
deca266c
YQ
50292015-07-30 Yao Qi <yao.qi@linaro.org>
5030
5031 * linux-arm-low.c: Include arch/arm.h.
5032 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5033 (arm_store_gregset): Likewise.
5034
aa58a496
SM
50352015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5036
5037 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5038 ptrace's 4th parameter.
5039
50904b25
YQ
50402015-07-27 Yao Qi <yao.qi@linaro.org>
5041
5042 * configure.srv (case aarch64*-*-linux*): Don't set
5043 srv_linux_usrregs.
5044
5826e159
PA
50452015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5046
5047 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5048 sys/ptrace.h.
5049 * linux-arm-low.c: Likewise.
5050 * linux-cris-low.c: Likewise.
5051 * linux-crisv32-low.c: Likewise.
5052 * linux-low.c: Likewise.
5053 * linux-m68k-low.c: Likewise.
5054 * linux-mips-low.c: Likewise.
5055 * linux-nios2-low.c: Likewise.
5056 * linux-s390-low.c: Likewise.
5057 * linux-sparc-low.c: Likewise.
5058 * linux-tic6x-low.c: Likewise.
5059 * linux-tile-low.c: Likewise.
5060 * linux-x86-low.c: Likewise.
5061
54019719
PA
50622015-07-24 Pedro Alves <palves@redhat.com>
5063
5064 * config.in: Regenerate.
5065 * configure: Regenerate.
5066
eb7aa561
PA
50672015-07-24 Pedro Alves <palves@redhat.com>
5068
5069 * acinclude.m4: Include ../ptrace.m4.
5070 * configure.ac: Call GDB_AC_PTRACE.
5071 * config.in, configure: Regenerate.
5072
55d7b841
YQ
50732015-07-24 Yao Qi <yao.qi@linaro.org>
5074
5075 * linux-low.c (linux_create_inferior): Remove setting to
5076 proc->priv->new_inferior.
5077 (linux_attach): Likewise.
5078 (linux_low_filter_event): Likewise.
5079 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5080
c06cbd92
YQ
50812015-07-24 Yao Qi <yao.qi@linaro.org>
5082
5083 * linux-low.c (linux_arch_setup): New function.
5084 (linux_low_filter_event): If proc->tdesc is NULL and
5085 proc->attached is true, call the_low_target.arch_setup.
5086 Otherwise, keep status pending, and return.
5087 (linux_resume_one_lwp_throw): Don't call get_pc if
5088 thread->while_stepping isn't NULL. Don't call
5089 get_thread_regcache if proc->tdesc is NULL.
5090 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5091 (linux_target_ops): Install arch_setup.
5092 * server.c (start_inferior): Call the_target->arch_setup.
5093 * target.h (struct target_ops) <arch_setup>: New field.
5094 (target_arch_setup): New marco.
5095 * lynx-low.c (lynx_target_ops): Update.
5096 * nto-low.c (nto_target_ops): Update.
5097 * spu-low.c (spu_target_ops): Update.
5098 * win32-low.c (win32_target_ops): Update.
5099
5ae3ebba
YQ
51002015-07-24 Yao Qi <yao.qi@linaro.org>
5101
5102 * linux-low.c (linux_add_process): Don't set
5103 proc->priv->new_inferior.
5104 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5105 (linux_attach): Likewise.
5106
eb97750b
YQ
51072015-07-24 Yao Qi <yao.qi@linaro.org>
5108
5109 * server.c (start_inferior): Code refactor.
5110
51aee833
YQ
51112015-07-24 Yao Qi <yao.qi@linaro.org>
5112
5113 * server.c (process_serial_event): Set general_thread.
5114
af1b22f3
YQ
51152015-07-21 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5118 aarch64_linux_get_debug_reg_capacity.
5119
554717a3
YQ
51202015-07-17 Yao Qi <yao.qi@linaro.org>
5121
5122 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5123 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5124 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5125 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5126 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5127 (AARCH64_HWP_ALIGNMENT): Likewise.
5128 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5129 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5130 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5131 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5132 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5133 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5134 (struct aarch64_debug_reg_state): Likewise.
5135 (struct arch_lwp_info): Likewise.
5136 (aarch64_align_watchpoint): Likewise.
5137 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5138 (aarch64_watchpoint_length): Likewise.
5139 (aarch64_point_encode_ctrl_reg): Likewise
5140 (aarch64_point_is_aligned): Likewise.
5141 (aarch64_align_watchpoint): Likewise.
5142 (aarch64_linux_set_debug_regs):
5143 (aarch64_dr_state_insert_one_point): Likewise.
5144 (aarch64_dr_state_remove_one_point): Likewise.
5145 (aarch64_handle_breakpoint): Likewise.
5146 (aarch64_handle_aligned_watchpoint): Likewise.
5147 (aarch64_handle_unaligned_watchpoint): Likewise.
5148 (aarch64_handle_watchpoint): Likewise.
5149
c67ca4de
YQ
51502015-07-17 Yao Qi <yao.qi@linaro.org>
5151
5152 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5153 and don't aarch64_get_debug_reg_state. All callers update.
5154 (aarch64_handle_aligned_watchpoint): Likewise.
5155 (aarch64_handle_unaligned_watchpoint): Likewise.
5156 (aarch64_handle_watchpoint): Likewise.
5157 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5158 (aarch64_remove_point): Likewise.
5159
25abf979
YQ
51602015-07-17 Yao Qi <yao.qi@linaro.org>
5161
5162 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5163 debug_printf.
5164 (aarch64_handle_unaligned_watchpoint): Likewise.
5165
db1ff28b
JK
51662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5167
5168 Revert the previous 3 commits:
5169 Move gdb_regex* to common/
5170 Move linux_find_memory_regions_full & co.
5171 gdbserver build-id attribute generator
5172
700ca40f
JK
51732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5174 Jan Kratochvil <jan.kratochvil@redhat.com>
5175
5176 gdbserver build-id attribute generator.
5177 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5178 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5179 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5180 (find_phdr): New.
5181 (get_dynamic): Use find_pdhr to traverse program headers.
5182 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5183 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5184 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5185 (get_hex_build_id): New.
5186 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5187 to reply XML document.
5188
9904185c
JK
51892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5190 Jan Kratochvil <jan.kratochvil@redhat.com>
5191
5192 * target.c: Include target/target-utils.h and fcntl.h.
5193 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5194 (target_fileio_read_stralloc): New functions.
5195
6e5b4429
JK
51962015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5197
5198 * Makefile.in (OBS): Add gdb_regex.o.
5199 (gdb_regex.o): New.
5200 * config.in: Rebuilt.
5201 * configure: Rebuilt.
5202
ddc98fbf
JK
52032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5204 Jan Kratochvil <jan.kratochvil@redhat.com>
5205
5206 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5207 * Makefile.in (OBS): Add target-utils.o.
5208 (linux-maps.o, target-utils.o): New.
5209 * configure.srv (srv_linux_obj): Add linux-maps.o.
5210
e57bb7a0
PL
52112015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5212
5213 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5214 function, return 1.
5215 (the_low_target): Install it.
5216
586b02a9
PA
52172015-07-14 Pedro Alves <palves@redhat.com>
5218
5219 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5220 Instead, ignore ECHILD, and throw an error for other errnos.
5221
58c1b36c
PA
52222015-07-10 Pedro Alves <palves@redhat.com>
5223
5224 * event-loop.c (struct callback_event) <data>: Change type to
5225 gdb_client_data instance instead of gdb_client_data pointer.
5226 (append_callback_event): Adjust.
5227
421530db
PL
52282015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5229
5230 * linux-aarch64-low.c: Add comments for each linux_target_ops
5231 method. Remove comments already covered in target_ops and
5232 linux_target_ops definitions.
5233 (the_low_target): Add comments for each unimplemented method.
5234
c2d65f38
YQ
52352015-07-09 Yao Qi <yao.qi@linaro.org>
5236
5237 * linux-aarch64-low.c (aarch64_regmap): Remove.
5238 (aarch64_usrregs_info): Remove.
5239 (regs_info): Set field usrregs to NULL.
5240
b20a6524
MM
52412015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5242
5243 * linux-low.c: Include "rsp-low.h"
5244 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5245 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5246 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5247 (handle_btrace_enable_pt): New.
5248 (handle_btrace_general_set): Support "pt".
5249 (handle_btrace_conf_general_set): Support "pt:size".
5250
96c97461
PL
52512015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5252
5253 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5254 Z_PACKET_SW_BP.
5255
37d66942
PL
52562015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5257
5258 * linux-aarch64-low.c: Remove comment about endianness.
5259 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5260 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5261 memcmp.
5262
dc06243f
GB
52632015-06-24 Gary Benson <gbenson@redhat.com>
5264
5265 * linux-i386-ipa.c (stdint.h): Do not include.
5266 * lynx-i386-low.c (stdint.h): Likewise.
5267 * lynx-ppc-low.c (stdint.h): Likewise.
5268 * mem-break.c (stdint.h): Likewise.
5269 * thread-db.c (stdint.h): Likewise.
5270 * tracepoint.c (stdint.h): Likewise.
5271 * win32-low.c (stdint.h): Likewise.
5272
124e13d9
SM
52732015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * server.c (write_qxfer_response): Update call to
5276 remote_escape_output.
5277
909c2cda
JK
52782015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5279 Jan Kratochvil <jan.kratochvil@redhat.com>
5280
5281 Merge multiple hex conversions.
5282 * gdbreplay.c (tohex): Rename to 'fromhex'.
5283 (logchar): Use fromhex.
5284
24c05f46
JK
52852015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5286
5287 * server.c (handle_qxfer_libraries): Set `version' attribute for
5288 <library-list>.
5289
14d2069a
GB
52902015-06-10 Gary Benson <gbenson@redhat.com>
5291
5292 * target.h (struct target_ops) <multifs_open>: New field.
5293 <multifs_unlink>: Likewise.
5294 <multifs_readlink>: Likewise.
5295 * linux-low.c (nat/linux-namespaces.h): New include.
5296 (linux_target_ops): Initialize the_target->multifs_open,
5297 the_target->multifs_unlink and the_target->multifs_readlink.
5298 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5299 * hostio.c (hostio_fs_pid): New static variable.
5300 (hostio_handle_new_gdb_connection): New function.
5301 (handle_setfs): Likewise.
5302 (handle_open): Use the_target->multifs_open as appropriate.
5303 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5304 (handle_readlink): Use the_target->multifs_readlink as
5305 appropriate.
5306 (handle_vFile): Handle vFile:setfs packets.
5307 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5308 after target_handle_new_gdb_connection.
5309
4b8b5e72
GB
53102015-06-10 Gary Benson <gbenson@redhat.com>
5311
5312 * configure.ac (AC_CHECK_FUNCS): Add setns.
5313 * config.in: Regenerate.
5314 * configure: Likewise.
5315 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5316 (linux-namespaces.o): New rule.
5317 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5318
3ac2e371
GB
53192015-06-09 Gary Benson <gbenson@redhat.com>
5320
5321 * hostio.c (handle_open): Process mode argument with
5322 fileio_to_host_mode.
5323
ca9b78ce
YQ
53242015-06-01 Yao Qi <yao.qi@linaro.org>
5325
5326 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5327 * linux-x86-low.c: Likewise.
5328
bfacd19d
DB
53292015-05-28 Don Breazeal <donb@codesourcery.com>
5330
5331 * linux-low.c (handle_extended_wait): Initialize
5332 thread_info.last_resume_kind for new fork children.
5333
452003ef
PA
53342015-05-15 Pedro Alves <palves@redhat.com>
5335
5336 * target.h (target_handle_new_gdb_connection): Rewrite using if
5337 wrapped in do/while.
5338
1041a03c
JB
53392015-05-14 Joel Brobecker <brobecker@adacore.com>
5340
5341 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5342 * configure, config.in: Regenerate.
5343 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5344 Declare typedef.
5345
c269dbdb
DB
53462015-05-12 Don Breazeal <donb@codesourcery.com>
5347
5348 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5349 PTRACE_EVENT_VFORK_DONE.
5350 (linux_low_ptrace_options, extended_event_reported): Add vfork
5351 events.
5352 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5353 and "vforkdone" for RSP 'T' Stop Reply Packet.
5354 * server.h (report_vfork_events): Declare
5355 global variable.
5356
3a8a0396
DB
53572015-05-12 Don Breazeal <donb@codesourcery.com>
5358
5359 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5360 (the_low_target) <new_fork>: Initialize new member.
5361 * linux-arm-low.c (arm_new_fork): New function.
5362 (the_low_target) <new_fork>: Initialize new member.
5363 * linux-low.c (handle_extended_wait): Call new target function
5364 new_fork.
5365 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5366 * linux-mips-low.c (mips_add_watchpoint): New function
5367 extracted from mips_insert_point.
5368 (the_low_target) <new_fork>: Initialize new member.
5369 (mips_linux_new_fork): New function.
5370 (mips_insert_point): Call mips_add_watchpoint.
5371 * linux-x86-low.c (x86_linux_new_fork): New function.
5372 (the_low_target) <new_fork>: Initialize new member.
5373
de0d863e
DB
53742015-05-12 Don Breazeal <donb@codesourcery.com>
5375
5376 * linux-low.c (handle_extended_wait): Implement return value,
5377 rename argument 'event_child' to 'event_lwp', handle
5378 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5379 (linux_low_ptrace_options): New function.
5380 (linux_low_filter_event): Call linux_low_ptrace_options,
5381 use different argument fo linux_enable_event_reporting,
5382 use return value from handle_extended_wait.
5383 (extended_event_reported): New function.
5384 (linux_wait_1): Call extended_event_reported and set
5385 status to report fork events.
5386 (linux_write_memory): Add pid to debug message.
5387 (reset_lwp_ptrace_options_callback): New function.
5388 (linux_handle_new_gdb_connection): New function.
5389 (linux_target_ops): Initialize new structure member.
5390 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5391 * lynx-low.c: Initialize new structure member.
5392 * remote-utils.c (prepare_resume_reply): Implement stop reason
5393 "fork" for "T" stop message.
5394 * server.c (handle_query): Call handle_new_gdb_connection.
5395 * server.h (report_fork_events): Declare global flag.
5396 * target.h (struct target_ops) <handle_new_gdb_connection>:
5397 New member.
5398 (target_handle_new_gdb_connection): New macro.
5399 * win32-low.c: Initialize new structure member.
5400
ddcbc397
DB
54012015-05-12 Don Breazeal <donb@codesourcery.com>
5402
5403 * mem-break.c (APPEND_TO_LIST): Define macro.
5404 (clone_agent_expr): New function.
5405 (clone_one_breakpoint): New function.
5406 (clone_all_breakpoints): New function.
5407 * mem-break.h: Declare new functions.
5408
89245bc0
DB
54092015-05-12 Don Breazeal <donb@codesourcery.com>
5410
5411 * linux-low.c (linux_supports_fork_events): New function.
5412 (linux_supports_vfork_events): New function.
5413 (linux_target_ops): Initialize new structure members.
5414 (initialize_low): Call linux_check_ptrace_features.
5415 * lynx-low.c (lynx_target_ops): Initialize new structure
5416 members.
5417 * server.c (report_fork_events, report_vfork_events):
5418 New global flags.
5419 (handle_query): Add new features to qSupported packet and
5420 response.
5421 (captured_main): Initialize new global variables.
5422 * target.h (struct target_ops) <supports_fork_events>:
5423 New member.
5424 <supports_vfork_events>: New member.
5425 (target_supports_fork_events): New macro.
5426 (target_supports_vfork_events): New macro.
5427 * win32-low.c (win32_target_ops): Initialize new structure
5428 members.
5429
835205d0
GB
54302015-05-12 Gary Benson <gbenson@redhat.com>
5431
5432 * server.c (handle_qxfer_exec_file): Use current process
5433 if annex is empty.
5434
21e94bd9
SL
54352015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5436
5437 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5438 Remove HAVE_PTRACE_GETREGS conditionals.
5439 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5440 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5441
45614f15
YQ
54422015-05-08 Yao Qi <yao.qi@linaro.org>
5443
5444 * linux-low.c (linux_supports_conditional_breakpoints): New
5445 function.
5446 (linux_target_ops): Install new target method.
5447 * lynx-low.c (lynx_target_ops): Install NULL hook for
5448 supports_conditional_breakpoints.
5449 * nto-low.c (nto_target_ops): Likewise.
5450 * spu-low.c (spu_target_ops): Likewise.
5451 * win32-low.c (win32_target_ops): Likewise.
5452 * server.c (handle_query): Check
5453 target_supports_conditional_breakpoints.
5454 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5455 New field.
5456 (target_supports_conditional_breakpoints): New macro.
5457
80ad801e
PA
54582015-05-06 Pedro Alves <palves@redhat.com>
5459
5460 PR server/18081
5461 * server.c (start_inferior): If the process exits, mourn it.
5462
819843c7
GB
54632015-04-21 Gary Benson <gbenson@redhat.com>
5464
5465 * hostio.c (fileio_open_flags_to_host): Factored out to
5466 fileio_to_host_openflags in common/fileio.c. Single use
5467 updated.
5468
a2d5a9d7
MF
54692015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5470
5471 * linux-xtensa-low.c (xtensa_fill_gregset)
5472 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5473 XCHAL_HAVE_LOOP.
5474
deb44829
MF
54752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5476
5477 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5478 (regs_info): Replace usrregs pointer with NULL.
5479
e57f1de3
GB
54802015-04-17 Gary Benson <gbenson@redhat.com>
5481
5482 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5483 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5484 * server.c (handle_qxfer_exec_file): New function.
5485 (qxfer_packets): Add exec-file entry.
5486 (handle_query): Report qXfer:exec-file:read as supported packet.
5487
62828379
RN
54882015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5489
5490 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5491
b88bb450
GB
54922015-04-09 Gary Benson <gbenson@redhat.com>
5493
5494 * hostio-errno.c (errno_to_fileio_error): Remove function.
5495 Update caller to use remote_fileio_to_fio_error.
5496
c8f4bfdd
YQ
54972015-04-09 Yao Qi <yao.qi@linaro.org>
5498
5499 * linux-low.c (linux_insert_point): Call
5500 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5501 (linux_remove_point): Call remove_memory_breakpoint if type is
5502 raw_bkpt_type_sw.
5503 * linux-x86-low.c (x86_insert_point): Don't call
5504 insert_memory_breakpoint.
5505 (x86_remove_point): Don't call remove_memory_breakpoint.
5506
41f98f02
PA
55072015-04-01 Pedro Alves <palves@redhat.com>
5508 Cleber Rosa <crosa@redhat.com>
5509
5510 * server.c (gdbserver_usage): Reorganize and extend the usage
5511 message.
5512
2bf6fb9d
PA
55132015-03-24 Pedro Alves <palves@redhat.com>
5514
5515 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5516 output. Also dump TRAP_TRACE.
5517 (linux_low_filter_event): In debug output, distinguish a
5518 resume_stop SIGSTOP from a delayed SIGSTOP.
5519
369f6daa
GB
55202015-03-24 Gary Benson <gbenson@redhat.com>
5521
5522 * linux-x86-low.c (x86_linux_new_thread): Moved to
5523 nat/x86-linux.c.
5524 (x86_linux_prepare_to_resume): Likewise.
5525
8e5d4070
GB
55262015-03-24 Gary Benson <gbenson@redhat.com>
5527
5528 * Makefile.in (x86-linux-dregs.o): New rule.
5529 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5530 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5531 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5532 (x86_linux_dr_get): Likewise.
5533 (x86_linux_dr_set): Likewise.
5534 (update_debug_registers_callback): Likewise.
5535 (x86_linux_dr_set_addr): Likewise.
5536 (x86_linux_dr_get_addr): Likewise.
5537 (x86_linux_dr_set_control): Likewise.
5538 (x86_linux_dr_get_control): Likewise.
5539 (x86_linux_dr_get_status): Likewise.
5540 (x86_linux_update_debug_registers): Likewise.
5541
2b95d440
GB
55422015-03-24 Gary Benson <gbenson@redhat.com>
5543
5544 * linux-x86-low.c (x86_linux_update_debug_registers):
5545 New function, factored out from...
5546 (x86_linux_prepare_to_resume): ...this.
5547
14b0bc68
GB
55482015-03-24 Gary Benson <gbenson@redhat.com>
5549
5550 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5551 (x86_linux_dr_set): Likewise.
5552 (update_debug_registers_callback): Likewise.
5553 (x86_linux_dr_set_addr): Likewise.
5554 (x86_linux_dr_get_addr): Likewise.
5555 (x86_linux_dr_set_control): Likewise.
5556 (x86_linux_dr_get_control): Likewise.
5557 (x86_linux_dr_get_status): Likewise.
5558 (x86_linux_prepare_to_resume): Likewise.
5559
5dfe6ca8
GB
55602015-03-24 Gary Benson <gbenson@redhat.com>
5561
5562 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5563 Use perror_with_name. Pass string through gettext.
5564 (x86_linux_dr_set): Likewise.
5565
d33472ad
GB
55662015-03-24 Gary Benson <gbenson@redhat.com>
5567
5568 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5569 (x86_linux_dr_set_addr): ...this.
5570 (x86_dr_low_get_addr): Rename to...
5571 (x86_linux_dr_get_addr): ...this.
5572 (x86_dr_low_set_control): Rename to...
5573 (x86_linux_dr_set_control): ...this.
5574 (x86_dr_low_get_control): Rename to...
5575 (x86_linux_dr_get_control): ...this.
5576 (x86_dr_low_get_status): Rename to...
5577 (x86_linux_dr_get_status): ...this.
5578 (x86_dr_low): Update with new function names.
5579
4b134ca1
GB
55802015-03-24 Gary Benson <gbenson@redhat.com>
5581
5582 * Makefile.in (x86-linux.o): New rule.
5583 * configure.srv: Add x86-linux.o to relevant targets.
5584 * linux-low.c (lwp_set_arch_private_info): New function.
5585 (lwp_arch_private_info): Likewise.
5586 * linux-x86-low.c: Include nat/x86-linux.h.
5587 (arch_lwp_info): Removed structure.
5588 (update_debug_registers_callback):
5589 Use lwp_set_debug_registers_changed.
5590 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5591 and lwp_set_debug_registers_changed.
5592 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5593
34c703da
GB
55942015-03-24 Gary Benson <gbenson@redhat.com>
5595
5596 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5597 * linux-arm-low.c (arm_new_thread): Likewise.
5598 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5599 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5600 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5601 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5602
cff068da
GB
56032015-03-24 Gary Benson <gbenson@redhat.com>
5604
5605 * linux-low.c (ptid_of_lwp): New function.
5606 (lwp_is_stopped): Likewise.
5607 (lwp_stop_reason): Likewise.
5608 * linux-x86-low.c (update_debug_registers_callback):
5609 Use lwp_is_stopped.
5610 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5611 lwp_stop_reason.
5612
b2f7c7e8
GB
56132015-03-24 Gary Benson <gbenson@redhat.com>
5614
5615 * linux-low.h (linux_stop_lwp): Remove declaration.
5616
6d4ee8c6
GB
56172015-03-24 Gary Benson <gbenson@redhat.com>
5618
5619 * linux-low.h: Include nat/linux-nat.h.
5620 * linux-low.c (iterate_over_lwps_args): New structure.
5621 (iterate_over_lwps_filter): New function.
5622 (iterate_over_lwps): Likewise.
5623 * linux-x86-low.c (update_debug_registers_callback):
5624 Update signature to what iterate_over_lwps expects.
5625 Remove PID check that iterate_over_lwps now performs.
5626 (x86_dr_low_set_addr): Use iterate_over_lwps.
5627 (x86_dr_low_set_control): Likewise.
5628
70a0bb6b
GB
56292015-03-24 Gary Benson <gbenson@redhat.com>
5630
5631 * linux-x86-low.c (x86_debug_reg_state): New function.
5632 (x86_linux_prepare_to_resume): Use the above.
5633
7b669087
GB
56342015-03-24 Gary Benson <gbenson@redhat.com>
5635
5636 * linux-low.c (current_lwp_ptid): New function.
5637 * linux-x86-low.c: Include nat/linux-nat.h.
5638 (x86_dr_low_get_addr): Use current_lwp_ptid.
5639 (x86_dr_low_get_control): Likewise.
5640 (x86_dr_low_get_status): Likewise.
5641
eef49a3d
PA
56422015-03-20 Pedro Alves <palves@redhat.com>
5643
5644 * tracepoint.c (cmd_qtstatus): Make "str" const.
5645
b2333d22
PA
56462015-03-20 Pedro Alves <palves@redhat.com>
5647
5648 * server.c (handle_general_set): Make "req_str" const.
5649
23f238d3
PA
56502015-03-19 Pedro Alves <palves@redhat.com>
5651
5652 * linux-low.c (linux_resume_one_lwp): Rename to ...
5653 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5654 instead call perror_with_name.
5655 (check_ptrace_stopped_lwp_gone): New function.
5656 (linux_resume_one_lwp): Reimplement as wrapper around
5657 linux_resume_one_lwp_throw that swallows errors if the LWP is
5658 gone.
5659
91baf43f
PA
56602015-03-19 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (count_events_callback, select_event_lwp_callback):
5663 No longer check whether the thread has resume_stop as last resume
5664 kind.
5665
8bf3b159
PA
56662015-03-19 Pedro Alves <palves@redhat.com>
5667
5668 * linux-low.c (count_events_callback, select_event_lwp_callback):
5669 Use the lwp's status_pending_p field, not the thread's.
5670
b90fc188
PA
56712015-03-19 Pedro Alves <palves@redhat.com>
5672
5673 * linux-low.c (select_event_lwp_callback): Update comments to
5674 no longer mention SIGTRAP.
5675
464b0089
GB
56762015-03-18 Gary Benson <gbenson@redhat.com>
5677
5678 * server.c (handle_query): Do not report vFile:fstat as supported.
5679
aa9e327f
GB
56802015-03-11 Gary Benson <gbenson@redhat.com>
5681
5682 * hostio.c (sys/types.h): New include.
5683 (sys/stat.h): Likewise.
5684 (common-remote-fileio.h): Likewise.
5685 (handle_fstat): New function.
5686 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5687
791c0056
GB
56882015-03-11 Gary Benson <gbenson@redhat.com>
5689
5690 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5691 struct stat.st_blocks and struct stat.st_blksize.
5692 * configure: Regenerate.
5693 * config.in: Likewise.
5694 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5695 (OBS): Add common-remote-fileio.o.
5696 (common-remote-fileio.o): New rule.
5697
9a9df970
PA
56982015-03-09 Pedro Alves <palves@redhat.com>
5699
5700 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5701 'struct sockaddr' pointer in 'accept' call.
5702
9eb1356e
PA
57032015-03-09 Pedro Alves <palves@redhat.com>
5704
5705 Revert:
5706 2015-03-07 Pedro Alves <palves@redhat.com>
5707 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5708 or <winsock2.h> here. Instead include "gdb_socket.h".
5709 (remote_open): Use union gdb_sockaddr_u.
5710 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5711 or <winsock2.h> here. Instead include "gdb_socket.h".
5712 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5713 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5714 or <sys/un.h>.
5715 (init_named_socket, gdb_agent_helper_thread): Use union
5716 gdb_sockaddr_u.
5717
aac331e4
PA
57182015-03-07 Pedro Alves <palves@redhat.com>
5719
5720 * configure.ac (build_warnings): Move
5721 -Wdeclaration-after-statement to the C-specific set.
5722 * configure: Regenerate.
5723
366c75fc
PA
57242015-03-07 Pedro Alves <palves@redhat.com>
5725
5726 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5727 or <winsock2.h> here. Instead include "gdb_socket.h".
5728 (remote_open): Use union gdb_sockaddr_u.
5729 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5730 or <winsock2.h> here. Instead include "gdb_socket.h".
5731 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5732 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5733 or <sys/un.h>.
5734 (init_named_socket, gdb_agent_helper_thread): Use union
5735 gdb_sockaddr_u.
5736
492d29ea
PA
57372015-03-07 Pedro Alves <palves@redhat.com>
5738
5739 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5740 instead.
5741
60a191ed
YQ
57422015-03-06 Yao Qi <yao.qi@linaro.org>
5743
5744 * linux-aarch64-low.c (aarch64_insert_point): Use
5745 show_debug_regs as a boolean.
5746 (aarch64_remove_point): Likewise.
5747
f5771b1d
PA
57482015-03-05 Pedro Alves <palves@redhat.com>
5749
5750 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5751 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5752 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5753 * nto-low.c (nto_target_ops): Likewise.
5754 * spu-low.c (spu_target_ops): Likewise.
5755 * win32-low.c (win32_target_ops): Likewise.
5756
3e572f71
PA
57572015-03-04 Pedro Alves <palves@redhat.com>
5758
72f4393d 5759 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5760 Decide whether a breakpoint triggered based on the SIGTRAP's
5761 siginfo.si_code.
72f4393d
L
5762 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5763 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5764 (linux_low_filter_event): Check for breakpoints before checking
5765 watchpoints.
5766 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5767 siginfo.si_code.
72f4393d
L
5768 (linux_stopped_by_sw_breakpoint)
5769 (linux_supports_stopped_by_sw_breakpoint)
5770 (linux_stopped_by_hw_breakpoint)
5771 (linux_supports_stopped_by_hw_breakpoint): New functions.
5772 (linux_target_ops): Install new target methods.
3e572f71 5773
1ec68e26
PA
57742015-03-04 Pedro Alves <palves@redhat.com>
5775
5776 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5777 * server.c (swbreak_feature, hwbreak_feature): New globals.
5778 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5779 (captured_main): Clear swbreak_feature and hwbreak_feature.
5780 * server.h (swbreak_feature, hwbreak_feature): Declare.
5781 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5782 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5783 supports_stopped_by_hw_breakpoint>: New fields.
5784 (target_supports_stopped_by_sw_breakpoint)
5785 (target_stopped_by_sw_breakpoint)
5786 (target_supports_stopped_by_hw_breakpoint)
5787 (target_stopped_by_hw_breakpoint): Declare.
5788
15c66dd6
PA
57892015-03-04 Pedro Alves <palves@redhat.com>
5790
5791 enum lwp_stop_reason -> enum target_stop_reason
5792 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5793 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5794 (linux_wait_1, stuck_in_jump_pad_callback)
5795 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5796 (linux_stopped_by_watchpoint):
5797 * linux-low.h (enum lwp_stop_reason): Delete.
5798 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5799 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5800
98fc70d6
YQ
58012015-03-04 Yao Qi <yao.qi@linaro.org>
5802
5803 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5804
dd2ac174
GB
58052015-03-03 Gary Benson <gbenson@redhat.com>
5806
5807 * hostio.c (handle_vFile): Fix prefix lengths.
5808
d68e53f4
MM
58092015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5810
5811 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5812 ptr_bits.
5813
bf2d68ab
AA
58142015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5815
5816 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5817 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5818 (clean): Add "rm -f" for above C files.
5819 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5820 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5821 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5822 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5823 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5824 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5825 (init_registers_s390x_vx_linux64)
5826 (init_registers_s390x_tevx_linux64)
5827 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5828 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5829 declarations.
5830 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5831 (s390_store_vxrs_high): New functions.
5832 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5833 NT_S390_VXRS_HIGH.
5834 (s390_arch_setup): Add logic for selecting one of the new target
5835 descriptions. Activate the new vector regsets if applicable.
5836 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5837 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5838 and init_registers_s390x_tevx_linux64.
5839
c966a859
PA
58402015-03-01 Pedro Alves <palves@redhat.com>
5841
5842 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5843 parameter.
5844
4180215b
PA
58452015-02-27 Pedro Alves <palves@redhat.com>
5846
5847 * linux-x86-low.c (u_debugreg_offset): New function.
5848 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5849
749bab01
PA
58502015-02-27 Pedro Alves <palves@redhat.com>
5851
5852 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5853 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5854 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5855 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5856 (ps_lsetfpregs, ps_getpid)
5857 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5858 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5859 (ps_lsetxregs, ps_plog): Declare.
5860
3c14e5a3
PA
58612015-02-27 Pedro Alves <palves@redhat.com>
5862
5863 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5864 IP_AGENT_EXPORT_FUNC.
5865 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5866 IP_AGENT_EXPORT_FUNC.
5867 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5868 (IP_AGENT_EXPORT): Delete.
5869 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5870 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5871 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5872 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5873 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5874 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5875 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5876 (traceframe_read_count, traceframe_write_count)
5877 (traceframes_created, trace_state_variables, get_raw_reg)
5878 (get_trace_state_variable_value, set_trace_state_variable_value)
5879 (ust_loaded, helper_thread_id, cmd_buf): Use
5880 IPA_SYM_EXPORTED_NAME.
5881 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5882 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5883 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5884 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5885 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5886 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5887 EXTERN_C_PUSH/EXTERN_C_POP.
5888 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5889 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5890 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5891 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5892 (traceframe_write_count, traceframe_read_count)
5893 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5894 (about_to_request_buffer_space, get_trace_state_variable_value)
5895 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5896 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5897 EXTERN_C_PUSH/EXTERN_C_POP.
5898 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5899 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5900 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5901 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5902 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5903 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5904 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5905 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5906 Define.
5907 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5908 (IP_AGENT_EXPORT_VAR_DECL): Define.
5909 (tracing): Declare.
5910 (gdb_agent_get_raw_reg): Declare.
5911
fe978cb0
PA
59122015-02-27 Tom Tromey <tromey@redhat.com>
5913 Pedro Alves <palves@redhat.com>
5914
5915 Rename symbols whose names are reserved C++ keywords throughout.
5916
3bc3d82a
PA
59172015-02-27 Pedro Alves <palves@redhat.com>
5918
5919 * Makefile.in (COMPILER): New, get it from autoconf.
5920 (CXX): Get from autoconf instead.
5921 (COMPILE.pre): Use COMPILER.
5922 (CC-LD): Rename to ...
5923 (CC_LD): ... this. Use COMPILER.
5924 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5925 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5926 * acinclude.m4: Include build-with-cxx.m4.
5927 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5928 Disable -Werror by default if building in C++ mode.
5929 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5930 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5931 the C++ compiler. Save/restore CXXFLAGS too.
5932 * configure: Regenerate.
5933
07697489
PA
59342015-02-27 Pedro Alves <palves@redhat.com>
5935
5936 * acinclude.m4: Include libiberty.m4.
5937 * configure.ac: Call libiberty_INIT.
5938 * config.in, configure: Regenerate.
5939
9beb7c4e
PA
59402015-02-26 Pedro Alves <palves@redhat.com>
5941
5942 * linux-low.c (linux_wait_1): When incrementing the PC past a
5943 program breakpoint always use the_low_target.breakpoint_len as
5944 increment, rather than the maximum between that and
5945 the_low_target.decr_pc_after_break.
5946
8090aef2
PA
59472015-02-23 Pedro Alves <palves@redhat.com>
5948
5949 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5950 thread was doing a step-over; always adjust the PC if
5951 we stepped over a permanent breakpoint.
5952 (linux_wait_1): If we stepped over breakpoint that was on top of a
5953 permanent breakpoint, manually advance the PC past it.
5954
bc9540e8
PA
59552015-02-23 Pedro Alves <palves@redhat.com>
5956
5957 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5958 modes.
5959 (x86_fill_gregset, x86_store_gregset): Use it when handling
5960 $orig_eax.
5961
2db9a427
PA
59622015-02-20 Pedro Alves <palves@redhat.com>
5963
5964 * thread-db.c: Include "nat/linux-procfs.h".
5965 (thread_db_init): Skip listing new threads if the kernel supports
5966 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5967
afa8d396
PA
59682015-02-20 Pedro Alves <palves@redhat.com>
5969
5970 * linux-low.c (status_pending_p_callback): Use ptid_match.
5971
c9587f88
AT
59722015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5973
5974 PR breakpoints/16812
5975 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5976 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5977 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5978
b05ec7a5
AT
59792015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5980
5981 PR breakpoints/15956
5982 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5983
d33501a5
MM
59842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5985
5986 * linux-low.c (linux_low_btrace_conf): Print size.
5987 * server.c (handle_btrace_conf_general_set): New.
5988 (hanle_general_set): Call handle_btrace_conf_general_set.
5989 (handle_query): Report Qbtrace-conf:bts:size as supported.
5990
f4abbc16
MM
59912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5992
5993 * linux-low.c (linux_low_enable_btrace): Update parameters.
5994 (linux_low_btrace_conf): New.
5995 (linux_target_ops)<to_btrace_conf>: Initialize.
5996 * server.c (current_btrace_conf): New.
5997 (handle_btrace_enable): Rename to ...
5998 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5999 to target_enable_btrace. Update comment. Update users.
6000 (handle_qxfer_btrace_conf): New.
6001 (qxfer_packets): Add btrace-conf entry.
6002 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6003 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6004 (target_ops)<read_btrace_conf>: New.
6005 (target_enable_btrace): Update parameters.
6006 (target_read_btrace_conf): New.
6007
043c3577
MM
60082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6009
6010 * server.c (handle_btrace_general_set): Remove call to
6011 target_supports_btrace.
6012 (supported_btrace_packets): New.
6013 (handle_query): Call supported_btrace_packets.
6014 * target.h: include btrace-common.h.
6015 (btrace_target_info): Removed.
6016 (supports_btrace, target_supports_btrace): Update parameters.
6017
734b0e4b
MM
60182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6019
6020 * Makefile.in (SFILES): Add common/btrace-common.c.
6021 (OBS): Add common/btrace-common.o.
6022 (btrace-common.o): Add build rules.
6023 * linux-low: Include btrace-common.h.
6024 (linux_low_read_btrace): Use struct btrace_data. Call
6025 btrace_data_init and btrace_data_fini.
6026
d6c146e9
PA
60272015-02-06 Pedro Alves <palves@redhat.com>
6028
6029 * thread-db.c (find_new_threads_callback): Add debug output.
6030
20ba1ce6
PA
60312015-02-04 Pedro Alves <palves@redhat.com>
6032
6033 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6034 (resume_stopped_resumed_lwps): New function.
6035 (linux_wait_for_event_filtered): Use it.
6036
8cc73a39
SDJ
60372015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6038
6039 * Makefile.in (SFILES): Add linux-personality.c.
6040 (linux-personality.o): New rule.
6041 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6042 list of objects to be built.
6043 * linux-low.c: Include nat/linux-personality.h.
6044 (linux_create_inferior): Remove code to disable address space
6045 randomization (moved to ../nat/linux-personality.c). Create
6046 cleanup to disable address space randomization.
6047
fb23d554
SDJ
60482015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6049
6050 * Makefile.in (posix-strerror.o): New rule.
6051 (mingw-strerror.o): Likewise.
6052 * configure: Regenerated.
6053 * configure.ac: Source file ../common/common.host. Initialize new
6054 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6055
cdf43629
YQ
60562015-01-14 Yao Qi <yao@codesourcery.com>
6057
6058 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6059 (ppc-linux.o): New rule.
6060 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6061 * configure.ac: AC_CHECK_FUNCS(getauxval).
6062 * config.in: Re-generated.
6063 * configure: Re-generated.
6064 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6065 ppc64_64bit_inferior_p
6066
514c5338
YQ
60672015-01-14 Yao Qi <yao@codesourcery.com>
6068
6069 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6070 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6071 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6072 (PT_ORIG_R3, PT_TRAP): Likewise.
6073 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6074 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6075 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6076
3368c1e5
JB
60772015-01-10 Joel Brobecker <brobecker@adacore.com>
6078
6079 * i387-fp.c (i387_cache_to_xsave): In look over
6080 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6081 zmmh_low_space field by use of zmmh_high_space.
6082
582511be
PA
60832015-01-09 Pedro Alves <palves@redhat.com>
6084
6085 * linux-low.c (step_over_bkpt): Move higher up in the file.
6086 (handle_extended_wait): Don't store the stop_pc here.
6087 (get_stop_pc): Adjust comments and rename to ...
6088 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6089 stopped for a software breakpoint or hardware breakpoint.
6090 (thread_still_has_status_pending_p): New function.
6091 (status_pending_p_callback): Use
6092 thread_still_has_status_pending_p. If the event is no longer
6093 interesting, resume the LWP.
6094 (handle_tracepoints): Add assert.
6095 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6096 (wstatus_maybe_breakpoint): New function.
6097 (cancel_breakpoint): Delete function.
6098 (check_stopped_by_watchpoint): New function, factored out from
6099 linux_low_filter_event.
6100 (lp_status_maybe_breakpoint): Delete function.
6101 (linux_low_filter_event): Remove filter_ptid argument.
6102 Leave thread group exits pending here. Store the LWP's stop PC.
6103 Always leave events pending.
6104 (linux_wait_for_event_filtered): Pull all events out of the
6105 kernel, and leave them all pending.
6106 (count_events_callback, select_event_lwp_callback): Consider all
6107 events.
6108 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6109 (select_event_lwp): Only give preference to the stepping LWP in
6110 all-stop mode. Adjust comments.
6111 (ignore_event): New function.
6112 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6113 references to cancel_breakpoints. Adjust to renames. Also give
6114 equal priority to all LWPs that have had events in non-stop mode.
6115 If reporting a software breakpoint event, unadjust the LWP's PC.
6116 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6117 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6118 Adjust.
6119 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6120 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6121 (linux_stopped_by_watchpoint): Adjust.
6122 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6123 * linux-low.h (enum lwp_stop_reason): New.
6124 (struct lwp_info) <stop_pc>: Adjust comment.
6125 <stopped_by_watchpoint>: Delete field.
6126 <stop_reason>: New field.
6127 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6128 * mem-break.c (software_breakpoint_inserted_here)
6129 (hardware_breakpoint_inserted_here): New function.
6130 * mem-break.h (software_breakpoint_inserted_here)
6131 (hardware_breakpoint_inserted_here): Declare.
6132 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6133 (cancel_breakpoints): Delete.
6134 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6135 (upload_fast_traceframes): Remove references to
6136 cancel_breakpoints.
6137
a33e3959
PA
61382015-01-09 Pedro Alves <palves@redhat.com>
6139
6140 * thread-db.c (find_new_threads_callback): Ignore thread if the
6141 kernel thread ID is -1.
6142
8784d563
PA
61432015-01-09 Pedro Alves <palves@redhat.com>
6144
6145 * linux-low.c (linux_attach_fail_reason_string): Move to
6146 nat/linux-ptrace.c, and rename.
6147 (linux_attach_lwp): Update comment.
6148 (attach_proc_task_lwp_callback): New function.
6149 (linux_attach): Adjust to rename and use
6150 linux_proc_attach_tgid_threads.
6151 (linux_attach_fail_reason_string): Delete declaration.
6152
76f2b779
JB
61532015-01-01 Joel Brobecker <brobecker@adacore.com>
6154
6155 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6156 * server.c (gdbserver_version): Likewise.
6157
fafcc06a
SDJ
61582014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6159
6160 * remote-utils.c: Include ctype.h.
6161 (input_interrupt): Explicitly handle the case when the char
6162 received is the NUL byte. Improve the printing of non-ASCII
6163 characters.
6164
beed38b8
JB
61652014-12-16 Joel Brobecker <brobecker@adacore.com>
6166
6167 * linux-low.c (linux_low_filter_event): Update call to
6168 linux_enable_event_reporting following the addition of
6169 a new parameter to that function.
6170
bf330350
CU
61712014-12-16 Catalin Udma <catalin.udma@freescale.com>
6172
6173 PR server/17457
6174 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6175 (AARCH64_FPCR_REGNO): Likewise.
6176 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6177 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6178 (aarch64_store_fpregset): Likewise.
6179
5227d625
JB
61802014-12-15 Joel Brobecker <brobecker@adacore.com>
6181
6182 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6183 Remove FIXME comment about assumption about N.
6184
f93b65a0
JB
61852014-12-13 Joel Brobecker <brobecker@adacore.com>
6186
6187 * configure.ac: If large-file support is disabled in GDBserver,
6188 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6189 * configure: Regenerate.
6190
e5a9158d
AA
61912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6192
6193 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6194 warning upon ENODATA from ptrace.
6195 * linux-s390-low.c (s390_store_tdb): New.
6196 (s390_regsets): Add regset for NT_S390_TDB.
6197
feea5f36
AA
61982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6199
6200 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6201 without a fill_function.
6202 * linux-s390-low.c (s390_fill_last_break): Remove.
6203 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6204 (s390_arch_setup): Use regset's size instead of fill_function for
6205 loop end condition.
6206
098dbe61
AA
62072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6208
6209 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6210 the regset's store function when ptrace returned an error.
6211 * regcache.c (get_thread_regcache): Invalidate register cache
6212 before fetching inferior's registers.
6213
28eef672
AA
62142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6215
6216 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6217 while-loop as for-loop.
6218 (regsets_store_inferior_registers): Likewise.
6219
bdca27a2
YQ
62202014-11-28 Yao Qi <yao@codesourcery.com>
6221
6222 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6223 * config.in, configure: Re-generate.
6224 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6225 is defined.
6226
9c232dda
YQ
62272014-11-21 Yao Qi <yao@codesourcery.com>
6228
6229 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6230 (AC_CHECK_HEADERS): Remove malloc.h.
6231 * configure: Re-generated.
6232 * config.in: Re-generated.
6233 * server.h: Don't include alloca.h and malloc.h.
6234 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6235 Don't include malloc.h.
6236
43968415
JB
62372014-11-17 Joel Brobecker <brobecker@adacore.com>
6238
6239 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6240 corresponding ERRNO check in same block.
6241
40e91bc7
PA
62422014-11-12 Pedro Alves <palves@redhat.com>
6243
6244 * server.c (cont_thread): Update comment.
6245 (start_inferior, attach_inferior): No longer clear cont_thread.
6246 (handle_v_cont): No longer set cont_thread.
6247 (captured_main): Clear cont_thread each time a GDB connects.
6248
c2c118cf
PA
62492014-11-12 Pedro Alves <palves@redhat.com>
6250
6251 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6252 thread, and don't resume all threads if the Hc thread has exited.
6253
78708b7c
PA
62542014-11-12 Pedro Alves <palves@redhat.com>
6255
6256 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6257 the process group instead of to a specific LWP.
6258
a2abc7de
PA
62592014-10-15 Pedro Alves <palves@redhat.com>
6260
6261 PR server/17487
6262 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6263 parameter.
6264 (arm_set_thread_context): Delete.
6265 (the_low_target): Adjust.
6266 * win32-i386-low.c (debug_registers_changed)
6267 (debug_registers_used): Delete.
6268 (update_debug_registers_callback): New function.
6269 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6270 needing to update their debug registers.
6271 (win32_get_current_dr): New function.
6272 (x86_dr_low_get_addr, x86_dr_low_get_control)
6273 (x86_dr_low_get_status): Fetch the debug register from the thread
6274 record's context.
6275 (i386_initial_stuff): Adjust.
6276 (i386_get_thread_context): Remove current_event parameter. Don't
6277 clear debug_registers_changed nor copy DR values to
6278 debug_reg_state.
6279 (i386_set_thread_context): Delete.
6280 (i386_prepare_to_resume): New function.
6281 (i386_thread_added): Mark the thread as needing to update irs
6282 debug registers.
6283 (the_low_target): Remove i386_set_thread_context and install
6284 i386_prepare_to_resume.
6285 * win32-low.c (win32_get_thread_context): Adjust.
6286 (win32_set_thread_context): Use SetThreadContext
6287 directly.
6288 (win32_prepare_to_resume): New function.
6289 (win32_require_context): New function, factored out from ...
6290 (thread_rec): ... this.
6291 (continue_one_thread): Call win32_prepare_to_resume on each thread
6292 we're about to continue.
6293 (win32_resume): Call win32_prepare_to_resume on the event thread.
6294 * win32-low.h (struct win32_thread_info)
6295 <debug_registers_changed>: New field.
6296 (struct win32_target_ops): Change prototype of set_thread_context,
6297 delete set_thread_context and add prepare_to_resume.
6298 (win32_require_context): New declaration.
6299
a442d071
GB
63002014-10-08 Gary Benson <gbenson@redhat.com>
6301
6302 * server.h: Do not include common-exceptions.h.
6303
6f1947e8
GB
63042014-10-08 Gary Benson <gbenson@redhat.com>
6305
6306 * server.h: Do not include cleanups.h.
6307
63b434a4
JH
63082014-09-30 James Hogan <james.hogan@imgtec.com>
6309
6310 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6311 mips64-dsp-linux.c.
6312
c4d9ceb6
YQ
63132014-09-23 Yao Qi <yao@codesourcery.com>
6314
6315 * linux-low.c (lp_status_maybe_breakpoint): New function.
6316 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6317 (count_events_callback): Likewise.
6318 (select_event_lwp_callback): Likewise.
6319 (cancel_breakpoints_callback): Likewise.
6320
89a5711c
DB
63212014-09-19 Don Breazeal <donb@codesourcery.com>
6322
6323 * linux-low.c (handle_extended_wait): Call
6324 linux_ptrace_get_extended_event.
6325 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6326 linux_is_extended_waitstatus.
6327
bffc0964
JB
63282014-09-16 Joel Brobecker <brobecker@adacore.com>
6329
6330 * Makefile.in (CPPFLAGS): Define.
6331 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6332 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6333
0bfdf32f
GB
63342014-09-16 Gary Benson <gbenson@redhat.com>
6335
6336 * inferiors.h (current_inferior): Renamed as...
6337 (current_thread): New variable. All uses updated.
6338 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6339 (maybe_move_out_of_jump_pad): Likewise.
6340 (cancel_breakpoint): Likewise.
6341 (linux_low_filter_event): Likewise.
6342 (wait_for_sigstop): Likewise.
6343 (linux_resume_one_lwp): Likewise.
6344 (need_step_over_p): Likewise.
6345 (start_step_over): Likewise.
6346 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6347 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6348 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6349 and save_inferior as saved_thread.
6350 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6351 saved_thread.
6352 (regcache_invalidate_thread): Likewise.
6353 * remote-utils.c (prepare_resume_reply): Likewise.
6354 * thread-db.c (thread_db_get_tls_address): Likewise.
6355 (disable_thread_event_reporting): Likewise.
6356 (remove_thread_event_breakpoints): Likewise.
6357 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6358 as saved_thread.
6359 * target.h (set_desired_inferior): Renamed as...
6360 (set_desired_thread): New declaration. All uses updated.
6361 * server.c (myresume): Updated comment to reference thread instead
6362 of inferior.
6363 (handle_serial_event): Likewise.
6364 (handle_target_event): Likewise.
6365
361c8ade
GB
63662014-09-12 Tom Tromey <tromey@redhat.com>
6367 Gary Benson <gbenson@redhat.com>
6368
6369 * regcache.h: Include common-regcache.h.
6370 (regcache_read_pc): Don't declare.
6371 * regcache.c (get_thread_regcache_for_ptid): New function.
6372
bd9269f7
GB
63732014-09-11 Tom Tromey <tromey@redhat.com>
6374 Gary Benson <gbenson@redhat.com>
6375
6376 * symbol.c: New file.
6377 * Makefile.in (SFILES): Add symbol.c.
6378 (OBS): Add symbol.o.
6379
f8c1d06b
GB
63802014-09-11 Gary Benson <gbenson@redhat.com>
6381
6382 * target.c (target_stop_ptid, target_continue_ptid): New
6383 functions.
6384
721ec300
GB
63852014-09-11 Tom Tromey <tromey@redhat.com>
6386 Gary Benson <gbenson@redhat.com>
6387
6388 * target.h: Include target/target.h.
6389 * target.c (target_read_memory, target_read_uint32)
6390 (target_write_memory): New functions.
6391
c5e92cca
GB
63922014-09-11 Gary Benson <gbenson@redhat.com>
6393
6394 * server.h (debug_hw_points): Don't declare.
6395 * server.c (debug_hw_points): Don't define. Replace all uses
6396 with show_debug_regs.
6397 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6398 all uses with show_debug_regs.
6399
2e4bb98a
EBM
64002014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6401
6402 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6403 endianness into account.
6404 (ppc_supply_ptrace_register): Likewise.
6405
ac740bc7
JH
64062014-09-03 James Hogan <james.hogan@imgtec.com>
6407
6408 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6409 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6410
97ea6506
GB
64112014-09-03 Gary Benson <gbenson@redhat.com>
6412
6413 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6414 ALL_DEBUG_ADDRESS_REGISTERS.
6415
df7e5265
GB
64162014-09-02 Gary Benson <gbenson@redhat.com>
6417
6418 * i386-low.h: Renamed as...
6419 * x86-low.h: New file. All type, function and variable name
6420 prefixes changed from "i386_" to "x86_". All references updated.
6421 * i386-low.c: Renamed as...
6422 * x86-low.c: New file. All type, function and variable name
6423 prefixes changed from "i386_" to "x86_". All references updated.
6424
ed859da7
GB
64252014-09-02 Gary Benson <gbenson@redhat.com>
6426
6427 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6428 (x86_linux_new_thread): Likewise.
6429
860789c7
GB
64302014-08-29 Gary Benson <gbenson@redhat.com>
6431
6432 * server.h (setjmp.h): Do not include.
6433 (toplevel): Do not declare.
6434 (common-exceptions.h): Include.
6435 (cleanups.h): Likewise.
6436 * server.c (toplevel): Do not define.
6437 (exit_code): New static global.
6438 (detach_or_kill_for_exit_cleanup): New function.
6439 (main): New function. Original main renamed to...
6440 (captured_main): New function.
6441 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6442
ff55e1b5
GB
64432014-08-29 Gary Benson <gbenson@redhat.com>
6444
6445 * Makefile.in (SFILES): Add common/common-exceptions.c.
6446 (OBS): Add common-exceptions.o.
6447 (common-exceptions.o): New rule.
6448 * utils.c (prepare_to_throw_exception): New function.
6449
e9bcb658
GB
64502014-08-29 Gary Benson <gbenson@redhat.com>
6451
6452 * config.in: Regenerate.
6453 * configure: Likewise.
6454
e3180625
GB
64552014-08-29 Gary Benson <gbenson@redhat.com>
6456
6457 * Makefile.in (SFILES): Add common/cleanups.c.
6458 (OBS): cleanups.o.
6459 (cleanups.o): New rule.
6460
e3d6ba5d
GB
64612014-08-29 Gary Benson <gbenson@redhat.com>
6462
6463 * utils.c (internal_vwarning): New function.
6464
7096e886
GB
64652014-08-28 Gary Benson <gbenson@redhat.com>
6466
6467 * utils.h (fatal): Remove declaration.
6468 * utils.c (fatal): Remove function.
6469
14ce3192
GB
64702014-08-28 Gary Benson <gbenson@redhat.com>
6471
6472 * tracepoint.c (gdb_agent_init): Replace fatal with
6473 perror_with_name.
6474 (initialize_tracepoint): Likewise.
6475
50278d59
GB
64762014-08-28 Gary Benson <gbenson@redhat.com>
6477
6478 * remote-utils.c (remote_prepare): Replace fatal with error.
6479
aa96c426
GB
64802014-08-28 Gary Benson <gbenson@redhat.com>
6481
6482 * linux-low.c (linux_async): Replace fatal with warning.
6483 Tidy up and return.
6484 (linux_start_non_stop): Return -1 if linux_async failed.
6485
f7160e97
GB
64862014-08-28 Gary Benson <gbenson@redhat.com>
6487
6488 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6489 gdb_assert.
6490 (i386_dr_low_get_addr): Remove vague comment.
6491 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6492 gdb_assert.
6493
38e08fca
GB
64942014-08-28 Gary Benson <gbenson@redhat.com>
6495
6496 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6497 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6498 internal_error.
6499 (linux_resume_one_lwp): Likewise.
6500 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6501 gdb_assert.
6502 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6503 with internal_error.
6504 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6505 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6506 (find_register_by_name): Replace fatal with internal_error.
6507 (find_regno): Likewise.
6508 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6509 * thread-db.c (thread_db_create_event): Likewise.
6510 (thread_db_load_search): Likewise.
6511 (try_thread_db_load_1): Likewise.
6512 * tracepoint.c (get_jump_space_head): Replace fatal with
6513 internal_error.
6514 (claim_trampoline_space): Likewise.
6515 (have_fast_tracepoint_trampoline_buffer): Likewise.
6516 (cmd_qtstart): Likewise.
6517 (stop_tracing): Likewise.
6518 (fast_tracepoint_collecting): Likewise.
6519 (target_malloc): Likewise.
6520 (download_tracepoint): Likewise.
6521 (download_trace_state_variables): Replace check with gdb_assert.
6522 (upload_fast_traceframes): Replace fatal with internal_error.
6523
34abf635
GB
65242014-08-19 Tom Tromey <tromey@redhat.com>
6525 Gary Benson <gbenson@redhat.com>
6526
6527 * Makefile.in (SFILES): Add common/common-debug.c.
6528 (OBS): Add common-debug.o.
6529 (common-debug.o): New rule.
6530 * debug.h (debug_printf): Don't declare.
6531 * debug.c (debug_printf): Renamed and rewritten as...
6532 (debug_vprintf): New function.
6533
f6e94d78
GB
65342014-08-19 Gary Benson <gbenson@redhat.com>
6535
6536 * utils.h: Do not include print-utils.h.
6537
9239eeab
GB
65382014-08-19 Tom Tromey <tromey@redhat.com>
6539 Gary Benson <gbenson@redhat.com>
6540
6541 * server.h: Add static assertion.
6542 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6543
ef87c8bb
GB
65442014-08-19 Tom Tromey <tromey@redhat.com>
6545 Gary Benson <gbenson@redhat.com>
6546
6547 * Makefile.in (SFILES): Add common/errors.c.
6548 (OBS): Add errors.o.
6549 (IPA_OBS): Add errors-ipa.o.
6550 (errors.o): New rule.
6551 (errors-ipa.o): Likewise.
6552 * utils.h (perror_with_name, error, warning): Don't declare.
6553 * utils.c (warning): Renamed and rewritten as...
6554 (vwarning): New function.
6555 (error): Renamed and rewritten as...
6556 (verror): New function.
6557 (internal_error): Renamed and rewritten as...
6558 (internal_verror): New function.
6559
bb974a24
GB
65602014-08-07 Gary Benson <gbenson@redhat.com>
6561
6562 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6563 * configure: Regenerate.
6564 * config.in: Likewise.
6565 * server.h: Do not include errno.h.
6566 * event-loop.c: Likewise.
6567 * hostio-errno.c: Likewise.
6568 * linux-low.c: Likewise.
6569 * remote-utils.c: Likewise.
6570 * spu-low.c: Likewise.
6571 * utils.c: Likewise.
6572 * gdbreplay.c: Unconditionally include errno.h.
6573
6d3d12eb
GB
65742014-08-07 Gary Benson <gbenson@redhat.com>
6575
6576 * server.h: Do not include string.h.
6577 * event-loop.c: Likewise.
6578 * linux-low.c: Likewise.
6579 * regcache.c: Likewise.
6580 * remote-utils.c: Likewise.
6581 * spu-low.c: Likewise.
6582 * utils.c: Likewise.
6583
dccbb609
GB
65842014-08-07 Gary Benson <gbenson@redhat.com>
6585
6586 * server.h: Do not include gdb_assert.h.
6587
e76df0d0
GB
65882014-08-07 Gary Benson <gbenson@redhat.com>
6589
6590 * server.h: Do not include common-utils.h.
6591
4cb9c816
GB
65922014-08-07 Gary Benson <gbenson@redhat.com>
6593
6594 * server.h: Do not include ptid.h.
6595 * notif.h: Likewise.
6596
3995eeee
GB
65972014-08-07 Gary Benson <gbenson@redhat.com>
6598
6599 * server.h: Do not include gdb_locale.h.
6600
cb9f1a9b
GB
66012014-08-07 Gary Benson <gbenson@redhat.com>
6602
6603 * server.h: Do not include gdb/signals.h.
6604 * win32-low.c: Likewise.
6605
a5fceff8
GB
66062014-08-07 Gary Benson <gbenson@redhat.com>
6607
6608 * server.h: Do not include pathmax.h.
6609
b9391142
GB
66102014-08-07 Gary Benson <gbenson@redhat.com>
6611
6612 * server.h: Do not include libiberty.h.
6613 * linux-bfin-low.c: Likewise.
6614
0e443c87
GB
66152014-08-07 Gary Benson <gbenson@redhat.com>
6616
6617 * server.h: Do not include ansidecl.h.
6618
8ebb3f56
GB
66192014-08-07 Gary Benson <gbenson@redhat.com>
6620
6621 * linux-x86-low.c: Do not include stddef.h.
6622 * lynx-ppc-low.c: Likewise.
6623 * tracepoint.c: Likewise.
6624
8980bdf6
GB
66252014-08-07 Gary Benson <gbenson@redhat.com>
6626
6627 * server.h: Do not include stdarg.h.
6628 * nto-low.c: Likewise.
6629
d7096f71
GB
66302014-08-07 Gary Benson <gbenson@redhat.com>
6631
6632 * server.h: Do not include stdlib.h.
6633 * inferiors.c: Likewise.
6634 * linux-low.c: Likewise.
6635 * regcache.c: Likewise.
6636 * spu-low.c: Likewise.
6637 * tracepoint.c: Likewise.
6638 * utils.c: Likewise.
6639
d02f550d
GB
66402014-08-07 Gary Benson <gbenson@redhat.com>
6641
6642 * server.h: Do not include stdio.h.
6643 * linux-low.c: Likewise.
6644 * remote-utils.c: Likewise.
6645 * spu-low.c: Likewise.
6646 * utils.c: Likewise.
6647 * wincecompat.c: Likewise.
6648
87f6c4e3
GB
66492014-08-06 Gary Benson <gbenson@redhat.com>
6650
6651 * regcache.c (init_register_cache): Move conditionals inside if.
6652
7089dca4
GB
66532014-08-06 Gary Benson <gbenson@redhat.com>
6654
6655 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6656
462f517e
GB
66572014-07-31 Gary Benson <gbenson@redhat.com>
6658
6659 * ax.h: Do not include server.h.
6660 * gdbthread.h: Likewise.
6661 * lynx-low.h: Likewise.
6662 * notif.h: Likewise.
6663
976411d6
GB
66642014-07-30 Gary Benson <gbenson@redhat.com>
6665
6666 * server.h: Include common-defs.h.
6667 Do not include config.h or build-gnulib-gdbserver/config.h.
6668
d41f6d8e
GB
66692014-07-30 Gary Benson <gbenson@redhat.com>
6670
6671 * hostio-errno.c: Move server.h to top of includes list.
6672 * inferiors.c: Likewise.
6673 * linux-x86-low.c: Likewise.
6674 * notif.c: Include server.h.
6675
314c6a35
TT
66762014-07-24 Tom Tromey <tromey@redhat.com>
6677 Gary Benson <gbenson@redhat.com>
6678
6679 * server.h (CORE_ADDR): Now unsigned.
6680
69ff6be5
PA
66812014-07-16 Pedro Alves <palves@redhat.com>
6682
6683 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6684
ce9e3fe7
PA
66852014-07-15 Pedro Alves <palves@redhat.com>
6686
6687 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6688 copy.
6689
e76126e8
PA
66902014-07-11 Pedro Alves <palves@redhat.com>
6691
6692 * linux-low.c (kill_wait_lwp): New function, based on
6693 kill_one_lwp_callback, but use my_waitpid directly.
6694 (kill_one_lwp_callback, linux_kill): Use it.
6695
8e9db26e
PA
66962014-06-23 Pedro Alves <palves@redhat.com>
6697
6698 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6699 before setting DR0..DR3.
6700
698b3e08
GB
67012014-06-20 Gary Benson <gbenson@redhat.com>
6702
6703 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6704 * configure: Regenerated.
6705 * config.in: Likewise.
6706
125f8a3d
GB
67072014-06-20 Gary Benson <gbenson@redhat.com>
6708
6709 * Makefile.in (SFILES): Update locations for files moved
6710 from common to nat.
6711 (object file files): Reordered.
6712
42995dbd
GB
67132014-06-20 Gary Benson <gbenson@redhat.com>
6714
6715 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6716 (i386_dr_low_set_addr): Likewise.
6717 (i386_dr_low_get_addr): Likewise.
6718 (i386_dr_low_can_set_control): Likewise.
6719 (i386_dr_low_set_control): Likewise.
6720 (i386_dr_low_get_control): Likewise.
6721 (i386_dr_low_get_status): Likewise.
6722 (i386_get_debug_register_length): Likewise.
6723 * linux-x86-low.c (i386_dr_low_set_addr):
6724 Changed signature. Made static.
6725 (i386_dr_low_get_addr): Likewise.
6726 (i386_dr_low_set_control): Likewise.
6727 (i386_dr_low_get_control): Likewise.
6728 (i386_dr_low_get_status): Likewise.
6729 (i386_dr_low): New global variable.
6730 * win32-i386-low.c (i386_dr_low_set_addr):
6731 Changed signature. Made static.
6732 (i386_dr_low_get_addr): Likewise.
6733 (i386_dr_low_set_control): Likewise.
6734 (i386_dr_low_get_control): Likewise.
6735 (i386_dr_low_get_status): Likewise.
6736 (i386_dr_low): New global variable.
6737
e1d2394b
MS
67382014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6739
6740 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6741 * Makefile.in (AR, AR_FLAGS): Define.
6742 * configure: Regenerate.
6743
3a8ee006
GB
67442014-06-19 Gary Benson <gbenson@redhat.com>
6745
6746 * Makefile.in (i386-dregs.o): New rule.
6747 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6748 * i386-low.c (target.h): Remove include.
6749 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6750 (DR_CONTROL_SHIFT): Likewise.
6751 (DR_CONTROL_SIZE): Likewise.
6752 (DR_RW_EXECUTE): Likewise.
6753 (DR_RW_WRITE): Likewise.
6754 (DR_RW_READ): Likewise.
6755 (DR_RW_IORW): Likewise.
6756 (DR_LEN_1): Likewise.
6757 (DR_LEN_2): Likewise.
6758 (DR_LEN_4): Likewise.
6759 (DR_LEN_8): Likewise.
6760 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6761 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6762 (DR_ENABLE_SIZE): Likewise.
6763 (DR_LOCAL_SLOWDOWN): Likewise.
6764 (DR_GLOBAL_SLOWDOWN): Likewise.
6765 (DR_CONTROL_RESERVED): Likewise.
6766 (I386_DR_CONTROL_MASK): Likewise.
6767 (I386_DR_VACANT): Likewise.
6768 (I386_DR_LOCAL_ENABLE): Likewise.
6769 (I386_DR_GLOBAL_ENABLE): Likewise.
6770 (I386_DR_DISABLE): Likewise.
6771 (I386_DR_SET_RW_LEN): Likewise.
6772 (I386_DR_GET_RW_LEN): Likewise.
6773 (I386_DR_WATCH_HIT): Likewise.
6774 (i386_wp_op_t): Likewise.
6775 (i386_show_dr): Likewise.
6776 (i386_length_and_rw_bits): Likewise.
6777 (i386_insert_aligned_watchpoint): Likewise.
6778 (i386_remove_aligned_watchpoint): Likewise.
6779 (i386_handle_nonaligned_watchpoint): Likewise.
6780 i386_update_inferior_debug_regs(): Likewise.
6781 (i386_dr_insert_watchpoint): Likewise.
6782 (i386_dr_remove_watchpoint): Likewise.
6783 (i386_dr_region_ok_for_watchpoint): Likewise.
6784 (i386_dr_stopped_data_address): Likewise.
6785 (i386_dr_stopped_by_watchpoint): Likewise.
6786
8f26655c
GB
67872014-06-19 Gary Benson <gbenson@redhat.com>
6788
6789 * i386-low.c (i386_dr_show): Renamed to
6790 i386_show_dr and made static. All uses updated.
6791 (i386_dr_length_and_rw_bits): Renamed to
6792 i386_length_and_rw_bits and made static.
6793 All uses updated.
6794 (i386_dr_insert_aligned_watchpoint): Renamed to
6795 i386_insert_aligned_watchpoint and made static.
6796 All uses updated.
6797 (i386_dr_remove_aligned_watchpoint): Renamed to
6798 i386_remove_aligned_watchpoint and made static.
6799 All uses updated.
6800 (i386_dr_update_inferior_debug_regs): Renamed to
6801 i386_update_inferior_debug_regs and made static.
6802 All uses updated.
6803
b9228891
GB
68042014-06-18 Gary Benson <gbenson@redhat.com>
6805
5171def3
GB
6806 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6807 (i386_dr_low_can_set_control): Likewise.
6808 (i386_get_debug_register_length): Likewise.
6809 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6810 (i386_dr_low_can_set_control): Likewise.
6811 (i386_get_debug_register_length): Likewise.
6812
68132014-06-17 Gary Benson <gbenson@redhat.com>
6814
b9228891
GB
6815 * i386-low.h (i386-dregs.h): New include.
6816 (DR_FIRSTADDR): Now in i386-dregs.h.
6817 (DR_LASTADDR): Likewise.
6818 (DR_NADDR): Likewise.
6819 (DR_STATUS): Likewise.
6820 (DR_CONTROL): Likewise.
6821 (i386_debug_reg_state): Likewise.
6822 (i386_dr_insert_watchpoint): Likewise.
6823 (i386_dr_remove_watchpoint): Likewise.
6824 (i386_dr_region_ok_for_watchpoint): Likewise.
6825 (i386_dr_stopped_data_address): Likewise.
6826 (i386_dr_stopped_by_watchpoint): Likewise.
6827 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6828
4be83cc2
GB
68292014-06-18 Gary Benson <gbenson@redhat.com>
6830
6831 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6832 i386_dr_insert_watchpoint.
6833 (i386_low_remove_watchpoint): Renamed to
6834 i386_dr_remove_watchpoint.
6835 (i386_low_region_ok_for_watchpoint): Renamed to
6836 i386_dr_region_ok_for_watchpoint.
6837 (i386_low_stopped_data_address): Renamed to
6838 i386_dr_stopped_data_address.
6839 (i386_low_stopped_by_watchpoint): Renamed to
6840 i386_dr_stopped_by_watchpoint.
6841 * i386-low.c (i386_show_dr): Renamed to
6842 i386_dr_show and made nonstatic. All uses updated.
6843 (i386_length_and_rw_bits): Renamed to
6844 i386_dr_length_and_rw_bits and made nonstatic.
6845 All uses updated.
6846 (i386_insert_aligned_watchpoint): Renamed to
6847 i386_dr_insert_aligned_watchpoint and made nonstatic.
6848 All uses updated.
6849 (i386_remove_aligned_watchpoint): Renamed to
6850 i386_dr_remove_aligned_watchpoint and made nonstatic.
6851 All uses updated.
6852 (i386_update_inferior_debug_regs): Renamed to
6853 i386_dr_update_inferior_debug_regs and made nonstatic.
6854 All uses updated.
6855 (i386_low_insert_watchpoint): Renamed to
6856 i386_dr_insert_watchpoint. All uses updated.
6857 (i386_low_remove_watchpoint): Renamed to
6858 i386_dr_remove_watchpoint. All uses updated.
6859 (i386_low_region_ok_for_watchpoint): Renamed to
6860 i386_dr_region_ok_for_watchpoint. All uses updated.
6861 (i386_low_stopped_data_address): Renamed to
6862 i386_dr_stopped_data_address. All uses updated.
6863 (i386_low_stopped_by_watchpoint): Renamed to
6864 i386_dr_stopped_by_watchpoint. All uses updated.
6865
131aa0d4
GB
68662014-06-18 Gary Benson <gbenson@redhat.com>
6867
6868 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6869 (i386_dr_low_can_set_control): Likewise.
6870 (i386_insert_aligned_watchpoint): New check.
6871
d9305f7f
GB
68722014-06-18 Gary Benson <gbenson@redhat.com>
6873
6874 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6875 Renamed to state.
6876
e927c9fc
GB
68772014-06-18 Gary Benson <gbenson@redhat.com>
6878
6879 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6880 instead of fatal and error.
6881 (i386_handle_nonaligned_watchpoint): Likewise.
6882
1b6d4134
GB
68832014-06-18 Gary Benson <gbenson@redhat.com>
6884
6885 * i386-low.c (i386_get_debug_register_length): New macro.
6886 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6887 (i386_show_dr): Use debug_printf instead of fprintf. Use
6888 phex to format values.
6889
6e62758f
GB
68902014-06-18 Gary Benson <gbenson@redhat.com>
6891
6892 * i386-low.h: Comment changes.
6893 * i386-low.c: Likewise.
6894
fc6e2f03
GB
68952014-06-18 Gary Benson <gbenson@redhat.com>
6896
6897 * i386-low.c: Whitespace changes.
6898
f9d1eeed
TT
68992014-06-12 Tom Tromey <tromey@redhat.com>
6900
6901 * utils.c (freeargv): Remove.
6902
0b04e523
TT
69032014-06-12 Tom Tromey <tromey@redhat.com>
6904
6905 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6906 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6907 (parse_debug_format_options): Likewise.
6908 (gdbserver_usage): Likewise.
6909 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6910 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6911 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6912 against libiberty.
6913 ($(LIBGNU)): Depend on libiberty.
6914 (all-lib): Recurse into all subdirs.
6915 (install-only): Invoke "install" target in subdirs.
6916 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6917 targets.
6918 * configure: Rebuild.
6919 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6920 for vasprintf, vsnprintf, or gettimeofday.
6921 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6922 srv_tgtobj.
6923
270c9937
JB
69242014-06-05 Joel Brobecker <brobecker@adacore.com>
6925
6926 * development.sh: Delete.
6927 * Makefile.in (config.status): Adjust dependency on development.sh.
6928 * configure.ac: Adjust development.sh source call.
6929 * configure: Regenerate.
6930
0a261ed8
PA
69312014-06-02 Pedro Alves <palves@redhat.com>
6932
6933 * ax.c (gdb_free_agent_expr): New function.
6934 * ax.h (gdb_free_agent_expr): New declaration.
6935 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6936 list.
6937 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6938 static.
6939 (clear_breakpoint_conditions_and_commands): New function.
6940 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6941 (clear_breakpoint_conditions_and_commands): New declaration.
6942
e9dae05e
RR
69432014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6944
6945 * linux-aarch64-low.c (asm/ptrace.h): Include.
6946
5876f503
JK
69472014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6948
6949 Fix TLS access for -static -pthread.
6950 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6951 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6952 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6953
802e8e6d
PA
69542014-05-20 Pedro Alves <palves@redhat.com>
6955
6956 * linux-aarch64-low.c (aarch64_insert_point)
6957 (aarch64_remove_point): No longer check whether the type is
6958 supported here. Adjust to new interface.
6959 (the_low_target): Install aarch64_supports_z_point_type as
6960 supports_z_point_type method.
6961 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6962 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6963 instead of a Z packet char. Adjust.
6964 (arm_supports_z_point_type): New function.
6965 (arm_insert_point, arm_remove_point): Adjust to new interface.
6966 (the_low_target): Install arm_supports_z_point_type.
6967 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6968 (cris_insert_point, cris_remove_point): Adjust to new interface.
6969 Don't check whether the type is supported here.
6970 (the_low_target): Install cris_supports_z_point_type.
6971 * linux-low.c (linux_supports_z_point_type): New function.
6972 (linux_insert_point, linux_remove_point): Adjust to new interface.
6973 * linux-low.h (struct linux_target_ops) <insert_point,
6974 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6975 raw_breakpoint pointer parameter.
6976 <supports_z_point_type>: New method.
6977 * linux-mips-low.c (mips_supports_z_point_type): New function.
6978 (mips_insert_point, mips_remove_point): Adjust to new interface.
6979 Use mips_supports_z_point_type.
6980 (the_low_target): Install mips_supports_z_point_type.
6981 * linux-ppc-low.c (the_low_target): Install NULL as
6982 supports_z_point_type method.
6983 * linux-s390-low.c (the_low_target): Install NULL as
6984 supports_z_point_type method.
6985 * linux-sparc-low.c (the_low_target): Install NULL as
6986 supports_z_point_type method.
6987 * linux-x86-low.c (x86_supports_z_point_type): New function.
6988 (x86_insert_point): Adjust to new insert_point interface. Use
6989 insert_memory_breakpoint. Adjust to new
6990 i386_low_insert_watchpoint interface.
6991 (x86_remove_point): Adjust to remove_point interface. Use
6992 remove_memory_breakpoint. Adjust to new
6993 i386_low_remove_watchpoint interface.
6994 (the_low_target): Install x86_supports_z_point_type.
6995 * lynx-low.c (lynx_target_ops): Install NULL as
6996 supports_z_point_type callback.
6997 * nto-low.c (nto_supports_z_point_type): New.
6998 (nto_insert_point, nto_remove_point): Adjust to new interface.
6999 (nto_target_ops): Install nto_supports_z_point_type.
7000 * mem-break.c: Adjust intro comment.
7001 (struct raw_breakpoint) <raw_type, size>: New fields.
7002 <inserted>: Update comment.
7003 <shlib_disabled>: Delete field.
7004 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7005 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7006 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7007 (raw_bkpt_type_to_target_hw_bp_type): New function.
7008 (find_enabled_raw_code_breakpoint_at): New function.
7009 (find_raw_breakpoint_at): New type and size parameters. Use them.
7010 (insert_memory_breakpoint): New function, based off
7011 set_raw_breakpoint_at.
7012 (remove_memory_breakpoint): New function.
7013 (set_raw_breakpoint_at): Reimplement.
7014 (set_breakpoint): New, based on set_breakpoint_at.
7015 (set_breakpoint_at): Reimplement.
7016 (delete_raw_breakpoint): Go through the_target->remove_point
7017 instead of assuming memory breakpoints.
7018 (find_gdb_breakpoint_at): Delete.
7019 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7020 (find_gdb_breakpoint): New function.
7021 (set_gdb_breakpoint_at): Delete.
7022 (z_type_supported): New function.
7023 (set_gdb_breakpoint_1): New function, loosely based off
7024 set_gdb_breakpoint_at.
7025 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7026 (delete_gdb_breakpoint_at): Delete.
7027 (delete_gdb_breakpoint_1): New function, loosely based off
7028 delete_gdb_breakpoint_at.
7029 (delete_gdb_breakpoint): New function.
7030 (clear_gdb_breakpoint_conditions): Rename to ...
7031 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7032 breakpoint.
7033 (add_condition_to_breakpoint): Make static.
7034 (add_breakpoint_condition): Take a struct breakpoint pointer
7035 instead of an address. Adjust.
7036 (gdb_condition_true_at_breakpoint): Rename to ...
7037 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7038 z_type parameter.
7039 (gdb_condition_true_at_breakpoint): Reimplement.
7040 (add_breakpoint_commands): Take a struct breakpoint pointer
7041 instead of an address. Adjust.
7042 (gdb_no_commands_at_breakpoint): Rename to ...
7043 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7044 parameter. Return true if no breakpoint was found. Change debug
7045 output.
7046 (gdb_no_commands_at_breakpoint): Reimplement.
7047 (run_breakpoint_commands): Rename to ...
7048 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7049 and change return type to boolean.
7050 (run_breakpoint_commands): New function.
7051 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7052 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7053 breakpoint. Go through the_target->remove_point instead of
7054 assuming memory breakpoint.
7055 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7056 software and hardware breakpoints.
7057 (reinsert_raw_breakpoint): Go through the_target->insert_point
7058 instead of assuming memory breakpoint.
7059 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7060 software and hardware breakpoints.
7061 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7062 Check both software and hardware breakpoints.
7063 (validate_inserted_breakpoint): Assert the breakpoint is a
7064 software breakpoint. Set the inserted flag to -1 instead of
7065 setting shlib_disabled.
7066 (delete_disabled_breakpoints): Adjust.
7067 (validate_breakpoints): Only validate software breakpoints.
7068 Adjust to inserted flag change.
7069 (check_mem_read, check_mem_write): Skip breakpoint types other
7070 than software breakpoints. Adjust to inserted flag change.
7071 * mem-break.h (enum raw_bkpt_type): New enum.
7072 (raw_breakpoint, struct process_info): Forward declare.
7073 (Z_packet_to_target_hw_bp_type): Delete declaration.
7074 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7075 (set_gdb_breakpoint, delete_gdb_breakpoint)
7076 (clear_breakpoint_conditions): New declarations.
7077 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7078 (breakpoint_inserted_here): Update comment.
7079 (add_breakpoint_condition, add_breakpoint_commands): Replace
7080 address parameter with a breakpoint pointer parameter.
7081 (gdb_breakpoint_here): Update comment.
7082 (delete_gdb_breakpoint_at): Delete.
7083 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7084 * server.c (process_point_options): Take a struct breakpoint
7085 pointer instead of an address. Adjust.
7086 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7087 delete_gdb_breakpoint.
7088 * spu-low.c (spu_target_ops): Install NULL as
7089 supports_z_point_type method.
7090 * target.h: Include mem-break.h.
7091 (struct target_ops) <prepare_to_access_memory>: Update comment.
7092 <supports_z_point_type>: New field.
7093 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7094 instead of a char. Also take a raw breakpoint pointer.
7095 * win32-arm-low.c (the_low_target): Install NULL as
7096 supports_z_point_type.
7097 * win32-i386-low.c (i386_supports_z_point_type): New function.
7098 (i386_insert_point, i386_remove_point): Adjust to new interface.
7099 (the_low_target): Install i386_supports_z_point_type.
7100 * win32-low.c (win32_supports_z_point_type): New function.
7101 (win32_insert_point, win32_remove_point): Adjust to new interface.
7102 (win32_target_ops): Install win32_supports_z_point_type.
7103 * win32-low.h (struct win32_target_ops):
7104 <supports_z_point_type>: New method.
7105 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7106 instead of a char. Also take a raw breakpoint pointer.
7107
932539e3
PA
71082014-05-20 Pedro Alves <palves@redhat.com>
7109
7110 * mem-break.h: Include break-common.h.
7111 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7112 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7113 (Z_packet_to_target_hw_bp_type): New declaration.
7114 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7115 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7116 (Z_PACKET_ACCESS_WP): Delete macros.
7117 (Z_packet_to_hw_type): Delete function.
7118 * i386-low.h: Don't include break-common.h here.
7119 (Z_packet_to_hw_type): Delete declaration.
7120 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7121 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7122 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7123 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7124 * linux-aarch64-low.c: Don't include break-common.h here.
7125 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7126 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7127 (Z_packet_to_target_hw_bp_type): Delete function.
7128 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7129 function.
7130 (mips_insert_point, mips_remove_point): Use
7131 Z_packet_to_target_hw_bp_type.
7132
4ff0d3d8
PA
71332014-05-20 Pedro Alves <palves@redhat.com>
7134
7135 * linux-aarch64-low.c: Include break-common.h.
7136 (enum target_point_type): Delete.
7137 (Z_packet_to_point_type): Rename to ...
7138 (Z_packet_to_target_hw_bp_type): ... this, and return a
7139 target_hw_bp_type instead.
7140 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7141 instead of an enum target_point_type.
7142 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7143 breakpoint type.
7144 (aarch64_dr_state_insert_one_point)
7145 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7146 (aarch64_handle_aligned_watchpoint)
7147 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7148 Take an enum target_hw_bp_type instead of an enum
7149 target_point_type.
7150 (aarch64_supports_z_point_type): New function.
7151 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7152 use Z_packet_to_target_hw_bp_type.
7153
786dc519
JB
71542014-05-20 Joel Brobecker <brobecker@adacore.com>
7155
7156 * configure.ac: Only use -Werror by default when DEVELOPMENT
7157 is true.
7158 * configure: Regenerate.
7159
9e0aa64f
JK
71602014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7161
7162 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7163 * linux-x86-low.c (X86_64_USER_REGS): New.
7164 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7165
2b577b92
YQ
71662014-04-28 Yao Qi <yao@codesourcery.com>
7167
7168 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7169 name.
7170
94611da2
PA
71712014-04-25 Pedro Alves <palves@redhat.com>
7172
7173 PR server/16255
7174 * linux-low.c (linux_attach_fail_reason_string): New function.
7175 (linux_attach_lwp): Delete.
7176 (linux_attach_lwp_1): Rename to ...
7177 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7178 argument. Remove "initial" parameter. Return int instead of
7179 void. Don't error or warn here.
7180 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7181 failure to attach to the tgid. Call warning when failing to
7182 attach to an lwp.
7183 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7184 argument. Remove "initial" parameter. Return int instead of
7185 void. Don't error or warn here.
7186 (linux_attach_fail_reason_string): New declaration.
7187 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7188 interface change. Use linux_attach_fail_reason_string.
7189
01f9f808
MS
71902014-04-24 Michael Sturm <michael.sturm@mintel.com>
7191 Walfred Tedeschi <walfred.tedeschi@intel.com>
7192
7193 * Makefile.in: Added rules to handle new files
7194 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7195 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7196 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7197 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7198 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7199 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7200 x32-avx512-linux.o.
7201 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7202 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7203 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7204 i386/x32-avx512.xml.
7205 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7206 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7207 i386/x32-avx512-linux.xml.
7208 * i387-fp.c (num_avx512_k_registers): New constant for number
7209 of K registers.
7210 (num_avx512_zmmh_low_registers): New constant for number of
7211 lower ZMM registers (0-15).
7212 (num_avx512_zmmh_high_registers): New constant for number of
7213 higher ZMM registers (16-31).
7214 (num_avx512_ymmh_registers): New contant for number of higher
7215 YMM registers (ymm16-31 added by avx521 on x86_64).
7216 (num_avx512_xmm_registers): New constant for number of higher
7217 XMM registers (xmm16-31 added by AVX512 on x86_64).
7218 (struct i387_xsave): Add space for AVX512 registers.
7219 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7220 Add code to handle AVX512 registers.
7221 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7222 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7223 prototypei from generated file.
7224 (tdesc_amd64_avx512_linux): Likewise.
7225 (init_registers_x32_avx512_linux): Likewise.
7226 (tdesc_x32_avx512_linux): Likewise.
7227 (init_registers_i386_avx512_linux): Likewise.
7228 (tdesc_i386_avx512_linux): Likewise.
7229 (x86_64_regmap): Add AVX512 registers.
7230 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7231 mask.
7232 (initialize_low_arch): Add code to initialize AVX512 registers.
7233
51aa91f9
PA
72342014-04-23 Pedro Alves <palves@redhat.com>
7235
7236 * mem-break.c (find_gdb_breakpoint_at): Make static.
7237 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7238
a4165e94
PA
72392014-04-23 Pedro Alves <palves@redhat.com>
7240
7241 * i386-low.c: Don't include break-common.h here.
7242 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7243 prototype to take target_hw_bp_type as argument instead of a Z
7244 packet char.
7245 * i386-low.h: Include break-common.h here.
7246 (Z_packet_to_hw_type): Declare.
7247 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7248 prototypes.
7249 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7250 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7251 (x86_remove_point): Convert the packet number to a
7252 target_hw_bp_type before calling i386_low_remove_watchpoint.
7253 * win32-i386-low.c (i386_insert_point): Convert the packet number
7254 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7255 (i386_remove_point): Convert the packet number to a
7256 target_hw_bp_type before calling i386_low_remove_watchpoint.
7257
b8acf843
PA
72582014-04-23 Pedro Alves <palves@redhat.com>
7259
7260 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7261
d708bcd1
PA
72622014-04-10 Pedro Alves <palves@redhat.com>
7263
7264 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7265 Check if the condition or command is NULL before checking if the
7266 breakpoint is known. On success, return true.
7267 * mem-break.h (add_breakpoint_condition): Document return.
7268 (add_breakpoint_commands): Add describing comment.
7269 * server.c (skip_to_semicolon): New function.
7270 (process_point_options): Use it.
7271
2eec7d5b
PA
72722014-04-09 Pedro Alves <palves@redhat.com>
7273
7274 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7275 to lwpid_of.
7276
fa96cb38
PA
72772014-02-27 Pedro Alves <palves@redhat.com>
7278
7279 PR 12702
7280 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7281 macros.
7282 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7283 output.
7284 (last_thread_of_process_p): Take a PID argument instead of a
7285 thread pointer.
7286 (linux_wait_for_lwp): Delete.
7287 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7288 functions.
7289 (linux_low_filter_event): New function, party factored out from
7290 linux_wait_for_event.
7291 (linux_wait_for_event): Rename to ...
7292 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7293 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7294 sigsuspend. Check for zombie leaders.
7295 (linux_wait_for_event): Reimplement as wrapper around
7296 linux_wait_for_event_filtered.
7297 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7298 a normal or signal exit is seen, it's the whole process exiting.
7299 (wait_for_sigstop): No longer a for_each_inferior callback.
7300 Rewrite on top of linux_wait_for_event_filtered.
7301 (stop_all_lwps): Call wait_for_sigstop directly.
7302 * server.c (resume, handle_target_event): Handle
7303 TARGET_WAITKIND_NO_RESUMED.
7304
d763de10
JB
73052014-02-26 Joel Brobecker <brobecker@adacore.com>
7306
7307 * win32-low.c (psapi_get_dll_name,
7308 * win32_CreateToolhelp32Snapshot): Delete.
7309 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7310 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7311 Delete.
7312 (handle_load_dll): Add function description.
7313 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7314
850a0f76
JB
73152014-02-26 Joel Brobecker <brobecker@adacore.com>
7316
7317 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7318 Add comment.
7319 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7320 base address when calling win32_add_one_solib.
7321 (handle_load_dll): Delete local variable load_addr.
7322 Remove 0x1000 offset applied to DLL base address when calling
7323 win32_add_one_solib.
7324 (handle_unload_dll): Add comment.
7325
f25b3fc3
JB
73262014-02-26 Joel Brobecker <brobecker@adacore.com>
7327
7328 * win32-low.c (win32_add_all_dlls): Renames
7329 win32_ensure_ntdll_loaded. Rewrite function documentation.
7330 Adjust implementation to always load all DLLs.
7331 Add 0x1000 offset to DLL base address when calling
7332 win32_add_one_solib.
7333 (child_initialization_done): New static global.
7334 (do_initial_child_stuff): Set child_initialization_done to
7335 zero during child initialization, and 1 after. Replace call
7336 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7337 Add comment.
7338 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7339 (handle_unload_dll): Add function documentation.
7340 (get_child_debug_event): Ignore load and unload DLL events
7341 during child initialization.
7342
d86d4aaf
DE
73432014-02-20 Doug Evans <dje@google.com>
7344
3bc32da3 7345 Remove global all_lwps.
d86d4aaf
DE
7346 * inferiors.h (ptid_of): Move here from linux-low.h.
7347 (pid_of, lwpid_of): Ditto.
7348 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7349 parameter is a struct thread_info * now.
7350 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7351 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7352 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7353 directly.
7354 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7355 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7356 * linux-arm-low.c (update_registers_callback): Update, "entry"
7357 parameter is a struct thread_info * now.
7358 Fetch lwpid from current_inferior directly.
7359 (arm_insert_point): Pass &all_threads to find_inferior instead of
7360 &all_lwps.
7361 (arm_remove_point): Ditto.
7362 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7363 (arm_prepare_to_resume): Fetch pid from thread.
7364 (arm_read_description): Fetch lwpid from current_inferior directly.
7365 * linux-low.c (all_lwps): Delete.
7366 (delete_lwp): Delete call to remove_inferior.
7367 (handle_extended_wait): Fetch lwpid from thread.
7368 (add_lwp): Don't set lwp->entry.id. Remove call to
7369 add_inferior_to_list.
7370 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7371 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7372 (kill_one_lwp_callback): Ditto.
7373 (linux_kill): Don't dereference NULL pointer.
7374 Fetch ptid,lwpid from thread.
7375 (get_detach_signal): Fetch ptid from thread.
7376 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7377 Simplify call to regcache_invalidate_thread.
7378 (delete_lwp_callback): Update, "entry" parameter is a
7379 struct thread_info * now. Fetch pid from thread.
7380 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7381 (status_pending_p_callback): Update, "entry" parameter is a
7382 struct thread_info * now. Fetch ptid from thread.
7383 (find_lwp_pid): Update, "entry" parameter is a
7384 struct thread_info * now.
7385 (linux_wait_for_lwp): Fetch pid from thread.
7386 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7387 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7388 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7389 (dequeue_one_deferred_signal): Ditto.
7390 (cancel_breakpoint): Fetch ptid from current_inferior.
7391 (linux_wait_for_event): Pass &all_threads to find_inferior,
7392 not &all_lwps. Fetch ptid, lwpid from thread.
7393 (count_events_callback): Update, "entry" parameter is a
7394 struct thread_info * now.
7395 (select_singlestep_lwp_callback): Ditto.
7396 (select_event_lwp_callback): Ditto.
7397 (cancel_breakpoints_callback): Ditto.
7398 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7399 not &all_lwps.
7400 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7401 (unsuspend_one_lwp): Update, "entry" parameter is a
7402 struct thread_info * now.
7403 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7404 not &all_lwps.
7405 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7406 Fetch lwpid from thread, not lwp.
7407 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7408 Pass &all_threads to find_inferior, not &all_lwps.
7409 (send_sigstop): Fetch lwpid from thread, not lwp.
7410 (send_sigstop_callback): Update, "entry" parameter is a
7411 struct thread_info * now.
7412 (suspend_and_send_sigstop_callback): Ditto.
7413 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7414 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7415 struct thread_info * now.
7416 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7417 from thread, lwp.
7418 (lwp_running): Update, "entry" parameter is a
7419 struct thread_info * now.
7420 (stop_all_lwps): Fetch ptid from thread.
7421 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7422 (linux_resume_one_lwp): Fetch lwpid from thread.
7423 (linux_set_resume_request): Update, "entry" parameter is a
7424 struct thread_info * now. Fetch pid, lwpid from thread.
7425 (resume_status_pending_p): Update, "entry" parameter is a
7426 struct thread_info * now.
7427 (need_step_over_p): Ditto. Fetch lwpid from thread.
7428 (start_step_over): Fetch lwpid from thread.
7429 (linux_resume_one_thread): Update, "entry" parameter is a
7430 struct thread_info * now. Fetch lwpid from thread.
7431 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7432 (proceed_one_lwp): Update, "entry" parameter is a
7433 struct thread_info * now. Fetch lwpid from thread.
7434 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7435 struct thread_info * now.
7436 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7437 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7438 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7439 directly.
7440 (regsets_store_inferior_registers): Ditto.
7441 (fetch_register, store_register): Ditto.
7442 (linux_read_memory, linux_write_memory): Ditto.
7443 (linux_request_interrupt): Ditto.
7444 (linux_read_auxv): Ditto.
7445 (linux_xfer_siginfo): Ditto.
7446 (linux_qxfer_spu): Ditto.
7447 (linux_qxfer_libraries_svr4): Ditto.
7448 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7449 moved to inferiors.h.
7450 (get_lwp): Delete.
7451 (get_thread_lwp): Update.
7452 (struct lwp_info): Delete member "entry". Simplify comment for
7453 member "thread".
7454 (all_lwps): Delete.
7455 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7456 current_inferior directly.
7457 (update_watch_registers_callback): Update, "entry" parameter is a
7458 struct thread_info * now. Fetch pid from thread.
7459 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7460 (mips_insert_point): Fetch lwpid from current_inferior.
7461 Pass &all_threads to find_inferior, not &all_lwps.
7462 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7463 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7464 directly.
7465 (mips_stopped_data_address): Ditto.
7466 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7467 directly.
7468 * linux-tile-low.c (tile_arch_setup): Ditto.
7469 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7470 (update_debug_registers_callback): Update, "entry" parameter is a
7471 struct thread_info * now. Fetch pid from thread.
7472 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7473 Pass &all_threads to find_inferior, not &all_lwps.
7474 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7475 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7476 Pass &all_threads to find_inferior, not &all_lwps.
7477 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7478 (i386_dr_low_get_status): Ditto.
7479 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7480 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7481 (x86_linux_read_description): Ditto.
7482 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7483
3b8361aa
DE
74842014-02-20 Doug Evans <dje@google.com>
7485
7486 * inferiors.c (get_first_inferior): Fix buglet.
7487
f7667f0d
DE
74882014-02-19 Doug Evans <dje@google.com>
7489
7490 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7491 * inferiors.c (add_thread): Change result type to struct thread_info *.
7492 All callers updated.
7493 (add_lwp): Call add_thread here instead of in callers.
7494 All callers updated.
7495 * linux-low.h (get_lwp_thread): Rewrite.
7496 (struct lwp_info): New member "thread".
7497
b3312d80
DE
74982014-02-19 Doug Evans <dje@google.com>
7499
7500 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7501 All callers updated.
7502
ecc6f45c
DE
75032014-02-19 Doug Evans <dje@google.com>
7504
7505 * inferiors.c (add_thread): Fix whitespace.
7506
649ebbca
DE
75072014-02-19 Doug Evans <dje@google.com>
7508
7509 * dll.c (clear_dlls): Replace accessing list implemention details
7510 with API function.
7511 * gdbthread.h (get_first_thread): Declare.
7512 * inferiors.c (for_each_inferior_with_data): New function.
7513 (get_first_thread): New function.
7514 (find_thread_ptid): Simplify.
7515 (get_first_inferior): New function.
7516 (clear_list): Delete.
7517 (one_inferior_p): New function.
7518 (clear_inferior_list): New function.
7519 (clear_inferiors): Update.
7520 * inferiors.h (for_each_inferior_with_data): Declare.
7521 (clear_inferior_list): Declare.
7522 (one_inferior_p): Declare.
7523 (get_first_inferior): Declare.
7524 * linux-low.c (linux_wait_for_event): Replace accessing list
7525 implemention details with API function.
7526 * server.c (target_running): Ditto.
7527 (accumulate_file_name_length): New function.
7528 (emit_dll_description): New function.
7529 (handle_qxfer_libraries): Replace accessing list implemention
7530 details with API function.
7531 (handle_qxfer_threads_worker): New function.
7532 (handle_qxfer_threads_proper): Replace accessing list implemention
7533 details with API function.
7534 (handle_query): Ditto.
7535 (visit_actioned_threads_callback_ftype): New typedef.
7536 (visit_actioned_threads_data): New struct.
7537 (visit_actioned_threads): Rewrite to be find_inferior callback.
7538 (resume): Call find_inferior.
7539 (handle_status): Replace accessing list implemention
7540 details with API function.
7541 (process_serial_event): Replace accessing list implemention details
7542 with API function.
7543 * target.c (set_desired_inferior): Replace accessing list implemention
7544 details with API function.
7545 * tracepoint.c (same_process_p): New function.
7546 (gdb_agent_about_to_close): Replace accessing list implemention
7547 details with API function.
7548 * win32-low.c (child_delete_thread): Replace accessing list
7549 implemention details with API function.
7550 (match_dll_by_basename): New function.
7551 (dll_is_loaded_by_basename): New function.
7552 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7553 details call to dll_is_loaded_by_basename.
7554
80894984
DE
75552014-02-19 Doug Evans <dje@google.com>
7556
7557 * dll.h (struct dll_info): Add comment.
7558 * gdbthread.h (struct thread_info): Add comment.
7559 (current_ptid): Simplify.
7560 * inferiors.c (add_process): Update.
7561 (remove_process): Update.
7562 * inferiors.h (struct process_info): Rename member "head" to "entry".
7563 * linux-low.c (delete_lwp): Update.
7564 (add_lwp): Update.
7565 (last_thread_of_process_p): Update.
7566 (kill_one_lwp_callback, linux_kill): Update.
7567 (status_pending_p_callback): Update.
7568 (wait_for_sigstop): Update. Simplify read of ptid.
7569 (start_step_over): Update.
7570 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7571 (get_lwp_thread): Update.
7572 (struct lwp_info): Rename member "head" to "entry".
7573 * regcache.h (inferior_list_entry): Delete.
7574 * server.c (kill_inferior_callback): Update.
7575 (detach_or_kill_inferior_callback): Update.
7576 (print_started_pid): Update.
7577 (print_attached_pid): Update.
7578 (process_serial_event): Simplify read of ptid.
7579 * thread-db.c (thread_db_create_event): Update.
7580 (thread_db_get_tls_address): Update.
7581 * win32-low.c (current_inferior_ptid): Simplify.
7582
46917d26
TT
75832014-02-19 Tom Tromey <tromey@redhat.com>
7584
7585 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7586 argument.
7587 (target_supports_btrace): Update.
7588
0759a81e
YQ
75892014-02-14 Yao Qi <yao@codesourcery.com>
7590
7591 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7592 (rsp-low-ipa.o): New target.
7593
a7191e8b
TT
75942014-02-12 Tom Tromey <tromey@redhat.com>
7595
7596 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7597 convert_ascii_to_int.
7598 * regcache.c (registers_to_string): Likewise.
7599 * remote-utils.c (decode_M_packet): Likewise.
7600 * server.c (process_serial_event): Likewise.
7601
ff0e980e
TT
76022014-02-12 Tom Tromey <tromey@redhat.com>
7603
7604 * server.c (handle_query, handle_v_run): Use hex2bin, not
7605 unhexify.
7606 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7607
e9371aff
TT
76082014-02-12 Tom Tromey <tromey@redhat.com>
7609
7610 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7611 convert_int_to_ascii.
7612 * regcache.c (registers_to_string, collect_register_as_string):
7613 Likewise.
7614 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7615 Likewise.
7616 * server.c (process_serial_event): Likewise.
7617 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7618 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7619
971dc0b8
TT
76202014-02-12 Tom Tromey <tromey@redhat.com>
7621
7622 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7623 bin2hex, not hexify.
7624 * tracepoint.c (cmd_qtstatus): Likewise.
7625
0a822afb
TT
76262014-02-12 Tom Tromey <tromey@redhat.com>
7627
7628 * remote-utils.c (monitor_output): Pass explicit length to
7629 hexify.
7630
9c3d6531
TT
76312014-02-12 Tom Tromey <tromey@redhat.com>
7632
7633 * tracepoint.c: Include rsp-low.h.
7634 * server.c: Include rsp-low.h.
7635 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7636 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7637 declare.
7638 * remote-utils.c: Include rsp-low.h.
7639 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7640 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7641 (convert_int_to_ascii, convert_ascii_to_int): Move to
7642 common/rsp-low.c.
7643 * regcache.c: Include rsp-low.h.
7644 * ax.c: Include rsp-low.h.
7645 * Makefile.in (SFILES): Add common/rsp-low.c.
7646 (OBS): Add rsp-low.o.
7647 (rsp-low.o): New target.
7648
01fd3ea5
TT
76492014-02-12 Tom Tromey <tromey@redhat.com>
7650
7651 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7652 Include print-utils.h.
7653 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7654 (plongest, thirty_two, phex_nz): Remove.
7655 * Makefile.in (SFILES): Add common/print-utils.c.
7656 (OBS): Add print-utils.o.
7657 (print-utils-ipa.o): New target.
7658 (print-utils.o): New target.
7659 (IPA_OBJS): Add print-utils-ipa.o.
7660
e99dc820
TT
76612014-02-06 Tom Tromey <tromey@redhat.com>
7662
7663 * Makefile.in (SFILES): Fix indentation.
7664
ee1e2d4f
DE
76652014-02-05 Doug Evans <dje@google.com>
7666
7667 * linux-low.c (linux_wait_for_event): Improve comment.
7668 (linux_wait_1): Keep current_inferior in sync with event_child.
7669
f5a02773
DE
76702014-01-22 Doug Evans <dje@google.com>
7671
7672 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7673
87ce2a04
DE
76742014-01-22 Doug Evans <dje@google.com>
7675
7676 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7677 * configure: Regenerate.
7678 * config.in: Regenerate.
7679 * Makefile.in (SFILES): Add debug.c.
7680 (OBS): Add debug.o.
7681 * debug.c: New file.
7682 * debug.h: New file.
7683 * linux-aarch64-low.c (*): Update all debugging printfs to use
7684 debug_printf instead of fprintf.
7685 * linux-arm-low.c (*): Ditto.
7686 * linux-cris-low.c (*): Ditto.
7687 * linux-crisv32-low.c (*): Ditto.
7688 * linux-m32r-low.c (*): Ditto.
7689 * linux-sparc-low.c (*): Ditto.
7690 * linux-x86.c (*): Ditto.
7691 * linux-low.c (*): Ditto.
7692 (linux_wait_1): Add calls to debug_enter, debug_exit.
7693 (linux_wait): Remove redundant debugging printf.
7694 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7695 (linux_resume, unstop_all_lwps): Ditto.
7696 * mem-break.c (*): Update all debugging printfs to use
7697 debug_printf instead of fprintf.
7698 * remote-utils.c (*): Ditto.
7699 * thread-db.c (*): Ditto.
7700 * server.c #include <ctype.h>, "gdb_vecs.h".
7701 (debug_threads): Moved to debug.c.
7702 (*): Update all debugging printfs to use debug_printf instead of
7703 fprintf.
7704 (start_inferior): Replace call to fflush with call to debug_flush.
7705 (monitor_show_help): Mention set debug-format.
7706 (parse_debug_format_options): New function.
7707 (handle_monitor_command): Handle "monitor set debug-format".
7708 (gdbserver_usage): Mention --debug-format.
7709 (main): Parse --debug-format.
7710 * server.h (debug_threads): Declaration moved to debug.h.
7711 #include "debug.h".
7712 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7713 trace_debug_1 that uses debug_printf.
7714 (tracepoint_look_up_symbols): Update all debugging printfs to use
7715 debug_printf instead of fprintf.
7716
e671835b
BS
77172014-01-20 Baruch Siach <baruch@tkos.co.il>
7718
7719 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7720 sys/ptrace.h.
7721
b5737fa9
PA
77222014-01-17 Pedro Alves <palves@redhat.com>
7723
ea38d2a9 7724 PR build/16445
c7faa97a
PA
7725 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7726 defined after including gdb_proc_service.h.
b5737fa9 7727
40ed484e
DE
77282014-01-16 Doug Evans <dje@google.com>
7729
7730 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7731 (match_dll): Use it.
7732
969c39fb
MM
77332014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7734
7735 * target.h (target_ops) <read_btrace>: Change parameters and
7736 return type to allow error reporting.
7737 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7738 trace reading errors on.
7739 * linux-low.c (linux_low_read_btrace): Pass trace reading
7740 errors on.
7741 (linux_low_disable_btrace): New.
7742
ab7f45ba
DE
77432014-01-15 Doug Evans <dje@google.com>
7744
7745 * inferiors.c (thread_id_to_gdb_id): Delete.
7746 * inferiors.h (thread_id_to_gdb_id): Delete.
7747
66af0f44
EZ
77482014-01-13 Eli Zaretskii <eliz@gnu.org>
7749
7750 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7751 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7752 versions.
7753
9939e131
PA
77542014-01-08 Pedro Alves <palves@redhat.com>
7755
7756 * server.c (handle_status): Don't discard previous queued stop
7757 replies or thread's pending status here.
7758 (main) <disconnection>: Do it here instead.
7759
b7ea362b
PA
77602014-01-08 Pedro Alves <palves@redhat.com>
7761
7762 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7763 * server.c (visit_actioned_threads, handle_pending_status): New
7764 function.
7765 (handle_v_cont): Factor out parts to ...
7766 (resume): ... this new function. If in all-stop, and a thread
7767 being resumed has a pending status, report it without actually
7768 resuming.
7769 (myresume): Adjust to use the new 'resume' function.
7770 (clear_pending_status_callback, set_pending_status_callback)
7771 (find_status_pending_thread_callback): New functions.
7772 (handle_status): Handle the case of multiple threads having
7773 interesting statuses to report. Report threads' real last signal
7774 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7775 with an interesting thread to report the status for, instead of
7776 always reporting the status of the first thread.
7777
28498c42
JB
77782014-01-01 Joel Brobecker <brobecker@adacore.com>
7779
7780 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7781 * gdbreplay.c (gdbreplay_version): Likewise.
7782
f45c82da
YZ
77832013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7784
7785 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7786 iov.iov_len with the real length in use.
7787
379a5e2d
JB
77882013-12-13 Joel Brobecker <brobecker@adacore.com>
7789
7790 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7791 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7792 for all targets that use win32-low.c.
7793 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7794 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7795
4210d83e
PA
77962013-12-13 Pedro Alves <palves@redhat.com>
7797
7798 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7799 if equal to TARGET_WAITKIND_LOADED.
7800 * win32-low.c (cached_status): New static global.
7801 (win32_wait): Add declaration.
7802 (do_initial_child_stuff): Flush all initial pending debug events
7803 up to the initial breakpoint.
7804 (win32_wait): If CACHED_STATUS was set, return that instead
7805 of doing a real wait. Remove the code resuming the execution
7806 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7807 during the initial phase. Also remove the code changing
7808 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7809 TARGET_WAITKIND_STOPPED.
7810
e7f0d979
YQ
78112013-12-11 Yao Qi <yao@codesourcery.com>
7812
7813 * notif.c (handle_notif_ack): Return 0 if no notification
7814 matches.
7815
ebcf782c
DE
78162013-11-20 Doug Evans <dje@google.com>
7817
7818 * linux-low.c (linux_set_resume_request): Fix comment.
7819
20ad9378
DE
78202013-11-20 Doug Evans <dje@google.com>
7821
7822 * linux-low.c (resume_status_pending_p): Tweak comment.
7823
a196ebeb
WT
78242013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7825
7826 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7827 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7828 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7829 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7830 (srv_amd64_regobj): Add amd64-mpx.o.
7831 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7832 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7833 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7834 * i387-fp.c (num_pl_bnd_register) Added constant.
7835 (num_pl_bnd_cfg_registers) Added constant.
7836 (struct i387_xsave) Added reserved area and MPX fields.
7837 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7838 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7839 function.
7840 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7841 (init_registers_amd64_mpx_linux): Declare new function.
7842 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7843 (x86_64_regmap): Add MPX registers.
7844 (x86_linux_read_description): Add MPX case.
7845 (initialize_low_arch): Initialize MPX targets.
7846
0080a2f6
TT
78472013-11-18 Tom Tromey <tromey@redhat.com>
7848
7849 * configure: Rebuild.
7850 * configure.ac: Don't check for stdlib.h.
7851 * gdbreplay.c: Unconditionally include stdlib.h.
7852
2978b111
TT
78532013-11-18 Tom Tromey <tromey@redhat.com>
7854
7855 * config.in: Rebuild.
7856 * configure: Rebuild.
7857 * configure.ac: Don't use AC_HEADER_DIRENT.
7858
a3d08894
TT
78592013-11-18 Tom Tromey <tromey@redhat.com>
7860
7861 * server.h: Don't check HAVE_STRING_H.
7862 * gdbreplay.c: Don't check HAVE_STRING_H.
7863 * configure: Rebuild.
7864
0a5dd17d
TT
78652013-11-18 Tom Tromey <tromey@redhat.com>
7866
7867 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7868 LIBGNU.
7869
1bd2f0ba
TT
78702013-11-08 Tom Tromey <tromey@redhat.com>
7871
7872 * configure, config.in: Rebuild.
7873 * configure.ac: Remove unused configury.
7874
3266f10b
TT
78752013-11-08 Tom Tromey <tromey@redhat.com>
7876
7877 * acinclude.m4: Include common.m4, codeset.m4.
7878 * configure, config.in: Rebuild.
7879 * configure.ac: Use GDB_AC_COMMON.
7880
6682d959
AA
78812013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7882
7883 * linux-s390-low.c (HWCAP_S390_TE): New define.
7884 (s390_arch_setup): Consider the TE field in the HWCAP for
7885 determining 'have_regset_tdb'.
7886
fd0a4d76
SDJ
78872013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7888
7889 PR gdb/16014
7890 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7891 call to sizeof.
7892
1a3d890b
PA
78932013-10-02 Pedro Alves <palves@redhat.com>
7894
7895 * server.c (process_serial_event): Don't output "GDBserver
7896 exiting" if GDB is connected through stdio.
7897 * target.c (mywait): Likewise, be silent if GDB is connected
7898 through stdio.
7899
97ad4581
JB
79002013-10-01 Joel Brobecker <brobecker@adacore.com>
7901
7902 * lynx-low.c (lynx_add_threads_after_attach): New function.
7903 (lynx_attach): Remove call to add_thread. Add call to
7904 lynx_add_threads_after_attach instead.
7905
5b4e221c
MF
79062013-09-28 Mike Frysinger <vapier@gentoo.org>
7907
7908 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7909 * config.in, configure: Regenerated.
7910
ee47b2f8
YQ
79112013-09-18 Yao Qi <yao@codesourcery.com>
7912
7913 PR server/15959
7914 * server.c (start_inferior): Clear 'resume_info'.
7915
d6707650 79162013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7917
d6707650
JW
7918 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7919 for each register.
7920
9243dd0e 79212013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7922
9243dd0e
JW
7923 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7924 linux-tile-low.o to srv_tgtobj.
7925
c623a6ef
WN
79262013-09-16 Will Newton <will.newton@linaro.org>
7927
7928 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7929 out regs.
7930
fb71d39e
PA
79312013-09-06 Pedro Alves <palves@redhat.com>
7932
7933 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7934 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7935 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7936 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7937 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7938 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7939
8e7e9910
PA
79402013-09-06 Pedro Alves <palves@redhat.com>
7941
7942 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7943 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7944
7c3a12ca
PA
79452013-09-06 Pedro Alves <palves@redhat.com>
7946
7947 * linux-amd64-ipa.c: Include tracepoint.h.
7948 * linux-i386-ipa.c: Include tracepoint.h.
7949
8eb3d7b6
RW
79502013-09-06 Ricard Wanderlof <ricardw@axis.com>
7951
7952 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7953 (ps_get_thread_area): New function.
7954
eddddb9d
RW
79552013-09-06 Ricard Wanderlof <ricardw@axis.com>
7956
7957 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7958 (initialize_low_arch): Call init_registers_crisv32 rather than
7959 init_register_crisv32.
7960
533b0600
PA
79612013-09-05 Pedro Alves <palves@redhat.com>
7962
7963 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7964 to ...
7965 * hostio.h: ... this new file.
7966 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7967 win32-low.c: Include hostio.h.
7968
0ce3d3b5
PA
79692013-09-05 Pedro Alves <palves@redhat.com>
7970
7971 * server.h (gdb_client_data, handler_func, callback_handler_func)
7972 (delete_file_handler, add_file_handler, append_callback_event)
7973 (delete_callback_event, start_event_loop, initialize_event_loop):
7974 Move to event-loop.h and include it.
7975 * event-loop.h: New file.
7976
799cdc37
PA
79772013-09-05 Pedro Alves <palves@redhat.com>
7978
7979 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7980 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7981 (loaded_dll, unloaded_dll): Move to ...
7982 * dll.h: ... this new file.
7983 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7984
6a6bbd9d
PA
79852013-09-05 Pedro Alves <palves@redhat.com>
7986
7987 * server.h (current_process, get_thread_process, all_processes)
7988 (add_inferior_to_list, for_each_inferior, current_inferior)
7989 (remove_inferior, add_process, remove_process, find_process_pid)
7990 (have_started_inferiors_p, have_attached_inferiors_p)
7991 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7992 (clear_inferiors, find_inferior, find_inferior_id)
7993 (inferior_target_data, set_inferior_target_data)
7994 (inferior_regcache_data, set_inferior_regcache_data): Move to
7995 inferiors.h, and include it.
7996 * inferiors.h: New file.
7997
f699aaba
PA
79982013-09-05 Pedro Alves <palves@redhat.com>
7999
8000 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8001 Move ...
72f4393d 8002 * ax.h: ... here.
f699aaba 8003
c144c7a0
PA
80042013-09-05 Pedro Alves <palves@redhat.com>
8005
8006 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8007 tracepoint.h.
8008 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8009 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8010 (handle_tracepoint_general_set, handle_tracepoint_query)
8011 (tracepoint_finished_step, tracepoint_was_hit)
8012 (release_while_stepping_state_list, current_traceframe)
8013 (in_readonly_region, traceframe_read_mem)
8014 (fetch_traceframe_registers, traceframe_read_sdata)
8015 (traceframe_read_info, struct fast_tpoint_collect_status)
8016 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8017 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8018 (supply_fast_tracepoint_registers)
8019 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8020 (ipa_tdesc, claim_trampoline_space)
8021 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8022 (agent_mem_read, agent_get_trace_state_variable_value)
8023 (agent_set_trace_state_variable_value, agent_tsv_read)
8024 (agent_mem_read_string, get_raw_reg_func_addr)
8025 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8026 * tracepoint.h: ... this new file.
8027
ff42e6ab
PA
80282013-09-05 Pedro Alves <palves@redhat.com>
8029
8030 * server.h (perror_with_name, error, fatal, warning, paddress)
8031 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8032 include it.
8033 * utils.h: New file.
8034
541af0f4
PA
80352013-09-05 Pedro Alves <palves@redhat.com>
8036
8037 * server.h (remote_debug, noack_mode, transport_is_reliable)
8038 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8039 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8040 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8041 (write_enn, initialize_async_io, enable_async_io)
8042 (disable_async_io, check_remote_input_interrupt_request)
8043 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8044 (dead_thread_notify, prepare_resume_reply)
8045 (decode_address_to_semicolon, decode_address, decode_m_packet)
8046 (decode_M_packet, decode_X_packet, decode_xfer_write)
8047 (decode_search_memory_packet, unhexify, hexify)
8048 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8049 (look_up_one_symbol, relocate_instruction)
8050 (monitor_output): Move to remote-utils.h, and include it.
8051 * remote-utils.h: New file.
8052
eebdf26b
PA
80532013-09-05 Pedro Alves <palves@redhat.com>
8054
8055 * server.h (_): Delete.
8056
3aafd2ff
PA
80572013-09-02 Pedro Alves <palves@redhat.com>
8058
8059 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8060 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8061 allocated.
8062 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8063
cee83bcb
PM
80642013-09-02 Pierre Muller <muller@sourceware.org>
8065
8066 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8067 or WriteProcessMemory complete successfully and handle
8068 ERROR_PARTIAL_COPY error.
8069
9a13b2fa
PA
80702013-09-02 Pedro Alves <palves@redhat.com>
8071
8072 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8073 error instead of EIO.
8074
602e3198
JK
80752013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8076
8077 PR server/15604
8078 * linux-low.c: Include filestuff.h.
8079 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8080 * lynx-low.c: Include filestuff.h.
8081 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8082 * server.c: Include filestuff.h.
8083 (main): Call notice_open_fds.
8084 * spu-low.c: Include filestuff.h.
8085 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8086
96d7229d
LM
80872013-08-22 Luis Machado <lgustavo@codesourcery.com>
8088
8089 * Makefile.in: Explain why ../target and ../nat are not
8090 listed as include file search paths.
8091 (linux-waitpid.o): New object file rule.
8092 * configure.srv (srv_native_linux_obj): New variable.
8093 Replace all occurrences of linux native object files with
8094 $srv_native_linux_obj.
8095 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8096 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8097 (linux_enable_event_reporting): Remove declaration.
8098 (my_waitpid): Moved to common/linux-waitpid.c.
8099 (linux_wait_for_event): Pass ptid when calling
8100 linux_enable_event_reporting.
8101 (linux_supports_tracefork_flag): Remove.
8102 (linux_enable_event_reporting): Likewise.
8103 (linux_tracefork_grandchild): Remove.
8104 (STACK_SIZE): Moved to common/linux-ptrace.c.
8105 (linux_tracefork_child): Remove.
8106 (linux_test_for_tracefork): Remove.
8107 (linux_look_up_symbols): Call linux_supports_traceclone.
8108 (initialize_low): Remove call to linux_test_for_tracefork.
8109 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8110 common/linux-ptrace.h.
8111 (PTRACE_TYPE_ARG4): Likewise.
8112 Include linux-ptrace.h.
8113
32940073
PA
81142013-08-21 Pedro Alves <palves@redhat.com>
8115
8116 * config.in: Renegerate.
8117
33b60d58 81182013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8119
33b60d58
LM
8120 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8121 (SFILES): Remove $(srcdir)/common/target-common.c and
8122 add $(srcdir)/target/waitstatus.c.
8123 (OBS): Remove target-common.o and add waitstatus.o.
8124 (server_h): Remove $(srcdir)/../common/target-common.h and
8125 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8126 and $(srcdir)/../target/waitstatus.h.
8127 (target-common.o): Remove.
8128 (waitstatus.o): New target object file.
8129 * target.h: Do not include target-common.h and
8130 include target/resume.h, target/wait.h and
8131 target/waitstatus.h.
8132
b8e1b30e
LM
81332013-08-13 Luis Machado <lgustavo@codesourcery.com>
8134
8135 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8136 to PTRACE_TYPE_ARG3.
8137 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8138 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8139 PTRACE_TYPE_ARG4.
8140 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8141 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8142
7a60ad40
YQ
81432013-07-27 Jie Zhang <jie@codesourcery.com>
8144 Daniel Jacobowitz <dan@codesourcery.com>
8145 Yao Qi <yao@codesourcery.com>
8146
8147 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8148 (mips-linux-watch.o): New rule.
8149 (mips_linux_watch_h): New variable.
8150 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8151 srv_tgtobj.
8152 * linux-mips-low.c: Include mips-linux-watch.h.
8153 (struct arch_process_info, struct arch_lwp_info): New.
8154 (update_watch_registers_callback): New function.
8155 (mips_linux_new_process, mips_linux_new_thread) New functions.
8156 (mips_linux_prepare_to_resume, mips_insert_point): New
8157 functions.
8158 (mips_remove_point, mips_stopped_by_watchpoint): New
8159 functions.
8160 (rsp_bp_type_to_target_hw_bp_type): New function.
8161 (mips_stopped_data_address): New function.
8162 (the_low_target): Add watchpoint support functions.
8163
de6f69ad
YQ
81642013-07-27 Yao Qi <yao@codesourcery.com>
8165
8166 * i386-low.c: Include break-common.h.
8167 (enum target_hw_bp_type): Remove.
8168
3360c0bf
LM
81692013-07-24 Luis Machado <lgustavo@codesourcery.com>
8170
8171 * Makefile.in (SFILES): /common/target-common.c.
8172 (OBS): Add target-common.o.
8173 (server_h): Add $(srcdir)/../common/target-common.h.
8174 (target-common.o): New target.
8175 * server.c (queue_stop_reply_callback): Free
8176 status string after use.
8177 * target.c (target_waitstatus_to_string): Remove.
8178 * target.h: Include target-common.h.
8179 (resume_kind): Likewise.
8180 (target_waitkind): Likewise.
8181 (target_waitstatus): Likewise.
8182 (TARGET_WNOHANG): Likewise.
8183
bd885420
YQ
81842013-07-04 Yao Qi <yao@codesourcery.com>
8185
8186 * Makefile.in (host_alias): Use @host_noncanonical@.
8187 (target_alias): Use @target_noncanonical@.
8188 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8189 ACX_NONCANONICAL_HOST.
8190 * configure: Regenerated.
8191
8192 Revert:
8193 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8194
8195 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8196 * configure: Rebuild.
8197 * Makefile.in (version_host, version_target): Get from configure.
8198 (version.c): Use $(version_host) and $(version_target).
8199
17ef446e
PA
82002013-07-03 Pedro Alves <palves@redhat.com>
8201
8202 * Makefile.in (config.status): Depend on development.sh.
8203 * acinclude.m4: Include libmcheck.m4.
8204 * configure: Regenerate.
8205
7a9a7487
MG
82062013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8207
8208 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8209 attribute inside the parentheses.
8210 (winapi_DebugSetProcessKillOnExit): Ditto.
8211 (winapi_DebugBreakProcess): Ditto.
8212 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8213
49b64de6
MG
82142013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8215
8216 * notif.h (notif_event): Add a dummy member to avoid compiler
8217 errors.
8218
d5749ee7
PA
82192013-07-01 Pedro Alves <palves@redhat.com>
8220
8221 * hostio.c (HOSTIO_PATH_MAX): Define.
8222 (require_filename, handle_open, handle_unlink, handle_readlink):
8223 Use it.
8224
d8d2a3ee
PA
82252013-07-01 Pedro Alves <palves@redhat.com>
8226
8227 * server.h: Include "pathmax.h".
8228 * linux-low.c: Don't include sys/param.h.
8229 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8230 MAXPATHLEN.
8231 * win32-low.c: Don't include sys/param.h.
8232 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8233
bc7dea8d
PA
82342013-07-01 Pedro Alves <palves@redhat.com>
8235
8236 * event-loop.c: Don't check HAVE_UNISTD_H before including
8237 <unistd.h>.
8238 * gdbreplay.c: Likewise.
8239 * remote-utils.c: Likewise.
8240 * server.c: Likewise.
8241 * configure.ac: Don't check for unistd.h.
8242 * configure: Regenerate.
8243
d6c2da54
TT
82442013-06-28 Tom Tromey <tromey@redhat.com>
8245
8246 * Makefile.in (version.c): Use version.in, not
8247 common/version.in.
8248
257b6bec
MG
82492013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8250
8251 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8252 * configure: Rebuild.
8253 * Makefile.in (version_host, version_target): Get from configure.
8254 (version.c): Use $(version_host) and $(version_target).
8255
86ebe149
DK
82562013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8257
8258 Fix trace-status to output user name without trailing colon.
8259 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8260
f30aa5af
DK
82612013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8262
8263 Fix trace-status to output proper start-time and stop-time.
8264 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8265 output start time and stop time in hex as gdb expects.
8266
28a93511
YQ
82672013-06-26 Pedro Alves <pedro@codesourcery.com>
8268
8269 * tracepoint.c (build_traceframe_info_xml): Output trace state
8270 variables present in the trace buffer.
8271
01208463
TT
82722013-06-24 Tom Tromey <tromey@redhat.com>
8273
8274 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8275 create-version.sh.
8276 (version.o): Remove.
8277 * gdbreplay.c: Include version.h.
8278 (version, host_name): Don't declare.
8279 * server.h: Include version.h.
8280 (version, host_name): Don't declare.
8281
760256f9
PA
82822013-06-12 Pedro Alves <palves@redhat.com>
8283
8284 * linux-x86-low.c (linux_is_elf64): Delete global.
8285 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8286 with local linux_pid_exe_is_elf_64_file use.
8287
030031ee
PA
82882013-06-11 Pedro Alves <palves@redhat.com>
8289
8290 * linux-low.c (regset_disabled, disable_regset): New functions.
8291 (regsets_fetch_inferior_registers)
8292 (regsets_store_inferior_registers): Use them.
8293 (initialize_regsets_info); Don't allocate the disabled_regsets
8294 array here.
8295 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8296 comment.
8297
5da6eb0a
PA
82982013-06-11 Pedro Alves <palves@redhat.com>
8299
8300 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8301 xmalloc.
8302
7e5aaa09
PA
83032013-06-11 Pedro Alves <palves@redhat.com>
8304
8305 * linux-x86-low.c (initialize_low_arch): Call
8306 init_registers_x32_avx_linux.
8307
d878444c
JK
83082013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8309
8310 Fix compatibility with Android Bionic.
8311 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8312 it is not empty.
8313
3aee8918
PA
83142013-06-07 Pedro Alves <palves@redhat.com>
8315
5f2b57b5 8316 PR server/14823
3aee8918
PA
8317 * Makefile.in (OBS): Add tdesc.o.
8318 (IPA_OBJS): Add tdesc-ipa.o.
8319 (tdesc-ipa.o): New rule.
8320 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8321 interface.
8322 * linux-low.c (new_inferior): Delete.
8323 (disabled_regsets, num_regsets): Delete.
8324 (linux_add_process): Adjust to set the new per-process
8325 new_inferior flag.
8326 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8327 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8328 was a stop. When calling arch_setup, switch the current inferior
8329 to the thread that got an event.
8330 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8331 (regsets_fetch_inferior_registers)
8332 (regsets_store_inferior_registers): New regsets_info parameter.
8333 Adjust to use it.
8334 (linux_register_in_regsets): New regs_info parameter. Adjust to
8335 use it.
8336 (register_addr, fetch_register, store_register): New usrregs_info
8337 parameter. Adjust to use it.
8338 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8339 parameter regs_info. Adjust to use it.
8340 (linux_fetch_registers): Get the current inferior's regs_info, and
8341 adjust to use it.
8342 (linux_store_registers): Ditto.
8343 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8344 (initialize_low): Don't initialize the target_regsets here. Call
8345 initialize_low_arch.
8346 * linux-low.h (target_regsets): Delete declaration.
8347 (struct regsets_info): New.
8348 (struct usrregs_info): New.
8349 (struct regs_info): New.
8350 (struct process_info_private) <new_inferior>: New field.
8351 (struct linux_target_ops): Delete the num_regs, regmap, and
8352 regset_bitmap fields. New field regs_info.
8353 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8354 * i387-fp.c (num_xmm_registers): Delete.
8355 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8356 calls to new interface.
8357 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8358 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8359 Infer the number of xmm registers from the regcache's target
8360 description.
8361 * i387-fp.h (num_xmm_registers): Delete.
8362 * inferiors.c (add_thread): Don't install the thread's regcache
8363 here.
8364 * proc-service.c (gregset_info): Fetch the current inferior's
8365 regs_info. Adjust to use it.
8366 * regcache.c: Include tdesc.h.
8367 (register_bytes, reg_defs, num_registers)
8368 (gdbserver_expedite_regs): Delete.
8369 (get_thread_regcache): If the thread doesn't have a regcache yet,
8370 create one, instead of aborting gdbserver.
8371 (regcache_invalidate_one): Rename to ...
8372 (regcache_invalidate_thread): ... this.
8373 (regcache_invalidate_one): New.
8374 (regcache_invalidate): Only invalidate registers of the current
8375 process.
8376 (init_register_cache): Add target_desc parameter, and use it.
8377 (new_register_cache): Ditto. Assert the target description has a
8378 non zero registers_size.
8379 (regcache_cpy): Add assertions. Adjust.
8380 (realloc_register_cache, set_register_cache): Delete.
8381 (registers_to_string, registers_from_string): Adjust.
8382 (find_register_by_name, find_regno, find_register_by_number)
8383 (register_cache_size): Add target_desc parameter, and use it.
8384 (free_register_cache_thread, free_register_cache_thread_one)
8385 (regcache_release, register_cache_size): New.
8386 (register_size): Add target_desc parameter, and use it.
8387 (register_data, supply_register, supply_register_zeroed)
8388 (supply_regblock, supply_register_by_name, collect_register)
8389 (collect_register_as_string, collect_register_by_name): Adjust.
8390 * regcache.h (struct target_desc): Forward declare.
8391 (struct regcache) <tdesc>: New field.
8392 (init_register_cache, new_register_cache): Add target_desc
8393 parameter.
8394 (regcache_invalidate_thread): Declare.
8395 (regcache_invalidate_one): Delete declaration.
8396 (regcache_release): Declare.
8397 (find_register_by_number, register_cache_size, register_size)
8398 (find_regno): Add target_desc parameter.
8399 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8400 declarations.
8401 * remote-utils.c: Include tdesc.h.
8402 (outreg, prepare_resume_reply): Adjust.
8403 * server.c: Include tdesc.h.
8404 (gdbserver_xmltarget): Delete declaration.
8405 (get_features_xml, process_serial_event): Adjust.
8406 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8407 declare.
8408 (struct process_info) <tdesc>: New field.
8409 (ipa_tdesc): Declare.
8410 * tdesc.c: New file.
8411 * tdesc.h: New file.
8412 * tracepoint.c: Include tdesc.h.
8413 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8414 (get_context_regcache): Adjust to pass ipa_tdesc down.
8415 (do_action_at_tracepoint): Adjust to get the register cache size
8416 from the context regcache's description.
8417 (traceframe_walk_blocks): Adjust to get the register cache size
8418 from the current trace frame's description.
8419 (traceframe_get_pc): Adjust to get current trace frame's
8420 description and pass it down.
8421 (gdb_collect): Adjust to get the register cache size from the
8422 IPA's description.
8423 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8424 (gdbserver_xmltarget): Delete.
8425 (initialize_low_tracepoint): Set the ipa's target description.
8426 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8427 (initialize_low_tracepoint): Set the ipa's target description.
8428 * linux-x86-low.c: Include tdesc.h.
8429 [__x86_64__] (is_64bit_tdesc): New.
8430 (ps_get_thread_area, x86_get_thread_area): Use it.
8431 (i386_cannot_store_register): Rename to ...
8432 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8433 (i386_cannot_fetch_register): Rename to ...
8434 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8435 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8436 to new interface.
8437 (target_regsets): Rename to ...
8438 (x86_regsets): ... this.
8439 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8440 interface.
8441 (x86_siginfo_fixup): Use is_64bit_tdesc.
8442 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8443 (tdesc_x32_avx_linux, tdesc_x32_linux)
8444 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8445 Declare.
8446 (x86_linux_update_xmltarget): Delete.
8447 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8448 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8449 (AMD64_LINUX_USER64_CS): New.
8450 (x86_linux_read_description): New, based on
8451 x86_linux_update_xmltarget.
8452 (same_process_callback): New.
8453 (x86_arch_setup_process_callback): New.
8454 (x86_linux_update_xmltarget): New.
8455 (x86_regsets_info): New.
8456 (amd64_linux_regs_info): New.
8457 (i386_linux_usrregs_info): New.
8458 (i386_linux_regs_info): New.
8459 (x86_linux_regs_info): New.
8460 (x86_arch_setup): Reimplement.
8461 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8462 (x86_emit_ops): Ditto.
8463 (the_low_target): Adjust. Install x86_linux_regs_info,
8464 x86_cannot_fetch_register, and x86_cannot_store_register.
8465 (initialize_low_arch): New.
8466 * linux-ia64-low.c (tdesc_ia64): Declare.
8467 (ia64_fetch_register): Adjust.
8468 (ia64_usrregs_info, regs_info): New globals.
8469 (ia64_regs_info): New function.
8470 (the_low_target): Adjust.
8471 (initialize_low_arch): New function.
8472 * linux-sparc-low.c (tdesc_sparc64): Declare.
8473 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8474 Adjust.
8475 (sparc_arch_setup): New function.
8476 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8477 (the_low_target): Adjust.
8478 (initialize_low_arch): New function.
8479 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8480 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8481 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8482 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8483 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8484 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8485 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8486 (tdesc_powerpc_isa205_vsx64l): Declare.
8487 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8488 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8489 (ppc_set_pc, ppc_get_hwcap): Adjust.
8490 (ppc_usrregs_info): Forward declare.
8491 (!__powerpc64__) ppc_regmap_adjusted: New global.
8492 (ppc_arch_setup): Adjust to the current process'es target
8493 description.
8494 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8495 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8496 (ppc_store_evrregset): Adjust.
8497 (target_regsets): Rename to ...
8498 (ppc_regsets): ... this, and make static.
8499 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8500 (ppc_regs_info): New function.
8501 (the_low_target): Adjust.
8502 (initialize_low_arch): New function.
8503 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8504 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8505 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8506 (tdesc_s390x_linux64v2): Declare.
8507 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8508 (s390_fill_gregset, s390_store_last_break): Adjust.
8509 (target_regsets): Rename to ...
8510 (s390_regsets): ... this, and make static.
8511 (s390_get_pc, s390_set_pc): Adjust.
8512 (s390_get_hwcap): New target_desc parameter, and use it.
8513 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8514 (s390_arch_setup): Adjust to set the current process'es target
8515 description. Don't adjust the regmap.
8516 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8517 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8518 (regs_info_3264): New globals.
8519 (s390_regs_info): New function.
8520 (the_low_target): Adjust.
8521 (initialize_low_arch): New function.
8522 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8523 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8524 [__mips64] (init_registers_mips_linux)
8525 (init_registers_mips_dsp_linux): Delete defines.
8526 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8527 (have_dsp): New global.
8528 (mips_read_description): New, based on mips_arch_setup.
8529 (mips_arch_setup): Reimplement.
8530 (get_usrregs_info): New function.
8531 (mips_cannot_fetch_register, mips_cannot_store_register)
8532 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8533 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8534 (target_regsets): Rename to ...
8535 (mips_regsets): ... this, and make static.
8536 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8537 (dsp_regs_info, regs_info): New globals.
8538 (mips_regs_info): New function.
8539 (the_low_target): Adjust.
8540 (initialize_low_arch): New function.
8541 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8542 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8543 Declare.
8544 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8545 (arm_read_description): New, with bits factored from
8546 arm_arch_setup.
8547 (arm_arch_setup): Reimplement.
8548 (target_regsets): Rename to ...
8549 (arm_regsets): ... this, and make static.
8550 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8551 (arm_regs_info): New function.
8552 (the_low_target): Adjust.
8553 (initialize_low_arch): New function.
8554 * linux-m68k-low.c (tdesc_m68k): Declare.
8555 (target_regsets): Rename to ...
8556 (m68k_regsets): ... this, and make static.
8557 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8558 (m68k_regs_info): New function.
8559 (m68k_arch_setup): New function.
8560 (the_low_target): Adjust.
8561 (initialize_low_arch): New function.
8562 * linux-sh-low.c (tdesc_sharch): Declare.
8563 (target_regsets): Rename to ...
8564 (sh_regsets): ... this, and make static.
8565 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8566 (sh_regs_info, sh_arch_setup): New functions.
8567 (the_low_target): Adjust.
8568 (initialize_low_arch): New function.
8569 * linux-bfin-low.c (tdesc_bfin): Declare.
8570 (bfin_arch_setup): New function.
8571 (bfin_usrregs_info, regs_info): New globals.
8572 (bfin_regs_info): New function.
8573 (the_low_target): Adjust.
8574 (initialize_low_arch): New function.
8575 * linux-cris-low.c (tdesc_cris): Declare.
8576 (cris_arch_setup): New function.
8577 (cris_usrregs_info, regs_info): New globals.
8578 (cris_regs_info): New function.
8579 (the_low_target): Adjust.
8580 (initialize_low_arch): New function.
8581 * linux-cris-low.c (tdesc_crisv32): Declare.
8582 (cris_arch_setup): New function.
8583 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8584 (cris_regs_info): New function.
8585 (the_low_target): Adjust.
8586 (initialize_low_arch): New function.
8587 * linux-m32r-low.c (tdesc_m32r): Declare.
8588 (m32r_arch_setup): New function.
8589 (m32r_usrregs_info, regs_info): New globals.
8590 (m32r_regs_info): Adjust.
8591 (initialize_low_arch): New function.
8592 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8593 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8594 (tic6x_usrregs_info): Forward declare.
8595 (tic6x_read_description): New function, based on ...
8596 (tic6x_arch_setup): ... this. Reimplement.
8597 (target_regsets): Rename to ...
8598 (tic6x_regsets): ... this, and make static.
8599 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8600 (tic6x_regs_info): New function.
8601 (the_low_target): Adjust.
8602 (initialize_low_arch): New function.
8603 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8604 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8605 (target_regsets): Rename to ...
8606 (xtensa_regsets): ... this, and make static.
8607 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8608 globals.
8609 (xtensa_arch_setup, xtensa_regs_info): New functions.
8610 (the_low_target): Adjust.
8611 (initialize_low_arch): New function.
8612 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8613 (nios2_arch_setup): Set the current process'es tdesc.
8614 (target_regsets): Rename to ...
8615 (nios2_regsets): ... this.
8616 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8617 (nios2_regs_info): New function.
8618 (the_low_target): Adjust.
8619 (initialize_low_arch): New function.
a261b8f5
PA
8620 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8621 (aarch64_arch_setup): Set the current process'es tdesc.
8622 (target_regsets): Rename to ...
8623 (aarch64_regsets): ... this.
8624 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8625 (aarch64_regs_info): New function.
8626 (the_low_target): Adjust.
8627 (initialize_low_arch): New function.
3aee8918
PA
8628 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8629 globals.
8630 (target_regsets): Rename to ...
8631 (tile_regsets): ... this.
8632 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8633 (tile_regs_info): New function.
8634 (tile_arch_setup): Set the current process'es tdesc.
8635 (the_low_target): Adjust.
8636 (initialize_low_arch): New function.
8637 * spu-low.c (tdesc_spu): Declare.
8638 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8639 * win32-arm-low.c (tdesc_arm): Declare.
8640 (arm_arch_setup): New function.
8641 (the_low_target): Install arm_arch_setup instead of
8642 init_registers_arm.
8643 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8644 (init_windows_x86): Rename to ...
8645 (i386_arch_setup): ... this. Set `win32_tdesc'.
8646 (the_low_target): Adjust.
8647 * win32-low.c (win32_tdesc): New global.
8648 (child_add_thread): Don't create the thread cache here.
8649 (do_initial_child_stuff): Set the new process'es tdesc.
8650 * win32-low.h (struct target_desc): Forward declare.
8651 (win32_tdesc): Declare.
8652 * lynx-i386-low.c (tdesc_i386): Declare global.
8653 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8654 * lynx-low.c (lynx_tdesc): New global.
8655 (lynx_add_process): Set the new process'es tdesc.
8656 * lynx-low.h (struct target_desc): Forward declare.
8657 (lynx_tdesc): Declare global.
8658 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8659 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8660 * nto-low.c (nto_tdesc): New global.
8661 (do_attach): Set the new process'es tdesc.
8662 * nto-low.h (struct target_desc): Forward declare.
8663 (nto_tdesc): Declare.
8664 * nto-x86-low.c (tdesc_i386): Declare.
8665 (nto_x86_arch_setup): Set `nto_tdesc'.
8666
b1fbec62
GB
86672013-06-04 Gary Benson <gbenson@redhat.com>
8668
8669 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8670 to qSupported response when appropriate.
8671 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8672 with nonzero-length annex.
8673 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8674 arguments supplied in annex.
8675
d1ec4ce7
DE
86762013-05-31 Doug Evans <dje@google.com>
8677
ac44adcb 8678 PR server/15594
d1ec4ce7
DE
8679 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8680 64 bits in 64-cross-32 environment.
8681
9b25f2d3
PA
86822013-05-28 Pedro Alves <palves@redhat.com>
8683
8684 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8685 (aarch64-without-fpu.c): Delete rule.
8686 * configure.srv (aarch64*-*-linux*): Remove references to
8687 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8688 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8689 declaration.
8690
6740dc9c
PA
86912013-05-24 Pedro Alves <palves@redhat.com>
8692
8693 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8694 instead of strchr/decode_address. Error if the range isn't split
8695 with a ','. Don't assume there's be a ':' in the action.
8696
c2d6af84
PA
86972013-05-23 Yao Qi <yao@codesourcery.com>
8698 Pedro Alves <palves@redhat.com>
8699
8700 * linux-low.c (lwp_in_step_range): New function.
8701 (linux_wait_1): If the thread was range stepping and stopped
8702 outside the stepping range, report the stop to GDB. Otherwise,
8703 continue stepping. Add range stepping debug output.
8704 (linux_set_resume_request): Copy the step range from the resume
8705 request to the lwp.
8706 (linux_supports_range_stepping): New.
8707 (linux_target_ops) <supports_range_stepping>: Set to
8708 linux_supports_range_stepping.
8709 * linux-low.h (struct linux_target_ops)
8710 <supports_range_stepping>: New field.
8711 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8712 * linux-x86-low.c (x86_supports_range_stepping): New.
8713 (the_low_target) <supports_range_stepping>: Set to
8714 x86_supports_range_stepping.
8715 * server.c (handle_v_cont): Handle 'r' action.
8716 (handle_v_requests): Append ";r" if the target supports range
8717 stepping.
8718 * target.h (struct thread_resume) <step_range_start,
8719 step_range_end>: New fields.
8720 (struct target_ops) <supports_range_stepping>:
8721 New field.
8722 (target_supports_range_stepping): New macro.
8723
58794e1a
JB
87242013-05-17 Joel Brobecker <brobecker@adacore.com>
8725
8726 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8727 confusion in comment.
8728
d631c5a7
JB
87292013-05-17 Joel Brobecker <brobecker@adacore.com>
8730
8731 * lynx-low.c (struct process_info_private): New type.
8732 (lynx_add_process): New function.
8733 (lynx_create_inferior, lynx_attach): Replace calls to
8734 add_process by calls to lynx_add_process.
8735 (lynx_resume): If PTID is null, then try using
8736 current_process()->private->last_wait_event_ptid.
8737 Add comments.
8738 (lynx_clear_inferiors): Delete. The contents of that function
8739 has been inlined in lynx_mourn;
8740 (lynx_wait_1): Save the ptid in the process's private data.
8741 (lynx_mourn): Free the process' private data. Replace call
8742 to lynx_clear_inferiors by call to clear_inferiors.
8743
96f7a20f
YQ
87442013-05-17 Yao Qi <yao@codesourcery.com>
8745
8746 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8747 the right place.
8748
db0dfaa0
LM
87492013-05-16 Luis Machado <lgustavo@codesourcery.com>
8750
8751 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8752 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8753 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8754 PT_TEXT_END_ADDR guards. Update comments.
8755 (linux_target_op) <read_offsets>: Conditionally define to
8756 linux_read_offsets if the target is UCLIBC and if it defines
8757 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8758
68f5f838
SL
87592013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8760 Andrew Jenner <andrew@codesourcery.com>
8761
8762 * Makefile.in (SFILES): Add linux-nios2-low.c.
8763 (clean): Add action to delete nios2-linux.c.
8764 (nios2-linux.c): New rule.
8765 * configure.srv: Add nios2*-*-linux*.
8766 * linux-nios2-low.c: New.
8767
1ebff1fd
HAQ
87682013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8769
8770 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8771
f6150862
HZ
87722013-04-25 Hui Zhu <hui@codesourcery.com>
8773
8774 PR gdb/15186
f6150862
HZ
8775 * ax.c (ax_printf): Add fflush.
8776
614c279d
TT
87772013-04-22 Tom Tromey <tromey@redhat.com>
8778
8779 * Makefile.in (SFILES): Add filestuff.c.
8780 (OBS): Add filestuff.o.
8781 (filestuff.o): New target.
8782 * config.in, configure: Rebuild.
8783 * configure.ac: Check for fdwalk, pipe2.
8784
7d4e5717
PA
87852013-04-17 Pedro Alves <palves@redhat.com>
8786
8787 * configure.ac (USE_THREAD_DB): Delete variable.
8788 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8789 Don't AC_SUBST USE_THREAD_DB.
8790 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8791 * config.in, configure: Regenerate.
8792
d5c93e41
PA
87932013-04-16 Pedro Alves <palves@redhat.com>
8794
8795 * linux-low.h (struct lwp_info) <thread_known>: Move under
8796 the USE_THREAD_DB #ifdef.
8797
04f5fe89
PA
87982013-04-16 Pedro Alves <palves@redhat.com>
8799
8800 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8801 (linux-low.o): Delete rule.
8802 * linux-low.h: Always include "gdb_thread_db.h" instead of
8803 conditionally including thread_db.h.
8804 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8805 HAVE_THREAD_DB_H.
8806
480b27bf
JK
88072013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8808
8809 * Makefile.in (install-only): Fix make install regression.
8810
43662968
JK
88112013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8812
8813 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8814 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8815 installation.
8816 * gdbserver.1: Remove.
8817
3e74e146
PA
88182013-03-22 Pedro Alves <palves@redhat.com>
8819
8820 * linux-low.c (handle_extended_wait): Don't call
8821 linux_enable_event_reporting.
8822
a8347a2a
TT
88232013-03-15 Tony Theodore <tonyt@logyst.com>
8824
8825 PR build/9098:
8826 * Makefile.in (SHELL): Use @SHELL@.
8827
eeb56fa7
SDJ
88282013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8829
8830 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8831 compiler warning.
8832
4fa7e2ff
JB
88332013-03-13 Joel Brobecker <brobecker@adacore.com>
8834
8835 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8836 Remove extraneous NULL element.
8837
8ddb1965
YQ
88382013-03-13 Yao Qi <yao@codesourcery.com>
8839
8840 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8841 'V' block in trace frame.
8842
9accd112
MM
88432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8844
8845 * target.h (struct target_ops): Add btrace ops.
8846 (target_supports_btrace): New macro.
8847 (target_enable_btrace): New macro.
8848 (target_disable_btrace): New macro.
8849 (target_read_btrace): New macro.
8850 * gdbthread.h (struct thread_info): Add btrace field.
8851 * server.c: Include btrace-common.h.
8852 (handle_btrace_general_set): New function.
8853 (handle_btrace_enable): New function.
8854 (handle_btrace_disable): New function.
8855 (handle_general_set): Call handle_btrace_general_set.
8856 (handle_qxfer_btrace): New function.
8857 (struct qxfer qxfer_packets[]): Add btrace entry.
8858 * inferiors.c (remove_thread): Disable btrace.
8859 * linux-low: Include linux-btrace.h.
8860 (linux_low_enable_btrace): New function.
8861 (linux_low_read_btrace): New function.
8862 (linux_target_ops): Add btrace ops.
8863 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8864 Add srv_linux_btrace=yes.
8865 (x86_64-*-linux*): Add linux-btrace.o.
8866 Add srv_linux_btrace=yes.
8867 * configure.ac: Define HAVE_LINUX_BTRACE.
8868 * config.in: Regenerated.
8869 * configure: Regenerated.
8870
5cc22e4c
MM
88712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8872
8873 * server.c (handle_qxfer): Preserve error message if -3 is
8874 returned.
8875 (qxfer): Document the -3 return value.
8876
7c97f91e
MM
88772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8878
8879 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8880 (linux_btrace_h): New variable.
8881 (linux-btrace.o): New rule.
8882
be9a119c 88832013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8884 Hafiz Abid Qadeer <abidh@codesourcery.com>
8885
8886 * tracepoint.c (trace_buffer_size): New global.
8887 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8888 (init_trace_buffer): Change to one-argument function. Allocate
8889 trace buffer memory.
8890 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8891 handle QTBuffer:size packet.
8892 (cmd_bigqtbuffer_size): New function.
8893 (initialize_tracepoint): Call init_trace_buffer with
8894 DEFAULT_TRACE_BUFFER_SIZE.
8895 * server.c (handle_query): Add QTBuffer:size in the
8896 supported packets.
8897
e64f7499
YQ
88982013-03-07 Yao Qi <yao@codesourcery.com>
8899
8900 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8901 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8902 of -1.
8903 (cmd_qtsp): Adjust condition. Do post increment.
8904 Set cur_action and cur_step_action back to 0.
8905
f0ae6fc3
PA
89062013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8907
8908 PR server/15236
8909 * linux-low.c (linux_write_memory): Return early success if LEN is
8910 zero.
8911
b5b0b0af
CV
89122013-03-05 Corinna Vinschen <vinschen@redhat.de>
8913
334ad4a8 8914 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8915
589bc927
TT
89162013-02-28 Tom Tromey <tromey@redhat.com>
8917
8918 * configure.ac: Invoke AC_SYS_LARGEFILE.
8919 * configure, config.in: Rebuild.
8920
dfe07582
CV
89212013-02-28 Corinna Vinschen <vinschen@redhat.com>
8922
8923 * win32-low.c: Throughout, fix format strings and casts of
8924 printf-like functions to avoid type related warnings on all
8925 platforms.
8926 (get_child_debug_event): Print dwDebugEventCode as hex since
8927 that's how it's usually documented.
8928
736cd585
YQ
89292013-02-28 Yao Qi <yao@codesourcery.com>
8930
8931 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8932 pulongest.
8933
e1f58301
JW
89342013-02-27 Jiong Wang <jiwang@tilera.com>
8935
8936 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8937 (reg-tilegx32.c): New rule.
8938 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8939 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8940 different register info initializer according to elf class.
8941 (init_registers_tilgx32): New function. The tilegx32 register info
8942 initializer.
8943 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8944 (tile_store_gregset): Likewise.
8945
d171ca78
YQ
89462013-02-27 Yao Qi <yao@codesourcery.com>
8947
8948 * server.c (process_point_options): Print debug message when
8949 debug_threads is true.
8950
282bbdf3
YQ
89512013-02-26 Yao Qi <yao@codesourcery.com>
8952
8953 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8954
aca22551
PA
89552013-02-19 Pedro Alves <palves@redhat.com>
8956 Kai Tietz <ktietz@redhat.com>
8957
8958 PR gdb/15161
8959
8960 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8961 instead of strtoul to extract address from packet.
8962 (process_serial_event) <'z'>: Likewise.
8963
4f3cee1c
YQ
89642013-02-18 Yao Qi <yao@codesourcery.com>
8965
8966 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8967
8e1d55a3
PA
89682013-02-14 Pedro Alves <palves@redhat.com>
8969
8970 Plug memory leak.
8971
8972 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8973 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8974
458820da
PA
89752013-02-14 Pedro Alves <palves@redhat.com>
8976
8977 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8978
baea0dae
PA
89792013-02-14 Pedro Alves <palves@redhat.com>
8980
8981 * tracepoint.c (save_string): Delete.
8982 (add_tracepoint_action): Use savestring instead of save_string.
8983
0b1afbb3
PA
89842013-02-12 Pedro Alves <palves@redhat.com>
8985
8986 * linux-xtensa-low.c: Ditto.
8987 * xtensa-xtregs.c: Ditto.
8988
8a4ac37e
PA
89892013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8990
8991 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8992 thread_db.
8993
148de6bb
MS
89942013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8995
8996 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8997 aarch64_num_wp_regs and aarch64_num_bp_regs to
8998 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8999
55fac6e0
MS
90002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9001
9002 * linux-aarch64-low.c (ps_get_thread_area): Replace
9003 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9004
176eb98c
MS
90052013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9006 Marcus Shawcroft <marcus.shawcroft@arm.com>
9007 Nigel Stephens <nigel.stephens@arm.com>
9008 Yufeng Zhang <yufeng.zhang@arm.com>
9009
9010 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9011 (aarch64.c, aarch64-without-fpu.c): New targets.
9012 * configure.srv (aarch64*-*-linux*): New.
9013 * linux-aarch64-low.c: New file.
9014
56f7af9c
MS
90152013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9016
43aaf8b6 9017 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9018 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9019 (dequeue_one_deferred_signal, linux_resume_one_thread)
9020 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9021 (linux_tracefork_grandchild, linux_test_for_tracefork)
9022 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9023 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9024 where the argument is 0.
9025
60f662b0
YQ
90262013-01-25 Yao Qi <yao@codesourcery.com>
9027
9028 * event-loop.c: Include "queue.h".
9029 (gdb_event_p): New typedef.
9030 (struct gdb_event) <next_event>: Remove.
9031 (event_queue): Change to QUEUE(gdb_event_p).
9032 (async_queue_event): Remove.
9033 (gdb_event_xfree): New.
9034 (initialize_event_loop): New.
9035 (process_event): Use API from QUEUE.
9036 (wait_for_event): Likewise.
9037 * server.c (main): Call initialize_event_loop.
9038 * server.h (initialize_event_loop): Declare.
9039
5ae4861a
YQ
90402013-01-18 Yao Qi <yao@codesourcery.com>
9041
9042 * ax.h (struct eval_agent_expr_context): New.
9043 (gdb_eval_agent_expr): Update declaration.
9044 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9045 TFRAME. Add new argument CTX.
9046 * server.h (struct eval_agent_expr_context): Declare.
9047 (agent_mem_read, agent_tsv_read): Update declaration.
9048 (agent_mem_read_string): Likewise.
9049 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9050 (add_traceframe_block): Add new argument TPOINT.
9051 Increase TPOINT->traceframe_usage.
9052 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9053 eval_tracepoint_agent_expr.
9054 (condition_true_at_tracepoint): Likewise.
9055 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9056 (agent_mem_read_string, agent_tsv_read): Likewise.
9057
85e00e85
YQ
90582013-01-16 Yao Qi <yao@codesourcery.com>
9059
9060 * linux-low.c (linux_resume_one_lwp): Don't check
9061 'lwp->bp_reinsert != 0'.
9062
4039cf45
JB
90632013-01-07 Joel Brobecker <brobecker@adacore.com>
9064 Pedro Alves <palves@redhat.com>
9065
9066 * lynx-low.c (ptrace_request_to_str): Define a temporary
9067 macro and use it to simplify this function's implementation.
9068
9044dee2
JB
90692013-01-07 Joel Brobecker <brobecker@adacore.com>
9070
9071 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9072 sets errno.
9073
e6352c8f
JB
90742013-01-07 Joel Brobecker <brobecker@adacore.com>
9075
9076 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9077
50681a27
JB
90782013-01-07 Joel Brobecker <brobecker@adacore.com>
9079
9080 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9081
3f6e77ef
JB
90822013-01-07 Joel Brobecker <brobecker@adacore.com>
9083
9084 * lynx-low.c (lynx_resume): Use the resume_info parameter
9085 to determine the ptid for the lynx_ptrace call, unless
9086 it is equal to minus_one_ptid, in which case we use the
9087 ptid of the current_inferior.
9088 (lynx_wait_1): After having received a thread create/exit
9089 event, resume the inferior's execution using the signaling
9090 thread's ptid, rather than the old ptid.
9091
7fda33ae
JB
90922013-01-07 Joel Brobecker <brobecker@adacore.com>
9093
9094 * lynx-low.c (lynx_resume): Delete variable ret.
9095
b9786c74
JB
90962013-01-01 Joel Brobecker <brobecker@adacore.com>
9097
9098 * gdbreplay.c (gdbreplay_version): Update copyright year.
9099 * server.c (gdbserver_version): Likewise.
9100
8b93d60f
JB
91012012-12-17 Joel Brobecker <brobecker@adacore.com>
9102
9103 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9104 new thread.
9105
037335a7
JB
91062012-12-17 Joel Brobecker <brobecker@adacore.com>
9107
9108 * lynx-low.c (ptrace_request_to_str): Add handling for
9109 PTRACE_GETTRACESIG.
9110
52d4cbd8
JB
91112012-12-17 Joel Brobecker <brobecker@adacore.com>
9112
9113 * lynx-low.c (lynx_attach): Delete variable new_process.
9114
ab8f6ca9
JB
91152012-12-17 Joel Brobecker <brobecker@adacore.com>
9116
9117 * lynx-low.c (lynx_create_inferior): Delete variable
9118 new_process.
9119
78cbc024
JB
91202012-12-17 Joel Brobecker <brobecker@adacore.com>
9121
9122 * lynx-low.c (ptrace_request_to_str): Do not handle
9123 PTRACE_GETTHREADLIST if this macro does not exist.
9124
14a00470
YQ
91252012-12-15 Yao Qi <yao@codesourcery.com>
9126
9127 * Makefile.in (OBS): Add notif.o.
9128 * notif.c, notif.h: New.
9129 * server.c: Include "notif.h".
9130 (struct vstop_notif) <next>: Remove.
9131 <base>: New field.
9132 (queue_stop_reply): Update.
9133 (push_event, send_next_stop_reply): Remove.
9134 (discard_queued_stop_replies): Update.
9135 (notif_stop): New variable.
9136 (handle_v_stopped): Remove.
9137 (handle_v_requests): Don't call handle_v_stopped. Call
9138 handle_ack_notif instead.
9139 (queue_stop_reply_callback): Call notif_event_enque instead
9140 of queue_stop_reply.
9141 (handle_status): Don't call send_next_stop_reply, call
9142 notif_write_event instead.
9143 (kill_inferior_callback): Likewise.
9144 (detach_or_kill_inferior_callback): Likewise.
9145 (main): Call initialize_notif.
9146 (process_serial_event): Call QUEUE_is_empty.
9147 (handle_target_event): Call notif_push instead of push event.
9148 * server.h (push_event): Remove declaration.
9149
61c125b9
TT
91502012-12-10 Tom Tromey <tromey@redhat.com>
9151
9152 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9153 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9154 macros.
9155 (.c.o): Rewrite.
9156 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9157 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9158 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9159 (amd64-linux-ipa.o, ax.o): Rewrite.
9160 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9161 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9162 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9163 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9164 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9165 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9166 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9167 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9168 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9169 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9170 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9171 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9172 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9173 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9174 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9175 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9176 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9177 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9178 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9179 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9180 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9181 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9182 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9183 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9184 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9185 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9186 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9187 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9188 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9189 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9190 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9191 (reg-tilegx.o): Remove.
9192 (all_object_files): New macro.
9193 Include .deps files.
9194 * aclocal.m4, configure: Rebuild.
9195 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9196 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9197 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9198
e90e9ad9
TT
91992012-12-05 Tom Tromey <tromey@redhat.com>
9200
9201 PR gdb/14917:
9202 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9203
02d403bf 92042012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9205
9206 * configure.ac: Check for linux/perf_event.h.
9207 * config.in: Regenerated.
9208 * configure: Regenerated.
9209
0270a750
PA
92102012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9211
9212 * hostio.c (handle_readlink): Decrease buffer size
9213 parameter passed to readlink by one byte.
9214
8c29b58e
YQ
92152012-11-26 Yao Qi <yao@codesourcery.com>
9216
9217 * configure.ac (build_warnings): Append '-Wempty-body'.
9218 * configure: Regenerated.
9219 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9220 body.
9221
8bdce1ff
PM
92222012-11-15 Pierre Muller <muller@sourceware.org>
9223
9224 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9225 * config.in: Regenerate.
9226 * configure: Regenerate.
9227 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9228 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9229 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9230 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9231 header.
9232 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9233 instead of <sys/wait.h> header.
9234 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9235
02d403bf 92362012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9237
9238 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9239 (various make rules): Remove -DGDBSERVER
9240
fbd5db48
YQ
92412012-11-09 Yao Qi <yao@codesourcery.com>
9242
9243 * spu-low.c (current_ptid): Move it to ..
9244 * gdbthread.h: ... here. New.
9245 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9246 * server.c (myresume, process_serial_event): Likewise.
9247 * thread-db.c (thread_db_find_new_threads): Likewise.
9248 * tracepoint.c (run_inferior_command): Likewise.
9249
b3dc46ff
AB
92502012-10-01 Andrew Burgess <aburgess@broadcom.com>
9251
9252 * server.c (handle_search_memory_1): Include access length in
9253 warning message.
9254
07c04788
HPN
92552012-09-05 Michael Brandt <michael.brandt@axis.com>
9256
9257 * linux-crisv32-low.c: Fix compile errors.
9258
918d227b
YQ
92592012-09-04 Yao Qi <yao@codesourcery.com>
9260
9261 * tracepoint.c (cmd_qtsv): Adjust debug message.
9262 Don't check CUR_TPOINT.
9263
18c1b81a
YQ
92642012-08-28 Yao Qi <yao@codesourcery.com>
9265
9266 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9267 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9268 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9269 Remove declarations of xmalloc, xreallloc, xstrdup and
9270 freeargv.
9271 * Makefile.in (libiberty_h): New.
9272 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9273 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9274
dc82f37b
YQ
92752012-08-23 Yao Qi <yao@codesourcery.com>
9276
9277 * server.h: Remove declaration of 'xsnprintf'.
9278
406b1477
KS
92792012-08-22 Keith Seitz <keiths@redhat.com>
9280
9281 * server.h: Include build-gnulib-gbserver/config.h.
9282 * gdbreplay.c: Likewise.
9283
e6712ff1
DE
92842012-08-08 Doug Evans <dje@google.com>
9285
9286 * Makefile.in (SFILES): Add gdb_vecs.c.
9287 (OBS): Add gdb_vecs.o.
9288 (gdb_vecs_h, host_defs_h): New variables.
9289 (thread-db.o): Add $(gdb_vecs_h) dependency.
9290 (gdb_vecs.o): New rule.
9291 * thread-db.c: #include "gdb_vecs.h".
9292 (thread_db_load_search): Use a vector to iterate over path elements.
9293 Handle text appearing after "$pdir".
9294
9295 * configure.ac: Add check for strstr.
9296 * config.in: Regenerate.
9297 * configure: Regenerate.
9298
7c3270ae
UW
92992012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9300
9301 * hostio.c (handle_pread): If pread fails, fall back to attempting
9302 lseek/read.
9303 (handle_pwrite): Likewise for pwrite.
9304
b62e2b27
UW
93052012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9306
9307 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9308 between unsupported TYPE and unimplementable ADDR/LEN combination.
9309 (arm_insert_point): Act on new return value.
9310
78a99e91
PA
93112012-07-31 Pedro Alves <palves@redhat.com>
9312
9313 * server.c (process_point_options): Only skip tokens if we find
9314 one that is unrecognized. Don't treat 'X' specially while
9315 skipping unrecognized tokens.
9316
fcf303ab
UW
93172012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9318
9319 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9320 to 4-byte-align HW breakpoint addresses for Thumb.
9321
7255706c
YQ
93222012-07-27 Yao Qi <yao@codesourcery.com>
9323
9324 PR remote/14161.
9325
9326 * server.h: Declare gdb_agent_about_to_close.
9327 * target.c (kill_inferior): Include "agent.h".
9328 New. Send command 'kill'.
9329 * target.h (kill_inferior): Removed macro.
9330 * tracepoint.c (gdb_agent_about_to_close): New.
9331 (gdb_agent_helper_thread): Handle command 'close'.
9332 Wait endlessly until the inferior stops.
9333 Install gdb_agent_remove_socket to atexit hook.
9334 (agent_socket_name): New static variable.
9335 (gdb_agent_socket_init): Replace local variable 'name' with
9336 'agent_socket_name'.
9337 (gdb_agent_remove_socket): New.
9338
5a3f286f
YQ
93392012-07-27 Yao Qi <yao@codesourcery.com>
9340
9341 * server.c (process_point_options): Stop at 'X' when parsing.
9342
961bd387
ME
93432012-07-19 Michael Eager <eager@eagercon.com>
9344
a261b8f5 9345 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9346 to hw_execute.
9347 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9348 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9349 hardware breakpoint.
9350
aa7c7447
JK
93512012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9352
9353 * gdbserver/linux-low.c (initialize_low): Call
9354 linux_ptrace_init_warnings.
9355
7f216e7c
DE
93562012-07-02 Doug Evans <dje@google.com>
9357
9358 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9359 pointer to int.
9360
d3ce09f5
SS
93612012-07-02 Stan Shebs <stan@codesourcery.com>
9362
9363 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9364 (ax.o): Add it to build rule.
9365 (ax-ipa.o): Ditto.
9366 (OBS): Add format.o.
9367 (IPA_OBS): Add format.o.
9368 * server.c (handle_query): Claim support for breakpoint commands.
9369 (process_point_options): Add command case.
9370 (process_serial_event): Leave running if there are printfs in
9371 effect.
9372 * mem-break.h (any_persistent_commands): Declare.
9373 (add_breakpoint_commands): Declare.
9374 (gdb_no_commands_at_breakpoint): Declare.
9375 (run_breakpoint_commands): Declare.
9376 * mem-break.c (struct point_command_list): New struct.
9377 (struct breakpoint): New field command_list.
9378 (any_persistent_commands): New function.
9379 (add_commands_to_breakpoint): New function.
9380 (add_breakpoint_commands): New function.
9381 (gdb_no_commands_at_breakpoint): New function.
9382 (run_breakpoint_commands): New function.
9383 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9384 locally.
9385 * ax.c: Include format.h.
9386 (ax_printf): New function.
9387 (gdb_eval_agent_expr): Add printf opcode.
9388
2f8f6aed
YQ
93892012-06-13 Yao Qi <yao@codesourcery.com>
9390
9391 * server.c (start_inferior): Remove duplicated writes to fields
9392 'last_resume_kind' and 'last_status' of 'current_inferior'.
9393
0c9070b3
YQ
93942012-06-12 Yao Qi <yao@codesourcery.com>
9395 Pedro Alves <palves@redhat.com>
9396
9397 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9398 comment.
9399 * server.c (handle_v_cont): Extend comment.
9400
c52daf70
YQ
94012012-06-11 Yao Qi <yao@codesourcery.com>
9402
9403 * linux-low.c (linux_attach): Add 'static'.
9404
d38bbb0a
YQ
94052012-06-06 Yao Qi <yao@codesourcery.com>
9406
9407 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9408
89dc0afd
JK
94092012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9410
9411 Fix gcc -flto compilation warning.
9412 * server.c (main): Make variable multi_mode and attach volatile.
9413
75f62ce7
TJB
94142012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9415
9416 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9417 if the platform doesn't know about it.
9418
65f479b6
PA
94192012-05-30 Jeff Kenton <jkenton@tilera.com>
9420
9421 * Makefile.in (SFILES): Add linux-tile-low.c.
9422 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9423 * configure.srv: Handle tilegx-*-linux*.
9424 * linux-tile-low.c: New file.
9425
0c5bf5a9
JK
94262012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9427
9428 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9429
a493e3e2
PA
94302012-05-24 Pedro Alves <palves@redhat.com>
9431
9432 PR gdb/7205
9433
43aaf8b6 9434 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9435
2ea28649
PA
94362012-05-24 Pedro Alves <palves@redhat.com>
9437
9438 PR gdb/7205
9439
9440 Replace target_signal with gdb_signal throughout.
9441
8d409d16
MR
94422012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9443
9444 * linux-low.c (linux_store_registers): Avoid the copying sequence
9445 when no data has been retrieved by ptrace.
9446
23512c01
MGD
94472012-05-22 Will Deacon <will.deacon@arm.com>
9448
9449 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9450 Include asm/ptrace.h.
9451 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9452 already defined.
9453
4934b29e
MR
94542012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9455
9456 * linux-low.c (linux_store_registers): Don't re-retrieve data
9457 with ptrace that has already been obtained from /proc. Always
9458 copy any data retrieved with ptrace to the buffer supplied.
9459
bde24c0a
PA
94602012-05-11 Yao Qi <yao@codesourcery.com>
9461 Pedro Alves <palves@redhat.com>
9462
9463 * linux-low.c (enum stopping_threads_kind): New.
9464 (stopping_threads): Change type to `enum stopping_threads_kind'.
9465 (handle_extended_wait): If stopping and suspending threads, leave
9466 the new_lwp suspended too.
9467 (linux_wait_for_event): Adjust.
9468 (stop_all_lwps): Set `stopping_threads' to
9469 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9470 whether we're suspending threads or just stopping them. Assert no
9471 recursion happens.
9472
623b6bdf
YQ
94732012-04-29 Yao Qi <yao@codesourcery.com>
9474
9475 * server.h: Move some code to ...
9476 * gdbthread.h: ... here. New.
9477 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9478 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9479 (nto-low.o, win32-low.o): Likewise.
9480 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9481 * regcache.c, remote-utils.c, server.c: Likewise.
9482 * target.c, tracepoint.c, win32-low.c: Likewise.
9483
f15f9948
TJB
94842012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9485
9486 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9487 (PTRACE_ARG4_TYPE): Likewise.
9488 (PTRACE_XFER_TYPE): Likewise.
9489 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9490 ptrace to PTRACE_ARG3_TYPE.
9491 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9492 (PTRACE_ARG4_TYPE): Likewise.
9493 (PTRACE_XFER_TYPE): Likewise.
9494 (linux_detach_one_lwp): Cast fourth argument of
9495 ptrace to long then PTRACE_ARG4_TYPE.
9496 (regsets_fetch_inferior_registers): Cast third argument of
9497 ptrace to long then PTRACE_ARG3_TYPE.
9498 (regsets_store_inferior_registers): Likewise.
9499
38ea300a
PA
95002012-04-20 Pedro Alves <palves@redhat.com>
9501
9502 * configure: Regenerate.
9503
c971b7fa
PA
95042012-04-19 Pedro Alves <palves@redhat.com>
9505
43aaf8b6 9506 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9507 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9508 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9509 (all, install-only, uninstall, clean-info, all-lib, clean): No
9510 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9511 (maintainer-clean realclean distclean): Use subdir_do.
9512 (subdir_do): New.
9513 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9514 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9515 * acinclude.m4: Include acx_configure_dir.m4.
9516 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9517 calls. Call AC_PROG_RANLIB. Configure gnulib using
9518 ACX_CONFIGURE_DIR.
9519 (GNULIB): New.
9520 (GNULIB_STDINT_H): Adjust.
9521 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9522 * gdbreplay.c: Include build-gnulib/config.h.
9523 * server.h: Likewise.
9524 * aclocal.m4: Regenerate.
9525 * config.in: Regenerate.
9526 * configure: Regenerate.
c971b7fa 9527
809277f8
PA
95282012-04-19 Pedro Alves <palves@redhat.com>
9529
9530 * Makefile.in (LIBGNU, INCGNU): Adjust.
9531 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9532 (all, install-only, uninstall, clean-info, all-lib, clean)
9533 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9534 * configure.ac: Adjust AC_OUTPUT output.
9535 * aclocal.m4: Regenerate.
9536 * configure: Regenerate.
9537
fd9bb8b8
PA
95382012-04-19 Pedro Alves <palves@redhat.com>
9539
9540 * Makefile.in (generated_files): New.
9541 (server_h): Remove the explicit dependency on config.h, and depend
9542 on $generated_files.
9543
1c298c66
PA
95442012-04-19 Pedro Alves <palves@redhat.com>
9545
9546 * Makefile.in (INCGNU): Add -Ignulib.
9547
57c4b50b
PA
95482012-04-19 Pedro Alves <palves@redhat.com>
9549
9550 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9551 (INCGNU): ... this, and spell out -I here.
9552 (GNULIB_LIB): Rename to ...
9553 (LIBGNU): ... this.
9554 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9555
1030e047
PA
95562012-04-19 Pedro Alves <palves@redhat.com>
9557
9558 * config.in: Regenerate.
9559
447d4319
PA
95602012-04-19 Pedro Alves <palves@redhat.com>
9561
9562 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9563 * server.h (memmem): Remove declaration.
9564 * config.in: Regenerate.
9565 * configure: Regenerate.
9566
aad9eab9
YQ
95672012-04-19 Yao Qi <yao@codesourcery.com>
9568
9569 * Makefile.in (SFILES): Add common/vec.c.
9570 (OBS): Add vec.o.
9571 (vec.o): New rule.
9572
3e10640f
YQ
95732012-04-19 Yao Qi <yao@codesourcery.com>
9574
9575 * remote-utils.c (prepare_resume_reply): Replace with macro
9576 target_core_of_thread.
9577 * server.c (handle_qxfer_threads_proper): Likewise.
9578 * target.h (traget_core_of_thread): New macro.
9579
71622373
PA
95802012-04-18 Pedro Alves <palves@redhat.com>
9581
9582 * aclocal.m4: Regenerate.
9583 * configure: Regenerate.
9584
80d26939
YQ
95852012-04-16 Yao Qi <yao@codesourcery.com>
9586
9587 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9588 duplicated on address.
9589
42476b70
YQ
95902012-04-16 Yao Qi <yao@codesourcery.com>
9591
9592 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9593 (struct tracepoint_action_ops) <send>: New field.
9594 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9595 (agent_expr_send, x_tracepoint_action_send): New.
9596 (l_tracepoint_action_send): New.
9597 (cmd_qtdp): Download and install tracepoint
9598 according to `use_agent'.
9599 (run_inferior_command): Add one more parameter `len'.
9600 Update callers.
9601 (tracepoint_send_agent): New.
9602 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9603
7bc83639
YQ
96042012-04-16 Yao Qi <yao@codesourcery.com>
9605
9606 * tracepoint.c (download_tracepoints): Moved to ...
9607 (cmd_qtstart): ... here.
9608
5f18041e
YQ
96092012-04-14 Yao Qi <yao@codesourcery.com>
9610
9611 * tracepoint.c: Include inttypes.h.
9612 (struct collect_memory_action): Use sized types.
9613 (struct tracepoint): Likewise.
9614 (cmd_qtdp, stop_tracing): Update print specifiers.
9615 (cmd_qtp, response_tracepoint): Likewise.
9616 (collect_data_at_tracepoint): Likewise.
9617 (collect_data_at_step): Likewise.
9618
55a8c076
YQ
96192012-04-14 Yao Qi <yao@codesourcery.com>
9620
9621 Import gnulib module inttypes.
9622 * aclocal.m4, config.in, configure: Regenerated.
9623
dc750257
YQ
96242012-04-14 Yao Qi <yao@codesourcery.com>
9625
9626 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9627 Makefile and config.status at last.
9628
0ab5faf9
YQ
96292012-04-13 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c: Include stdint.h unconditionally.
9632
18f5fd81
TJB
96332012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9634
9635 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9636 on BFD_HAVE_SYS_PROCFS_TYPE.
9637 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9638 * configure: Regenerate.
9639 * config.in: Likewise.
9640
4d47af5c
L
96412012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9642
9643 * Makefile.in (clean): Also remove x32.c x32-linux.c
9644 x32-avx.c x32-avx-linux.c.
9645 (x32.o): New target.
9646 (x32.c): Likewise.
9647 (x32-linux.o): Likewise.
9648 (x32-linux.c): Likewise.
9649 (x32-avx.o): Likewise.
9650 (x32-avx.c): Likewise.
9651 (x32-avx-linux.o): Likewise.
9652 (x32-avx-linux.c): Likewise.
9653
9654 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9655 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9656 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9657 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9658 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9659 i386/x32-avx-linux.xml.
9660
9661 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9662 (init_registers_x32_avx_linux): Likwise.
9663 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9664 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9665
ecedbe58
PA
96662012-04-13 Pedro Alves <palves@redhat.com>
9667
9668 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9669 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9670 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9671 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9672 the sub-make.
9673
c92b5177
L
96742012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9675
9676 * linux-x86-low.c (compat_x32_clock_t): New.
9677 (compat_x32_siginfo_t): Likewise.
9678 (compat_x32_siginfo_from_siginfo): Likewise.
9679 (siginfo_from_compat_x32_siginfo): Likewise.
9680 (linux_is_elf64): Likewise.
9681 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9682 and siginfo_from_compat_x32_siginfo for x32.
9683 (x86_arch_setup): Set linux_is_elf64.
9684
214d508e
L
96852012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9686
9687 PR gdb/13969
9688 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9689 e_machine field.
9690 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9691 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9692 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9693 compatible with process.
9694
c9a1864a
YQ
96952012-04-12 Yao Qi <yao@codesourcery.com>
9696
9697 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9698 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9699 (install-only, install-info, clean): Handle sub dir gnulib.
9700 (all-lib, am--refresh): New targets.
9701 (memmem.o): Remove target.
9702 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9703 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9704 (AC_REPLACE_FUNCS): Remove memmem.
9705 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9706 (AC_OUTPUT): Generate Makefile in gnulib/.
9707 * aclocal.m4, config.in, configure: Regenerated.
9708
367ba2c2
MR
97092012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9710
9711 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9712
9d236627
PA
97132012-04-05 Pedro Alves <palves@redhat.com>
9714
9715 -Werror=strict-aliasing
9716
9717 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9718 pointer.
9719
111217b3
PA
97202012-04-04 Pedro Alves <palves@redhat.com>
9721
9722 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9723 (sparc_store_gregset_from_stack, sparc_store_gregset)
9724 (sparc_breakpoint_at): Fix formatting.
9725
8365dcf5
TJB
97262012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9727
9728 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9729 are available.
9730 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9731 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9732 * config.in: Regenerate.
9733 * configure: Likewise.
9734
689cc2ae
PA
97352012-03-29 Pedro Alves <palves@redhat.com>
9736
9737 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9738 Correct ptrace arguments.
9739
c14dfd32
PA
97402012-03-28 Pedro Alves <palves@redhat.com>
9741
9742 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9743 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9744 (IA64_FR1_REGNUM): New defines.
9745 (ia64_fetch_register): New.
9746 (the_low_target): Install it.
9747 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9748 field.
9749 * linux-low.c (linux_fetch_registers): Try the
9750 the_low_target.fetch_register hook first.
9751
9752 * linux-arm-low.c (the_low_target): Adjust.
9753 * linux-bfin-low.c (the_low_target): Adjust.
9754 * linux-cris-low.c (the_low_target): Adjust.
9755 * linux-crisv32-low.c (the_low_target): Adjust.
9756 * linux-m32r-low.c (the_low_target): Adjust.
9757 * linux-m68k-low.c (the_low_target): Adjust.
9758 * linux-mips-low.c (the_low_target): Adjust.
9759 * linux-ppc-low.c (the_low_target): Adjust.
9760 * linux-s390-low.c (the_low_target): Adjust.
9761 * linux-sh-low.c (the_low_target): Adjust.
9762 * linux-sparc-low.c (the_low_target): Adjust.
9763 * linux-tic6x-low.c (the_low_target): Adjust.
9764 * linux-x86-low.c (the_low_target): Adjust.
9765 * linux-xtensa-low.c (the_low_target): Adjust.
9766
63c88e13
PA
97672012-03-26 Pedro Alves <palves@redhat.com>
9768
9769 * server.c (handle_qxfer_libraries): Don't bail early if
9770 the_target->qxfer_libraries_svr4 is not NULL.
9771
fb723180
PA
97722012-03-26 Pedro Alves <palves@redhat.com>
9773
9774 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9775
0afae3cf
PA
97762012-03-23 Pedro Alves <palves@redhat.com>
9777
9778 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9779 "library-list-svr4" element's start tag when the the DSO list is
9780 empty.
9781
485f1ee4
PA
97822012-03-23 Pedro Alves <palves@redhat.com>
9783
9784 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9785 a variable whose type size is the same as the inferior's pointer
9786 size.
9787
a5362b9a
TS
97882012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9789
9790 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9791 struct siginfo.
9792 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9793 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9794 * linux-low.h: Include <signal.h>.
9795 (struct siginfo): Remove forward declaration.
9796 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9797 struct siginfo.
9798
d226c142
MF
97992012-03-21 Mike Frysinger <vapier@gentoo.org>
9800
9801 * .gitignore: Ignore more files.
9802
122f36ef
PA
98032012-03-19 Pedro Alves <palves@redhat.com>
9804 Jan Kratochvil <jan.kratochvil@redhat.com>
9805
9806 * server.c (cont_thread, general_thread): Add describing comments.
9807 (start_inferior): Clear `cont_thread'.
9808 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9809 of a process.
9810
fc3e5175
YQ
98112012-03-15 Yao Qi <yao@codesourcery.com>
9812
9813 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9814 handling to ...
9815 (cmd_qtdp): ... here.
9816
8d0d92cd
YQ
98172012-03-15 Yao Qi <yao@codesourcery.com>
9818
9819 * tracepoint.c (struct tracepoint_action_ops): New.
9820 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9821 (m_tracepoint_action_download): New.
9822 (r_tracepoint_action_download): New.
9823 (x_tracepoint_action_download): New.
9824 (l_tracepoint_action_download): New.
9825 (add_tracepoint_action): Install `action->ops' according type.
9826 (download_tracepoint_1): Move code `download' function pointer
9827 of various tracepoint_action_ops.
9828
87b0bb13
JK
98292012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9830
9831 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9832 linux_ptrace_attach_warnings.
9833
5f572dec
JK
98342012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9835
9836 * Makefile.in (linux-ptrace.o): New.
9837 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9838 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9839 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9840 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9841 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9842 of these targets.
9843 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9844
f4647387
YQ
98452012-03-08 Yao Qi <yao@codesourcery.com>
9846 Pedro Alves <palves@redhat.com>
9847
9848 Fix PR server/13392.
9849 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9850 offset of JMP insn.
9851 * tracepoint.c (remove_tracepoint): New.
9852 (cmd_qtdp): Call remove_tracepoint when failed to install.
9853
9b224c5e
PA
98542012-03-07 Pedro Alves <palves@redhat.com>
9855
9856 * linux-low.c (get_detach_signal): New.
9857 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9858 Pass on pending signals to PTRACE_DETACH. Check the result of the
9859 ptrace call.
9860 * server.c (program_signals, program_signals_p): New.
9861 (handle_general_set): Handle QProgramSignals.
9862 * server.h (program_signals, program_signals_p): Declare.
9863
e237a7e2
JK
98642012-03-05 Pedro Alves <palves@redhat.com>
9865 Jan Kratochvil <jan.kratochvil@redhat.com>
9866
9867 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9868 New comment why.
9869
5808517f
YQ
98702012-03-03 Yao Qi <yao@codesourcery.com>
9871
9872 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9873 agent_look_up_symbols.
9874
58b4daa5
YQ
98752012-03-03 Yao Qi <yao@codesourcery.com>
9876
9877 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9878 (linux-x86-low.o): Likewise.
9879 * server.h: Remove in_process_agent_loaded.
9880 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9881 common/agent.c.
9882 Update callers.
9883
8ffcbaaf
YQ
98842012-03-03 Yao Qi <yao@codesourcery.com>
9885
9886 * tracepoint.c (gdb_agent_capability): New global.
9887 (in_process_agent_loaded_ust): Renamed to
9888 `in_process_agent_supports_ust'.
9889 Update callers.
9890 (in_process_agent_supports_ust): Call agent_capability_check.
9891 (clear_installed_tracepoints): Assert that agent supports
9892 agent.
9893
d1feda86
YQ
98942012-03-03 Yao Qi <yao@codesourcery.com>
9895
9896 * linux-low.c (linux_supports_agent): New.
9897 (linux_target_ops): Initialize field `supports_agent' with
9898 linux_supports_agent.
9899 * target.h (struct target_ops) <supports_agent>: New.
9900 (target_supports_agent): New macro.
9901 * server.c (handle_general_set): Handle packet 'QAgent'.
9902 (handle_query): Send `QAgent+'.
9903 * Makefile.in (server.o): Depends on agent.h.
9904
2fa291ac
YQ
99052012-03-03 Yao Qi <yao@codesourcery.com>
9906
9907 * Makefile.in (OBS): Add agent.o.
9908 Add new rule for agent.o.
9909 Track dependence of tracepoint.c on agent.h.
9910 * tracepoint.c (run_inferior_command_1):
9911 (run_inferior_command): Call agent_run_command.
9912 (gdb_ust_connect_sync_socket): Deleted. Move it to
9913 common/agent.c.
9914 (resume_thread, stop_thread): Likewise.
9915 (gdb_ust_socket_init): Renamed to ...
9916 (gdb_agent_socket_init): ... New.
9917 (gdb_ust_thread): Renamed to ...
9918 (gdb_agent_helper_thread): ... New.
9919 (gdb_ust_init): Move some code to ...
9920 (gdb_agent_init): ... here. New.
9921 [HAVE_UST]: Call gdb_ust_init.
9922 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9923 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9924 * config.in, configure: Regenerated.
9925
05044653
PA
99262012-03-02 Pedro Alves <palves@redhat.com>
9927
9928 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9929 * linux-low.c (struct simple_pid_list): New.
9930 (stopped_pids): New a struct simple_pid_list pointer.
9931 (add_to_pid_list, pull_pid_from_list): New.
9932 (handle_extended_wait): Don't assume the first signal new children
9933 report is SIGSTOP. Adjust call to pull_pid_from_list.
9934 (linux_wait_for_lwp): Adjust.
9935
8d00225b
YQ
99362012-03-02 Yao Qi <yao@codesourcery.com>
9937
9938 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9939 debug log.
9940
19560ba5
YQ
99412012-03-02 Yao Qi <yao@codesourcery.com>
9942
9943 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9944 `stop_pc' and `tpoint'. Update caller.
9945
1faeff08
MR
99462012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9947
9948 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9949 * linux-low.c (use_linux_regsets): New macro.
9950 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9951 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9952 (linux_register_in_regsets): New function.
9953 (usr_fetch_inferior_registers): Skip registers covered by
9954 regsets.
9955 (usr_store_inferior_registers): Likewise.
9956 (usr_fetch_inferior_registers): New macro.
9957 (usr_store_inferior_registers): Likewise.
9958 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9959 (linux_store_registers): Likewise.
9960 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9961 prototype.
9962 (init_registers_mips64_dsp_linux): Likewise.
9963 (init_registers_mips_linux): New macro.
9964 (init_registers_mips_dsp_linux): Likewise.
9965 (mips_dsp_num_regs): Likewise.
9966 (DSP_BASE, DSP_CONTROL): New fallback macros.
9967 (mips_base_regs): New macro.
9968 (mips_regmap): Use it. Fix the size.
9969 (mips_dsp_regmap): New variable.
9970 (mips_dsp_regset_bitmap): Likewise.
9971 (mips_arch_setup): New function.
9972 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9973 than mips_regmap.
9974 (mips_cannot_store_register): Likewise.
9975 (the_low_target): Update .arch_setup, .num_regs and .regmap
9976 initializers. Add .regset_bitmap initializer.
9977 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9978 initializer.
9979 * linux-bfin-low.c (the_low_target): Likewise.
9980 * linux-cris-low.c (the_low_target): Likewise.
9981 * linux-crisv32-low.c (the_low_target): Likewise.
9982 * linux-ia64-low.c (the_low_target): Likewise.
9983 * linux-m32r-low.c (the_low_target): Likewise.
9984 * linux-m68k-low.c (the_low_target): Likewise.
9985 * linux-ppc-low.c (the_low_target): Likewise.
9986 * linux-s390-low.c (the_low_target): Likewise.
9987 * linux-sh-low.c (the_low_target): Likewise.
9988 * linux-sparc-low.c (the_low_target): Likewise.
9989 * linux-tic6x-low.c (the_low_target): Likewise.
9990 * linux-x86-low.c (the_low_target): Likewise.
9991 * linux-xtensa-low.c (the_low_target): Likewise.
9992 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9993 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9994 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9995 srv_xmlfiles.
9996 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9997 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9998
c03e6ccc
YQ
99992012-02-29 Yao Qi <yao@codesourcery.com>
10000 Pedro Alves <palves@redhat.com>
10001
10002 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10003 `step_over_finished' is true.
10004
644cebc9
PA
100052012-02-27 Pedro Alves <palves@redhat.com>
10006
10007 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10008 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10009
c14d7ab2
PA
100102012-02-27 Pedro Alves <palves@redhat.com>
10011
10012 PR server/9684
10013 * linux-low.c (pid_is_stopped): New.
10014 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10015
412c89dd
LM
100162012-02-25 Luis Machado <lgustavo@codesourcery.com>
10017
10018 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10019 of conditions.
10020
b745defe
MR
100212012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10022
10023 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10024
9f3a5c85
LM
100252012-02-24 Luis Machado <lgustavo@codesourcery>
10026
10027 * server.c (handle_query): Advertise support for target-side
10028 breakpoint condition evaluation.
10029 (process_point_options): New function.
10030 (process_serial_event): When inserting a breakpoint, check for
10031 a target-side condition that should be evaluated.
10032
10033 * mem-break.c: Include regcache.h and ax.h.
10034 (point_cond_list_t): New data structure.
10035 (breakpoint) <cond_list>: New field.
10036 (find_gdb_breakpoint_at): Make non-static.
10037 (delete_gdb_breakpoint_at): Clear any target-side
10038 conditions.
10039 (clear_gdb_breakpoint_conditions): New function.
10040 (add_condition_to_breakpoint): Likewise.
10041 (add_breakpoint_condition): Likewise.
10042 (gdb_condition_true_at_breakpoint): Likewise.
10043 (gdb_breakpoint_here): Return result directly instead
10044 of going through a local variable.
10045
10046 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10047 (clear_gdb_breakpoint_conditions): Likewise.
10048 (add_breakpoint_condition): Likewise.
10049 (gdb_condition_true_at_breakpoint): Likewise.
10050
10051 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10052 (need_step_over_p): Take target-side breakpoint condition into
10053 consideration.
10054
5e1dc496
LM
100552012-02-24 Luis Machado <lgustavo@codesourcery>
10056
10057 * server.h: Include tracepoint.h.
10058 (agent_mem_read, agent_get_trace_state_variable_value,
10059 agent_set_trace_state_variable_value,
10060 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10061 get_set_tsv_func_addr): New prototypes.
10062
10063 * ax.h: New include file.
10064 * ax.c: New source file.
10065
10066 * tracepoint.c: Include ax.h.
10067 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10068 agent_expr, eval_result_type): Move to ax.h.
10069 (parse_agent_expr): Rename to ...
10070 (gdb_parse_agent_expr): ... this, make it non-static and move
10071 to ax.h.
10072 (unparse_agent_expr) Rename to ...
10073 (gdb_unparse_agent_expr): ... this, make it non-static and move
10074 to ax.h.
10075 (eval_agent_expr): Rename to ...
10076 (eval_tracepoint_agent_expr): ... this.
10077 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10078 forward declarations.
10079 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10080 (agent_get_trace_state_variable_value): New function.
10081 (agent_set_trace_state_variable_value): New function.
10082 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10083 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10084 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10085 (condition_true_at_tracepoint): Likewise.
10086 (parse_agent_expr): Rename to ...
10087 (gdb_parse_agent_expr): ... this and move to ax.c.
10088 (unparse_agent_expr): Rename to ...
10089 (gdb_unparse_agent_expr): ... this and move to ax.c.
10090 (gdb_agent_op_name): Move to ax.c.
10091 (eval_agent_expr): Rename to ...
10092 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10093 and move to ax.c.
10094 (eval_tracepoint_agent_expr): New function.
10095 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10096 non-static.
5e1dc496
LM
10097 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10098 ax.c.
10099 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10100 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10101 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10102 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10103 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10104 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10105 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10106 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10107 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10108 (compile_bytecodes): Remove forward declaration.
10109 (is_goto_target): Move to ax.c.
10110 (compile_bytecodes): Move to ax.c and call
10111 agent_get_trace_state_variable_value (...) and
10112 agent_set_trace_state_variable_value (...).
10113
10114 * Makefile.in: Update ax.c and IPA dependencies.
10115
277e4e52
PA
101162012-02-24 Pedro Alves <palves@redhat.com>
10117
10118 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10119 (cmd_bigqtbuffer_circular): ... this. Only handle
10120 'QTBuffer:circular:'.
10121 (handle_tracepoint_general_set): Adjust.
10122
bf4c19f7
YQ
101232012-02-16 Yao Qi <yao@codesourcery.com>
10124
10125 * inferiors.c: Move code to ...
10126 * dll.c: .... here. New.
10127 * server.h: Declare clear_dlls.
10128 * Makefile.in (SFILES): Add dll.c.
10129 (OBS): Add dll.o
10130 (dll.o): New rule.
10131
d73f2619
YQ
101322012-02-11 Yao Qi <yao@codesourcery.com>
10133
10134 * server.c: (handle_monitor_command): Add a new parameter
10135 `own_buf'.
10136 (handle_query): Update caller.
10137
f8255c2a
JB
101382012-02-09 Joel Brobecker <brobecker@adacore.com>
10139
10140 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10141 * configure, config.in: Regenerate.
10142 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10143 is not defined.
10144
da84f473
PA
101452012-02-02 Pedro Alves <palves@redhat.com>
10146
10147 Try SIGKILL first, then PTRACE_KILL.
10148 * linux-low.c (linux_kill_one_lwp): New.
10149 (linux_kill_one_lwp): Rename to ...
10150 (kill_one_lwp_callback): ... this. Use the new
10151 linux_kill_one_lwp.
10152
e886a173
PA
101532012-02-02 Pedro Alves <palves@redhat.com>
10154
10155 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10156 inferior.
10157
be07f1a2
PA
101582012-01-27 Pedro Alves <palves@redhat.com>
10159
10160 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10161 (elf_64_file_p): Make static.
10162 (linux_pid_exe_is_elf_64_file): New.
10163 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10164 Delete declarations.
10165 (linux_pid_exe_is_elf_64_file): Declare.
10166 * linux-x86-low.c (x86_arch_setup): Use
10167 linux_pid_exe_is_elf_64_file.
10168
d8301ad1
JK
101692012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10170
10171 * linux-low.c (linux_wait_for_event_1): Rename to ...
10172 (linux_wait_for_event): ... here and merge it with former
10173 linux_wait_for_event - new variable wait_ptid, use it.
10174 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10175
01b17894
PA
101762012-01-23 Pedro Alves <palves@redhat.com>
10177
10178 * server.c (main): Avoid yet another case of infinite loop while
10179 detaching/killing after a longjmp.
10180
e825046f
JK
101812012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10182
10183 Code cleanup.
10184 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10185
b9e7b9c3
UW
101862012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10187
10188 * hostio.c (handle_readlink): New function.
10189 (handle_vFile): Call it to handle "vFile:readlink" packets.
10190
901f9912
UW
101912012-01-20 Pedro Alves <palves@redhat.com>
10192 Ulrich Weigand <ulrich.weigand@linaro.org>
10193
10194 * server.c (handle_v_requests): Only support vAttach and vRun to
10195 start multiple processes when in extended protocol mode.
10196
fc1ab1a0
PA
101972012-01-17 Pedro Alves <palves@redhat.com>
10198
10199 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10200 memalign plus mprotect to allocate the scratch buffer.
10201
7d5d4e98
PA
102022012-01-13 Pedro Alves <palves@redhat.com>
10203
10204 * server.c (attach_inferior): Clear `cont_thread'.
10205
f128d5e9
PA
102062012-01-13 Pedro Alves <palves@redhat.com>
10207
10208 * server.c (main): Avoid infinite loop while detaching/killing
10209 after a longjmp.
10210
06db92f0
DE
102112012-01-09 Doug Evans <dje@google.com>
10212
10213 * server.c (start_inferior): Set last_ptid in --wrapper case.
10214
32d92999
YQ
102152012-01-06 Yao Qi <yao@codesourcery.com>
10216
10217 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10218 defined.
10219 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10220
5e0a92a9
YQ
102212012-01-04 Yao Qi <yao@codesourcery.com>
10222
10223 * tracepoint.c (cmd_qtdp): Print debug message
10224 for static tracepoint.
10225
ae639e8c
YQ
102262012-01-04 Yao Qi <yao@codesourcery.com>
10227
10228 * tracepoint.c (trace_vdebug): Differentiate debug message
10229 between gdbserver and IPA.
10230
f72429c5
YQ
102312012-01-03 Yao Qi <yao@codesourcery.com>
10232
10233 * tracepoint.c (tracepoint_was_hit): Don't collect for
10234 static tracepoint.
10235
12c3e59c
JB
102362012-01-02 Joel Brobecker <brobecker@adacore.com>
10237
10238 * terminal.h: Reformat copyright header.
10239
67827812
JB
102402012-01-02 Joel Brobecker <brobecker@adacore.com>
10241
10242 * server.c (gdbserver_version): Update copyright year.
10243 * gdbreplay.c (gdbreplay_version): Likewise.
10244
3e52c33d
JK
102452011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10246
10247 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10248
10249 Revert:
10250 2011-12-18 Hui Zhu <teawater@gmail.com>
10251 * linux-low.c (linux_create_inferior): Save return value to ret.
10252
66f1260e
HZ
102532011-12-18 Hui Zhu <teawater@gmail.com>
10254
10255 * linux-low.c (linux_create_inferior): Save return value to ret.
10256
e77616d7
DE
102572011-12-16 Doug Evans <dje@google.com>
10258
e7b06c57
DE
10259 * linux-low.c (linux_create_inferior): If stdio connection,
10260 redirect stdin from /dev/null, stdout to stderr.
10261 * remote-utils.c (remote_is_stdio): New static global.
10262 (remote_connection_is_stdio): New function.
10263 (remote_prepare): Handle stdio connection.
10264 (remote_open): Ditto.
10265 (remote_close): Don't close stdin for stdio connections.
10266 (read_prim,write_prim): New functions. Replace all calls to
10267 read/write to these.
10268 * server.c (main): Watch for "-" argument. Move call to
10269 remote_prepare before start_inferior.
10270 * server.h (STDIO_CONNECTION_NAME): New macro.
10271 (remote_connection_is_stdio): Declare.
10272
e77616d7
DE
10273 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10274 in debugging output.
10275
82067193
YQ
102762011-12-15 Yao Qi <yao@codesourcery.com>
10277
10278 * tracepoint.c: Include sys/syscall.h.
10279 (gdb_ust_thread): Remove preprocessor conditional.
10280
82bfbe7e
PA
102812011-12-14 Pedro Alves <pedro@codesourcery.com>
10282
10283 * linux-low.c (linux_detach_one_lwp): Call
10284 the_low_target.prepare_to_resume before detaching.
10285
712c6575
YQ
102862011-12-14 Yao Qi <yao@codesourcery.com>
10287
10288 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10289 of write.
10290
d54d1edf
YQ
102912011-12-14 Yao Qi <yao@codesourcery.com>
10292
10293 * i386-low.c (i386_low_stopped_data_address): Initialize local
10294 variable `control'.
10295
6210a125
PA
102962011-12-13 Pedro Alves <pedro@codesourcery.com>
10297
10298 PR remote/13492
10299
10300 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10301 DR_CONTROL unless necessary. Extend comments.
10302 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10303 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10304
2ece8244
YQ
103052011-12-13 Yao Qi <yao@codesourcery.com>
10306
10307 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10308 macros.
10309 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10310
784867a5
JK
103112011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10312
10313 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10314 Print new debug message for such case.
10315
6bf36717
JK
103162011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10317
10318 Fix overlapping memcpy.
10319 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10320 the read_inferior_memory transfer.
10321 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10322 write_inferior_memory transfer.
10323 (set_fast_tracepoint_jump): New variable buf. Use it for the
10324 read_inferior_memory and write_inferior_memory transfers.
10325 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10326 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10327 Use it for the write_inferior_memory transfer.
10328 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10329 buffers.
10330
50275556
MR
103312011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10332
10333 * linux-low.c (fetch_register, store_register): Make code
10334 consistent, fix formatting.
10335
7325beb4
MR
103362011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10337
10338 * linux-low.c (usr_store_inferior_registers): Factor out code
10339 to handle individual registers into...
10340 (store_register): ... this new function.
10341
c642a434
UW
103422011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10343
10344 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10345 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10346 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10347 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10348 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10349 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10350 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10351 (srv_xmlfiles): Add new XML files.
10352
10353 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10354 and <sys/uio.h>.
10355 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10356 (init_registers_s390_linux32v1): Add prototype.
10357 (init_registers_s390_linux32v2): Likewise.
10358 (init_registers_s390_linux64v1): Likewise.
10359 (init_registers_s390_linux64v2): Likewise.
10360 (init_registers_s390x_linux64v1): Likewise.
10361 (init_registers_s390x_linux64v2): Likewise.
10362 (s390_num_regs): Increment to 52.
10363 (s390_regmap): Add orig_r2 register.
10364 (s390_num_regs_3264): Increment to 68.
10365 (s390_regmap_3264): Add orig_r2 register.
10366 (s390_collect_ptrace_register): Handle orig_r2 register.
10367 (s390_supply_ptrace_register): Likewise.
10368 (s390_fill_last_break): New function.
10369 (s390_store_last_break): Likewise.
10370 (s390_fill_system_call): New function.
10371 (s390_store_system_call): Likewise.
10372 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10373 register sets.
10374 (s390_check_regset): New function.
10375 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10376 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10377 Update target_regsets for available register sets.
10378
2268b414
JK
103792011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10380 Jan Kratochvil <jan.kratochvil@redhat.com>
10381
10382 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10383 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10384 New.
10385 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10386 * linux-low.h (struct process_info_private): New member r_debug.
10387 * server.c (handle_qxfer_libraries): Call
10388 the_target->qxfer_libraries_svr4.
10389 (handle_qxfer_libraries_svr4): New function.
10390 (qxfer_packets): New entry "libraries-svr4".
10391 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10392 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10393 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10394 PACKET_qXfer_libraries_svr4.
10395
d6db1fab
UW
103962011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10397
10398 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10399 PSW address/mask between 8-byte and 16-byte formats.
10400 (s390_supply_ptrace_register): Likewise.
10401 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10402 basic addressing mode bit.
10403
242f5f1c
SS
104042011-11-24 Stan Shebs <stan@codesourcery.com>
10405
10406 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10407
f196051f
SS
104082011-11-17 Stan Shebs <stan@codesourcery.com>
10409
10410 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10411 (tracing_start_time): New global.
10412 (tracing_stop_time): New global.
10413 (tracing_user_name): New global.
10414 (tracing_notes): New global.
10415 (tracing_stop_note): New global.
10416 (cmd_qtstart): Set traceframe_usage, start_time.
10417 (stop_tracing): Set stop_time.
10418 (cmd_qtstatus): Report additional status.
10419 (cmd_qtp): New function.
10420 (handle_tracepoint_query): Call it.
10421 (cmd_qtnotes): New function.
10422 (handle_tracepoint_general_set): Call it.
10423 (get_timestamp): Rename from tsv_get_timestamp.
10424
405f8e94
SS
104252011-11-14 Stan Shebs <stan@codesourcery.com>
10426 Kwok Cheung Yeung <kcy@codesourcery.com>
10427
10428 * linux-x86-low.c (small_jump_insn): New.
10429 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10430 trampoline and error message, build a trampoline and issue a small
10431 jump instruction to it.
10432 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10433 trampoline and error message.
10434 (x86_get_min_fast_tracepoint_insn_len): New.
10435 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10436 * linux-low.h (struct linux_target_ops): Add arguments to
10437 install_fast_tracepoint_jump_pad operation, add new operation.
10438 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10439 arguments.
10440 (linux_get_min_fast_tracepoint_insn_len): New function.
10441 (linux_target_op): Add new operation.
10442 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10443 (gdb_trampoline_buffer_end): Ditto.
10444 (gdb_trampoline_buffer_error): Ditto.
10445 (struct ipa_sym_addresses): Add fields for new IPA variables.
10446 (symbol_list): Add entries for new IPA variables.
10447 (struct tracepoint): Add fields to hold the address range of the
10448 trampoline used by the tracepoint.
10449 (trampoline_buffer_head): New static variable.
10450 (trampoline_buffer_tail): Ditto.
10451 (claim_trampoline_space): New function.
10452 (have_fast_tracepoint_trampoline_buffer): New function.
10453 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10454 structure.
10455 (install_fast_tracepoint): Ditto, also add error buffer argument.
10456 (cmd_qtminftpilen): New function.
10457 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10458 (fast_tracepoint_from_trampoline_address): New function.
10459 (fast_tracepoint_collecting): Handle trampoline as part of jump
10460 pad space.
10461 (set_trampoline_buffer_space): New function.
10462 (initialize_tracepoint): Initialize new IPA variables.
10463 * target.h (struct target_ops): Add arguments to
10464 install_fast_tracepoint_jump_pad operation, add new
10465 get_min_fast_tracepoint_insn_len operation.
10466 (target_get_min_fast_tracepoint_insn_len): New.
10467 (install_fast_tracepoint_jump_pad): Add arguments.
10468 * server.h (IPA_BUFSIZ): Define.
10469 * linux-i386-ipa.c: Include extra header files.
10470 (initialize_fast_tracepoint_trampoline_buffer): New function.
10471 (initialize_low_tracepoint): Call it.
10472 * server.h (set_trampoline_buffer_space): Declare.
10473 (claim_trampoline_space): Ditto.
10474 (have_fast_tracepoint_trampoline_buffer): Ditto.
10475
1e4d1764
YQ
104762011-11-14 Yao Qi <yao@codesourcery.com>
10477
10478 * server.c (handle_query): Handle InstallInTrace for qSupported.
10479 * tracepoint.c (add_tracepoint): Sort list.
10480 (install_tracepoint, download_tracepoint): New.
10481 (cmd_qtdp): Call them to install and download tracepoints.
10482 (sort_tracepoints): Removed.
10483 (cmd_qtstart): Update.
10484
5c73ff4e
YQ
104852011-11-14 Yao Qi <yao@codesourcery.com>
10486
10487 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10488 * mem-break.h: Declare.
10489 * tracepoint.c (cmd_qtstart): Move some code to ...
10490 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10491 New.
10492 (download_tracepoints): Move some code to ...
10493 (download_tracepoint_1): ... here. New.
10494
86a30030
YQ
104952011-11-08 Yao Qi <yao@codesourcery.com>
10496
10497 * remote-utils.c (relocate_instruction): A comment fix.
10498
8d26e50c
JB
104992011-11-07 Joel Brobecker <brobecker@adacore.com>
10500
10501 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10502 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10503 dr_status_mirror and dr_control_mirror from debug_reg_state.
10504 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10505 (i386_initial_stuff): Remove use of deleted globals.
10506 (i386_get_thread_context, i386_set_thread_context,
10507 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10508 from debug_reg_state.
10509
a59306a3
YQ
105102011-11-05 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10513 address as TPOINT's.
10514
3065dfb6
SS
105152011-11-02 Stan Shebs <stan@codesourcery.com>
10516
10517 * tracepoint.c (agent_mem_read_string): New function.
10518 (eval_agent_expr): Call it for tracenz.
10519 * server.c (handle_query): Report support for tracenz.
10520
fd0d8c7c
YQ
105212011-11-02 Yao Qi <yao@codesourcery.com>
10522
10523 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10524
609086b1
YQ
105252011-11-02 Yao Qi <yao@codesourcery.com>
10526
10527 * target.h: Fix a typo in comment.
10528
b9fd1791
PA
105292011-10-31 Pedro Alves <pedro@codesourcery.com>
10530
10531 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10532 clobber the breakpoints' shadows with fast tracepoint jumps.
10533 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10534 * target.c (write_inferior_memory): Also pass MYADDR down to
10535 check_mem_write.
10536
03583c20
UW
105372011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10538
10539 * configure.ac: Check support for personality routine.
10540 * configure: Regenerate.
10541 * config.in: Likewise.
10542 * linux-low.c: Include <sys/personality.h>.
10543 Define ADDR_NO_RANDOMIZE if necessary.
10544 (linux_create_inferior): Disable address space randomization when
10545 forking inferior, if requested.
10546 (linux_supports_disable_randomization): New function.
10547 (linux_target_ops): Install it.
10548 * server.h (disable_randomization): Declare.
10549 * server.c (disable_randomization): New global variable.
10550 (handle_general_set): Handle QDisableRandomization.
10551 (handle_query): Likewise for qSupported.
10552 (main): Support --disable-randomization and --no-disable-randomization
10553 command line arguments.
10554 * target.h (struct target_ops): Add supports_disable_randomization.
10555 (target_supports_disable_randomization): New macro.
10556
723b724b
MF
105572011-09-29 Mike Frysinger <vapier@gentoo.org>
10558
10559 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10560 ifdef check.
10561 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10562 [!PT_GETDSBT] (target_loadmap): New definition.
10563 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10564 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10565 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10566 and PT_GETDSBT to LINUX_LOADMAP.
10567 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10568 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10569
55329a5c 105702011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10571
10572 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10573 (arm_linux_hwbp_cap): New static variable.
10574 (arm_linux_get_hwbp_cap): Replace by ...
10575 (arm_linux_init_hwbp_cap): ... this new function.
10576 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10577 (arm_linux_get_hw_watchpoint_count): Likewise.
10578 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10579 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10580 (arm_prepare_to_resume): Use perror_with_name instead of error.
10581
55329a5c 105822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10583
10584 * linux-arm-low.c: Include <signal.h>.
10585 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10586 (struct arm_linux_hwbp_cap): New data type.
10587 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10588 (struct arm_linux_hw_breakpoint): New data type.
10589 (MAX_BPTS, MAX_WPTS): Define.
10590 (struct arch_process_info, struct arch_lwp_info): New data types.
10591 (arm_linux_get_hwbp_cap): New function.
10592 (arm_linux_get_hw_breakpoint_count): Likewise.
10593 (arm_linux_get_hw_watchpoint_count): Likewise.
10594 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10595 (arm_hwbp_control_initialize): Likewise.
10596 (arm_hwbp_control_is_enabled): Likewise.
10597 (arm_hwbp_control_is_initialized): Likewise.
10598 (arm_hwbp_control_disable): Likewise.
10599 (arm_linux_hw_breakpoint_equal): Likewise.
10600 (arm_linux_hw_point_initialize): Likewise.
10601 (struct update_registers_data): New data structure.
10602 (update_registers_callback: New function.
10603 (arm_insert_point): Likewise.
10604 (arm_remove_point): Likewise.
10605 (arm_stopped_by_watchpoint): Likewise.
10606 (arm_stopped_data_address): Likewise.
10607 (arm_new_process): Likewise.
10608 (arm_new_thread): Likewise.
10609 (arm_prepare_to_resume): Likewise.
10610 (the_low_target): Register arm_insert_point, arm_remove_point,
10611 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10612 arm_new_thread, and arm_prepare_to_resume.
10613
6b9801d4
SS
106142011-09-15 Stan Shebs <stan@codesourcery.com>
10615
10616 * server.h (struct emit_ops): Add compare-goto fields.
10617 * tracepoint.c (gdb_agent_op_sizes): New table.
10618 (emit_eq_goto): New function.
10619 (emit_ne_goto): New function.
10620 (emit_lt_goto): New function.
10621 (emit_le_goto): New function.
10622 (emit_gt_goto): New function.
10623 (emit_ge_goto): New function.
10624 (is_goto_target): New function.
10625 (compile_bytecodes): Recognize special cases of compare-goto
10626 combinations and call specialized emitters for them.
10627 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10628 (amd64_emit_ne_goto): New function.
10629 (amd64_emit_lt_goto): New function.
10630 (amd64_emit_le_goto): New function.
10631 (amd64_emit_gt_goto): New function.
10632 (amd64_emit_ge_goto): New function.
10633 (amd64_emit_ops): Add the new functions.
10634 (i386_emit_eq_goto): New function.
10635 (i386_emit_ne_goto): New function.
10636 (i386_emit_lt_goto): New function.
10637 (i386_emit_le_goto): New function.
10638 (i386_emit_gt_goto): New function.
10639 (i386_emit_ge_goto): New function.
10640 (i386_emit_ops): Add the new functions.
10641
bf15cbda
SS
106422011-09-08 Stan Shebs <stan@codesourcery.com>
10643
10644 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10645 (i386_emit_epilogue): Restore %ebx.
10646
943ca1dd
JZ
106472011-08-31 Jie Zhang <jzhang918@gmail.com>
10648
10649 * server.c (step_thread): Remove definition.
10650 (process_serial_event): Don't handle Hs.
10651 * server.h (step_thread): Remove declaration.
10652 * target.c (set_desired_inferior): Remove use of step_thread.
10653
e3deef73
LM
106542011-08-24 Luis Machado <lgustavo@codesourcery.com>
10655
10656 * linux-low.c: Include linux-procfs.h.
10657 (linux_attach_lwp_1): Update comments.
10658 (linux_attach): Scan for existing threads when attaching to a
10659 process that is the tgid.
10660 * Makefile.in: Update dependencies.
10661
13da1c97
LM
106622011-08-24 Luis Machado <lgustavo@codesourcery.com>
10663
10664 * configure.srv: Add linux-procfs.o dependencies.
10665
881127c9
YQ
106662011-08-14 Yao Qi <yao@codesourcery.com>
10667
10668 * target.h (struct target_ops): Fix indent.
10669 * win32-low.c (win32_target_ops): Fix comment.
10670
58dbd541
YQ
106712011-08-14 Andrew Jenner <andrew@codesourcery.com>
10672 Yao Qi <yao@codesourcery.com>
10673
10674 * Makefile.in (clean): Remove tic6x-*.c files.
10675 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10676 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10677 (tic6x-c64xp-linux.c): Likewise.
10678 * configure.srv: Add support for tic6x-*-uclinux.
10679 * linux-tic6x-low.c: New.
10680 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10681
78d85199
YQ
106822011-08-14 Andrew Stubbs <ams@codesourcery.com>
10683 Yao Qi <yao@codesourcery.com>
10684
10685 * target.h (struct target_ops): Add read_loadmap.
10686 * linux-low.c (struct target_loadseg): New type.
10687 (struct target_loadmap): New type.
10688 (linux_read_loadmap): New function.
10689 (linux_target_ops): Add linux_read_loadmap.
10690 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10691 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10692 to NULL.
78d85199 10693
a959a88d
EZ
106942011-08-05 Eli Zaretskii <eliz@gnu.org>
10695
10696 * win32-low.c: Include <stdint.h>.
10697
1ced966e
PA
106982011-07-22 Pedro Alves <pedro@codesourcery.com>
10699
10700 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10701 to the inferior here.
10702 (i386_remove_aligned_watchpoint): Ditto.
10703 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10704 fit part of the watchpoint in the debug registers.
10705 (i386_update_inferior_debug_regs): New.
10706 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10707 registers, and only update the inferior on success.
10708 (i386_low_remove_watchpoint): Ditto.
10709
d26e3629
KY
107102011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10711
10712 * linux-low.c (compare_ints, unique, list_threads, show_process,
10713 linux_core_of_thread): Delete.
10714 (linux_target_ops): Change linux_core_of_thread to
10715 linux_common_core_of_thread.
10716 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10717 * utils.c (malloc_failure): Change type of argument.
10718 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10719 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10720 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10721 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10722 (IPA_OBJS): Add common-utils-ipa.o.
10723 (ptid_h, linux_osdata_h): New macros.
10724 (server_h): Add common/common-utils.h, common/xml-utils.h,
10725 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10726 common/ptid.h.
10727 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10728 ptid.o, buffer.o): New rules.
10729 (linux-low.o): Add common/linux-osdata.h as a dependency.
10730 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10731 * configure.ac: Add AC_HEADER_DIRENT check.
10732 * config.in: Regenerate.
10733 * configure: Regenerate.
10734 * remote-utils.c (xml_escape_text): Delete.
10735 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10736 buffer_xml_printf): Move to common/buffer.c.
10737 * server.c (main): Remove call to initialize_inferiors.
10738 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10739 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10740 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10741 internal_error, gdb_assert, gdb_assert_fail): Delete.
10742 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10743 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10744 common/buffer.h.
10745 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10746 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10747 initialize_inferiors): Delete.
10748
2275a1a7
PA
107492011-07-20 Pedro Alves <pedro@codesourcery.com>
10750
10751 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10752 symbol error.
10753
0a5b1e09
PA
107542011-05-31 Pedro Alves <pedro@codesourcery.com>
10755
10756 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10757 assertion.
10758 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10759
6938fd34
YQ
107602011-05-26 Yao Qi <yao@codesourcery.com>
10761
10762 * Makefile.in (thread-db.o): Track dependence to
10763 common/gdb_thread_db.h.
10764 * thread-db.c: include gdb_thread_db.h from right place.
10765
b481f9e0
TT
107662011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10767
10768 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10769 __FILE__ and __LINE__ to internal_error.
10770
98a5dd13
DE
107712011-05-13 Doug Evans <dje@google.com>
10772
10773 * thread-db.c (try_thread_db_load_from_sdir): New function.
10774 (try_thread_db_load_from_dir): New function.
10775 (thread_db_load_search): Handle $sdir, ignore $pdir.
10776 Remove trying of system directories if search of
10777 libthread-db-search-path fails, that is now done via $sdir.
10778
d248b706
KY
107792011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10780
10781 * server.c (handle_query): Add EnableDisableTracepoints to the list
10782 of supported features.
43aaf8b6 10783 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10784 tracepoints.
43aaf8b6
PA
10785 (cmd_qtenable_disable): New.
10786 (cmd_qtstart): Install tracepoints even if disabled.
10787 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10788 receiving a QTEnable or QTDisable packet.
10789 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10790 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10791 tracepoints.
10792 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10793
84e578fb
DE
107942011-05-10 Doug Evans <dje@google.com>
10795
10796 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10797
71f55dd8
DE
107982011-05-04 Doug Evans <dje@google.com>
10799
10800 * linux-low.c (linux_join): Skip process lookup.
10801 * spu-low.c (spu_join): Ditto.
10802 * server.c (join_inferiors_callback): Delete.
10803 (process_serial_event): For 'D' packet (detach) call join_inferior
10804 directly.
10805
4d393d60
JM
108062011-05-04 Joseph Myers <joseph@codesourcery.com>
10807
10808 * README: Don't mention xscale*-*-linux*.
10809 * configure.srv (xscale*-*-linux*): Don't handle target.
10810
b00ad6ff
NF
108112011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10812
10813 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10814 casting pointers.
10815 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10816 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10817 (i386_emit_void_call_2): Likewise.
10818
af96c192
YQ
108192011-04-26 Yao Qi <yao@codesourcery.com>
10820
43aaf8b6
PA
10821 * linux-low.c: Move common macros to linux-ptrace.h.
10822 Include linux-ptrace.h.
af96c192
YQ
10823 * Makefile.in (linux_ptrace_h): New.
10824 (linux-low.o): Depends on linux-ptrace.h.
10825
03f2bd59
JK
108262011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10827
10828 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10829 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10830 (remote_prepare): New function with most of the TCP code from ...
10831 (remote_open): ... here. Detect PORT here unconditionally. Move also
10832 setting transport_is_reliable.
10833 * server.c (run_once): New variable.
10834 (gdbserver_usage): Document it.
10835 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10836 the first run if RUN_ONCE.
10837 * server.h (run_once, remote_prepare): New declarations.
10838
7a9dd1b2
TT
108392011-04-19 Tom Tromey <tromey@redhat.com>
10840
10841 * win32-low.c (handle_load_dll): Remove duplicate "the".
10842
81239425
PM
108432011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10844
10845 Remove support for old Cygwin 1.5 versions.
10846 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10847 function to avoid warning.
10848 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10849 warning.
10850
9e0627f1
PM
108512011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10852
10853 * gdbserver/server.h (Macro _): Define it if not available.
10854
588eebee
MS
108552011-03-14 Michael Snyder <msnyder@vmware.com>
10856
348af9f7 10857 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10858
43f70d4c
JB
108592011-03-10 Joel Brobecker <brobecker@adacore.com>
10860
10861 * Makefile.in (maintainer-clean realclean distclean): Remove
10862 "make ... subdir_do" command.
10863
348af9f7
MS
108642011-03-10 Michael Snyder <msnyder@vmware.com>
10865
10866 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10867
10868 * server.c (handle_v_run): Free alloced buffer on early return.
10869
e637a4f5
YQ
108702011-03-09 Yao Qi <yao@codesourcery.com>
10871
10872 Revert:
10873 2011-03-04 Yao Qi <yao@codesourcery.com>
10874
10875 * Makefile.in: Remove GNU make feature --directory.
10876
10877 2011-03-05 Yao Qi <yao@codesourcery.com>
10878
10879 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10880 (subdir_do): New make target. Copied from gdb/Makefile.
10881 (maintainer-clean, realclean, distclean, clean): Call corresponding
10882 make targets in common/Makefile.
10883
10884 2011-02-11 Yao Qi <yao@codesourcery.com>
10885
10886 * configure.ac: Call AC_PROG_RANLIB.
10887 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10888 * configure: Regenerate.
10889
e6edda56
JK
108902011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10891
10892 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10893
e5141119
JB
108942011-03-06 Yao Qi <yao@codesourcery.com>
10895
10896 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10897
64794aa4
JB
108982011-03-05 Yao Qi <yao@codesourcery.com>
10899
10900 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10901 (subdir_do): New make target. Copied from gdb/Makefile.
10902 (maintainer-clean, realclean, distclean, clean): Call corresponding
10903 make targets in common/Makefile.
10904
7a762829
YQ
109052011-03-04 Yao Qi <yao@codesourcery.com>
10906
10907 * Makefile.in: Remove GNU make feature --directory.
10908
348af9f7
MS
109092011-03-04 Michael Snyder <msnyder@vmware.com>
10910
10911 * server.c (queue_stop_reply): Call xmalloc not malloc.
10912
109132011-03-02 Michael Snyder <msnyder@vmware.com>
10914
10915 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10916
9f72fee2
MS
109172011-02-28 Michael Snyder <msnyder@vmware.com>
10918
588eebee
MS
10919 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10920 (cmd_qtframe): Ditto.
10921 (cmd_qtbuffer): Ditto.
10922 (cmd_bigqtbuffer): Ditto.
10923
9f72fee2
MS
10924 * utils.c (decimal2str): Initialize 'width' to nine, then
10925 don't mess with it.
10926
8040bd49
UW
109272011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10928
10929 * hostio.c (require_data): Free *data, not data.
10930
7e52cbd0
JK
109312011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10932
10933 * hostio.c (require_data): Use free, not xfree.
10934
9130f83e
MS
109352011-02-27 Michael Snyder <msnyder@vmware.com>
10936
4b812f4e
MS
10937 * server.c (handle_query): Discard unused value.
10938
9130f83e
MS
10939 * hostio.c (require_data): Free malloc memory before returning
10940 error.
10941
69d37113
MS
109422011-02-26 Michael Snyder <msnyder@vmware.com>
10943
10944 * linux-low.c (list_threads): Call closedir for dirent.
10945
35f5825a
MS
109462011-02-27 Michael Snyder <msnyder@vmware.com>
10947
2a589cef
MS
10948 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10949 a case statement falls through.
10950
0adea5f7
MS
10951 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10952
35f5825a
MS
10953 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10954 in comparison.
10955
238f1c74
MS
109562011-02-26 Michael Snyder <msnyder@vmware.com>
10957
10958 * utils.c (decimal2str): Eliminate dead code and dead param.
10959 (pulongest): Drop dead param from call to decimal2str.
10960 (plongest): Ditto.
10961
633ff500
JB
109622011-02-24 Joel Brobecker <brobecker@adacore.com>
10963
10964 Revert the following patch (not approved yet):
10965 2011-02-21 Hui Zhu <teawater@gmail.com>
10966 * tracepoint.c (tp_printf): New function.
10967 (eval_agent_expr): Handle gdb_agent_op_printf.
10968
f9c6ff72
HZ
109692011-02-21 Hui Zhu <teawater@gmail.com>
10970
10971 * tracepoint.c (tp_printf): New function.
10972 (eval_agent_expr): Handle gdb_agent_op_printf.
10973
94d5e490
TT
109742011-02-18 Tom Tromey <tromey@redhat.com>
10975
10976 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10977 (tracepoint.o): Likewise.
10978 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10979 (gdb_agent_op_names): Likewise.
10980
c7f96d2b
TT
109812011-02-18 Tom Tromey <tromey@redhat.com>
10982
10983 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10984 gdb_agent_op_rot>: New constants.
10985 (gdb_agent_op_names): Add pick and roll.
10986 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10987 cases.
10988
0feedb2c
JK
109892011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10990
10991 * aclocal.m4: Regenerated with aclocal-1.11.1.
10992
b3b9301e
PA
109932011-02-14 Pedro Alves <pedro@codesourcery.com>
10994
10995 * server.c (handle_qxfer_traceframe_info): New.
10996 (qxfer_packets): Register "traceframe-info".
10997 (handle_query): Report support for qXfer:traceframe-info:read+.
10998 * tracepoint.c (match_blocktype): New.
10999 (traceframe_find_block_type): Rename to ...
11000 (traceframe_walk_blocks): ... this. Add callback filter argument,
11001 and use it.
11002 (traceframe_find_block_type): New, reimplemented on top of
11003 traceframe_walk_blocks.
11004 (build_traceframe_info_xml): New.
11005 (traceframe_read_info): New.
11006 * server.h (traceframe_read_info): Declare.
11007
4f3e6fb7
YQ
110082011-02-11 Yao Qi <yao@codesourcery.com>
11009
11010 * configure.ac: Call AC_PROG_RANLIB.
11011 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11012 * configure: Regenerate.
11013
764880b7
PA
110142011-02-07 Pedro Alves <pedro@codesourcery.com>
11015
11016 * server.c (gdb_read_memory): Change return semantics to allow
11017 partial transfers.
11018 (handle_search_memory_1): Adjust.
11019 (process_serial_event) <'m' packet>: Handle partial transfers.
11020 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11021
1c79eb8a
PA
110222011-01-28 Pedro Alves <pedro@codesourcery.com>
11023
11024 * regcache.c (init_register_cache): Initialize
11025 regcache->register_status.
11026 (free_register_cache): Release regcache->register_status.
11027 (regcache_cpy): Copy register_status.
11028 (registers_to_string): Print 'x's for unavailable registers.
11029 (supply_register): Mark the register's status valid or
11030 unavailable, depending on whether a buffer was passed in or not.
11031 (supply_register_zeroed): New.
11032 (supply_regblock): Mark the registers' status valid or
11033 unavailable, depending on whether a buffer was passed in or not.
11034 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11035 (struct regcache): New `register_status' field.
11036 (supply_register_zeroed): Declare.
11037 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11038 supply_register_zeroed, rather than passing a NULL buffer to
11039 supply_register.
11040 * tracepoint.c (fetch_traceframe_registers): Update comment.
11041
85724a0e
PA
110422011-01-28 Pedro Alves <pedro@codesourcery.com>
11043
11044 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11045 buffer explicit.
11046
d08aafef
PA
110472011-01-25 Pedro Alves <pedro@codesourcery.com>
11048
11049 * server.h (decode_xfer_write): Change prototype.
11050 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11051 and don't extract the annex here.
11052 * server.c (decode_xfer_read): Remove `annex' parameter,
11053 and don't extract the annex here.
11054 (decode_xfer): New.
11055 (struct qxfer): New.
11056 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11057 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11058 (handle_qxfer_statictrace): New functions, abstracted out from
11059 handle_query, and made to use the struct qxfer interface.
11060 (handle_threads_qxfer_proper): Rename to ...
11061 (handle_qxfer_threads_proper): ... this.
11062 (handle_threads_qxfer): Rename to ...
11063 (handle_qxfer_threads): ... this. Adjust.
11064 (qxfer_packets): New array.
11065 (handle_qxfer): New function.
11066 (handle_query): Use handle_qxfer.
11067
493e2a69
MS
110682011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11069
11070 * gdbreplay.c: Shorten lines of >= 80 columns.
11071 * linux-low.c: Ditto.
11072 * linux-ppc-low.c: Ditto.
11073 * linux-s390-low.c: Ditto.
11074 * linux-sparc-low.c: Ditto.
11075 * linux-x86-low.c: Ditto.
11076 * linux-xtensa-low.c: Ditto.
11077 * mem-break.c: Ditto.
11078 * nto-low.c: Ditto.
11079 * regcache.h: Ditto.
11080 * remote-utils.c: Ditto.
11081 * server.c: Ditto.
11082 * server.h: Ditto.
11083 * thread-db.c: Ditto.
11084 * tracepoint.c: Ditto.
11085 * utils.c: Ditto.
11086 * win32-low.h: Ditto.
11087
44944448
JB
110882011-01-05 Joel Brobecker <brobecker@adacore.com>
11089
11090 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11091 update.
11092
71ce852c
JB
110932011-01-01 Joel Brobecker <brobecker@adacore.com>
11094
11095 * server.c (gdbserver_version): Update copyright year in version
11096 output.
11097 * gdbreplay.c (gdbreplay_version): Ditto.
11098
eb826dc6
MF
110992010-12-29 Jie Zhang <jie.zhang@analog.com>
11100
11101 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11102 * linux-bfin-low.c: New file.
11103 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11104 PT_DATA_ADDR for BFIN targets.
11105 * Makefile.in (SFILES): Add linux-bfin-low.c.
11106 (clean): Remove reg-bfin.c.
11107 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11108 * README: Mention supported Blackfin targets.
11109
39ab222a
MF
111102010-12-23 Mike Frysinger <vapier@gentoo.org>
11111
11112 * .gitignore: New file.
11113
a1f2ce7d
MF
111142010-11-16 Mike Frysinger <vapier@gentoo.org>
11115
11116 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11117
f474844c
JZ
111182010-10-22 Jie Zhang <jie@codesourcery.com>
11119
11120 * Makefile.in: Add FLAGS_TO_PASS variable.
11121 (install): Remove dependency of install-only and recursively
11122 invoke make for install-only.
11123
f1048712
DE
111242010-10-04 Doug Evans <dje@google.com>
11125
11126 * Makefile.in (uninstall): Use $(DESTDIR).
11127
b53a1623
PA
111282010-09-24 Pedro Alves <pedro@codesourcery.com>
11129
e6ee044d
PA
11130 PR gdb/11842
11131
b53a1623
PA
11132 * linux-x86-low.c (compat_siginfo_from_siginfo)
11133 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11134 si_code is < 0. Check for si_code == SI_TIMER before checking for
11135 si_code < 0.
11136
fa1bd1e4
JB
111372010-09-13 Joel Brobecker <brobecker@adacore.com>
11138
11139 * lynx-i386-low.c: New file.
11140 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11141
47fac8f8
JB
111422010-09-13 Joel Brobecker <brobecker@adacore.com>
11143
11144 * lynx-low.c (ptrace_request_to_str): Remove handling for
11145 request values that have been removed in LynxOS 5.x.
11146
1adfc54d
JB
111472010-09-13 Joel Brobecker <brobecker@adacore.com>
11148
11149 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11150 <ptrace.h>
11151
c2a66c29
NS
111522010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11153
11154 * configure.ac: Add --enable-inprocess-agent option.
11155 * configure: Rebuilt.
11156
32fcada3
YQ
111572010-09-06 Yao Qi <yao@codesourcery.com>
11158
11159 * linux-low.c (linux_kill): Remove unused variable.
11160 (linux_stabilize_threads): Likewise.
11161 * server.c (start_inferior): Likewise.
11162 (queue_stop_reply_callback): Likewise.
11163 * tracepoint.c (do_action_at_tracepoint): Likewise.
11164
0cccb683
YQ
111652010-09-06 Yao Qi <yao@codesourcery.com>
11166
11167 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11168 on return.
11169
423ec54c
JK
111702010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11171
11172 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11173
12ac6819
PA
111742010-09-06 Pedro Alves <pedro@codesourcery.com>
11175
11176 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11177 "$(IPA_DEPFILES)".
11178
8ed54b31
JB
111792010-09-01 Joel Brobecker <brobecker@adacore.com>
11180
11181 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11182 gdbserver/lynx-ppc-low.c: New files.
11183 * Makefile.in (lynx_low_h): New variable.
11184 (lynx-low.o, lynx-ppc-low.o): New rules.
11185 * configure.ac: On LynxOS, link with -lnetinet.
11186 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11187 * configure: regenerate.
11188
bb0116a4
JB
111892010-09-01 Joel Brobecker <brobecker@adacore.com>
11190
11191 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11192 * configure.ac: Add check for vasprintf and vsnprintf.
11193 * configure, config.in: Regenerate.
11194 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11195
a778ab81 111962010-09-01 Joel Brobecker <brobecker@adacore.com>
11197
11198 * gdbreplay.c: Move include of alloca.h up, next to include of
11199 malloc.h.
11200 * server.h: Add include of malloc.h.
11201 * mem-break.c: Remove include of malloc.h.
11202 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11203
8b034a19 112042010-09-01 Joel Brobecker <brobecker@adacore.com>
11205
11206 * Makefile.in (memmem.o): Build with -Wno-error.
11207
112082010-09-01 Joel Brobecker <brobecker@adacore.com>
11209
11210 * utils.c (xsnprintf): Make non-static.
11211 * server.h: Add xsnprintf declaration.
11212 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11213 replace calls to snprintf by calls to xsnprintf throughout.
11214
112152010-09-01 Joel Brobecker <brobecker@adacore.com>
11216
11217 * configure.ac: Add configure check for alloca.
11218 * configure, config.in: Regenerate.
11219 * server.h: Include alloca.h if it exists.
11220 * gdbreplay.c: Include alloca.h if it exists.
11221
1a981360
PA
112222010-08-28 Pedro Alves <pedro@codesourcery.com>
11223
11224 * linux-low.c (__SIGRTMIN): Define if not already defined.
11225 (linux_create_inferior): Check for __ANDROID__ rather than
11226 __SIGRTMIN.
11227 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11228 are already deferred.
11229 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11230 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11231 stopped and already has a pending signal to report.
11232 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11233 a pending signal to report or is moving out of a jump pad.
11234 (linux_init_signals): Check for __ANDROID__ rather than
11235 __SIGRTMIN.
11236
b4d51a55
PA
112372010-08-28 Pedro Alves <pedro@codesourcery.com>
11238
11239 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11240 debug_threads check. Avoid a linear search when not doing debug
11241 output.
11242
ec48365d
PA
112432010-08-27 Pedro Alves <pedro@codesourcery.com>
11244
11245 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11246 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11247 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11248 (process_event): Change local fd's type to gdb_fildes_t.
11249 (create_file_handler): Adjust prototype.
11250 (delete_file_handler): Adjust prototype.
11251 (handle_file_event): Adjust prototype. Use pfildes.
11252 (create_file_event): Adjsut prototype.
11253 * remote-utils.c (remote_desc, listen_desc): Change type to
11254 gdb_fildes_t.
11255 * server.h: New gdb_fildes_t typedef.
11256 [USE_WIN32API]: Include winsock2.h.
11257 (delete_file_handler, add_file_handler): Adjust prototypes.
11258 (pfildes): Declare.
11259 * utils.c (pfildes): New.
11260
854d88f0
PA
112612010-08-27 Pedro Alves <pedro@codesourcery.com>
11262
11263 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11264 * configure: Regenerate.
11265
0146f85b
PA
112662010-08-27 Pedro Alves <pedro@codesourcery.com>
11267
11268 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11269 (linux_done_accessing_memory): ... this.
11270 (linux_target_ops): Adjust.
11271 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11272 * nto-low.c (nto_target_ops): Adjust comment.
11273 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11274 * spu-low.c (spu_target_ops): Adjust comment.
11275 * target.h (target_ops): Rename unprepare_to_access_memory field
11276 to done_accessing_memory.
11277 (unprepare_to_access_memory): Rename to ...
11278 (done_accessing_memory): ... this.
11279
90d74c30
PA
112802010-08-26 Pedro Alves <pedro@codesourcery.com>
11281
11282 * linux-low.c (linux_prepare_to_access_memory): New.
11283 (linux_unprepare_to_access_memory): New.
11284 (linux_target_ops): Install them.
11285 * server.c (read_memory): Rename to ...
11286 (gdb_read_memory): ... this. Use
11287 prepare_to_access_memory/prepare_to_access_memory.
11288 (write_memory): Rename to ...
11289 (gdb_write_memory): ... this. Use
11290 prepare_to_access_memory/prepare_to_access_memory.
11291 (handle_search_memory_1): Adjust.
11292 (process_serial_event): Adjust.
11293 * target.h (struct target_ops): New fields
11294 prepare_to_access_memory and unprepare_to_access_memory.
11295 (prepare_to_access_memory, unprepare_to_access_memory): New.
11296 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11297 prepare_to_access_memory/prepare_to_access_memory.
11298 * nto-low.c (nto_target_ops): Adjust.
11299 * spu-low.c (spu_target_ops): Adjust.
11300 * win32-low.c (win32_target_ops): Adjust.
11301
fd467969
PA
113022010-08-26 Pedro Alves <pedro@codesourcery.com>
11303
11304 * Makefile.in (WARN_CFLAGS): Get it from configure.
11305 (WERROR_CFLAGS): New.
11306 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11307 * configure.ac: Introduce --enable-werror, which adds -Werror to
11308 the compiler command line. Enabled by default. Disable with
11309 --disable-werror. Add -Wdeclaration-after-statement
11310 Wpointer-arith and -Wformat-nonliteral to warning flags.
11311 * configure: Regenerate.
11312
331e2f5f
PA
113132010-08-26 Pedro Alves <pedro@codesourcery.com>
11314
11315 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11316
e581f2b4
PA
113172010-08-26 Pedro Alves <pedro@codesourcery.com>
11318
11319 * gdbreplay.c (remote_error): New.
11320 (gdbchar): New.
11321 (expect): Use gdbchar. Check for error reading from GDB.
11322 Clarify sync error output.
11323 (play): Check for errors writing to GDB.
11324 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11325 * remote-utils.c (getpkt): Check for errors writing to the remote
11326 descriptor.
11327
3c11dd79
PA
113282010-08-25 Pedro Alves <pedro@codesourcery.com>
11329
11330 * linux-low.c (linux_wait_1): Move non-debugging code out of
11331 `debug_threads' control.
11332
d20a8ad9
PA
113332010-08-25 Pedro Alves <pedro@codesourcery.com>
11334
11335 * linux-low.c (linux_wait_1): Don't set last_status here.
11336 * server.c (push_event, queue_stop_reply_callback): Assert we're
11337 not pushing a TARGET_WAITKIND_IGNORE event.
11338 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11339 (myresume, handle_target_event): Set the thread's last_resume_kind
11340 and last_status from the target returned status.
11341
964e4306
PA
113422010-08-25 Pedro Alves <pedro@codesourcery.com>
11343
11344 PR threads/10729
11345
11346 * linux-x86-low.c (update_debug_registers_callback): New.
11347 (i386_dr_low_set_addr): Use it.
11348 (i386_dr_low_get_addr): New.
11349 (i386_dr_low_set_control): Use update_debug_registers_callback.
11350 (i386_dr_low_get_control): New.
11351 (i386_dr_low_get_status): Adjust.
11352 * linux-low.c (linux_stop_lwp): New.
11353 * linux-low.h (linux_stop_lwp): Declare.
11354
11355 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11356 argument instead of a i386_debug_reg_state.
11357 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11358 a i386_debug_reg_state.
11359 (i386_insert_aligned_watchpoint): Adjust.
11360 (i386_remove_aligned_watchpoint): Adjust.
11361 (i386_low_stopped_data_address): Read the debug registers from the
11362 inferior instead of from the mirrors.
11363 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11364 (i386_dr_low_get_addr): Declare.
11365 (i386_dr_low_get_control): Declare.
11366 (i386_dr_low_get_status): Change prototype.
11367
11368 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11369 (i386_dr_low_get_addr): New.
11370 (i386_dr_low_get_control): New.
11371 (i386_dr_low_get_status): Adjust prototype. Return
11372 dr_status_mirror.
11373 (i386_initial_stuff): Clear dr_status_mirror and
11374 dr_control_mirror.
11375 (i386_get_thread_context): Adjust.
11376 (i386_set_thread_context): Adjust.
11377 (i386_thread_added): Adjust.
11378
5f21a75b
PA
113792010-08-24 Pedro Alves <pedro@codesourcery.com>
11380
11381 * linux-low.h (linux_thread_area): Delete declaration.
11382
3e4c1235
TS
113832010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11384
11385 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11386 after its termination.
11387
1971b033
PA
113882010-08-09 Pedro Alves <pedro@codesourcery.com>
11389
11390 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11391 (gdb_wants_all_stopped): Delete.
11392 (linux_wait_1): Don't call them.
11393 * server.c (handle_v_cont): Tag all threads as want-stopped.
11394 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11395 stopped as "client-wants-stopped".
11396
310444ac
PA
113972010-07-31 Pedro Alves <pedro@codesourcery.com>
11398
11399 * Makefile.in (signals_h): New.
11400 (server_h): Depend on it.
11401 (server.o): Don't depend on $(signals_def).
11402 (signals.o): Depend on $(signals_def).
11403
a19cae16
JK
114042010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11405
11406 * Makefile.in (signals_def): New.
11407 (server_h): Append include/gdb/signals.h and signals_def.
11408 (server.o): Append signals_def.
11409
30d50328
JK
114102010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11411
11412 * server.c (handle_target_event): Use target_signal_to_host for
11413 resume_info.sig initialization.
11414 * target.h (struct thread_resume) <sig>: New comment.
11415
5c3216e2
OS
114162010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11417
c6f46ca0
OS
11418 * server.c (handle_query): strcpy() the returned string from paddress()
11419 instead of sprintf().
5c3216e2
OS
11420 * utils.c (paddress): Return phex_nz().
11421
6bd31874
JB
114222010-07-07 Joel Brobecker <brobecker@adacore.com>
11423
11424 * server.c (handle_v_cont): Call mourn_inferior if process
11425 just exited.
11426 (myresume): Likewise.
11427
0fb4aa4b
PA
114282010-07-01 Pedro Alves <pedro@codesourcery.com>
11429
11430 Static tracepoints, and integration with UST.
11431
11432 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11433 * mem-break.c (uninsert_all_breakpoints)
11434 (reinsert_all_breakpoints): New.
11435 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11436 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11437 (gdb_agent_ust_loaded, helper_thread_id)
11438 (gdb_agent_helper_thread_id): New macros.
11439 (struct ipa_sym_addresses): Add addr_ust_loaded,
11440 addr_helper_thread_id, addr_cmd_buf.
11441 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11442 (in_process_agent_loaded_ust): New.
11443 (write_e_ust_not_loaded): New.
11444 (maybe_write_ipa_ust_not_loaded): New.
11445 (struct collect_static_trace_data_action): New.
11446 (enum tracepoint_type) <static_tracepoint>: New.
11447 (struct tracepoint) <handle>: Mention static tracepoints.
11448 (struct static_tracepoint_ctx): New.
11449 (CMD_BUF_SIZE): New.
11450 (add_tracepoint_action): Handle static tracepoint actions.
11451 (unprobe_marker_at): New.
11452 (clear_installed_tracepoints): Handle static tracepoints.
11453 (cmd_qtdp): Handle static tracepoints.
11454 (probe_marker_at): New.
11455 (cmd_qtstart): Handle static tracepoints.
11456 (response_tracepoint): Handle static tracepoints.
11457 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11458 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11459 (get_context_regcache): Handle static tracepoints.
11460 (do_action_at_tracepoint): Handle static tracepoint actions.
11461 (traceframe_find_block_type): Handle static trace data blocks.
11462 (traceframe_read_sdata): New.
11463 (download_tracepoints): Download static tracepoint actions.
11464 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11465 (GDB_PROBE_NAME): New.
11466 (ust_ops): New.
11467 (GET_UST_SYM): New.
11468 (USTF): New.
11469 (dlsym_ust): New.
11470 (ust_marker_to_static_tracepoint): New.
11471 (gdb_probe): New.
11472 (collect_ust_data_at_tracepoint): New.
11473 (gdb_ust_probe): New.
11474 (UNIX_PATH_MAX, SOCK_DIR): New.
11475 (gdb_ust_connect_sync_socket): New.
11476 (resume_thread, stop_thread): New.
11477 (run_inferior_command): New.
11478 (init_named_socket): New.
11479 (gdb_ust_socket_init): New.
11480 (cstr_to_hexstr): New.
11481 (next_st): New.
11482 (first_marker, next_marker): New.
11483 (response_ust_marker): New.
11484 (cmd_qtfstm, cmd_qtsstm): New.
11485 (unprobe_marker_at, probe_marker_at): New.
11486 (cmd_qtstmat, gdb_ust_thread): New.
11487 (gdb_ust_init): New.
11488 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11489 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11490 (ST_REGENTRY): New.
11491 (x86_64_st_collect_regmap): New.
11492 (X86_64_NUM_ST_COLLECT_GREGS): New.
11493 (AMD64_RIP_REGNUM): New.
11494 (supply_static_tracepoint_registers): New.
11495 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11496 (ST_REGENTRY): New.
11497 (i386_st_collect_regmap): New.
11498 (i386_NUM_ST_COLLECT_GREGS): New.
11499 (supply_static_tracepoint_registers): New.
11500 * server.c (handle_query): Handle qXfer:statictrace:read.
11501 <qSupported>: Report support for StaticTracepoints, and
11502 qXfer:statictrace:read features.
11503 * server.h (traceframe_read_sdata)
11504 (supply_static_tracepoint_registers): Declare.
11505 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11506 (unpack_varlen_hex): Include in IPA build.
11507 * Makefile.in (ustlibs, ustinc): New.
11508 (IPA_OBJS): Add remote-utils-ipa.o.
11509 ($(IPA_LIB)): Link -ldl and -lpthread.
11510 (UST_CFLAGS): New.
11511 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11512 * config.in, configure: Regenerate.
11513
9e4344e5
PA
115142010-06-20 Ian Lance Taylor <iant@google.com>
11515 Pedro Alves <pedro@codesourcery.com>
11516
11517 * linux-x86-low.c (always_true): Delete.
11518 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11519 trying to fool the compiler with always_true.
11520
c6beb2cb
PA
115212010-06-20 Pedro Alves <pedro@codesourcery.com>
11522
11523 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11524 conditions in gdbserver.
11525
d2ed6730
UW
115262010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11527
11528 * spu-low.c (spu_read_memory): Wrap around local store limit.
11529 (spu_write_memory): Likewise.
11530
4e29fb54
PA
115312010-06-15 Pedro Alves <pedro@codesourcery.com>
11532
11533 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11534 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11535 LONGEST uses.
11536 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11537 uses.
11538 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11539 uses with LONGEST uses.
11540
6a271cae
PA
115412010-06-14 Stan Shebs <stan@codesourcery.com>
11542 Pedro Alves <pedro@codesourcery.com>
11543
11544 Bytecode compiler.
11545
11546 * linux-x86-low.c: Include limits.h.
11547 (add_insns): New.
11548 (always_true): New.
11549 (EMIT_ASM): New.
11550 (EMIT_ASM32): New.
11551 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11552 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11553 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11554 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11555 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11556 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11557 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11558 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11559 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11560 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11561 (amd64_emit_void_call_2): New.
11562 (amd64_emit_ops): New.
11563 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11564 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11565 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11566 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11567 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11568 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11569 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11570 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11571 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11572 (i386_emit_stack_adjust, i386_emit_int_call_1)
11573 (i386_emit_void_call_2): New.
11574 (i386_emit_ops): New.
11575 (x86_emit_ops): New.
11576 (the_low_target): Install x86_emit_ops.
11577 * server.h (struct emit_ops): New.
11578 (get_raw_reg_func_addr): Declare.
11579 (current_insn_ptr, emit_error): Declare.
11580 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11581 (set_trace_state_variable_value): New defines.
11582 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11583 addr_get_trace_state_variable_value and
11584 addr_set_trace_state_variable_value.
11585 (symbol_list): New fields for get_raw_reg,
11586 get_trace_state_variable_value and set_trace_state_variable_value.
11587 (condfn): New typedef.
11588 (struct tracepoint): New field `compiled_cond'.
11589 (do_action_at_tracepoint): Clear compiled_cond.
11590 (get_trace_state_variable_value, set_trace_state_variable_value):
11591 Export in the IPA.
11592 (condition_true_at_tracepoint): If there's a compiled condition,
11593 run that.
11594 (current_insn_ptr, emit_error): New globals.
11595 (struct bytecode_address): New.
11596 (get_raw_reg_func_addr): New.
11597 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11598 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11599 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11600 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11601 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11602 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11603 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11604 (compile_tracepoint_condition, compile_bytecodes): New.
11605 * target.h (emit_ops): Forward declare.
11606 (struct target_ops): New field emit_ops.
11607 (target_emit_ops): New.
11608 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11609 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11610 * linux-low.c (linux_emit_ops): New.
11611 (linux_target_ops): Install it.
11612 * linux-low.h (struct linux_target_ops): New field emit_ops.
11613
92b72907
UW
116142010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11615
11616 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11617 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11618
fa593d66
PA
116192010-06-01 Pedro Alves <pedro@codesourcery.com>
11620 Stan Shebs <stan@codesourcery.com>
11621
11622 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11623 (all): Depend on $(extra_libraries).
11624 (install-only): Install the IPA.
11625 (IPA_OBJS, IPA_LIB): New.
11626 (clean): Remove the IPA lib.
11627 (IPAGENT_CFLAGS): New.
11628 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11629 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11630 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11631 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11632 * configure.ac: Check for atomic builtins support in the compiler.
11633 (IPA_DEPFILES, extra_libraries): Define.
11634 * configure.srv (ipa_obj): Add description.
11635 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11636 (i[34567]86-*-linux*): Set ipa_obj.
11637 (x86_64-*-linux*): Set ipa_obj.
11638 * linux-low.c (stabilizing_threads): New.
11639 (supports_fast_tracepoints): New.
11640 (linux_detach): Stabilize threads before detaching.
11641 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11642 the lwp is either not stabilizing, or is moving out of a jump pad.
11643 (linux_fast_tracepoint_collecting): New.
11644 (maybe_move_out_of_jump_pad): New.
11645 (enqueue_one_deferred_signal): New.
11646 (dequeue_one_deferred_signal): New.
11647 (linux_wait_for_event_1): If moving out of a jump pad, defer
11648 pending signals to later.
11649 (linux_stabilize_threads): New.
11650 (linux_wait_1): Check if threads need moving out of jump pads, and
11651 do it if so.
11652 (stuck_in_jump_pad_callback): New.
11653 (move_out_of_jump_pad_callback): New.
11654 (lwp_running): New.
11655 (linux_resume_one_lwp): Handle moving out of jump pads.
11656 (linux_set_resume_request): Dequeue deferred signals.
11657 (need_step_over_p): Also step over fast tracepoint jumps.
11658 (start_step_over): Also uninsert fast tracepoint jumps.
11659 (finish_step_over): Also reinsert fast tracepoint jumps.
11660 (linux_install_fast_tracepoint_jump): New.
11661 (linux_target_ops): Install linux_stabilize_threads and
11662 linux_install_fast_tracepoint_jump_pad.
11663 * linux-low.h (linux_target_ops) <get_thread_area,
11664 install_fast_tracepoint_jump_pad>: New fields.
11665 (struct lwp_info) <collecting_fast_tracepoint,
11666 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11667 (linux_get_thread_area): Declare.
11668 * linux-x86-low.c (jump_insn): New.
11669 (x86_get_thread_area): New.
11670 (append_insns): New.
11671 (push_opcode): New.
11672 (amd64_install_fast_tracepoint_jump_pad): New.
11673 (i386_install_fast_tracepoint_jump_pad): New.
11674 (x86_install_fast_tracepoint_jump_pad): New.
11675 (the_low_target): Install x86_get_thread_area and
11676 x86_install_fast_tracepoint_jump_pad.
11677 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11678 (struct fast_tracepoint_jump): New.
11679 (fast_tracepoint_jump_insn): New.
11680 (fast_tracepoint_jump_shadow): New.
11681 (find_fast_tracepoint_jump_at): New.
11682 (fast_tracepoint_jump_here): New.
11683 (delete_fast_tracepoint_jump): New.
11684 (set_fast_tracepoint_jump): New.
11685 (uninsert_fast_tracepoint_jumps_at): New.
11686 (reinsert_fast_tracepoint_jumps_at): New.
11687 (set_breakpoint_at): Use write_inferior_memory.
11688 (uninsert_raw_breakpoint): Use write_inferior_memory.
11689 (check_mem_read): Mask out fast tracepoint jumps.
11690 (check_mem_write): Mask out fast tracepoint jumps.
11691 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11692 (set_fast_tracepoint_jump): Declare.
11693 (delete_fast_tracepoint_jump)
11694 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11695 (reinsert_fast_tracepoint_jumps_at): Declare.
11696 * regcache.c: Don't compile many functions when building the
11697 in-process agent library.
11698 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11699 the register buffer in the heap.
11700 (free_register_cache): If the register buffer isn't owned by the
11701 regcache, don't free it.
11702 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11703 pre-existing register caches.
11704 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11705 type.
11706 (convert_ascii_to_int): : Constify `from' parameter type.
11707 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11708 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11709 the needed buffer in-place.
11710 (relocate_instruction): New.
11711 * server.c (handle_query) <qSymbols>: If the target supports
11712 tracepoints, give it a chance of looking up symbols. Report
11713 support for fast tracepoints.
11714 (handle_status): Stabilize threads.
11715 (process_serial_event): Adjust.
11716 * server.h (struct fast_tracepoint_jump): Forward declare.
11717 (struct process_info) <fast_tracepoint_jumps>: New field.
11718 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11719 (decode_X_packet, decode_M_packet): Adjust.
11720 (relocate_instruction): Declare.
11721 (in_process_agent_loaded): Declare.
11722 (tracepoint_look_up_symbols): Declare.
11723 (struct fast_tpoint_collect_status): Declare.
11724 (fast_tracepoint_collecting): Declare.
11725 (force_unlock_trace_buffer): Declare.
11726 (handle_tracepoint_bkpts): Declare.
11727 (initialize_low_tracepoint)
11728 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11729 * target.h (struct target_ops) <stabilize_threads,
11730 install_fast_tracepoint_jump_pad>: New fields.
11731 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11732 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11733 [HAVE_STDINT_H]: Include stdint.h.
11734 (trace_debug_1): Rename to ...
11735 (trace_vdebug): ... this.
11736 (trace_debug): Rename to ...
11737 (trace_debug_1): ... this. Add `level' parameter.
11738 (trace_debug): New.
11739 (ATTR_USED, ATTR_NOINLINE): New.
11740 (IP_AGENT_EXPORT): New.
11741 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11742 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11743 (about_to_request_buffer_space, trace_buffer_is_full)
11744 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11745 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11746 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11747 (traceframe_write_count, traceframes_created)
11748 (trace_state_variables)
11749 New renaming defines.
11750 (struct ipa_sym_addresses): New.
11751 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11752 (symbol_list): New.
11753 (ipa_sym_addrs): New.
11754 (all_tracepoint_symbols_looked_up): New.
11755 (in_process_agent_loaded): New.
11756 (write_e_ipa_not_loaded): New.
11757 (maybe_write_ipa_not_loaded): New.
11758 (tracepoint_look_up_symbols): New.
11759 (debug_threads) [IN_PROCESS_AGENT]: New.
11760 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11761 (UNKNOWN_SIDE_EFFECTS): New.
11762 (stop_tracing): New.
11763 (flush_trace_buffer): New.
11764 (stop_tracing_bkpt): New.
11765 (flush_trace_buffer_bkpt): New.
11766 (read_inferior_integer): New.
11767 (read_inferior_uinteger): New.
11768 (read_inferior_data_pointer): New.
11769 (write_inferior_data_pointer): New.
11770 (write_inferior_integer): New.
11771 (write_inferior_uinteger): New.
11772 (struct collect_static_trace_data_action): Delete.
11773 (enum tracepoint_type): New.
11774 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11775 <actions_str, step_actions, step_actions_str>: Only include in
11776 GDBserver.
fa593d66
PA
11777 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11778 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11779 (tracepoints): Use IP_AGENT_EXPORT.
11780 (last_tracepoint): Don't include in the IPA.
11781 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11782 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11783 (alloced_trace_state_variables): New.
11784 (trace_state_variables): Use IP_AGENT_EXPORT.
11785 (traceframe_t): Delete unused variable.
11786 (circular_trace_buffer): Don't include in the IPA.
11787 (trace_buffer_start): Delete.
11788 (struct trace_buffer_control): New.
11789 (trace_buffer_free): Delete.
11790 (struct ipa_trace_buffer_control): New.
11791 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11792 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11793 New.
11794 (trace_buffer_ctrl): New.
11795 (TRACE_BUFFER_CTRL_CURR): New.
11796 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11797 Reimplement as macros.
11798 (trace_buffer_wrap): Delete.
11799 (traceframe_write_count, traceframe_read_count)
11800 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11801 (struct tracepoint_hit_ctx) <type>: New field.
11802 (struct fast_tracepoint_ctx): New.
11803 (memory_barrier): New.
11804 (cmpxchg): New.
11805 (record_tracepoint_error): Update atomically in the IPA.
11806 (clear_inferior_trace_buffer): New.
11807 (about_to_request_buffer_space): New.
11808 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11809 updating the same buffer.
11810 (add_tracepoint): Default the tracepoint's type to trap
11811 tracepoint, and orig_size to -1.
11812 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11813 internal variables.
11814 (create_trace_state_variable): New parameter `gdb'. Handle it.
11815 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11816 (cmd_qtdp): Handle fast tracepoints.
11817 (cmd_qtdv): Adjust.
11818 (max_jump_pad_size): New.
11819 (gdb_jump_pad_head): New.
11820 (get_jump_space_head): New.
11821 (claim_jump_space): New.
11822 (sort_tracepoints): New.
11823 (MAX_JUMP_SIZE): New.
11824 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11825 IPA.
11826 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11827 support. Upload fast traceframes, and delete internal IPA
11828 breakpoints.
11829 (stop_tracing_handler): New.
11830 (flush_trace_buffer_handler): New.
11831 (cmd_qtstop): Upload fast tracepoints.
11832 (response_tracepoint): Handle fast tracepoints.
11833 (tracepoint_finished_step): Upload fast traceframes. Set the
11834 tracepoint hit context's tracepoint type.
11835 (handle_tracepoint_bkpts): New.
11836 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11837 type. Add comment about fast tracepoints.
11838 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11839 non-existing action_str field.
11840 (get_context_regcache): Handle fast tracepoints.
11841 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11842 to the regcache.
11843 (fast_tracepoint_from_jump_pad_address): New.
11844 (fast_tracepoint_from_ipa_tpoint_address): New.
11845 (collecting_t): New.
11846 (force_unlock_trace_buffer): New.
11847 (fast_tracepoint_collecting): New.
11848 (collecting): New.
11849 (gdb_collect): New.
11850 (write_inferior_data_ptr): New.
11851 (target_tp_heap): New.
11852 (target_malloc): New.
11853 (download_agent_expr): New.
11854 (UALIGN): New.
11855 (download_tracepoints): New.
11856 (download_trace_state_variables): New.
11857 (upload_fast_traceframes): New.
11858 (IPA_FIRST_TRACEFRAME): New.
11859 (IPA_NEXT_TRACEFRAME_1): New.
11860 (IPA_NEXT_TRACEFRAME): New.
11861 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11862 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11863 (gdb_jump_pad_buffer_end): New.
11864 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11865 (initialize_tracepoint): Adjust.
11866 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11867 buffer. Initialize the low module.
11868 * utils.c (PREFIX, TOOLNAME): New.
11869 (malloc_failure): Use PREFIX.
11870 (error): In the IPA, an error causes an exit.
11871 (fatal, warning): Use PREFIX.
11872 (internal_error): Use TOOLNAME.
11873 (NUMCELLS): Increase to 10.
11874 * configure, config.in: Regenerate.
11875
d149dd1d
PA
118762010-06-01 Pedro Alves <pedro@codesourcery.com>
11877
11878 * server.c (handle_query) <qSupported>: Do two passes over the
11879 qSupported string to avoid nesting strtok.
11880
f6528abd
JK
118812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11882
11883 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11884 (CDEPS): New.
11885 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11886 -Wl,--dynamic-list.
11887 * configure: Regenerate.
11888 * proc-service.list: New.
11889
ca2a87a0
JK
118902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11891
11892 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11893 New comment.
11894
363a6e9f
OS
118952010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11896
11897 * gdbreplay.c (remote_open): Check error return from socket() call by
11898 its equality to -1 not by it being negative.
11899 * remote-utils.c (remote_open): Likewise.
11900
d23b6cb1
PA
119012010-05-23 Pedro Alves <pedro@codesourcery.com>
11902
11903 * config.h: Regenerate.
11904
28d3cf85
MK
119052010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11906
11907 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11908 doesn't provide PTRACE_GET_THREAD_AREA.
11909
fea36a59
MK
119102010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11911
11912 * linux-m68k-low.c: Include <asm/ptrace.h>
11913 (ps_get_thread_area): Implement.
11914
24b066ba
DE
119152010-05-03 Doug Evans <dje@google.com>
11916
11917 * event-loop.c (struct callback_event): New struct.
11918 (callback_list): New global.
11919 (append_callback_event, delete_callback_event): New functions.
11920 (process_callback): New function.
11921 (start_event_loop): Call it.
11922 * remote-utils.c (NOT_SCHEDULED): Define.
11923 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11924 moved out of readchar.
11925 (readchar): Rewrite. Call reschedule before returning.
11926 (reset_readchar): New function.
11927 (remote_close): Call it.
11928 (process_remaining, reschedule): New functions.
11929 * server.h (callback_handler_func): New typedef.
11930 (append_callback_event, delete_callback_event): Declare.
11931
9836d6ea
PA
119322010-05-03 Pedro Alves <pedro@codesourcery.com>
11933
11934 * proc-service.c (ps_pglobal_lookup): Use
11935 thread_db_look_up_one_symbol.
11936 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11937 parameter. Use it instead of all_symbols_looked_up.
11938 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11939 field.
11940 (all_symbols_looked_up): Don't declare.
11941 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11942 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11943 field.
11944 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11945 Set all_symbols_looked_up here.
11946 (thread_db_look_up_one_symbol): New.
11947 (thread_db_get_tls_address): Adjust.
11948 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11949 thread_db object on the heap, and tentatively set it in the
11950 process structure.
11951 (thread_db_init): Don't set all_symbols_looked_up here.
11952 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11953
7984d532
PA
119542010-05-03 Pedro Alves <pedro@codesourcery.com>
11955
11956 * linux-low.c (linux_kill, linux_detach): Adjust.
11957 (status_pending_p_callback): Remove redundant statement. Check
11958 for !TARGET_WAITIKIND_IGNORE, instead of
11959 TARGET_WAITKIND_STOPPED.
11960 (handle_tracepoints): Make sure LWP is locked. Adjust.
11961 (linux_wait_for_event_1): Adjust.
11962 (linux_cancel_breakpoints): New.
11963 (unsuspend_one_lwp): New.
11964 (unsuspend_all_lwps): New.
11965 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11966 (send_sigstop_callback): Change return type to int, add new
11967 `except' parameter and handle it.
11968 (suspend_and_send_sigstop_callback): New.
11969 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11970 pass them down. If SUSPEND, also increment the lwp's suspend
11971 count.
11972 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11973 (need_step_over_p): Don't consider suspended LWPs.
11974 (start_step_over): Adjust.
11975 (proceed_one_lwp): Change return type to int, add new `except'
11976 parameter and handle it.
11977 (unsuspend_and_proceed_one_lwp): New.
11978 (proceed_all_lwps): Use find_inferior instead of
11979 for_each_inferior.
11980 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11981 also decrement the suspend count of LWPs. Pass `except' down,
11982 instead of hacking its suspend count.
11983 (linux_pause_all): Add `freeze' parameter. Adjust.
11984 (linux_unpause_all): New.
11985 (linux_target_ops): Install linux_unpause_all.
11986 * server.c (handle_status): Adjust.
11987 * target.h (struct target_ops): New fields `unpause_all' and
11988 `cancel_breakpoints'. Add new parameter to `pause_all'.
11989 (pause_all): Add new `freeze' parameter.
11990 (unpause_all): New.
11991 (cancel_breakpoints): New.
11992 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11993 cancel breakpoints.
11994 (cmd_qtstart): Pause threads.
11995 (stop_tracing): Pause threads, and cancel breakpoints.
11996 * win32-low.c (win32_target_ops): Adjust.
11997
e471f25b
PA
119982010-05-03 Pedro Alves <pedro@codesourcery.com>
11999
12000 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12001 the inferior right away from here...
12002 (linux_wait_1): ... to here, and adjust to check the thread's
12003 last_resume_kind instead of the lwp's step or stop_expected flags.
12004
1915ef4f
PA
120052010-05-02 Pedro Alves <pedro@codesourcery.com>
12006
12007 * README: Use consistent `GDB' and `GDBserver' spellings.
12008
f9e39928
PA
120092010-05-02 Pedro Alves <pedro@codesourcery.com>
12010
12011 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12012 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12013 (linux_detach_one_lwp): Assume the lwp is stopped.
12014 (any_thread_of): Delete.
12015 (linux_detach): Stop all lwps here. Don't blindly delete all
12016 breakpoints.
12017 (delete_lwp_callback): New.
12018 (linux_mourn): Delete all lwps of the process that is gone.
12019 (linux_wait_1): Don't delete the last lwp of the process here.
12020 * mem-break.h (mark_breakpoints_out): Declare.
12021 * mem-break.c (mark_breakpoints_out): New.
12022 (free_all_breakpoints): Use it.
12023 * server.c (handle_target_event): If the process is gone, mark
12024 breakpoints out.
12025 * thread-db.c (struct thread_db) <create_bp>: New field.
12026 (thread_db_enable_reporting): Fix prototype. Store a thread event
12027 breakpoint reference in the thread_db struct.
12028 (thread_db_load_search): Clear the thread_db object.
12029 (try_thread_db_load_1): Ditto.
12030 (switch_to_process): New.
12031 (disable_thread_event_reporting): Use it.
12032 (remove_thread_event_breakpoints): New.
12033 (thread_db_detach, thread_db_mourn): Use it.
12034
1e7fc18c
PA
120352010-05-01 Pedro Alves <pedro@codesourcery.com>
12036
12037 * linux-low.c (linux_enable_event_reporting): New.
12038 (linux_wait_for_event_1, handle_extended_wait): Use it.
12039
02fc4de7
PA
120402010-04-30 Pedro Alves <pedro@codesourcery.com>
12041
12042 * linux-low.c (linux_kill_one_lwp, linux_kill)
12043 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12044 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12045 SIGSTOP even if the LWP is stopped.
12046 (send_sigstop_callback): New.
12047 (stop_all_lwps): Use send_sigstop_callback instead.
12048 (linux_resume_one_thread): Adjust.
12049 (proceed_one_lwp): Still proceed an LWP that the client has
12050 requested to stop, if we haven't reported it as stopped yet. Make
12051 sure that LWPs the client want stopped, have a pending SIGSTOP.
12052
bc3b5632
DE
120532010-04-26 Doug Evans <dje@google.com>
12054
ae1ada35
DE
12055 * server.c (handle_general_set): Make static.
12056
bc3b5632
DE
12057 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12058 Print received char after testing for error/eof instead of before.
12059 (input_interrupt): Tweak comment.
12060
65730243
DE
120612010-04-23 Doug Evans <dje@google.com>
12062
12063 * server.c (start_inferior): Print inferior argv if --debug.
12064
a8ae7dc0
AR
120652010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12066
12067 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12068 * nto-x86-low.c: Include server.h
12069
1c07cc19
PM
120702010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12071
12072 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12073 be consistent with other sources of this directory.
12074 (init_registers_amd64): Correct name of source file of this function
12075 in the comment.
12076
e0a61e09
PM
120772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12078
12079 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12080 64-bit executables.
12081
54709339
PM
120822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12083
12084 * win32-i386-low.c: Add 64-bit support.
12085 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12086 (init_registers_amd64): Declare.
12087 (mappings): Add 64-bit version of array.
12088 (init_windows_x86): New function.
12089 (the_low_target): Change init_arch field to init_windows_x86.
12090
e8f0053d
PM
120912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12092
12093 * win32-low.c: Adapt to support also 64-bit architecture.
12094 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12095 (get_image_name): Use SIZE_T type for local variable `done'.
12096 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12097 (toolhelp_get_dll_name): Idem.
12098 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12099 Use uintptr_t typecast to avoid warning.
12100 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12101 (handle_exception): Use phex_nz to avoid warning.
12102 (win32_wait): Remove unused local variable `process'.
12103
c481e77e
PM
121042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12105
12106 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12107 `amd64-avx.o'.
12108
12ea4b69
PM
121092010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12110
12111 * configure.ac: Use `ws2_32' library for srv_mingw.
12112 * configure: Regenerate.
12113 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12114 * remote-utils.c: Likewise.
12115
f6d1620c
L
121162010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12117
12118 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12119 if __x86_64__ is defined.
12120
8e642873
PM
121212010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12122
12123 * configure: Regenerate.
12124
711e434b
PM
121252010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12126
12127 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12128 * target.h (target_ops): New get_tib_address field.
12129 * win32-low.h (win32_thread_info): Add thread_local_base field.
12130 * win32-low.c (child_add_thread): Add tlb argument.
12131 Set thread_local_base field to TLB.
12132 (get_child_debug_event): Adapt to child_add_thread change.
12133 (win32_get_tib_address): New function.
12134 (win32_target_ops): Set get_tib_address field to
12135 win32_get_tib_address.
12136 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12137
505106cd
PA
121382010-04-12 Pedro Alves <pedro@codesourcery.com>
12139
505106cd
PA
12140 * linux-low.c (linux_mourn): Also remove the process.
12141 * server.c (handle_target_event): Don't remove the process here.
12142 * nto-low.c (nto_mourn): New.
12143 (nto_target_ops): Install it.
12144 * spu-low.c (spu_mourn): New.
12145 (spu_target_ops): Install it.
12146 * win32-low.c (win32_mourn): New.
12147 (win32_target_ops): Install it.
12148
e8470a06
PA
121492010-04-12 Pedro Alves <pedro@codesourcery.com>
12150
12151 * server.h (buffer_xml_printf): Remove redundant `;'.
12152
45ba0d02
PA
121532010-04-12 Pedro Alves <pedro@codesourcery.com>
12154
12155 * regcache.c (set_register_cache): Invalidate regcaches before
12156 changing the register cache layout.
12157 (regcache_invalidate_one): Allow a NULL regcache.
12158 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12159 regcaches before changing the register cache layout or the target
12160 regsets.
12161
59e04013
L
121622010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12163
12164 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12165 variable warning on Linux/x86-64.
12166
8336d594
PA
121672010-04-11 Pedro Alves <pedro@codesourcery.com>
12168
12169 GDBserver disconnected tracing support.
12170
12171 * linux-low.c (linux_remove_process): Delete.
12172 (add_lwp): Don't set last_resume_kind here.
12173 (linux_kill): Use `mourn'.
12174 (linux_detach): Use `thread_db_detach', and `mourn'.
12175 (linux_mourn): New.
12176 (linux_attach_lwp_1): Adjust comment.
12177 (linux_attach): last_resume_kind moved the thread_info; adjust.
12178 (status_pending_p_callback): Adjust.
12179 (linux_wait_for_event_1): Adjust.
12180 (count_events_callback, select_singlestep_lwp_callback)
12181 (select_event_lwp_callback, cancel_breakpoints_callback)
12182 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12183 (proceed_one_lwp): Adjust.
12184 (linux_async): Add debug output.
12185 (linux_thread_stopped): New.
12186 (linux_pause_all): New.
12187 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12188 linux_pause_all.
12189 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12190 (thread_db_free): Delete declaration.
12191 (thread_db_detach, thread_db_mourn): Declare.
12192 * thread-db.c (thread_db_init): Use thread_db_mourn.
12193 (thread_db_free): Delete, split in two.
12194 (disable_thread_event_reporting): New.
12195 (thread_db_detach): New.
12196 (thread_db_mourn): New.
12197
12198 * server.h (struct thread_info) <last_resume_kind>: New field.
12199 <attached>: Add comment.
12200 <gdb_detached>: New field.
12201 (handler_func): Change return type to int.
12202 (handle_serial_event, handle_target_event): Ditto.
12203 (gdb_connected): Declare.
12204 (tracing): Delete.
12205 (disconnected_tracing): Declare.
12206 (stop_tracing): Declare.
12207
12208 * server.c (handle_query) <qSupported>: Report support for
12209 disconnected tracing.
12210 (queue_stop_reply_callback): Account for running threads.
12211 (gdb_wants_thread_stopped): New.
12212 (gdb_wants_all_threads_stopped): New.
12213 (gdb_reattached_process): New.
12214 (handle_status): Clear the `gdb_detached' flag of all processes.
12215 In all-stop, stop all threads.
12216 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12217 (process_serial_event): If the remote connection breaks, or if an
12218 exit was forced with "monitor exit", force an event loop exit.
12219 Handle disconnected tracing on detach.
12220 (handle_serial_event): Adjust.
12221 (handle_target_event): If GDB isn't connected, forward events back
12222 to the inferior, unless the last process exited, in which case,
12223 exit gdbserver. Adjust interface.
12224
12225 * remote-utils.c (remote_open): Don't block in accept. Instead
12226 register an event loop source on the listen socket file
12227 descriptor. Refactor bits into ...
12228 (listen_desc): ... this new global.
12229 (gdb_connected): ... this new function.
12230 (enable_async_notification): ... this new function.
12231 (handle_accept_event): ... this new function.
12232 (remote_close): Clear remote_desc.
12233
12234 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12235
12236 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12237 New fields.
12238 (mourn_inferior): Define.
12239 (target_process_qsupported): Avoid the dangling else problem.
12240 (thread_stopped): Define.
12241 (pause_all): Define.
12242 (target_waitstatus_to_string): Declare.
12243 * target.c (target_waitstatus_to_string): New.
12244
12245 * tracepoint.c (tracing): Make extern.
12246 (disconnected_tracing): New.
12247 (stop_tracing): Make extern. Handle tracing stops due to GDB
12248 disconnecting.
12249 (cmd_qtdisconnected): New.
12250 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12251 (handle_tracepoint_general_set): Handle QTDisconnected.
12252
12253 * event-loop.c (event_handler_func): Change return type to int.
12254 (process_event): Bail out if the event handler wants the event
12255 loop to stop.
12256 (handle_file_event): Ditto.
12257 (start_event_loop): Bail out if the event handler wants the event
12258 loop to stop.
12259
12260 * nto-low.c (nto_target_ops): Adjust.
12261 * spu-low.c (spu_wait): Don't remove the process here.
12262 (spu_target_ops): Adjust.
12263 * win32-low.c (win32_wait): Don't remove the process here.
12264 (win32_target_ops): Adjust.
12265
5d267c4c
PA
122662010-04-11 Pedro Alves <pedro@codesourcery.com>
12267
12268 * regcache.c (realloc_register_cache): Invalidate inferior's
12269 regcache before recreating it.
12270
623ccd72
PA
122712010-04-09 Pedro Alves <pedro@codesourcery.com>
12272
12273 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12274
219f2f23
PA
122752010-04-09 Stan Shebs <stan@codesourcery.com>
12276 Pedro Alves <pedro@codesourcery.com>
12277
12278 * server.h (LONGEST): New.
12279 (struct thread_info) <while_stepping>: New field.
12280 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12281 Declare.
12282 (initialize_tracepoint, handle_tracepoint_general_set)
12283 (handle_tracepoint_query, tracepoint_finished_step)
12284 (tracepoint_was_hit, release_while_stepping_state_list):
12285 (current_traceframe): Declare.
12286 * server.c (handle_general_set): Handle tracepoint packets.
12287 (read_memory): New.
12288 (write_memory): New.
12289 (handle_search_memory_1): Use read_memory.
12290 (handle_query): Report support for conditional tracepoints, trace
12291 state variables, and tracepoint sources. Handle tracepoint
12292 queries.
12293 (main): Initialize the tracepoints module.
12294 (process_serial_event): Handle traceframe reads/writes.
12295
12296 * linux-low.c (handle_tracepoints): New.
12297 (linux_wait_1): Call it.
12298 (linux_resume_one_lwp): Handle while-stepping.
12299 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12300 (linux_target_ops): Install them.
12301 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12302 New field.
12303 * linux-x86-low.c (x86_supports_tracepoints): New.
12304 (the_low_target). Install it.
12305
12306 * mem-break.h (delete_breakpoint): Declare.
12307 * mem-break.c (delete_breakpoint): Make external.
12308
12309 * target.h (struct target_ops): Add `supports_tracepoints',
12310 `read_pc', and `write_pc' fields.
12311 (target_supports_tracepoints): Define.
12312 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12313 (phex_nz): New.
12314
12315 * regcache.h (struct regcache) <registers_owned>: New field.
12316 (init_register_cache, regcache_cpy): Declare.
12317 (regcache_read_pc, regcache_write_pc): Declare.
12318 (register_cache_size): Declare.
12319 (supply_regblock): Declare.
12320 * regcache.c (init_register_cache): New.
12321 (new_register_cache): Use it.
12322 (regcache_cpy): New.
12323 (register_cache_size): New.
12324 (supply_regblock): New.
12325 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12326
219f2f23
PA
12327 * tracepoint.c: New.
12328
12329 * Makefile.in (OBS): Add tracepoint.o.
12330 (tracepoint.o): New rule.
12331
3a13a53b
L
123322010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12333
12334 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12335 (i386-mmx.o): New.
12336 (i386-mmx.c): Likewise.
12337 (i386-mmx-linux.o): Likewise.
12338 (i386-mmx-linux.c): Likewise.
12339
12340 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12341 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12342 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12343 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12344
12345 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12346 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12347 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12348
1570b33e
L
123492010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12350
12351 * Makefile.in (clean): Updated.
12352 (i386-avx.o): New.
12353 (i386-avx.c): Likewise.
12354 (i386-avx-linux.o): Likewise.
12355 (i386-avx-linux.c): Likewise.
12356 (amd64-avx.o): Likewise.
12357 (amd64-avx.c): Likewise.
12358 (amd64-avx-linux.o): Likewise.
12359 (amd64-avx-linux.c): Likewise.
12360
12361 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12362 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12363 (srv_amd64_regobj): Add amd64-avx.o.
12364 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12365 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12366 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12367 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12368 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12369 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12370 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12371
12372 * i387-fp.c: Include "i386-xstate.h".
12373 (i387_xsave): New.
12374 (i387_cache_to_xsave): Likewise.
12375 (i387_xsave_to_cache): Likewise.
12376 (x86_xcr0): Likewise.
12377
12378 * i387-fp.h (i387_cache_to_xsave): Likewise.
12379 (i387_xsave_to_cache): Likewise.
12380 (x86_xcr0): Likewise.
12381
12382 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12383 * linux-crisv32-low.c (target_regsets): Likewise.
12384 * linux-m68k-low.c (target_regsets): Likewise.
12385 * linux-mips-low.c (target_regsets): Likewise.
12386 * linux-ppc-low.c (target_regsets): Likewise.
12387 * linux-s390-low.c (target_regsets): Likewise.
12388 * linux-sh-low.c (target_regsets): Likewise.
12389 * linux-sparc-low.c (target_regsets): Likewise.
12390 * linux-xtensa-low.c (target_regsets): Likewise.
12391
12392 * linux-low.c: Include <sys/uio.h>.
12393 (regsets_fetch_inferior_registers): Support nt_type.
12394 (regsets_store_inferior_registers): Likewise.
12395 (linux_process_qsupported): New.
12396 (linux_target_ops): Add linux_process_qsupported.
12397
12398 * linux-low.h (regset_info): Add nt_type.
12399 (linux_target_ops): Add process_qsupported.
12400
12401 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12402 and <sys/uio.h>.
12403 (init_registers_i386_avx_linux): New.
12404 (init_registers_amd64_avx_linux): Likewise.
12405 (xmltarget_i386_linux_no_xml): Likewise.
12406 (xmltarget_amd64_linux_no_xml): Likewise.
12407 (PTRACE_GETREGSET): Likewise.
12408 (PTRACE_SETREGSET): Likewise.
12409 (x86_fill_xstateregset): Likewise.
12410 (x86_store_xstateregset): Likewise.
12411 (use_xml): Likewise.
12412 (x86_linux_update_xmltarget): Likewise.
12413 (x86_linux_process_qsupported): Likewise.
12414 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12415 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12416 init_registers_i386_linux here. Call
12417 x86_linux_update_xmltarget.
12418 (the_low_target): Add x86_linux_process_qsupported.
12419
12420 * server.c (handle_query): Call target_process_qsupported.
12421
12422 * target.h (target_ops): Add process_qsupported.
12423 (target_process_qsupported): New.
12424
fc7238bb
PA
124252010-04-03 Pedro Alves <pedro@codesourcery.com>
12426
12427 * inferiors.c (add_thread): Set last_status kind to
12428 TARGET_WAITKIND_IGNORE.
12429 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12430 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12431 (linux_wait_1): Move `thread' local definition to block that uses
12432 it. Don't NULL initialize `event_child'.
12433 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12434 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12435 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12436
bdabb078
PA
124372010-04-01 Pedro Alves <pedro@codesourcery.com>
12438
12439 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12440 an extended waitstatus, or by a watchpoint.
12441 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12442 thread was stepping or has been stopped by a watchpoint.
12443
d3bbe7a0
PA
124442010-04-01 Pedro Alves <pedro@codesourcery.com>
12445
12446 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12447 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12448 of another, then delete the previous, and validate all
12449 breakpoints.
12450 (validate_inserted_breakpoint): New.
12451 (delete_disabled_breakpoints): New.
12452 (validate_breakpoints): New.
12453 (check_mem_read): Validate breakpoints before trusting their
12454 shadow. Delete disabled breakpoints.
12455 (check_mem_write): Validate breakpoints before trusting they
12456 should be inserted. Delete disabled breakpoints.
12457 * mem-break.h (validate_breakpoints):
12458 * server.c (handle_query): Validate breakpoints when we see a
12459 qSymbol query.
12460
8b07ae33
PA
124612010-04-01 Pedro Alves <pedro@codesourcery.com>
12462
12463 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12464 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12465 if we could tell there's a GDB breakpoint at stop_pc.
12466 (need_step_over_p): Don't do a step over if we find a GDB
12467 breakpoint at the resume PC.
12468
12469 * mem-break.c (struct raw_breakpoint): New.
12470 (enum bkpt_type): New type `gdb_breakpoint'.
12471 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12472 fields. New field `raw'.
12473 (find_raw_breakpoint_at): New.
12474 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12475 breakpoint instead.
12476 (set_breakpoint_at): Adjust.
12477 (delete_raw_breakpoint): New.
12478 (release_breakpoint): New.
12479 (delete_breakpoint): Rename to...
12480 (delete_breakpoint_1): ... this. Add proc parameter. Use
12481 release_breakpoint. Return ENOENT.
12482 (delete_breakpoint): Reimplement.
12483 (find_breakpoint_at): Delete.
12484 (find_gdb_breakpoint_at): New.
12485 (delete_breakpoint_at): Delete.
12486 (set_gdb_breakpoint_at): New.
12487 (delete_gdb_breakpoint_at): New.
12488 (gdb_breakpoint_here): New.
12489 (set_reinsert_breakpoint): Use release_breakpoint.
12490 (uninsert_breakpoint): Rename to ...
12491 (uninsert_raw_breakpoint): ... this.
12492 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12493 (reinsert_raw_breakpoint): Change parameter type to
12494 raw_breakpoint.
12495 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12496 instead.
12497 (check_breakpoints): Adjust. Use release_breakpoint.
12498 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12499 (breakpoint_inserted_here): Ditto.
12500 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12501 Don't trust the breakpoint's shadow if it is not inserted.
12502 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12503 (delete_all_breakpoints): Adjust.
12504 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12505 use delete_breakpoint_1.
12506
12507 * mem-break.h (breakpoints_supported): Delete declaration.
12508 (set_gdb_breakpoint_at): Declare.
12509 (gdb_breakpoint_here): Declare.
12510 (delete_breakpoint_at): Delete.
12511 (delete_gdb_breakpoint_at): Declare.
12512
12513 * server.h (struct raw_breakpoint): Forward declare.
12514 (struct process_info): New field `raw_breakpoints'.
12515
12516 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12517 breakpoints.
12518
6bf5e0ba
PA
125192010-03-24 Pedro Alves <pedro@codesourcery.com>
12520
12521 * linux-low.c (status_pending_p_callback): Fix comment.
12522 (linux_wait_for_event_1): Move most of the internal breakpoint
12523 handling from here...
12524 (linux_wait_1): ... to here.
12525 (count_events_callback): New.
12526 (select_singlestep_lwp_callback): New.
12527 (select_event_lwp_callback): New.
12528 (cancel_breakpoints_callback): New.
12529 (select_event_lwp): New.
12530 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12531 priority to all LWPs that have had events that should be reported
12532 to the client. Cancel breakpoints when about to reporting the
12533 event to the client, not while stopping lwps. No longer cancel
12534 finished single-steps here.
12535 (cancel_finished_single_step): Delete.
12536 (cancel_finished_single_steps): Delete.
12537
414a389f
PA
125382010-03-24 Pedro Alves <pedro@codesourcery.com>
12539
12540 * mem-break.c (enum bkpt_type): New.
12541 (struct breakpoint): New field `type'.
12542 (set_breakpoint_at): Change return type to struct breakpoint
12543 pointer. Set type to `other_breakpoint' by default.
12544 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12545 in the breakpoint list.
12546 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12547 (reinsert_breakpoint): Rename to ...
12548 (reinsert_raw_breakpoint): ... this.
12549 (reinsert_breakpoints_at): Adjust.
12550 * mem-break.h (struct breakpoint): Declare.
12551 (set_breakpoint_at): Change return type to struct breakpoint
12552 pointer.
12553
2280c721
PA
125542010-03-24 Pedro Alves <pedro@codesourcery.com>
12555
12556 * server.c (handle_query): Assign, not compare.
12557
d50171e4
PA
125582010-03-24 Pedro Alves <pedro@codesourcery.com>
12559
12560 Teach linux gdbserver to step-over-breakpoints.
12561
12562 * linux-low.c (can_hardware_single_step): New.
12563 (supports_breakpoints): New.
12564 (handle_extended_wait): If stopping threads, read the stop pc of
12565 the new cloned LWP.
12566 (get_pc): New.
12567 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12568 low target doesn't support retrieving the PC.
12569 (add_lwp): Set last_resume_kind to resume_continue.
12570 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12571 (linux_attach): Don't clear stop_expected. Set the lwp's
12572 last_resume_kind to resume_stop.
12573 (linux_detach_one_lwp): Don't check for removed breakpoints.
12574 (check_removed_breakpoint): Delete.
12575 (status_pending_p): Rename to ...
12576 (status_pending_p_callback): ... this. Don't check for removed
12577 breakpoints. Don't consider threads that are stopped from GDB's
12578 perspective.
12579 (linux_wait_for_lwp): Always read the stop_pc here.
12580 (cancel_breakpoint): New.
12581 (step_over_bkpt): New global.
12582 (linux_wait_for_event_1): Implement stepping over breakpoints.
12583 (gdb_wants_lwp_stopped): New.
12584 (gdb_wants_all_stopped): New.
12585 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12586 single-step traps here. Store the thread's last reported target
12587 wait status.
12588 (send_sigstop): Don't clear stop_expected. Always set it,
12589 instead.
12590 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12591 (cancel_finished_single_step): New.
12592 (cancel_finished_single_steps): New.
12593 (wait_for_sigstop): Don't cancel finished single-step traps here.
12594 (linux_resume_one_lwp): Don't check for removed breakpoints.
12595 Don't set `step' on non-hardware step archs.
12596 (linux_set_resume_request): Ignore resume_stop requests if already
12597 stopping or stopped. Set the lwp's last_resume_kind.
12598 (resume_status_pending_p): Don't check for removed breakpoints.
12599 (need_step_over_p): New.
12600 (start_step_over): New.
12601 (finish_step_over): New.
12602 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12603 requests. Clear the thread's last reported target waitstatus.
12604 Don't use the `suspended' flag. Don't consider pending breakpoints.
12605 (linux_resume): Start a step-over if necessary.
12606 (proceed_one_lwp): New.
12607 (proceed_all_lwps): New.
12608 (unstop_all_lwps): New.
12609 * linux-low.h (struct lwp_info): Rewrite comment for the
12610 `suspended' flag. Add the `stop_pc' field. Delete the
12611 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12612 Add `'last_resume_kind' and `need_step_over' fields.
12613 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12614 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12615 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12616 (set_raw_breakpoint_at): New.
12617 (set_breakpoint_at): Rewrite to use it.
12618 (reinsert_breakpoint_handler): Delete.
12619 (set_reinsert_breakpoint): New.
12620 (reinsert_breakpoint_by_bp): Delete.
12621 (delete_reinsert_breakpoints): New.
12622 (uninsert_breakpoint): Rewrite.
12623 (uninsert_breakpoints_at): New.
12624 (reinsert_breakpoint): Rewrite.
12625 (reinsert_breakpoints_at): New.
12626 (check_breakpoints): Rewrite.
12627 (breakpoint_here): New.
12628 (breakpoint_inserted_here): New.
12629 (check_mem_read): Adjust.
12630 * mem-break.h (breakpoints_supported, breakpoint_here)
12631 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12632 (reinsert_breakpoint_by_bp): Delete declaration.
12633 (delete_reinsert_breakpoints): Declare.
12634 (reinsert_breakpoint): Delete declaration.
12635 (reinsert_breakpoints_at): Declare.
12636 (uninsert_breakpoint): Delete declaration.
12637 (uninsert_breakpoints_at): Declare.
12638 (check_breakpoints): Adjust prototype.
12639 * server.h: Adjust include order.
12640 (struct thread_info): Declare here. Add a `last_status' field.
12641
30ba68cb
MS
126422010-03-23 Michael Snyder <msnyder@vmware.com>
12643
12644 * server.c (crc32): New function.
12645 (handle_query): Add handling for 'qCRC:' request.
12646
b9a881c2
PA
126472010-03-23 Pedro Alves <pedro@codesourcery.com>
12648
12649 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12650 lwp had been stopped by a watchpoint.
12651
e92d13d5
PA
126522010-03-16 Pedro Alves <pedro@codesourcery.com>
12653
12654 * server.h (internal_error): Declare.
12655 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12656 * utils.c (internal_error): New function.
12657
64daa791
AS
126582010-03-15 Andreas Schwab <schwab@redhat.com>
12659
12660 * configure.srv: Fix typo setting srv_regobj.
12661
f52cd8cd
PA
126622010-03-15 Pedro Alves <pedro@codesourcery.com>
12663
12664 * linux-low.c (fetch_register): Avoid passing a non string literal
12665 format to `error'.
12666 (usr_store_inferior_registers): Ditto.
12667
93ae6fdc
PA
126682010-03-14 Pedro Alves <pedro@codesourcery.com>
12669
12670 * linux-low.c (linux_write_memory): Bail out early if peeking
12671 memory failed.
12672
c3adc08c
PA
126732010-03-14 Pedro Alves <pedro@codesourcery.com>
12674
12675 * linux-low.h (struct lwp_info): New fields
12676 `stopped_by_watchpoint' and `stopped_data_address'.
12677 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12678 here, and cache them in the lwp object.
12679 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12680 directly.
12681 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12682 field.
12683 (linux_stopped_by_watchpoint): Rewrite.
12684 (linux_stopped_data_address): Rewrite.
12685
bce522a2
PA
126862010-03-06 Simo Melenius <simo.melenius@iki.fi>
12687
12688 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12689 switching the current inferior, not before.
12690
90884b2b
L
126912010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12692
12693 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12694 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12695 i386-linux.c and amd64-linux.c.
12696 (reg-i386.o): Removed.
12697 (reg-i386.c): Likewise.
12698 (reg-i386-linux.o): Likewise.
12699 (reg-i386-linux.c): Likewise.
12700 (reg-x86-64.o): Likewise.
12701 (reg-x86-64.c): Likewise.
12702 (reg-x86-64-linux.o): Likewise.
12703 (reg-x86-64-linux.c): Likewise.
12704 (i386.o): New.
12705 (i386.c): Likewise.
12706 (i386-linux.o): Likewise.
12707 (i386-linux.c): Likewise.
12708 (amd64.o): Likewise.
12709 (amd64.c): Likewise.
12710 (amd64-linux.o): Likewise.
12711 (amd64-linux.c): Likewise.
12712
12713 * configure.srv (srv_i386_regobj): New.
12714 (srv_i386_linux_regobj): Likewise.
12715 (srv_amd64_regobj): Likewise.
12716 (srv_amd64_linux_regobj): Likewise.
12717 (srv_i386_32bit_xmlfiles): Likewise.
12718 (srv_i386_64bit_xmlfiles): Likewise.
12719 (srv_i386_xmlfiles): Likewise.
12720 (srv_amd64_xmlfiles): Likewise.
12721 (srv_i386_linux_xmlfiles): Likewise.
12722 (srv_amd64_linux_xmlfiles): Likewise.
12723 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12724 srv_xmlfiles to $srv_i386_xmlfiles.
12725 (i[34567]86-*-mingw32ce*): Likewise.
12726 (i[34567]86-*-mingw*): Likewise.
12727 (i[34567]86-*-nto*): Likewise.
12728 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12729 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12730 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12731 (x86_64-*-linux*): Likewise.
12732
12733 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12734 (init_registers_amd64_linux): New.
12735 (x86_arch_setup): Replace init_registers_x86_64_linux with
12736 init_registers_amd64_linux.
12737
193f13e6
MK
127382010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12739
12740 * configure.ac: Check for libdl. If it is not available link against
12741 static libthread_db.
12742 * configure: Regenerate.
12743
85d721b8
PA
127442010-02-22 Pedro Alves <pedro@codesourcery.com>
12745
12746 PR9605
12747
12748 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12749 handing a read watchpoint.
12750 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12751
6076632b
DE
127522010-02-12 Doug Evans <dje@google.com>
12753
12754 * linux-low.c (linux_supports_tracefork_flag): Document.
12755 (linux_look_up_symbols): Add comment.
12756
3327ccf7
L
127572010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12758
12759 * regcache.c (supply_register): Clear regcache if buf is NULL.
12760
0718675c 127612010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12762 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12763
12764 * inferiors.c (find_inferior): Add function documentation.
12765 (unloaded_dll): Handle the case where the unloaded dll has not
12766 been previously registered in the dll list.
12767
177321bd
DJ
127682010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12769
12770 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12771 (thumb2_breakpoint): New.
12772 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12773
2b009048
DJ
127742010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12777 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12778 breakpoints.
12779
3be029c7
PA
127802010-01-21 Pedro Alves <pedro@codesourcery.com>
12781
12782 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12783
18f5de3b
JK
127842010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12785
12786 * linux-s390-low.c (s390_collect_ptrace_register)
12787 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12788
3743bb4f
DE
127892010-01-21 Doug Evans <dje@google.com>
12790
14ce3065
DE
12791 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12792 (PTRACE_ARG4_TYPE): New macro.
12793 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12794 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12795 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12796 (usr_store_inferior_registers): Ditto.
12797 (linux_read_memory, linux_write_memory): Ditto.
12798 (linux_test_for_tracefork): Ditto.
12799
3743bb4f
DE
12800 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12801 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12802
8b315be5
PA
128032010-01-21 Pedro Alves <pedro@codesourcery.com>
12804
12805 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12806 target.
12807
85492558
PA
128082010-01-21 Pedro Alves <pedro@codesourcery.com>
12809
12810 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12811 prototype to take a regcache. Adjust.
12812
442ea881
PA
128132010-01-20 Pedro Alves <pedro@codesourcery.com>
12814
12815 * regcache.h (struct thread_info): Forward declare.
12816 (struct regcache): New.
12817 (new_register_cache): Adjust prototype.
12818 (get_thread_regcache): Declare.
12819 (free_register_cache): Adjust prototype.
12820 (registers_to_string, registers_from_string): Ditto.
12821 (supply_register, supply_register_by_name, collect_register)
12822 (collect_register_as_string, collect_register_by_name): Ditto.
12823 * regcache.c (struct inferior_regcache_data): Delete.
12824 (get_regcache): Rename to ...
12825 (get_thread_regcache): ... this. Adjust. Switch inferior before
12826 fetching registers.
12827 (regcache_invalidate_one): Adjust.
12828 (regcache_invalidate): Fix prototype.
12829 (new_register_cache): Return the new register cache.
12830 (free_register_cache): Change prototype.
12831 (realloc_register_cache): Adjust.
12832 (registers_to_string): Change prototype to take a regcache. Adjust.
12833 (registers_from_string): Ditto.
12834 (register_data): Ditto.
12835 (supply_register): Ditto.
12836 (supply_register_by_name): Ditto.
12837 (collect_register): Ditto.
12838 (collect_register_as_string): Ditto.
12839 (collect_register_by_name): Ditto.
12840 * server.c (process_serial_event): Adjust.
12841 * linux-low.h (regset_fill_func, regset_store_func): Change
12842 prototype.
12843 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12844 Change prototype.
12845 * linux-low.c (get_stop_pc): Adjust.
12846 (check_removed_breakpoint): Adjust.
12847 (linux_wait_for_event): Adjust.
12848 (linux_resume_one_lwp): Adjust.
12849 (fetch_register): Add regcache parameter. Adjust.
12850 (usr_store_inferior_registers): Ditto.
12851 (regsets_fetch_inferior_registers): Ditto.
12852 (regsets_store_inferior_registers): Ditto.
12853 (linux_fetch_registers, linux_store_registers): Ditto.
12854 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12855 regcache. Adjust.
43aaf8b6
PA
12856 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12857 Ditto.
442ea881
PA
12858 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12859 prototype to take a regcache.
12860 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12861 * remote-utils.c (convert_ascii_to_int, outreg)
12862 (prepare_resume_reply): Change prototype to take a regcache.
12863 Adjust.
12864 * target.h (struct target_ops) <fetch_registers, store_registers>:
12865 Change prototype to take a regcache.
12866 (fetch_inferior_registers, store_inferior_registers): Change
12867 prototype to take a regcache. Adjust.
12868 * proc-service.c (ps_lgetregs): Adjust.
12869 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12870 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12871 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12872 take a regcache. Adjust.
12873 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12874 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12875 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12876 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12877 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12878 (cris_cannot_fetch_register):
12879 (cris_breakpoint_at): Change prototype to take a regcache.
12880 Adjust.
12881 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12882 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12883 to take a regcache. Adjust.
12884 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12885 Adjust.
12886 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12887 take a regcache. Adjust.
12888 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12889 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12890 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12891 * linux-mips-low.c (mips_get_pc):
12892 (mips_set_pc): Change prototype to take a regcache. Adjust.
12893 (mips_reinsert_addr): Adjust.
12894 (mips_collect_register): Change prototype to take a regcache.
12895 Adjust.
12896 (mips_supply_register):
12897 (mips_collect_register_32bit, mips_supply_register_32bit)
12898 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12899 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12900 * linux-ppc-low.c (ppc_supply_ptrace_register)
12901 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12902 (parse_spufs_run): Adjust.
12903 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12904 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12905 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12906 take a regcache. Adjust.
12907 * linux-s390-low.c (s390_collect_ptrace_register)
12908 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12909 (s390_set_pc): Change prototype to take a regcache. Adjust.
12910 (s390_arch_setup): Adjust.
12911 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12912 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12913 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12914 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12915 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12916 regcache. Adjust.
12917 (sparc_breakpoint_at): Adjust.
12918 * linux-xtensa-low.c (xtensa_fill_gregset):
12919 (xtensa_store_gregset):
12920 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12921 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12922 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12923 prototype to take a regcache. Adjust.
12924 * win32-arm-low.c (arm_fetch_inferior_register)
12925 (arm_store_inferior_register): Change prototype to take a
12926 regcache. Adjust.
12927 * win32-i386-low.c (i386_fetch_inferior_register)
12928 (i386_store_inferior_register): Change prototype to take a
12929 regcache. Adjust.
12930 * win32-low.c (child_fetch_inferior_registers)
12931 (child_store_inferior_registers): Change prototype to take a
12932 regcache. Adjust.
12933 (win32_wait): Adjust.
12934 (win32_fetch_inferior_registers): Change prototype to take a
12935 regcache. Adjust.
12936 (win32_store_inferior_registers): Adjust.
12937 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12938 store_inferior_register>: Change prototype to take a regcache.
12939
60c3d7b0
DE
129402010-01-20 Doug Evans <dje@google.com>
12941
12942 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12943 #ifdef.
12944 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12945 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12946
dc146f7c
VP
129472010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12948
12949 * linux-low.c (linux_core_of_thread): New.
12950 (compare_ints, show_process, list_threads): New.
12951 (linux_qxfer_osdata): Report threads and cores.
12952 (linux_target_op): Register linux_core_of_thread.
12953 * remote-utils.c (prepare_resume_reply): Report the core.
12954 (buffer_xml_printf): Support %d specifier.
12955 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12956 New.
12957 (handle_query): Handle qXfer:threads. Announce availability
12958 thereof.
12959 * target.h (struct target_ops): New field core_of_thread.
12960
7803799a
UW
129612010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12962
12963 * Makefile.in (clean): Remove new generated files.
12964 (reg-s390.o, reg-s390.c): Remove rules.
12965 (reg-s390x.o, reg-s390x.c): Likewise.
12966 (s390-linux32.o, s390-linux32.c): Add rules.
12967 (s390-linux64.o, s390-linux64.c): Likewise.
12968 (s390x-linux64.o, s390x-linux64.c): Likewise.
12969 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12970 * linux-s390-low.c: Include <elf.h>.
12971 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12972 (init_registers_s390): Remove prototype.
12973 (init_registers_s390x): Likewise.
12974 (init_registers_s390_linux32): Add prototype.
12975 (init_registers_s390_linux64): Likewise.
12976 (init_registers_s390x_linux64): Likewise.
12977 (s390_num_regs_3264): New define.
12978 (s390_regmap_3264): New global variable.
12979 (s390_cannot_fetch_register): Remove obsolete check.
12980 (s390_cannot_store_register): Likewise.
12981 (s390_collect_ptrace_register): Handle upper/lower register halves.
12982 (s390_supply_ptrace_register): Likewise.
12983 (s390_fill_gregset): Update to register number changes.
12984 (s390_get_hwcap): New routine.
12985 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12986 Install appropriate regmap and register set.
12987
6e7ffa39
JB
129882010-01-01 Joel Brobecker <brobecker@adacore.com>
12989
12990 * server.c (gdbserver_version): Update copyright year to 2010.
12991 * gdbreplay.c (gdbreplay_version): Likewise.
12992
957f3f49
DE
129932009-12-28 Doug Evans <dje@google.com>
12994
12995 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12996 elf/external.h. Include <elf.h> instead but only if necessary.
12997
ca5c370d
PA
129982009-12-28 Pedro Alves <pedro@codesourcery.com>
12999
13000 * linux-low.c (linux_remove_process): Remove `detaching'
13001 parameter. Don't release/detach from thread_db here.
13002 (linux_kill): Release/detach from thread_db here, ...
13003 (linux_detach): ... and here, before actually detaching.
13004 (linux_wait_1): ... and here, when a process exits.
13005 * thread-db.c (any_thread_of): New.
13006 (thread_db_free): Switch the current inferior to a thread of the
13007 passed in process.
13008
4ee62156
DE
130092009-12-21 Doug Evans <dje@google.com>
13010
d90e6a88
DE
13011 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13012
c5f62d5f
DE
13013 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13014 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13015 warning ifndef __NR_tkill. Move setting of errno there too.
13016 Delete unnecessary resetting of errno after syscall.
13017 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13018
10e86dd7
DE
13019 * configure.ac: Check for dladdr.
13020 * config.in: Regenerate.
13021 * configure: Regenerate.
13022 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13023 (try_thread_db_load): Update.
13024
4ee62156
DE
13025 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13026
00f515da
DE
130272009-12-18 Doug Evans <dje@google.com>
13028
e9464885
DE
13029 * event-loop.c: Include unistd.h if it exists.
13030
07d4f67e
DE
13031 * linux-low.c (my_waitpid): Move definition away from being in
13032 between linux_tracefork_child/linux_test_for_tracefork.
13033
00f515da
DE
13034 * gdb_proc_service.h (psaddr_t): Fix type.
13035 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13036 signature to match glibc.
13037
1de1badb
DE
130382009-12-16 Doug Evans <dje@google.com>
13039
13040 * linux-low.c (linux_read_memory): Fix argument to read.
13041
aeeb81d1
PA
130422009-11-26 Pedro Alves <pedro@codesourcery.com>
13043
13044 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13045 events, don't leave current_inferior pointing at null.
13046
10357975
PA
130472009-11-26 Pedro Alves <pedro@codesourcery.com>
13048
13049 * win32-low.c (LOG): Delete.
13050 (OUTMSG): Output to stderr.
13051 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13052 on compile time LOG macro.
13053 (win32_wait): Fix debug output.
13054
cf6e3471
PA
130552009-11-26 Pedro Alves <pedro@codesourcery.com>
13056
13057 * win32-low.c (win32_add_one_solib): If the dll name is
13058 "ntdll.dll", prepend the system directory to the dll path.
13059
0c85e18e
MK
130602009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13061
13062 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13063
9ac544ce 130642009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13065 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13066
13067 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13068 * configure.ac: Check for __mcoldfire__ and set
13069 gdb_cv_m68k_is_coldfire.
13070 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13071 reg-cf.o and reg-m68k.o.
13072 * configure: Regenerated.
13073
fd7dd3e6
PA
130742009-11-16 Pedro Alves <pedro@codesourcery.com>
13075
13076 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13077 Pass it to thread_db_free.
13078 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13079 proper `detaching' argument to linux_remove_process.
13080 * linux-low.h (thread_db_free): Add `detaching' parameter.
13081 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13082 to thread_db_free.
13083 (thread_db_free): Add `detaching' parameter. Only
13084 call td_ta_clear_event if detaching from process.
13085
75aa492e
MK
130862009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13087
13088 * thread-db.c (thread_db_free): Fix typo.
13089
21e1bee4
PP
130902009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13091
13092 PR gdb/10838
13093 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13094
8838b45e
NS
130952009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13096
13097 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13098 with an i686 compiler.
13099 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13100 needed.
13101 * configure: Rebuilt.
13102
8a35fb51
SL
131032009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13104
13105 PR gdb/10783
13106
13107 * server.c (handle_search_memory_1): Correct read_addr initialization
13108 in loop for searching subsequent chunks.
13109
96f15937
PP
131102009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13111
13112 * configure.ac: New --with-libthread-db option.
13113 * thread-db.c: Allow direct dependence on libthread_db.
13114 (thread_db_free): Adjust.
13115 * config.in: Regenerate.
13116 * configure: Likewise.
889bf7c5 13117
5f7d1694
PP
131182009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13119
13120 PR gdb/10757
13121 * thread-db.c (attach_thread): New function.
13122 (maybe_attach_thread): Return success/failure.
13123 (find_new_threads_callback): Adjust.
889bf7c5
PA
13124 (thread_db_find_new_threads): Loop until no new threads.
13125
88e3b899
PA
131262009-10-13 Pedro Alves <pedro@codesourcery.com>
13127
13128 * proc-service.c (ps_lgetregs): Formatting.
13129
cdbfd419
PP
131302009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13131
13132 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13133 * configure.ac: Adjust.
13134 * linux-low.h (struct process_info_private): Move members to struct
13135 thread_db.
13136 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13137 * linux-low.c (linux_remove_process): Adjust.
13138 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13139 * server.c (handle_query): Move code ...
13140 (handle_monitor_command): ... here. New function.
13141 * target.h (struct target_ops): New member.
13142 * thread-db.c (struct thread_db): New.
13143 (libthread_db_search_path): New variable.
13144 (thread_db_create_event, thread_db_enable_reporting)
13145 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13146 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13147 (try_thread_db_load_1, dladdr_to_soname): New functions.
13148 (try_thread_db_load, thread_db_load_search): New functions.
13149 (thread_db_init): Search for libthread_db.
13150 (thread_db_free): New function.
13151 (thread_db_handle_monitor_command): Likewise.
13152 * config.in: Regenerate.
13153 * configure: Regenerate.
889bf7c5 13154
4168d2d6
UW
131552009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13156
13157 * spu-low.c (spu_kill): Wait for inferior to terminate.
13158 Call clear_inferiors.
13159 (spu_detach): Call clear_inferiors.
13160
81ecdfbb
RW
131612009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13162
13163 * aclocal.m4: Regenerate.
13164 * config.in: Likewise.
13165 * configure: Likewise.
13166
0b9ff2c0
UW
131672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13168
13169 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13170 (parse_spufs_run): New function.
13171 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13172 (ppc_breakpoint_at): Handle SPU breakpoints.
13173
efcbbd14
UW
131742009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13175
13176 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13177 (SPUFS_MAGIC): Define.
13178 (spu_enumerate_spu_ids): New function.
13179 (linux_qxfer_spu): New function.
13180 (linux_target_ops): Install linux_qxfer_spu.
13181
f4d9bade
UW
131822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13183
13184 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13185 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13186 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13187 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13188 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13189 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13190 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13191 (init_registers_powerpc_cell32l): Add prototype.
13192 (init_registers_powerpc_cell64l): Likewise.
13193 (ppc_arch_setup): Detect Cell/B.E. architecture.
13194
96e946ca
RW
131952009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13196
13197 * Makefile.in (datarootdir): New variable.
13198
58d6951d
DJ
131992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13200
13201 * linux-low.c (linux_write_memory): Update debugging output.
13202 * Makefile.in (clean): Add new descriptions.
13203 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13204 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13205 * configure.srv: Add new files for arm*-*-linux*.
13206 * linux-arm-low.c: Add new declarations.
13207 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13208 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13209 (HWCAP_VFPv3D16): New.
13210 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13211 instead of __IWMMXT__.
13212 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13213 (arm_arch_setup): New.
13214 (target_regsets): Remove #ifdef. Add VFP regset.
13215 (the_low_target): Use arm_arch_setup.
13216
12b42a12
DJ
132172009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13220 the main thread again.
13221
ac8c974e
AR
132222009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13223
13224 Adding Neutrino gdbserver.
13225 * configure: Regenerated.
13226 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13227 * configure.srv (i[34567]86-*-nto*): New target.
13228 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13229 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13230 (nto_comctrl) [__QNX__]: New function.
13231 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13232
4424e0c3 132332009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13234
13235 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13236 srv_tgtobj.
13237
912cf4ba
PA
132382009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13239 Pedro Alves <pedro@codesourcery.com>
13240
13241 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13242 don't support CONTEXT_EXTENDED_REGISTERS.
13243 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13244 (the_low_target): Install them.
13245 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13246 failing with ERROR_PIPE_NOT_CONNECTED.
13247
aa5ca48f
DE
132482009-06-30 Doug Evans <dje@google.com>
13249 Pierre Muller <muller@ics.u-strasbg.fr>
13250
13251 Add h/w watchpoint support to x86-linux, win32-i386.
13252 * Makefile.in (SFILES): Add i386-low.c
13253 (i386_low_h): Define.
13254 (i386-low.o): Add dependencies.
13255 (linux-x86-low.o): Add i386-low.h dependency.
13256 (win32-i386-low.o): Ditto.
13257 * i386-low.c: New file.
13258 * i386-low.h: New file.
13259 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13260 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13261 * linux-low.c (linux_add_process): Initialize arch_private.
13262 (linux_remove_process): Free arch_private.
13263 (add_lwp): Initialize arch_private.
13264 (delete_lwp): Free arch_private.
13265 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13266 provided.
13267 * linux-low.h (process_info_private): New member arch_private.
13268 (lwp_info): New member arch_private.
13269 (linux_target_ops): New members new_process, new_thread,
13270 prepare_to_resume.
13271 (ptid_of): New macro.
13272 * linux-x86-low.c: Include stddef.h, i386-low.h.
13273 (arch_process_info): New struct.
13274 (arch_lwp_info): New struct.
13275 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13276 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13277 (i386_dr_low_get_status): New function.
13278 (x86_insert_point, x86_remove_point): New functions.
13279 (x86_stopped_by_watchpoint): New function.
13280 (x86_stopped_data_address): New function.
13281 (x86_linux_new_process, x86_linux_new_thread): New functions.
13282 (x86_linux_prepare_to_resume): New function.
13283 (the_low_target): Add entries for insert_point, remove_point,
13284 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13285 prepare_to_resume.
13286 * server.c (debug_hw_points): New global.
13287 (monitor_show_help): Document set debug-hw-points.
13288 (handle_query): Process "set debug-hw-points".
13289 * server.h (debug_hw_points): Declare.
13290 (paddress): Declare.
13291 * utils.c (NUMCELLS, CELLSIZE): New macros.
13292 (get_sell, xsnprintf, paddress): New functions.
13293 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13294 remove_point, stopped_by_watchpoint, stopped_data_address.
13295 * win32-i386-low.c: Include i386-low.h.
13296 (debug_reg_state): Replaces dr.
13297 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13298 (i386_dr_low_get_status): New function.
13299 (i386_insert_point, i386_remove_point): New functions.
13300 (i386_stopped_by_watchpoint): New function.
13301 (i386_stopped_data_address): New function.
13302 (i386_initial_stuff): Update.
13303 (get_thread_context,set_thread_context,i386_thread_added): Update.
13304 (the_low_target): Add entries for insert_point,
13305 remove_point, stopped_by_watchpoint, stopped_data_address.
13306 * win32-low.c (win32_insert_watchpoint): New function.
13307 (win32_remove_watchpoint): New function.
13308 (win32_stopped_by_watchpoint): New function.
13309 (win32_stopped_data_address): New function.
13310 (win32_target_ops): Add entries for insert_watchpoint,
13311 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13312 * win32-low.h (win32_target_ops): New members insert_point,
13313 remove_point, stopped_by_watchpoint, stopped_data_address.
13314
d993e290
PA
133152009-06-25 Pedro Alves <pedro@codesourcery.com>
13316
13317 * server.c (process_serial_event): Re-return unsupported, not
13318 error, if the type isn't recognized. Re-allow supporting only
13319 insert or remove packets. Also call require_running for
13320 breakpoints. Add missing break statement to default case. Tidy.
13321 * target.h (struct target_ops): Rename insert_watchpoint to
13322 insert_point, and remove_watchpoint to remove_point.
13323
13324 * linux-low.h (struct linux_target_ops): Likewise.
13325 * linux-low.c (linux_insert_watchpoint): Rename to ...
13326 (linux_insert_point): ... this. Adjust.
13327 (linux_remove_watchpoint): Rename to ...
13328 (linux_remove_point): ... this. Adjust.
13329 (linux_target_ops): Adjust.
13330 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13331 (cris_insert_point): ... this.
13332 (cris_remove_watchpoint): Rename to ...
13333 (cris_remove_point): ... this.
13334 (the_low_target): Adjust.
13335
0f54c268
PM
133362009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13337
13338 * server.c (handle_v_kill): Pass signal_pid to
13339 kill_inferior if multi_process is zero.
13340
c6314022
AR
133412009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13342
13343 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13344 * target.h (target_ops): Comment for *_watchpoint to make it clear
13345 the functions can get types '0' and '1'.
13346
4463ce24
AR
133472009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13348
13349 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13350 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13351 * regcache.c (get_regcache): Likewise.
13352 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13353 * win32-low.c (child_fetch_inferior_registers): Remove check for
13354 regno 0.
13355
cf8fd78b
PA
133562009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13357 Pedro Alves <pedro@codesourcery.com>
13358
13359 * target.h (struct target_ops) <supports_multi_process>: New
13360 callback.
13361 (target_supports_multi_process): New.
13362 * server.c (handle_query): Even if GDB reports support, only
13363 enable multi-process if the target also supports it. Report
13364 multi-process support only if the target backend supports it.
13365 * linux-low.c (linux_supports_multi_process): New function.
13366 (linux_target_ops): Install it as target_supports_multi_process
13367 callback.
13368
47c0c975
DE
133692009-05-24 Doug Evans <dje@google.com>
13370
e09875d4
DE
13371 Global renaming of find_thread_pid to find_thread_ptid.
13372 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13373 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13374 All callers updated.
13375
e27d73f6
DE
13376 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13377 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13378 directly.
13379
47c0c975
DE
13380 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13381 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13382 (linux_resume_one_lwp): Ditto.
13383
2acc282a
DE
133842009-05-23 Doug Evans <dje@google.com>
13385
13386 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13387 from struct inferior_list_entry * to struct lwp_info *.
13388 All callers updated.
13389
9f1036c1
DE
133902009-05-13 Doug Evans <dje@google.com>
13391
13392 * linux-x86-low.c: Don't include assert.h.
13393 (x86_siginfo_fixup): Use fatal, not assert.
13394 (x86_arch_setup): Fix comment.
13395
d0722149
DE
133962009-05-12 Doug Evans <dje@google.com>
13397
13398 Biarch support for i386/amd64 gdbserver.
13399 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13400 Add linux-x86-low.c.
13401 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13402 (linux-x86-low.o): Add.
13403 * linux-x86-64-low.c: Delete.
13404 * linux-i386-low.c: Delete.
13405 * linux-x86-low.c: New file.
13406 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13407 linux-x86-low.o.
13408 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13409 linux-x86-low.o.
13410 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13411 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13412 (linux_child_pid_to_exec_file): New function.
13413 (elf_64_header_p, elf_64_file_p): New functions.
13414 (siginfo_fixup): New function.
13415 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13416 give target a chance to convert layout.
13417 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13418 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13419
fdeb2a12
DE
134202009-05-07 Doug Evans <dje@google.com>
13421
13422 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13423 (regsets_store_inferior_registers): Ditto.
13424
a6dbe5df
PA
134252009-05-06 Pedro Alves <pedro@codesourcery.com>
13426
13427 PR server/10048
13428
13429 * linux-low.c (must_set_ptrace_flags): Delete.
13430 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13431 of the global.
13432 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13433 `lwp->must_set_ptrace_flags' instead.
ba42693b 13434 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13435 (linux_wait_1): ... not here.
13436
5091eb23
DE
134372009-04-30 Doug Evans <dje@google.com>
13438
9f767825
DE
13439 * inferiors.c (started_inferior_callback): New function.
13440 (attached_inferior_callback): New function.
13441 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13442 * server.c (print_started_pid, print_attached_pid): New functions.
13443 (detach_or_kill_for_exit): New function.
13444 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13445 * server.h (have_started_inferiors_p): Declare.
13446 (have_attached_inferiors_p): Declare.
13447
5091eb23
DE
13448 * inferiors.c (remove_process): Fix memory leak, free process.
13449 * linux-low.c (linux_remove_process): New function.
13450 (linux_kill): Call it instead of remove_process.
13451 (linux_detach, linux_wait_1): Ditto.
13452
155c8968
PA
134532009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13454
13455 * configure.srv: Add x86 Windows CE target.
13456
7fe519cb
UW
134572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13458
13459 * inferiors.c (get_thread_process): Make global.
13460 * server.h (get_thread_process): Add prototype.
13461 * thread-db.c (find_one_thread): Use get_thread_process
13462 instead of current_process.
13463 (thread_db_get_tls_address): Do not crash if called when
13464 thread layer is not yet initialized.
13465
5472f405
UW
134662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13467
13468 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13469 * spu-low.c (current_tid): Rename to ...
13470 (current_ptid): ... this.
13471 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13472 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13473 ptid_get_lwp (current_ptid) instead of current_tid.
13474 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13475 instead of current_tid. Use find_process_pid to verify pid
13476 argument is valid. Pass proper argument to remove_process.
13477 (spu_thread_alive): Compare current_ptid instead of current_tid.
13478 (spu_resume): Likewise.
13479
55ac2b99
PA
134802009-04-02 Pedro Alves <pedro@codesourcery.com>
13481
13482 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13483 variable.
13484
95954743
PA
134852009-04-01 Pedro Alves <pedro@codesourcery.com>
13486
13487 Implement the multiprocess extensions, and add linux multiprocess
13488 support.
13489
13490 * server.h (ULONGEST): Declare.
13491 (struct ptid, ptid_t): New.
13492 (minus_one_ptid, null_ptid): Declare.
13493 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13494 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13495 (struct inferior_list_entry): Change `id' type from unsigned from
13496 to ptid_t.
13497 (struct sym_cache, struct breakpoint, struct
13498 process_info_private): Forward declare.
13499 (struct process_info): Declare.
13500 (current_process): Declare.
13501 (all_processes): Declare.
13502 (initialize_inferiors): Declare.
13503 (add_thread): Adjust to use ptid_t.
13504 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13505 (add_process, remove_process, find_thread_pid): Declare.
13506 (find_inferior_id): Adjust to use ptid_t.
13507 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13508 (multi_process): Declare.
13509 (push_event): Adjust to use ptid_t.
13510 (read_ptid, write_ptid): Declare.
13511 (prepare_resume_reply): Adjust to use ptid_t.
13512 (clear_symbol_cache): Declare.
13513 * inferiors.c (all_processes): New.
13514 (null_ptid, minus_one_ptid): New.
13515 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13516 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13517 (add_thread): Change unsigned long to ptid. Remove gdb_id
13518 parameter. Adjust.
13519 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13520 (gdb_id_to_thread): Rename to ...
13521 (find_thread_pid): ... this. Change unsigned long to ptid.
13522 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13523 (loaded_dll, pull_pid_from_list): Adjust.
13524 (add_process, remove_process, find_process_pid)
13525 (get_thread_process, current_process, initialize_inferiors): New.
13526 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13527 (struct target_waitstatus) <related_pid>: Ditto.
13528 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13529 return type to int.
13530 (struct target_ops) <join>: Add `pid' argument.
13531 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13532 (struct target_ops) <wait>: Add `ptid' field. Change return type
13533 to ptid.
13534 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13535 (mywait): Add `ptid' argument. Change return type to ptid_t.
13536 (target_pid_to_str): Declare.
13537 * target.c (set_desired_inferior): Adjust to use ptids.
13538 (mywait): Add new `ptid' argument. Adjust.
13539 (target_pid_to_str): New.
13540 * mem-break.h (free_all_breakpoints): Declare.
13541 * mem-break.c (breakpoints): Delelete.
13542 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13543 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13544 to use per-process breakpoint list.
13545 (free_all_breakpoints): New.
13546 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13547 (symbol_cache, all_symbols_looked_up): Delete.
13548 (hexchars): New.
13549 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13550 read_ptid): New.
13551 (prepare_resume_reply): Change ptid argument's type from unsigned
13552 long to ptid_t. Adjust. Implement W;process and X;process.
13553 (free_sym_cache, clear_symbol_cache): New.
13554 (look_up_one_symbol): Adjust to per-process symbol cache. *
13555 * server.c (cont_thread, general_thread, step_thread): Change type
13556 to ptid_t.
13557 (attached): Delete.
13558 (multi_process): New.
13559 (last_ptid): Change type to ptid_t.
13560 (struct vstop_notif) <ptid>: Change type to ptid_t.
13561 (queue_stop_reply, push_event): Change `ptid' argument's type to
13562 ptid_t.
13563 (discard_queued_stop_replies): Add `pid' argument.
13564 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13565 changes. Don't reference the `attached' global.
13566 (attach_inferior): Adjust to mywait interface changes.
13567 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13568 features. Handle and report "multiprocess+". Handle
13569 "qAttached:PID".
13570 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13571 changes.
13572 (handle_v_kill): New.
13573 (handle_v_stopped): Adjust to use target_pid_to_str.
13574 (handle_v_requests): Allow multiple attaches and runs when
13575 multiprocess extensions are in effect. Handle "vKill".
13576 (myresume): Adjust to use ptids.
13577 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13578 (handle_status): Adjust to discard_queued_stop_replies interface
13579 change.
13580 (first_thread_of, kill_inferior_callback)
13581 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13582 (main): Call initialize_inferiors. Adjust to use ptids, killing
13583 and detaching from all inferiors. Handle multiprocess packet
13584 variants.
13585 * linux-low.h: Include gdb_proc_service.h.
13586 (struct process_info_private): New.
13587 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13588 <lwpid_of>: Use ptid_get_lwp.
13589 (get_lwp_thread): Adjust.
13590 (struct lwp_info): Add `dead' member.
13591 (find_lwp_pid): Declare.
13592 * linux-low.c (thread_db_active): Delete.
13593 (new_inferior): Adjust comment.
13594 (inferior_pid): Delete.
13595 (linux_add_process): New.
13596 (handle_extended_wait): Adjust.
13597 (add_lwp): Change unsigned long to ptid.
13598 (linux_create_inferior): Add process to processes table. Adjust
13599 to use ptids. Don't set new_inferior here.
13600 (linux_attach_lwp): Rename to ...
13601 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13602 it. Adjust to use ptids.
13603 (linux_attach_lwp): New.
13604 (linux_attach): Add process to processes table. Don't set
13605 new_inferior here.
13606 (struct counter): New.
13607 (second_thread_of_pid_p, last_thread_of_process_p): New.
13608 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13609 multiple processes.
13610 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13611 processes. Remove process from process table.
13612 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13613 to multiple processes.
13614 (any_thread_of): New.
13615 (linux_detach): Add `pid' argument, and handle it. Remove process
13616 from processes table.
13617 (linux_join): Add `pid' argument. Handle it.
13618 (linux_thread_alive): Change unsighed long argument to ptid_t.
13619 Consider dead lwps as not being alive.
13620 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13621 threads we're not interested in.
13622 (same_lwp, find_lwp_pid): New.
13623 (linux_wait_for_lwp): Change `pid' argument's type from int to
13624 ptid_t. Adjust.
13625 (linux_wait_for_event): Rename to ...
13626 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13627 from int to ptid_t. Adjust.
13628 (linux_wait_for_event): New.
13629 (linux_wait_1): Add `ptid' argument. Change return type to
13630 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13631 that exit from the process table.
13632 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13633 Adjust.
13634 (mark_lwp_dead): New.
13635 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13636 stopping all threads, mark its main lwp as dead.
13637 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13638 ptids.
13639 (fetch_register, usr_store_inferior_registers)
13640 (regsets_fetch_inferior_registers)
13641 (regsets_store_inferior_registers, linux_read_memory)
13642 (linux_write_memory): Inline `inferior_pid'.
13643 (linux_look_up_symbols): Adjust to use per-process
13644 `thread_db_active'.
13645 (linux_request_interrupt): Adjust to use ptids.
13646 (linux_read_auxv): Inline `inferior_pid'.
13647 (initialize_low): Don't reference thread_db_active.
13648 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13649 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13650 (ps_getpid): Return the pid of the current inferior.
13651 * thread-db.c (proc_handle, thread_agent): Delete.
13652 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13653 per-process data.
13654 (find_one_thread): Change argument type to ptid_t. Adjust to
13655 per-process data.
13656 (maybe_attach_thread): Adjust to per-process data and ptids.
13657 (thread_db_find_new_threads): Ditto.
13658 (thread_db_init): Ditto.
13659 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13660 processes table. Adjust to use ptids.
13661 (spu_kill, spu_detach): Adjust interface. Remove process from
13662 processes table.
13663 (spu_join, spu_thread_alive): Adjust interface.
13664 (spu_wait): Adjust interface. Remove process from processes
13665 table. Adjust to use ptids.
13666 * win32-low.c (current_inferior_tid): Delete.
13667 (current_inferior_ptid): New.
13668 (debug_event_ptid): New.
13669 (thread_rec): Take a ptid. Adjust.
13670 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13671 (child_delete_thread): Ditto.
13672 (do_initial_child_stuff): Add `attached' argument. Add process to
13673 processes table.
13674 (child_fetch_inferior_registers, child_store_inferior_registers):
13675 Adjust.
13676 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13677 (win32_attach): Pass 1 to do_initial_child_stuff.
13678 (win32_kill): Adjust interface. Remove process from processes
13679 table.
13680 (win32_detach): Ditto.
13681 (win32_join): Adjust interface.
13682 (win32_thread_alive): Take a ptid.
13683 (win32_resume): Adjust to use ptids.
13684 (get_child_debug_event): Ditto.
13685 (win32_wait): Adjust interface. Remove exiting process from
13686 processes table.
13687
bd99dc85
PA
136882009-04-01 Pedro Alves <pedro@codesourcery.com>
13689
13690 Non-stop mode support.
13691
13692 * server.h (non_stop): Declare.
13693 (gdb_client_data, handler_func): Declare.
13694 (delete_file_handler, add_file_handler, start_event_loop):
13695 Declare.
13696 (handle_serial_event, handle_target_event, push_event)
13697 (putpkt_notif): Declare.
13698 * target.h (enum resume_kind): New.
13699 (struct thread_resume): Replace `step' field by `kind' field.
13700 (TARGET_WNOHANG): Define.
13701 (struct target_ops) <wait>: Add `options' argument.
13702 <supports_non_stop, async, start_non_stop>: New fields.
13703 (target_supports_non_stop, target_async): New.
13704 (start_non_stop): Declare.
13705 (mywait): Add `options' argument.
13706 * target.c (mywait): Add `options' argument. Print child exit
13707 notifications here.
13708 (start_non_stop): New.
13709 * server.c (non_stop, own_buf, mem_buf): New globals.
13710 (struct vstop_notif): New.
13711 (notif_queue): New global.
13712 (queue_stop_reply, push_event, discard_queued_stop_replies)
13713 (send_next_stop_reply): New.
13714 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13715 interface changes.
13716 (attach_inferior): In non-stop mode, don't wait for the target
13717 here.
13718 (handle_general_set): Handle QNonStop.
13719 (handle_query): When handling qC, return the current general
13720 thread, instead of the first thread of the list.
13721 (handle_query): If the backend supports non-stop mode, include
13722 QNonStop+ in the qSupported query response.
13723 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13724 and non-stop mode.
13725 (handle_v_attach, handle_v_run): Handle non-stop mode.
13726 (handle_v_stopped): New.
13727 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13728 (myresume): Adjust to use resume_kind. Handle non-stop.
13729 (queue_stop_reply_callback): New.
13730 (handle_status): Handle non-stop mode.
13731 (main): Clear non_stop flag on reconnection. Use the event-loop.
13732 Refactor serial protocol handling from here ...
13733 (process_serial_event): ... to this new function. When GDB
13734 selects any thread, select one here. In non-stop mode, wait until
13735 GDB acks all pending events before exiting.
13736 (handle_serial_event, handle_target_event): New.
13737 * remote-utils.c (remote_open): Install remote_desc in the event
13738 loop.
13739 (remote_close): Remove remote_desc from the event loop.
13740 (putpkt_binary): Rename to...
13741 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13742 (putpkt_binary): New as wrapper around putpkt_binary_1.
13743 (putpkt_notif): New.
13744 (prepare_resume_reply): In non-stop mode, don't change the
13745 general_thread.
13746 * event-loop.c: New.
13747 * Makefile.in (OBJ): Add event-loop.o.
13748 (event-loop.o): New rule.
13749
13750 * linux-low.h (pid_of): Moved here.
13751 (lwpid_of): New.
13752 (get_lwp_thread): Use lwpid_of.
13753 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13754 * linux-low.c (pid_of): Delete.
13755 (inferior_pid): Use lwpid_of.
13756 (linux_event_pipe): New.
13757 (target_is_async_p): New.
13758 (delete_lwp): New.
13759 (handle_extended_wait): Use lwpid_of.
13760 (add_lwp): Don't set lwpid field.
13761 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13762 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13763 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13764 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13765 first. Adjust to linux_wait_for_event interface changes. Use
13766 lwpid_of.
13767 (linux_detach): Don't delete the main lwp here.
13768 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13769 (status_pending_p): Don't consider explicitly suspended lwps.
13770 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13771 pointer. Add OPTIONS argument. Change return type to int. Use
13772 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13773 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13774 pointer. Add status pointer argument. Return a pid instead of a
13775 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13776 changes. In non-stop mode, don't switch to a random thread.
13777 (linux_wait): Rename to...
13778 (linux_wait_1): ... this. Add target_options argument, and handle
13779 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13780 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13781 clean exit and signal exit code. Don't stop all threads in
13782 non-stop mode. In all-stop mode, only stop all threads when
13783 reporting a stop to GDB. Handle explicit thread stop requests.
13784 (async_file_flush, async_file_mark): New.
13785 (linux_wait): New.
13786 (send_sigstop): Use lwpid_of.
13787 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13788 interface changes. In non-stop mode, don't switch to a random
13789 thread.
13790 (linux_resume_one_lwp): Use lwpid_of.
13791 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13792 (linux_resume_one_thread): ... this. Handle resume_stop. In
13793 non-stop mode, don't look for pending flag in all threads.
13794 (resume_status_pending_p): Don't consider explicitly suspended
13795 threads.
13796 (my_waitpid): Reimplement. Emulate __WALL.
13797 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13798 Use lwpid_of.
13799 (sigchld_handler, linux_supports_non_stop, linux_async)
13800 (linux_start_non_stop): New.
13801 (linux_target_ops): Register linux_supports_non_stop, linux_async
13802 and linux_start_non_stop.
13803 (initialize_low): Install SIGCHLD handler.
13804 * thread-db.c (thread_db_create_event, find_one_thread)
13805 (thread_db_get_tls_address): Use lwpid_of.
13806 * win32-low.c (win32_detach): Adjust to use resume_kind.
13807 (win32_wait): Add `options' argument.
13808 * spu-low.c (spu_resume): Adjust to use resume_kind.
13809 (spu_wait): Add `options' argument.
13810
5b1c542e
PA
138112009-04-01 Pedro Alves <pedro@codesourcery.com>
13812
13813 Decouple target code from remote protocol.
13814
13815 * target.h (enum target_waitkind): New.
13816 (struct target_waitstatus): New.
13817 (struct target_ops) <wait>: Return an unsigned long. Take a
13818 target_waitstatus pointer instead of a char pointer.
13819 (mywait): Likewise.
13820 * target.c (mywait): Change prototype to return an unsigned long.
13821 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13822 * server.h (thread_from_wait, old_thread_from_wait): Delete
13823 declarations.
13824 (prepare_resume_reply): Change prototype to take a
13825 target_waitstatus.
13826 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13827 (last_status, last_ptid): New.
13828 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13829 pid instead of a signal.
13830 (attach_inferior): Remove "status" and "signal" parameters.
13831 Adjust.
13832 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13833 not as an address.
13834 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13835 (handle_v_requests, myresume): Remove "status" and "signal"
13836 parameters. Adjust.
13837 (handle_status): New.
13838 (main): Delete local `status'. Adjust.
13839 * remote-utils.c: Include target.h.
13840 (prepare_resume_reply): Change prototype to take a
13841 target_waitstatus. Adjust.
13842
13843 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13844 interface.
13845 * spu-low.c (spu_wait): Adjust.
13846 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13847 Delete.
13848 (win32_wait): Adjust.
13849
2bd7c093
PA
138502009-04-01 Pedro Alves <pedro@codesourcery.com>
13851
13852 * target.h (struct thread_resume): Delete leave_stopped member.
13853 (struct target_ops): Add a `n' argument to the `resume' callback.
13854 * server.c (start_inferior): Adjust.
13855 (handle_v_cont, myresume): Adjust.
13856 * linux-low.c (check_removed_breakpoint): Adjust to resume
13857 interface change, and to removed leave_stopped field.
13858 (resume_ptr): Delete.
13859 (struct thread_resume_array): New.
13860 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13861 resume interface change.
13862 (linux_continue_one_thread, linux_queue_one_thread)
13863 (resume_status_pending_p): Check if the resume field is NULL
13864 instead of checking the leave_stopped member.
13865 (linux_resume): Adjust to the target resume interface change.
13866 * spu-low.c (spu_resume): Adjust to the target resume interface
13867 change.
13868 * win32-low.c (win32_detach, win32_resume): Ditto.
13869
c35fafde
PA
138702009-04-01 Pedro Alves <pedro@codesourcery.com>
13871
13872 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13873 flag.
13874 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13875 pending.
13876 (linux_continue_one_thread): Only preserve the stepping flag if
13877 there's a pending breakpoint.
13878
0a59d50b
PA
138792009-03-31 Pedro Alves <pedro@codesourcery.com>
13880
13881 * server.c (main): After the inferior having exited, call
13882 remote_close before exiting gdbserver.
13883
f04c6d38
TJB
138842009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13885
13886 Fix size of FPSCR in Power 7 processors.
13887 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13888 (PPC_FEATURE_HAS_DFP): New #define.
13889 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13890 size of the FPSCR.
13891
78e5cee6
PA
138922009-03-23 Pedro Alves <pedro@codesourcery.com>
13893
13894 * server.c (handle_query) Whitespace and formatting.
13895
1b3f6016
PA
138962009-03-22 Pedro Alves <pedro@codesourcery.com>
13897
13898 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13899 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13900 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13901 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13902 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13903 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13904 Makefile.in, configure.ac: Fix whitespace throughout.
13905 * configure: Regenerate.
13906
a07b2135
PA
139072009-03-22 Pedro Alves <pedro@codesourcery.com>
13908
13909 * inferiors.c (find_inferior): Make it safe for the callback
13910 function to delete the currently iterated inferior.
13911
67cc2626
PA
139122009-03-22 Pedro Alves <pedro@codesourcery.com>
13913
13914 * Makefile.in (linuw_low_h): Move higher.
13915 (thread-db.o): Depend on $(linux_low_h).
13916
54a0b537
PA
139172009-03-17 Pedro Alves <pedro@codesourcery.com>
13918
13919 Rename "process" to "lwp" throughout.
13920
13921 * linux-low.c (all_processes): Rename to...
13922 (all_lwps): ... this.
13923 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13924 (add_process): Rename to ...
13925 (add_lwp): ... this. Adjust.
13926 (linux_create_inferior): Adjust.
13927 (linux_attach_lwp): Adjust.
13928 (linux_attach): Adjust.
13929 (linux_kill_one_process): Rename to ...
13930 (linux_kill_one_lwp): ... this. Adjust.
13931 (linux_kill): Adjust.
13932 (linux_detach_one_process): Rename to ...
13933 (linux_detach_one_lwp): ... this. Adjust.
13934 (linux_detach): Adjust.
13935 (check_removed_breakpoint): Adjust.
13936 (status_pending_p): Adjust.
13937 (linux_wait_for_process): Rename to ...
13938 (linux_wait_for_lwp): ... this. Adjust.
13939 (linux_wait_for_event): Adjust.
13940 (send_sigstop): Adjust.
13941 (wait_for_sigstop): Adjust.
13942 (stop_all_processes): Rename to ...
13943 (stop_all_lwps): ... this.
13944 (linux_resume_one_process): Rename to ...
13945 (linux_resume_one_lwp): ... this. Adjust.
13946 (linux_set_resume_request, linux_continue_one_thread)
13947 (linux_queue_one_thread, resume_status_pending_p)
13948 (usr_store_inferior_registers, regsets_store_inferior_registers)
13949 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13950 Adjust.
13951 * linux-low.h (get_process): Rename to ...
13952 (get_lwp): ... this. Adjust.
13953 (get_thread_process): Rename to ...
13954 (get_thread_lwp): ... this. Adjust.
13955 (get_process_thread): Rename to ...
13956 (get_lwp_thread): ... this. Adjust.
13957 (struct process_info): Rename to ...
13958 (struct lwp_info): ... this.
13959 (all_processes): Rename to ...
13960 (all_lwps): ... this.
13961 * proc-service.c (ps_lgetregs): Adjust.
13962 * thread-db.c (thread_db_create_event, find_one_thread)
13963 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13964
0b16c5cf
PA
139652009-03-14 Pedro Alves <pedro@codesourcery.com>
13966
13967 * server.c (handle_query): Handle "qAttached".
13968
32de4b9d
NS
139692009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13970
13971 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13972 GPLv3, update license URL.
13973
2aecd87f
DE
139742009-03-01 Doug Evans <dje@google.com>
13975
93efd302 13976 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13977 (server_h): Add gdb_signals.h.
13978 (signals.o): Update.
13979 * server.h (target_signal_from_host,target_signal_to_host_p)
13980 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13981
86b1f9c5
PM
139822009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13983
13984 * remote-utils.c (getpkt): Also generate remote-debug
13985 information if noack_mode is set.
13986
4aa995e1
PA
139872009-02-06 Pedro Alves <pedro@codesourcery.com>
13988
13989 * server.c (handle_query): Report qXfer:siginfo:read and
13990 qXfer:siginfo:write as supported and handle them.
13991 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13992 * linux-low.c (linux_xfer_siginfo): New.
13993 (linux_target_ops): Set it.
13994
62709adf
PA
139952009-01-26 Pedro Alves <pedro@codesourcery.com>
13996
13997 * server.c (gdbserver_usage): Mention --remote-debug.
13998 (main): Accept '--remote-debug' switch.
13999
aef93bd7
DE
140002009-01-18 Doug Evans <dje@google.com>
14001
14002 * regcache.c (new_register_cache): No need to check result of xcalloc.
14003 * server.c (handle_search_memory): Back out calls to xmalloc,
14004 result is checked and error is returned to user upon failure.
14005 (handle_query): Ditto. Add more checks for result of malloc.
14006 (handle_v_cont): Check result of malloc, report error back to
14007 user upon failure.
14008 (handle_v_run): Ditto. Call freeargv.
14009 * server.h (freeargv): Declare.
14010 * utils.c (freeargv): New fn.
14011
54363045
DE
140122009-01-15 Doug Evans <dje@google.com>
14013
f626972c
DE
14014 * gdbreplay.c (perror_with_name): Make arg const char *.
14015 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14016 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14017 * utils.c (perror_with_name): Make arg const char *.
54363045 14018
18aae699
PA
140192009-01-14 Pedro Alves <pedro@codesourcery.com>
14020
14021 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14022 when handling a EXIT_PROCESS_DEBUG_EVENT.
14023
ff703abe
JB
140242009-01-06 Joel Brobecker <brobecker@adacore.com>
14025
14026 * gdbreplay.c (gdbreplay_version): Update copyright year.
14027 * server.c (gdbserver_version): Likewise.
14028
f21cc1a2 140292009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14030
14031 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14032 (handle_extended_wait): Improve comment.
0e21c1ec 14033
bca929d3
DE
140342008-12-13 Doug Evans <dje@google.com>
14035
14036 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14037 * server.h (ATTR_MALLOC): New macro.
14038 (xmalloc,xcalloc,xstrdup): Declare.
14039 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14040 * inferiors.c: Ditto.
14041 * linux-low.c: Ditto.
14042 * mem-break.c: Ditto.
14043 * regcache.c: Ditto.
14044 * remote-utils.c: Ditto.
14045 * server.c: Ditto.
14046 * target.c: Ditto.
14047 * win32-low.c: Ditto.
14048
97438e3f
DE
140492008-12-12 Doug Evans <dje@google.com>
14050
896c7fbb
DE
14051 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14052 in debugging printf.
14053
97438e3f
DE
14054 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14055
e3b886f8
DE
140562008-12-09 Doug Evans <dje@google.com>
14057
14058 * linux-low.h (struct process_info): Delete member tid, unused.
14059 * thread-db.c (find_one_thread): Update.
14060 (maybe_attach_thread): Update.
14061
07e059b5
VP
140622008-12-02 Pedro Alves <pedro@codesourcery.com>
14063
889bf7c5
PA
14064 * target.h (struct target_ops): Add qxfer_osdata member.
14065 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14066 and dirent.h.
14067 (linux_qxfer_osdata): New functions.
14068 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14069 callback.
14070 * server.c (handle_query): Handle "qXfer:osdata:read:".
14071 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14072 (buffer_xml_printf): New functions.
14073 * server.h (struct buffer): New.
14074 (buffer_grow_str, buffer_grow_str0): New macros.
14075 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14076 (buffer_xml_printf): Declare.
07e059b5 14077
4cab47ab
DE
140782008-11-24 Doug Evans <dje@google.com>
14079
14080 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14081
f142445f
DJ
140822008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * server.c (handle_v_run): Always use the supplied argument list.
14085
d0107bb6 140862008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14087
d0107bb6
BW
14088 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14089 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14090
2c4ad781
TJB
140912008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14092
14093 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14094 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14095 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14096 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14097 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14098 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14099 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14100 XML target descriptions.
14101 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14102 when inferior is running on an ISA 2.05 or later processor. Add
14103 special case to return offset for full 64-bit slot of FPSCR when
14104 in 32-bits.
14105
dfb64f85
DJ
141062008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14107
14108 * Makefile.in (SFILES, clean): Added sparc64 files.
14109 (reg-sparc64.o, reg-sparc64.c): New.
14110 * configure.srv (sparc*-*-linux*): New configuration.
14111 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14112 syscall arguments for SPARC.
14113 (regsets_store_inferior_registers): Likewise.
14114 * linux-sparc-low.c: New file.
14115
66b6e1dd
DE
141162008-10-21 Doug Evans <dje@google.com>
14117
14118 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14119 (READLINE_DIR,READLINE_DEP): Delete.
14120 (INTERNAL_CFLAGS): Update.
14121 (LINTFLAGS): Update.
14122
9b710a42
PA
141232008-10-10 Pedro Alves <pedro@codesourcery.com>
14124
14125 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14126 whole argv from the last run, not just argv[0].
14127
5822d809
PA
141282008-09-08 Pedro Alves <pedro@codesourcery.com>
14129
14130 * regcache.c (new_register_cache): Return NULL if the register
14131 cache size isn't known yet.
14132 (free_register_cache): Avoid dereferencing a NULL regcache.
14133
74aac56f
DJ
141342008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14135
14136 * configure.srv: Merge MIPS and MIPS64.
14137
400b20f5
MR
141382008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14139
14140 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14141
677c5bb1
LM
141422008-08-18 Luis Machado <luisgpm@br.ibm.com>
14143
14144 * Makefile.in: Add required vsx dependencies.
14145
14146 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14147 Declare init_registers_powerpc_vsx32l.
14148 Declare init_registers_powerpc_vsx64l.
14149 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14150 (ppc_arch_setup): Check for VSX in hwcap.
14151 (ppc_fill_vsxregset): New function.
14152 (ppc_store_vsxregset): New function.
14153 Add new VSX entry in regset_info target_regsets.
14154
14155 * configure.srv: Add new VSX dependencies.
14156
a6f3e723
SL
141572008-08-12 Pedro Alves <pedro@codesourcery.com>
14158
14159 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14160 (remote_open): Set or clear transport_is_reliable.
14161 (putpkt_binary): Don't expect acks in noack mode.
14162 (getpkt): Don't send ack/nac in noack mode.
14163 * server.c (handle_general_set): Handle QStartNoAckMode.
14164 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14165 qSupported.
14166 (main): Reset noack_mode on every connection.
14167 * server.h (noack_mode): Declare.
14168
a417dc56
RW
141692008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14170
14171 * Makefile.in (GDBREPLAY_OBS): New variable.
14172 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14173
3221518c
UW
141742008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14175 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14178 (usr_store_inferior_registers): Likewise.
14179 (regsets_store_inferior_registers): Likewise.
14180
ec56be1b
PA
141812008-07-31 Rolf Jansen <rj@surtec.com>
14182 Pedro Alves <pedro@codesourcery.com>
14183
14184 * configure.ac: Check for memmem declaration.
14185 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14186 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14187 (disable_packet_qfThreadInfo): Unconditionally compile.
14188 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14189 * configure, config.in: Regenerate.
14190
2fe5e3ff
DE
141912008-07-28 Doug Kwan <dougkwan@google.com>
14192
14193 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14194 (linux_write_memory): Remove declaration of errno.
14195
836acd6d
UW
141962008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14197
14198 * linux-low.c (handle_extended_wait): Do not use "status"
14199 variable uninitialized.
14200
aeba519e
PA
142012008-07-07 Pedro Alves <pedro@codesourcery.com>
14202
14203 * server.c (handle_v_attach): Inhibit reporting dll changes.
14204
db42f210
PA
142052008-06-27 Pedro Alves <pedro@codesourcery.com>
14206
14207 * remote-utils.c (prepare_resume_reply): If requested, don't
14208 output "thread:TID" in the T stop reply.
14209
14210 * server.c (disable_packet_vCont, disable_packet_Tthread)
14211 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14212 (handle_query): If requested, disable support for qC, qfThreadInfo
14213 and qsThreadInfo.
14214 (handle_v_requests): If requested, disable support for vCont.
14215 (gdbserver_show_disableable): New.
14216 (main): Handle --disable-packet and --disable-packet=LIST.
14217
14218 * server.h (disable_packet_vCont, disable_packet_Tthread)
14219 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14220
8e4c5421
CD
142212008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14222
14223 * server.c (gdbserver_usage): Mention --version.
14224
6e23a804
DJ
142252008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * Makefile.in (gdbreplay.o): New rule.
14228
90aa6a40
JM
142292008-06-06 Joseph Myers <joseph@codesourcery.com>
14230
14231 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14232 message, not gdbserver.
14233
c16158bc 142342008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14235 Nathan Sidwell <nathan@codesourcery.com>
14236 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14237
14238 * acinclude.m4: Include ../../config/acx.m4.
14239 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14240 * configure, config.in: Regenerate.
14241 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14242 * server.c (gdbserver_version): Print PKGVERSION.
14243 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14244 (main): Adjust gdbserver_usage calls.
14245 * gdbreplay.c (version, host_name): Add declarations.
14246 (gdbreplay_version, gdbreplay_usage): New.
14247 (main): Accept --version and --help options.
14248
aeb75bf5
DJ
142492008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14250
14251 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14252 (arm_breakpoint_at): Handle Thumb.
14253 (the_low_target): Add comment.
14254
76b233dd
UW
142552008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14256
14257 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14258
08388c79
DE
142592008-05-09 Doug Evans <dje@google.com>
14260
a3c83fae
DE
14261 * server.h (decode_search_memory_packet): Declare.
14262 * remote-utils.c (decode_search_memory_packet): New fn.
14263 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14264 (handle_search_memory): New fn.
14265 (handle_query): Process qSearch:memory packets.
14266
bb9c3d36
UW
142672008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14268
14269 * regcache.c (registers_length): Remove.
14270 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14271 full register packet.
14272 * regcache.h (registers_length): Remove prototype.
14273 * server.h (PBUFSIZ): Define to 16384.
14274
7284e1be
UW
142752008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14276
14277 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14278 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14279 powerpc-64l.o, and powerpc-altivec64l.o.
14280 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14281 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14282 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14283 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14284 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14285 to srv_xmlfiles.
14286
14287 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14288 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14289 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14290 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14291 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14292 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14293 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14294 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14295 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14296 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14297 (clean): Update.
14298
14299 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14300 (init_registers_powerpc_32l): ... this new prototype.
14301 (init_registers_powerpc_32): Remove, replace by ...
14302 (init_registers_powerpc_altivec32l): ... this new prototype.
14303 (init_registers_powerpc_e500): Remove, replace by ...
14304 (init_registers_powerpc_e500l): ... this new prototype.
14305 (init_registers_ppc64): Remove, replace by ...
14306 (init_registers_powerpc_64l): ... this new prototype.
14307 (init_registers_powerpc_64): Remove, replace by ...
14308 (init_registers_powerpc_altivec64l): ... this new prototype.
14309 (ppc_num_regs): Set to 73.
14310 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14311 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14312 (ppc_cannot_store_register): Handle orig_r3 and trap.
14313 (ppc_arch_setup): Update init_registers_... calls.
14314 (ppc_fill_gregset): Handle orig_r3 and trap.
14315
14316 * inferiors.c (clear_inferiors): Reset current_inferior.
14317
fdc59709
PB
143182008-04-23 Paolo Bonzini <bonzini@gnu.org>
14319
889bf7c5
PA
14320 * acinclude.m4: Add override.m4.
14321 * configure: Regenerate.
fdc59709 14322
c9b2f845
UW
143232008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14324
14325 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14326 initial call to init_register_ppc64.
14327
550512b8
UW
143282008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14329
43aaf8b6
PA
14330 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14331 single powerpc*-*-linux* case.
550512b8
UW
14332 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14333
b6430ec3
UW
143342008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14335
14336 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14337 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14338 from reg_xmlfiles.
14339 * linux-ppc-low.c: Include <elf.h>.
14340 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14341 (ppc_hwcap): New global variable.
14342 (ppc_regmap): Remove __SPE__ #ifdef sections.
14343 (ppc_regmap_e500): New global variable.
14344 (ppc_cannot_store_register): Update __SPE__ special case.
14345 (ppc_get_hwcap): New function.
14346 (ppc_arch_setup): Use it to determine whether inferior supports
14347 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14348 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14349 Do not access registers if target does not support AltiVec.
14350 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14351 Do not access registers if target does not support SPE.
14352 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14353
52fa2412
UW
143542008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * linux-low.c (disabled_regsets, num_regsets): New.
14357 (use_regsets_p): Delete.
14358 (linux_wait_for_process): Clear disabled_regsets.
14359 (regsets_fetch_inferior_registers): Check and set it.
14360 (regsets_store_inferior_registers): Likewise.
14361 (linux_fetch_registers, linux_store_registers): Do not use
14362 use_regsets_p.
14363 (initialize_low): Allocate disabled_regsets.
14364
e28b3332
DJ
143652008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * Makefile.in (LIBOBJS): New.
14368 (OBS): Use LIBOBJS.
14369 (memmem.o): New rule.
14370 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14371 * configure: Regenerated.
14372
4536995d
UW
143732008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14374
14375 * server.c (handle_query): Never return "unsupported" for
14376 qXfer:features:read queries.
14377
221c031f
UW
143782008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14379
14380 * server.c (get_features_xml): Fix inverted condition.
14381 (handle_query): Always support qXfer:feature:read.
14382
ccd213ac
DJ
143832008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14384
14385 * server.c (wrapper_argv): New.
14386 (start_inferior): Handle wrapper_argv. If set, expect an extra
14387 trap.
14388 (gdbserver_usage): Document --wrapper.
14389 (main): Parse --wrapper.
14390
6fe305f7
UW
143912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14392
14393 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14394 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14395 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14396 (ppc_set_pc): Likewise.
14397 (ppc_arch_setup): New function.
14398 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14399 of collect_register.
889bf7c5 14400 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14401
5b0a002e
UW
144022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14403
14404 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14405 instead of linux-ppc64-low.o.
14406 * linux-ppc64-low.c: Remove file.
14407 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14408 (linux-ppc64-low.o): Remove rule.
14409
14410 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14411 (init_registers_powerpc_64): Likewise.
14412 (ppc_regmap): Conditionally define depending on __powerpc64__.
14413 (ppc_cannot_store_register): Do not special-case "fpscr" when
14414 compiled on __powerpc64__.
14415 (ppc_collect_ptrace_register): New function.
14416 (ppc_supply_ptrace_register): New function.
14417 (ppc_breakpoint): Change type to "unsigned int".
14418 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14419 (the_low_target): Conditionally provide initializers for the
889bf7c5 14420 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14421 collect_ptrace_register and supply_ptrace_register members.
14422
9b4b61c8
UW
144232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14424
14425 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14426 * server.c (gdbserver_xmltarget): Define.
14427 (get_features_xml): Use it to replace "target.xml" and arch_string.
14428
14429 * configure.srv: Remove srv_xmltarget. Add XML files that were
14430 mentioned there to srv_xmlfiles instead. Remove conditional tests
14431 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14432 srv_xmlfiles and srv_regobj to include all possible choices.
14433 * configure.ac (srv_xmltarget): Remove.
14434 (srv_xmlfiles): Do not add "target.xml".
14435 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14436 checks for supplementary target information.
14437 * configure: Regenerate.
14438 * Makefile.in (XML_TARGET): Remove.
14439 (target.xml): Remove rule.
14440 (clean): Do not clean up target.xml.
14441 (.PRECIOUS): Do not mention target.xml.
14442
14443 * target.h (struct target_ops): Remove arch_string member.
14444 * linux-low.c (linux_arch_string): Remove.
14445 (linux_target_ops): Remove arch_string initializer.
14446 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14447 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14448 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14449 * spu-low.c (spu_arch_string): Remove.
14450 (spu_target_ops): Remove arch_string initializer.
14451 * win32-low.c (win32_arch_string): Remove.
14452 (win32_target_ops): Remove arch_string initializer.
14453 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14454 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14455 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14456
ee1a7ae4
UW
144572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14458
14459 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14460 by collect_ptrace_register and supply_ptrace_register hooks.
14461 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14462 instead of checking for the_low_target.left_pad_xfer.
14463 (usr_store_inferior_registers): Use collect_ptrace_register callback
14464 instead of checking for the_low_target.left_pad_xfer.
14465
14466 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14467 (s390_supply_ptrace_register): Likewise.
14468 (s390_fill_gregset): Call s390_collect_ptrace_register.
14469 (the_low_target): Update.
14470
14471 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14472 (ppc_supply_ptrace_register): Likewise.
14473 (the_low_target): Update.
14474
14475 * linux-i386-low.c (the_low_target): Update.
14476 * linux-x86-64-low.c (the_low_target): Update.
14477
d61ddec4
UW
144782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14479
14480 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14481 reg-s390.o and reg-s390x.o.
14482
14483 * linux-low.c (new_inferior): New global variable.
14484 (linux_create_inferior, linux_attach): Set it.
14485 (linux_wait_for_process): Call the_low_target.arch_setup after the
14486 target has stopped for the first time.
14487 (initialize_low): Do not call the_low_target.arch_setup.
14488
14489 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14490 (s390_set_pc): Likewise.
14491 (s390_arch_setup): New function.
14492 (the_low_target): Use s390_arch_setup as arch_setup routine.
14493
14494 * regcache.c (realloc_register_cache): New function.
14495 (set_register_cache): Call it for each existing regcache.
14496
d05b4ac3
UW
144972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14498
14499 * server.h (init_registers): Remove prototype.
14500
14501 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14502 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14503 instead of init_registers ().
14504 * linux-arm-low.c (init_registers_arm): Add prototype.
14505 (init_registers_arm_with_iwmmxt): Likewise.
14506 (the_low_target): Add initializer for arch_setup field.
14507 * linux-cris-low.c (init_registers_cris): Add prototype.
14508 (the_low_target): Add initializer for arch_setup field.
14509 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14510 (the_low_target): Add initializer for arch_setup field.
14511 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14512 (the_low_target): Add initializer for arch_setup field.
14513 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14514 (the_low_target): Add initializer for arch_setup field.
14515 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14516 (the_low_target): Add initializer for arch_setup field.
14517 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14518 (the_low_target): Add initializer for arch_setup field.
14519 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14520 (init_registers_mips64_linux): Likewise.
14521 (the_low_target): Add initializer for arch_setup field.
14522 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14523 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14524 (the_low_target): Add initializer for arch_setup field.
14525 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14526 (init_registers_powerpc_64): Likewise.
14527 (the_low_target): Add initializer for arch_setup field.
14528 * linux-s390-low.c (init_registers_s390): Add prototype.
14529 (init_registers_s390x): Likewise.
14530 (the_low_target): Add initializer for arch_setup field.
14531 * linux-sh-low.c (init_registers_sh): Add prototype.
14532 (the_low_target): Add initializer for arch_setup field.
14533 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14534 (the_low_target): Add initializer for arch_setup field.
14535 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14536 (the_low_target): Add initializer for arch_setup field.
14537
14538 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14539 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14540 instead of init_registers ().
14541 * win32-arm-low.c (init_registers_arm): Add prototype.
14542 (the_low_target): Add initializer for arch_setup field.
14543 * win32-i386-low.c (init_registers_i386): Add prototype.
14544 (the_low_target): Add initializer for arch_setup field.
14545
14546 * spu-low.c (init_registers_spu): Add prototype.
14547 (initialize_low): Call initialie_registers_spu () instead of
14548 initialize_registers ().
14549
fd96d250
PA
145502008-02-19 Pedro Alves <pedro@codesourcery.com>
14551
14552 * server.c (handle_v_requests): When handling the vRun and vAttach
14553 packets, if already debugging a process, don't kill it. Return an
14554 error instead.
14555
d41b6bb4
DJ
145562008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14557
14558 * server.c (handle_query): Correct length check.
14559
5ac588cf
PA
145602008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14561
14562 * win32-low.c (do_initial_child_stuff): Add process handle
14563 parameter. Set current_process_handle and current_process_id from the
14564 parameters. Clear globals.
14565 (win32_create_inferior): Don't set current_process_handle and
14566 current_process_id here. Instead pass them on the call to
14567 do_initial_child_stuff.
14568 (win32_attach): Likewise.
14569 (win32_clear_inferiors): New.
14570 (win32_kill): Don't close the current process handle or the
14571 current thread handle here. Instead call win32_clear_inferiors.
14572 (win32_detach): Don't open a new handle to the process. Call
14573 win32_clear_inferiors.
14574 (win32_join): Don't rely on current_process_handle; open a new
14575 handle using the process id.
14576 (win32_wait): Call win32_clear_inferiors when the inferior process
14577 has exited.
14578
ecd7ecbc
DJ
145792008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * server.c (monitor_show_help): Add "exit".
14582
1525d545
MG
145832008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14584
ecd7ecbc 14585 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14586 (clean): Add reg-xtensa.c.
14587 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14588 * configure.srv (xtensa*-*-linux*) New target.
14589 * linux-xtensa-low.c: New.
14590 * xtensa-xtregs.c: New.
1525d545 14591
59a016f0
PA
145922008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14593
14594 * hostio.c: Don't include errno.h.
14595 (errno_to_fileio_errno): Move to hostio-errno.
14596 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14597 error number outputting to the target->hostio_last_error callback.
14598 (hostio_packet_error): Use FILEIO_EINVAL directly.
14599 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14600 calls to hostio_error.
14601 * hostio-errno.c: New.
14602 * server.h (hostio_last_error_from_errno): Declare.
14603 * target.h (target_ops): Add hostio_last_error member.
14604 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14605 as hostio_last_error handler.
889bf7c5 14606 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14607 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14608 (wince_hostio_last_error): New functions.
14609 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14610 as hostio_last_error handler.
14611 (win32_target_ops) [!_WIN32_WCE]: Register
14612 hostio_last_error_from_errno as hostio_last_error handler.
14613 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14614 (hostio-errno.o): New rule.
14615 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14616 * configure.srv (srv_hostio_err_objs): New variable. Default to
14617 hostio-errno.o.
14618 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14619 * configure: Regenerate.
14620
2d717e4f
DJ
146212008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14622
14623 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14624 (linux_kill, linux_detach): Clean up the process list.
14625 * remote-utils.c (remote_open): Improve port number parsing.
14626 (putpkt_binary, input_interrupt): Only send interrupts if the target
14627 is running.
14628 * server.c (extended_protocol): Make static.
14629 (attached): Define earlier.
14630 (exit_requested, response_needed, program_argv): New variables.
14631 (target_running): New.
14632 (start_inferior): Clear attached here.
14633 (attach_inferior): Set attached here.
14634 (require_running): Define.
14635 (handle_query): Use require_running and target_running. Implement
14636 "monitor exit".
14637 (handle_v_attach, handle_v_run): New.
14638 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14639 (gdbserver_usage): Update.
14640 (main): Redo argument parsing. Handle --debug and --multi. Handle
14641 --attach along with other options or after the port. Save
14642 program_argv. Support no initial program. Resynchronize
14643 communication with GDB after an error. Handle "monitor exit".
14644 Use require_running and target_running. Always allow the extended
14645 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14646 restart in extended mode.
14647 * README: Refer to the GDB manual. Update --attach usage.
14648
7407e2de
AS
146492007-12-20 Andreas Schwab <schwab@suse.de>
14650
14651 * linux-low.c (STACK_SIZE): Define.
14652 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14653 (linux_test_for_tracefork): Likewise.
14654
b65d95c5
DJ
146552007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * linux-low.c (linux_wait_for_event): Update messages. Do not
14658 reinsert auto-delete breakpoints.
14659 * mem-break.c (struct breakpoint): Change return type of handler to
14660 int.
14661 (set_breakpoint_at): Update handler type.
14662 (reinsert_breakpoint_handler): Return 1 instead of calling
14663 delete_breakpoint.
14664 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14665 setting a new one.
14666 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14667 * mem-break.h (set_breakpoint_at): Update handler type.
14668 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14669 * win32-low.c (auto_delete_breakpoint): New.
14670 (get_child_debug_event): Use it.
14671
4e799345
DJ
146722007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * configure.ac: Check for pread and pwrite.
14675 * hostio.c (handle_pread): Fall back to lseek and read.
14676 (handle_pwrite): Fall back to lseek and write.
14677 * config.in, configure: Regenerated.
14678
27524b67
DJ
146792007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14680
14681 * server.c (myresume): Add own_buf argument.
14682 (main): Update calls.
14683
a20d5e98
DJ
146842007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14685
14686 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14687 * remote-utils.c (remote_open): Do not call disable_async_io.
14688 (block_async_io): Delete.
14689 (unblock_async_io): Make static.
14690 (initialize_async_io): New.
14691 * server.c (handle_v_cont): Handle async I/O here.
14692 (myresume): Likewise. Move other common resume tasks here...
14693 (main): ... from here. Call initialize_async_io. Disable async
14694 I/O before the main loop.
14695 * server.h (initialize_async_io): Declare.
14696 (block_async_io, unblock_async_io): Delete prototypes.
14697 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14698
b79d787e
DJ
146992007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14700
14701 * remote-utils.c (readchar): Allow binary data in received messages.
14702
d97903b2
PA
147032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14704
14705 * win32-low.c (attaching): New global.
14706 (win32_create_inferior): Clear the `attaching' global.
14707 (win32_attach): Set the `attaching' global.
14708 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14709 attaching. Only set a breakpoint at the entry point if not
14710 attaching.
14711
311de423
PA
147122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14713
14714 * server.c (main): Don't report dll events on the initial
14715 connection on attaches.
14716
6c2d16d2
PA
147172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14718
14719 * server.c (main): Relax numerical bases supported for the pid of
14720 the --attach command line argument.
14721
5ca906e6
PA
147222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14723
14724 * win32-low.c (win32_attach): Call OpenProcess before
14725 DebugActiveProcess, not after. Add last error output to error
14726 call.
14727
9c6c8194
PA
147282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14729
14730 * win32-low.c (win32_get_thread_context)
14731 (win32_set_thread_context): New functions.
14732 (thread_rec): Use win32_get_thread_context.
14733 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14734 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14735 field.
14736
4d5d1aaa
PA
147372007-12-03 Leo Zayas
14738 Pedro Alves <pedro_alves@portugalmail.pt>
14739
14740 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14741 global variables.
14742 (child_add_thread): Minor cleanup.
14743 (child_continue): Resume artificially suspended threads before
14744 calling ContinueDebugEvent.
14745 (suspend_one_thread): New.
14746 (fake_breakpoint_event): New.
14747 (get_child_debug_event): Change return type to int. Check here if
14748 gdb sent an interrupt request. If a soft interrupt was requested,
14749 fake a breakpoint event. Return 0 if there is no event to handle,
14750 and 1 otherwise.
14751 (win32_wait): Don't check here if gdb sent an interrupt request.
14752 Ensure there is a valid event to handle.
14753 (win32_request_interrupt): Add soft interruption method as last
14754 resort.
14755
c436e841
PA
147562007-12-03 Leo Zayas
14757 Pedro Alves <pedro_alves@portugalmail.pt>
14758
14759 * win32-low.h (win32_thread_info): Add descriptions to the
14760 structure members. Replace `suspend_count' counter by a
14761 `suspended' flag.
14762 * win32-low.c (thread_rec): Update condition of when to get the
14763 context from the inferior. Rely on ContextFlags being set if it
14764 has already been retrieved. Only suspend the inferior thread if
14765 we haven't already. Warn if that fails.
14766 (continue_one_thread): s/suspend_count/suspended/. Only call
14767 ResumeThread once. Warn if that fails.
14768
e7b5fa67
PA
147692007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14770
14771 * win32-low.c (win32_wait): Don't read from the inferior when it
14772 has already exited.
14773
a385171d
PA
147742007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14775
14776 * Makefile.in (win32_low_h): New variable.
14777 (win32-low.o): Add dependency on $(win32_low_h).
14778 (win32-arm-low.o, win32-i386-low.o): New rules.
14779
f80c84b3
DJ
147802007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * hostio.c: Correct copyright year.
14783
a6b151f1
DJ
147842007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14785
14786 * Makefile.in (OBS): Add hostio.o.
14787 (hostio.o): New rule.
14788 * server.h (handle_vFile): Declare.
14789 * hostio.c: New file.
14790 * server.c (handle_v_requests): Take packet_len and new_packet_len
14791 for binary packets. Call handle_vFile.
14792 (main): Update call to handle_v_requests.
14793
f9387fc3
DJ
147942007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * linux-low.c: Include <sched.h>.
14797
51c2684e
DJ
147982007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14799
14800 * linux-low.c (linux_tracefork_grandchild): New.
14801 (linux_tracefork_child): Use clone.
14802 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14803
75f83163
JB
148042007-10-31 Joel Brobecker <brobecker@adacore.com>
14805
14806 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14807
da5898ce
DJ
148082007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14809
14810 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14811
24a09b5f
DJ
148122007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * inferiors.c (change_inferior_id): Delete.
14815 (add_pid_to_list, pull_pid_from_list): New.
14816 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14817 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14818 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14819 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14820 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14821 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14822 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14823 (using_threads): Always set to 1.
14824 (handle_extended_wait): New.
14825 (add_process): Do not set TID.
14826 (linux_create_inferior): Set must_set_ptrace_flags.
14827 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14828 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14829 (linux_thread_alive): Rename TID argument to LWPID.
14830 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14831 (linux_wait_for_event): Do not use TID or check using_threads. Update
14832 call to dead_thread_notify. Call handle_extended_wait.
14833 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14834 (send_sigstop): Delete sigstop_sent.
14835 (wait_for_sigstop): Avoid TID.
14836 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14837 (linux_test_for_tracefork): New.
14838 (linux_lookup_signals): Use thread_db_active and
14839 linux_supports_tracefork_flag.
14840 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14841 * linux-low.h (get_process_thread): Avoid TID.
14842 (struct process_ifo): Move thread_known and tid to the end. Remove
14843 sigstop_sent.
14844 (linux_attach_lwp, thread_db_init): Update prototypes.
14845 * server.h (change_inferior_id): Delete prototype.
14846 (add_pid_to_list, pull_pid_from_list): New prototypes.
14847 * thread-db.c (thread_db_use_events): New.
14848 (find_first_thread): Rename to...
14849 (find_one_thread): ...this. Update callers and messages. Do not
14850 call fatal. Check thread_db_use_events. Do not call
14851 change_inferior_id or new_thread_notify.
14852 (maybe_attach_thread): Update. Do not call new_thread_notify.
14853 (thread_db_init): Set thread_db_use_events. Check use_events.
14854 * utils.c (fatal, warning): Correct message prefix.
14855
30ed0a8f
DJ
148562007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * Makefile.in (clean): Remove new files.
14859 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14860 (powerpc-64.o, powerpc-64.c): New rules.
14861 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14862 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14863 with SPE.
14864 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14865 SPE targets.
14866 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14867 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14868 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14869 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14870 (target_regsets): Add AltiVec and SPE register sets.
14871 * configure.ac: Check for AltiVec and SPE.
14872 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14873 (ppc_fill_vrregset, ppc_store_vrregset): New.
14874 (target_regsets): Add AltiVec register set.
14875 * configure: Regenerated.
14876
fd462a61
DJ
148772007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * linux-low.c (O_LARGEFILE): Define.
14880 (linux_read_memory): Use /proc/PID/mem.
14881 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14882 * configure, config.in: Regenerated.
14883
69f223ed
DJ
148842007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14885
14886 * linux-low.c (linux_wait_for_event): Do not pass signals while
14887 single-stepping.
14888
aec18585
PA
148892007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14890
14891 * win32-low.c (create_process): New.
14892 (win32_create_inferior): Use create_process instead of
14893 CreateProcess. If create_process failed retry appending an ".exe"
14894 suffix. Store the GetLastError result immediatelly after
14895 create_process calls and use it on the call to error.
14896
34d86ddd
PA
148972007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14898
14899 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14900
5a0e3bd0
JB
149012007-08-23 Joel Brobecker <brobecker@adacore.com>
14902
14903 * configure.ac: Switch license to GPLv3.
14904
f88c79e6
MS
149052007-08-01 Michael Snyder <msnyder@access-company.com>
14906
14907 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14908
6b3d9b83
PA
149092007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14910
14911 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14912 typedef.
14913 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14914 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14915 CloseToolhelp32Snapshot.
14916 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14917 CloseToolhelp32Snapshot.
14918
c588c53c
MS
149192007-07-27 Michael Snyder <michael.snyder@access-company.com>
14920
14921 * server.c (main): Check for inferior exit before main loop.
14922
aa0403d9
PA
149232007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14924
14925 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14926 instead of on tmp_desc.
14927
255e7678
DJ
149282007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14929 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14932 (add_thread): Minor cleanups.
14933 (clear_inferiors): Move lower in the file. Clear the DLL
14934 list.
14935 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14936 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14937 (xml_escape_text): New.
14938 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14939 for qSupported.
14940 (handle_v_cont): Report errors.
14941 (gdbserver_version): Update.
14942 (main): Correct size of own_buf. Do not report initial DLL events.
14943 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14944 (unloaded_dll, xml_escape_text): New.
14945 * win32-low.c (enum target_waitkind): Update comments.
14946 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14947 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14948 (win32_EnumProcessModules, win32_GetModuleInformation)
14949 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14950 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14951 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14952 (win32_Module32First, win32_Module32Next, load_toolhelp)
14953 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14954 (get_child_debug_event): Handle DLL events.
14955 (win32_wait): Likewise.
14956
0d37add9
DJ
149572007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14958
14959 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14960 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14961
45e2715e
PA
149622007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14963
14964 * win32-low.c (handle_output_debug_string): Ignore event if not
14965 waiting.
14966
c5674cf1
PA
149672007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14970
2bbe3cc1
DJ
149712007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14972
14973 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14974
ae13219e
DJ
149752007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14976
14977 * inferiors.c (change_inferior_id): Add comment.
14978 * linux-low.c (check_removed_breakpoint): Add an early
14979 prototype. Improve debug output.
14980 (linux_attach): Doc update.
14981 (linux_detach_one_process, linux_detach): Clean up before releasing
14982 each process.
14983 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14984 * linux-low.h (struct process_info): Doc improvement.
14985 * mem-break.c (delete_all_breakpoints): New.
14986 * mem-break.h (delete_all_breakpoints): New prototype.
14987 * thread-db.c (find_first_thread): New.
14988 (thread_db_create_event): Call it instead of
14989 thread_db_find_new_threads. Clean up unused variables.
14990 (maybe_attach_thread): Remove first thread handling.
14991 (thread_db_find_new_threads): Use find_first_thread.
14992 (thread_db_get_tls_address): Likewise.
14993
4105de34
DJ
149942007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14995
14996 * thread-db.c (thread_db_find_new_threads): Add prototype.
14997 (thread_db_create_event): Check for the main thread before adding
14998 a new thread.
14999 (maybe_attach_thread): Only enable event reporting if TID == 0.
15000 (thread_db_get_tls_address): Check for new threads.
15001
2b876972
DJ
150022007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * linux-low.c (linux_create_inferior): Try execv before execvp.
15005 * spu-low.c (spu_create_inferior): Likewise.
15006
7a245884
DJ
150072007-06-13 Mike Frysinger <vapier@gentoo.org>
15008
15009 * linux-low.c (linux_create_inferior): Change execv to execvp.
15010 * spu-low.c (spu_create_inferior): Likewies.
15011
117ce543
DJ
150122007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15013
15014 * Makefile.in (clean): Clean new files instead of deleted ones.
15015 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15016 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15017 rules.
15018 * configure.srv: Specify XML files and new regformats for MIPS and
15019 MIPS64 GNU/Linux.
15020 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15021 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15022 an entry for the restart register.
15023 (mips_cannot_fetch_register, mips_cannot_store_register)
15024 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15025 register names to match the XML descriptions.
15026 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15027 restart register instead of $0.
15028
0e7f50da
UW
150292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15030 Markus Deuling <deuling@de.ibm.com>
15031
15032 * remote-utils.c (decode_xfer_write): New function.
15033 * server.h (decode_xfer_write): Add prototype.
15034 * server.c (handle_query): Add PACKET_LEN argument. Support
15035 qXfer:spu:read and qXfer:spu:write packets.
15036 (main): Pass packet_len to handle_query.
15037 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15038 * target.h (target_ops): Add qxfer_spu.
15039
374c1d38
UW
150402007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15041
15042 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15043 accessing non-seekable spufs files.
15044
bb63802a
UW
150452007-05-16 Markus Deuling <deuling@de.ibm.com>
15046
889bf7c5 15047 * server.c (handle_query): Add reply for qC packet.
bb63802a 15048
7390519e
PA
150492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15050 Leo Zayas <lerele@champenstudios@com>
15051
15052 * server.h (check_remote_input_interrupt_request): New function.
15053 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15054 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15055 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15056 (check_remote_input_interrupt_request): New function.
15057 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15058 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15059 winapi_GenerateConsoleCtrlEvent): New typedefs.
15060 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15061 to 250 ms.
15062 (win32_wait): Check for remote interrupt request
15063 with check_remote_input_interrupt_request.
15064 (win32_request_interrupt): New function.
15065 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15066
34b34921
PA
150672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15068
15069 * win32-low.c (debug_registers_changed,
15070 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15071 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15072 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15073 (thread_rec): Get context using the low target.
15074 (child_add_thread): Call thread_added on the low target,
15075 which does the same thing.
15076 (regptr): Delete.
15077 (do_initial_child_stuff): Remove debug registers references.
15078 Set context using the low target. Resume threads after
15079 setting the contexts.
15080 (child_continue): Remove dead variable. Remove debug
15081 registers references.
15082 (child_fetch_inferior_registers): Go through the low target.
15083 (do_child_store_inferior_registers): Remove.
15084 (child_store_inferior_registers): Go through the low target.
15085 (win32_resume): Remove debug registers references.
15086 Set context using the low target.
15087 (handle_exception): Change return type to void. Don't record
15088 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15089 first chance exception.
889bf7c5 15090 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15091 goto loop. Always return after waiting for debug event.
15092 (win32_wait): Convert to switch statement. Handle spurious
15093 events.
15094
15095 * win32-i386-low.c (debug_registers_changed,
15096 debug_registers_used): New.
15097 (initial_stuff): Rename to ...
15098 (i386_initial_stuff): ... this. Clear debug registers
15099 state variables.
15100 (store_debug_registers): Delete.
15101 (i386_get_thread_context): New.
15102 (load_debug_registers): Delete.
15103 (i386_set_thread_context): New.
15104 (i386_thread_added): New.
15105 (single_step): Rename to ...
15106 (i386_single_step): ... this.
15107 (do_fetch_inferior_registers): Rename to ...
15108 (i386_fetch_inferior_register): ... this.
15109 (i386_store_inferior_register): New.
15110 (the_low_target): Adapt to new interface.
15111
15112 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15113 (arm_get_thread_context): New.
15114 (arm_set_thread_context): New.
15115 (regptr): New.
15116 (do_fetch_inferior_registers): Rename to ...
15117 (arm_fetch_inferior_register): ... this.
15118 (arm_store_inferior_register): New.
15119 (arm_wince_breakpoint): Reimplement as unsigned long.
15120 (arm_wince_breakpoint_len): Define.
15121 (the_low_target): Adapt to new interface.
15122
15123 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15124 load_debug_registers. Add get_thread_context, set_thread_context,
15125 thread_added and store_inferior_register. Rename
15126 fetch_inferior_registers to fetch_inferior_register.
15127 (regptr): Remove declaration.
15128
dd6953e1
PA
151292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15130
15131 * linux-low.c (linux_detach): Change return type to int. Return 0.
15132 * spu-low.c (spu_detach): Likewise.
15133
444d6139
PA
151342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15135
15136 * target.h (target_ops): Change return type of detach to int.
15137 Add join.
15138 (join_inferior): New.
15139 * server.c (main): Don't skip detach support on mingw32.
15140 If the inferior doesn't support detaching return error.
15141 Call join_inferior instead of using waitpid.
15142 * linux-low.c (linux_join): New.
15143 (linux_target_op): Add linux_join.
15144 * spu-low.c (spu_join): New.
15145 (spu_target_ops): Add spu_join.
15146 * win32-low.c (win32_detach): Adapt to new interface.
15147 Reopen current_process_handle before detaching. Issue a child
15148 resume before detaching.
15149 (win32_join): New.
15150 (win32_target_op): Add win32_join.
15151
1d5315fe
PA
151522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15153
15154 * win32-low.c (win32-attach): Fix return value.
15155 * target.h (target_ops): Describe ATTACH return values.
15156
bf914831
PA
151572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15158
15159 * win32-low.c (GETPROCADDRESS): Define.
15160 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15161 (winapi_DebugSetProcessKillOnExit): Likewise.
15162 (win32_create_inferior): Force usage of ansi CreateProcessA.
15163 (win32_attach): Use GETPROCADDRESS.
15164 (win32_detach): Likewise.
15165
f72f3e60
PA
151662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15167
15168 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15169
ed50f18f
PA
151702007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15171
15172 * win32-low.c: Commit leftover changes from 2007-03-29.
15173
0c2ead7e
DJ
151742007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15175
15176 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15177 fields short instead of int. Add explicit padding.
15178 (i387_cache_to_fsave): Remove unnecessary casts.
15179 (i387_fsave_to_cache): Doc fix.
15180 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15181
73725ff3
DJ
151822007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15185 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15186
d99f33d8
PA
151872007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15188
15189 * configure.srv (arm*-*-mingw32ce*): Move near the other
15190 arm targets.
15191
68070c10
PA
151922007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15193
2482afc6 15194 * configure.ac: Add errno checking.
68070c10
PA
15195 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15196 sys/file.h and malloc.h.
15197 (AC_CHECK_DECLS): Add perror.
15198 (srv_mingwce): Handle.
2482afc6 15199 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15200 win32-i386-low.o to srv_tgtobj.
15201 (i[34567]86-*-mingw*): Likewise.
15202 (arm*-*-mingw32ce*): Add case.
15203 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15204 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15205 [__MINGW32CE__] (strerror): New function.
15206 [__MINGW32CE__] (errno): Define to GetLastError.
15207 [__MINGW32CE__] (COUNTOF): New macro.
15208 (remote_open): Remove extra close call.
15209 * mem-break.c (delete_breakpoint_at): New function.
15210 * mem-break.h (delete_breakpoint_at): Declare.
15211 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15212 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15213 [USE_WIN32API] (read, write): Add char* casts.
15214 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15215 * server.h: Include wincecompat.h on Windows CE.
15216 [HAVE_ERRNO_H]: Check.
15217 (perror): Declare if not declared.
15218 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15219 (perror_with_name): Remove errno declaration.
15220 * wincecompat.h: New.
15221 * wincecompat.c: New.
15222 * win32-low.h: New.
15223 * win32-arm-low.c: New.
15224 * win32-i386-low.c: New.
15225 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15226 (OUTMSG2): Make it safe.
15227 (_T): New macro.
15228 (COUNTOF): New macro.
15229 (NUM_REGS): Get it from the low target.
15230 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15231 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15232 (thread_rec): Let low target handle debug registers.
15233 (child_add_thread): Likewise.
15234 (child_init_thread_list): Likewise.
15235 (continue_one_thread): Likewise.
15236 (regptr): New.
15237 (do_child_fetch_inferior_registers): Move to ...
15238 * win32-i386-low.c: ... here, and rename to ...
15239 (do_fetch_inferior_registers): ... this.
889bf7c5 15240 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15241 Go through the low target.
15242 (do_child_store_inferior_registers): Use regptr.
15243 (strwinerror): New function.
15244 (win32_create_inferior): Handle Windows CE.
15245 Use strwinerror instead of strerror on Windows error
15246 codes. Add program to the error output.
15247 Don't close the main thread handle on Windows CE.
15248 (win32_attach): Use coredll.dll on Windows CE.
15249 (win32_kill): Close current process and current
15250 thread handles.
15251 (win32_detach): Use coredll.dll on Windows CE.
15252 (win32_resume): Let low target handle debug registers, and
15253 step request.
15254 (handle_exception): Add/Remove initial breakpoint. Avoid
15255 non-existant WSTOPSIG on Windows CE.
15256 (win32_read_inferior_memory): Cast to remove warning.
15257 (win32_arch_string): Go through the low target.
15258 (initialize_low): Call set_breakpoint_data with the low
15259 target's breakpoint.
15260 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15261 FOP_REGNUM, mappings): Move to ...
15262 * win32-i386-low.c: ... here.
15263 * win32-low.c (win32_thread_info): Move to ...
15264 * win32-low.h: ... here.
15265 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15266 win32-arm-low.c and wincecompat.c.
15267 (all:): Add $EXEEXT.
15268 (install-only:): Likewise.
15269 (gdbserver:): Likewise.
15270 (gdbreplay:): Likewise.
15271 * config.in: Regenerate.
15272 * configure: Regenerate.
15273
41093d81
PA
152742007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15275
15276 * win32-low.c: Rename typedef thread_info to
15277 win32_thread_info throughout.
15278
544afa54
PA
152792007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15280
15281 * win32-i386-low.c: Rename to ...
15282 * win32-low.c: ... this.
15283 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15284 * Makefile.in: Likewise.
15285
bce7165d
PA
152862007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15287
15288 * remote-utils.c (monitor_output): Constify msg parameter.
15289 * server.h (monitor_output): Likewise.
15290 * win32-i386-low.c (handle_output_debug_string): New.
15291 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15292 handle_output_debug_string.
15293 (get_child_debug_event): Likewise.
15294
506c7aa0
DJ
152952007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15296
15297 * server.c (main): Correct strtoul check.
15298
42c81e2a
DJ
152992007-03-27 Jon Ringle <jon@ringle.org>
15300
15301 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15302
9453113a
DJ
153032007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15304
15305 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15306
64a69107
DJ
153072007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * terminal.h: Check HAVE_SGTTY_H.
15310
153112007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15312
15313 * remote-utils.c (remote_open): Print out the assigned port number.
15314
c74d0ad8
DJ
153152007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15316
15317 * remote-utils.c (monitor_output): New function.
15318 * server.c (debug_threads): Define here.
15319 (monitor_show_help): New function.
15320 (handle_query): Handle qRcmd.
15321 (main): Do not handle 'd' packet.
15322 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15323 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15324 of debug_threads.
15325
de7c3b4a
PA
153262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15327
15328 * Makefile.in (EXEEXT): New.
15329 (clean): Use $(EXEEXT).
15330
ef57601b
PA
153312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15332
15333 * target.h (target_ops): Rename send_signal to request_interrupt,
15334 and remove enum target_signal parameter.
15335 * linux-low.c (linux_request_interrupt): Rename from
15336 linux_send_signal, and always send SIGINT.
15337 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15338 and always send SIGINT.
15339 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15340 of send_signal.
15341 (input_interrupt): Likewise.
15342
820f2bda
PA
153432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15344
15345 * server.c (get_features_xml): Check if target implemented
15346 arch_string.
15347 * win32-i386-low.c (win32_arch_string): New.
15348 (win32_target_ops): Add win32_arch_string as arch_string member.
15349
ab39bf24
UW
153502007-02-22 Markus Deuling <deuling@de.ibm.com>
15351
15352 * spu-low.c (spu_arch_string): New.
15353 (spu_target_ops): Add spu_arch_string.
15354
61ff6e04
DJ
153552007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15356
15357 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15358 * configure.ac: Do not check for terminal.h.
15359 * configure, config.in: Regenerated.
15360
fb1e4ffc
DJ
153612007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15362
15363 * Makefile.in (OBS): Add $(XML_BUILTIN).
15364 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15365 (clean): Update.
15366 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15367 (arm-with-iwmmxt.c): New.
15368 * config.in, configure: Regenerate.
15369 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15370 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15371 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15372 (arm*-*-linux*): Add iWMMXt and regset support.
15373 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15374 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15375 (arm_store_wmmxregset, target_regsets): New.
15376 * server.c (get_features_xml): Take annex argument. Check builtin
15377 XML documents.
15378 (handle_query): Handle multiple annexes.
15379
0f48aa01
DJ
153802007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15381
15382 * remote-utils.c [USE_WIN32API] (read, write): Define.
15383 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15384 write.
15385
23181151
DJ
153862007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * linux-i386-low.c (the_low_target): Set arch_string.
15389 * linux-x86-64-low.c (the_low_target): Likewise.
15390 * linux-low.c (linux_arch_string): New.
15391 (linux_target_ops): Add it.
15392 * linux-low.h (struct linux_target_ops): Add arch_string.
15393 * server.c (write_qxfer_response): Use const void * for DATA.
15394 (get_features_xml): New.
15395 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15396 * target.h (struct target_ops): Add arch_string method.
15397
9d606399
DJ
153982007-01-03 Denis Pilat <denis.pilat@st.com>
15399 Daniel Jacobowitz <dan@codesourcery.com>
15400
15401 * linux-low.c (linux_kill): Handle being called with no threads.
15402 * win32-i386-low.c (win32_kill): Likewise.
15403 (get_child_debug_event): Clear current_process_handle.
15404
154052006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15406 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * remote-utils.c (remote_open): Check the type of specified
15409 serial port devices before opening them.
15410 * server.c (main): Kill the inferior if an error occurs during
15411 the first remote_open.
15412
a5e13d24
DJ
154132006-12-05 Markus Deuling <deuling@de.ibm.com>
15414
15415 * README: Update supported targets.
15416
186947f7
DJ
154172006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15418
15419 * Makefile.in (clean): Remove reg-mips64.c.
15420 (reg-mips64.c, reg-mips64.o): New rules.
15421 * configure.srv: Handle mips64. Include regset support for mips.
15422 * linux-mips-low.c (union mips_register): New.
15423 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15424 (mips_breakpoint, mips_breakpoint_at): Use int.
15425 (mips_collect_register, mips_supply_register)
15426 (mips_collect_register_32bit, mips_supply_register_32bit)
15427 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15428 (mips_store_fpregset, target_regsets): New.
15429 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15430
a13e2c95
UW
154312006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15432
15433 * configure.srv: Add target "spu*-*-*".
15434 * Makefile.in (clean): Remove reg-spu.c.
15435 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15436 * spu-low.c: New file.
15437
cb7283db
DJ
154382006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15439
15440 * configure.ac: Correct td_thr_tls_get_addr test.
15441 * configure: Regenerated.
15442
89be2091
DJ
154432006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15444
15445 * linux-low.c (linux_wait_for_event): Reformat. Use the
15446 pass_signals array.
15447 * remote-utils.c (decode_address_to_semicolon): New.
15448 * server.c (pass_signals, handle_general_set): New.
15449 (handle_query): Mention QPassSignals for qSupported.
15450 (main): Call handle_general_set.
15451 * server.h (pass_signals, decode_address_to_semicolon): New.
15452
000ef4f0
DJ
154532006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * server.c (handle_query): Correct error handling for read_auxv.
15456
b7149293
UW
154572005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15458
15459 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15460 and srv_linux_thread_db to yes.
15461 * linux-s390-low.c (s390_fill_gregset): New function.
15462 (target_regsets): Define data structure.
15463
dae5f5cf
DJ
154642006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15465
15466 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15467 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15468 * config.in, configure: Regenerated.
15469 * inferiors.c (gdb_id_to_thread): New function.
15470 (gdb_id_to_thread_id): Use it.
15471 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15472 * linux-low.h (struct process_info): Add th member.
15473 (thread_db_get_tls_address): New prototype.
15474 * remote-utils.c (decode_address): Make non-static.
15475 * server.c (handle_query): Handle qGetTLSAddr.
15476 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15477 * target.h (struct target_ops): Add get_tls_address.
15478 * thread-db.c (maybe_attach_thread): Save the thread handle.
15479 (thread_db_get_tls_address): New.
15480
32ca6d61
DJ
154812006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15482
15483 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15484 (linux_resume_one_process): Take a siginfo_t *. Update all
15485 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15486 (struct pending_signals): Add a siginfo_t.
15487 (linux_wait_for_process): Always set last_status.
15488 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15489 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15490 * linux-low.h (struct process_info): Add last_status.
15491
5ffff7c1
DJ
154922006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * remote-utils.c (try_rle): New function.
15495 (putpkt_binary): Use it.
15496
8695c747
DJ
154972006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15500 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15501 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15502 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15503 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15504 point registers.
15505
290fadea
RS
155062006-08-08 Richard Sandiford <richard@codesourcery.com>
15507
15508 * server.c (terminal_fd): New variable.
15509 (old_foreground_pgrp): Likewise.
15510 (restore_old_foreground_pgrp): New function.
15511 (start_inferior): Record the terminal file descriptor in terminal_fd
15512 and its original foreground group in old_foreground_pgrp. Register
15513 restore_old_foreground_pgrp with atexit().
15514
9f2e1e63
DJ
155152006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15516
15517 * server.c (handle_query): Correct qPart to qXfer.
15518
b80864fb
DJ
155192006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * configure.ac: Check for more headers which are missing on
15522 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15523 * configure.srv: Add Cygwin and mingw32.
15524 * remote-utils.c: Don't include headers unconditionally which
15525 are missing on mingw32. Include <winsock.h> for mingw32.
15526 (remote_open): Adjust for mingw32 support. Flush
15527 standard error after writing to it.
15528 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15529 (unblock_async_io, enable_async_io, disable_async_io)
15530 (readchar, getpkt): Update for Winsock support.
15531 (prepare_resume_reply): Expect a protocol signal number.
15532 * server.c: Disable <sys/wait.h> on mingw32.
15533 (start_inferior): Adjust for mingw32 support. Flush
15534 standard error after writing to it.
15535 (attach_inferior): Likewise. Use protocol signal
15536 numbers.
15537 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15538 and names.
15539 * win32-i386-low.c: New file.
15540 * Makefile.in (XM_CLIBS): Set.
15541 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15542 (win32-i386-low.o): New dependency rule.
15543 * linux-low.c (linux_wait): Use target signal numbers.
15544 * target.h (struct target_ops): Doc fix.
15545 * server.h (target_signal_to_name): New prototype.
15546 * gdbreplay.c: Don't include headers unconditionally which
15547 are missing on mingw32. Include <winsock.h> for mingw32.
15548 (remote_close, remote_open): Adjust for Winsock support.
15549 * configure, config.in: Regenerated.
15550
0876f84a
DJ
155512006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * server.c (decode_xfer_read, write_qxfer_response): New.
15554 (handle_query): Take a packet length argument. Handle
15555 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15556 the qSupported response.
15557 (main): Update call to handle_query.
15558
01f9e8fa
DJ
155592006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15562 (putpkt_binary): Renamed from putpkt and adjusted for binary
15563 data.
15564 (putpkt): New wrapper for putpkt_binary.
15565 (readchar): Don't mask off the high bit.
15566 (decode_X_packet): New function.
15567 * server.c (main): Call putpkt_binary if a handler sets the packet
15568 length. Save the length of the incoming packet. Handle 'X'.
15569 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15570
be2a5f71
DJ
155712006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15572
15573 * server.c (handle_query): Handle qSupported.
15574
ea025f5f
DJ
155752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * remote-utils.c (all_symbols_looked_up): New variable.
15578 (look_up_one_symbol): Check it.
15579 * server.h (look_up_one_symbol): New declaration.
15580 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15581
9308fc88
DJ
155822006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15585 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15586 (PTRACE_GET_THREAD_AREA): Define.
15587 (ps_get_thread_area): New function.
15588
52fb6437
NS
155892006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15590
15591 * configure.srv (m68k*-*-uclinux*): New target.
15592 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15593 (linux_resume_one_process): Remove extraneous cast.
15594 (linux_read_offsets): New.
15595 (linux_target_op): Add linux_read_offsets on mmuless systems.
15596 * server.c (handle_query): Add qOffsets logic.
15597 * target.h (struct target_ops): Add read_offsets.
15598
21b0f40c
DJ
155992006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15600
15601 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15602 (PTRACE_GET_THREAD_AREA): Define.
15603 (ps_get_thread_area): New function.
15604 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15605 (linux-x86-64-low.o): Update.
15606
0050a760
DJ
156072006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15608
15609 * configure.ac: Remove checks for prfpregset_t.
15610 * gdb_proc_service.h: New file.
15611 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15612 new "gdb_proc_service.h".
15613 * proc-service.c: Likewise.
15614 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15615 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15616 * Makefile.in (gdb_proc_service_h): Updated.
15617 * configure, config.in: Regenerated.
15618
b92a518e
DJ
156192006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15620
15621 * remote-utils.c (prepare_resume_reply): Move declaration
15622 of gdb_id_from_wait to the top of the block.
15623
545587ee
DJ
156242006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * linux-low.c (regsets_store_inferior_registers): Read the regset
15627 from the target before filling it.
15628
9db87ebd
DJ
156292006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * server.c (attach_inferior): Return SIGTRAP for a successful
15632 attach.
15633
dd24457d
DJ
156342006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15635
15636 * Makefile.in (OBS): Add version.o.
15637 (STAGESTUFF): Delete.
15638 (version.o): Add dependencies.
15639 (version.c): Replace rule.
15640 (clean): Remove version.c.
15641 * server.c (gdbserver_version): New.
15642 (gdbserver_usage): Use printf.
15643 (main): Handle --version and --help.
15644 * server.h (version, host_name): Add declarations.
15645
6f0f660e
EZ
156462005-12-23 Eli Zaretskii <eliz@gnu.org>
15647
889bf7c5
PA
15648 * linux-arm-low.c:
15649 * linux-arm-low.c:
15650 * inferiors.c:
15651 * i387-fp.h:
15652 * i387-fp.c:
15653 * gdbreplay.c:
15654 * regcache.c:
15655 * proc-service.c:
15656 * mem-break.h:
15657 * mem-break.c:
15658 * linux-x86-64-low.c:
15659 * linux-sh-low.c:
15660 * linux-s390-low.c:
15661 * linux-ppc64-low.c:
15662 * linux-ppc-low.c:
15663 * linux-mips-low.c:
15664 * linux-m68k-low.c:
15665 * linux-m32r-low.c:
15666 * linux-low.h:
15667 * linux-low.c:
15668 * linux-ia64-low.c:
15669 * linux-i386-low.c:
15670 * linux-crisv32-low.c:
15671 * thread-db.c:
15672 * terminal.h:
15673 * target.h:
15674 * target.c:
15675 * server.h:
15676 * server.c:
15677 * remote-utils.c:
15678 * regcache.h:
15679 * utils.c:
15680 * Makefile.in:
15681 * configure.ac:
6f0f660e
EZ
15682 * gdbserver.1: Add (C) after Copyright. Update the FSF
15683 address.
15684
9d1fb177
DJ
156852005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15688 (arm_breakpoint_at): Recognize both breakpoints.
15689 (the_low_target): Use the correct breakpoint instruction.
15690
011a70c2
DJ
156912005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15692
15693 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15694 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15695 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15696 (the_low_target): Update.
15697
7fb85e41
AS
156982005-10-25 Andreas Schwab <schwab@suse.de>
15699
15700 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15701
15702 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15703 (ia64_num_regs): Reduce to 462.
15704
3db0444b
DJ
157052005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * acinclude.m4: Correct quoting.
15708 * aclocal.m4: Regenerated.
15709
15710 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15711 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15712 (thread_db_init): Call thread_db_err_str.
15713 * configure.ac: Check for TD_VERSION.
15714 * config.in, configure: Regenerated.
15715
bee0189a
DJ
157162005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15717
15718 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15719
e9d25b98
DJ
157202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15721
15722 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15723 is not available. Define HAVE_PTRACE_GETREGS if it is.
15724 * config.in, configure: Regenerated.
15725 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15726 * linux-i386-low.c, linux-m68k-low.c: Update to use
15727 HAVE_PTRACE_GETREGS.
15728 * linux-low.c (regsets_fetch_inferior_registers)
15729 (regsets_store_inferior_registers): Only return 0 if we processed
15730 GENERAL_REGS.
15731 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15732 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15733
a06660f7
DJ
157342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * inferiors.c (struct thread_info): Add gdb_id.
15737 (add_thread): Add gdb_id argument.
15738 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15739 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15740 calls to add_thread.
15741 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15742 * server.c (handle_query): Use thread_to_gdb_id.
15743 (handle_v_cont, main): Use gdb_id_to_thread_id.
15744 * server.h (add_thread): Update prototype.
15745 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15746 prototypes.
15747
5a1f5858
DJ
157482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15749
15750 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15751 left-padded registers.
15752 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15753 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15754
e122f1f5
SE
157552005-07-01 Steve Ellcey <sje@cup.hp.com>
15756
15757 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15758 * configure: Regenerate.
15759 * config.in: Regenerate.
15760 * server.h (NEED_DECLARATION_STRERROR):
15761 Replace with !HAVE_DECL_STRERROR.
15762
d592fa2f
DJ
157632005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15764
15765 * linux-low.c (linux_wait, linux_send_signal): Don't test
15766 an unsigned long variable for > 0 if it could be MAX_ULONG.
15767 * server.c (myresume): Likewise.
15768 * target.c (set_desired_inferior): Likewise.
15769
ccbd4912
MK
157702005-06-13 Mark Kettenis <kettenis@gnu.org>
15771
15772 * configure.ac: Simplify and improve check for socklen_t.
15773 * configure, config.in: Regenerate.
15774
f450004a
DJ
157752005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15776
15777 * acconfig.h: Remove.
15778 * configure.ac: Add a test for socklen_t. Use three-argument
15779 AC_DEFINE throughout.
15780 * config.in: Regenerated using autoheader 2.59.
15781 * configure: Regenerated.
15782
15783 * gdbreplay.c (socklen_t): Provide a default.
15784 (remote_open): Use socklen_t.
15785 * remote-utils.c (socklen_t): Provide a default.
15786 (remote_open): Use socklen_t.
15787 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15788 unsigned char.
15789
15790 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15791 char for buffers.
15792 * linux-low.c (linux_read_memory, linux_write_memory)
15793 (linux_read_auxv): Likewise.
15794 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15795 (check_mem_write): Likewise.
15796 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15797 Likewise.
15798 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15799 (registers_from_string, register_data): Likewise.
15800 * server.c (handle_query, main): Likewise.
15801 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15802 (decode_M_packet): Likewise.
15803 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15804 * target.h (struct target_ops): Update read_memory, write_memory,
15805 and read_auxv.
15806 (read_inferior_memory, write_inferior_memory): Update.
15807 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15808 to unsigned char *.
15809 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15810 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15811 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15812 linux-s390-low.c, linux-sh-low.c: Update for changes in
15813 read_inferior_memory and the_low_target->breakpoint.
15814
eee84df1
DJ
158152005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15816
15817 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15818 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15819 * configure.srv: Add powerpc64-*-linux*.
15820 * linux-ppc64-low.c: New file.
15821
45b134e5
OF
158222005-05-23 Orjan Friberg <orjanf@axis.com>
15823
15824 * linux-cris-low.c: New file with support for CRIS.
15825 * linux-crisv32-low.c: Ditto for CRISv32.
15826 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15827 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15828 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15829 reg-crisv32.o, and reg-crisv32.c to make rules.
15830 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15831 recognized targets.
15832
48d93c75
UW
158332005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15834
15835 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15836 of sizeof (PTRACE_XFER_TYPE).
15837 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15838
e013ee27
OF
158392005-05-12 Orjan Friberg <orjanf@axis.com>
15840
889bf7c5 15841 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15842 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15843 pointers for hardware watchpoint support.
15844 * linux-low.h (struct linux_target_ops): Ditto.
15845 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15846 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15847 to linux_target_ops.
15848 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15849 reply packet.
15850 * server.c (main): Recognize 'Z' and 'z' packets.
15851
b0ded00b
UW
158522005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15853
15854 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15855 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15856 (the_low_target): Add new members.
15857
8643e2ad
DJ
158582005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15859
15860 * proc-service.c (ps_lgetregs): Search all_processes instead of
15861 all_threads.
15862
fc620387
DJ
158632005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15864
15865 * server.c (start_inferior): Change return type to int.
15866 (attach_inferior): Change sigptr to int *.
15867 (handle_v_cont, handle_v_requests): Change signal to int *.
15868 (main): Change signal to int.
15869
158702005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15871
15872 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15873 * configure.srv: Add m32r*-*-linux*.
15874 * linux-m32r-low.c: New file.
15875
e0e76420
DJ
158762005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15879
a1928bad
DJ
158802005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15881
15882 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15883 Take unsigned long arguments for PIDs.
15884 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15885 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15886 (wait_for_sigstop, linux_resume_one_process)
15887 (regsets_fetch_inferior_registers, linux_send_signal)
15888 (linux_read_auxv): Likewise. Update the types of variables holding
15889 PIDs. Update format string specifiers.
15890 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15891 * remote-utils.c (prepare_resume_reply): Likewise.
15892 * server.c (cont_thread, general_thread, step_thread)
15893 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15894 unsigned long.
15895 (handle_query): Update format specifiers.
15896 (handle_v_cont, main): Use strtoul for thread IDs.
15897 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15898 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15899 (general_thread, step_thread, thread_from_wait)
15900 (old_thread_from_wait): Update.
15901 * target.h (struct thread_resume): Use unsigned long for THREAD.
15902 (struct target_ops): Use unsigned long for arguments to attach and
15903 thread_alive.
15904
dcdb98d2
DJ
159052005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15906
15907 * acinclude.m4: Include bfd/bfd.m4 directly.
15908 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15909 <agriffis@toolchain.org>.
15910 * aclocal.m4, configure: Regenerated.
15911
bec39cab
AC
159122005-01-07 Andrew Cagney <cagney@gnu.org>
15913
15914 * configure.ac: Rename configure.in, require autoconf 2.59.
15915 * configure: Re-generate.
15916
434c4c77
DJ
159172004-12-08 Daniel Jacobowitz <dan@debian.org>
15918
15919 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15920 LIBS when finished.
15921 * aclocal.m4: Regenerated.
15922 * configure: Regenerated.
15923
db1d3e1b
AS
159242004-11-21 Andreas Schwab <schwab@suse.de>
15925
15926 * linux-m68k-low.c (m68k_num_gregs): Define.
15927 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15928 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15929 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15930 (m68k_breakpoint_at): New. Add to the_low_target.
15931
15932 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15933 srv_linux_thread_db to yes.
15934
43360365
JB
159352004-10-20 Joel Brobecker <brobecker@gnat.com>
15936
15937 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15938 (ARCH_SET_FS): Likewise.
15939 (ARCH_GET_FS): Likewise.
15940 (ARCH_GET_GS): Likewise.
15941
fd500816
DJ
159422004-10-16 Daniel Jacobowitz <dan@debian.org>
15943
15944 * linux-i386-low.c (ps_get_thread_area): New.
15945 * linux-x86-64-low.c (ps_get_thread_area): New.
15946 * linux-low.c: Include <sys/syscall.h>.
15947 (linux_kill_one_process): Don't kill the first thread here.
15948 (linux_kill): Kill the first thread here.
15949 (kill_lwp): New function.
15950 (send_sigstop, linux_send_signal): Use it.
15951 * proc-service.c: Clean up #ifdefs.
15952 (fpregset_info): Delete.
15953 (ps_lgetregs): Update and enable implementation.
15954 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15955 implementations.
15956 * remote-utils.c (struct sym_cache, symbol_cache): New.
15957 (input_interrupt): Print a clearer message.
15958 (async_io_enabled): New variable.
15959 (enable_async_io, disable_async_io): Use it. Update comments.
15960 (look_up_one_symbol): Use the symbol cache.
15961 * thread-db.c (thread_db_look_up_symbols): New function.
15962 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15963
f6de3c42
DJ
159642004-10-16 Daniel Jacobowitz <dan@debian.org>
15965
15966 * configure.in: Test for -rdynamic.
15967 * configure: Regenerated.
15968 * Makefile (INTERNAL_LDFLAGS): New.
15969 (gdbserver, gdbreplay): Use it.
15970
2c0fc042
AC
159712004-09-02 Andrew Cagney <cagney@gnu.org>
15972
15973 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15974
075b3282
DJ
159752004-03-23 Daniel Jacobowitz <drow@mvista.com>
15976
15977 * linux-low.c (linux_wait): Clear all_processes list also.
15978
fa6a77dc
DJ
159792004-03-12 Daniel Jacobowitz <drow@mvista.com>
15980
15981 * linux-low.c: Include <errno.h>. Remove extern declaration of
15982 errno.
15983
6d782a97
DJ
159842004-03-12 Daniel Jacobowitz <drow@mvista.com>
15985
15986 * gdbreplay.c, server.h, utils.c: Update copyright years.
15987
3a7fb99b
DJ
159882004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15989
15990 * server.c (main): Print child status or termination signal from
15991 variable 'signal', not 'sig'.
15992
c3e735a6
DJ
159932004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15994
15995 * linux-low.c (linux_read_memory): Change return type to
15996 int. Check for and return error from ptrace().
15997 * target.c (read_inferior_memory): Change return type to int. Pass
15998 back return status from the_target->read_memory().
15999 * target.h (struct target_ops): Adapt *read_memory() prototype.
16000 Update comment.
16001 (read_inferior_memory): Adapt prototype.
16002 * server.c (main): Return an error packet if
16003 read_inferior_memory() returns an error.
16004
a59d1c82
DJ
160052004-03-04 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16008 Unify with other clean targets.
16009
dc3f8883
DJ
160102004-02-29 Daniel Jacobowitz <drow@mvista.com>
16011
16012 * server.c (handle_v_cont): Call set_desired_inferior.
16013
89a208da
DJ
160142004-02-29 Daniel Jacobowitz <drow@mvista.com>
16015
16016 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16017
62ea82f5
DJ
160182004-02-29 Daniel Jacobowitz <drow@mvista.com>
16019
16020 * linux-low.c (linux_wait): Unblock async I/O.
16021 (linux_resume): Block and enable async I/O.
16022 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16023 * server.h (block_async_io, unblock_async_io): Add prototypes.
16024
6910d122
DJ
160252004-02-29 Daniel Jacobowitz <drow@mvista.com>
16026
16027 * remote-utils.c (remote_open): Print a status notice after
16028 opening a TCP port.
16029 * server.c (attach_inferior): Print a status notice after
16030 attaching.
16031
160322004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16033
16034 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16035
c89dc5d4
DJ
160362004-02-26 Daniel Jacobowitz <drow@mvista.com>
16037
16038 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16039 error packet.
16040 * server.c, target.h: Update copyright years.
16041
4b8dad4a
RM
160422004-02-25 Roland McGrath <roland@redhat.com>
16043
16044 * target.h (struct target_ops): New member `read_auxv'.
16045 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16046 * linux-low.c (linux_read_auxv): New function.
16047 (linux_target_ops): Initialize `read_auxv' member to that.
16048
d7446758
JB
160492004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16050
16051 Committed by Jim Blandy <jimb@redhat.com>.
16052
16053 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16054 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16055 instead of GPR_SIZE to distiguish s390 and s390x targets.
16056
5544ad89
DJ
160572004-01-31 Daniel Jacobowitz <drow@mvista.com>
16058
16059 * linux-low.c: Update copyright year.
16060 (check_removed_breakpoint): Clear pending_is_breakpoint.
16061 (linux_set_resume_request, linux_queue_one_thread)
16062 (resume_status_pending_p): New functions.
16063 (linux_continue_one_thread): Use process->resume.
16064 (linux_resume): Only resume threads if there are no pending events.
16065 * linux-low.h (struct process_info): Add resume request
16066 pointer.
16067
2a68b70e
DJ
160682004-01-30 Daniel Jacobowitz <drow@mvista.com>
16069
16070 * regcache.c (new_register_cache): Clear the allocated register
16071 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16072
64386c31
DJ
160732003-10-13 Daniel Jacobowitz <drow@mvista.com>
16074
16075 * linux-low.c (linux_resume): Take a struct thread_resume *
16076 argument.
16077 (linux_wait): Update call.
16078 (resume_ptr): New static variable.
16079 (linux_continue_one_thread): Renamed from
16080 linux_continue_one_process. Use resume_ptr.
16081 (linux_resume): Use linux_continue_one_thread.
16082 * server.c (handle_v_cont, handle_v_requests): New functions.
16083 (myresume): New function.
16084 (main): Handle 'v' case.
16085 * target.h (struct thread_resume): New type.
16086 (struct target_ops): Change argument of "resume" to struct
16087 thread_resume *.
16088 (myresume): Delete macro.
16089
c938e9b0
L
160902003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16091
16092 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16093 (uninstall): Support DESTDIR.
16094
7f313d07
BC
16095Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16096
16097 * configure.srv: Add xscale*linux copy of arm*linux entry.
16098
3b2fc2ea
DJ
160992003-07-24 Daniel Jacobowitz <drow@mvista.com>
16100
16101 * linux-arm-low.c (arm_reinsert_addr): New function.
16102 (the_low_target): Add arm_reinsert_addr.
16103
1c0a559e
MK
161042003-07-08 Mark Kettenis <kettenis@gnu.org>
16105
16106 * mem-break.c: Remove whitespace at end of file.
16107
43d5792c
DJ
161082003-06-28 Daniel Jacobowitz <drow@mvista.com>
16109
16110 * configure.in: Check whether we need to prototype strerror.
16111 * server.h: Optionally prototype strerror.
16112 * gdbreplay.c (perror_with_name): Use strerror.
16113 * linux-low.c (linux_attach_lwp): Use strerror.
16114 * utils.c (perror_with_name): Use strerror.
16115 * config.in, configure: Regenerated.
16116
c8a86edf
DJ
161172003-06-28 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16120 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16121
73d37363
DJ
161222003-06-20 Daniel Jacobowitz <drow@mvista.com>
16123
16124 * Makefile.in (SFILES): Update.
16125 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16126 low-sun3.c: Remove files.
16127
6ad8ae5c
DJ
161282003-06-17 Daniel Jacobowitz <drow@mvista.com>
16129
16130 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16131 (linux_detach_one_process, linux_detach): New functions.
16132 (linux_target_ops): Add linux_detach.
16133 * server.c (main): Handle 'D' packet.
16134 * target.h (struct target_ops): Add "detach" member.
16135 (detach_inferior): Define.
16136
1581182a
MK
161372003-06-13 Mark Kettenis <kettenis@gnu.org>
16138
16139 From Kelley Cook <kelleycook@wideopenwest.com>:
16140 * configure.srv: Accept i[34567]86 variants.
16141
e5379b03
DJ
161422003-06-05 Daniel Jacobowitz <drow@mvista.com>
16143
16144 * linux-low.c (linux_wait_for_event): Correct comment typos.
16145 (linux_resume_one_process): Call check_removed_breakpoint.
16146 (linux_send_signal): New function.
16147 (linux_target_ops): Add linux_send_signal.
16148 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16149 of kill.
16150 * target.h (struct target_ops): Add send_signal.
16151
2ff29de4
JB
161522003-05-29 Jim Blandy <jimb@redhat.com>
16153
16154 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16155 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16156 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16157 away part of the register's value.
16158
254787d4
DJ
161592003-03-26 Daniel Jacobowitz <drow@mvista.com>
16160
16161 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16162 (linux_wait_for_event, linux_init_signals): Likewise.
16163
94e10508
DJ
161642003-03-17 Daniel Jacobowitz <drow@mvista.com>
16165
16166 * configure.in: Check for stdlib.h.
16167 * configure: Regenerated.
16168 * config.in: Regenerated.
16169
4c0711e0
DJ
161702003-01-04 Andreas Schwab <schwab@suse.de>
16171
16172 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16173
ef66e766
AC
161742003-01-02 Andrew Cagney <ac131313@redhat.com>
16175
16176 * Makefile.in: Remove obsolete code.
16177
a1358604
DJ
161782002-11-20 Daniel Jacobowitz <drow@mvista.com>
16179
16180 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16181 defined(PT_FPR0_HI).
16182
23ce3b1c
DJ
161832002-11-17 Stuart Hughes <seh@zee2.com>
16184
16185 * linux-arm-low.c (arm_num_regs): Increase.
16186 (arm_regmap): Include status register.
16187
161882002-11-17 Daniel Jacobowitz <drow@mvista.com>
16189
16190 * linux-low.c (register_addr): Remove incorrect -1 check.
16191
a9fa9f7d
DJ
161922002-08-29 Daniel Jacobowitz <drow@mvista.com>
16193
16194 * linux-low.c (linux_create_inferior): Call setpgid. Return
16195 the new PID.
16196 (unstopped_p, linux_signal_pid): Remove.
16197 (linux_target_ops): Remove linux_signal_pid.
16198 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16199 global instead of target method.
16200 * target.h (struct target_ops): Remove signal_pid. Update comment
16201 for create_inferior.
16202 * server.c (signal_pid): New variable.
16203 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16204 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16205 (attach_inferior): Set signal_pid.
16206
17574093
DJ
162072002-08-23 Daniel Jacobowitz <drow@mvista.com>
16208
16209 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16210
162112002-08-20 Jim Blandy <jimb@redhat.com>
16212
16213 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16214 default for this.
16215
162162002-08-01 Andrew Cagney <cagney@redhat.com>
16217
16218 * Makefile.in: Make chill references obsolete.
16219
162202002-07-24 Kevin Buettner <kevinb@redhat.com>
16221
16222 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16223 * configure: Regenerate.
16224 * config.in: Regenerate.
16225
162262002-07-09 David O'Brien <obrien@FreeBSD.org>
16227
16228 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16229 (perror_with_name, remote_close, remote_open, expect, play): Static.
16230
162312002-07-04 Michal Ludvig <mludvig@suse.cz>
16232
4b8dad4a 16233 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16234 byte offsets instead of an array of indexes.
16235 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16236
162372002-06-13 Daniel Jacobowitz <drow@mvista.com>
16238
16239 * regcache.c: Add comment.
16240
162412002-06-11 Daniel Jacobowitz <drow@mvista.com>
16242
16243 * thread-db.c: New file.
16244 * proc-service.c: New file.
16245 * acinclude.m4: New file.
16246 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16247 proc-service.o, and thread-db.o.
16248 (linux-low.o): Add USE_THREAD_DB.
16249 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16250 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16251 * aclocal.m4: Regenerated.
16252 * config.in: Regenerated.
16253 * configure: Regenerated.
16254 * configure.in: Check for proc_service.h, sys/procfs.h,
16255 thread_db.h, and linux/elf.h headrs.
16256 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16257 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16258 Check for -lthread_db and thread support.
16259 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16260 PowerPC, and SuperH.
16261 * i387-fp.c: Constify arguments.
16262 * i387-fp.h: Likewise.
16263 * inferiors.c: (struct thread_info): Renamed from
16264 `struct inferior_info'. Remove PID member. Use generic inferior
16265 list header. All uses updated.
16266 (inferiors, signal_pid): Removed.
16267 (all_threads): New variable.
16268 (get_thread): Define.
16269 (add_inferior_to_list): New function.
16270 (for_each_inferior): New function.
16271 (change_inferior_id): New function.
16272 (add_inferior): Removed.
16273 (remove_inferior): New function.
16274 (add_thread): New function.
16275 (free_one_thread): New function.
16276 (remove_thread): New function.
16277 (clear_inferiors): Use for_each_inferior and free_one_thread.
16278 (find_inferior): New function.
16279 (find_inferior_id): New function.
16280 (inferior_target_data): Update argument type.
16281 (set_inferior_target_data): Likewise.
16282 (inferior_regcache_data): Likewise.
16283 (set_inferior_regcache_data): Likewise.
16284 * linux-low.c (linux_bp_reinsert): Remove.
16285 (all_processes, stopping_threads, using_thrads)
16286 (struct pending_signals, debug_threads, pid_of): New.
16287 (inferior_pid): Replace with macro.
16288 (struct inferior_linux_data): Remove.
16289 (get_stop_pc, add_process): New functions.
16290 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16291 Use add_process and add_thread.
16292 (linux_attach_lwp): New function, based on old linux_attach. Use
16293 add_process and add_thread. Set stop_expected for new threads.
16294 (linux_attach): New function.
16295 (linux_kill_one_process): New function.
16296 (linux_kill): Kill all LWPs.
16297 (linux_thread_alive): Use find_inferior_id.
16298 (check_removed_breakpoints, status_pending_p): New functions.
16299 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16300 Update. Use WNOHANG. Wait for cloned processes also. Update process
16301 struct for the found process.
16302 (linux_wait_for_event): New function.
16303 (linux_wait): Use it. Support LWPs.
16304 (send_sigstop, wait_for_sigstop, stop_all_processes)
16305 (linux_resume_one_process, linux_continue_one_process): New functions.
16306 (linux_resume): Support LWPs.
16307 (REGISTER_RAW_SIZE): Remove.
16308 (fetch_register): Use register_size instead. Call supply_register.
16309 (usr_store_inferior_registers): Likewise. Call collect_register.
16310 Fix recursive case.
16311 (regsets_fetch_inferior_registers): Improve error message.
16312 (regsets_store_inferior_registers): Add debugging.
16313 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16314 (unstopped_p, linux_signal_pid): New functions.
16315 (linux_target_ops): Add linux_signal_pid.
16316 (linux_init_signals): New function.
16317 (initialize_low): Call it. Initialize using_threads.
16318 * regcache.c (inferior_regcache_data): Add valid
16319 flag.
16320 (get_regcache): Fetch registers lazily. Add fetch argument
16321 and update all callers.
16322 (regcache_invalidate_one, regcache_invalidate): New
16323 functions.
16324 (new_register_cache): Renamed from create_register_cache.
16325 Return the new regcache.
16326 (free_register_cache): Change argument to a void *.
16327 (registers_to_string, registers_from_string): Call get_regcache
16328 with fetch flag set.
16329 (register_data): Make static. Pass fetch flag to get_regcache.
16330 (supply_register): Call get_regcache with fetch flag clear.
16331 (collect_register): Call get_regcache with fetch flag set.
16332 (collect_register_as_string): New function.
16333 * regcache.h: Update.
16334 * remote-utils.c (putpkt): Flush after debug output and use
16335 stderr.
16336 Handle input interrupts while waiting for an ACK.
16337 (input_interrupt): Use signal_pid method.
16338 (getpkt): Flush after debug output and use stderr.
16339 (outreg): Use collect_register_as_string.
16340 (new_thread_notify, dead_thread_notify): New functions.
16341 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16342 and general_thread.
16343 (look_up_one_symbol): Flush after debug output.
16344 * server.c (step_thread, server_waiting): New variables.
16345 (start_inferior): Don't use signal_pid. Update call to mywait.
16346 (attach_inferior): Update call to mywait.
16347 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16348 (main): Don't fetch/store registers explicitly. Use
16349 set_desired_inferior. Support proposed ``Hs'' packet. Update
16350 calls to mywait.
16351 * server.h: Update.
16352 (struct inferior_list, struct_inferior_list_entry): New.
16353 * target.c (set_desired_inferior): New.
16354 (write_inferior_memory): Constify.
16355 (mywait): New function.
16356 * target.h: Update.
16357 (struct target_ops): New signal_pid method.
16358 (mywait): Removed macro, added prototype.
16359
16360 * linux-low.h (regset_func): Removed.
16361 (regset_fill_func, regset_store_func): New.
16362 (enum regset_type): New.
16363 (struct regset_info): Add type field. Use new operation types.
16364 (struct linux_target_ops): stop_pc renamed to get_pc.
16365 Add decr_pc_after_break and breakpoint_at.
16366 (get_process, get_thread_proess, get_process_thread)
16367 (strut process_info, all_processes, linux_attach_lwp)
16368 (thread_db_init): New.
16369
16370 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16371 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16372 (the_low_target): Add new members.
16373 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16374 (i386_store_fpxregset): Constify.
16375 (target_regsets): Add new kind identifier.
16376 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16377 (i386_set_pc): Add debugging.
16378 (i386_breakpoint_at): New function.
16379 (the_low_target): Add new members.
16380 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16381 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16382 (mips_breakpoint_at): New.
16383 (the_low_target): Add new members.
16384 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16385 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16386 (the_low_target): Add new members.
16387 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16388 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16389 (the_low_target): Add new members.
16390 * linux-x86-64-low.c (target_regsets): Add new kind
16391 identifier.
16392
163932002-05-15 Daniel Jacobowitz <drow@mvista.com>
16394
16395 From Martin Pool <mbp@samba.org>:
16396 * server.c (gdbserver_usage): New function.
16397 (main): Call it.
16398
163992002-05-14 Daniel Jacobowitz <drow@mvista.com>
16400
16401 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16402 stop_at -> stop_pc.
16403
164042002-05-04 Andrew Cagney <ac131313@redhat.com>
16405
16406 * Makefile.in: Remove obsolete code.
16407
164082002-04-24 Michal Ludvig <mludvig@suse.cz>
16409
16410 * linux-low.c (regsets_fetch_inferior_registers),
16411 (regsets_store_inferior_registers): Removed cast to int from
16412 ptrace() calls.
16413 * regcache.h: Added declaration of struct inferior_info.
16414
164152002-04-20 Daniel Jacobowitz <drow@mvista.com>
16416
16417 * inferiors.c (struct inferior_info): Add regcache_data.
16418 (add_inferior): Call create_register_cache.
16419 (clear_inferiors): Call free_register_cache.
16420 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16421 * regcache.c (struct inferior_regcache_data): New.
16422 (registers): Remove.
16423 (get_regcache): New function.
16424 (create_register_cache, free_register_cache): New functions.
16425 (set_register_cache): Don't initialize the register cache here.
16426 (registers_to_string, registers_from_string, register_data): Call
16427 get_regcache.
16428 * regcache.h: Add prototypes.
16429 * server.h: Likewise.
16430
164312002-04-20 Daniel Jacobowitz <drow@mvista.com>
16432
16433 * mem-break.c: New file.
16434 * mem-break.h: New file.
16435 * Makefile.in: Add mem-break.o rule; update server.h
16436 dependencies.
16437 * inferiors.c (struct inferior_info): Add target_data
16438 member.
16439 (clear_inferiors): Free target_data member if set.
16440 (inferior_target_data, set_inferior_target_data): New functions.
16441 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16442 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16443 * linux-low.c (linux_bp_reinsert): New variable.
16444 (struct inferior_linux_data): New.
16445 (linux_create_inferior): Use set_inferior_target_data.
16446 (linux_attach): Likewise. Call add_inferior.
16447 (linux_wait_for_one_inferior): New function.
16448 (linux_wait): Call it.
16449 (linux_write_memory): Add const.
16450 (initialize_low): Call set_breakpoint_data.
16451 * linux-low.h (struct linux_target_ops): Add breakpoint
16452 handling members.
16453 * server.c (attach_inferior): Remove extra add_inferior
16454 call.
16455 * server.h: Include mem-break.h. Update inferior.c
16456 prototypes.
16457 * target.c (read_inferior_memory)
16458 (write_inferior_memory): New functions.
16459 * target.h (read_inferior_memory)
16460 (write_inferior_memory): Change macros to prototypes.
16461 (struct target_ops): Update comments. Add const to write_memory
16462 definition.
16463
164642002-04-11 Daniel Jacobowitz <drow@mvista.com>
16465
16466 * linux-low.c (usr_store_inferior_registers): Support
16467 registers which are allowed to fail to store.
16468 * linux-low.h (linux_target_ops): Likewise.
16469 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16470 (ppc_cannot_store_register): FPSCR may not be storable.
16471
164722002-04-09 Daniel Jacobowitz <drow@mvista.com>
16473
16474 * server.h: Include <string.h> if HAVE_STRING_H.
16475 * ChangeLog: Correct paths in last ChangeLog entry.
16476
164772002-04-09 Daniel Jacobowitz <drow@mvista.com>
16478
16479 * linux-low.h: Remove obsolete prototypes.
16480 (struct linux_target_ops): New.
16481 (extern the_low_target): New.
16482 * linux-low.c (num_regs, regmap): Remove declarations.
16483 (register_addr): Use the_low_target explicitly.
16484 (fetch_register): Likewise.
16485 (usr_fetch_inferior_registers): Likewise.
16486 (usr_store_inferior_registers): Likewise.
16487 * linux-arm-low.c (num_regs): Remove.
16488 (arm_num_regs): Define.
16489 (arm_regmap): Renamed from regmap, made static.
16490 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16491 made static.
16492 (arm_cannot_store_register): Renamed from cannot_store_register,
16493 made static.
16494 (the_low_target): New.
16495 * linux-i386-low.c (num_regs): Remove.
16496 (i386_num_regs): Define.
16497 (i386_regmap): Renamed from regmap, made static.
16498 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16499 made static.
16500 (i386_cannot_store_register): Renamed from cannot_store_register,
16501 made static.
16502 (the_low_target): New.
16503 * linux-ia64-low.c (num_regs): Remove.
16504 (ia64_num_regs): Define.
16505 (ia64_regmap): Renamed from regmap, made static.
16506 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16507 made static.
16508 (ia64_cannot_store_register): Renamed from cannot_store_register,
16509 made static.
16510 (the_low_target): New.
16511 * linux-m68k-low.c (num_regs): Remove.
16512 (m68k_num_regs): Define.
16513 (m68k_regmap): Renamed from regmap, made static.
16514 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16515 made static.
16516 (m68k_cannot_store_register): Renamed from cannot_store_register,
16517 made static.
16518 (the_low_target): New.
16519 * linux-mips-low.c (num_regs): Remove.
16520 (mips_num_regs): Define.
16521 (mips_regmap): Renamed from regmap, made static.
16522 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16523 made static.
16524 (mips_cannot_store_register): Renamed from cannot_store_register,
16525 made static.
16526 (the_low_target): New.
16527 * linux-ppc-low.c (num_regs): Remove.
16528 (ppc_num_regs): Define.
16529 (ppc_regmap): Renamed from regmap, made static.
16530 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16531 made static.
16532 (ppc_cannot_store_register): Renamed from cannot_store_register,
16533 made static.
16534 (the_low_target): New.
16535 * linux-s390-low.c (num_regs): Remove.
16536 (s390_num_regs): Define.
16537 (s390_regmap): Renamed from regmap, made static.
16538 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16539 made static.
16540 (s390_cannot_store_register): Renamed from cannot_store_register,
16541 made static.
16542 (the_low_target): New.
16543 * linux-sh-low.c (num_regs): Remove.
16544 (sh_num_regs): Define.
16545 (sh_regmap): Renamed from regmap, made static.
16546 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16547 made static.
16548 (sh_cannot_store_register): Renamed from cannot_store_register,
16549 made static.
16550 (the_low_target): New.
16551 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16552 (the_low_target): New.
16553
165542002-04-09 Daniel Jacobowitz <drow@mvista.com>
16555
16556 * Makefile.in: Add stamp-h target.
16557 * configure.in: Create stamp-h.
16558 * configure: Regenerated.
16559
165602002-04-09 Daniel Jacobowitz <drow@mvista.com>
16561
16562 * inferiors.c: New file.
16563 * target.c: New file.
16564 * target.h: New file.
16565 * Makefile.in: Add target.o and inferiors.o. Update
16566 dependencies.
16567 * linux-low.c (inferior_pid): New static variable,
16568 moved from server.c.
16569 (linux_create_inferior): Renamed from create_inferior.
16570 Call add_inferior. Return 0 on success instead of a PID.
16571 (linux_attach): Renamed from myattach.
16572 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16573 (linux_thread_alive): Renamed from mythread_alive.
16574 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16575 child dies.
16576 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16577 (regsets_store_inferior_registers): Correct error message.
16578 Add missing ``return 0''.
16579 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16580 (linux_store_registers): Renamed from store_inferior_registers.
16581 (linux_read_memory): Renamed from read_inferior_memory.
16582 (linux_write_memory): Renamed from write_inferior_memory.
16583 (linux_target_ops): New structure.
16584 (initialize_low): Call set_target_ops ().
16585 * remote-utils.c (unhexify): New function.
16586 (hexify): New function.
16587 (input_interrupt): Send signals to ``signal_pid''.
16588 * server.c (inferior_pid): Remove.
16589 (start_inferior): Update create_inferior call.
16590 (attach_inferior): Call add_inferior.
16591 (handle_query): New function.
16592 (main): Call handle_query for `q' packets.
16593 * server.h: Include "target.h". Remove obsolete prototypes.
16594 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16595
165962002-04-09 Daniel Jacobowitz <drow@mvista.com>
16597
16598 * Makefile.in: Add WARN_CFLAGS. Update configury
16599 dependencies.
16600 * configure.in: Check for <string.h>
16601 * configure: Regenerate.
16602 * config.in: Regenerate.
16603 * gdbreplay.c: Include needed system headers.
16604 (remote_open): Remove strchr prototype.
16605 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16606 * regcache.c (supply_register): Change buf argument to const void *.
16607 (supply_register_by_name): Likewise.
16608 (collect_register): Change buf argument to void *.
16609 (collect_register_by_name): Likewise.
16610 * regcache.h: Add missing prototypes.
16611 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16612 * server.c (handle_query): New function.
16613 (attached): New static variable, moved out of main.
16614 (main): Quiet longjmp clobber warnings.
16615 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16616 * utils.c (error): Remove NORETURN.
16617 (fatal): Likewise.