Remove exit_inferior_num_silent
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c0867626
SDJ
12018-06-29 Joel Brobecker <brobecker@adacore.com>
2
3 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4 parameter in call to 'amd64_create_target_description'.
5
2512d7ef
JK
62018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7
8 * x86-tdesc.h: Remove executable permission flag.
9
d0ac1c44
SM
102018-06-19 Simon Marchi <simon.marchi@ericsson.com>
11
12 * configure.ac: Remove AC_PREREQ, add missing quoting.
13 * configure: Re-generate.
14 * config.in: Re-generate.
15 * aclocal.m4: Re-generate.
16
c4eb05ff
SM
172018-06-18 Simon Marchi <simon.marchi@ericsson.com>
18
19 * tracepoint.h (current_traceframe): Remove declaration.
20
02895270
AH
212018-06-18 Alan Hayward <alan.hayward@arm.com>
22
23 * linux-aarch64-low.c (is_sve_tdesc): New function.
24 (aarch64_sve_regs_copy_to_regcache): Likewise.
25 (aarch64_sve_regs_copy_from_regcache): Likewise.
26 (aarch64_regs_info): Add SVE checks.
27 (initialize_low_arch): Initialize SVE.
28
e9902bfc
AH
292018-06-18 Alan Hayward <alan.hayward@arm.com>
30
31 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
32
fefa175e
AH
332018-06-11 Alan Hayward <alan.hayward@arm.com>
34
35 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
36 (initialize_low_tracepoint): Likewise
37 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
38 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
39 param.
40 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
41 checks.
42 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
43
b91ad3ff
AH
442018-06-11 Alan Hayward <alan.hayward@arm.com>
45
46 * server.h (PBUFSIZ): Increase size
47
f868386e
AH
482018-06-11 Alan Hayward <alan.hayward@arm.com>
49
50 * regcache.c (regcache::raw_compare): New function.
51 * regcache.h (regcache::raw_compare): New declaration.
52
9c861883
AH
532018-06-11 Alan Hayward <alan.hayward@arm.com>
54
55 * regcache.c (new_register_cache): Use new.
56 (free_register_cache): Use delete.
57 (register_data): Use const.
58 (supply_register): Move body inside regcache.
59 (regcache::raw_supply): New override function.
60 (collect_register): Move body inside regcache.
61 (regcache::raw_collect): New override function.
62 (regcache::get_register_status): New override function.
63 * regcache.h (struct regcache): Inherit from reg_buffer_common.
64
40591844
TT
652018-06-09 Tom Tromey <tom@tromey.com>
66
67 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
68 declare queue.
69 (event_queue): Use std::queue.
70 (gdb_event_xfree): Remove.
71 (initialize_event_loop, process_event, wait_for_event): Update.
72
6341380d
SC
732018-06-08 Stan Cox <scox@redhat.com>
74
75 * win32-low.c (win32_create_inferior): last_ptid and last_status
76 moved to client_state.
77
03349c93
PA
782018-06-08 Pedro Alves <palves@redhat.com>
79
80 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
81 common/common-exceptions.o, common/common-utils.o,
82 common/errors.o, common/print-utils.o and utils.o.
83 * gdbreplay.c: Include "common-defs.h" instead of the two
84 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
85 string.h or alloca.h.
86 (perror_with_name): Delete.
87 (remote_open): Use xstrdup instead of strdup.
88 (main): Rename to ...
89 (captured_main): ... this.
90 (main): New.
91
8dcc53b3
TT
922018-06-08 Tom Tromey <tom@tromey.com>
93
94 * linux-low.c (linux_low_read_btrace): Update.
95
c12a5089
SC
962018-06-04 Stan Cox <scox@redhat.com>
97
98 * server.h (struct client_state): New.
99 * server.c (cont_thread, general_thread, multi_process)
100 (report_fork_events, report_vfork_events, report_exec_events)
101 (report_thread_events, swbreak_feature, hwbreak_feature)
102 (vCont_supported, disable_randomization, pass_signals)
103 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
104 Moved to client_state.
105 * remote-utils.c (remote_debug, noack_mode)
106 (transport_is_reliable): Moved to client_state.
107 * tracepoint.c (current_traceframe): Moved to client_state.
108
109 Update all callers.
110 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
111 linux-low.c, remote-utils.h, target.c: Use client_state.
112
122394f1
AH
1132018-05-31 Alan Hayward <alan.hayward@arm.com>
114
115 * configure.srv: Add new c/h file.
116
95228a0d
AH
1172018-05-31 Alan Hayward <alan.hayward@arm.com>
118
119 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
120 null VQ.
121
d8dab6c3
MR
1222018-05-25 Maciej W. Rozycki <macro@mips.com>
123
124 * gdb.arch/mips-fpregset-core.exp: New test.
125 * gdb.arch/mips-fpregset-core.c: New test source.
126
81e25b7c
EK
1272018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
128
129 PR server/23198
130 * hostio.c (require_int): Do not report overflow for integers
131 between 0xfffffff and 0x7fffffff.
132
7e947ad3
MR
1332018-05-22 Maciej W. Rozycki <macro@mips.com>
134
135 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
136 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
137 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
138 functions.
139 (the_low_target): Wire them.
140
1d75a658
PFC
1412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
142
143 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
144 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
145 mode. Call collect_register_by_name with vscr using
146 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
147 (ppc_store_vrregset): Add and set vscr_offset variable as in
148 ppc_fill_vrregset. Call supply_register_by_name with vscr using
149 vscr_offset.
150
d078308a
PFC
1512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
152
153 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
154 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
155 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
156
7273b5fc
PFC
1572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
158
159 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
160 (ppc_store_vsxregset): Likewise.
161 (ppc_fill_vrregset): Likewise.
162 (ppc_store_vrregset): Likewise.
163 (ppc_fill_evrregset): Likewise.
164 (ppc_store_evrregset): Likewise.
165 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
166 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
167 needed.
168
2e077f5e
PFC
1692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
170
171 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
172 wordsize of the inferior. Call ppc_linux_target_wordsize.
173
bd64614e
PFC
1742018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
175
176 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
177 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
178 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
179 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
180 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
181 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
182 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
183 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
184 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
185 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
186 (tdesc_powerpc_e500l): Remove.
187 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
188 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
189 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
190 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
191 linux-ppc-tdesc.h.
192 (ppc_arch_setup): Remove target description matching code. Fill a
193 ppc_linux_features struct and call ppc_linux_match_description
194 with it.
195
75d74cca
MR
1962018-05-22 Maciej W. Rozycki <macro@mips.com>
197
198 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
199 width of the requested register exceeds the width of the
200 `ptrace' data type.
201 (mips_cannot_store_register): Likewise.
202
e4439e43
MR
2032018-05-21 Maciej W. Rozycki <macro@mips.com>
204
205 * linux-mips-low.c (mips_fetch_register): New function. Update
206 preceding comment.
207 (mips_store_gregset): Supply 0 rather than $restart for $zero.
208 (the_low_target): Wire `mips_fetch_register'.
209
55271bf9
JB
2102018-05-10 Joel Brobecker <brobecker@adacore.com>
211
212 * lynx-i386-low.c (LYNXOS_178): New macro.
213 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
214 the layout on LynxOS-178.
215 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
216 handle floating point registers that are not supported by
217 LynxOS-178.
218
1a34f210
TT
2192018-05-10 Tom Tromey <tom@tromey.com>
220
221 * configure: Rebuild.
222
190852c8
JB
2232018-05-10 Joel Brobecker <brobecker@adacore.com>
224
225 PR server/23158:
226 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
227 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
228 Use it to set the expedite_regs field in the given tdesc.
229 * x86-tdesc.h: New file.
230 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
231 Adjust following the addition of the new expedite_regs parameter
232 to init_target_desc.
233 * linux-tic6x-low.c (tic6x_read_description): Likewise.
234 * linux-x86-tdesc.c: #include "x86-tdesc.h".
235 (i386_linux_read_description, amd64_linux_read_description):
236 Adjust following the addition of the new expedite_regs parameter
237 to init_target_desc.
238 * lynx-i386-low.c: #include "x86-tdesc.h".
239 (lynx_i386_arch_setup): Adjust following the addition of the new
240 expedite_regs parameter to init_target_desc.
241 * nto-x86-low.c: #include "x86-tdesc.h".
242 (nto_x86_arch_setup): Adjust following the addition of the new
243 expedite_regs parameter to init_target_desc.
244 * win32-i386-low.c: #include "x86-tdesc.h".
245 (i386_arch_setup): Adjust following the addition of the new
246 expedite_regs parameter to init_target_desc.
247
7dbac825
JB
2482018-05-10 Joel Brobecker <brobecker@adacore.com>
249
250 PR server/23158:
251 * win32-low.c (win32_create_inferior): Add call to my_wait
252 setting last_status global.
253
906994d9
JB
2542018-05-10 Joel Brobecker <brobecker@adacore.com>
255
256 PR server/23158:
257 * win32-low.c (create_process): Only call gdb_tilde_expand if
258 inferior_cwd is not NULL.
259
8ee22052
AB
2602018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
261
262 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
263 registers to the cache if their values have changed.
264 (i387_xsave_to_cache): Provide default values for x87 control
265 registers when these features are available, but disabled.
266 * regcache.c (supply_register_by_name_zeroed): New function.
267 * regcache.h (supply_register_by_name_zeroed): Declare new
268 function.
269
aff689d3
TT
2702018-05-07 Tom Tromey <tom@tromey.com>
271
272 * configure: Rebuild.
273
85e26832
TT
2742018-05-04 Tom Tromey <tom@tromey.com>
275
276 * configure: Rebuild.
277
a3b60e45
JK
2782018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
279 Pedro Alves <palves@redhat.com>
280
281 * linux-aarch64-low.c (aarch64_stopped_data_address):
282 Likewise.
283
632e107b
TT
2842018-04-27 Tom Tromey <tom@tromey.com>
285
286 * configure: Rebuild.
287
458412c3
TT
2882018-04-23 Tom Tromey <tom@tromey.com>
289
290 * configure: Rebuild.
291
f31c089e
SM
2922018-04-19 Simon Marchi <simon.marchi@ericsson.com>
293
294 * Makefile.in (depcomp): Add "..".
295 (all_deps_files): New and use it.
296
b319b098
AH
2972018-04-18 Alan Hayward <alan.hayward@arm.com>
298
299 * configure.srv (aarch64*-*-linux*): Don't include xml.
300 (i[34567]86-*-cygwin*): Likewise.
301 (i[34567]86-*-linux*): Likewise.
302 (i[34567]86-*-lynxos*): Likewise.
303 (i[34567]86-*-mingw32ce*): Likewise.
304 (i[34567]86-*-mingw*): Likewise.
305 (i[34567]86-*-nto*): Likewise.
306 (tic6x-*-uclinux): Likewise.
307 (x86_64-*-linux*): Likewise.
308 (x86_64-*-mingw*): Likewise.
309 (x86_64-*-cygwin*): Likewise.
310
3b74854b
AH
3112018-04-18 Alan Hayward <alan.hayward@arm.com>
312
313 * tdesc.c: Remove xml parameter.
314
e98577a9
AH
3152018-04-18 Alan Hayward <alan.hayward@arm.com>
316
317 * server.c (get_features_xml): Remove cast.
318 * tdesc.c (void target_desc::accept): Fill in function.
319 (tdesc_get_features_xml): Remove old xml creation.
320 (print_xml_feature::visit_pre): Add xml vistor.
321 * tdesc.h (struct target_desc): Make xmltarget mutable.
322 (tdesc_get_features_xml): Remove declaration.
323
d278f585
AH
3242018-04-18 Alan Hayward <alan.hayward@arm.com>
325
326 * tdesc.c (tdesc_architecture_name): Add new function.
327 (tdesc_osabi_name): Likewise.
328 (tdesc_get_features_xml): Use new functions.
329
eee8a18d
AH
3302018-04-18 Alan Hayward <alan.hayward@arm.com>
331
332 * tdesc.c (tdesc_create_flags): Remove.
333 (tdesc_add_flag): Likewise.
334 (tdesc_named_type): Likewise.
335 (tdesc_create_union): Likewise.
336 (tdesc_create_struct): Likewise.
337 (tdesc_create_vector): Likewise.
338 (tdesc_add_bitfield): Likewise.
339 (tdesc_add_field): Likewise.
340 (tdesc_set_struct_size): Likewise.
341
82ec9bc7
AH
3422018-04-18 Alan Hayward <alan.hayward@arm.com>
343
344 * tdesc.c (~target_desc): Remove implictly deleted items.
345 (init_target_desc): Iterate all features.
346 (tdesc_get_features_xml): Use vector.
347 (tdesc_create_feature): Create feature.
348 * tdesc.h (tdesc_feature) Remove
349 (target_desc): Add features.
350
ea3e7d71
AH
3512018-04-18 Alan Hayward <alan.hayward@arm.com>
352
353 * Makefile.in: Add common/tdesc.c
354 * tdesc.c (init_target_desc): init all reg_defs from register
355 vector.
356 (tdesc_create_reg): Create tdesc_reg.
357 * tdesc.h (tdesc_feature): Add register vector.
358
17d08cd4
SM
3592018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
360
361 * tdesc.h (struct target_desc) <features>: Change type to
362 std::vector<std::string>.
363 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
364 changes.
365 (tdesc_get_features_xml): Likewise.
366 (tdesc_create_feature): Likewise.
367
5cd3e386
AH
3682018-03-26 Alan Hayward <alan.hayward@arm.com>
369
370 * regcache.c (find_register_by_number): Return a ref.
371 (find_regno): Use references.
372 (register_size): Likewise.
373 (register_data): Likewise.
374 * tdesc.c (target_desc::~target_desc): Remove free calls.
375 (target_desc::operator==): Use std::vector compare.
376 (init_target_desc): Use reference.
377 (tdesc_create_reg): Use reg constructors.
378 * tdesc.h (struct target_desc): Replace pointer with object.
379
dff7492c
AH
3802018-03-23 Alan Hayward <alan.hayward@arm.com>
381
382 * regcache.c (find_register_by_number): Make static.
383 (find_regno): Use find_register_by_number
384 * regcache.h (struct reg): Remove declaration.
385
d80e5242
AH
3862018-03-23 Alan Hayward <alan.hayward@arm.com>
387
388 * tdesc.c (target_desc::~target_desc): Move to here.
389 (target_desc::operator==): Likewise.
390 * tdesc.h (target_desc::~target_desc): Move from here.
391 (target_desc::operator==): Likewise.
392
f69c5afb
AA
3932018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
394
395 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
396
ce29f843
AA
3972018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
398
399 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
400 S390_TDESC_GS.
401 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
402 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
403 and init_registers_s390_gs_linux64.
404
c49bd90b
AA
4052018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
406
407 * linux-s390-low.c (s390_fill_gs): Remove function.
408 (s390_fill_gsbc): Remove function.
409 (s390_regsets): Set fill functions for the guarded storage regsets
410 to NULL.
411
7edb9bd3
AA
4122018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
413
414 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
415 the word size. Add comment.
416 (s390_get_wordsize): New function.
417 (s390_arch_setup): No longer select a temporary tdesc to fetch the
418 pswm with it. Instead, use s390_get_wordsize to determine the
419 word size first and derive the correct tdesc from that directly.
420
39be3c7e
SM
4212018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
422
423 * Makefile.in: Include silent-rules.mk.
424 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
425 (COMPILE): Add ECHO_CXX.
426 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
427 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
428 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
429 (version-generated.c): Add ECHO_GEN.
430 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
431 (IPAGENT_COMPILE): Add ECHO_CXX.
432 (%-generated.c): Add ECHO_REGDAT.
433
3ae9ce5d
TT
4342018-03-14 Tom Tromey <tom@tromey.com>
435
436 PR cli/14977:
437 * ax.c (ax_printf): Special case for NULL.
438
e6a58aa8
SM
4392018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
440
441 * linux-low.c (linux_qxfer_libraries_svr4): Use
442 xml_escape_text_append.
443
f6e8a41e
SM
4442018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
445
446 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
447
b9671caf
SM
4482018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
449
450 * server.c (handle_general_set): Remove unnecessary xstrdup.
451
e80aaf61
SM
4522018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * server.c (parse_debug_format_options): Adjust to
455 delim_string_to_char_ptr_vec changes.
456 * thread-db.c (thread_db_load_search): Adjust to
457 dirnames_to_char_ptr_vec changes.
458
b1223e78
MM
4592018-03-01 Markus Metzger <markus.t.metzger@intel.com>
460
461 * target.h (target_enable_btrace, target_disable_btrace)
462 (target_read_btrace, target_read_btrace_conf): Turn macro into
463 inline function. Throw error if target method is not defined.
464 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
465 check for btrace target method. Be prepared to handle exceptions
466 from btrace target methods.
467
81561546
SDJ
4682018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
469
470 * server.c (captured_main): Change order of error message printed
471 when the current working directory cannot be found.
472
25e3c82c
SDJ
4732018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * server.c: Include "filenames.h" and "pathstuff.h".
476 (program_name): Delete variable.
477 (program_path): New anonymous class.
478 (get_exec_wrapper): Use "program_path" instead of
479 "program_name".
480 (handle_v_run): Likewise.
481 (captured_main): Likewise.
482 (process_serial_event): Likewise.
483
b4987c95
SDJ
4842018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
485
486 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
487 (OBJS): Add "pathstuff.o".
488 * server.c (current_directory): New global variable.
489 (captured_main): Initialize "current_directory".
490
f46cd62a
AH
4912018-02-26 Alan Hayward <alan.hayward@arm.com>
492
493 * tdesc.c: Use common/tdesc.h.
494 * tdesc.h: Likewise.
495
a543c5ca
AH
4962018-02-20 Alan Hayward <alan.hayward@arm.com>
497 Simon Marchi <simon.marchi@ericsson.com>
498
499 * Makefile.in: Switch order of make rules.
500
b5884fa7
AH
5012018-02-19 Alan Hayward <alan.hayward@arm.com>
502
503 * Makefile.in: Add common directory in build.
504 * configure.ac: Add common reference.
505 * configure: Regenerate.
506
de6242d3
MM
5072018-02-09 Markus Metzger <markus.t.metzger@intel.com>
508
509 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
510 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
511 * spu-low.c (spu_target_ops): Likewise.
512 * win32-low.c (win32_target_ops): Likewise.
513 * server.c (supported_btrace_packets): Report packets unconditionally.
514 * target.h (target_ops) <supports_btrace>: Remove.
515 (target_supports_btrace): Remove.
516
9ee23a85
MM
5172018-02-09 Markus Metzger <markus.t.metzger@intel.com>
518
519 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
520 (handle_btrace_disable): Change return type to void. Use exceptions
521 to report errors.
522 (handle_btrace_general_set): Catch exception and copy message to
523 return message.
524
8ce47547
TT
5252018-02-08 Tom Tromey <tom@tromey.com>
526
527 * linux-low.c (install_software_single_step_breakpoints): Use
528 make_scoped_restore.
529 * inferiors.c (make_cleanup_restore_current_thread): Remove.
530 (do_restore_current_thread_cleanup): Remove.
531 * gdbthread.h (make_cleanup_restore_current_thread): Don't
532 declare.
533
45dd3607
TT
5342018-02-08 Tom Tromey <tom@tromey.com>
535
536 * mem-break.c (set_raw_breakpoint_at): Use
537 gdb::unique_xmalloc_ptr.
538
e671cd59
PA
5392018-01-30 Pedro Alves <palves@redhat.com>
540
541 PR gdb/13211
542 * target.c (target_terminal::terminal_state): Rename to ...
543 (target_terminal::m_terminal_state): ... this.
544
a0aad537
JC
5452018-01-19 James Clarke <jrtc27@jrtc27.com>
546
547 * linux-low.c (handle_extended_wait): Surround call to
548 thread_db_notice_clone with #ifdef USE_THREAD_DB.
549
4d9b86e1
SM
5502018-01-17 Simon Marchi <simon.marchi@ericsson.com>
551
552 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
553 linux_ptrace_attach_fail_reason_string now returning an
554 std::string.
555 (linux_attach): Likewise.
556 * thread-db.c (attach_thread): Likewise.
557
f517c180
EA
5582018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
559
560 PR gdb/21559
561 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
562 checking for fs_base/gs_base fields in struct user_regs_struct.
563 * configure: Regenerate.
564
9a70f35c
YQ
5652018-01-16 Yao Qi <yao.qi@linaro.org>
566
567 PR gdb/18749
568 * linux-low.c (fetch_register): Call supply_register instead of
569 error.
570
605fd3c6
YQ
5712018-01-08 Yao Qi <yao.qi@linaro.org>
572 Simon Marchi <simon.marchi@ericsson.com>
573
574 * Makefile.in (OBS): Remove selftest.o.
575 * configure.ac: Set srv_selftest_objs if $development is true.
576 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
577 * configure: Re-generated.
578 * server.c (captured_main): Wrap variable selftest_filter with
579 GDB_SELF_TEST.
580
2cc05030
SM
5812018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * server.c (parse_debug_format_options): Return std::string.
584 (handle_monitor_command, captured_main): Adjust.
585
e379cee6
PA
5862018-01-05 Pedro Alves <palves@redhat.com>
587
588 PR gdb/18653
589 * server.c (captured_main): Pass quiet=false to
590 save_original_signals_state.
591
82e1e79a
JB
5922018-01-01 Joel Brobecker <brobecker@adacore.com>
593
594 * gdbreplay.c (gdbreplay_version): Update copyright year in
595 version message.
596 * server.c (gdbserver_version): Likewise.
597
8e481c3b
TT
5982017-12-08 Tom Tromey <tom@tromey.com>
599
600 * ax.c (ax_printf): Update.
601
a8806230
YQ
6022017-12-07 Yao Qi <yao.qi@linaro.org>
603
604 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
605 aarch64_linux_read_description.
606 * linux-amd64-ipa.c (idx2mask): New array.
607 (get_ipa_tdesc): Move idx2mask out.
608 (initialize_low_tracepoint): Initialize target descriptions.
609 * linux-i386-ipa.c (idx2mask): New array.
610 (get_ipa_tdesc): Move idx2mask out.
611 (initialize_low_tracepoint): Initialize target descriptions.
612
d4a0e8b5
SM
6132017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * tdesc.c (struct tdesc_type): Change return type.
616 (tdesc_add_flag): Change parameter type.
617 (tdesc_add_bitfield): Likewise.
618 (tdesc_add_field): Likewise.
619 (tdesc_set_struct_size): Likewise.
620
798a7429
SM
6212017-12-05 Simon Marchi <simon.marchi@ericsson.com>
622
623 * regcache.c (registers_to_string): Remove unused variable.
624
c0e15c9b
SM
6252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
626
627 * inferiors.c (for_each_inferior_with_data): Remove.
628 * inferiors.h (for_each_inferior_with_data): Remove.
629 * server.c (handle_qxfer_threads_worker): Change parameter type.
630 (handle_qxfer_threads_proper): Use for_each_thread.
631
f0045347
SM
6322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
633
634 * inferiors.c (for_each_inferior): Remove.
635 (clear_inferiors): Use for_each_thread.
636 * inferiors.h (for_each_inferior): Remove.
637 * linux-low.c (linux_wait_for_event_filtered): Use
638 for_each_thread.
639 (linux_stabilize_threads): Likewise.
640 * regcache.c (regcache_release): Likewise.
641 * server.c (gdb_wants_all_threads_stopped): Likewise.
642 (clear_pending_status_callback): Remove.
643 (handle_status): Use for_each_thread.
644 (captured_main): Likewise.
645 * win32-low.c (child_init_thread_list): Likewise.
646 (win32_clear_inferiors): Likewise.
647 (fake_breakpoint_event): Likewise.
648
9521758b
SM
6492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
650
651 * inferiors.h (find_inferior): Remove.
652 * inferiors.c (find_inferior): Remove.
653
8f86d7aa
SM
6542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
655
656 * linux-low.c (resume_status_pending_p): Update comment.
657 (need_step_over_p): Update comment.
658
e2b44075
SM
6592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
660
661 * linux-low.c (proceed_one_lwp): Return void, change parameter
662 type.
663 (unsuspend_and_proceed_one_lwp): Likewise.
664 (proceed_all_lwps): Use for_each_thread.
665 (unstop_all_lwps): Likewise.
666
c80825ff
SM
6672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
668
669 * linux-low.c (linux_resume_one_thread): Return void, take
670 parameter directly.
671 (linux_resume): Use for_each_thread.
672
df3e4dbe
SM
6732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
674
675 * linux-low.c (send_sigstop_callback): Return void, change
676 parameter type. Rename to...
677 (send_sigstop): ... this.
678 (suspend_and_send_sigstop_callback): Return void, change parameter
679 type. Rename to...
680 (suspend_and_send_sigstop): ... this.
681 (stop_all_lwps): Use for_each_thread.
682
5a6b0a41
SM
6832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * linux-low.c (lwp_running): Return bool, remove unused
686 argument.
687 (linux_stabilize_threads): Use find_thread.
688
39a64da5
SM
6892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * linux-low.c (select_singlestep_lwp_callback): Remove.
692 (count_events_callback): Remove.
693 (select_event_lwp_callback): Remove.
694 (select_event_lwp): Use find_thread/for_each_thread.
695
a1385b7b
SM
6962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * linux-low.c (not_stopped_callback): Return bool, take filter
699 argument directly.
700 (linux_wait_for_event_filtered): Use find_thread.
701 (linux_wait_1): Likewise.
702
454296a2
SM
7032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * linux-low.c (same_lwp): Remove.
706 (find_lwp_pid): Use find_thread.
707
6b2a85da
SM
7082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * linux-low.c (delete_lwp_callback): Remove.
711 (linux_mourn): Use for_each_thread.
712
798a38e8
SM
7132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * linux-low.c (linux_detach_lwp_callback): Return void, remove
716 args parameter, don't check for pid.
717 (linux_detach): Use for_each_thread.
718
e4eb0dec
SM
7192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
720
721 * linux-low.c (struct counter): Remove.
722 (second_thread_of_pid_p): Remove.
723 (last_thread_of_process_p): Use find_thread.
724
83e1b6c1
SM
7252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
726
727 * inferiors.c (find_inferior_in_random): Remove.
728 * inferiors.h (find_inferior_in_random): Remove.
729 * linux-low.c (status_pending_p_callback): Return bool, accept
730 parameter ptid directly.
731 (linux_wait_for_event_filtered): Use find_thread_in_random.
732 (linux_wait_1): Likewise.
733
8dc7b443
SM
7342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
735
736 * inferiors.c (find_inferior_id): Remove.
737 (find_thread_ptid): Move implemention from find_inferior_id to
738 here.
739 * inferiors.h (find_inferior_id): Remove.
740 * server.c (handle_status): Use find_thread_ptid.
741 (process_serial_event): Likewise.
742 * thread-db.c (find_one_thread): Likewise.
743 (thread_db_thread_handle): Likewise.
744 * win32-low.c (thread_rec): Likewise.
745 (child_delete_thread): Likewise.
746 (win32_thread_alive): Likewise.
747 (get_child_debug_event): Likewise.
748
da25033c
SM
7492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * linux-mips-low.c (update_watch_registers_callback): Return
752 void, remove pid_p parameter, don't check for pid.
753 (mips_insert_point, mips_remove_point): Use for_each_thread.
754
c91bb56b
SM
7552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
756
757 * lynx.low (lynx_delete_thread_callback): Remove.
758 (lynx_mourn): Use for_each_thread.
759
634a3254
SM
7602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * regcache.c (regcache_invalidate_one): Remove.
763 (regcache_invalidate_pid): use for_each_thread.
764
41272101
TT
7652017-11-26 Tom Tromey <tom@tromey.com>
766
767 * linux-low.c (linux_create_inferior): Update.
768
f5291a6f
UW
7692017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
770
771 * spu-low.c (spu_create_inferior): Fix typo in argument name.
772
6654d750
AH
7732017-11-24 Alan Hayward <alan.hayward@arm.com>
774
775 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
776 * linux-aarch64-low.c (initialize_low_arch): Call init func.
777 * linux-aarch64-tdesc-selftest.c: New file.
778 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
779
7802017-11-24 Alan Hayward <alan.hayward@arm.com>
781
782 * configure.srv: Add new file.
783 * linux-aarch64-low.c (initialize_low_arch): Call init func.
784 * linux-aarch64-tdesc-selftest.c: New file.
785 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
786
49bdb7ee
AH
7872017-11-24 Alan Hayward <alan.hayward@arm.com>
788
789 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
790 * linux-aarch64-low.c (initialize_low_arch): Remove init.
791 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
792
d6d7ce56
AH
7932017-11-24 Alan Hayward <alan.hayward@arm.com>
794
795 * configure.srv: Add new files.
796 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
797 aarch64_linux_read_description.
798 * linux-aarch64-low.c (aarch64_linux_read_description):
799 Merge with aarch64_arch_setup.
800 (aarch64_arch_setup): Call aarch64_linux_read_description.
801 * linux-aarch64-tdesc.c: New file.
802 * linux-aarch64-tdesc.h: New file.
803
506fe5f4
YQ
8042017-11-24 Yao Qi <yao.qi@linaro.org>
805
806 * configure.srv: Set $srv_regobj for tic6x-linux.
807 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
808 (tic6x_read_description): Move some code to tic6x_arch_setup.
809 (tic6x_tdesc_test): New function.
810 (initialize_low_arch): Call selftests::register_test.
811
29f9a567
YQ
8122017-11-22 Yao Qi <yao.qi@linaro.org>
813
814 * remote-utils.c (prepare_resume_reply): Use memcpy.
815
578290ec
SM
8162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
817
818 * linux-low.c (kill_one_lwp_callback): Return void, take
819 argument directly, don't filter on pid.
820 (linux_kill): Use for_each_thread.
821
eca55aec
SM
8222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
823
824 * linux-low.c (need_step_over_p): Return bool, remove dummy
825 argument.
826 (linux_resume, proceed_all_lwps): Use find_thread.
827
25c28b4d
SM
8282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
829
830 * linux-low.c (resume_status_pending_p): Return bool, remove
831 flag_p argument.
832 (linux_resume): Use find_thread.
833
5fdda392
SM
8342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
835
836 * linux-low.c (struct thread_resume_array): Remove.
837 (linux_set_resume_request): Return void, take arguments
838 directly.
839 (linux_resume): Use for_each_thread.
840
fcb056a5
SM
8412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
842
843 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
844 return bool, remove data argument.
845 (linux_stabilize_threads): Use find_thread.
846
139720c5
SM
8472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
848
849 * linux-low.c (unsuspend_one_lwp): Remove.
850 (unsuspend_all_lwps): Use for_each_thread, inline code from
851 unsuspend_one_lwp.
852
6d1e5673
SM
8532017-11-19 Simon Marchi <simon.marchi@ericsson.com>
854
855 * gdbthread.h (find_thread): Add overload with ptid_t filter.
856 * linux-low.c (struct iterate_over_lwps_args): Remove.
857 (iterate_over_lwps_filter): Remove.
858 (iterate_over_lwps): Use find_thread.
859
bbf550d5
SM
8602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
861
862 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
863 (linux_handle_new_gdb_connection): Use for_each_thread, inline
864 code from reset_lwp_ptrace_options_callback.
865
00192f77
SM
8662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
867
868 * linux-arm-low.c (struct update_registers_data): Remove.
869 (update_registers_callback): Return void, take arguments
870 directly, don't check thread's pid.
871 (arm_insert_point, arm_remove_point): Use for_each_thread.
872
2bee2b6c
SM
8732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
874
875 * win32-low.c (continue_one_thread): Return void, take argument
876 directly.
877 (child_continue): Use for_each_thread.
878
0b360f19
SM
8792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
880
881 * win32-i386-low.c (update_debug_registers_callback): Rename
882 to ...
883 (update_debug_registers): ... this, return void, remove pid_p arg.
884 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
885
f27866ba
SM
8862017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
887
888 * inferiors.h (struct process_info): Add constructor, initialize
889 fields..
890 <syscalls_to_catch>: Change type to std::vector<int>.
891 * inferiors.c (add_process): Allocate process_info with new.
892 (remove_process): Free process_info with delete.
893 * linux-low.c (handle_extended_wait): Adjust.
894 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
895 * server.c (handle_general_set): Adjust.
896
e849ea89
PA
8972017-11-16 Pedro Alves <palves@redhat.com>
898
899 * remote-utils.c (remote_close): Block SIGIO signals instead of
900 uninstalling the SIGIO handler.
901
1d0aa65c
AH
9022017-11-16 Alan Hayward <alan.hayward@arm.com>
903
904 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
905
3491a34c
YQ
9062017-11-16 Yao Qi <yao.qi@linaro.org>
907
908 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
909 (tic6x_store_gregset): Likewise.
910 (tic6x_usrregs_info): Move it up.
911
a602f924
AH
9122017-11-15 Alan Hayward <alan.hayward@arm.com>
913
914 * Makefile.in: Update arch rules.
915 * configure.srv: Explicitly mark arch/ files.
916
5616b6c3
AS
9172017-11-13 Andreas Schwab <schwab@suse.de>
918
919 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
920 function.
921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
922
d1928160
PA
9232017-11-06 Pedro Alves <palves@redhat.com>
924
925 * config.in, configure: Regenerate.
926
bac608e7
SM
9272017-10-27 Simon Marchi <simon.marchi@ericsson.com>
928
929 * target.c (struct thread_search): Remove.
930 (thread_search_callback): Remove.
931 (prepare_to_access_memory): Use for_each_thread instead of
932 find_inferior. Inline code from thread_search_callback.
933
eaddb425
SM
9342017-10-27 Simon Marchi <simon.marchi@ericsson.com>
935
936 * server.c (struct visit_actioned_threads_data): Remove.
937 (visit_actioned_threads): Change prototype to take arguments
938 directly.
939 (resume): Use find_thread instead of find_inferior.
940
99078d34
SM
9412017-10-27 Simon Marchi <simon.marchi@ericsson.com>
942
943 * server.c (queue_stop_reply_callback): Change prototype, return
944 void.
945 (find_status_pending_thread_callback): Remove.
946 (handle_status): Replace find_inferior with find_thread and
947 for_each_thread.
948
cc628f3d
AH
9492017-10-25 Alan Hayward <alan.hayward@arm.com>
950
951 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
952 with REGNO.
953 (aarch64_store_gregset): Likewise.
954 (aarch64_fill_fpregset): Likewise.
955 (aarch64_store_fpregset): Likewise.
956
4d3bb80e
SM
9572017-10-21 Simon Marchi <simon.marchi@ericsson.com>
958
959 * gdbthread.h (find_thread, for_each_thread): New functions.
960 * inferiors.c (thread_of_pid): Remove.
961 (find_any_thread_of_pid): Use find_thread.
962 * linux-low.c (num_lwps): Use for_each_thread.
963
7a7cdfa0
YQ
9642017-10-17 Yao Qi <yao.qi@linaro.org>
965
966 * Makefile.in: Remove one rule.
967 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
968
e675d170
YQ
9692017-10-17 Yao Qi <yao.qi@linaro.org>
970
971 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
972 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
973
7eb4e0f9
YQ
9742017-10-17 Yao Qi <yao.qi@linaro.org>
975
976 * configure.srv: Rename arm.o with arch/arm.o.
977
60d6cfc9
YQ
9782017-10-17 Yao Qi <yao.qi@linaro.org>
979
980 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
981 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
982 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
983 (arch-i386.o, arch-amd64.o): Remove rules.
984 (arch/%.o): New rule.
985 Update POSTCOMPILE and COMPILE.pre.
986 * configure.ac: Invoke AC_CONFIG_COMMANDS.
987 * configure: Re-generated.
988 * configure.srv: Replace arch-i386.o with arch/i386.o.
989 Replace arch-amd64.o with arch/amd64.o.
990
5bfda255
YQ
9912017-10-16 Yao Qi <yao.qi@linaro.org>
992
993 * configure: Regenerated.
994
9c80ecd6
SM
9952017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
996
997 * inferiors.h: (struct inferior_list): Remove.
998 (struct inferior_list_entry); Remove.
999 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1000 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1001 get_first_inferior): Remove.
1002 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1003 find_inferior_id, find_inferior_in_random): Change signature.
1004 * inferiors.c (all_threads): Change type to
1005 std::list<thread_info *>.
1006 (get_thread): Remove macro.
1007 (find_inferior, find_inferior_id): Change signature, implement
1008 using find_thread.
1009 (find_inferior_in_random): Change signature, implement using
1010 find_thread_in_random.
1011 (for_each_inferior, for_each_inferior_with_data): Change
1012 signature, implement using for_each_thread.
1013 (add_inferior_to_list, remove_inferior): Remove.
1014 (add_thread, get_first_thread, thread_of_pid,
1015 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1016 (get_first_inferior, one_inferior_p, clear_inferior_list):
1017 Remove.
1018 (clear_inferiors, get_thread_process): Update.
1019 * gdbthread.h: Include <list>.
1020 (struct thread_info) <entry>: Remove field.
1021 <id>: New field.
1022 (all_threads): Change type to std::list<thread_info *>.
1023 (get_first_inferior): Add doc.
1024 (find_thread, for_each_thread, find_thread_in_random): New
1025 functions.
1026 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1027 * linux-arm-low.c (update_registers_callback): Update.
1028 * linux-low.c (second_thread_of_pid_p): Update.
1029 (kill_one_lwp_callback, linux_detach_lwp_callback,
1030 delete_lwp_callback, status_pending_p_callback, same_lwp,
1031 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1032 iterate_over_lwps, not_stopped_callback,
1033 resume_stopped_resumed_lwps, count_events_callback,
1034 select_singlestep_lwp_callback, select_event_lwp_callback,
1035 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1036 suspend_and_send_sigstop_callback, wait_for_sigstop,
1037 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1038 lwp_running, linux_set_resume_request, resume_status_pending_p,
1039 need_step_over_p, start_step_over, linux_resume_one_thread,
1040 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1041 reset_lwp_ptrace_options_callback): Update.
1042 * linux-mips-low.c (update_watch_registers_callback): Update.
1043 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1044 Update.
1045 (free_register_cache_thread_one): Remove.
1046 (regcache_release): Update.
1047 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1048 handle_qxfer_threads_worker): Update.
1049 (handle_query): Update, use list iterator.
1050 (visit_actioned_threads, handle_pending_status,
1051 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1052 clear_pending_status_callback, set_pending_status_callback,
1053 find_status_pending_thread_callback, handle_status,
1054 process_serial_event): Update.
1055 * target.c (thread_search_callback): Update.
1056 * thread-db.c (thread_db_get_tls_address): Update.
1057 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1058 Update.
1059 * win32-i386-low.c (update_debug_registers_callback): Update.
1060 * win32-low.c (delete_thread_info, child_delete_thread,
1061 continue_one_thread, suspend_one_thread,
1062 get_child_debug_event): Adjust.
1063
9179355e
SM
10642017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1065
1066 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1067 * inferiors.h: Include <list>.
1068 (struct process_info) <entry>: Remove field.
1069 <pid>: New field.
1070 (pid_of): Change macro to function.
1071 (ptid_of, lwpid_of): Remove macro.
1072 (all_processes): Change type to std::list<process_info *>.
1073 (ALL_PROCESSES): Remove macro.
1074 (for_each_process, find_process): New function.
1075 * inferiors.c (all_processes): Change type to
1076 std::list<process_info *>.
1077 (find_thread_process): Adjust.
1078 (add_process): Likewise.
1079 (remove_process): Likewise.
1080 (find_process_pid): Likewise.
1081 (get_first_process): Likewise.
1082 (started_inferior_callback): Remove.
1083 (have_started_inferiors_p): Adjust.
1084 (attached_inferior_callback): Remove.
1085 (have_attached_inferiors_p): Adjust.
1086 * linux-low.c (check_zombie_leaders): Likewise.
1087 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1088 (x86_linux_update_xmltarget): Adjust.
1089 * server.c (handle_query): Likewise.
1090 (gdb_reattached_process): Remove.
1091 (handle_status): Adjust.
1092 (kill_inferior_callback): Likewise.
1093 (detach_or_kill_inferior): Remove.
1094 (print_started_pid): Likewise.
1095 (print_attached_pid): Likewise.
1096 (detach_or_kill_for_exit): Update.
1097 (process_serial_event): Likewise.
1098 * linux-arm-low.c (arm_new_fork): Likewise.
1099
c9cb8905
SM
11002017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1101
1102 * dll.h: Include <list>.
1103 (struct dll_info): Add constructor.
1104 <entry>: Remove field.
1105 (all_dlls): Change type to std::list<dll_info>.
1106 * dll.c: Include <algorithm>.
1107 (get_dll): Remove macro.
1108 (all_dlls): Change type to std::list<dll_info *>.
1109 (free_one_dll): Remove.
1110 (match_dll): Likewise.
1111 (loaded_dll): Adjust.
1112 (unloaded_dll): Adjust to all_dlls type change, use
1113 std::find_if. Inline code from match_dll.
1114 (clear_dlls): Adjust to all_dlls type change.
1115 * server.c (emit_dll_description): Remove.
1116 (handle_qxfer_libraries): Adjust to all_dlls type change,
1117 integrate emit_dll_description's functionality.
1118
04ec7890
SM
11192017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1120
1121 * linux-low.h (struct linux_target_ops) <delete_process>: New
1122 field.
1123 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1124 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1125 (struct linux_target_ops): Add delete_process callback.
1126 * linux-arm-low.c (arm_delete_process): New.
1127 (struct linux_target_ops): Add delete_process callback.
1128 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1129 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1130 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1131 * linux-mips-low.c (mips_linux_delete_process): New.
1132 (struct linux_target_ops): Add delete_process callback.
1133 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1134 * linux-s390-low.c (struct linux_target_ops): Likewise.
1135 * linux-sh-low.c (struct linux_target_ops): Likewise.
1136 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1137 * linux-tile-low.c (struct linux_target_ops): Likewise.
1138 * linux-x86-low.c (x86_linux_delete_process): New.
1139 (struct linux_target_ops): Add delete_process callback.
1140 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1141
466eecee
SM
11422017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1143
1144 * linux-aarch64-low.c (the_low_target): Add thread delete
1145 callback.
1146 * linux-arm-low.c (arm_delete_thread): New function.
1147 (the_low_target): Add thread delete callback.
1148 * linux-bfin-low.c (the_low_target): Likewise.
1149 * linux-crisv32-low.c (the_low_target): Likewise.
1150 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1151 set.
1152 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1153 field.
1154 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1155 * linux-mips-low.c (mips_linux_delete_thread): New function.
1156 (the_low_target): Add thread delete callback.
1157 * linux-ppc-low.c (the_low_target): Likewise.
1158 * linux-s390-low.c (the_low_target): Likewise.
1159 * linux-sh-low.c (the_low_target): Likewise.
1160 * linux-tic6x-low.c (the_low_target): Likewise.
1161 * linux-tile-low.c (the_low_target): Likewise.
1162 * linux-x86-low.c (the_low_target): Likewise.
1163 * linux-xtensa-low.c (the_low_target): Likewise.
1164
b79f7801
YZ
11652017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1166
1167 * win32-low.c: Include "common-inferior.h".
1168
bc3b087d
SDJ
11692017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1170
1171 * inferiors.c (set_inferior_cwd): New function.
1172 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1173 (handle_query): Inform that QSetWorkingDir is supported.
1174 * win32-low.c (create_process): Pass the inferior's cwd to
1175 CreateProcess.
1176
d092c5a2
SDJ
11772017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1178
1179 * inferiors.c (current_inferior_cwd): New global variable.
1180 (get_inferior_cwd): New function.
1181 * inferiors.h (struct process_info) <cwd>: New field.
1182
7da0a886
SDJ
11832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1184
1185 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1186 (OBS): Add gdb_tilde_expand.o.
1187
289a6840
SM
11882017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1191 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1192
256642e8
PA
11932017-09-29 Pedro Alves <palves@redhat.com>
1194
1195 * ax.c (gdb_parse_agent_expr): Constify.
1196 * ax.h (gdb_parse_agent_expr): Constify.
1197 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1198 Constify.
1199 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1200 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1201 * remote-utils.h (read_ptid): Constify.
1202 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1203 (process_point_options, process_serial_event): Constify.
1204 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1205 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1206 (cmd_qtbuffer): Constify.
1207
5b9ca4d4
PA
12082017-09-29 Pedro Alves <palves@redhat.com>
1209
1210 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1211 fails.
1212
94c207e0
PA
12132017-09-29 Pedro Alves <palves@redhat.com>
1214
1215 * linux-low.c (handle_extended_wait): Pass parent thread instead
1216 of process to thread_db_notice_clone.
1217 * linux-low.h (thread_db_notice_clone): Replace parent process
1218 parameter with parent thread parameter.
1219 * thread-db.c (find_one_thread): Add comment.
1220 (thread_db_notice_clone): Replace parent process parameter with
1221 parent thread parameter. Temporarily switch to the parent thread.
1222
75352e28
SDJ
12232017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1224
1225 * gdbthread.h: Include "common-gdbthread.h".
1226 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1227 "if" when validating the ptid.
1228 * remote-utils.c: Include "gdbthread.h".
1229 (prepare_resume_reply): Use "switch_to_thread".
1230 * target.c (done_accessing_memory): Likewise.
1231
ad339634
AA
12322017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1233
1234 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1235 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1236 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1237 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1238 s390x-gs-linux64-ipa.o to ipa_obj.
1239 * linux-s390-low.c (HWCAP_S390_GS): New define.
1240 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1241 New functions.
1242 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1243 (s390_arch_setup): Check for guarded-storage support and choose
1244 appropriate tdesc.
1245 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1246 init_registers_s390x_gs_linux64.
1247 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1248 enum value.
1249 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1250 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1251
cc4d742f
SM
12522017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1253
1254 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1255
f6327dcb
KB
12562017-09-21 Kevin Buettner <kevinb@redhat.com>
1257
1258 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1259 (thread_db_thread_handle): Declare.
1260 * linux-low.c (linux_target_ops): Initialize thread_handle.
1261 * server.c (handle_qxfer_threads_worker): Add support for
1262 "handle" attribute.
1263 * target.h (struct target_ops): Add new function pointer,
1264 thread_handle.
1265 (target_thread_handle): Define.
1266 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1267 field in lwp.
1268 (thread_db_thread_handle): New function.
1269
86299109
KB
12702017-09-21 Kevin Buettner <kevinb@redhat.com>
1271
1272 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1273 * linux-low.h (thread_db_notice_clone): Declare.
1274 * thread-db.c (thread_db_notice_clone): New function.
1275
f557a88a
PA
12762017-09-21 Pedro Alves <palves@redhat.com>
1277
1278 * server.c (gdb_read_memory, handle_status, process_serial_event)
1279 (handle_serial_event, handle_target_event): Adjust to
1280 set_desired_thread prototype change.
1281 * target.c (set_desired_thread): Remove 'use_general' parameter
1282 and adjust.
1283 * target.h (set_desired_thread): Remove 'use_general' parameter.
1284
223ffa71
TT
12852017-09-20 Tom Tromey <tom@tromey.com>
1286
1287 * target.c (target_terminal::terminal_state): Define.
1288 (target_terminal::init): Rename from target_terminal_init.
1289 (target_terminal::inferior): Rename from
1290 target_terminal_inferior.
1291 (target_terminal::ours): Rename from target_terminal_ours.
1292 (target_terminal::ours_for_output, target_terminal::info): New.
1293
04fd3ba9
SM
12942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * server.c (accumulate_file_name_length): Remove.
1297 (emit_dll_description): Adjust to std::string change.
1298 (handle_qxfer_libraries): Use std::string to hold document.
1299
5e187554
SM
13002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1303 return type of xml_escape_text.
1304 * server.c (emit_dll_description): Likewise.
1305
1526853e
SM
13062017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1307
1308 * server.c (captured_main): Accept argument for --selftest.
1309 Update run_tests call.
1310 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1311 when registering selftests.
1312
c4dfafab
SDJ
13132017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1314
1315 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1316 instead of "VEC" for "target_desc.reg_defs".
1317 (regcache_cpy): Likewise.
1318 (registers_to_string): Likewise.
1319 (registers_from_string): Likewise.
1320 (find_regno): Likewise.
1321 (supply_regblock): Likewise.
1322 (regcache_raw_read_unsigned): Likewise.
1323 * tdesc.c (init_target_desc): Likewise.
1324 (tdesc_create_reg): Likewise.
1325 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1326 (struct target_desc) <reg_defs>: Convert to "std::vector".
1327 (target_desc): Do not initialize "reg_defs".
1328 (~target_desc): Update code to use "std::vector" instead of "VEC"
1329 for "target_desc.reg_defs".
1330 (operator==): Likewise.
1331
124aceb4
SM
13322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1333
1334 * inferiors.h (thread_to_gdb_id): Remove.
1335 * inferiors.c (thread_to_gdb_id): Remove.
1336 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1337 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1338 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1339 Likewise.
1340 * nto-low.c (nto_fetch_registers, nto_store_registers,
1341 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1342
96cde54f
SM
13432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1344
1345 * inferiors.h (gdb_id_to_thread_id): Remove.
1346 * inferiors.c (gdb_id_to_thread_id): Remove.
1347 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1348 removal. Move pid declaration closer to where it's used.
1349
e8ca139e
SM
13502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * server.c (handle_detach): New function.
1353 (process_serial_event): Move code out, call handle_detach.
1354
f8a4e119
SM
13552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1356
1357 * server.c (require_running): Rename to ...
1358 (require_running_or_return): ... this ...
1359 (require_running_or_break): ... and this.
1360 (handle_query, process_serial_event): Adjust.
1361
0eb0a407
SM
13622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * linux-low.c (linux_set_resume_request): Remove unused
1365 variables.
1366
785922a5
SM
13672017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1368
1369 * server.c (first_thread_of): Remove.
1370 (process_serial_event): Replace usage of first_thread_of with
1371 find_any_thread_of_pid.
1372 * tracepoint.c (same_process_p): Remove.
1373 (gdb_agent_about_to_close): Replace usage of same_process_p with
1374 find_any_thread_of_pid.
1375 * linux-x86-low.c (same_process_callback): Remove.
1376 (x86_arch_setup_process_callback): Replace usage of
1377 same_process_callback with find_any_thread_of_pid.
1378 * thread-db.c (any_thread_of): Remove.
1379 (switch_to_process): Replace usage of any_thread_of with
1380 find_any_thread_of_pid.
1381 * inferiors.c (thread_pid_matches_callback): Remove.
1382 (find_thread_process): Adjust to use find_any_thread_of_pid.
1383
a059f00c
SDJ
13842017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1385
1386 * regcache.c (get_thread_regcache): Guard calls to "memset"
1387 with "!VEC_empty".
1388
cc397f3a
SDJ
13892017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1390
1391 * linux-low.c (handle_extended_wait): Use
1392 "allocate_target_description" instead of "XNEW".
1393 * linux-x86-low.c (initialize_low_arch): Likewise.
1394
22916b07
YQ
13952017-09-05 Yao Qi <yao.qi@linaro.org>
1396
1397 * configure.srv (srv_i386_regobj): Remove.
1398 (srv_amd64_regobj): Remove.
1399 (srv_regobj): Set it to "" for x86 non-linux targets.
1400 * linux-x86-tdesc.c (i386_linux_read_description):
1401 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1402 (init_registers_i386): Remove the declaration.
1403 (tdesc_i386): Remove the declaration.
1404 (lynx_i386_arch_setup): Call i386_create_target_description.
1405 * nto-x86-low.c: Likewise.
1406 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1407 [!__x86_64__]: include arch/i386.h.
1408 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1409
38602d55
YQ
14102017-09-05 Yao Qi <yao.qi@linaro.org>
1411
1412 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1413 i386/amd64-XXX-linux from it.
1414
44b886ff
YQ
14152017-09-05 Yao Qi <yao.qi@linaro.org>
1416
1417 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1418 false.
1419 (ipa_amd64_linux_regobj): Remove.
1420 (ipa_x32_linux_regobj): Remove.
1421
b4570e4b
YQ
14222017-09-05 Yao Qi <yao.qi@linaro.org>
1423
1424 * Makefile.in (arch-amd64.o): New rule.
1425 * configure.srv: Append arch-amd64.o.
1426 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1427 (get_ipa_tdesc): Call amd64_linux_read_description.
1428 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1429 and init_registers_amd64_XXX.
1430 * linux-x86-low.c (x86_linux_read_description): Call
1431 amd64_linux_read_description.
1432 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1433 (initialize_low_arch): Don't call init_registers_x32_XXX and
1434 init_registers_amd64_XXX.
1435 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1436 and tdesc_amd64_XXX.
1437 [__x86_64__] (amd64_tdesc_test): New function.
1438 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1439 and init_registers_amd64_XXX.
1440 * linux-x86-tdesc.c: Include arch/amd64.h.
1441 (xcr0_to_tdesc_idx): New function.
1442 (i386_linux_read_description): New function.
1443 (amd64_get_ipa_tdesc_idx): New function.
1444 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1445 (amd64_get_ipa_tdesc): Declare.
1446
d1f28ea2
YQ
14472017-09-05 Yao Qi <yao.qi@linaro.org>
1448
1449 * configure.srv (srv_i386_linux_xmlfiles): Remove
1450 i386/i386-XXX-linux.xml from it.
1451
25a93583
YQ
14522017-09-05 Yao Qi <yao.qi@linaro.org>
1453
1454 * configure.srv: Set srv_i386_linux_regobj empty if $development
1455 is false.
1456 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1457 initialize_low_tdesc.
1458 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1459 with #if initialize_low_tdesc.
1460 * linux-x86-tdesc-selftest.c: New file.
1461 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1462
5f035c07
YQ
14632017-09-05 Yao Qi <yao.qi@linaro.org>
1464
1465 * Makefile.in (arch-i386.o): New rule.
1466 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1467 (x86_64-*-linux*): Likewise.
1468 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1469 include arch/i386.h.
1470 (i386_linux_read_description): Remove code and call
1471 i386_create_target_description.
1472 * tdesc.c (allocate_target_description): New function.
1473 * tdesc.h (set_tdesc_architecture): Remove declaration.
1474 (set_tdesc_osabi): Likewise.
1475
0abe8a89
YQ
14762017-09-05 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1479 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1480 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1481 .xmltarget.
1482 * server.c (get_features_xml): Call tdesc_get_features_xml.
1483 * tdesc.c (set_tdesc_architecture): New function.
1484 (set_tdesc_osabi): New function.
1485 (tdesc_get_features_xml): New function.
1486 (tdesc_create_feature): Add an argument.
1487 * tdesc.h (struct target_desc) <features>: New field.
1488 <arch, osabi>: New field.
1489 (~target_desc): xfree features, arch, and osabi.
1490 (target_desc::oerator==): Don't compare .xmltarget.
1491 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1492 (set_tdesc_osabi): Likewise.
1493 (tdesc_get_features_xml): Likewise.
1494
0a188386
YQ
14952017-09-05 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-x86-tdesc.c: Include selftest.h.
1498 (i386_tdesc_test): New function.
1499 (initialize_low_tdesc): Call selftests::register_test.
1500 * tdesc.h: Include regdef.h.
1501 (target_desc): Override operator == and !=.
1502
f49ff000
YQ
15032017-09-05 Yao Qi <yao.qi@linaro.org>
1504
1505 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1506 (ipa_obj): Likewise.
1507 * linux-i386-ipa.c: Include common/x86-xstate.h
1508 (get_ipa_tdesc): Call i386_linux_read_description.
1509 (initialize_low_tracepoint): Don't call init_registers_XXX
1510 functions, call initialize_low_tdesc instead.
1511 * linux-x86-low.c (x86_linux_read_description): Call
1512 i386_linux_read_description.
1513 (initialize_low_arch): Don't call init_registers_i386_XXX
1514 functions, call initialize_low_tdesc.
1515 * linux-x86-tdesc.c: New file.
1516 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1517 (i386_get_ipa_tdesc_idx): Declare.
1518 (i386_get_ipa_tdesc): Declare.
1519 (initialize_low_tdesc): Declare.
1520
2b68ef2f
YQ
15212017-09-05 Yao Qi <yao.qi@linaro.org>
1522
1523 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1524 instead of 0.
1525
f7000548
YQ
15262017-09-05 Yao Qi <yao.qi@linaro.org>
1527
1528 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1529 * regcache.c (get_thread_regcache): Use VEC_length.
1530 (init_register_cache): Likewise.
1531 (regcache_cpy): Likewise.
1532 (registers_to_string): Iterate reg_defs via VEC_iterate.
1533 (find_regno): Likewise.
1534 (find_register_by_number): Use VEC_index.
1535 (register_size): Call find_register_by_number.
1536 (register_data): Call find_register_by_number.
1537 (supply_regblock): Use VEC_length.
1538 (regcache_raw_read_unsigned): Likewise.
1539 * tdesc.c (init_target_desc): Iterate reg_defs via
1540 VEC_iterate.
1541 (default_description): Update initializer.
1542 (copy_target_description): Don't update field num_registers.
1543 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1544 <num_registers>: Remove.
1545
50a421ac
SM
15462017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1547
1548 * Makefile.in (.SECONDARY): Define target.
1549
23fdd69e
SM
15502017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * linux-low.c (linux_wait_1): Adjust.
1553 * server.c (queue_stop_reply_callback): Adjust.
1554
0a2dde4a
SDJ
15552017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1556
1557 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1558 QEnvironmentUnset and QEnvironmentReset packets.
1559 (handle_query): Inform remote that QEnvironmentHexEncoded,
1560 QEnvironmentUnset and QEnvironmentReset are supported.
1561
6afd337d
SM
15622017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1563
1564 * inferiors.h (inferior_target_data): Rename to ...
1565 (thread_target_data): ... this.
1566 (inferior_regcache_data): Rename to ...
1567 (thread_regcache_data): ... this.
1568 (set_inferior_regcache_data): Rename to ...
1569 (set_thread_regcache_data): ... this.
1570 * inferiors.c (inferior_target_data): Rename to ...
1571 (thread_target_data): ... this.
1572 (inferior_regcache_data): Rename to ...
1573 (thread_regcache_data): ... this.
1574 (set_inferior_regcache_data): Rename to ...
1575 (set_thread_regcache_data): ... this.
1576 (free_one_thread): Update.
1577 * linux-low.h (get_thread_lwp): Update.
1578 * regcache.c (get_thread_regcache): Update.
1579 (regcache_invalidate_thread): Update.
1580 (free_register_cache_thread): Update.
1581 * win32-i386-low.c (update_debug_registers_callback): Update.
1582 (win32_get_current_dr): Update.
1583 * win32-low.c (thread_rec): Update.
1584 (delete_thread_info): Update.
1585 (continue_one_thread): Update.
1586 (suspend_one_thread): Update.
1587
a160cc46
SM
15882017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * inferiors.c (set_inferior_target_data): Remove.
1591 * inferiors.h (set_inferior_target_data): Remove.
1592
6d580b63
YQ
15932017-08-18 Yao Qi <yao.qi@linaro.org>
1594
1595 * Makefile.in (OBS): Add selftest.o.
1596 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1597 * configure, config.in: Re-generated.
1598 * server.c: Include common/sefltest.h.
1599 (captured_main): Handle option --selftest.
1600
f5a29eb0
YQ
16012017-08-09 Yao Qi <yao.qi@linaro.org>
1602
1603 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1604 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1605 i386-avx-mpx.o and i386-mmx.o.
1606 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1607 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1608 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1609 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1610 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1611 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1612 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1613 i386/amd64-avx-mpx.xml.
1614
57757c2f
YQ
16152017-08-09 Yao Qi <yao.qi@linaro.org>
1616
1617 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1618 and x32-avx-avx512.o.
1619 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1620 i386/x32-avx-avx512.xml.
1621
229d26fc
SM
16222017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1623
1624 * tracepoint.h (enum class fast_tpoint_collect_result): New
1625 enumeration.
1626 (fast_tracepoint_collecting): Change return type to
1627 fast_tpoint_collect_result.
1628 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1629 * linux-low.h: Include tracepoint.h.
1630 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1631 fast_tpoint_collect_result.
1632 * linux-low.c (handle_tracepoints): Adjust.
1633 (linux_fast_tracepoint_collecting): Change return type to
1634 fast_tpoint_collect_result.
1635 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1636 linux_wait_1, stuck_in_jump_pad_callback,
1637 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1638 proceed_one_lwp): Adjust to type change.
1639
2e1e43e1
YQ
16402017-07-10 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1643
adc764e7
YQ
16442017-06-29 Yao Qi <yao.qi@linaro.org>
1645
1646 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1647 Remove.
1648 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1649
a206891a
SM
16502017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1651
1652 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1653
9a6c7d9c
SDJ
16542017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1655
1656 * linux-low.c (linux_create_inferior): Adjust code to access the
1657 environment information via 'gdb_environ' class.
1658 * lynx-low.c (lynx_create_inferior): Likewise.
1659 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1660 (get_environ): Return a pointer to 'our_environ'.
1661 (captured_main): Initialize 'our_environ'.
1662 * server.h (get_environ): Adjust prototype.
1663 * spu-low.c (spu_create_inferior): Adjust code to access the
1664 environment information via 'gdb_environ' class.
1665
ae3e2ccf
SM
16662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1667
1668 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1669 usage of "register" keyword.
1670
3e019bdc
SM
16712017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1672
1673 * configure: Re-generate.
1674
8465943a
SM
16752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1676
1677 * configure: Re-generate.
1678
cf0dd6f0
SM
16792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * Makefile.in (COMPILE.pre): Add "-x c++".
1682
9845682b
SDJ
16832017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1684
1685 * fork-child.c: Conditionally include <signal.h>.
1686
aefd8b33
SDJ
16872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1688
1689 * server.c (handle_general_set): Handle new packet
1690 "QStartupWithShell".
1691 (handle_query): Add "QStartupWithShell" to the list of supported
1692 packets.
1693 (gdbserver_usage): Add help text explaining the
1694 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1695 options.
1696 (captured_main): Recognize and act upon the presence of the new
1697 CLI options.
1698
2090129c
SDJ
16992017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1700 Pedro Alves <palves@redhat.com>
1701
1702 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1703 * configure: Regenerate.
1704 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1705 "fork-inferior.o".
1706 (i[34567]86-*-lynxos*): Likewise.
1707 (spu*-*-*): Likewise.
1708 * fork-child.c: New file.
1709 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1710 and "environ.h".
1711 (linux_ptrace_fun): New function.
1712 (linux_create_inferior): Adjust function prototype to reflect
1713 change on "target.h". Adjust function code to use
1714 "fork_inferior".
1715 (linux_request_interrupt): Delete "signal_pid".
1716 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1717 (lynx_ptrace_fun): New function.
1718 (lynx_create_inferior): Adjust function prototype to reflect
1719 change on "target.h". Adjust function code to use
1720 "fork_inferior".
1721 * nto-low.c (nto_create_inferior): Adjust function prototype and
1722 code to reflect change on "target.h". Update comments.
1723 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1724 "common-terminal.h" and "environ.h".
1725 (terminal_fd): Moved to fork-child.c.
1726 (old_foreground_pgrp): Likewise.
1727 (restore_old_foreground_pgrp): Likewise.
1728 (last_status): Make it global.
1729 (last_ptid): Likewise.
1730 (our_environ): New variable.
1731 (startup_with_shell): Likewise.
1732 (program_name): Likewise.
1733 (program_argv): Rename to...
1734 (program_args): ...this.
1735 (wrapper_argv): New variable.
1736 (start_inferior): Delete function.
1737 (get_exec_wrapper): New function.
1738 (get_exec_file): Likewise.
1739 (get_environ): Likewise.
1740 (prefork_hook): Likewise.
1741 (post_fork_inferior): Likewise.
1742 (postfork_hook): Likewise.
1743 (postfork_child_hook): Likewise.
1744 (handle_v_run): Update code to deal with arguments coming from the
1745 remote host. Update calls from "start_inferior" to
1746 "create_inferior".
1747 (captured_main): Likewise. Initialize environment variable. Call
1748 "have_job_control".
1749 * server.h (post_fork_inferior): New prototype.
1750 (get_environ): Likewise.
1751 (last_status): Declare.
1752 (last_ptid): Likewise.
1753 (signal_pid): Likewise.
1754 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1755 (spu_ptrace_fun): New function.
1756 (spu_create_inferior): Adjust function prototype to reflect change
1757 on "target.h". Adjust function code to use "fork_inferior".
1758 * target.c (target_terminal_init): New function.
1759 (target_terminal_inferior): Likewise.
1760 (target_terminal_ours): Likewise.
1761 * target.h: Include <vector>.
1762 (struct target_ops) <create_inferior>: Update prototype.
1763 (create_inferior): Update macro.
1764 * utils.c (gdb_flush_out_err): New function.
1765 * win32-low.c (win32_create_inferior): Adjust function prototype
1766 and code to reflect change on "target.h".
1767
043a4934
SDJ
17682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1769
1770 * inferiors.c (switch_to_thread): New function.
1771
15652511
SDJ
17722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1773
1774 * Makefile.in (SFILE): Add "common/job-control.c".
1775 (OBS): Add "job-control.o".
1776
21ea5acd
SDJ
17772017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1778
1779 * Makefile: Remove "@host_makefile_frag@".
1780
e13cb306
PA
17812017-05-05 Pedro Alves <palves@redhat.com>
1782
1783 * configure: Regenerate.
1784
c94fee56
SDJ
17852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1786
1787 * configure: Regenerate.
1788
a0ff9e1a
SM
17892017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1790
1791 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1792 software_single_step change of return type to
1793 std::vector<CORE_ADDR>.
1794 * linux-low.c (install_software_single_step_breakpoints):
1795 Likewise.
1796 * linux-low.h (install_software_single_step_breakpoints):
1797 Likewise.
1798
be628ab8
SDJ
17992017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1800
1801 * remote-utils.c: Include "gdb_termios.h" instead of
1802 "terminal.h".
1803 * terminal.h: Delete file.
1804
7c5ded6a
SDJ
18052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1806
1807 * server.c: Include <vector>.
1808 <program_argv, wrapper_argv>: Convert to std::vector.
1809 (start_inferior): Rewrite function to use C++.
1810 (handle_v_run): Likewise. Update code that calculates the argv
1811 based on the vRun packet; use C++.
1812 (captured_main): Likewise.
1813
436252de
SM
18142017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1815
1816 * server.c (handle_v_cont): Initialize thread_resume::thread
1817 with null_ptid.
1818
9bf2a700
PA
18192017-04-05 Pedro Alves <palves@redhat.com>
1820
1821 * configure: Regenerate.
1822
a121b7c1
PA
18232017-04-05 Pedro Alves <palves@redhat.com>
1824
1825 * gdbreplay.c (sync_error): Constify.
1826 * linux-x86-low.c (push_opcode): Constify.
1827
21c8a587
PA
18282017-04-05 Pedro Alves <palves@redhat.com>
1829
1830 * win32-low.c (get_child_debug_event)
1831 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1832 Report TARGET_WAITKIND_SPURIOUS instead.
1833
fb32b4f7
PA
18342017-04-05 Pedro Alves <palves@redhat.com>
1835
1836 * remote-utils.c (remote_prepare, remote_open): Constify.
1837 * remote-utils.h (remote_prepare, remote_open): Constify.
1838 * server.c (captured_main): Constify 'port' handling.
1839
65dd1e59
SM
18402017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1841
1842 * Makefile.in (clean): Clear .deps.
1843
8fa5b777
SM
18442017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * .gitignore: Remove generated files, replace with wildcard.
1847 * (clean): Replace removal of generated files with wildcard.
1848 (version.c): Replace with...
1849 (version-generated.c): ...this.
1850 (xml-builtin.c): Replace with...
1851 (xml-builtin-generated.c): ...this.
1852 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1853 (%.c: *regformats*): Replace with...
1854 (%-generated.c: *regformats*): ...this.
1855
a12e714b
MF
18562017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1857
1858 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1859 (xtensa_fill_gregset): Call collect_register_by_name for
1860 threadptr register.
1861 (xtensa_store_gregset): Call supply_register_by_name for
1862 threadptr register.
1863
1a09b50a
MF
18642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1865
1866 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1867 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1868 (xtensa_store_gregset): Call supply_register for all registers in
1869 a0_regnum..a0_regnum + C0_NREGS range.
1870
1a01e7c6
SM
18712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1872
1873 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1874 (ax-ipa.o: ax.c): Remove.
1875 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1876 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1877 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1878 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1879 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1880
36bc18a8
SM
18812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1882
1883 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1884 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1885 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1886 (errors-ipa.o: ../common/errors.c): Remove.
1887 (format-ipa.o: ../common/format.c): Remove.
1888 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1889
a8ebe3d5
SM
18902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * Makefile.in (%-ipa.o: %.c): New rule.
1893 (tracepoint-ipa.o: tracepoint.c): Remove.
1894 (utils-ipa.o: utils.c): Remove.
1895 (remote-utils-ipa.o: remote-utils.c): Remove.
1896 (regcache-ipa.o: regcache.c): Remove.
1897 (i386-linux-ipa.o: i386-linux.c): Remove.
1898 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1899 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1900 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1901 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1902 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1903 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1904 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1905 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1906 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1907 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1908 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1909 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1910 (aarch64-ipa.o: aarch64.c): Remove.
1911 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1912 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1913 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1914 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1915 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1916 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1917 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1918 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1919 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1920 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1921 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1922 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1923 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1924 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1925 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1926 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1927 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1928 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1929 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1930 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1931 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1932 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1933 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1934 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1935 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1936 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1937 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1938 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1939 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1940 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1941 (tdesc-ipa.o: tdesc.c): Remove.
1942 (x32-linux-ipa.o: x32-linux.c): Remove.
1943 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1944 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1945
50cfacb7
SM
19462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1947
1948 * Makefile.in (%.o: ../arch/%.c): New rule.
1949 (arm.o: ../arch/arm.c): Remove.
1950 (arm-linux.o: ../arch/arm-linux.c): Remove.
1951 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1952 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1953
c5a22423
SM
19542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1955
1956 * Makefile.in (%.o: ../nat/%.c): New rule.
1957 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1958 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1959 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1960 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1961 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1962 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1963 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1964 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1965 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1966 (linux-personality.o: ../nat/linux-personality.c): Remove.
1967 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1968 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1969 (x86-linux.o: ../nat/x86-linux.c): Remove.
1970 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1971 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1972
6bda016b
SM
19732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * Makefile.in (%.o: ../common/%.c): New rule.
1976 (signals.o: ../common/signals.c): Remove.
1977 (print-utils.o: ../common/print-utils.c): Remove.
1978 (rsp-low.o: ../common/rsp-low.c): Remove.
1979 (common-utils.o: ../common/common-utils.c): Remove.
1980 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1981 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1982 (vec.o: ../common/vec.c): Remove.
1983 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1984 (xml-utils.o: ../common/xml-utils.c): Remove.
1985 (ptid.o: ../common/ptid.c): Remove.
1986 (buffer.o: ../common/buffer.c): Remove.
1987 (format.o: ../common/format.c): Remove.
1988 (filestuff.o: ../common/filestuff.c): Remove.
1989 (agent.o: ../common/agent.c): Remove.
1990 (errors.o: ../common/errors.c): Remove.
1991 (environ.o: ../common/environ.c): Remove.
1992 (common-debug.o: ../common/common-debug.c): Remove.
1993 (cleanups.o: ../common/cleanups.c): Remove.
1994 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1995 (fileio.o: ../common/fileio.c): Remove.
1996 (common-regcache.o: ../common/common-regcache.c): Remove.
1997 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1998 (new-op.o: ../common/new-op.c): Remove.
1999 (btrace-common.o: ../common/btrace-common.c): Remove.
2000
21122961
SM
20012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2002
2003 * Makefile.in (%.o: ../target/%.c): New rule.
2004 (waitstatus.o: ../target/waitstatus.c): Remove.
2005
c362e621
SM
20062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2007
2008 * Makefile.in
2009 (%.c: ../regformats/%.dat,
2010 (%.c: ../regformats/arm/%.dat,
2011 (%.c: ../regformats/i386/%.dat,
2012 (%.c: ../regformats/rs6000/%.dat): New rules.
2013 (aarch64.c): Remove.
2014 (reg-arm.c): Remove.
2015 (arm-with-iwmmxt.c): Remove.
2016 (arm-with-vfpv2.c): Remove.
2017 (arm-with-vfpv3.c): Remove.
2018 (arm-with-neon.c): Remove.
2019 (reg-bfin.c): Remove.
2020 (reg-cris.c): Remove.
2021 (reg-crisv32.c): Remove.
2022 (i386.c): Remove.
2023 (i386-linux.c): Remove.
2024 (i386-avx.c): Remove.
2025 (i386-avx-linux.c): Remove.
2026 (i386-avx-avx512.c): Remove.
2027 (i386-avx-avx512-linux.c): Remove.
2028 (i386-mpx.c): Remove.
2029 (i386-mpx-linux.c): Remove.
2030 (i386-avx-mpx-avx512-pku.c): Remove.
2031 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2032 (i386-avx-mpx.c): Remove.
2033 (i386-avx-mpx-linux.c): Remove.
2034 (i386-mmx.c): Remove.
2035 (i386-mmx-linux.c): Remove.
2036 (reg-ia64.c): Remove.
2037 (reg-m32r.c): Remove.
2038 (reg-m68k.c): Remove.
2039 (reg-cf.c): Remove.
2040 (mips-linux.c): Remove.
2041 (mips-dsp-linux.c): Remove.
2042 (mips64-linux.c): Remove.
2043 (mips64-dsp-linux.c): Remove.
2044 (nios2-linux.c): Remove.
2045 (powerpc-32.c): Remove.
2046 (powerpc-32l.c): Remove.
2047 (powerpc-altivec32l.c): Remove.
2048 (powerpc-cell32l.c): Remove.
2049 (powerpc-vsx32l.c): Remove.
2050 (powerpc-isa205-32l.c): Remove.
2051 (powerpc-isa205-altivec32l.c): Remove.
2052 (powerpc-isa205-vsx32l.c): Remove.
2053 (powerpc-e500l.c): Remove.
2054 (powerpc-64l.c): Remove.
2055 (powerpc-altivec64l.c): Remove.
2056 (powerpc-cell64l.c): Remove.
2057 (powerpc-vsx64l.c): Remove.
2058 (powerpc-isa205-64l.c): Remove.
2059 (powerpc-isa205-altivec64l.c): Remove.
2060 (powerpc-isa205-vsx64l.c): Remove.
2061 (s390-linux32.c): Remove.
2062 (s390-linux32v1.c): Remove.
2063 (s390-linux32v2.c): Remove.
2064 (s390-linux64.c): Remove.
2065 (s390-linux64v1.c): Remove.
2066 (s390-linux64v2.c): Remove.
2067 (s390-te-linux64.c): Remove.
2068 (s390-vx-linux64.c): Remove.
2069 (s390-tevx-linux64.c): Remove.
2070 (s390x-linux64.c): Remove.
2071 (s390x-linux64v1.c): Remove.
2072 (s390x-linux64v2.c): Remove.
2073 (s390x-te-linux64.c): Remove.
2074 (s390x-vx-linux64.c): Remove.
2075 (s390x-tevx-linux64.c): Remove.
2076 (tic6x-c64xp-linux.c): Remove.
2077 (tic6x-c64x-linux.c): Remove.
2078 (tic6x-c62x-linux.c): Remove.
2079 (reg-sh.c): Remove.
2080 (reg-sparc64.c): Remove.
2081 (reg-spu.c): Remove.
2082 (amd64.c): Remove.
2083 (amd64-linux.c): Remove.
2084 (amd64-avx.c): Remove.
2085 (amd64-avx-linux.c): Remove.
2086 (amd64-avx-avx512.c): Remove.
2087 (amd64-avx-avx512-linux.c): Remove.
2088 (amd64-mpx.c): Remove.
2089 (amd64-mpx-linux.c): Remove.
2090 (amd64-avx-mpx-avx512-pku.c): Remove.
2091 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2092 (amd64-avx-mpx.c): Remove.
2093 (amd64-avx-mpx-linux.c): Remove.
2094 (x32.c): Remove.
2095 (x32-linux.c): Remove.
2096 (x32-avx.c): Remove.
2097 (x32-avx-linux.c): Remove.
2098 (x32-avx-avx512.c): Remove.
2099 (x32-avx-avx512-linux.c): Remove.
2100 (reg-xtensa.c): Remove.
2101 (reg-tilegx.c): Remove.
2102 (reg-tilegx32.c): Remove.
2103
1672e0d9
SDJ
21042017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2105
2106 * Makefile.in (SFILES): Add "common/environ.c".
2107 (OBJS): Add "common/environ.h".
2108
239b6d10
WT
21092017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2110
2111 * configure.ac: Check if the fs_base and gs_base members of
2112 `struct user_regs_struct' exist.
2113 * config.in: Regenerated.
2114 * configure: Likewise.
2115
694b382c
AT
21162017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2117
2118 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2119 target_read_memory.
2120 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2121 (get_next_pcs_syscall_next_pc): Likewise.
2122
7dc53023
LM
21232016-12-23 Luis Machado <lgustavo@codesourcery.com>
2124
2125 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2126 * nto-x86-low.c: Likewise.
2127
ad02e4fe
SM
21282016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2129
2130 * Makefile.in: Include disable-implicit-rules.mk.
2131
dcb07cfa
PA
21322016-11-23 Pedro Alves <palves@redhat.com>
2133
2134 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2135 (debug_vprintf): Use std::chrono::steady_clock instead of
2136 gettimeofday. Use '.' instead of ':'.
2137 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2138 (get_timestamp): Use std::chrono::steady_clock instead of
2139 gettimeofday.
2140
8629c02c
SM
21412016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * Makefile.in: Fix whitespace formatting.
2144
b593ecca
SM
21452016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2146
2147 * Makefile.in (SFILES, OBS): Flatten list and order
2148 alphabetically.
2149
9986ba08
PA
21502016-11-23 Pedro Alves <palves@redhat.com>
2151
2152 * event-loop.c (handle_file_event): Use warning.
2153 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2154 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2155 Use warning.
2156
4eefa7bc
PA
21572016-11-23 Pedro Alves <palves@redhat.com>
2158
2159 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2160 output.
2161 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2162 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2163 debug_printf and debug_flush for debug output.
2164 * server.c (handle_general_set): Likewise.
2165 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2166 output.
2167
5443506e
SM
21682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2169
2170 * Makefile.in (.c.o): Replace rule with ...
2171 (%.o: %.c): ... this one.
2172
3b165252
SM
21732016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2174
2175 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2176 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2177 make.
2178 * configure.ac: Remove checks for the make program.
2179 * configure: Re-generate.
2180
0bcda685
PA
21812016-10-28 Pedro Alves <palves@redhat.com>
2182
2183 * Makefile.in (CXX_DIALECT): Get from configure.
2184 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2185 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2186 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2187 * config.in: Regenerate.
2188 * configure: Regenerate.
2189
c3805894
YQ
21902016-10-27 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-low.c (linux_supports_range_stepping): Return true if
2193 can_software_single_step return true.
2194
89342618
YQ
21952016-10-27 Yao Qi <yao.qi@linaro.org>
2196
2197 * inferiors.c (find_inferior_in_random): New function.
2198 * inferiors.h (find_inferior_in_random): Declare.
2199 * linux-low.c (linux_wait_for_event_filtered): Call
2200 find_inferior_in_random instead of find_inferior.
2201
e3652c84
YQ
22022016-10-27 Yao Qi <yao.qi@linaro.org>
2203
2204 * linux-low.c (linux_wait_1): If single-step breakpoints are
2205 inserted, remove them.
2206
5a04c4cf
PA
22072016-10-26 Pedro Alves <palves@redhat.com>
2208
2209 * linux-low.c (handle_extended_wait): Link parent/child fork
2210 threads.
2211 (linux_wait_1): Unlink them.
2212 (linux_set_resume_request): Ignore resume requests for
2213 already-resumed and unhandled fork child threads.
2214 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2215 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2216 New functions.
2217 (handle_v_requests) <vCont>: Don't call require_running.
2218 * server.h (in_queued_stop_replies): New declaration.
2219
cb93dc7f
YQ
22202016-10-24 Yao Qi <yao.qi@linaro.org>
2221
2222 PR server/20733
2223 * linux-aarch64-low.c (append_insns): Cast the return value to
2224 'uint32_t *'.
2225
a1078bea
YQ
22262016-10-10 Yao Qi <yao.qi@linaro.org>
2227
2228 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2229
1fb77080
SDJ
22302016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2231
2232 * target.c (target_supports_multi_process): New function, moved
2233 from...
2234 * target.h (target_supports_multi_process): ... here. Remove
2235 macro.
2236
39b5a3b9
TT
22372016-10-05 Tom Tromey <tom@tromey.com>
2238
2239 PR remote/20655:
2240 * tracepoint.c (handle_tracepoint_bkpts): Check
2241 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2242
c1d0b70a
YQ
22432016-10-05 Yao Qi <yao.qi@linaro.org>
2244
2245 * configure.srv: Update the path of arm-*.xml files.
2246
0a69eedb
YQ
22472016-10-05 Terry Guo <terry.guo@arm.com>
2248 Yao Qi <yao.qi@linaro.org>
2249
2250 * Makefile.in: Adjust the path of rules.
2251 * configure.srv: Update the path of xml files.
2252 * regformats/arm-with-iwmmxt.dat: Regenerated.
2253 * regformats/arm-with-neon.dat: Likewise.
2254 * regformats/arm-with-vfpv2.dat: Likewise.
2255 * regformats/arm-with-vfpv3.dat Likewise.
2256
17e16485
YQ
22572016-09-30 Yao Qi <yao.qi@linaro.org>
2258
2259 PR gdbserver/20627
2260 * target.c (target_stop_and_wait): Don't call
2261 target_continue_no_signal, use resume_stop instead.
2262
edeeb602
YQ
22632016-09-26 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (linux_wait_1): Call debug_exit.
2266
503b1c39
PA
22672016-09-23 Pedro Alves <palves@redhat.com>
2268
2269 * Makefile.in (SFILES): Add common/new-op.c.
2270 (OBS): Add common/new-op.o.
2271 (new-op.o): New rule.
2272
74172ecf
SM
22732016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2274
2275 * .gitinore: Ignore more files.
2276
fc6cda2e
YQ
22772016-09-21 Yao Qi <yao.qi@linaro.org>
2278
2279 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2280 23.
2281
bc1e6c81
SDJ
22822016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2283
2284 * server.c (start_inferior): Call target_mourn_inferior instead of
2285 mourn_inferior; pass ptid_t argument to it.
2286 (resume): Likewise.
2287 (handle_target_event): Likewise.
2288 * target.c (target_mourn_inferior): New function.
2289 * target.h (mourn_inferior): Delete macro.
2290
0e00e962
AA
22912016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2292
2293 * linux-low.c (lwp_is_stepping): New function.
2294
1d8cb77d
CL
22952016-09-06 Carl Love <cel@us.ibm.com>
2296
2297 * server.c (start_inferior): Fixed comment, requested comment change
2298 didn't get updated correctly. Removed reference to ptrace () call as
2299 it is only true on Linux systems.
2300
7313bced
CL
23012016-09-06 Carl Love <cel@us.ibm.com>
2302
2303 * server.c (start_inferior): Do not call
2304 function target_post_create_inferior () if the
2305 inferior process has already exited.
2306
cf6de44d
PA
23072016-09-05 Pedro Alves <palves@redhat.com>
2308
2309 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2310 (COMPILE.pre, CC_LD): Use CXX directly.
2311 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2312 * acinclude.m4: Don't include build-with-cxx.m4.
2313 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2314 * configure: Regenerate.
2315
c1da6748
AT
23162016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2317
2318 PR gdb/19495
2319 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2320 call writing data to own_buf.
2321
f2b9e3df
SDJ
23222016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2323
2324 * target.c (mywait): Call target_wait instead of
2325 the_target->wait.
2326 (target_wait): New function.
2327
049a8570
SDJ
23282016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2329
2330 * server.c (start_inferior): New variable 'ptid'. Replace calls
2331 to the_target->resume by target_continue{,_no_signal}, depending
2332 on the case.
2333 * target.c (target_stop_and_wait): Call target_continue_no_signal
2334 instead of the_target->resume.
2335 (target_continue): New function.
2336
3aa5cfa0
AT
23372016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2338
2339 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2340
754653a7
AZ
23412016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2342
2343 PR server/20491
2344 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2345 ps_prochandle.
2346 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2347 * linux-arm-low.c (ps_get_thread_area): Likewise.
2348 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2349 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2350 * linux-mips-low.c (ps_get_thread_area): Likewise.
2351 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2352 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2353 * linux-x86-low.c (ps_get_thread_area): Likewise.
2354 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2355
ed036b40
PA
23562016-08-19 Pedro Alves <palves@redhat.com>
2357
2358 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2359
c8ef42ee
PA
23602016-08-19 Pedro Alves <palves@redhat.com>
2361
2362 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2363 comment. Use memcpy instead of casting through unsigned long.
2364
9c235a72
PA
23652016-08-19 Pedro Alves <palves@redhat.com>
2366
2367 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2368 allocating around 0x80000000.
2369
201506da
PA
23702016-08-19 Pedro Alves <palves@redhat.com>
2371
2372 PR gdb/20415
2373 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2374 (x32-avx512-linux-ipa.o): New rules.
2375 * configure.ac (x86_64-*-linux*): New x32 check.
2376 * configure.srv (ipa_x32_linux_regobj): New.
2377 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2378 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2379 descriptions.
2380 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2381 descriptions.
2382 * configure: Regenerate.
2383
f348d89a
PA
23842016-08-09 Pedro Alves <palves@redhat.com>
2385
2386 PR gdb/18653
2387 * Makefile.in (OBS): Add signals-state-save-restore.o.
2388 (signals-state-save-restore.o): New rule.
2389 * config.in: Regenerate.
2390 * configure: Regenerate.
2391 * linux-low.c: Include "signals-state-save-restore.h".
2392 (linux_create_inferior): Call
2393 restore_original_signals_state.
2394 * server.c: Include "dispositions-save-restore.h".
2395 (captured_main): Call save_original_signals_state.
2396
1baf5149
PA
23972016-08-05 Pedro Alves <palves@redhat.com>
2398
2399 * configure: Regenerate.
2400
fcd4a73d
YQ
24012016-08-04 Yao Qi <yao.qi@linaro.org>
2402
2403 * linux-low.c (regsets_fetch_inferior_registers): Check
2404 errno is ESRCH or not.
2405
979659d0
YQ
24062016-08-02 Yao Qi <yao.qi@linaro.org>
2407
2408 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2409 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2410 (thread_db_load_search): Update.
2411 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2412 td_ta_set_event and td_ta_event_getmsg.
2413
6598661d
PA
24142016-07-26 Pedro Alves <palves@redhat.com>
2415
2416 PR server/20414
2417 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2418 of unsigned long for 64-bit registers and use uint32_t instead of
2419 unsigned int for 32-bit registers.
2420
9cf12d57
PA
24212016-07-26 Pedro Alves <palves@redhat.com>
2422
2423 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2424 to 'ptrace'.
2425
305450ed
TT
24262016-07-21 Tom Tromey <tom@tromey.com>
2427
2428 * configure: Rebuild.
2429
2583da7c
YQ
24302016-07-21 Yao Qi <yao.qi@linaro.org>
2431
2432 * mem-break.c (find_gdb_breakpoint): Cast bp to
2433 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2434
21536b36
YQ
24352016-07-21 Yao Qi <yao.qi@linaro.org>
2436
2437 * server.c (handle_v_requests): Support s and S actions
2438 if target_supports_software_single_step return true.
2439
8901d193
YQ
24402016-07-21 Yao Qi <yao.qi@linaro.org>
2441
2442 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2443 is resume_step, call maybe_hw_step.
2444 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2445 and unstop them.
2446 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2447 breakpoints or not.
2448 (proceed_one_lwp): If resume request is resume_step, install
2449 reinsert breakpoints and call maybe_hw_step.
2450
0e9a339e
YQ
24512016-07-21 Yao Qi <yao.qi@linaro.org>
2452
2453 * linux-low.c (proceed_one_lwp): Declare.
2454 (linux_resume_one_thread): Remove local variable 'step'.
2455 Lift code enqueue signal. Call proceed_one_lwp instead of
2456 linux_resume_one_lwp.
2457
4281b351
YQ
24582016-07-21 Yao Qi <yao.qi@linaro.org>
2459
2460 * linux-low.c (linux_resume_one_thread): Call
2461 enqueue_pending_signal.
2462
984a2c04
YQ
24632016-07-21 Yao Qi <yao.qi@linaro.org>
2464
2465 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2466 * inferiors.c (do_restore_current_thread_cleanup): New function.
2467 (make_cleanup_restore_current_thread): Likewise.
2468 * linux-low.c (install_software_single_step_breakpoints): Call
2469 make_cleanup_restore_current_thread. Switch current_thread to
2470 thread.
2471
bec903c9
YQ
24722016-07-21 Yao Qi <yao.qi@linaro.org>
2473
2474 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2475 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2476 (clone_one_breakpoint): Likewise.
2477 (delete_reinsert_breakpoints): Change parameter to thread.
2478 Callers updated.
2479 (has_reinsert_breakpoints): Likewise.
2480 (uninsert_reinsert_breakpoints): Likewise.
2481 (reinsert_reinsert_breakpoints): Likewise.
2482 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2483 (delete_reinsert_breakpoints): Likewise.
2484 (reinsert_reinsert_breakpoints): Likewise.
2485 (uninsert_reinsert_breakpoints): Likewise.
2486 (has_reinsert_breakpoints): Likewise.
2487
63c40ec7
YQ
24882016-07-21 Yao Qi <yao.qi@linaro.org>
2489
2490 * inferiors.c (get_thread_process): Make parameter const.
2491 * inferiors.h (get_thread_process): Update declaration.
2492 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2493 Add new parameters child_thread and parent_thread. Callers
2494 updated.
2495 * mem-break.h (clone_all_breakpoints): Update declaration.
2496
9aa76cd0
YQ
24972016-07-21 Yao Qi <yao.qi@linaro.org>
2498
2499 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2500 <command_list, handler>: Remove.
2501 (struct gdb_breakpoint): New.
2502 (struct other_breakpoint): New.
2503 (struct reinsert_breakpoint): New.
2504 (is_gdb_breakpoint): New function.
2505 (any_persistent_commands): Update command_list if
2506 is_gdb_breakpoint returns true.
2507 (set_breakpoint): Create breakpoints according to their types.
2508 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2509 (set_gdb_breakpoint_1): Likewise.
2510 (set_gdb_breakpoint): Likewise.
2511 (clear_breakpoint_conditions): Change parameter type to
2512 'struct gdb_breakpoint *'.
2513 (clear_breakpoint_commands): Likewise.
2514 (clear_breakpoint_conditions_and_commands): Likewise.
2515 (add_condition_to_breakpoint): Likewise.
2516 (add_breakpoint_condition): Likewise.
2517 (add_commands_to_breakpoint): Likewise.
2518 (check_breakpoints): Check other_breakpoint.
2519 (clone_one_breakpoint): Clone breakpopint according to its type.
2520 * mem-break.h (struct gdb_breakpoint): Declare.
2521 (set_gdb_breakpoint): Update declaration.
2522 (clear_breakpoint_conditions_and_commands): Likewise.
2523 (add_breakpoint_condition): Likewise.
2524 (add_breakpoint_commands): Likewise.
2525 * server.c (process_point_options): Change parameter type to
2526 'struct gdb_breakpoint *'.
2527
811f8301
YQ
25282016-07-21 Yao Qi <yao.qi@linaro.org>
2529
2530 * mem-break.c (set_breakpoint_at): Rename it to ...
2531 (set_breakpoint_type_at): ... it.
2532 (set_breakpoint_at): Call set_breakpoint_type_at.
2533 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2534 * mem-break.h (set_breakpoint_at): Update comments.
2535
b1c51e36
CLT
25362016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2537
2538 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2539 to buf parameter.
2540 (nios2_store_gregset): Likewise.
2541
ced2dffb
PA
25422016-07-01 Pedro Alves <palves@redhat.com>
2543 Antoine Tremblay <antoine.tremblay@ericsson.com>
2544
2545 * linux-low.c: Change interface to take the target lwp_info
2546 pointer directly and return void. Handle detaching from a zombie
2547 thread.
2548 (linux_detach_lwp_callback): New function.
2549 (linux_detach): Detach from the leader thread after detaching from
2550 the clone threads.
2551
2ac09a5b
YQ
25522016-06-28 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2555 for variable new_offset.
2556 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2557 (aarch64_ftrace_insn_reloc_cb): Likewise.
2558 (aarch64_ftrace_insn_reloc_tb): Likewise.
2559 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2560 PRIx64 instead of PRIx32.
2561
79e7fd4f
YQ
25622016-06-28 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2565 (the_low_target): Install arm_get_syscall_trapinfo.
2566
061fc021
YQ
25672016-06-28 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2570 function.
2571 (the_low_target): Install aarch64_get_syscall_trapinfo.
2572
4cc32bec
YQ
25732016-06-28 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2576 Callers updated.
2577 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2578 Remove parameter sysno.
2579 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2580 sysret.
2581
782c1122
AA
25822016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2583
2584 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2585 (s390_emit_ne_goto): Likewise.
2586 (s390_emit_lt_goto): Likewise.
2587 (s390_emit_le_goto): Likewise.
2588 (s390_emit_gt_goto): Likewise.
2589 (s390_emit_ge_goto): Likewise.
2590 (s390x_emit_eq_goto): Likewise.
2591 (s390x_emit_ne_goto): Likewise.
2592 (s390x_emit_lt_goto): Likewise.
2593 (s390x_emit_le_goto): Likewise.
2594 (s390x_emit_gt_goto): Likewise.
2595 (s390x_emit_ge_goto): Likewise.
2596 (s390_emit_ops_impl): Mark variable static.
2597 (s390x_emit_ops): Likewise.
2598
2e7b624b
YQ
25992016-06-17 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-low.c (handle_extended_wait): Call
2602 uninsert_reinsert_breakpoints for the parent process. Remove
2603 reinsert breakpoints from the child process. Reinsert them to
2604 the parent process when vfork is done.
2605 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2606 (reinsert_reinsert_breakpoints): New function.
2607 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2608 (reinsert_reinsert_breakpoints): Declare.
2609
8a81c5d7
YQ
26102016-06-17 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-low.c (handle_extended_wait): If the parent is doing
2613 step-over, remove the reinsert breakpoints from the forked child.
2614
f50bf8e5
YQ
26152016-06-17 Yao Qi <yao.qi@linaro.org>
2616
2617 * linux-low.c (unsuspend_all_lwps): Declare.
2618 (linux_low_filter_event): If thread exited, call finish_step_over.
2619 If step-over is finished, unsuspend other threads.
2620
8376a3cb
YQ
26212016-06-17 Yao Qi <yao.qi@linaro.org>
2622
2623 * linux-low.c (linux_resume_one_lwp_throw): Assert
2624 has_reinsert_breakpoints returns false.
2625 * mem-break.c (delete_disabled_breakpoints): Assert
2626 bp type isn't reinsert_breakpoint.
2627
f79b145d
YQ
26282016-06-17 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-low.c (maybe_hw_step): New function.
2631 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2632 (finish_step_over): Switch current_thread to lwp temporarily,
2633 and assert has_reinsert_breakpoints returns true.
2634 (proceed_one_lwp): Call maybe_hw_step.
2635 * mem-break.c (has_reinsert_breakpoints): New function.
2636 * mem-break.h (has_reinsert_breakpoints): Declare.
2637
0ae534d2
JT
26382016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2639
2640 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2641
fcdad592
YQ
26422016-05-17 Yao Qi <yao.qi@linaro.org>
2643
2644 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2645 instead of find_inferior.
2646
9e784964
YQ
26472016-05-05 Yao Qi <yao.qi@linaro.org>
2648
2649 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2650 Initialize res to zero.
2651
cf2ebb6e
YQ
26522016-05-05 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2655 to uint32_t.
2656
c1aebf87
UW
26572016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2658
2659 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2660 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2661 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2662
35fd2deb 26632016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2664 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2665
2666 * tracepoint.c (write_inferior_int8): New function.
2667 (cmd_qtenable_disable): Write enable flag using
2668 write_inferior_int8.
2669
484b3c32
YQ
26702016-04-25 Yao Qi <yao.qi@linaro.org>
2671
2672 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2673 (need_step_over_p): Return zero if the LWP has pending signals
2674 can be delivered on software single step target.
2675
85ba7d86
YQ
26762016-04-25 Yao Qi <yao.qi@linaro.org>
2677
2678 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2679 return instead of error.
2680
3539aa13
YQ
26812016-04-22 Yao Qi <yao.qi@linaro.org>
2682
2683 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2684 to 23.
2685
5b061e98
YQ
26862016-04-22 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2689 signal when stepping over breakpoint with software single
2690 step.
2691
3451269c
PA
26922016-04-21 Pedro Alves <palves@redhat.com>
2693
2694 * linux-s390-low.c (s390_collect_ptrace_register)
2695 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2696 add casts.
2697 (s390_check_regset): Use void * instead of gdb_byte *.
2698
a2358508
PA
26992016-04-20 Pedro Alves <palves@redhat.com>
2700
2701 * configure: Renegerate.
2702
6885166d
YQ
27032016-04-20 Yao Qi <yao.qi@linaro.org>
2704
2705 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2706 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2707 number 16.
2708 (arm_store_gregset): Likewise.
2709
2b863f51
WT
27102016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2711
2712 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2713 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2714 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2715 (amd64-avx-mpx-linux.c): New rules.
2716 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2717 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2718 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2719 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2720 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2721 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2722 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2723 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2724 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2725 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2726 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2727 * linux-x86-low.c (x86_linux_read_description): Add case for
2728 X86_XSTATE_AVX_MPX_MASK.
2729 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2730 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2731 init_registers_i386_avx_mpx_linux.
2732 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2733 (initialize_low_tracepoint): Call
2734 init_registers_i386_avx_mpx_linux.
2735 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2736 (initialize_low_tracepoint): Call
2737 init_registers_amd64_avx_mpx_linux.
2738 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2739 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2740 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2741 declarations.
2742
9b30624b
PA
27432016-04-18 Pedro Alves <palves@redhat.com>
2744
2745 * configure: Regenerate.
2746
45e3745e
AT
27472016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2748
2749 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2750 (aarch64_emit_sub): Likewise.
2751
2afc13ff
PA
27522016-04-12 Pedro Alves <palves@redhat.com>
2753
2754 * utils.c (prepare_to_throw_exception): Delete.
2755
6e774b13
SM
27562016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2757
2758 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2759
4dca19f8
MK
27602016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2761
2762 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2763
d0a9981f
MK
27642016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2765
2766 * linux-aarch64-ipa.c: Add <elf.h> include.
2767 * linux-ppc-ipa.c: Add <elf.h> include.
2768 * linux-s390-ipa.c: Add <elf.h> include.
2769
252db07e
MK
27702016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2771
2772 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2773 (get_raw_reg_ptr): Likewise.
2774 (get_trace_state_variable_value_ptr): Likewise.
2775 (set_trace_state_variable_value_ptr): Likewise.
2776 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2777 char *.
2778
14e2b6d9
MK
27792016-03-31 Wei-cheng Wang <cole945@gmail.com>
2780 Marcin Kościelnicki <koriakin@0x04.net>
2781
2782 PR/17221
2783 * linux-ppc-low.c (emit_insns): New function.
2784 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2785 (ppc_emit_prologue): New function.
2786 (ppc_emit_epilogue): New function.
2787 (ppc_emit_add): New function.
2788 (ppc_emit_sub): New function.
2789 (ppc_emit_mul): New function.
2790 (ppc_emit_lsh): New function.
2791 (ppc_emit_rsh_signed): New function.
2792 (ppc_emit_rsh_unsigned): New function.
2793 (ppc_emit_ext): New function.
2794 (ppc_emit_zero_ext): New function.
2795 (ppc_emit_log_not): New function.
2796 (ppc_emit_bit_and): New function.
2797 (ppc_emit_bit_or): New function.
2798 (ppc_emit_bit_xor): New function.
2799 (ppc_emit_bit_not): New function.
2800 (ppc_emit_equal): New function.
2801 (ppc_emit_less_signed): New function.
2802 (ppc_emit_less_unsigned): New function.
2803 (ppc_emit_ref): New function.
2804 (ppc_emit_const): New function.
2805 (ppc_emit_reg): New function.
2806 (ppc_emit_pop): New function.
2807 (ppc_emit_stack_flush): New function.
2808 (ppc_emit_swap): New function.
2809 (ppc_emit_stack_adjust): New function.
2810 (ppc_emit_call): New function.
2811 (ppc_emit_int_call_1): New function.
2812 (ppc_emit_void_call_2): New function.
2813 (ppc_emit_if_goto): New function.
2814 (ppc_emit_goto): New function.
2815 (ppc_emit_eq_goto): New function.
2816 (ppc_emit_ne_goto): New function.
2817 (ppc_emit_lt_goto): New function.
2818 (ppc_emit_le_goto): New function.
2819 (ppc_emit_gt_goto): New function.
2820 (ppc_emit_ge_goto): New function.
2821 (ppc_write_goto_address): New function.
2822 (ppc_emit_ops_impl): New static variable.
2823 (ppc64v1_emit_prologue): New function.
2824 (ppc64v2_emit_prologue): New function.
2825 (ppc64_emit_epilogue): New function.
2826 (ppc64_emit_add): New function.
2827 (ppc64_emit_sub): New function.
2828 (ppc64_emit_mul): New function.
2829 (ppc64_emit_lsh): New function.
2830 (ppc64_emit_rsh_signed): New function.
2831 (ppc64_emit_rsh_unsigned): New function.
2832 (ppc64_emit_ext): New function.
2833 (ppc64_emit_zero_ext): New function.
2834 (ppc64_emit_log_not): New function.
2835 (ppc64_emit_bit_and): New function.
2836 (ppc64_emit_bit_or): New function.
2837 (ppc64_emit_bit_xor): New function.
2838 (ppc64_emit_bit_not): New function.
2839 (ppc64_emit_equal): New function.
2840 (ppc64_emit_less_signed): New function.
2841 (ppc64_emit_less_unsigned): New function.
2842 (ppc64_emit_ref): New function.
2843 (ppc64_emit_const): New function.
2844 (ppc64v1_emit_reg): New function.
2845 (ppc64v2_emit_reg): New function.
2846 (ppc64_emit_pop): New function.
2847 (ppc64_emit_stack_flush): New function.
2848 (ppc64_emit_swap): New function.
2849 (ppc64v1_emit_call): New function.
2850 (ppc64v2_emit_call): New function.
2851 (ppc64v1_emit_int_call_1): New function.
2852 (ppc64v2_emit_int_call_1): New function.
2853 (ppc64v1_emit_void_call_2): New function.
2854 (ppc64v2_emit_void_call_2): New function.
2855 (ppc64_emit_if_goto): New function.
2856 (ppc64_emit_eq_goto): New function.
2857 (ppc64_emit_ne_goto): New function.
2858 (ppc64_emit_lt_goto): New function.
2859 (ppc64_emit_le_goto): New function.
2860 (ppc64_emit_gt_goto): New function.
2861 (ppc64_emit_ge_goto): New function.
2862 (ppc64v1_emit_ops_impl): New static variable.
2863 (ppc64v2_emit_ops_impl): New static variable.
2864 (ppc_emit_ops): New function.
2865 (linux_low_target): Wire in ppc_emit_ops.
2866
a2174ba4
MK
28672016-03-31 Wei-cheng Wang <cole945@gmail.com>
2868 Marcin Kościelnicki <koriakin@0x04.net>
2869
2870 PR/17221
2871 * Makefile.in: Add powerpc-*-ipa.o
2872 * configure.srv: Add ipa_obj for powerpc*-linux.
2873 * linux-ppc-ipa.c: New file.
2874 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2875 includes.
2876 (PPC_FIELD): New macro.
2877 (PPC_SEXT): New macro.
2878 (PPC_OP6): New macro.
2879 (PPC_BO): New macro.
2880 (PPC_LI): New macro.
2881 (PPC_BD): New macro.
2882 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2883 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2884 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2885 (ppc_get_thread_area): New function.
2886 (is_elfv2_inferior): New function.
2887 (gen_ds_form): New function.
2888 (GEN_STD): New macro.
2889 (GEN_STDU): New macro.
2890 (GEN_LD): New macro.
2891 (GEN_LDU): New macro.
2892 (gen_d_form): New function.
2893 (GEN_ADDI): New macro.
2894 (GEN_ADDIS): New macro.
2895 (GEN_LI): New macro.
2896 (GEN_LIS): New macro.
2897 (GEN_ORI): New macro.
2898 (GEN_ORIS): New macro.
2899 (GEN_LWZ): New macro.
2900 (GEN_STW): New macro.
2901 (GEN_STWU): New macro.
2902 (gen_xfx_form): New function.
2903 (GEN_MFSPR): New macro.
2904 (GEN_MTSPR): New macro.
2905 (GEN_MFCR): New macro.
2906 (GEN_MTCR): New macro.
2907 (GEN_SYNC): New macro.
2908 (GEN_LWSYNC): New macro.
2909 (gen_x_form): New function.
2910 (GEN_OR): New macro.
2911 (GEN_MR): New macro.
2912 (GEN_LWARX): New macro.
2913 (GEN_STWCX): New macro.
2914 (GEN_CMPW): New macro.
2915 (gen_md_form): New function.
2916 (GEN_RLDICL): New macro.
2917 (GEN_RLDICR): New macro.
2918 (gen_i_form): New function.
2919 (GEN_B): New macro.
2920 (GEN_BL): New macro.
2921 (gen_b_form): New function.
2922 (GEN_BNE): New macro.
2923 (GEN_LOAD): New macro.
2924 (GEN_STORE): New macro.
2925 (gen_limm): New function.
2926 (gen_atomic_xchg): New function.
2927 (gen_call): New function.
2928 (ppc_relocate_instruction): New function.
2929 (ppc_install_fast_tracepoint_jump_pad): New function.
2930 (ppc_get_min_fast_tracepoint_insn_len): New function.
2931 (ppc_get_ipa_tdesc_idx): New function.
2932 (the_low_target): Wire in the new functions.
2933 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2934 tdescs.
2935 * linux-ppc-tdesc.h: New file.
2936
a13c4696
MK
29372016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2938
2939 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2940 (alloc_jump_pad_buffer): New function.
2941 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2942 (alloc_jump_pad_buffer): New function.
2943 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2944 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2945 (alloc_jump_pad_buffer): New function.
2946 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2947 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2948 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2949 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2950
1cda1512
MK
29512016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2952
2953 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2954 * linux-amd64-ipa.c: Likewise.
2955 * linux-i386-ipa.c: Likewise.
2956 * linux-s390-ipa.c: Likewise.
2957 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2958 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2959 set_trace_state_variable_value_ptr.
2960 (struct ipa_sym_addresses): Likewise.
2961 (symbol_list): Likewise.
2962 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2963 accessing gdb_collect directly.
2964 (gdb_collect_ptr_type): New typedef.
2965 (get_raw_reg_ptr_type): New typedef.
2966 (get_trace_state_variable_value_ptr_type): New typedef.
2967 (set_trace_state_variable_value_ptr_type): New typedef.
2968 (gdb_collect_ptr): New global.
2969 (get_raw_reg_ptr): New global.
2970 (get_trace_state_variable_value_ptr): New global.
2971 (set_trace_state_variable_value_ptr): New global.
2972 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2973 accessing get_raw_reg directly.
2974 (get_get_tsv_func_addr): Likewise for
2975 get_trace_state_variable_value_ptr.
2976 (get_set_tsv_func_addr): Likewise for
2977 set_trace_state_variable_value_ptr.
2978 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2979
72fb5488
SM
29802016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2981
2982 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2983
28170b88
MK
29842016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2985
2986 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2987 packets.
2988 (relocate_instruction): Remove own_buf.
2989 * server.c (own_buf): Make global.
2990 (handle_v_requests): Make global.
2991 * server.h (own_buf): New declaration.
2992 (handle_v_requests): New prototype.
2993
f39e8743
MK
29942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2995
2996 PR 18377
2997 * linux-s390-low.c (add_insns): New function.
2998 (s390_emit_prologue): New function.
2999 (s390_emit_epilogue): New function.
3000 (s390_emit_add): New function.
3001 (s390_emit_sub): New function.
3002 (s390_emit_mul): New function.
3003 (s390_emit_lsh): New function.
3004 (s390_emit_rsh_signed): New function.
3005 (s390_emit_rsh_unsigned): New function.
3006 (s390_emit_ext): New function.
3007 (s390_emit_log_not): New function.
3008 (s390_emit_bit_and): New function.
3009 (s390_emit_bit_or): New function.
3010 (s390_emit_bit_xor): New function.
3011 (s390_emit_bit_not): New function.
3012 (s390_emit_equal): New function.
3013 (s390_emit_less_signed): New function.
3014 (s390_emit_less_unsigned): New function.
3015 (s390_emit_ref): New function.
3016 (s390_emit_if_goto): New function.
3017 (s390_emit_goto): New function.
3018 (s390_write_goto_address): New function.
3019 (s390_emit_litpool): New function.
3020 (s390_emit_const): New function.
3021 (s390_emit_call): New function.
3022 (s390_emit_reg): New function.
3023 (s390_emit_pop): New function.
3024 (s390_emit_stack_flush): New function.
3025 (s390_emit_zero_ext): New function.
3026 (s390_emit_swap): New function.
3027 (s390_emit_stack_adjust): New function.
3028 (s390_emit_set_r2): New function.
3029 (s390_emit_int_call_1): New function.
3030 (s390_emit_void_call_2): New function.
3031 (s390_emit_eq_goto): New function.
3032 (s390_emit_ne_goto): New function.
3033 (s390_emit_lt_goto): New function.
3034 (s390_emit_le_goto): New function.
3035 (s390_emit_gt_goto): New function.
3036 (s390_emit_ge_goto): New function.
3037 (s390x_emit_prologue): New function.
3038 (s390x_emit_epilogue): New function.
3039 (s390x_emit_add): New function.
3040 (s390x_emit_sub): New function.
3041 (s390x_emit_mul): New function.
3042 (s390x_emit_lsh): New function.
3043 (s390x_emit_rsh_signed): New function.
3044 (s390x_emit_rsh_unsigned): New function.
3045 (s390x_emit_ext): New function.
3046 (s390x_emit_log_not): New function.
3047 (s390x_emit_bit_and): New function.
3048 (s390x_emit_bit_or): New function.
3049 (s390x_emit_bit_xor): New function.
3050 (s390x_emit_bit_not): New function.
3051 (s390x_emit_equal): New function.
3052 (s390x_emit_less_signed): New function.
3053 (s390x_emit_less_unsigned): New function.
3054 (s390x_emit_ref): New function.
3055 (s390x_emit_if_goto): New function.
3056 (s390x_emit_const): New function.
3057 (s390x_emit_call): New function.
3058 (s390x_emit_reg): New function.
3059 (s390x_emit_pop): New function.
3060 (s390x_emit_stack_flush): New function.
3061 (s390x_emit_zero_ext): New function.
3062 (s390x_emit_swap): New function.
3063 (s390x_emit_stack_adjust): New function.
3064 (s390x_emit_int_call_1): New function.
3065 (s390x_emit_void_call_2): New function.
3066 (s390x_emit_eq_goto): New function.
3067 (s390x_emit_ne_goto): New function.
3068 (s390x_emit_lt_goto): New function.
3069 (s390x_emit_le_goto): New function.
3070 (s390x_emit_gt_goto): New function.
3071 (s390x_emit_ge_goto): New function.
3072 (s390_emit_ops): New function.
3073 (struct linux_target_ops): Fill in emit_ops hook.
3074
abd9baf9
MK
30752016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3076
3077 PR 18377
3078 * Makefile.in: Add s390 IPA files.
3079 * configure.srv: Build IPA for s390.
3080 * linux-s390-ipa.c: New file.
3081 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3082 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3083 (tdesc_s390_linux32): Likewise.
3084 (init_registers_s390_linux32v1): Likewise.
3085 (tdesc_s390_linux32v1): Likewise.
3086 (init_registers_s390_linux32v2): Likewise.
3087 (tdesc_s390_linux32v2): Likewise.
3088 (init_registers_s390_linux64): Likewise.
3089 (tdesc_s390_linux64): Likewise.
3090 (init_registers_s390_linux64v1): Likewise.
3091 (tdesc_s390_linux64v1): Likewise.
3092 (init_registers_s390_linux64v2): Likewise.
3093 (tdesc_s390_linux64v2): Likewise.
3094 (init_registers_s390_te_linux64): Likewise.
3095 (tdesc_s390_te_linux64): Likewise.
3096 (init_registers_s390_vx_linux64): Likewise.
3097 (tdesc_s390_vx_linux64): Likewise.
3098 (init_registers_s390_tevx_linux64): Likewise.
3099 (tdesc_s390_tevx_linux64): Likewise.
3100 (init_registers_s390x_linux64): Likewise.
3101 (tdesc_s390x_linux64): Likewise.
3102 (init_registers_s390x_linux64v1): Likewise.
3103 (tdesc_s390x_linux64v1): Likewise.
3104 (init_registers_s390x_linux64v2): Likewise.
3105 (tdesc_s390x_linux64v2): Likewise.
3106 (init_registers_s390x_te_linux64): Likewise.
3107 (tdesc_s390x_te_linux64): Likewise.
3108 (init_registers_s390x_vx_linux64): Likewise.
3109 (tdesc_s390x_vx_linux64): Likewise.
3110 (init_registers_s390x_tevx_linux64): Likewise.
3111 (tdesc_s390x_tevx_linux64): Likewise.
3112 (have_hwcap_s390_vx): New static variable.
3113 (s390_arch_setup): Fill have_hwcap_s390_vx.
3114 (s390_get_thread_area): New function.
3115 (s390_ft_entry_gpr_esa): New const.
3116 (s390_ft_entry_gpr_zarch): New const.
3117 (s390_ft_entry_misc): New const.
3118 (s390_ft_entry_fr): New const.
3119 (s390_ft_entry_vr): New const.
3120 (s390_ft_main_31): New const.
3121 (s390_ft_main_64): New const.
3122 (s390_ft_exit_fr): New const.
3123 (s390_ft_exit_vr): New const.
3124 (s390_ft_exit_misc): New const.
3125 (s390_ft_exit_gpr_esa): New const.
3126 (s390_ft_exit_gpr_zarch): New const.
3127 (append_insns): New function.
3128 (s390_relocate_instruction): New function.
3129 (s390_install_fast_tracepoint_jump_pad): New function.
3130 (s390_get_min_fast_tracepoint_insn_len): New function.
3131 (s390_get_ipa_tdesc_idx): New function.
3132 (struct linux_target_ops): Wire in the above functions.
3133 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3134 * linux-s390-tdesc.h: New file.
3135
a4105d04
MK
31362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3137
3138 * linux-s390-low.c (s390_supports_tracepoints): New function.
3139 (struct linux_target_ops): Fill supports_tracepoints hook.
3140
35ac8b3e
YQ
31412016-03-18 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-low.c (lwp_signal_can_be_delivered): New function.
3144 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3145
94610ec4
YQ
31462016-03-18 Yao Qi <yao.qi@linaro.org>
3147
3148 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3149 0 if signal is enqueued. Remove 'signal' from one debugging
3150 message. Move one debugging message to some lines below.
3151 Remove code setting 'signal' to 0.
3152
80aea927
YQ
31532016-03-18 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-low.c (linux_low_filter_event): Remove redundant
3156 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3157
b04fd3be
MK
31582016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3159
3160 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3161 (struct linux_target_ops): Wire in the above.
3162
c40c8d4b
YQ
31632016-03-03 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-low.c: Update comments to start_step_over.
3166
0f8288ae
YQ
31672016-03-03 Yao Qi <yao.qi@linaro.org>
3168
3169 PR server/19736
3170 * linux-low.c (handle_extended_wait): Set child suspended
3171 if event_lwp->bp_reinsert isn't zero.
3172
fdbd04a8
YQ
31732016-03-02 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3176 enqueue_pending_signal.
3177
6896a8fa
MK
31782016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3179
3180 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3181 is actually loaded.
3182
ab503087
MK
31832016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3184
3185 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3186 (s390_regmap_3264) [!__s390x__]: New global.
3187 (s390_collect_ptrace_register): Skip map entries containing -1.
3188 (s390_supply_ptrace_register): Ditto.
3189 (s390_fill_gprs_high): New function.
3190 (s390_store_gprs_high): New function.
3191 (s390_regsets): Add NT_S390_HIGH_GPRS.
3192 (s390_get_hwcap): Enable on 31-bit.
3193 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3194 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3195 Detect NT_S390_HIGH_GPRS.
3196 (s390_usrregs_info_3264): Enable on 31-bit.
3197 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3198 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3199
ae91f625
MK
32002016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3201
3202 PR gdb/13808
3203 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3204 * configure.srv: Ditto.
3205 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3206 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3207 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3208 (init_registers_amd64_linux): Remove prototype.
3209 (tdesc_amd64_linux): Remove declaration.
3210 (get_ipa_tdesc): New function.
3211 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3212 initialize remaining tdescs.
3213 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3214 (init_registers_i386_linux): Remove prototype.
3215 (tdesc_i386_linux): Remove declaration.
3216 (get_ipa_tdesc): New function.
3217 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3218 initialize remaining tdescs.
3219 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3220 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3221 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3222 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3223 (x86_get_ipa_tdesc_idx): New function.
3224 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3225 * linux-x86-tdesc.h: New file.
3226 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3227 (target_get_ipa_tdesc_idx): New macro.
3228 * tracepoint.c (ipa_tdesc_idx): New macro.
3229 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3230 (symbol_list): Add ipa_tdesc_idx.
3231 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3232 (ipa_tdesc): Remove.
3233 (ipa_tdesc_idx): New variable.
3234 (get_context_regcache): Use get_ipa_tdesc.
3235 (gdb_collect): Ditto.
3236 (gdb_probe): Ditto.
3237 * tracepoint.h (get_ipa_tdesc): New prototype.
3238 (ipa_tdesc): Remove.
3239
e7ad2f14
PA
32402016-02-24 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3243 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3244 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3245 Factor out common code between the USE_SIGTRAP_SIGINFO and
3246 !USE_SIGTRAP_SIGINFO blocks.
3247 (linux_low_filter_event): Call save_stop_reason instead of
3248 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3249 Update comments.
3250 (linux_wait_1): Update comments.
3251
657f9cde
WW
32522016-02-24 Wei-cheng Wang <cole945@gmail.com>
3253
3254 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3255 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3256 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3257 ppc_insert_point, ppc_remove_point.
3258
b00b61e1
MK
32592016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3260
3261 * linux-s390-low.c (s390_supports_z_point_type): New function.
3262 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3263
553cb527
YQ
32642016-02-16 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3267 PC. Get pc from regcache_read_pc.
3268
a5652c21
YQ
32692016-02-12 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3272 or linux_get_pc_32bit.
3273 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3274
ed443b61
YQ
32752016-02-12 Yao Qi <yao.qi@linaro.org>
3276
3277 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3278 arm_linux_get_next_pcs_fixup.
3279
020ecd38
MK
32802016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3281
3282 * tracepoint.c (x_tracepoint_action_download): Change
3283 write_inferior_data_ptr to write_inferior_data_pointer.
3284 (cmd_qtstart): Likewise.
3285 (write_inferior_data_ptr): Remove.
3286 (download_agent_expr): Change write_inferior_data_ptr to
3287 write_inferior_data_pointer.
3288 (download_tracepoint_1): Likewise.
3289 (download_tracepoint): Likewise.
3290 (download_trace_state_variables): Likewise.
3291
7cae9051
WW
32922016-02-11 Wei-cheng Wang <cole945@gmail.com>
3293 Marcin Kościelnicki <koriakin@0x04.net>
3294
3295 * tracepoint.c (struct tracepoint_action_ops): Remove.
3296 (struct tracepoint_action): Remove ops.
3297 (m_tracepoint_action_download, r_tracepoint_action_download)
3298 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3299 size and offset accordingly.
3300 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3301 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3302 (tracepoint_action_send, tracepoint_action_download): New functions.
3303 Helpers for trace action handlers.
3304 (add_tracepoint_action): Remove setup actions ops.
3305 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3306
9f6a71b4
YQ
33072016-02-10 Yao Qi <yao.qi@linaro.org>
3308
3309 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3310
1e94266c
SM
33112016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3312
3313 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3314 to AC_OUTPUT.
3315 * configure: Regenerate.
3316
8adce034
SM
33172016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3318
3319 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3320 void * to gdb_byte *.
3321 * linux-low.c (siginfo_fixup): Likewise.
3322 (linux_xfer_siginfo): Likewise.
3323 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3324 Likewise.
3325 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3326
93813b37
WT
33272016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3328
3329 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3330 to srv_tgtobj.
3331 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3332 to srv_tgtobj.
3333 * linux-x86-low.c [__x86_64__]: Include
3334 "nat/amd64-linux-siginfo.h".
3335 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3336 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3337 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3338 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3339 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3340 (cpt_si_fd, si_timerid, si_overrun): Move from
3341 nat/amd64-linux-siginfo.c.
3342 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3343
8424cc97
SM
33442016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3345
3346 * server.c (skip_to_semicolon): Remove.
3347 (process_point_options): Use strchrnul instead of
3348 skip_to_semicolon.
3349
4d18591b
YQ
33502016-01-26 Yao Qi <yao.qi@linaro.org>
3351
3352 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3353 * linux-low.c (install_software_single_step_breakpoints): Don't
3354 call regcache_read_pc.
3355 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3356 argument pc.
3357
d8020970
YQ
33582016-01-26 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-low.c (install_software_single_step_breakpoints): Call
3361 regcache_read_pc instead of get_pc.
3362
8b207339
YQ
33632016-01-26 Yao Qi <yao.qi@linaro.org>
3364
3365 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3366 (unblock_async_io): Rename to ...
3367 (block_unblock_async_io): ... it. New function.
3368 (enable_async_io): Don't install SIGIO handler. Unblock it
3369 instead.
3370 (disable_async_io): Don't ignore SIGIO. Block it instead.
3371 (initialize_async_io): Install SIGIO handler. Don't call
3372 unblock_async_io.
3373
18879fef
YQ
33742016-01-26 Yao Qi <yao.qi@linaro.org>
3375
3376 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3377 first character is '\003', call *the_target->request_interrupt.
3378
a0f8e08a
YQ
33792016-01-25 Yao Qi <yao.qi@linaro.org>
3380
3381 * remote-utils.c (new_thread_notify): Remove.
3382 (dead_thread_notify): Likewise.
3383 * remote-utils.h (new_thread_notify): Remove declaration.
3384 (dead_thread_notify): Likewise.
3385
cc5fd9ab
MK
33862016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3387
3388 * gdb.trace/pending.exp: Fix expected message on continue.
3389
99e8eb11
MK
33902016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3391
3392 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3393 it works properly on big-endian machines where sizeof (CORE_ADDR)
3394 != sizeof (void *).
3395
a994041d
PA
33962016-01-21 Pedro Alves <palves@redhat.com>
3397
3398 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3399 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3400 * configure: Regenerate.
3401
f7a6a40d
YQ
34022016-01-21 Yao Qi <yao.qi@linaro.org>
3403
3404 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3405 is_thumb and set it according to CPSR saved on the stack.
3406 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3407 arm_sigreturn_next_pc.
3408
6f69e520
YQ
34092016-01-18 Yao Qi <yao.qi@linaro.org>
3410
3411 * linux-low.c (linux_set_pc_64bit): New function.
3412 (linux_get_pc_64bit): New function.
3413 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3414 Declare.
3415 * linux-sparc-low.c (debug_threads): Remove declaration.
3416 (sparc_get_pc): Remove.
3417 (the_low_target): Use linux_get_pc_64bit instead of
3418 sparc_get_pc.
3419 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3420 (the_low_target): Use linux_get_pc_64bit and
3421 linux_set_pc_64bit.
3422
276d4552
YQ
34232016-01-18 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-arm-low.c (debug_threads): Remove declaration.
3426 (arm_get_pc, arm_set_pc): Remove.
3427 (the_low_target): Use linux_get_pc_32bit and
3428 linux_set_pc_32bit.
3429 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3430 (the_low_target): Use linux_get_pc_32bit and
3431 linux_set_pc_32bit.
3432 * linux-cris-low.c (debug_threads): Remove declaration.
3433 (cris_get_pc, cris_set_pc,): Remove.
3434 (the_low_target): Use linux_get_pc_32bit and
3435 linux_set_pc_32bit.
3436 * linux-crisv32-low.c (debug_threads): Remove declaration.
3437 (cris_get_pc, cris_set_pc): Remove.
3438 (the_low_target): Use linux_get_pc_32bit and
3439 linux_set_pc_32bit.
3440 * linux-low.c: Include inttypes.h.
3441 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3442 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3443 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3444 (the_low_target): Use linux_get_pc_32bit and
3445 linux_set_pc_32bit.
3446 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3447 (the_low_target): Use linux_get_pc_32bit and
3448 linux_set_pc_32bit.
3449 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3450 (the_low_target): Use linux_get_pc_32bit and
3451 linux_set_pc_32bit.
3452 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3453 (the_low_target): Use linux_get_pc_32bit and
3454 linux_set_pc_32bit.
3455 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3456 (the_low_target): Use linux_get_pc_32bit and
3457 linux_set_pc_32bit.
3458
eb0edac8
GB
34592016-01-18 Gary Benson <gbenson@redhat.com>
3460
3461 * configure.ac (AC_FUNC_FORK): New check.
3462 * config.in: Regenerate.
3463 * configure: Likewise.
3464
1b451dda
YQ
34652016-01-14 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3468 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3469 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3470 arm_get_next_pcs_ctor.
3471
82075af2
JS
34722016-01-12 Josh Stone <jistone@redhat.com>
3473 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3474
3475 * inferiors.h: Include "gdb_vecs.h".
3476 (struct process_info): Add syscalls_to_catch.
3477 * inferiors.c (remove_process): Free syscalls_to_catch.
3478 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3479 syscall_return stops.
3480 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3481 * server.c (handle_general_set): Handle QCatchSyscalls.
3482 (handle_query): Report support for QCatchSyscalls.
3483 * target.h (struct target_ops): Add supports_catch_syscall.
3484 (target_supports_catch_syscall): New macro.
3485 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3486 (struct lwp_info): Add syscall_state.
3487 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3488 Maintain syscall_state and syscalls_to_catch across exec.
3489 (get_syscall_trapinfo): New function, proxy to the_low_target.
3490 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3491 (linux_low_filter_event): Toggle syscall_state entry/return for
3492 syscall traps, and set it ignored for all others.
3493 (gdb_catching_syscalls_p): New function.
3494 (gdb_catch_this_syscall_p): New function.
3495 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3496 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3497 (linux_supports_catch_syscall): New function.
3498 (linux_target_ops): Install it.
3499 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3500 (the_low_target): Install it.
3501
8f13a3ce
MF
35022016-01-12 Mike Frysinger <vapier@gentoo.org>
3503
3504 * acinclude.m4: Include new ../warning.m4 file.
3505 * configure: Regenerated.
3506 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3507
5b3da067
MF
35082016-01-12 Mike Frysinger <vapier@gentoo.org>
3509
3510 * ax.c (is_goto_target): Mark static.
3511 * linux-low.c (register_addr): Likewise.
3512 (linux_fetch_registers, linux_store_registers): Likewise.
3513 * mem-break.c (any_persistent_commands): Fix old prototype.
3514 (add_commands_to_breakpoint): Mark static.
3515 * regcache.c (find_register_by_name): Delete unused func.
3516 * remote-utils.c (hex_or_minus_one): Mark static.
3517 * server.c (monitor_show_help): Mark static.
3518 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3519 handle_v_requests): Likewise.
3520
bc504a31
PA
35212016-01-12 Pedro Alves <palves@redhat.com>
3522
3523 Remove use of the registered trademark symbol throughout.
3524
5a0dd67a
YQ
35252016-01-08 Yao Qi <yao.qi@linaro.org>
3526
3527 * remote-utils.c (getpkt): If c is '\003', call target hook
3528 request_interrupt.
3529
b2ca446f
YQ
35302016-01-06 Yao Qi <yao.qi@linaro.org>
3531
3532 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3533 linux-aarch32-low.c.
3534 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3535 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3536 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3537 (thumb2_breakpoint): Declare.
3538 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3539 linux-aarch32-low.h.
3540 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3541 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3542 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3543
edd88788
JB
35442016-01-01 Joel Brobecker <brobecker@adacore.com>
3545
3546 * gdbreplay.c (gdbreplay_version): Change copyright year in
3547 version message.
3548 * server.c (gdbserver_version): Likewise.
3549
65da7f14
PP
35502015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3551
3552 * server.c (crc32_table): Delete.
3553 (crc32): Use libiberty's xcrc32 function.
3554
4abd5ed2
JB
35552015-12-22 Joel Brobecker <brobecker@adacore.com>
3556
3557 * lynx-low.c (lynx_delete_thread_callback): New function.
3558 (lynx_mourn): Properly delete our process and all of its
3559 threads. Remove call to clear_inferiors.
3560
0e50fe5c
JB
35612015-12-22 Joel Brobecker <brobecker@adacore.com>
3562
3563 * target.c (thread_search_callback): Add check that
3564 the thread_stopped target callback is not NULL before
3565 calling it.
3566
35adc03f
YQ
35672015-12-21 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3570 arm breakpoint.
3571
bd2b2909
AT
35722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3573
3574 * server.c (handle_query): Call target_supports_software_single_step.
3575
7fe5e27e
AT
35762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3577
3578 * linux-low.c (single_step): New function.
3579 (linux_resume_one_lwp_throw): Call single_step.
3580 (start_step_over): Likewise.
3581
d9311bfa
AT
35822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3583
3584 * Makefile.in (SFILES): Append arch/arm-linux.c,
3585 arch/arm-get-next-pcs.c.
3586 (arm-linux.o): New rule.
3587 (arm-get-next-pcs.o): New rule.
3588 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3589 arm-linux.o.
3590 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3591 to linux-aarch32-low.c.
3592 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3593 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3594 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3595 (thumb2_breakpoint_len): Likewise.
3596 (arm_is_thumb_mode): Make non-static.
3597 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3598 from linux-aarch32-low.c.
3599 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3600 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3601 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3602 (thumb2_breakpoint_len): Likewise.
3603 (arm_is_thumb_mode): New declaration.
3604 * linux-arm-low.c: Include arch/arm-linux.h
3605 aarch/arm-get-next-pcs.h, sys/syscall.h.
3606 (get_next_pcs_ops): New struct.
3607 (get_next_pcs_addr_bits_remove): New function.
3608 (get_next_pcs_is_thumb): New function.
3609 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3610 (arm_sigreturn_next_pc): Likewise.
3611 (get_next_pcs_syscall_next_pc): Likewise.
3612 (arm_gdbserver_get_next_pcs): Likewise.
3613 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3614 Initialize.
3615 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3616 * server.h: Include gdb_vecs.h.
3617
68ce2059
AT
36182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3619
3620 * Makefile.in (SFILES): Append common/common-regcache.c.
3621 (OBS): Append common-regcache.o.
3622 (common-regcache.o): New rule.
3623 * regcache.c (init_register_cache): Initialize cache to
3624 REG_UNAVAILABLE.
3625 (regcache_raw_read_unsigned): New function.
3626 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3627 register_status enum.
3628
fa5308bd
AT
36292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3630
3631 * linux-aarch64-low.c (the_low_targets): Rename
3632 breakpoint_reinsert_addr to get_next_pcs.
3633 * linux-arm-low.c (the_low_targets): Likewise.
3634 * linux-bfin-low.c (the_low_targets): Likewise.
3635 * linux-cris-low.c (the_low_targets): Likewise.
3636 * linux-crisv32-low.c (the_low_targets): Likewise.
3637 * linux-low.c (can_software_single_step): Likewise.
3638 (install_software_single_step_breakpoints): New function.
3639 (start_step_over): Use install_software_single_step_breakpoints.
3640 * linux-low.h: New CORE_ADDR vector.
3641 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3642 get_next_pcs.
3643 * linux-mips-low.c (the_low_targets): Likewise.
3644 * linux-nios2-low.c (the_low_targets): Likewise.
3645 * linux-sparc-low.c (the_low_targets): Likewise.
3646
4a6ed09b
PA
36472015-12-17 Pedro Alves <palves@redhat.com>
3648
3649 * linux-low.c (linux_kill_one_lwp): Remove references to
3650 LinuxThreads.
3651 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3652 to 'kill'.
3653 (linux_init_signals): Delete.
3654 (initialize_low): Adjust.
3655 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3656
7544db95
PA
36572015-12-16 Pedro Alves <palves@redhat.com>
3658
3659 * configure.ac (compiler warning flags): When testing a
3660 -Wno-foo option, check whether -Wfoo works instead.
3661 * configure: Regenerate.
3662
8020350c
DB
36632015-12-11 Don Breazeal <donb@codesourcery.com>
3664
3665 * server.c (process_serial_event): Don't exit from gdbserver
3666 in remote mode if there are still active inferiors.
3667
db91f502
YQ
36682015-12-11 Yao Qi <yao.qi@linaro.org>
3669
3670 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3671 arm_breakpoint_at if the process is 32-bit.
3672
b37a6290
YQ
36732015-12-11 Yao Qi <yao.qi@linaro.org>
3674
3675 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3676 arm breakpoint.
3677
17b1509a
YQ
36782015-12-07 Yao Qi <yao.qi@linaro.org>
3679
3680 * configure.srv: Append arm.o to srv_tgtobj for
3681 aarch64*-*-linux* target.
3682 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3683 from linux-arm-low.c.
3684 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3685 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3686 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3687 (thumb2_breakpoint_len): Likewise.
3688 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3689 (arm_breakpoint_kinds): Likewise.
3690 (arm_breakpoint_kind_from_pc): Likewise.
3691 (arm_sw_breakpoint_from_kind): Likewise.
3692 (arm_breakpoint_kind_from_current_state): Likewise.
3693 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3694 (arm_sw_breakpoint_from_kind): Declare.
3695 (arm_breakpoint_kind_from_current_state): Declare.
3696 (arm_breakpoint_at): Declare.
3697 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3698 arm_sw_breakpoint_from_kind if process is 32-bit.
3699 (aarch64_breakpoint_kind_from_pc): New function.
3700 (aarch64_breakpoint_kind_from_current_state): New function.
3701 (the_low_target): Initialize fields breakpoint_kind_from_pc
3702 and breakpoint_kind_from_current_state.
3703 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3704 linux-aarch32-low.c.
3705 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3706 (arm_breakpoint, arm_breakpoint_len): Likewise.
3707 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3708 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3709 (arm_is_thumb_mode): Likewise.
3710 (arm_breakpoint_at): Likewise.
3711 (arm_breakpoint_kind_from_pc): Likewise.
3712 (arm_sw_breakpoint_from_kind): Likewise.
3713 (arm_breakpoint_kind_from_current_state): Likewise.
3714
3715 Revert:
3716 2015-08-04 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3719 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3720 * server.c (extended_protocol): Remove "static".
3721 * server.h (extended_protocol): Declare it.
3722
ece66d65
JS
37232015-12-04 Josh Stone <jistone@redhat.com>
3724
3725 * target.h (struct target_ops) <arch_setup>: Rename to ...
3726 (struct target_ops) <post_create_inferior>: ... this.
3727 (target_arch_setup): Rename to ...
3728 (target_post_create_inferior): ... this, calling post_create_inferior.
3729 * server.c (start_inferior): Update target_arch_setup calls to
3730 target_post_create_inferior.
3731 * linux-low.c (linux_low_ptrace_options): Forward declare.
3732 (linux_arch_setup): Update its comment for general use.
3733 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3734 (struct linux_target_ops): Use linux_post_create_inferior.
3735 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3736 to post_create_inferior.
3737 * nto-low.c (struct nto_target_ops): Likewise.
3738 * spu-low.c (struct spu_target_ops): Likewise.
3739 * win32-low.c (struct win32_target_ops): Likewise.
3740
e58c48b4
AT
37412015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3742
3743 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3744
fbec8956
AT
37452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3746
3747 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3748 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3749 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3750 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3751 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3752 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3753 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3754 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3755 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3756 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3757 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3758 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3759
9b4c5f87
AT
37602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3761
3762 * linux-low.c (linux_look_up_symbols): Don't call
3763 linux_supports_traceclone.
3764 * linux-low.h (thread_db_init): Remove use_events argument.
3765 * thread-db.c (thread_db_use_event): Remove global variable.
3766 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3767 (struct thread_db) <td_create_bp>: Remove field.
3768 (thread_db_create_event): Remove function.
3769 (thread_db_enable_reporting): Likewise.
3770 (find_one_thread): Don't check for thread_db_use_events.
3771 (attach_thread): Likewise.
3772 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3773 (try_thread_db_load_1): Don't check for thread_db_use_events.
3774 (thread_db_init): Remove use_events argument and thread events
3775 handling.
3776 (remove_thread_event_breakpoints): Remove function.
3777 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3778
7d00775e
AT
37792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3780
3781 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3782 New function.
3783 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3784 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3785 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3786 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3787 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3788 Initialize.
3789 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3790 New function.
3791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3792 * linux-low.c (can_hardware_single_step): Use
3793 supports_hardware_single_step.
3794 (can_software_single_step): New function.
3795 (start_step_over): Call can_software_single_step.
3796 (linux_supports_hardware_single_step): New function.
3797 (struct target_ops) <supports_software_single_step>: Initialize.
3798 * linux-low.h (struct linux_target_ops)
3799 <supports_hardware_single_step>: Initialize.
3800 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3801 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3802 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3803 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3804 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3805 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3806 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3807 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3808 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3809 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3810 Initialize.
3811 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3812 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3813 Initialize.
3814 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3815 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3816 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3817 New function.
3818 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3819 * target.h (struct target_ops): <supports_software_single_step>:
3820 New field.
3821 (target_supports_software_single_step): New macro.
3822
2d97cd35
AT
38232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3824
3825 * linux-low.c (linux_wait_1): Fix pc advance condition.
3826 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3827 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3828
769ef81f
AT
38292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3830
3831 * linux-arm-low.c (arm_is_thumb_mode): New function.
3832 (arm_breakpoint_at): Use arm_is_thumb_mode.
3833 (arm_breakpoint_kind_from_current_state): New function.
3834 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3835 Initialize.
3836 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3837 (linux_breakpoint_kind_from_current_state): New function.
3838 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3839 * linux-low.h (struct linux_target_ops)
3840 <breakpoint_kind_from_current_state>: New field.
3841 * target.h (struct target_ops): Likewise.
3842 (target_breakpoint_kind_from_current_state): New macro.
3843
1bebeeca
PA
38442015-11-30 Pedro Alves <palves@redhat.com>
3845
3846 * linux-low.c (linux_resume): Wake up the event loop before
3847 returning.
3848
a67a9fae
PA
38492015-11-30 Pedro Alves <palves@redhat.com>
3850
3851 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3852 check.
3853 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3854 to -1.
3855 * target.c (struct thread_search): New structure.
3856 (thread_search_callback): New function.
3857 (prev_general_thread): New global.
3858 (prepare_to_access_memory, done_accessing_memory): New functions.
3859 * target.h (prepare_to_access_memory, done_accessing_memory):
3860 Replace macros with function declarations.
3861
f2faf941
PA
38622015-11-30 Pedro Alves <palves@redhat.com>
3863
3864 PR 14618
3865 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3866 report TARGET_WAITKIND_NO_RESUMED.
3867 * remote-utils.c (prepare_resume_reply): Handle
3868 TARGET_WAITKIND_NO_RESUMED.
3869 * server.c (report_no_resumed): New global.
3870 (handle_query) <qSupported>: Handle "no-resumed+". Report
3871 "no-resumed+" support.
3872 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3873 return error if the client doesn't support no-resumed events.
3874 (push_stop_notification): New function.
3875 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3876 events if the client supports them.
3877
a681f9c9
PA
38782015-11-30 Pedro Alves <palves@redhat.com>
3879
3880 * linux-low.c (thread_still_has_status_pending_p): Don't check
3881 vCont;t here.
3882 (lwp_resumed): New function.
3883 (status_pending_p_callback): Return early if the LWP is not
3884 supposed to be resumed.
3885
65706a29
PA
38862015-11-30 Pedro Alves <palves@redhat.com>
3887
3888 * linux-low.c (handle_extended_wait): Assert that the LWP's
3889 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3890 thread create events, leave the new child's status pending.
3891 (linux_low_filter_event): If GDB wants to hear about thread exit
3892 events, leave the LWP marked dead and don't delete it.
3893 (linux_wait_for_event_filtered): Don't check for thread exit.
3894 (filter_exit_event): New function.
3895 (linux_wait_1): Use it, when returning an exit event.
3896 (linux_resume_one_lwp_throw): Assert that the LWP's
3897 waitstatus is TARGET_WAITKIND_IGNORE.
3898 * remote-utils.c (prepare_resume_reply): Handle
3899 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3900 * server.c (report_thread_events): New global.
3901 (handle_general_set): Handle QThreadEvents.
3902 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3903 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3904 TARGET_WAITKIND_THREAD_EXITED.
3905 * server.h (report_thread_events): Declare.
3906
56cf4bed
PA
39072015-11-30 Pedro Alves <palves@redhat.com>
3908
3909 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3910 the thread's last_resume_kind was resume_stop.
3911
500c1d85
PA
39122015-11-30 Pedro Alves <palves@redhat.com>
3913
3914 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3915 before returning.
3916
de979965
PA
39172015-11-30 Pedro Alves <palves@redhat.com>
3918
3919 * server.c (handle_v_requests): Handle vCtrlC.
3920
34c65914
PA
39212015-11-30 Pedro Alves <palves@redhat.com>
3922
3923 * gdbthread.h (find_any_thread_of_pid): Declare.
3924 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3925 functions.
3926 * server.c (handle_query): If current_thread is NULL, look for
3927 another thread of the selected process.
3928
79efa585 39292015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3930 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3931
3932 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3933 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3934 name in reply.
3935 * target.h (struct target_ops) <thread_name>: New field.
3936 (target_thread_name): New macro.
3937
80d82c19
JB
39382015-11-23 Joel Brobecker <brobecker@adacore.com>
3939
3940 * regcache.h (regcache_invalidate_pid): Add declaration.
3941 * regcache.c (regcache_invalidate_pid): New function, extracted
3942 from regcache_invalidate.
3943 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3944 Add trivial documentation comment.
3945 * lynx-low.c: Use regcache_invalidate_pid instead of
3946 regcache_invalidate.
3947
64da5dd5
JB
39482015-11-23 Joel Brobecker <brobecker@adacore.com>
3949
3950 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3951 and Elf64_auxv_t if the target is Android.
3952
37ce4055
DE
39532015-11-22 Doug Evans <xdje42@gmail.com>
3954
3955 * target.h: #include <sys/types.h>.
3956
06e03fff
PA
39572015-11-19 Pedro Alves <palves@redhat.com>
3958
3959 * linux-low.c (linux_process_qsupported): Change prototype.
3960 Adjust.
3961 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3962 Change prototype.
3963 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3964 and adjust to loop over all features.
3965 * server.c (handle_query) <qSupported>: Adjust to call
3966 target_process_qsupported once, passing it a vector of unprocessed
3967 features.
3968 * target.h (struct target_ops) <process_qsupported>: Change
3969 prototype.
3970 (target_process_qsupported): Adjust.
3971
9a084706
PA
39722015-11-19 Pedro Alves <palves@redhat.com>
3973
3974 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3975 mode.
3976 * configure: Regenerate.
3977
dad44a1f
PA
39782015-11-19 Pedro Alves <palves@redhat.com>
3979
3980 * configure: Regenerate.
3981
231c0592
YQ
39822015-11-19 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3985 type to uint32_t.
3986
6c1c9a8b
YQ
39872015-11-19 Yao Qi <yao.qi@linaro.org>
3988
3989 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3990 (struct aarch64_operand): Move enum out.
3991
9caa3311
YQ
39922015-11-19 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3995 struct user_fpsimd_state *.
3996 (aarch64_store_fpregset): Likewise.
3997
6a69a054
YQ
39982015-11-19 Yao Qi <yao.qi@linaro.org>
3999
4000 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4001 struct user_pt_regs *.
4002 (aarch64_store_gregset): Likewise.
4003
1798301e
PA
40042015-11-18 Pedro Alves <palves@redhat.com>
4005
4006 * Makefile.in (all_object_files): Add $IPA_OBJS.
4007
ce7715e2
PA
40082015-11-17 Pedro Alves <palves@redhat.com>
4009
4010 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4011 GDB_SIGNAL_0 and gdb_signal_to_string.
4012
c0879059
PA
40132015-11-17 Pedro Alves <palves@redhat.com>
4014
4015 * win32-low.c (handle_output_debug_string): Remove parameter.
4016 (win32_kill): Remove our_status local and adjust call to
4017 handle_output_debug_string.
4018 (get_child_debug_event): Adjust call to
4019 handle_output_debug_string.
4020
1996e237
SM
40212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4022
4023 * linux-mips-low.c (mips_fill_gregset): Add cast.
4024 (mips_store_gregset): Likewise.
4025 (mips_fill_fpregset): Likewise.
4026 (mips_store_fpregset): Likewise.
4027
cbec665b
SM
40282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4029
4030 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4031 priv.
4032
eb3e3c67
SM
40332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4034
4035 * linux-mips-low.c (mips_linux_new_thread): Change type of
4036 watch_type to enum target_hw_bp_type.
4037
171de4b8
SM
40382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4039
4040 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4041 Change return type to arm_hwbp_type.
4042
04248ead
SM
40432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4044
4045 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4046 (arm_store_gregset): Likewise.
4047 * linux-arm-low.c (arm_get_hwcap): Likewise.
4048 (arm_read_description): Likewise.
4049
04b3479c
SM
40502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4051
4052 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4053
2bc84e8a
SM
40542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4055
4056 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4057 (ppc_fill_vsxregset): Likewise.
4058 (ppc_store_vsxregset): Likewise.
4059 (ppc_fill_vrregset): Likewise.
4060 (ppc_store_vrregset): Likewise.
4061 (ppc_fill_evrregset): Likewise.
4062 (ppc_store_evrregset): Likewise.
4063
e6c5bb05
SM
40642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4065
4066 * linux-ppc-low.c (ppc_usrregs_info): Remove
4067 forward-declaration.
4068 (ppc_arch_setup): Move lower in file.
4069
7ea45d72
SM
40702015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4071
4072 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4073 (ps_pdwrite): Likewise.
4074
69291610
HW
40752015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4076
4077 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4078 to after assert checks.
4079
b42945fd
SM
40802015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4081
4082 * proc-service.c (ps_pdread): Add/adjust casts.
4083 (ps_pdwrite): Add/adjust casts.
4084
d6f85c84
SM
40852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4086
4087 * server.c (handle_search_memory_1): Cast return value of
4088 memmem.
4089
f98cd059
SM
40902015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4091
4092 * server.c (write_qxfer_response): Change type of data to
4093 gdb_byte *.
4094
d2412fa5
PA
40952015-10-29 Pedro Alves <palves@redhat.com>
4096
4097 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4098
c17414a2
PA
40992015-10-29 Pedro Alves <palves@redhat.com>
4100
4101 * tracepoint.c (clear_installed_tracepoints): Add casts.
4102
e053fbc4
PA
41032015-10-29 Pedro Alves <palves@redhat.com>
4104
4105 * server.c (handle_v_cont, process_serial_event): Add enum
4106 gdb_signal casts to signal parsing code.
4107
add67df8
PA
41082015-10-29 Pedro Alves <palves@redhat.com>
4109
4110 * linux-low.h (NULL_REGSET): Define.
4111 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4112 * linux-arm-low.c (arm_regsets): Likewise.
4113 * linux-crisv32-low.c (cris_regsets): Likewise.
4114 * linux-m68k-low.c (m68k_regsets): Likewise.
4115 * linux-mips-low.c (mips_regsets): Likewise.
4116 * linux-nios2-low.c (nios2_regsets): Likewise.
4117 * linux-ppc-low.c (ppc_regsets): Likewise.
4118 * linux-s390-low.c (s390_regsets): Likewise.
4119 * linux-sh-low.c (sh_regsets): Likewise.
4120 * linux-sparc-low.c (sparc_regsets): Likewise.
4121 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4122 * linux-tile-low.c (tile_regsets): Likewise.
4123 * linux-x86-low.c (x86_regsets): Likewise.
4124 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4125
50bc912a
PA
41262015-10-29 Pedro Alves <palves@redhat.com>
4127
4128 * linux-low.h (NULL_REGSET): Define.
4129 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4130 * linux-arm-low.c (arm_regsets): Likewise.
4131 * linux-crisv32-low.c (cris_regsets): Likewise.
4132 * linux-m68k-low.c (m68k_regsets): Likewise.
4133 * linux-mips-low.c (mips_regsets): Likewise.
4134 * linux-nios2-low.c (nios2_regsets): Likewise.
4135 * linux-ppc-low.c (ppc_regsets): Likewise.
4136 * linux-s390-low.c (s390_regsets): Likewise.
4137 * linux-sh-low.c (sh_regsets): Likewise.
4138 * linux-sparc-low.c (sparc_regsets): Likewise.
4139 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4140 * linux-tile-low.c (tile_regsets): Likewise.
4141 * linux-x86-low.c (x86_regsets): Likewise.
4142 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4143
682b2546
DE
41442015-10-26 Doug Evans <dje@google.com>
4145
4146 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4147
963843d4
DE
41482015-10-26 Doug Evans <dje@google.com>
4149
4150 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4151
d41401ac
DE
41522015-10-26 Doug Evans <dje@google.com>
4153
4154 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4155 for debug_printf.
4156 (attach_thread, find_new_threads_callback): Ditto.
4157
3db28855
AT
41582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4159
4160 * mem-break.h (set_breakpoint_data): Remove.
4161
fb78e89c
AT
41622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4163
4164 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4165 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4166 (initialize_low): Remove set_breakpoint_data call.
4167 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4168 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4169 (initialize_low): Remove set_breakpoint_data call.
4170 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4171 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4172 (initialize_low): Remove set_breakpoint_data call.
4173
2e6ee069
AT
41742015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4175
4176 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4177 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4178 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4179 * target.h (target_breakpoint_kind_from_pc): New macro.
4180
1652a986
AT
41812015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4182
4183 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4184 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4185 the default breakpoint kind.
4186
abeead09
AT
41872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4188
4189 * linux-arm-low.c (arm_supports_z_point_type): Add software
4190 breakpoint support.
4191
b0b4b501
AT
41922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4193
4194 * linux-arm-low.c: Refactor breakpoint definitions.
4195 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4196 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4197
8689682c
AT
41982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4199
4200 * Makefile.in: Add arm.c/o.
4201 * configure.srv: Likewise.
4202 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4203 (arm_breakpoint_kind_from_pc): New function.
4204 (arm_sw_breakpoint_from_kind): Return proper kind.
4205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4206
27165294
AT
42072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4208
4209 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4210 removal.
4211 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4212 (struct raw_breakpoint) <size>: Remove.
4213 (struct raw_breakpoint) <kind>: Add.
4214 (bp_size): New function.
4215 (bp_opcode): Likewise.
4216 (find_raw_breakpoint_at): Adjust for kind.
4217 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4218 (remove_memory_breakpoint): Adjust for kind call bp_size.
4219 (set_raw_breakpoint_at): Adjust for kind.
4220 (set_breakpoint): Likewise.
4221 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4222 (delete_raw_breakpoint): Adjust for kind.
4223 (delete_breakpoint): Likewise.
4224 (find_gdb_breakpoint): Likewise.
4225 (set_gdb_breakpoint_1): Likewise.
4226 (set_gdb_breakpoint): Likewise.
4227 (delete_gdb_breakpoint_1): Likewise.
4228 (delete_gdb_breakpoint): Likewise.
4229 (uninsert_raw_breakpoint): Likewise.
4230 (reinsert_raw_breakpoint): Likewise.
4231 (set_breakpoint_data): Remove.
4232 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4233 (check_mem_read): Adjust for kind call bp_size.
4234 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4235 (clone_one_breakpoint): Adjust for kind.
4236 * mem-break.h (set_gdb_breakpoint): Likewise.
4237 (delete_gdb_breakpoint): Likewise.
4238 * server.c (process_serial_event): Likewise.
4239
dd373349
AT
42402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4241
4242 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4243 (struct linux_target_ops) <breakpoint>: Remove.
4244 (struct linux_target_ops) <breakpoint_len>: Remove.
4245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4247 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4248 (arm_sw_breakpoint_from_kind): New function.
4249 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4250 (struct linux_target_ops) <breakpoint>: Remove.
4251 (struct linux_target_ops) <breakpoint_len>: Remove.
4252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4254 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4255 (struct linux_target_ops) <breakpoint>: Remove.
4256 (struct linux_target_ops) <breakpoint_len>: Remove.
4257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4259 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4260 (struct linux_target_ops) <breakpoint>: Remove.
4261 (struct linux_target_ops) <breakpoint_len>: Remove.
4262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4264 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4265 and sw_breakpoint_from_kind to increment the pc.
4266 (linux_breakpoint_kind_from_pc): New function.
4267 (linux_sw_breakpoint_from_kind): New function.
4268 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4269 (initialize_low): Call breakpoint_kind_from_pc and
4270 sw_breakpoint_from_kind to replace breakpoint_data/len.
4271 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4272 New field.
4273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4274 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4275 (struct linux_target_ops) <breakpoint>: Remove.
4276 (struct linux_target_ops) <breakpoint_len>: Remove.
4277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4279 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4280 (struct linux_target_ops) <breakpoint>: Remove.
4281 (struct linux_target_ops) <breakpoint_len>: Remove.
4282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4284 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4285 (struct linux_target_ops) <breakpoint>: Remove.
4286 (struct linux_target_ops) <breakpoint_len>: Remove.
4287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4289 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4290 (struct linux_target_ops) <breakpoint>: Remove.
4291 (struct linux_target_ops) <breakpoint_len>: Remove.
4292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4294 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4295 (struct linux_target_ops) <breakpoint>: Remove.
4296 (struct linux_target_ops) <breakpoint_len>: Remove.
4297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4299 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4300 (struct linux_target_ops) <breakpoint>: Remove.
4301 (struct linux_target_ops) <breakpoint_len>: Remove.
4302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4304 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4305 (struct linux_target_ops) <breakpoint>: Remove.
4306 (struct linux_target_ops) <breakpoint_len>: Remove.
4307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4309 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4310 (struct linux_target_ops) <breakpoint>: Remove.
4311 (struct linux_target_ops) <breakpoint_len>: Remove.
4312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4314 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4315 (struct linux_target_ops) <breakpoint>: Remove.
4316 (struct linux_target_ops) <breakpoint_len>: Remove.
4317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4319 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4320 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4321 (struct linux_target_ops) <breakpoint>: Remove.
4322 (struct linux_target_ops) <breakpoint_len>: Remove.
4323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4325 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4326 (struct linux_target_ops) <breakpoint>: Remove.
4327 (struct linux_target_ops) <breakpoint_len>: Remove.
4328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4330
4cd98a19
AT
43312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4332
4333 * linux-cris-low.c (cris_get_pc): Remove void arg.
4334
774ee6d2
AR
43352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4336
4337 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4338 variable name.
4339
833dcd29
AR
43402015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4341
4342 * inferiors.c (thread_pid_matches_callback): New function.
4343 (find_thread_process): New function.
4344 (remove_thread): Reset current_thread.
4345 (remove_process): Assert threads have been removed first.
4346
8d689ee5
YQ
43472015-10-15 Yao Qi <yao.qi@linaro.org>
4348
4349 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4350 if it is 3.
4351 (aarch64_remove_point): Likewise.
4352 * regcache.c (regcache_register_size): New function.
4353
1c2e1515
YQ
43542015-10-12 Yao Qi <yao.qi@linaro.org>
4355
4356 * linux-aarch64-low.c: Update all callers as emit_load_store
4357 is renamed to aarch64_emit_load_store.
4358
e1c587c3
YQ
43592015-10-12 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-aarch64-low.c: Update all callers of function renaming
4362 from emit_insn to aarch64_emit_insn.
4363
b6542f81
YQ
43642015-10-12 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4367 arch/aarch64-insn.h.
4368 (struct aarch64_memory_operand): Likewise.
4369 (ENCODE): Likewise.
4370 (emit_insn): Move to arch/aarch64-insn.c.
4371 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4372 (emit_load_store): Move to arch/aarch64-insn.c.
4373 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4374 (can_encode_int32): Remove.
4375
246994ce
YQ
43762015-10-12 Yao Qi <yao.qi@linaro.org>
4377
4378 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4379 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4380 (aarch64_relocate_instruction): Likewise.
4381 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4382 (struct aarch64_insn_visitor): Likewise.
4383
0badd99f
YQ
43842015-10-12 Yao Qi <yao.qi@linaro.org>
4385
4386 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4387 (struct aarch64_insn_visitor): New.
4388 (struct aarch64_insn_relocation_data): New.
4389 (aarch64_ftrace_insn_reloc_b): New function.
4390 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4391 (aarch64_ftrace_insn_reloc_cb): Likewise.
4392 (aarch64_ftrace_insn_reloc_tb): Likewise.
4393 (aarch64_ftrace_insn_reloc_adr): Likewise.
4394 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4395 (aarch64_ftrace_insn_reloc_others): Likewise.
4396 (visitor): New.
4397 (aarch64_relocate_instruction): Use visitor.
4398
dfaffe9d
YQ
43992015-10-12 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4402 int. Add argument buf.
4403 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4404 aarch64_relocate_instruction.
4405
70b439f0
YQ
44062015-10-12 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4409 argument insn. Remove local variable insn. Don't call
4410 target_read_uint32.
4411 (aarch64_install_fast_tracepoint_jump_pad): Call
4412 target_read_uint32.
4413
7781c06f
YQ
44142015-09-30 Yao Qi <yao.qi@linaro.org>
4415
4416 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4417 (emit_load_store_pair): Likewise.
4418
9a3c8263
SM
44192015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4420
4421 * dll.c (match_dll): Add cast(s).
4422 (unloaded_dll): Likewise.
4423 * linux-low.c (second_thread_of_pid_p): Likewise.
4424 (delete_lwp_callback): Likewise.
4425 (count_events_callback): Likewise.
4426 (select_event_lwp_callback): Likewise.
4427 (linux_set_resume_request): Likewise.
4428 * server.c (accumulate_file_name_length): Likewise.
4429 (emit_dll_description): Likewise.
4430 (handle_qxfer_threads_worker): Likewise.
4431 (visit_actioned_threads): Likewise.
4432 * thread-db.c (any_thread_of): Likewise.
4433 * tracepoint.c (same_process_p): Likewise.
4434 (match_blocktype): Likewise.
4435 (build_traceframe_info_xml): Likewise.
4436
224c3ddb
SM
44372015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4440 assignment.
4441 (gdb_unparse_agent_expr): Likewise.
4442 * hostio.c (require_data): Likewise.
4443 (handle_pread): Likewise.
4444 * linux-low.c (disable_regset): Likewise.
4445 (fetch_register): Likewise.
4446 (store_register): Likewise.
4447 (get_dynamic): Likewise.
4448 (linux_qxfer_libraries_svr4): Likewise.
4449 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4450 (set_fast_tracepoint_jump): Likewise.
4451 (uninsert_fast_tracepoint_jumps_at): Likewise.
4452 (reinsert_fast_tracepoint_jumps_at): Likewise.
4453 (validate_inserted_breakpoint): Likewise.
4454 (clone_agent_expr): Likewise.
4455 * regcache.c (init_register_cache): Likewise.
4456 * remote-utils.c (putpkt_binary_1): Likewise.
4457 (decode_M_packet): Likewise.
4458 (decode_X_packet): Likewise.
4459 (look_up_one_symbol): Likewise.
4460 (relocate_instruction): Likewise.
4461 (monitor_output): Likewise.
4462 * server.c (handle_search_memory): Likewise.
4463 (handle_qxfer_exec_file): Likewise.
4464 (handle_qxfer_libraries): Likewise.
4465 (handle_qxfer): Likewise.
4466 (handle_query): Likewise.
4467 (handle_v_cont): Likewise.
4468 (handle_v_run): Likewise.
4469 (captured_main): Likewise.
4470 * target.c (write_inferior_memory): Likewise.
4471 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4472 * tracepoint.c (init_trace_buffer): Likewise.
4473 (add_tracepoint_action): Likewise.
4474 (add_traceframe): Likewise.
4475 (add_traceframe_block): Likewise.
4476 (cmd_qtdpsrc): Likewise.
4477 (cmd_qtdv): Likewise.
4478 (cmd_qtstatus): Likewise.
4479 (response_source): Likewise.
4480 (response_tsv): Likewise.
4481 (cmd_qtnotes): Likewise.
4482 (gdb_collect): Likewise.
4483 (initialize_tracepoint): Likewise.
4484
afbe19f8
PL
44852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4486
4487 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4488 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4489 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4490 <NOP>: New.
4491 (enum aarch64_condition_codes): New enum.
4492 (w0): New static global.
4493 (fp): Likewise.
4494 (lr): Likewise.
4495 (struct aarch64_memory_operand) <type>: New
4496 MEMORY_OPERAND_POSTINDEX type.
4497 (postindex_memory_operand): New helper function.
4498 (emit_ret): New function.
4499 (emit_load_store_pair): New function, factored out of emit_stp
4500 with support for MEMORY_OPERAND_POSTINDEX.
4501 (emit_stp): Rewrite using emit_load_store_pair.
4502 (emit_ldp): New function.
4503 (emit_load_store): Likewise.
4504 (emit_ldr): Mention post-index instruction in comment.
4505 (emit_ldrh): New function.
4506 (emit_ldrb): New function.
4507 (emit_ldrsw): Mention post-index instruction in comment.
4508 (emit_str): Likewise.
4509 (emit_subs): New function.
4510 (emit_cmp): Likewise.
4511 (emit_and): Likewise.
4512 (emit_orr): Likewise.
4513 (emit_orn): Likewise.
4514 (emit_eor): Likewise.
4515 (emit_mvn): Likewise.
4516 (emit_lslv): Likewise.
4517 (emit_lsrv): Likewise.
4518 (emit_asrv): Likewise.
4519 (emit_mul): Likewise.
4520 (emit_sbfm): Likewise.
4521 (emit_sbfx): Likewise.
4522 (emit_ubfm): Likewise.
4523 (emit_ubfx): Likewise.
4524 (emit_csinc): Likewise.
4525 (emit_cset): Likewise.
4526 (emit_nop): Likewise.
4527 (emit_ops_insns): New helper function.
4528 (emit_pop): Likewise.
4529 (emit_push): Likewise.
4530 (aarch64_emit_prologue): New function.
4531 (aarch64_emit_epilogue): Likewise.
4532 (aarch64_emit_add): Likewise.
4533 (aarch64_emit_sub): Likewise.
4534 (aarch64_emit_mul): Likewise.
4535 (aarch64_emit_lsh): Likewise.
4536 (aarch64_emit_rsh_signed): Likewise.
4537 (aarch64_emit_rsh_unsigned): Likewise.
4538 (aarch64_emit_ext): Likewise.
4539 (aarch64_emit_log_not): Likewise.
4540 (aarch64_emit_bit_and): Likewise.
4541 (aarch64_emit_bit_or): Likewise.
4542 (aarch64_emit_bit_xor): Likewise.
4543 (aarch64_emit_bit_not): Likewise.
4544 (aarch64_emit_equal): Likewise.
4545 (aarch64_emit_less_signed): Likewise.
4546 (aarch64_emit_less_unsigned): Likewise.
4547 (aarch64_emit_ref): Likewise.
4548 (aarch64_emit_if_goto): Likewise.
4549 (aarch64_emit_goto): Likewise.
4550 (aarch64_write_goto_address): Likewise.
4551 (aarch64_emit_const): Likewise.
4552 (aarch64_emit_call): Likewise.
4553 (aarch64_emit_reg): Likewise.
4554 (aarch64_emit_pop): Likewise.
4555 (aarch64_emit_stack_flush): Likewise.
4556 (aarch64_emit_zero_ext): Likewise.
4557 (aarch64_emit_swap): Likewise.
4558 (aarch64_emit_stack_adjust): Likewise.
4559 (aarch64_emit_int_call_1): Likewise.
4560 (aarch64_emit_void_call_2): Likewise.
4561 (aarch64_emit_eq_goto): Likewise.
4562 (aarch64_emit_ne_goto): Likewise.
4563 (aarch64_emit_lt_goto): Likewise.
4564 (aarch64_emit_le_goto): Likewise.
4565 (aarch64_emit_gt_goto): Likewise.
4566 (aarch64_emit_ge_got): Likewise.
4567 (aarch64_emit_ops_impl): New static global variable.
4568 (aarch64_emit_ops): New target function, return
4569 &aarch64_emit_ops_impl.
4570 (struct linux_target_ops): Install it.
4571
bb903df0
PL
45722015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4573
4574 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4575 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4576 aarch64-ipa.o.
4577 * linux-aarch64-ipa.c: New file.
4578 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4579 and endian.h.
4580 (aarch64_get_thread_area): New target method.
4581 (extract_signed_bitfield): New helper function.
4582 (aarch64_decode_ldr_literal): New function.
4583 (enum aarch64_opcodes): New enum.
4584 (struct aarch64_register): New struct.
4585 (struct aarch64_operand): New struct.
4586 (x0): New static global.
4587 (x1): Likewise.
4588 (x2): Likewise.
4589 (x3): Likewise.
4590 (x4): Likewise.
4591 (w2): Likewise.
4592 (ip0): Likewise.
4593 (sp): Likewise.
4594 (xzr): Likewise.
4595 (aarch64_register): New helper function.
4596 (register_operand): Likewise.
4597 (immediate_operand): Likewise.
4598 (struct aarch64_memory_operand): New struct.
4599 (offset_memory_operand): New helper function.
4600 (preindex_memory_operand): Likewise.
4601 (enum aarch64_system_control_registers): New enum.
4602 (ENCODE): New macro.
4603 (emit_insn): New helper function.
4604 (emit_b): New function.
4605 (emit_bcond): Likewise.
4606 (emit_cb): Likewise.
4607 (emit_tb): Likewise.
4608 (emit_blr): Likewise.
4609 (emit_stp): Likewise.
4610 (emit_ldp_q_offset): Likewise.
4611 (emit_stp_q_offset): Likewise.
4612 (emit_load_store): Likewise.
4613 (emit_ldr): Likewise.
4614 (emit_ldrsw): Likewise.
4615 (emit_str): Likewise.
4616 (emit_ldaxr): Likewise.
4617 (emit_stxr): Likewise.
4618 (emit_stlr): Likewise.
4619 (emit_data_processing_reg): Likewise.
4620 (emit_data_processing): Likewise.
4621 (emit_add): Likewise.
4622 (emit_sub): Likewise.
4623 (emit_mov): Likewise.
4624 (emit_movk): Likewise.
4625 (emit_mov_addr): Likewise.
4626 (emit_mrs): Likewise.
4627 (emit_msr): Likewise.
4628 (emit_sevl): Likewise.
4629 (emit_wfe): Likewise.
4630 (append_insns): Likewise.
4631 (can_encode_int32_in): New helper function.
4632 (aarch64_relocate_instruction): New function.
4633 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4634 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4635 (struct linux_target_ops): Install aarch64_get_thread_area,
4636 aarch64_install_fast_tracepoint_jump_pad and
4637 aarch64_get_min_fast_tracepoint_insn_len.
4638
787749ea
PL
46392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4640
4641 * Makefile.in (aarch64-insn.o): New rule.
4642 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4643
9812b2e6
YQ
46442015-09-21 Yao Qi <yao.qi@linaro.org>
4645
4646 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4647
18fe412b
YQ
46482015-09-21 Yao Qi <yao.qi@linaro.org>
4649
4650 * tracepoint.c (max_jump_pad_size): Remove.
4651
a0cc84cd
YQ
46522015-09-18 Yao Qi <yao.qi@linaro.org>
4653
4654 * linux-aarch64-low.c: Don't include sys/uio.h.
4655 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4656
d78908cf
WW
46572015-09-16 Wei-cheng Wang <cole945@gmail.com>
4658
4659 * tracepoint.c (eval_result_type): Change prototype.
4660 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4661
d57e0d50
PA
46622015-09-15 Pedro Alves <palves@redhat.com>
4663
4664 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4665 Check whether to report exec events instead of checking whether
4666 multiprocess is enabled.
4667
5a676acc
PA
46682015-09-15 Pedro Alves <palves@redhat.com>
4669
4670 PR remote/18965
4671 * remote-utils.c (prepare_resume_reply): Merge
4672 TARGET_WAITKIND_VFORK_DONE switch case with the
4673 TARGET_WAITKIND_FORKED case.
4674
7c5d0fad
YQ
46752015-09-15 Yao Qi <yao.qi@linaro.org>
4676
4677 * server.c (handle_query): Check string comparison using
4678 "else if" instead of "if".
4679
750ce8d1
YQ
46802015-09-15 Yao Qi <yao.qi@linaro.org>
4681
4682 * server.c (vCont_supported): New global variable.
4683 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4684 matches. Append ";vContSupported+" to own_buf.
4685 (handle_v_requests): Append ";s;S" to own_buf if target supports
4686 hardware single step or vCont_supported is false.
4687 (capture_main): Set vCont_supported to zero.
4688
70b90b91
YQ
46892015-09-15 Yao Qi <yao.qi@linaro.org>
4690
4691 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4692 it to ...
4693 (linux_supports_hardware_single_step): ... New function.
4694 (linux_target_ops): Update.
4695 * lynx-low.c (lynx_target_ops): Set field
4696 supports_hardware_single_step to target_can_do_hardware_single_step.
4697 * nto-low.c (nto_target_ops): Likewise.
4698 * spu-low.c (spu_target_ops): Likewise.
4699 * win32-low.c (win32_target_ops): Likewise.
4700 * target.c (target_can_do_hardware_single_step): New function.
4701 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4702 Remove. <supports_hardware_single_step>: New field.
4703 (target_supports_conditional_breakpoints): Remove.
4704 (target_supports_hardware_single_step): New macro.
4705 (target_can_do_hardware_single_step): Declare.
4706 * server.c (handle_query): Use target_supports_hardware_single_step
4707 instead of target_supports_conditional_breakpoints.
4708
ade90bde
YQ
47092015-09-15 Yao Qi <yao.qi@linaro.org>
4710
4711 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4712 function.
4713 (struct linux_target_ops the_low_target): Install
4714 aarch64_linux_siginfo_fixup.
4715
94585166
DB
47162015-09-11 Don Breazeal <donb@codesourcery.com>
4717 Luis Machado <lgustavo@codesourcery.com>
4718
4719 * linux-low.c (linux_mourn): Static declaration.
4720 (linux_arch_setup): Move in front of
4721 handle_extended_wait.
4722 (linux_arch_setup_thread): New function.
4723 (handle_extended_wait): Handle exec events. Call
4724 linux_arch_setup_thread. Make event_lwp argument a
4725 pointer-to-a-pointer.
4726 (check_zombie_leaders): Do not check stopped threads.
4727 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4728 (linux_low_filter_event): Add lwp and thread for exec'ing
4729 non-leader thread if leader thread has been deleted.
4730 Refactor code into linux_arch_setup_thread and call it.
4731 Pass child lwp pointer by reference to handle_extended_wait.
4732 (linux_wait_for_event_filtered): Update comment.
4733 (linux_wait_1): Prevent clobbering exec event status.
4734 (linux_supports_exec_events): New function.
4735 (linux_target_ops) <supports_exec_events>: Initialize new member.
4736 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4737 new member.
4738 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4739 * server.c (report_exec_events): New global variable.
4740 (handle_query): Handle qSupported query for exec-events feature.
4741 (captured_main): Initialize report_exec_events.
4742 * server.h (report_exec_events): Declare new global variable.
4743 * target.h (struct target_ops) <supports_exec_events>: New
4744 member.
4745 (target_supports_exec_events): New macro.
4746 * win32-low.c (win32_target_ops) <supports_exec_events>:
4747 Initialize new member.
4748
0568462b
MM
47492015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4750
4751 * linux-low.c (linux_low_enable_btrace): Remove.
4752 (linux_target_ops): Replace linux_low_enable_btrace with
4753 linux_enable_btrace.
4754
39edd165
YQ
47552015-09-03 Yao Qi <yao.qi@linaro.org>
4756
4757 * linux-aarch64-low.c (aarch64_insert_point): Call
4758 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4759 returns true.
4760
1db33b5a
UW
47612015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4762
4763 * linux-low.c (check_stopped_by_breakpoint): Use
4764 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4765
ab290430
PA
47662015-08-27 Pedro Alves <palves@redhat.com>
4767
4768 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4769
8d749320
SM
47702015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4771
6711b7f8
SM
4772 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4773 the XNEW-family equivalent.
8d749320
SM
4774 (compile_bytecodes): Likewise.
4775 * dll.c (loaded_dll): Likewise.
4776 * event-loop.c (append_callback_event): Likewise.
4777 (create_file_handler): Likewise.
4778 (create_file_event): Likewise.
4779 * hostio.c (handle_open): Likewise.
4780 * inferiors.c (add_thread): Likewise.
4781 (add_process): Likewise.
4782 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4783 * linux-arm-low.c (arm_new_process): Likewise.
4784 (arm_new_thread): Likewise.
4785 * linux-low.c (add_to_pid_list): Likewise.
4786 (linux_add_process): Likewise.
4787 (handle_extended_wait): Likewise.
4788 (add_lwp): Likewise.
4789 (enqueue_one_deferred_signal): Likewise.
4790 (enqueue_pending_signal): Likewise.
4791 (linux_resume_one_lwp_throw): Likewise.
4792 (linux_resume_one_thread): Likewise.
4793 (linux_read_memory): Likewise.
4794 (linux_write_memory): Likewise.
4795 * linux-mips-low.c (mips_linux_new_process): Likewise.
4796 (mips_linux_new_thread): Likewise.
4797 (mips_add_watchpoint): Likewise.
4798 * linux-x86-low.c (initialize_low_arch): Likewise.
4799 * lynx-low.c (lynx_add_process): Likewise.
4800 * mem-break.c (set_raw_breakpoint_at): Likewise.
4801 (set_breakpoint): Likewise.
4802 (add_condition_to_breakpoint): Likewise.
4803 (add_commands_to_breakpoint): Likewise.
4804 (clone_agent_expr): Likewise.
4805 (clone_one_breakpoint): Likewise.
4806 * regcache.c (new_register_cache): Likewise.
4807 * remote-utils.c (look_up_one_symbol): Likewise.
4808 * server.c (queue_stop_reply): Likewise.
4809 (start_inferior): Likewise.
4810 (queue_stop_reply_callback): Likewise.
4811 (handle_target_event): Likewise.
4812 * spu-low.c (fetch_ppc_memory): Likewise.
4813 (store_ppc_memory): Likewise.
4814 * target.c (set_target_ops): Likewise.
4815 * thread-db.c (thread_db_load_search): Likewise.
4816 (try_thread_db_load_1): Likewise.
4817 * tracepoint.c (add_tracepoint): Likewise.
4818 (add_tracepoint_action): Likewise.
4819 (create_trace_state_variable): Likewise.
4820 (cmd_qtdpsrc): Likewise.
4821 (cmd_qtro): Likewise.
4822 (add_while_stepping_state): Likewise.
4823 * win32-low.c (child_add_thread): Likewise.
4824 (get_image_name): Likewise.
4825
ed8b7b42
YQ
48262015-08-25 Yao Qi <yao.qi@linaro.org>
4827
4828 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4829
db3cb7cb
YQ
48302015-08-25 Yao Qi <yao.qi@linaro.org>
4831
4832 * Makefile.in (aarch64-linux.o): New rule.
4833 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4834 srv_tgtobj.
4835 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4836 (aarch64_init_debug_reg_state): Make it extern.
4837 (aarch64_linux_prepare_to_resume): Remove.
4838
f6011a1c
YQ
48392015-08-25 Yao Qi <yao.qi@linaro.org>
4840
4841 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4842 lwp_arch_private_info and ptid_of_lwp.
4843
88e2cf7e
YQ
48442015-08-25 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4847 Find proc_info by find_process_pid. All callers updated.
4848
5e35436e
YQ
48492015-08-25 Yao Qi <yao.qi@linaro.org>
4850
4851 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4852 Remove.
4853 (debug_reg_change_callback): Remove.
4854 (aarch64_notify_debug_reg_change): Remove.
4855
4a8a7965
YQ
48562015-08-25 Yao Qi <yao.qi@linaro.org>
4857
4858 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4859 Call current_lwp_ptid.
4860
32a271ee
YQ
48612015-08-25 Yao Qi <yao.qi@linaro.org>
4862
4863 * linux-aarch64-low.c (debug_reg_change_callback): Use
4864 debug_printf.
4865
0d51c8d7
YQ
48662015-08-25 Yao Qi <yao.qi@linaro.org>
4867
4868 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4869
31a43dd5
YQ
48702015-08-25 Yao Qi <yao.qi@linaro.org>
4871
4872 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4873
8ee52567
YQ
48742015-08-25 Yao Qi <yao.qi@linaro.org>
4875
4876 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4877 the code.
4878
ff3f0f45
YQ
48792015-08-25 Yao Qi <yao.qi@linaro.org>
4880
4881 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4882 Remove.
4883 (debug_reg_change_callback): Remove argument entry and add argument
4884 lwp. Remove local variable thread. Don't print thread id in the
4885 debugging output. Don't check whether pid of thread equals to pid.
4886 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4887 iterate_over_lwps instead find_inferior.
4888
3d40fbb5
PA
48892015-08-24 Pedro Alves <palves@redhat.com>
4890
4891 * inferiors.c (get_first_process): New function.
4892 * inferiors.h (get_first_process): New declaration.
4893 * remote-utils.c (read_ptid): Default to the first process in the
4894 list, instead of to the current thread's process.
4895
438e1e42
PA
48962015-08-24 Pedro Alves <palves@redhat.com>
4897
4898 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4899 * event-loop.c: Likewise.
4900 * remote-utils.c: Likewise.
4901 * tracepoint.c: Likewise.
4902
a8c6d4fc
PA
49032015-08-24 Pedro Alves <palves@redhat.com>
4904
4905 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4906 ptid_get_lwp.
4907
99b0bb12
PA
49082015-08-21 Pedro Alves <palves@redhat.com>
4909
4910 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4911 instead of literal 1.
4912
f8904751
PA
49132015-08-21 Pedro Alves <palves@redhat.com>
4914
4915 * tdesc.c (default_description): Explicitly zero-initialize.
4916
465a859e
PA
49172015-08-21 Pedro Alves <palves@redhat.com>
4918
4919 PR gdb/18749
4920 * inferiors.c (remove_thread): Discard any pending stop reply for
4921 this thread.
4922 * server.c (remove_all_on_match_pid): Rename to ...
4923 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4924 instead of a pid.
4925 (discard_queued_stop_replies): Change parameter to a ptid. Now
4926 extern.
4927 (handle_v_kill, kill_inferior_callback, captured_main)
4928 (process_serial_event): Adjust.
4929 * server.h (discard_queued_stop_replies): Declare.
4930
f0db101d
PA
49312015-08-21 Pedro Alves <palves@redhat.com>
4932
4933 * linux-low.c (wait_for_sigstop): Always switch to no thread
4934 selected if the previously current thread dies.
4935 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4936 process instead of the current thread's.
4937 * remote-utils.c (input_interrupt): Don't check if there's no
4938 current thread.
4939 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4940 current thread to the general thread fails, error out.
4941 (handle_qxfer_auxv, handle_qxfer_libraries)
4942 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4943 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4944 (handle_query): Check if there's a thread selected instead of
4945 checking whether there's any thread in the thread list.
4946 (handle_qxfer_threads, handle_qxfer_btrace)
4947 (handle_qxfer_btrace_conf): Don't error out early if there's no
4948 thread in the thread list.
4949 (handle_v_cont, myresume): Don't set the current thread to the
4950 continue thread.
4951 (process_serial_event) <Hg handling>: Also set thread_id if the
4952 previous general thread is still alive.
4953 (process_serial_event) <g/G handling>: If setting the current
4954 thread to the general thread fails, error out.
4955 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4956 thread's lwp instead of the current thread's.
4957 * target.c (set_desired_thread): If the desired thread was not
4958 found, leave the current thread pointing to NULL. Return an int
4959 (boolean) indicating success.
4960 * target.h (set_desired_thread): Change return type to int.
4961
40045d91
MF
49622015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4963
4964 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4965 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4966 #includes.
4967 (ps_get_thread_area): New function.
4968
45face3b
GB
49692015-08-19 Gary Benson <gbenson@redhat.com>
4970
4971 * hostio.c (handle_pread): Do not attempt to read more data
4972 than hostio_reply_with_data can fit in a packet.
4973
16d5f642
JB
49742015-08-18 Joel Brobecker <brobecker@adacore.com>
4975
4976 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4977
a738da3a
MF
49782015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4979
4980 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4981
33ebda9d
PA
49822015-08-06 Pedro Alves <palves@redhat.com>
4983
4984 * tracepoint.c (expr_eval_result): Now an int.
4985
a44892be
PA
49862015-08-06 Pedro Alves <palves@redhat.com>
4987
4988 * gdbthread.h (struct regcache): Forward declare.
4989 (struct thread_info) <regcache_data>: Now a struct regcache
4990 pointer.
4991 * inferiors.c (inferior_regcache_data)
4992 (set_inferior_regcache_data): Now work with struct regcache
4993 pointers.
4994 * inferiors.h (struct regcache): Forward declare.
4995 (inferior_regcache_data, set_inferior_regcache_data): Now work
4996 with struct regcache pointers.
4997 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4998 (free_register_cache_thread): Remove struct regcache pointer
4999 casts.
5000
608a1e46
PA
50012015-08-06 Pedro Alves <palves@redhat.com>
5002
5003 * server.c (captured_main): On error, print the exception message
5004 to stderr, and if run_once is set, throw a quit.
5005
f0ce0d3a
PA
50062015-08-06 Pedro Alves <palves@redhat.com>
5007
5008 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5009 the current thread.
5010
bf47e248
PA
50112015-08-06 Pedro Alves <palves@redhat.com>
5012
5013 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5014 reading beyond the passed in buffer length.
5015
b6b9ffcc
PL
50162015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5017
5018 * tracepoint.c (symbol_list) <required>: Remove.
5019
863d01bd
PA
50202015-08-06 Pedro Alves <palves@redhat.com>
5021
5022 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5023 count if stopping and suspending threads.
5024 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5025 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5026 (linux_detach): Complete an ongoing step-over.
5027 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5028 throughout.
5029 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5030 (linux_wait_1): If passing a signal to the inferior after
5031 finishing a step-over, unsuspend and re-resume all lwps. If we
5032 see a single-step event but the thread should be continuing, don't
5033 pass the trap to gdb.
5034 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5035 internal_error instead of gdb_assert.
5036 (enqueue_pending_signal): New function.
5037 (check_ptrace_stopped_lwp_gone): Add debug output.
5038 (start_step_over): Use internal_error instead of gdb_assert.
5039 (complete_ongoing_step_over): New function.
5040 (linux_resume_one_thread): Don't resume a suspended thread.
5041 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5042 it stepping.
5043
00db26fa
PA
50442015-08-06 Pedro Alves <palves@redhat.com>
5045
5046 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5047 (linux_thread_alive): Use lwp_is_marked_dead.
5048 (extended_event_reported): Delete.
5049 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5050 instead of extended_event_reported.
5051 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5052 as well.
5053 (lwp_is_marked_dead): New function.
5054 (lwp_running): Use lwp_is_marked_dead.
5055 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5056 comment.
5057
ad071a30
PA
50582015-08-06 Pedro Alves <palves@redhat.com>
5059
5060 * linux-low.c (linux_wait_1): Move fork event output out of the
5061 !report_to_gdb check. Pass event_child->waitstatus to
5062 target_waitstatus_to_string instead of ourstatus.
5063
524b57e6
YQ
50642015-08-04 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5067 if current_thread is 32 bit.
5068
6085d6f6
YQ
50692015-08-04 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5072 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5073 * server.c (extended_protocol): Remove "static".
5074 * server.h (extended_protocol): Declare it.
5075
8a7e4587
YQ
50762015-08-04 Yao Qi <yao.qi@linaro.org>
5077
5078 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5079 both aarch64 and aarch32.
5080 (aarch64_set_pc): Likewise.
5081
3b53ae99
YQ
50822015-08-04 Yao Qi <yao.qi@linaro.org>
5083
5084 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5085 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5086 arm-with-neon.xml to srv_xmlfiles.
5087 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5088 (is_64bit_tdesc): New function.
5089 (aarch64_linux_read_description): New function.
5090 (aarch64_arch_setup): Call aarch64_linux_read_description.
5091 (regs_info): Rename to regs_info_aarch64.
5092 (aarch64_regs_info): Return right regs_info.
5093 (initialize_low_arch): Call initialize_low_arch_aarch32.
5094
bd9e6534
YQ
50952015-08-04 Yao Qi <yao.qi@linaro.org>
5096
5097 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5098 * linux-aarch32-low.c: New file.
5099 * linux-aarch32-low.h: New file.
5100 * linux-arm-low.c (arm_fill_gregset): Move it to
5101 linux-aarch32-low.c.
5102 (arm_store_gregset): Likewise.
5103 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5104 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5105 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5106 (regs_info): Rename to regs_info_arm.
5107 (arm_regs_info): Return regs_info_aarch32 if
5108 have_ptrace_getregset is 1 and target description is
5109 arm_with_neon or arm_with_vfpv3.
5110 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5111 Call initialize_low_arch_aarch32 instead.
5112
ded48a5e
YQ
51132015-08-04 Yao Qi <yao.qi@linaro.org>
5114
5115 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5116 * linux-low.c: ... here.
5117 * linux-low.h (have_ptrace_getregset): Declare it.
5118
96e9210f
PA
51192015-08-04 Pedro Alves <palves@redhat.com>
5120
5121 * thread-db.c (struct thread_db): Use new typedefs.
5122 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5123 CHK calls.
5124 (disable_thread_event_reporting): Cast result of dlsym to
5125 destination function pointer type.
5126 (thread_db_mourn): Use td_ta_delete_ftype.
5127
af60a1ef
SL
51282015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5129
5130 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5131 arch variant.
5132 (CDX_BREAKPOINT): Define for R2.
5133 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5134 (the_low_target): Add comments.
5135
e8b41681
YQ
51362015-07-30 Yao Qi <yao.qi@linaro.org>
5137
5138 * linux-arm-low.c (arm_hwcap): Remove it.
5139 (arm_read_description): New local variable arm_hwcap. Don't
5140 set arm_hwcap to zero.
5141
89abb039
YQ
51422015-07-30 Yao Qi <yao.qi@linaro.org>
5143
5144 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5145 Use regcache->tdesc instead.
5146 (arm_store_wmmxregset): Likewise.
5147 (arm_fill_vfpregset): Likewise.
5148 (arm_store_vfpregset): Likewise.
5149
deca266c
YQ
51502015-07-30 Yao Qi <yao.qi@linaro.org>
5151
5152 * linux-arm-low.c: Include arch/arm.h.
5153 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5154 (arm_store_gregset): Likewise.
5155
aa58a496
SM
51562015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5157
5158 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5159 ptrace's 4th parameter.
5160
50904b25
YQ
51612015-07-27 Yao Qi <yao.qi@linaro.org>
5162
5163 * configure.srv (case aarch64*-*-linux*): Don't set
5164 srv_linux_usrregs.
5165
5826e159
PA
51662015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5167
5168 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5169 sys/ptrace.h.
5170 * linux-arm-low.c: Likewise.
5171 * linux-cris-low.c: Likewise.
5172 * linux-crisv32-low.c: Likewise.
5173 * linux-low.c: Likewise.
5174 * linux-m68k-low.c: Likewise.
5175 * linux-mips-low.c: Likewise.
5176 * linux-nios2-low.c: Likewise.
5177 * linux-s390-low.c: Likewise.
5178 * linux-sparc-low.c: Likewise.
5179 * linux-tic6x-low.c: Likewise.
5180 * linux-tile-low.c: Likewise.
5181 * linux-x86-low.c: Likewise.
5182
54019719
PA
51832015-07-24 Pedro Alves <palves@redhat.com>
5184
5185 * config.in: Regenerate.
5186 * configure: Regenerate.
5187
eb7aa561
PA
51882015-07-24 Pedro Alves <palves@redhat.com>
5189
5190 * acinclude.m4: Include ../ptrace.m4.
5191 * configure.ac: Call GDB_AC_PTRACE.
5192 * config.in, configure: Regenerate.
5193
55d7b841
YQ
51942015-07-24 Yao Qi <yao.qi@linaro.org>
5195
5196 * linux-low.c (linux_create_inferior): Remove setting to
5197 proc->priv->new_inferior.
5198 (linux_attach): Likewise.
5199 (linux_low_filter_event): Likewise.
5200 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5201
c06cbd92
YQ
52022015-07-24 Yao Qi <yao.qi@linaro.org>
5203
5204 * linux-low.c (linux_arch_setup): New function.
5205 (linux_low_filter_event): If proc->tdesc is NULL and
5206 proc->attached is true, call the_low_target.arch_setup.
5207 Otherwise, keep status pending, and return.
5208 (linux_resume_one_lwp_throw): Don't call get_pc if
5209 thread->while_stepping isn't NULL. Don't call
5210 get_thread_regcache if proc->tdesc is NULL.
5211 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5212 (linux_target_ops): Install arch_setup.
5213 * server.c (start_inferior): Call the_target->arch_setup.
5214 * target.h (struct target_ops) <arch_setup>: New field.
5215 (target_arch_setup): New marco.
5216 * lynx-low.c (lynx_target_ops): Update.
5217 * nto-low.c (nto_target_ops): Update.
5218 * spu-low.c (spu_target_ops): Update.
5219 * win32-low.c (win32_target_ops): Update.
5220
5ae3ebba
YQ
52212015-07-24 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-low.c (linux_add_process): Don't set
5224 proc->priv->new_inferior.
5225 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5226 (linux_attach): Likewise.
5227
eb97750b
YQ
52282015-07-24 Yao Qi <yao.qi@linaro.org>
5229
5230 * server.c (start_inferior): Code refactor.
5231
51aee833
YQ
52322015-07-24 Yao Qi <yao.qi@linaro.org>
5233
5234 * server.c (process_serial_event): Set general_thread.
5235
af1b22f3
YQ
52362015-07-21 Yao Qi <yao.qi@linaro.org>
5237
5238 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5239 aarch64_linux_get_debug_reg_capacity.
5240
554717a3
YQ
52412015-07-17 Yao Qi <yao.qi@linaro.org>
5242
5243 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5244 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5245 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5246 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5247 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5248 (AARCH64_HWP_ALIGNMENT): Likewise.
5249 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5250 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5251 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5252 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5253 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5254 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5255 (struct aarch64_debug_reg_state): Likewise.
5256 (struct arch_lwp_info): Likewise.
5257 (aarch64_align_watchpoint): Likewise.
5258 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5259 (aarch64_watchpoint_length): Likewise.
5260 (aarch64_point_encode_ctrl_reg): Likewise
5261 (aarch64_point_is_aligned): Likewise.
5262 (aarch64_align_watchpoint): Likewise.
5263 (aarch64_linux_set_debug_regs):
5264 (aarch64_dr_state_insert_one_point): Likewise.
5265 (aarch64_dr_state_remove_one_point): Likewise.
5266 (aarch64_handle_breakpoint): Likewise.
5267 (aarch64_handle_aligned_watchpoint): Likewise.
5268 (aarch64_handle_unaligned_watchpoint): Likewise.
5269 (aarch64_handle_watchpoint): Likewise.
5270
c67ca4de
YQ
52712015-07-17 Yao Qi <yao.qi@linaro.org>
5272
5273 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5274 and don't aarch64_get_debug_reg_state. All callers update.
5275 (aarch64_handle_aligned_watchpoint): Likewise.
5276 (aarch64_handle_unaligned_watchpoint): Likewise.
5277 (aarch64_handle_watchpoint): Likewise.
5278 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5279 (aarch64_remove_point): Likewise.
5280
25abf979
YQ
52812015-07-17 Yao Qi <yao.qi@linaro.org>
5282
5283 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5284 debug_printf.
5285 (aarch64_handle_unaligned_watchpoint): Likewise.
5286
db1ff28b
JK
52872015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5288
5289 Revert the previous 3 commits:
5290 Move gdb_regex* to common/
5291 Move linux_find_memory_regions_full & co.
5292 gdbserver build-id attribute generator
5293
700ca40f
JK
52942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5295 Jan Kratochvil <jan.kratochvil@redhat.com>
5296
5297 gdbserver build-id attribute generator.
5298 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5299 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5300 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5301 (find_phdr): New.
5302 (get_dynamic): Use find_pdhr to traverse program headers.
5303 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5304 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5305 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5306 (get_hex_build_id): New.
5307 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5308 to reply XML document.
5309
9904185c
JK
53102015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5311 Jan Kratochvil <jan.kratochvil@redhat.com>
5312
5313 * target.c: Include target/target-utils.h and fcntl.h.
5314 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5315 (target_fileio_read_stralloc): New functions.
5316
6e5b4429
JK
53172015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5318
5319 * Makefile.in (OBS): Add gdb_regex.o.
5320 (gdb_regex.o): New.
5321 * config.in: Rebuilt.
5322 * configure: Rebuilt.
5323
ddc98fbf
JK
53242015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5325 Jan Kratochvil <jan.kratochvil@redhat.com>
5326
5327 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5328 * Makefile.in (OBS): Add target-utils.o.
5329 (linux-maps.o, target-utils.o): New.
5330 * configure.srv (srv_linux_obj): Add linux-maps.o.
5331
e57bb7a0
PL
53322015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5333
5334 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5335 function, return 1.
5336 (the_low_target): Install it.
5337
586b02a9
PA
53382015-07-14 Pedro Alves <palves@redhat.com>
5339
5340 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5341 Instead, ignore ECHILD, and throw an error for other errnos.
5342
58c1b36c
PA
53432015-07-10 Pedro Alves <palves@redhat.com>
5344
5345 * event-loop.c (struct callback_event) <data>: Change type to
5346 gdb_client_data instance instead of gdb_client_data pointer.
5347 (append_callback_event): Adjust.
5348
421530db
PL
53492015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5350
5351 * linux-aarch64-low.c: Add comments for each linux_target_ops
5352 method. Remove comments already covered in target_ops and
5353 linux_target_ops definitions.
5354 (the_low_target): Add comments for each unimplemented method.
5355
c2d65f38
YQ
53562015-07-09 Yao Qi <yao.qi@linaro.org>
5357
5358 * linux-aarch64-low.c (aarch64_regmap): Remove.
5359 (aarch64_usrregs_info): Remove.
5360 (regs_info): Set field usrregs to NULL.
5361
b20a6524
MM
53622015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5363
5364 * linux-low.c: Include "rsp-low.h"
5365 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5366 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5367 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5368 (handle_btrace_enable_pt): New.
5369 (handle_btrace_general_set): Support "pt".
5370 (handle_btrace_conf_general_set): Support "pt:size".
5371
96c97461
PL
53722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5373
5374 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5375 Z_PACKET_SW_BP.
5376
37d66942
PL
53772015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5378
5379 * linux-aarch64-low.c: Remove comment about endianness.
5380 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5381 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5382 memcmp.
5383
dc06243f
GB
53842015-06-24 Gary Benson <gbenson@redhat.com>
5385
5386 * linux-i386-ipa.c (stdint.h): Do not include.
5387 * lynx-i386-low.c (stdint.h): Likewise.
5388 * lynx-ppc-low.c (stdint.h): Likewise.
5389 * mem-break.c (stdint.h): Likewise.
5390 * thread-db.c (stdint.h): Likewise.
5391 * tracepoint.c (stdint.h): Likewise.
5392 * win32-low.c (stdint.h): Likewise.
5393
124e13d9
SM
53942015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5395
5396 * server.c (write_qxfer_response): Update call to
5397 remote_escape_output.
5398
909c2cda
JK
53992015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5400 Jan Kratochvil <jan.kratochvil@redhat.com>
5401
5402 Merge multiple hex conversions.
5403 * gdbreplay.c (tohex): Rename to 'fromhex'.
5404 (logchar): Use fromhex.
5405
24c05f46
JK
54062015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5407
5408 * server.c (handle_qxfer_libraries): Set `version' attribute for
5409 <library-list>.
5410
14d2069a
GB
54112015-06-10 Gary Benson <gbenson@redhat.com>
5412
5413 * target.h (struct target_ops) <multifs_open>: New field.
5414 <multifs_unlink>: Likewise.
5415 <multifs_readlink>: Likewise.
5416 * linux-low.c (nat/linux-namespaces.h): New include.
5417 (linux_target_ops): Initialize the_target->multifs_open,
5418 the_target->multifs_unlink and the_target->multifs_readlink.
5419 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5420 * hostio.c (hostio_fs_pid): New static variable.
5421 (hostio_handle_new_gdb_connection): New function.
5422 (handle_setfs): Likewise.
5423 (handle_open): Use the_target->multifs_open as appropriate.
5424 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5425 (handle_readlink): Use the_target->multifs_readlink as
5426 appropriate.
5427 (handle_vFile): Handle vFile:setfs packets.
5428 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5429 after target_handle_new_gdb_connection.
5430
4b8b5e72
GB
54312015-06-10 Gary Benson <gbenson@redhat.com>
5432
5433 * configure.ac (AC_CHECK_FUNCS): Add setns.
5434 * config.in: Regenerate.
5435 * configure: Likewise.
5436 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5437 (linux-namespaces.o): New rule.
5438 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5439
3ac2e371
GB
54402015-06-09 Gary Benson <gbenson@redhat.com>
5441
5442 * hostio.c (handle_open): Process mode argument with
5443 fileio_to_host_mode.
5444
ca9b78ce
YQ
54452015-06-01 Yao Qi <yao.qi@linaro.org>
5446
5447 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5448 * linux-x86-low.c: Likewise.
5449
bfacd19d
DB
54502015-05-28 Don Breazeal <donb@codesourcery.com>
5451
5452 * linux-low.c (handle_extended_wait): Initialize
5453 thread_info.last_resume_kind for new fork children.
5454
452003ef
PA
54552015-05-15 Pedro Alves <palves@redhat.com>
5456
5457 * target.h (target_handle_new_gdb_connection): Rewrite using if
5458 wrapped in do/while.
5459
1041a03c
JB
54602015-05-14 Joel Brobecker <brobecker@adacore.com>
5461
5462 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5463 * configure, config.in: Regenerate.
5464 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5465 Declare typedef.
5466
c269dbdb
DB
54672015-05-12 Don Breazeal <donb@codesourcery.com>
5468
5469 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5470 PTRACE_EVENT_VFORK_DONE.
5471 (linux_low_ptrace_options, extended_event_reported): Add vfork
5472 events.
5473 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5474 and "vforkdone" for RSP 'T' Stop Reply Packet.
5475 * server.h (report_vfork_events): Declare
5476 global variable.
5477
3a8a0396
DB
54782015-05-12 Don Breazeal <donb@codesourcery.com>
5479
5480 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5481 (the_low_target) <new_fork>: Initialize new member.
5482 * linux-arm-low.c (arm_new_fork): New function.
5483 (the_low_target) <new_fork>: Initialize new member.
5484 * linux-low.c (handle_extended_wait): Call new target function
5485 new_fork.
5486 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5487 * linux-mips-low.c (mips_add_watchpoint): New function
5488 extracted from mips_insert_point.
5489 (the_low_target) <new_fork>: Initialize new member.
5490 (mips_linux_new_fork): New function.
5491 (mips_insert_point): Call mips_add_watchpoint.
5492 * linux-x86-low.c (x86_linux_new_fork): New function.
5493 (the_low_target) <new_fork>: Initialize new member.
5494
de0d863e
DB
54952015-05-12 Don Breazeal <donb@codesourcery.com>
5496
5497 * linux-low.c (handle_extended_wait): Implement return value,
5498 rename argument 'event_child' to 'event_lwp', handle
5499 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5500 (linux_low_ptrace_options): New function.
5501 (linux_low_filter_event): Call linux_low_ptrace_options,
5502 use different argument fo linux_enable_event_reporting,
5503 use return value from handle_extended_wait.
5504 (extended_event_reported): New function.
5505 (linux_wait_1): Call extended_event_reported and set
5506 status to report fork events.
5507 (linux_write_memory): Add pid to debug message.
5508 (reset_lwp_ptrace_options_callback): New function.
5509 (linux_handle_new_gdb_connection): New function.
5510 (linux_target_ops): Initialize new structure member.
5511 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5512 * lynx-low.c: Initialize new structure member.
5513 * remote-utils.c (prepare_resume_reply): Implement stop reason
5514 "fork" for "T" stop message.
5515 * server.c (handle_query): Call handle_new_gdb_connection.
5516 * server.h (report_fork_events): Declare global flag.
5517 * target.h (struct target_ops) <handle_new_gdb_connection>:
5518 New member.
5519 (target_handle_new_gdb_connection): New macro.
5520 * win32-low.c: Initialize new structure member.
5521
ddcbc397
DB
55222015-05-12 Don Breazeal <donb@codesourcery.com>
5523
5524 * mem-break.c (APPEND_TO_LIST): Define macro.
5525 (clone_agent_expr): New function.
5526 (clone_one_breakpoint): New function.
5527 (clone_all_breakpoints): New function.
5528 * mem-break.h: Declare new functions.
5529
89245bc0
DB
55302015-05-12 Don Breazeal <donb@codesourcery.com>
5531
5532 * linux-low.c (linux_supports_fork_events): New function.
5533 (linux_supports_vfork_events): New function.
5534 (linux_target_ops): Initialize new structure members.
5535 (initialize_low): Call linux_check_ptrace_features.
5536 * lynx-low.c (lynx_target_ops): Initialize new structure
5537 members.
5538 * server.c (report_fork_events, report_vfork_events):
5539 New global flags.
5540 (handle_query): Add new features to qSupported packet and
5541 response.
5542 (captured_main): Initialize new global variables.
5543 * target.h (struct target_ops) <supports_fork_events>:
5544 New member.
5545 <supports_vfork_events>: New member.
5546 (target_supports_fork_events): New macro.
5547 (target_supports_vfork_events): New macro.
5548 * win32-low.c (win32_target_ops): Initialize new structure
5549 members.
5550
835205d0
GB
55512015-05-12 Gary Benson <gbenson@redhat.com>
5552
5553 * server.c (handle_qxfer_exec_file): Use current process
5554 if annex is empty.
5555
21e94bd9
SL
55562015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5557
5558 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5559 Remove HAVE_PTRACE_GETREGS conditionals.
5560 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5561 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5562
45614f15
YQ
55632015-05-08 Yao Qi <yao.qi@linaro.org>
5564
5565 * linux-low.c (linux_supports_conditional_breakpoints): New
5566 function.
5567 (linux_target_ops): Install new target method.
5568 * lynx-low.c (lynx_target_ops): Install NULL hook for
5569 supports_conditional_breakpoints.
5570 * nto-low.c (nto_target_ops): Likewise.
5571 * spu-low.c (spu_target_ops): Likewise.
5572 * win32-low.c (win32_target_ops): Likewise.
5573 * server.c (handle_query): Check
5574 target_supports_conditional_breakpoints.
5575 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5576 New field.
5577 (target_supports_conditional_breakpoints): New macro.
5578
80ad801e
PA
55792015-05-06 Pedro Alves <palves@redhat.com>
5580
5581 PR server/18081
5582 * server.c (start_inferior): If the process exits, mourn it.
5583
819843c7
GB
55842015-04-21 Gary Benson <gbenson@redhat.com>
5585
5586 * hostio.c (fileio_open_flags_to_host): Factored out to
5587 fileio_to_host_openflags in common/fileio.c. Single use
5588 updated.
5589
a2d5a9d7
MF
55902015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5591
5592 * linux-xtensa-low.c (xtensa_fill_gregset)
5593 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5594 XCHAL_HAVE_LOOP.
5595
deb44829
MF
55962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5597
5598 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5599 (regs_info): Replace usrregs pointer with NULL.
5600
e57f1de3
GB
56012015-04-17 Gary Benson <gbenson@redhat.com>
5602
5603 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5604 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5605 * server.c (handle_qxfer_exec_file): New function.
5606 (qxfer_packets): Add exec-file entry.
5607 (handle_query): Report qXfer:exec-file:read as supported packet.
5608
62828379
RN
56092015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5610
5611 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5612
b88bb450
GB
56132015-04-09 Gary Benson <gbenson@redhat.com>
5614
5615 * hostio-errno.c (errno_to_fileio_error): Remove function.
5616 Update caller to use remote_fileio_to_fio_error.
5617
c8f4bfdd
YQ
56182015-04-09 Yao Qi <yao.qi@linaro.org>
5619
5620 * linux-low.c (linux_insert_point): Call
5621 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5622 (linux_remove_point): Call remove_memory_breakpoint if type is
5623 raw_bkpt_type_sw.
5624 * linux-x86-low.c (x86_insert_point): Don't call
5625 insert_memory_breakpoint.
5626 (x86_remove_point): Don't call remove_memory_breakpoint.
5627
41f98f02
PA
56282015-04-01 Pedro Alves <palves@redhat.com>
5629 Cleber Rosa <crosa@redhat.com>
5630
5631 * server.c (gdbserver_usage): Reorganize and extend the usage
5632 message.
5633
2bf6fb9d
PA
56342015-03-24 Pedro Alves <palves@redhat.com>
5635
5636 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5637 output. Also dump TRAP_TRACE.
5638 (linux_low_filter_event): In debug output, distinguish a
5639 resume_stop SIGSTOP from a delayed SIGSTOP.
5640
369f6daa
GB
56412015-03-24 Gary Benson <gbenson@redhat.com>
5642
5643 * linux-x86-low.c (x86_linux_new_thread): Moved to
5644 nat/x86-linux.c.
5645 (x86_linux_prepare_to_resume): Likewise.
5646
8e5d4070
GB
56472015-03-24 Gary Benson <gbenson@redhat.com>
5648
5649 * Makefile.in (x86-linux-dregs.o): New rule.
5650 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5651 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5652 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5653 (x86_linux_dr_get): Likewise.
5654 (x86_linux_dr_set): Likewise.
5655 (update_debug_registers_callback): Likewise.
5656 (x86_linux_dr_set_addr): Likewise.
5657 (x86_linux_dr_get_addr): Likewise.
5658 (x86_linux_dr_set_control): Likewise.
5659 (x86_linux_dr_get_control): Likewise.
5660 (x86_linux_dr_get_status): Likewise.
5661 (x86_linux_update_debug_registers): Likewise.
5662
2b95d440
GB
56632015-03-24 Gary Benson <gbenson@redhat.com>
5664
5665 * linux-x86-low.c (x86_linux_update_debug_registers):
5666 New function, factored out from...
5667 (x86_linux_prepare_to_resume): ...this.
5668
14b0bc68
GB
56692015-03-24 Gary Benson <gbenson@redhat.com>
5670
5671 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5672 (x86_linux_dr_set): Likewise.
5673 (update_debug_registers_callback): Likewise.
5674 (x86_linux_dr_set_addr): Likewise.
5675 (x86_linux_dr_get_addr): Likewise.
5676 (x86_linux_dr_set_control): Likewise.
5677 (x86_linux_dr_get_control): Likewise.
5678 (x86_linux_dr_get_status): Likewise.
5679 (x86_linux_prepare_to_resume): Likewise.
5680
5dfe6ca8
GB
56812015-03-24 Gary Benson <gbenson@redhat.com>
5682
5683 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5684 Use perror_with_name. Pass string through gettext.
5685 (x86_linux_dr_set): Likewise.
5686
d33472ad
GB
56872015-03-24 Gary Benson <gbenson@redhat.com>
5688
5689 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5690 (x86_linux_dr_set_addr): ...this.
5691 (x86_dr_low_get_addr): Rename to...
5692 (x86_linux_dr_get_addr): ...this.
5693 (x86_dr_low_set_control): Rename to...
5694 (x86_linux_dr_set_control): ...this.
5695 (x86_dr_low_get_control): Rename to...
5696 (x86_linux_dr_get_control): ...this.
5697 (x86_dr_low_get_status): Rename to...
5698 (x86_linux_dr_get_status): ...this.
5699 (x86_dr_low): Update with new function names.
5700
4b134ca1
GB
57012015-03-24 Gary Benson <gbenson@redhat.com>
5702
5703 * Makefile.in (x86-linux.o): New rule.
5704 * configure.srv: Add x86-linux.o to relevant targets.
5705 * linux-low.c (lwp_set_arch_private_info): New function.
5706 (lwp_arch_private_info): Likewise.
5707 * linux-x86-low.c: Include nat/x86-linux.h.
5708 (arch_lwp_info): Removed structure.
5709 (update_debug_registers_callback):
5710 Use lwp_set_debug_registers_changed.
5711 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5712 and lwp_set_debug_registers_changed.
5713 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5714
34c703da
GB
57152015-03-24 Gary Benson <gbenson@redhat.com>
5716
5717 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5718 * linux-arm-low.c (arm_new_thread): Likewise.
5719 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5720 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5721 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5722 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5723
cff068da
GB
57242015-03-24 Gary Benson <gbenson@redhat.com>
5725
5726 * linux-low.c (ptid_of_lwp): New function.
5727 (lwp_is_stopped): Likewise.
5728 (lwp_stop_reason): Likewise.
5729 * linux-x86-low.c (update_debug_registers_callback):
5730 Use lwp_is_stopped.
5731 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5732 lwp_stop_reason.
5733
b2f7c7e8
GB
57342015-03-24 Gary Benson <gbenson@redhat.com>
5735
5736 * linux-low.h (linux_stop_lwp): Remove declaration.
5737
6d4ee8c6
GB
57382015-03-24 Gary Benson <gbenson@redhat.com>
5739
5740 * linux-low.h: Include nat/linux-nat.h.
5741 * linux-low.c (iterate_over_lwps_args): New structure.
5742 (iterate_over_lwps_filter): New function.
5743 (iterate_over_lwps): Likewise.
5744 * linux-x86-low.c (update_debug_registers_callback):
5745 Update signature to what iterate_over_lwps expects.
5746 Remove PID check that iterate_over_lwps now performs.
5747 (x86_dr_low_set_addr): Use iterate_over_lwps.
5748 (x86_dr_low_set_control): Likewise.
5749
70a0bb6b
GB
57502015-03-24 Gary Benson <gbenson@redhat.com>
5751
5752 * linux-x86-low.c (x86_debug_reg_state): New function.
5753 (x86_linux_prepare_to_resume): Use the above.
5754
7b669087
GB
57552015-03-24 Gary Benson <gbenson@redhat.com>
5756
5757 * linux-low.c (current_lwp_ptid): New function.
5758 * linux-x86-low.c: Include nat/linux-nat.h.
5759 (x86_dr_low_get_addr): Use current_lwp_ptid.
5760 (x86_dr_low_get_control): Likewise.
5761 (x86_dr_low_get_status): Likewise.
5762
eef49a3d
PA
57632015-03-20 Pedro Alves <palves@redhat.com>
5764
5765 * tracepoint.c (cmd_qtstatus): Make "str" const.
5766
b2333d22
PA
57672015-03-20 Pedro Alves <palves@redhat.com>
5768
5769 * server.c (handle_general_set): Make "req_str" const.
5770
23f238d3
PA
57712015-03-19 Pedro Alves <palves@redhat.com>
5772
5773 * linux-low.c (linux_resume_one_lwp): Rename to ...
5774 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5775 instead call perror_with_name.
5776 (check_ptrace_stopped_lwp_gone): New function.
5777 (linux_resume_one_lwp): Reimplement as wrapper around
5778 linux_resume_one_lwp_throw that swallows errors if the LWP is
5779 gone.
5780
91baf43f
PA
57812015-03-19 Pedro Alves <palves@redhat.com>
5782
5783 * linux-low.c (count_events_callback, select_event_lwp_callback):
5784 No longer check whether the thread has resume_stop as last resume
5785 kind.
5786
8bf3b159
PA
57872015-03-19 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c (count_events_callback, select_event_lwp_callback):
5790 Use the lwp's status_pending_p field, not the thread's.
5791
b90fc188
PA
57922015-03-19 Pedro Alves <palves@redhat.com>
5793
5794 * linux-low.c (select_event_lwp_callback): Update comments to
5795 no longer mention SIGTRAP.
5796
464b0089
GB
57972015-03-18 Gary Benson <gbenson@redhat.com>
5798
5799 * server.c (handle_query): Do not report vFile:fstat as supported.
5800
aa9e327f
GB
58012015-03-11 Gary Benson <gbenson@redhat.com>
5802
5803 * hostio.c (sys/types.h): New include.
5804 (sys/stat.h): Likewise.
5805 (common-remote-fileio.h): Likewise.
5806 (handle_fstat): New function.
5807 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5808
791c0056
GB
58092015-03-11 Gary Benson <gbenson@redhat.com>
5810
5811 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5812 struct stat.st_blocks and struct stat.st_blksize.
5813 * configure: Regenerate.
5814 * config.in: Likewise.
5815 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5816 (OBS): Add common-remote-fileio.o.
5817 (common-remote-fileio.o): New rule.
5818
9a9df970
PA
58192015-03-09 Pedro Alves <palves@redhat.com>
5820
5821 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5822 'struct sockaddr' pointer in 'accept' call.
5823
9eb1356e
PA
58242015-03-09 Pedro Alves <palves@redhat.com>
5825
5826 Revert:
5827 2015-03-07 Pedro Alves <palves@redhat.com>
5828 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5829 or <winsock2.h> here. Instead include "gdb_socket.h".
5830 (remote_open): Use union gdb_sockaddr_u.
5831 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5832 or <winsock2.h> here. Instead include "gdb_socket.h".
5833 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5834 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5835 or <sys/un.h>.
5836 (init_named_socket, gdb_agent_helper_thread): Use union
5837 gdb_sockaddr_u.
5838
aac331e4
PA
58392015-03-07 Pedro Alves <palves@redhat.com>
5840
5841 * configure.ac (build_warnings): Move
5842 -Wdeclaration-after-statement to the C-specific set.
5843 * configure: Regenerate.
5844
366c75fc
PA
58452015-03-07 Pedro Alves <palves@redhat.com>
5846
5847 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5848 or <winsock2.h> here. Instead include "gdb_socket.h".
5849 (remote_open): Use union gdb_sockaddr_u.
5850 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5851 or <winsock2.h> here. Instead include "gdb_socket.h".
5852 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5853 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5854 or <sys/un.h>.
5855 (init_named_socket, gdb_agent_helper_thread): Use union
5856 gdb_sockaddr_u.
5857
492d29ea
PA
58582015-03-07 Pedro Alves <palves@redhat.com>
5859
5860 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5861 instead.
5862
60a191ed
YQ
58632015-03-06 Yao Qi <yao.qi@linaro.org>
5864
5865 * linux-aarch64-low.c (aarch64_insert_point): Use
5866 show_debug_regs as a boolean.
5867 (aarch64_remove_point): Likewise.
5868
f5771b1d
PA
58692015-03-05 Pedro Alves <palves@redhat.com>
5870
5871 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5872 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5873 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5874 * nto-low.c (nto_target_ops): Likewise.
5875 * spu-low.c (spu_target_ops): Likewise.
5876 * win32-low.c (win32_target_ops): Likewise.
5877
3e572f71
PA
58782015-03-04 Pedro Alves <palves@redhat.com>
5879
72f4393d 5880 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5881 Decide whether a breakpoint triggered based on the SIGTRAP's
5882 siginfo.si_code.
72f4393d
L
5883 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5884 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5885 (linux_low_filter_event): Check for breakpoints before checking
5886 watchpoints.
5887 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5888 siginfo.si_code.
72f4393d
L
5889 (linux_stopped_by_sw_breakpoint)
5890 (linux_supports_stopped_by_sw_breakpoint)
5891 (linux_stopped_by_hw_breakpoint)
5892 (linux_supports_stopped_by_hw_breakpoint): New functions.
5893 (linux_target_ops): Install new target methods.
3e572f71 5894
1ec68e26
PA
58952015-03-04 Pedro Alves <palves@redhat.com>
5896
5897 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5898 * server.c (swbreak_feature, hwbreak_feature): New globals.
5899 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5900 (captured_main): Clear swbreak_feature and hwbreak_feature.
5901 * server.h (swbreak_feature, hwbreak_feature): Declare.
5902 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5903 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5904 supports_stopped_by_hw_breakpoint>: New fields.
5905 (target_supports_stopped_by_sw_breakpoint)
5906 (target_stopped_by_sw_breakpoint)
5907 (target_supports_stopped_by_hw_breakpoint)
5908 (target_stopped_by_hw_breakpoint): Declare.
5909
15c66dd6
PA
59102015-03-04 Pedro Alves <palves@redhat.com>
5911
5912 enum lwp_stop_reason -> enum target_stop_reason
5913 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5914 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5915 (linux_wait_1, stuck_in_jump_pad_callback)
5916 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5917 (linux_stopped_by_watchpoint):
5918 * linux-low.h (enum lwp_stop_reason): Delete.
5919 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5920 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5921
98fc70d6
YQ
59222015-03-04 Yao Qi <yao.qi@linaro.org>
5923
5924 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5925
dd2ac174
GB
59262015-03-03 Gary Benson <gbenson@redhat.com>
5927
5928 * hostio.c (handle_vFile): Fix prefix lengths.
5929
d68e53f4
MM
59302015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5931
5932 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5933 ptr_bits.
5934
bf2d68ab
AA
59352015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5936
5937 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5938 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5939 (clean): Add "rm -f" for above C files.
5940 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5941 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5942 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5943 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5944 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5945 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5946 (init_registers_s390x_vx_linux64)
5947 (init_registers_s390x_tevx_linux64)
5948 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5949 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5950 declarations.
5951 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5952 (s390_store_vxrs_high): New functions.
5953 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5954 NT_S390_VXRS_HIGH.
5955 (s390_arch_setup): Add logic for selecting one of the new target
5956 descriptions. Activate the new vector regsets if applicable.
5957 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5958 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5959 and init_registers_s390x_tevx_linux64.
5960
c966a859
PA
59612015-03-01 Pedro Alves <palves@redhat.com>
5962
5963 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5964 parameter.
5965
4180215b
PA
59662015-02-27 Pedro Alves <palves@redhat.com>
5967
5968 * linux-x86-low.c (u_debugreg_offset): New function.
5969 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5970
749bab01
PA
59712015-02-27 Pedro Alves <palves@redhat.com>
5972
5973 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5974 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5975 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5976 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5977 (ps_lsetfpregs, ps_getpid)
5978 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5979 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5980 (ps_lsetxregs, ps_plog): Declare.
5981
3c14e5a3
PA
59822015-02-27 Pedro Alves <palves@redhat.com>
5983
5984 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5985 IP_AGENT_EXPORT_FUNC.
5986 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5987 IP_AGENT_EXPORT_FUNC.
5988 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5989 (IP_AGENT_EXPORT): Delete.
5990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5991 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5992 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5993 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5994 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5995 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5996 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5997 (traceframe_read_count, traceframe_write_count)
5998 (traceframes_created, trace_state_variables, get_raw_reg)
5999 (get_trace_state_variable_value, set_trace_state_variable_value)
6000 (ust_loaded, helper_thread_id, cmd_buf): Use
6001 IPA_SYM_EXPORTED_NAME.
6002 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6003 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6004 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6005 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6006 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6007 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6008 EXTERN_C_PUSH/EXTERN_C_POP.
6009 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6010 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6011 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6012 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6013 (traceframe_write_count, traceframe_read_count)
6014 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6015 (about_to_request_buffer_space, get_trace_state_variable_value)
6016 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6017 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6018 EXTERN_C_PUSH/EXTERN_C_POP.
6019 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6020 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6021 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6022 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6023 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6024 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6025 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6026 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6027 Define.
6028 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6029 (IP_AGENT_EXPORT_VAR_DECL): Define.
6030 (tracing): Declare.
6031 (gdb_agent_get_raw_reg): Declare.
6032
fe978cb0
PA
60332015-02-27 Tom Tromey <tromey@redhat.com>
6034 Pedro Alves <palves@redhat.com>
6035
6036 Rename symbols whose names are reserved C++ keywords throughout.
6037
3bc3d82a
PA
60382015-02-27 Pedro Alves <palves@redhat.com>
6039
6040 * Makefile.in (COMPILER): New, get it from autoconf.
6041 (CXX): Get from autoconf instead.
6042 (COMPILE.pre): Use COMPILER.
6043 (CC-LD): Rename to ...
6044 (CC_LD): ... this. Use COMPILER.
6045 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6046 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6047 * acinclude.m4: Include build-with-cxx.m4.
6048 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6049 Disable -Werror by default if building in C++ mode.
6050 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6051 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6052 the C++ compiler. Save/restore CXXFLAGS too.
6053 * configure: Regenerate.
6054
07697489
PA
60552015-02-27 Pedro Alves <palves@redhat.com>
6056
6057 * acinclude.m4: Include libiberty.m4.
6058 * configure.ac: Call libiberty_INIT.
6059 * config.in, configure: Regenerate.
6060
9beb7c4e
PA
60612015-02-26 Pedro Alves <palves@redhat.com>
6062
6063 * linux-low.c (linux_wait_1): When incrementing the PC past a
6064 program breakpoint always use the_low_target.breakpoint_len as
6065 increment, rather than the maximum between that and
6066 the_low_target.decr_pc_after_break.
6067
8090aef2
PA
60682015-02-23 Pedro Alves <palves@redhat.com>
6069
6070 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6071 thread was doing a step-over; always adjust the PC if
6072 we stepped over a permanent breakpoint.
6073 (linux_wait_1): If we stepped over breakpoint that was on top of a
6074 permanent breakpoint, manually advance the PC past it.
6075
bc9540e8
PA
60762015-02-23 Pedro Alves <palves@redhat.com>
6077
6078 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6079 modes.
6080 (x86_fill_gregset, x86_store_gregset): Use it when handling
6081 $orig_eax.
6082
2db9a427
PA
60832015-02-20 Pedro Alves <palves@redhat.com>
6084
6085 * thread-db.c: Include "nat/linux-procfs.h".
6086 (thread_db_init): Skip listing new threads if the kernel supports
6087 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6088
afa8d396
PA
60892015-02-20 Pedro Alves <palves@redhat.com>
6090
6091 * linux-low.c (status_pending_p_callback): Use ptid_match.
6092
c9587f88
AT
60932015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6094
6095 PR breakpoints/16812
6096 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6097 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6098 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6099
b05ec7a5
AT
61002015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6101
6102 PR breakpoints/15956
6103 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6104
d33501a5
MM
61052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6106
6107 * linux-low.c (linux_low_btrace_conf): Print size.
6108 * server.c (handle_btrace_conf_general_set): New.
6109 (hanle_general_set): Call handle_btrace_conf_general_set.
6110 (handle_query): Report Qbtrace-conf:bts:size as supported.
6111
f4abbc16
MM
61122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6113
6114 * linux-low.c (linux_low_enable_btrace): Update parameters.
6115 (linux_low_btrace_conf): New.
6116 (linux_target_ops)<to_btrace_conf>: Initialize.
6117 * server.c (current_btrace_conf): New.
6118 (handle_btrace_enable): Rename to ...
6119 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6120 to target_enable_btrace. Update comment. Update users.
6121 (handle_qxfer_btrace_conf): New.
6122 (qxfer_packets): Add btrace-conf entry.
6123 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6124 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6125 (target_ops)<read_btrace_conf>: New.
6126 (target_enable_btrace): Update parameters.
6127 (target_read_btrace_conf): New.
6128
043c3577
MM
61292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6130
6131 * server.c (handle_btrace_general_set): Remove call to
6132 target_supports_btrace.
6133 (supported_btrace_packets): New.
6134 (handle_query): Call supported_btrace_packets.
6135 * target.h: include btrace-common.h.
6136 (btrace_target_info): Removed.
6137 (supports_btrace, target_supports_btrace): Update parameters.
6138
734b0e4b
MM
61392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6140
6141 * Makefile.in (SFILES): Add common/btrace-common.c.
6142 (OBS): Add common/btrace-common.o.
6143 (btrace-common.o): Add build rules.
6144 * linux-low: Include btrace-common.h.
6145 (linux_low_read_btrace): Use struct btrace_data. Call
6146 btrace_data_init and btrace_data_fini.
6147
d6c146e9
PA
61482015-02-06 Pedro Alves <palves@redhat.com>
6149
6150 * thread-db.c (find_new_threads_callback): Add debug output.
6151
20ba1ce6
PA
61522015-02-04 Pedro Alves <palves@redhat.com>
6153
6154 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6155 (resume_stopped_resumed_lwps): New function.
6156 (linux_wait_for_event_filtered): Use it.
6157
8cc73a39
SDJ
61582015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6159
6160 * Makefile.in (SFILES): Add linux-personality.c.
6161 (linux-personality.o): New rule.
6162 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6163 list of objects to be built.
6164 * linux-low.c: Include nat/linux-personality.h.
6165 (linux_create_inferior): Remove code to disable address space
6166 randomization (moved to ../nat/linux-personality.c). Create
6167 cleanup to disable address space randomization.
6168
fb23d554
SDJ
61692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6170
6171 * Makefile.in (posix-strerror.o): New rule.
6172 (mingw-strerror.o): Likewise.
6173 * configure: Regenerated.
6174 * configure.ac: Source file ../common/common.host. Initialize new
6175 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6176
cdf43629
YQ
61772015-01-14 Yao Qi <yao@codesourcery.com>
6178
6179 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6180 (ppc-linux.o): New rule.
6181 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6182 * configure.ac: AC_CHECK_FUNCS(getauxval).
6183 * config.in: Re-generated.
6184 * configure: Re-generated.
6185 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6186 ppc64_64bit_inferior_p
6187
514c5338
YQ
61882015-01-14 Yao Qi <yao@codesourcery.com>
6189
6190 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6191 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6192 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6193 (PT_ORIG_R3, PT_TRAP): Likewise.
6194 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6195 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6196 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6197
3368c1e5
JB
61982015-01-10 Joel Brobecker <brobecker@adacore.com>
6199
6200 * i387-fp.c (i387_cache_to_xsave): In look over
6201 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6202 zmmh_low_space field by use of zmmh_high_space.
6203
582511be
PA
62042015-01-09 Pedro Alves <palves@redhat.com>
6205
6206 * linux-low.c (step_over_bkpt): Move higher up in the file.
6207 (handle_extended_wait): Don't store the stop_pc here.
6208 (get_stop_pc): Adjust comments and rename to ...
6209 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6210 stopped for a software breakpoint or hardware breakpoint.
6211 (thread_still_has_status_pending_p): New function.
6212 (status_pending_p_callback): Use
6213 thread_still_has_status_pending_p. If the event is no longer
6214 interesting, resume the LWP.
6215 (handle_tracepoints): Add assert.
6216 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6217 (wstatus_maybe_breakpoint): New function.
6218 (cancel_breakpoint): Delete function.
6219 (check_stopped_by_watchpoint): New function, factored out from
6220 linux_low_filter_event.
6221 (lp_status_maybe_breakpoint): Delete function.
6222 (linux_low_filter_event): Remove filter_ptid argument.
6223 Leave thread group exits pending here. Store the LWP's stop PC.
6224 Always leave events pending.
6225 (linux_wait_for_event_filtered): Pull all events out of the
6226 kernel, and leave them all pending.
6227 (count_events_callback, select_event_lwp_callback): Consider all
6228 events.
6229 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6230 (select_event_lwp): Only give preference to the stepping LWP in
6231 all-stop mode. Adjust comments.
6232 (ignore_event): New function.
6233 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6234 references to cancel_breakpoints. Adjust to renames. Also give
6235 equal priority to all LWPs that have had events in non-stop mode.
6236 If reporting a software breakpoint event, unadjust the LWP's PC.
6237 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6238 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6239 Adjust.
6240 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6241 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6242 (linux_stopped_by_watchpoint): Adjust.
6243 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6244 * linux-low.h (enum lwp_stop_reason): New.
6245 (struct lwp_info) <stop_pc>: Adjust comment.
6246 <stopped_by_watchpoint>: Delete field.
6247 <stop_reason>: New field.
6248 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6249 * mem-break.c (software_breakpoint_inserted_here)
6250 (hardware_breakpoint_inserted_here): New function.
6251 * mem-break.h (software_breakpoint_inserted_here)
6252 (hardware_breakpoint_inserted_here): Declare.
6253 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6254 (cancel_breakpoints): Delete.
6255 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6256 (upload_fast_traceframes): Remove references to
6257 cancel_breakpoints.
6258
a33e3959
PA
62592015-01-09 Pedro Alves <palves@redhat.com>
6260
6261 * thread-db.c (find_new_threads_callback): Ignore thread if the
6262 kernel thread ID is -1.
6263
8784d563
PA
62642015-01-09 Pedro Alves <palves@redhat.com>
6265
6266 * linux-low.c (linux_attach_fail_reason_string): Move to
6267 nat/linux-ptrace.c, and rename.
6268 (linux_attach_lwp): Update comment.
6269 (attach_proc_task_lwp_callback): New function.
6270 (linux_attach): Adjust to rename and use
6271 linux_proc_attach_tgid_threads.
6272 (linux_attach_fail_reason_string): Delete declaration.
6273
76f2b779
JB
62742015-01-01 Joel Brobecker <brobecker@adacore.com>
6275
6276 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6277 * server.c (gdbserver_version): Likewise.
6278
fafcc06a
SDJ
62792014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6280
6281 * remote-utils.c: Include ctype.h.
6282 (input_interrupt): Explicitly handle the case when the char
6283 received is the NUL byte. Improve the printing of non-ASCII
6284 characters.
6285
beed38b8
JB
62862014-12-16 Joel Brobecker <brobecker@adacore.com>
6287
6288 * linux-low.c (linux_low_filter_event): Update call to
6289 linux_enable_event_reporting following the addition of
6290 a new parameter to that function.
6291
bf330350
CU
62922014-12-16 Catalin Udma <catalin.udma@freescale.com>
6293
6294 PR server/17457
6295 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6296 (AARCH64_FPCR_REGNO): Likewise.
6297 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6298 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6299 (aarch64_store_fpregset): Likewise.
6300
5227d625
JB
63012014-12-15 Joel Brobecker <brobecker@adacore.com>
6302
6303 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6304 Remove FIXME comment about assumption about N.
6305
f93b65a0
JB
63062014-12-13 Joel Brobecker <brobecker@adacore.com>
6307
6308 * configure.ac: If large-file support is disabled in GDBserver,
6309 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6310 * configure: Regenerate.
6311
e5a9158d
AA
63122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6313
6314 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6315 warning upon ENODATA from ptrace.
6316 * linux-s390-low.c (s390_store_tdb): New.
6317 (s390_regsets): Add regset for NT_S390_TDB.
6318
feea5f36
AA
63192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6320
6321 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6322 without a fill_function.
6323 * linux-s390-low.c (s390_fill_last_break): Remove.
6324 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6325 (s390_arch_setup): Use regset's size instead of fill_function for
6326 loop end condition.
6327
098dbe61
AA
63282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6329
6330 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6331 the regset's store function when ptrace returned an error.
6332 * regcache.c (get_thread_regcache): Invalidate register cache
6333 before fetching inferior's registers.
6334
28eef672
AA
63352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6336
6337 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6338 while-loop as for-loop.
6339 (regsets_store_inferior_registers): Likewise.
6340
bdca27a2
YQ
63412014-11-28 Yao Qi <yao@codesourcery.com>
6342
6343 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6344 * config.in, configure: Re-generate.
6345 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6346 is defined.
6347
9c232dda
YQ
63482014-11-21 Yao Qi <yao@codesourcery.com>
6349
6350 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6351 (AC_CHECK_HEADERS): Remove malloc.h.
6352 * configure: Re-generated.
6353 * config.in: Re-generated.
6354 * server.h: Don't include alloca.h and malloc.h.
6355 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6356 Don't include malloc.h.
6357
43968415
JB
63582014-11-17 Joel Brobecker <brobecker@adacore.com>
6359
6360 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6361 corresponding ERRNO check in same block.
6362
40e91bc7
PA
63632014-11-12 Pedro Alves <palves@redhat.com>
6364
6365 * server.c (cont_thread): Update comment.
6366 (start_inferior, attach_inferior): No longer clear cont_thread.
6367 (handle_v_cont): No longer set cont_thread.
6368 (captured_main): Clear cont_thread each time a GDB connects.
6369
c2c118cf
PA
63702014-11-12 Pedro Alves <palves@redhat.com>
6371
6372 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6373 thread, and don't resume all threads if the Hc thread has exited.
6374
78708b7c
PA
63752014-11-12 Pedro Alves <palves@redhat.com>
6376
6377 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6378 the process group instead of to a specific LWP.
6379
a2abc7de
PA
63802014-10-15 Pedro Alves <palves@redhat.com>
6381
6382 PR server/17487
6383 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6384 parameter.
6385 (arm_set_thread_context): Delete.
6386 (the_low_target): Adjust.
6387 * win32-i386-low.c (debug_registers_changed)
6388 (debug_registers_used): Delete.
6389 (update_debug_registers_callback): New function.
6390 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6391 needing to update their debug registers.
6392 (win32_get_current_dr): New function.
6393 (x86_dr_low_get_addr, x86_dr_low_get_control)
6394 (x86_dr_low_get_status): Fetch the debug register from the thread
6395 record's context.
6396 (i386_initial_stuff): Adjust.
6397 (i386_get_thread_context): Remove current_event parameter. Don't
6398 clear debug_registers_changed nor copy DR values to
6399 debug_reg_state.
6400 (i386_set_thread_context): Delete.
6401 (i386_prepare_to_resume): New function.
6402 (i386_thread_added): Mark the thread as needing to update irs
6403 debug registers.
6404 (the_low_target): Remove i386_set_thread_context and install
6405 i386_prepare_to_resume.
6406 * win32-low.c (win32_get_thread_context): Adjust.
6407 (win32_set_thread_context): Use SetThreadContext
6408 directly.
6409 (win32_prepare_to_resume): New function.
6410 (win32_require_context): New function, factored out from ...
6411 (thread_rec): ... this.
6412 (continue_one_thread): Call win32_prepare_to_resume on each thread
6413 we're about to continue.
6414 (win32_resume): Call win32_prepare_to_resume on the event thread.
6415 * win32-low.h (struct win32_thread_info)
6416 <debug_registers_changed>: New field.
6417 (struct win32_target_ops): Change prototype of set_thread_context,
6418 delete set_thread_context and add prepare_to_resume.
6419 (win32_require_context): New declaration.
6420
a442d071
GB
64212014-10-08 Gary Benson <gbenson@redhat.com>
6422
6423 * server.h: Do not include common-exceptions.h.
6424
6f1947e8
GB
64252014-10-08 Gary Benson <gbenson@redhat.com>
6426
6427 * server.h: Do not include cleanups.h.
6428
63b434a4
JH
64292014-09-30 James Hogan <james.hogan@imgtec.com>
6430
6431 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6432 mips64-dsp-linux.c.
6433
c4d9ceb6
YQ
64342014-09-23 Yao Qi <yao@codesourcery.com>
6435
6436 * linux-low.c (lp_status_maybe_breakpoint): New function.
6437 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6438 (count_events_callback): Likewise.
6439 (select_event_lwp_callback): Likewise.
6440 (cancel_breakpoints_callback): Likewise.
6441
89a5711c
DB
64422014-09-19 Don Breazeal <donb@codesourcery.com>
6443
6444 * linux-low.c (handle_extended_wait): Call
6445 linux_ptrace_get_extended_event.
6446 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6447 linux_is_extended_waitstatus.
6448
bffc0964
JB
64492014-09-16 Joel Brobecker <brobecker@adacore.com>
6450
6451 * Makefile.in (CPPFLAGS): Define.
6452 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6453 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6454
0bfdf32f
GB
64552014-09-16 Gary Benson <gbenson@redhat.com>
6456
6457 * inferiors.h (current_inferior): Renamed as...
6458 (current_thread): New variable. All uses updated.
6459 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6460 (maybe_move_out_of_jump_pad): Likewise.
6461 (cancel_breakpoint): Likewise.
6462 (linux_low_filter_event): Likewise.
6463 (wait_for_sigstop): Likewise.
6464 (linux_resume_one_lwp): Likewise.
6465 (need_step_over_p): Likewise.
6466 (start_step_over): Likewise.
6467 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6468 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6469 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6470 and save_inferior as saved_thread.
6471 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6472 saved_thread.
6473 (regcache_invalidate_thread): Likewise.
6474 * remote-utils.c (prepare_resume_reply): Likewise.
6475 * thread-db.c (thread_db_get_tls_address): Likewise.
6476 (disable_thread_event_reporting): Likewise.
6477 (remove_thread_event_breakpoints): Likewise.
6478 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6479 as saved_thread.
6480 * target.h (set_desired_inferior): Renamed as...
6481 (set_desired_thread): New declaration. All uses updated.
6482 * server.c (myresume): Updated comment to reference thread instead
6483 of inferior.
6484 (handle_serial_event): Likewise.
6485 (handle_target_event): Likewise.
6486
361c8ade
GB
64872014-09-12 Tom Tromey <tromey@redhat.com>
6488 Gary Benson <gbenson@redhat.com>
6489
6490 * regcache.h: Include common-regcache.h.
6491 (regcache_read_pc): Don't declare.
6492 * regcache.c (get_thread_regcache_for_ptid): New function.
6493
bd9269f7
GB
64942014-09-11 Tom Tromey <tromey@redhat.com>
6495 Gary Benson <gbenson@redhat.com>
6496
6497 * symbol.c: New file.
6498 * Makefile.in (SFILES): Add symbol.c.
6499 (OBS): Add symbol.o.
6500
f8c1d06b
GB
65012014-09-11 Gary Benson <gbenson@redhat.com>
6502
6503 * target.c (target_stop_ptid, target_continue_ptid): New
6504 functions.
6505
721ec300
GB
65062014-09-11 Tom Tromey <tromey@redhat.com>
6507 Gary Benson <gbenson@redhat.com>
6508
6509 * target.h: Include target/target.h.
6510 * target.c (target_read_memory, target_read_uint32)
6511 (target_write_memory): New functions.
6512
c5e92cca
GB
65132014-09-11 Gary Benson <gbenson@redhat.com>
6514
6515 * server.h (debug_hw_points): Don't declare.
6516 * server.c (debug_hw_points): Don't define. Replace all uses
6517 with show_debug_regs.
6518 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6519 all uses with show_debug_regs.
6520
2e4bb98a
EBM
65212014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6522
6523 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6524 endianness into account.
6525 (ppc_supply_ptrace_register): Likewise.
6526
ac740bc7
JH
65272014-09-03 James Hogan <james.hogan@imgtec.com>
6528
6529 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6530 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6531
97ea6506
GB
65322014-09-03 Gary Benson <gbenson@redhat.com>
6533
6534 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6535 ALL_DEBUG_ADDRESS_REGISTERS.
6536
df7e5265
GB
65372014-09-02 Gary Benson <gbenson@redhat.com>
6538
6539 * i386-low.h: Renamed as...
6540 * x86-low.h: New file. All type, function and variable name
6541 prefixes changed from "i386_" to "x86_". All references updated.
6542 * i386-low.c: Renamed as...
6543 * x86-low.c: New file. All type, function and variable name
6544 prefixes changed from "i386_" to "x86_". All references updated.
6545
ed859da7
GB
65462014-09-02 Gary Benson <gbenson@redhat.com>
6547
6548 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6549 (x86_linux_new_thread): Likewise.
6550
860789c7
GB
65512014-08-29 Gary Benson <gbenson@redhat.com>
6552
6553 * server.h (setjmp.h): Do not include.
6554 (toplevel): Do not declare.
6555 (common-exceptions.h): Include.
6556 (cleanups.h): Likewise.
6557 * server.c (toplevel): Do not define.
6558 (exit_code): New static global.
6559 (detach_or_kill_for_exit_cleanup): New function.
6560 (main): New function. Original main renamed to...
6561 (captured_main): New function.
6562 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6563
ff55e1b5
GB
65642014-08-29 Gary Benson <gbenson@redhat.com>
6565
6566 * Makefile.in (SFILES): Add common/common-exceptions.c.
6567 (OBS): Add common-exceptions.o.
6568 (common-exceptions.o): New rule.
6569 * utils.c (prepare_to_throw_exception): New function.
6570
e9bcb658
GB
65712014-08-29 Gary Benson <gbenson@redhat.com>
6572
6573 * config.in: Regenerate.
6574 * configure: Likewise.
6575
e3180625
GB
65762014-08-29 Gary Benson <gbenson@redhat.com>
6577
6578 * Makefile.in (SFILES): Add common/cleanups.c.
6579 (OBS): cleanups.o.
6580 (cleanups.o): New rule.
6581
e3d6ba5d
GB
65822014-08-29 Gary Benson <gbenson@redhat.com>
6583
6584 * utils.c (internal_vwarning): New function.
6585
7096e886
GB
65862014-08-28 Gary Benson <gbenson@redhat.com>
6587
6588 * utils.h (fatal): Remove declaration.
6589 * utils.c (fatal): Remove function.
6590
14ce3192
GB
65912014-08-28 Gary Benson <gbenson@redhat.com>
6592
6593 * tracepoint.c (gdb_agent_init): Replace fatal with
6594 perror_with_name.
6595 (initialize_tracepoint): Likewise.
6596
50278d59
GB
65972014-08-28 Gary Benson <gbenson@redhat.com>
6598
6599 * remote-utils.c (remote_prepare): Replace fatal with error.
6600
aa96c426
GB
66012014-08-28 Gary Benson <gbenson@redhat.com>
6602
6603 * linux-low.c (linux_async): Replace fatal with warning.
6604 Tidy up and return.
6605 (linux_start_non_stop): Return -1 if linux_async failed.
6606
f7160e97
GB
66072014-08-28 Gary Benson <gbenson@redhat.com>
6608
6609 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6610 gdb_assert.
6611 (i386_dr_low_get_addr): Remove vague comment.
6612 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6613 gdb_assert.
6614
38e08fca
GB
66152014-08-28 Gary Benson <gbenson@redhat.com>
6616
6617 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6618 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6619 internal_error.
6620 (linux_resume_one_lwp): Likewise.
6621 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6622 gdb_assert.
6623 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6624 with internal_error.
6625 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6626 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6627 (find_register_by_name): Replace fatal with internal_error.
6628 (find_regno): Likewise.
6629 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6630 * thread-db.c (thread_db_create_event): Likewise.
6631 (thread_db_load_search): Likewise.
6632 (try_thread_db_load_1): Likewise.
6633 * tracepoint.c (get_jump_space_head): Replace fatal with
6634 internal_error.
6635 (claim_trampoline_space): Likewise.
6636 (have_fast_tracepoint_trampoline_buffer): Likewise.
6637 (cmd_qtstart): Likewise.
6638 (stop_tracing): Likewise.
6639 (fast_tracepoint_collecting): Likewise.
6640 (target_malloc): Likewise.
6641 (download_tracepoint): Likewise.
6642 (download_trace_state_variables): Replace check with gdb_assert.
6643 (upload_fast_traceframes): Replace fatal with internal_error.
6644
34abf635
GB
66452014-08-19 Tom Tromey <tromey@redhat.com>
6646 Gary Benson <gbenson@redhat.com>
6647
6648 * Makefile.in (SFILES): Add common/common-debug.c.
6649 (OBS): Add common-debug.o.
6650 (common-debug.o): New rule.
6651 * debug.h (debug_printf): Don't declare.
6652 * debug.c (debug_printf): Renamed and rewritten as...
6653 (debug_vprintf): New function.
6654
f6e94d78
GB
66552014-08-19 Gary Benson <gbenson@redhat.com>
6656
6657 * utils.h: Do not include print-utils.h.
6658
9239eeab
GB
66592014-08-19 Tom Tromey <tromey@redhat.com>
6660 Gary Benson <gbenson@redhat.com>
6661
6662 * server.h: Add static assertion.
6663 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6664
ef87c8bb
GB
66652014-08-19 Tom Tromey <tromey@redhat.com>
6666 Gary Benson <gbenson@redhat.com>
6667
6668 * Makefile.in (SFILES): Add common/errors.c.
6669 (OBS): Add errors.o.
6670 (IPA_OBS): Add errors-ipa.o.
6671 (errors.o): New rule.
6672 (errors-ipa.o): Likewise.
6673 * utils.h (perror_with_name, error, warning): Don't declare.
6674 * utils.c (warning): Renamed and rewritten as...
6675 (vwarning): New function.
6676 (error): Renamed and rewritten as...
6677 (verror): New function.
6678 (internal_error): Renamed and rewritten as...
6679 (internal_verror): New function.
6680
bb974a24
GB
66812014-08-07 Gary Benson <gbenson@redhat.com>
6682
6683 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6684 * configure: Regenerate.
6685 * config.in: Likewise.
6686 * server.h: Do not include errno.h.
6687 * event-loop.c: Likewise.
6688 * hostio-errno.c: Likewise.
6689 * linux-low.c: Likewise.
6690 * remote-utils.c: Likewise.
6691 * spu-low.c: Likewise.
6692 * utils.c: Likewise.
6693 * gdbreplay.c: Unconditionally include errno.h.
6694
6d3d12eb
GB
66952014-08-07 Gary Benson <gbenson@redhat.com>
6696
6697 * server.h: Do not include string.h.
6698 * event-loop.c: Likewise.
6699 * linux-low.c: Likewise.
6700 * regcache.c: Likewise.
6701 * remote-utils.c: Likewise.
6702 * spu-low.c: Likewise.
6703 * utils.c: Likewise.
6704
dccbb609
GB
67052014-08-07 Gary Benson <gbenson@redhat.com>
6706
6707 * server.h: Do not include gdb_assert.h.
6708
e76df0d0
GB
67092014-08-07 Gary Benson <gbenson@redhat.com>
6710
6711 * server.h: Do not include common-utils.h.
6712
4cb9c816
GB
67132014-08-07 Gary Benson <gbenson@redhat.com>
6714
6715 * server.h: Do not include ptid.h.
6716 * notif.h: Likewise.
6717
3995eeee
GB
67182014-08-07 Gary Benson <gbenson@redhat.com>
6719
6720 * server.h: Do not include gdb_locale.h.
6721
cb9f1a9b
GB
67222014-08-07 Gary Benson <gbenson@redhat.com>
6723
6724 * server.h: Do not include gdb/signals.h.
6725 * win32-low.c: Likewise.
6726
a5fceff8
GB
67272014-08-07 Gary Benson <gbenson@redhat.com>
6728
6729 * server.h: Do not include pathmax.h.
6730
b9391142
GB
67312014-08-07 Gary Benson <gbenson@redhat.com>
6732
6733 * server.h: Do not include libiberty.h.
6734 * linux-bfin-low.c: Likewise.
6735
0e443c87
GB
67362014-08-07 Gary Benson <gbenson@redhat.com>
6737
6738 * server.h: Do not include ansidecl.h.
6739
8ebb3f56
GB
67402014-08-07 Gary Benson <gbenson@redhat.com>
6741
6742 * linux-x86-low.c: Do not include stddef.h.
6743 * lynx-ppc-low.c: Likewise.
6744 * tracepoint.c: Likewise.
6745
8980bdf6
GB
67462014-08-07 Gary Benson <gbenson@redhat.com>
6747
6748 * server.h: Do not include stdarg.h.
6749 * nto-low.c: Likewise.
6750
d7096f71
GB
67512014-08-07 Gary Benson <gbenson@redhat.com>
6752
6753 * server.h: Do not include stdlib.h.
6754 * inferiors.c: Likewise.
6755 * linux-low.c: Likewise.
6756 * regcache.c: Likewise.
6757 * spu-low.c: Likewise.
6758 * tracepoint.c: Likewise.
6759 * utils.c: Likewise.
6760
d02f550d
GB
67612014-08-07 Gary Benson <gbenson@redhat.com>
6762
6763 * server.h: Do not include stdio.h.
6764 * linux-low.c: Likewise.
6765 * remote-utils.c: Likewise.
6766 * spu-low.c: Likewise.
6767 * utils.c: Likewise.
6768 * wincecompat.c: Likewise.
6769
87f6c4e3
GB
67702014-08-06 Gary Benson <gbenson@redhat.com>
6771
6772 * regcache.c (init_register_cache): Move conditionals inside if.
6773
7089dca4
GB
67742014-08-06 Gary Benson <gbenson@redhat.com>
6775
6776 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6777
462f517e
GB
67782014-07-31 Gary Benson <gbenson@redhat.com>
6779
6780 * ax.h: Do not include server.h.
6781 * gdbthread.h: Likewise.
6782 * lynx-low.h: Likewise.
6783 * notif.h: Likewise.
6784
976411d6
GB
67852014-07-30 Gary Benson <gbenson@redhat.com>
6786
6787 * server.h: Include common-defs.h.
6788 Do not include config.h or build-gnulib-gdbserver/config.h.
6789
d41f6d8e
GB
67902014-07-30 Gary Benson <gbenson@redhat.com>
6791
6792 * hostio-errno.c: Move server.h to top of includes list.
6793 * inferiors.c: Likewise.
6794 * linux-x86-low.c: Likewise.
6795 * notif.c: Include server.h.
6796
314c6a35
TT
67972014-07-24 Tom Tromey <tromey@redhat.com>
6798 Gary Benson <gbenson@redhat.com>
6799
6800 * server.h (CORE_ADDR): Now unsigned.
6801
69ff6be5
PA
68022014-07-16 Pedro Alves <palves@redhat.com>
6803
6804 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6805
ce9e3fe7
PA
68062014-07-15 Pedro Alves <palves@redhat.com>
6807
6808 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6809 copy.
6810
e76126e8
PA
68112014-07-11 Pedro Alves <palves@redhat.com>
6812
6813 * linux-low.c (kill_wait_lwp): New function, based on
6814 kill_one_lwp_callback, but use my_waitpid directly.
6815 (kill_one_lwp_callback, linux_kill): Use it.
6816
8e9db26e
PA
68172014-06-23 Pedro Alves <palves@redhat.com>
6818
6819 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6820 before setting DR0..DR3.
6821
698b3e08
GB
68222014-06-20 Gary Benson <gbenson@redhat.com>
6823
6824 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6825 * configure: Regenerated.
6826 * config.in: Likewise.
6827
125f8a3d
GB
68282014-06-20 Gary Benson <gbenson@redhat.com>
6829
6830 * Makefile.in (SFILES): Update locations for files moved
6831 from common to nat.
6832 (object file files): Reordered.
6833
42995dbd
GB
68342014-06-20 Gary Benson <gbenson@redhat.com>
6835
6836 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6837 (i386_dr_low_set_addr): Likewise.
6838 (i386_dr_low_get_addr): Likewise.
6839 (i386_dr_low_can_set_control): Likewise.
6840 (i386_dr_low_set_control): Likewise.
6841 (i386_dr_low_get_control): Likewise.
6842 (i386_dr_low_get_status): Likewise.
6843 (i386_get_debug_register_length): Likewise.
6844 * linux-x86-low.c (i386_dr_low_set_addr):
6845 Changed signature. Made static.
6846 (i386_dr_low_get_addr): Likewise.
6847 (i386_dr_low_set_control): Likewise.
6848 (i386_dr_low_get_control): Likewise.
6849 (i386_dr_low_get_status): Likewise.
6850 (i386_dr_low): New global variable.
6851 * win32-i386-low.c (i386_dr_low_set_addr):
6852 Changed signature. Made static.
6853 (i386_dr_low_get_addr): Likewise.
6854 (i386_dr_low_set_control): Likewise.
6855 (i386_dr_low_get_control): Likewise.
6856 (i386_dr_low_get_status): Likewise.
6857 (i386_dr_low): New global variable.
6858
e1d2394b
MS
68592014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6860
6861 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6862 * Makefile.in (AR, AR_FLAGS): Define.
6863 * configure: Regenerate.
6864
3a8ee006
GB
68652014-06-19 Gary Benson <gbenson@redhat.com>
6866
6867 * Makefile.in (i386-dregs.o): New rule.
6868 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6869 * i386-low.c (target.h): Remove include.
6870 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6871 (DR_CONTROL_SHIFT): Likewise.
6872 (DR_CONTROL_SIZE): Likewise.
6873 (DR_RW_EXECUTE): Likewise.
6874 (DR_RW_WRITE): Likewise.
6875 (DR_RW_READ): Likewise.
6876 (DR_RW_IORW): Likewise.
6877 (DR_LEN_1): Likewise.
6878 (DR_LEN_2): Likewise.
6879 (DR_LEN_4): Likewise.
6880 (DR_LEN_8): Likewise.
6881 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6882 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6883 (DR_ENABLE_SIZE): Likewise.
6884 (DR_LOCAL_SLOWDOWN): Likewise.
6885 (DR_GLOBAL_SLOWDOWN): Likewise.
6886 (DR_CONTROL_RESERVED): Likewise.
6887 (I386_DR_CONTROL_MASK): Likewise.
6888 (I386_DR_VACANT): Likewise.
6889 (I386_DR_LOCAL_ENABLE): Likewise.
6890 (I386_DR_GLOBAL_ENABLE): Likewise.
6891 (I386_DR_DISABLE): Likewise.
6892 (I386_DR_SET_RW_LEN): Likewise.
6893 (I386_DR_GET_RW_LEN): Likewise.
6894 (I386_DR_WATCH_HIT): Likewise.
6895 (i386_wp_op_t): Likewise.
6896 (i386_show_dr): Likewise.
6897 (i386_length_and_rw_bits): Likewise.
6898 (i386_insert_aligned_watchpoint): Likewise.
6899 (i386_remove_aligned_watchpoint): Likewise.
6900 (i386_handle_nonaligned_watchpoint): Likewise.
6901 i386_update_inferior_debug_regs(): Likewise.
6902 (i386_dr_insert_watchpoint): Likewise.
6903 (i386_dr_remove_watchpoint): Likewise.
6904 (i386_dr_region_ok_for_watchpoint): Likewise.
6905 (i386_dr_stopped_data_address): Likewise.
6906 (i386_dr_stopped_by_watchpoint): Likewise.
6907
8f26655c
GB
69082014-06-19 Gary Benson <gbenson@redhat.com>
6909
6910 * i386-low.c (i386_dr_show): Renamed to
6911 i386_show_dr and made static. All uses updated.
6912 (i386_dr_length_and_rw_bits): Renamed to
6913 i386_length_and_rw_bits and made static.
6914 All uses updated.
6915 (i386_dr_insert_aligned_watchpoint): Renamed to
6916 i386_insert_aligned_watchpoint and made static.
6917 All uses updated.
6918 (i386_dr_remove_aligned_watchpoint): Renamed to
6919 i386_remove_aligned_watchpoint and made static.
6920 All uses updated.
6921 (i386_dr_update_inferior_debug_regs): Renamed to
6922 i386_update_inferior_debug_regs and made static.
6923 All uses updated.
6924
b9228891
GB
69252014-06-18 Gary Benson <gbenson@redhat.com>
6926
5171def3
GB
6927 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6928 (i386_dr_low_can_set_control): Likewise.
6929 (i386_get_debug_register_length): Likewise.
6930 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6931 (i386_dr_low_can_set_control): Likewise.
6932 (i386_get_debug_register_length): Likewise.
6933
69342014-06-17 Gary Benson <gbenson@redhat.com>
6935
b9228891
GB
6936 * i386-low.h (i386-dregs.h): New include.
6937 (DR_FIRSTADDR): Now in i386-dregs.h.
6938 (DR_LASTADDR): Likewise.
6939 (DR_NADDR): Likewise.
6940 (DR_STATUS): Likewise.
6941 (DR_CONTROL): Likewise.
6942 (i386_debug_reg_state): Likewise.
6943 (i386_dr_insert_watchpoint): Likewise.
6944 (i386_dr_remove_watchpoint): Likewise.
6945 (i386_dr_region_ok_for_watchpoint): Likewise.
6946 (i386_dr_stopped_data_address): Likewise.
6947 (i386_dr_stopped_by_watchpoint): Likewise.
6948 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6949
4be83cc2
GB
69502014-06-18 Gary Benson <gbenson@redhat.com>
6951
6952 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6953 i386_dr_insert_watchpoint.
6954 (i386_low_remove_watchpoint): Renamed to
6955 i386_dr_remove_watchpoint.
6956 (i386_low_region_ok_for_watchpoint): Renamed to
6957 i386_dr_region_ok_for_watchpoint.
6958 (i386_low_stopped_data_address): Renamed to
6959 i386_dr_stopped_data_address.
6960 (i386_low_stopped_by_watchpoint): Renamed to
6961 i386_dr_stopped_by_watchpoint.
6962 * i386-low.c (i386_show_dr): Renamed to
6963 i386_dr_show and made nonstatic. All uses updated.
6964 (i386_length_and_rw_bits): Renamed to
6965 i386_dr_length_and_rw_bits and made nonstatic.
6966 All uses updated.
6967 (i386_insert_aligned_watchpoint): Renamed to
6968 i386_dr_insert_aligned_watchpoint and made nonstatic.
6969 All uses updated.
6970 (i386_remove_aligned_watchpoint): Renamed to
6971 i386_dr_remove_aligned_watchpoint and made nonstatic.
6972 All uses updated.
6973 (i386_update_inferior_debug_regs): Renamed to
6974 i386_dr_update_inferior_debug_regs and made nonstatic.
6975 All uses updated.
6976 (i386_low_insert_watchpoint): Renamed to
6977 i386_dr_insert_watchpoint. All uses updated.
6978 (i386_low_remove_watchpoint): Renamed to
6979 i386_dr_remove_watchpoint. All uses updated.
6980 (i386_low_region_ok_for_watchpoint): Renamed to
6981 i386_dr_region_ok_for_watchpoint. All uses updated.
6982 (i386_low_stopped_data_address): Renamed to
6983 i386_dr_stopped_data_address. All uses updated.
6984 (i386_low_stopped_by_watchpoint): Renamed to
6985 i386_dr_stopped_by_watchpoint. All uses updated.
6986
131aa0d4
GB
69872014-06-18 Gary Benson <gbenson@redhat.com>
6988
6989 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6990 (i386_dr_low_can_set_control): Likewise.
6991 (i386_insert_aligned_watchpoint): New check.
6992
d9305f7f
GB
69932014-06-18 Gary Benson <gbenson@redhat.com>
6994
6995 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6996 Renamed to state.
6997
e927c9fc
GB
69982014-06-18 Gary Benson <gbenson@redhat.com>
6999
7000 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7001 instead of fatal and error.
7002 (i386_handle_nonaligned_watchpoint): Likewise.
7003
1b6d4134
GB
70042014-06-18 Gary Benson <gbenson@redhat.com>
7005
7006 * i386-low.c (i386_get_debug_register_length): New macro.
7007 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7008 (i386_show_dr): Use debug_printf instead of fprintf. Use
7009 phex to format values.
7010
6e62758f
GB
70112014-06-18 Gary Benson <gbenson@redhat.com>
7012
7013 * i386-low.h: Comment changes.
7014 * i386-low.c: Likewise.
7015
fc6e2f03
GB
70162014-06-18 Gary Benson <gbenson@redhat.com>
7017
7018 * i386-low.c: Whitespace changes.
7019
f9d1eeed
TT
70202014-06-12 Tom Tromey <tromey@redhat.com>
7021
7022 * utils.c (freeargv): Remove.
7023
0b04e523
TT
70242014-06-12 Tom Tromey <tromey@redhat.com>
7025
7026 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7027 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7028 (parse_debug_format_options): Likewise.
7029 (gdbserver_usage): Likewise.
7030 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7031 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7032 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7033 against libiberty.
7034 ($(LIBGNU)): Depend on libiberty.
7035 (all-lib): Recurse into all subdirs.
7036 (install-only): Invoke "install" target in subdirs.
7037 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7038 targets.
7039 * configure: Rebuild.
7040 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7041 for vasprintf, vsnprintf, or gettimeofday.
7042 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7043 srv_tgtobj.
7044
270c9937
JB
70452014-06-05 Joel Brobecker <brobecker@adacore.com>
7046
7047 * development.sh: Delete.
7048 * Makefile.in (config.status): Adjust dependency on development.sh.
7049 * configure.ac: Adjust development.sh source call.
7050 * configure: Regenerate.
7051
0a261ed8
PA
70522014-06-02 Pedro Alves <palves@redhat.com>
7053
7054 * ax.c (gdb_free_agent_expr): New function.
7055 * ax.h (gdb_free_agent_expr): New declaration.
7056 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7057 list.
7058 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7059 static.
7060 (clear_breakpoint_conditions_and_commands): New function.
7061 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7062 (clear_breakpoint_conditions_and_commands): New declaration.
7063
e9dae05e
RR
70642014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7065
7066 * linux-aarch64-low.c (asm/ptrace.h): Include.
7067
5876f503
JK
70682014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7069
7070 Fix TLS access for -static -pthread.
7071 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7072 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7073 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7074
802e8e6d
PA
70752014-05-20 Pedro Alves <palves@redhat.com>
7076
7077 * linux-aarch64-low.c (aarch64_insert_point)
7078 (aarch64_remove_point): No longer check whether the type is
7079 supported here. Adjust to new interface.
7080 (the_low_target): Install aarch64_supports_z_point_type as
7081 supports_z_point_type method.
7082 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7083 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7084 instead of a Z packet char. Adjust.
7085 (arm_supports_z_point_type): New function.
7086 (arm_insert_point, arm_remove_point): Adjust to new interface.
7087 (the_low_target): Install arm_supports_z_point_type.
7088 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7089 (cris_insert_point, cris_remove_point): Adjust to new interface.
7090 Don't check whether the type is supported here.
7091 (the_low_target): Install cris_supports_z_point_type.
7092 * linux-low.c (linux_supports_z_point_type): New function.
7093 (linux_insert_point, linux_remove_point): Adjust to new interface.
7094 * linux-low.h (struct linux_target_ops) <insert_point,
7095 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7096 raw_breakpoint pointer parameter.
7097 <supports_z_point_type>: New method.
7098 * linux-mips-low.c (mips_supports_z_point_type): New function.
7099 (mips_insert_point, mips_remove_point): Adjust to new interface.
7100 Use mips_supports_z_point_type.
7101 (the_low_target): Install mips_supports_z_point_type.
7102 * linux-ppc-low.c (the_low_target): Install NULL as
7103 supports_z_point_type method.
7104 * linux-s390-low.c (the_low_target): Install NULL as
7105 supports_z_point_type method.
7106 * linux-sparc-low.c (the_low_target): Install NULL as
7107 supports_z_point_type method.
7108 * linux-x86-low.c (x86_supports_z_point_type): New function.
7109 (x86_insert_point): Adjust to new insert_point interface. Use
7110 insert_memory_breakpoint. Adjust to new
7111 i386_low_insert_watchpoint interface.
7112 (x86_remove_point): Adjust to remove_point interface. Use
7113 remove_memory_breakpoint. Adjust to new
7114 i386_low_remove_watchpoint interface.
7115 (the_low_target): Install x86_supports_z_point_type.
7116 * lynx-low.c (lynx_target_ops): Install NULL as
7117 supports_z_point_type callback.
7118 * nto-low.c (nto_supports_z_point_type): New.
7119 (nto_insert_point, nto_remove_point): Adjust to new interface.
7120 (nto_target_ops): Install nto_supports_z_point_type.
7121 * mem-break.c: Adjust intro comment.
7122 (struct raw_breakpoint) <raw_type, size>: New fields.
7123 <inserted>: Update comment.
7124 <shlib_disabled>: Delete field.
7125 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7126 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7127 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7128 (raw_bkpt_type_to_target_hw_bp_type): New function.
7129 (find_enabled_raw_code_breakpoint_at): New function.
7130 (find_raw_breakpoint_at): New type and size parameters. Use them.
7131 (insert_memory_breakpoint): New function, based off
7132 set_raw_breakpoint_at.
7133 (remove_memory_breakpoint): New function.
7134 (set_raw_breakpoint_at): Reimplement.
7135 (set_breakpoint): New, based on set_breakpoint_at.
7136 (set_breakpoint_at): Reimplement.
7137 (delete_raw_breakpoint): Go through the_target->remove_point
7138 instead of assuming memory breakpoints.
7139 (find_gdb_breakpoint_at): Delete.
7140 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7141 (find_gdb_breakpoint): New function.
7142 (set_gdb_breakpoint_at): Delete.
7143 (z_type_supported): New function.
7144 (set_gdb_breakpoint_1): New function, loosely based off
7145 set_gdb_breakpoint_at.
7146 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7147 (delete_gdb_breakpoint_at): Delete.
7148 (delete_gdb_breakpoint_1): New function, loosely based off
7149 delete_gdb_breakpoint_at.
7150 (delete_gdb_breakpoint): New function.
7151 (clear_gdb_breakpoint_conditions): Rename to ...
7152 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7153 breakpoint.
7154 (add_condition_to_breakpoint): Make static.
7155 (add_breakpoint_condition): Take a struct breakpoint pointer
7156 instead of an address. Adjust.
7157 (gdb_condition_true_at_breakpoint): Rename to ...
7158 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7159 z_type parameter.
7160 (gdb_condition_true_at_breakpoint): Reimplement.
7161 (add_breakpoint_commands): Take a struct breakpoint pointer
7162 instead of an address. Adjust.
7163 (gdb_no_commands_at_breakpoint): Rename to ...
7164 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7165 parameter. Return true if no breakpoint was found. Change debug
7166 output.
7167 (gdb_no_commands_at_breakpoint): Reimplement.
7168 (run_breakpoint_commands): Rename to ...
7169 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7170 and change return type to boolean.
7171 (run_breakpoint_commands): New function.
7172 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7173 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7174 breakpoint. Go through the_target->remove_point instead of
7175 assuming memory breakpoint.
7176 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7177 software and hardware breakpoints.
7178 (reinsert_raw_breakpoint): Go through the_target->insert_point
7179 instead of assuming memory breakpoint.
7180 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7181 software and hardware breakpoints.
7182 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7183 Check both software and hardware breakpoints.
7184 (validate_inserted_breakpoint): Assert the breakpoint is a
7185 software breakpoint. Set the inserted flag to -1 instead of
7186 setting shlib_disabled.
7187 (delete_disabled_breakpoints): Adjust.
7188 (validate_breakpoints): Only validate software breakpoints.
7189 Adjust to inserted flag change.
7190 (check_mem_read, check_mem_write): Skip breakpoint types other
7191 than software breakpoints. Adjust to inserted flag change.
7192 * mem-break.h (enum raw_bkpt_type): New enum.
7193 (raw_breakpoint, struct process_info): Forward declare.
7194 (Z_packet_to_target_hw_bp_type): Delete declaration.
7195 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7196 (set_gdb_breakpoint, delete_gdb_breakpoint)
7197 (clear_breakpoint_conditions): New declarations.
7198 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7199 (breakpoint_inserted_here): Update comment.
7200 (add_breakpoint_condition, add_breakpoint_commands): Replace
7201 address parameter with a breakpoint pointer parameter.
7202 (gdb_breakpoint_here): Update comment.
7203 (delete_gdb_breakpoint_at): Delete.
7204 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7205 * server.c (process_point_options): Take a struct breakpoint
7206 pointer instead of an address. Adjust.
7207 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7208 delete_gdb_breakpoint.
7209 * spu-low.c (spu_target_ops): Install NULL as
7210 supports_z_point_type method.
7211 * target.h: Include mem-break.h.
7212 (struct target_ops) <prepare_to_access_memory>: Update comment.
7213 <supports_z_point_type>: New field.
7214 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7215 instead of a char. Also take a raw breakpoint pointer.
7216 * win32-arm-low.c (the_low_target): Install NULL as
7217 supports_z_point_type.
7218 * win32-i386-low.c (i386_supports_z_point_type): New function.
7219 (i386_insert_point, i386_remove_point): Adjust to new interface.
7220 (the_low_target): Install i386_supports_z_point_type.
7221 * win32-low.c (win32_supports_z_point_type): New function.
7222 (win32_insert_point, win32_remove_point): Adjust to new interface.
7223 (win32_target_ops): Install win32_supports_z_point_type.
7224 * win32-low.h (struct win32_target_ops):
7225 <supports_z_point_type>: New method.
7226 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7227 instead of a char. Also take a raw breakpoint pointer.
7228
932539e3
PA
72292014-05-20 Pedro Alves <palves@redhat.com>
7230
7231 * mem-break.h: Include break-common.h.
7232 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7233 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7234 (Z_packet_to_target_hw_bp_type): New declaration.
7235 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7236 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7237 (Z_PACKET_ACCESS_WP): Delete macros.
7238 (Z_packet_to_hw_type): Delete function.
7239 * i386-low.h: Don't include break-common.h here.
7240 (Z_packet_to_hw_type): Delete declaration.
7241 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7242 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7243 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7244 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7245 * linux-aarch64-low.c: Don't include break-common.h here.
7246 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7247 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7248 (Z_packet_to_target_hw_bp_type): Delete function.
7249 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7250 function.
7251 (mips_insert_point, mips_remove_point): Use
7252 Z_packet_to_target_hw_bp_type.
7253
4ff0d3d8
PA
72542014-05-20 Pedro Alves <palves@redhat.com>
7255
7256 * linux-aarch64-low.c: Include break-common.h.
7257 (enum target_point_type): Delete.
7258 (Z_packet_to_point_type): Rename to ...
7259 (Z_packet_to_target_hw_bp_type): ... this, and return a
7260 target_hw_bp_type instead.
7261 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7262 instead of an enum target_point_type.
7263 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7264 breakpoint type.
7265 (aarch64_dr_state_insert_one_point)
7266 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7267 (aarch64_handle_aligned_watchpoint)
7268 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7269 Take an enum target_hw_bp_type instead of an enum
7270 target_point_type.
7271 (aarch64_supports_z_point_type): New function.
7272 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7273 use Z_packet_to_target_hw_bp_type.
7274
786dc519
JB
72752014-05-20 Joel Brobecker <brobecker@adacore.com>
7276
7277 * configure.ac: Only use -Werror by default when DEVELOPMENT
7278 is true.
7279 * configure: Regenerate.
7280
9e0aa64f
JK
72812014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7282
7283 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7284 * linux-x86-low.c (X86_64_USER_REGS): New.
7285 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7286
2b577b92
YQ
72872014-04-28 Yao Qi <yao@codesourcery.com>
7288
7289 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7290 name.
7291
94611da2
PA
72922014-04-25 Pedro Alves <palves@redhat.com>
7293
7294 PR server/16255
7295 * linux-low.c (linux_attach_fail_reason_string): New function.
7296 (linux_attach_lwp): Delete.
7297 (linux_attach_lwp_1): Rename to ...
7298 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7299 argument. Remove "initial" parameter. Return int instead of
7300 void. Don't error or warn here.
7301 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7302 failure to attach to the tgid. Call warning when failing to
7303 attach to an lwp.
7304 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7305 argument. Remove "initial" parameter. Return int instead of
7306 void. Don't error or warn here.
7307 (linux_attach_fail_reason_string): New declaration.
7308 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7309 interface change. Use linux_attach_fail_reason_string.
7310
01f9f808
MS
73112014-04-24 Michael Sturm <michael.sturm@mintel.com>
7312 Walfred Tedeschi <walfred.tedeschi@intel.com>
7313
7314 * Makefile.in: Added rules to handle new files
7315 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7316 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7317 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7318 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7319 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7320 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7321 x32-avx512-linux.o.
7322 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7323 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7324 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7325 i386/x32-avx512.xml.
7326 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7327 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7328 i386/x32-avx512-linux.xml.
7329 * i387-fp.c (num_avx512_k_registers): New constant for number
7330 of K registers.
7331 (num_avx512_zmmh_low_registers): New constant for number of
7332 lower ZMM registers (0-15).
7333 (num_avx512_zmmh_high_registers): New constant for number of
7334 higher ZMM registers (16-31).
7335 (num_avx512_ymmh_registers): New contant for number of higher
7336 YMM registers (ymm16-31 added by avx521 on x86_64).
7337 (num_avx512_xmm_registers): New constant for number of higher
7338 XMM registers (xmm16-31 added by AVX512 on x86_64).
7339 (struct i387_xsave): Add space for AVX512 registers.
7340 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7341 Add code to handle AVX512 registers.
7342 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7343 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7344 prototypei from generated file.
7345 (tdesc_amd64_avx512_linux): Likewise.
7346 (init_registers_x32_avx512_linux): Likewise.
7347 (tdesc_x32_avx512_linux): Likewise.
7348 (init_registers_i386_avx512_linux): Likewise.
7349 (tdesc_i386_avx512_linux): Likewise.
7350 (x86_64_regmap): Add AVX512 registers.
7351 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7352 mask.
7353 (initialize_low_arch): Add code to initialize AVX512 registers.
7354
51aa91f9
PA
73552014-04-23 Pedro Alves <palves@redhat.com>
7356
7357 * mem-break.c (find_gdb_breakpoint_at): Make static.
7358 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7359
a4165e94
PA
73602014-04-23 Pedro Alves <palves@redhat.com>
7361
7362 * i386-low.c: Don't include break-common.h here.
7363 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7364 prototype to take target_hw_bp_type as argument instead of a Z
7365 packet char.
7366 * i386-low.h: Include break-common.h here.
7367 (Z_packet_to_hw_type): Declare.
7368 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7369 prototypes.
7370 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7371 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7372 (x86_remove_point): Convert the packet number to a
7373 target_hw_bp_type before calling i386_low_remove_watchpoint.
7374 * win32-i386-low.c (i386_insert_point): Convert the packet number
7375 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7376 (i386_remove_point): Convert the packet number to a
7377 target_hw_bp_type before calling i386_low_remove_watchpoint.
7378
b8acf843
PA
73792014-04-23 Pedro Alves <palves@redhat.com>
7380
7381 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7382
d708bcd1
PA
73832014-04-10 Pedro Alves <palves@redhat.com>
7384
7385 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7386 Check if the condition or command is NULL before checking if the
7387 breakpoint is known. On success, return true.
7388 * mem-break.h (add_breakpoint_condition): Document return.
7389 (add_breakpoint_commands): Add describing comment.
7390 * server.c (skip_to_semicolon): New function.
7391 (process_point_options): Use it.
7392
2eec7d5b
PA
73932014-04-09 Pedro Alves <palves@redhat.com>
7394
7395 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7396 to lwpid_of.
7397
fa96cb38
PA
73982014-02-27 Pedro Alves <palves@redhat.com>
7399
7400 PR 12702
7401 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7402 macros.
7403 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7404 output.
7405 (last_thread_of_process_p): Take a PID argument instead of a
7406 thread pointer.
7407 (linux_wait_for_lwp): Delete.
7408 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7409 functions.
7410 (linux_low_filter_event): New function, party factored out from
7411 linux_wait_for_event.
7412 (linux_wait_for_event): Rename to ...
7413 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7414 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7415 sigsuspend. Check for zombie leaders.
7416 (linux_wait_for_event): Reimplement as wrapper around
7417 linux_wait_for_event_filtered.
7418 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7419 a normal or signal exit is seen, it's the whole process exiting.
7420 (wait_for_sigstop): No longer a for_each_inferior callback.
7421 Rewrite on top of linux_wait_for_event_filtered.
7422 (stop_all_lwps): Call wait_for_sigstop directly.
7423 * server.c (resume, handle_target_event): Handle
7424 TARGET_WAITKIND_NO_RESUMED.
7425
d763de10
JB
74262014-02-26 Joel Brobecker <brobecker@adacore.com>
7427
7428 * win32-low.c (psapi_get_dll_name,
7429 * win32_CreateToolhelp32Snapshot): Delete.
7430 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7431 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7432 Delete.
7433 (handle_load_dll): Add function description.
7434 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7435
850a0f76
JB
74362014-02-26 Joel Brobecker <brobecker@adacore.com>
7437
7438 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7439 Add comment.
7440 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7441 base address when calling win32_add_one_solib.
7442 (handle_load_dll): Delete local variable load_addr.
7443 Remove 0x1000 offset applied to DLL base address when calling
7444 win32_add_one_solib.
7445 (handle_unload_dll): Add comment.
7446
f25b3fc3
JB
74472014-02-26 Joel Brobecker <brobecker@adacore.com>
7448
7449 * win32-low.c (win32_add_all_dlls): Renames
7450 win32_ensure_ntdll_loaded. Rewrite function documentation.
7451 Adjust implementation to always load all DLLs.
7452 Add 0x1000 offset to DLL base address when calling
7453 win32_add_one_solib.
7454 (child_initialization_done): New static global.
7455 (do_initial_child_stuff): Set child_initialization_done to
7456 zero during child initialization, and 1 after. Replace call
7457 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7458 Add comment.
7459 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7460 (handle_unload_dll): Add function documentation.
7461 (get_child_debug_event): Ignore load and unload DLL events
7462 during child initialization.
7463
d86d4aaf
DE
74642014-02-20 Doug Evans <dje@google.com>
7465
3bc32da3 7466 Remove global all_lwps.
d86d4aaf
DE
7467 * inferiors.h (ptid_of): Move here from linux-low.h.
7468 (pid_of, lwpid_of): Ditto.
7469 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7470 parameter is a struct thread_info * now.
7471 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7472 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7473 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7474 directly.
7475 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7476 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7477 * linux-arm-low.c (update_registers_callback): Update, "entry"
7478 parameter is a struct thread_info * now.
7479 Fetch lwpid from current_inferior directly.
7480 (arm_insert_point): Pass &all_threads to find_inferior instead of
7481 &all_lwps.
7482 (arm_remove_point): Ditto.
7483 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7484 (arm_prepare_to_resume): Fetch pid from thread.
7485 (arm_read_description): Fetch lwpid from current_inferior directly.
7486 * linux-low.c (all_lwps): Delete.
7487 (delete_lwp): Delete call to remove_inferior.
7488 (handle_extended_wait): Fetch lwpid from thread.
7489 (add_lwp): Don't set lwp->entry.id. Remove call to
7490 add_inferior_to_list.
7491 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7492 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7493 (kill_one_lwp_callback): Ditto.
7494 (linux_kill): Don't dereference NULL pointer.
7495 Fetch ptid,lwpid from thread.
7496 (get_detach_signal): Fetch ptid from thread.
7497 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7498 Simplify call to regcache_invalidate_thread.
7499 (delete_lwp_callback): Update, "entry" parameter is a
7500 struct thread_info * now. Fetch pid from thread.
7501 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7502 (status_pending_p_callback): Update, "entry" parameter is a
7503 struct thread_info * now. Fetch ptid from thread.
7504 (find_lwp_pid): Update, "entry" parameter is a
7505 struct thread_info * now.
7506 (linux_wait_for_lwp): Fetch pid from thread.
7507 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7508 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7509 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7510 (dequeue_one_deferred_signal): Ditto.
7511 (cancel_breakpoint): Fetch ptid from current_inferior.
7512 (linux_wait_for_event): Pass &all_threads to find_inferior,
7513 not &all_lwps. Fetch ptid, lwpid from thread.
7514 (count_events_callback): Update, "entry" parameter is a
7515 struct thread_info * now.
7516 (select_singlestep_lwp_callback): Ditto.
7517 (select_event_lwp_callback): Ditto.
7518 (cancel_breakpoints_callback): Ditto.
7519 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7520 not &all_lwps.
7521 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7522 (unsuspend_one_lwp): Update, "entry" parameter is a
7523 struct thread_info * now.
7524 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7525 not &all_lwps.
7526 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7527 Fetch lwpid from thread, not lwp.
7528 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7529 Pass &all_threads to find_inferior, not &all_lwps.
7530 (send_sigstop): Fetch lwpid from thread, not lwp.
7531 (send_sigstop_callback): Update, "entry" parameter is a
7532 struct thread_info * now.
7533 (suspend_and_send_sigstop_callback): Ditto.
7534 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7535 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7536 struct thread_info * now.
7537 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7538 from thread, lwp.
7539 (lwp_running): Update, "entry" parameter is a
7540 struct thread_info * now.
7541 (stop_all_lwps): Fetch ptid from thread.
7542 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7543 (linux_resume_one_lwp): Fetch lwpid from thread.
7544 (linux_set_resume_request): Update, "entry" parameter is a
7545 struct thread_info * now. Fetch pid, lwpid from thread.
7546 (resume_status_pending_p): Update, "entry" parameter is a
7547 struct thread_info * now.
7548 (need_step_over_p): Ditto. Fetch lwpid from thread.
7549 (start_step_over): Fetch lwpid from thread.
7550 (linux_resume_one_thread): Update, "entry" parameter is a
7551 struct thread_info * now. Fetch lwpid from thread.
7552 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7553 (proceed_one_lwp): Update, "entry" parameter is a
7554 struct thread_info * now. Fetch lwpid from thread.
7555 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7556 struct thread_info * now.
7557 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7558 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7559 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7560 directly.
7561 (regsets_store_inferior_registers): Ditto.
7562 (fetch_register, store_register): Ditto.
7563 (linux_read_memory, linux_write_memory): Ditto.
7564 (linux_request_interrupt): Ditto.
7565 (linux_read_auxv): Ditto.
7566 (linux_xfer_siginfo): Ditto.
7567 (linux_qxfer_spu): Ditto.
7568 (linux_qxfer_libraries_svr4): Ditto.
7569 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7570 moved to inferiors.h.
7571 (get_lwp): Delete.
7572 (get_thread_lwp): Update.
7573 (struct lwp_info): Delete member "entry". Simplify comment for
7574 member "thread".
7575 (all_lwps): Delete.
7576 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7577 current_inferior directly.
7578 (update_watch_registers_callback): Update, "entry" parameter is a
7579 struct thread_info * now. Fetch pid from thread.
7580 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7581 (mips_insert_point): Fetch lwpid from current_inferior.
7582 Pass &all_threads to find_inferior, not &all_lwps.
7583 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7584 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7585 directly.
7586 (mips_stopped_data_address): Ditto.
7587 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7588 directly.
7589 * linux-tile-low.c (tile_arch_setup): Ditto.
7590 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7591 (update_debug_registers_callback): Update, "entry" parameter is a
7592 struct thread_info * now. Fetch pid from thread.
7593 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7594 Pass &all_threads to find_inferior, not &all_lwps.
7595 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7596 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7597 Pass &all_threads to find_inferior, not &all_lwps.
7598 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7599 (i386_dr_low_get_status): Ditto.
7600 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7601 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7602 (x86_linux_read_description): Ditto.
7603 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7604
3b8361aa
DE
76052014-02-20 Doug Evans <dje@google.com>
7606
7607 * inferiors.c (get_first_inferior): Fix buglet.
7608
f7667f0d
DE
76092014-02-19 Doug Evans <dje@google.com>
7610
7611 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7612 * inferiors.c (add_thread): Change result type to struct thread_info *.
7613 All callers updated.
7614 (add_lwp): Call add_thread here instead of in callers.
7615 All callers updated.
7616 * linux-low.h (get_lwp_thread): Rewrite.
7617 (struct lwp_info): New member "thread".
7618
b3312d80
DE
76192014-02-19 Doug Evans <dje@google.com>
7620
7621 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7622 All callers updated.
7623
ecc6f45c
DE
76242014-02-19 Doug Evans <dje@google.com>
7625
7626 * inferiors.c (add_thread): Fix whitespace.
7627
649ebbca
DE
76282014-02-19 Doug Evans <dje@google.com>
7629
7630 * dll.c (clear_dlls): Replace accessing list implemention details
7631 with API function.
7632 * gdbthread.h (get_first_thread): Declare.
7633 * inferiors.c (for_each_inferior_with_data): New function.
7634 (get_first_thread): New function.
7635 (find_thread_ptid): Simplify.
7636 (get_first_inferior): New function.
7637 (clear_list): Delete.
7638 (one_inferior_p): New function.
7639 (clear_inferior_list): New function.
7640 (clear_inferiors): Update.
7641 * inferiors.h (for_each_inferior_with_data): Declare.
7642 (clear_inferior_list): Declare.
7643 (one_inferior_p): Declare.
7644 (get_first_inferior): Declare.
7645 * linux-low.c (linux_wait_for_event): Replace accessing list
7646 implemention details with API function.
7647 * server.c (target_running): Ditto.
7648 (accumulate_file_name_length): New function.
7649 (emit_dll_description): New function.
7650 (handle_qxfer_libraries): Replace accessing list implemention
7651 details with API function.
7652 (handle_qxfer_threads_worker): New function.
7653 (handle_qxfer_threads_proper): Replace accessing list implemention
7654 details with API function.
7655 (handle_query): Ditto.
7656 (visit_actioned_threads_callback_ftype): New typedef.
7657 (visit_actioned_threads_data): New struct.
7658 (visit_actioned_threads): Rewrite to be find_inferior callback.
7659 (resume): Call find_inferior.
7660 (handle_status): Replace accessing list implemention
7661 details with API function.
7662 (process_serial_event): Replace accessing list implemention details
7663 with API function.
7664 * target.c (set_desired_inferior): Replace accessing list implemention
7665 details with API function.
7666 * tracepoint.c (same_process_p): New function.
7667 (gdb_agent_about_to_close): Replace accessing list implemention
7668 details with API function.
7669 * win32-low.c (child_delete_thread): Replace accessing list
7670 implemention details with API function.
7671 (match_dll_by_basename): New function.
7672 (dll_is_loaded_by_basename): New function.
7673 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7674 details call to dll_is_loaded_by_basename.
7675
80894984
DE
76762014-02-19 Doug Evans <dje@google.com>
7677
7678 * dll.h (struct dll_info): Add comment.
7679 * gdbthread.h (struct thread_info): Add comment.
7680 (current_ptid): Simplify.
7681 * inferiors.c (add_process): Update.
7682 (remove_process): Update.
7683 * inferiors.h (struct process_info): Rename member "head" to "entry".
7684 * linux-low.c (delete_lwp): Update.
7685 (add_lwp): Update.
7686 (last_thread_of_process_p): Update.
7687 (kill_one_lwp_callback, linux_kill): Update.
7688 (status_pending_p_callback): Update.
7689 (wait_for_sigstop): Update. Simplify read of ptid.
7690 (start_step_over): Update.
7691 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7692 (get_lwp_thread): Update.
7693 (struct lwp_info): Rename member "head" to "entry".
7694 * regcache.h (inferior_list_entry): Delete.
7695 * server.c (kill_inferior_callback): Update.
7696 (detach_or_kill_inferior_callback): Update.
7697 (print_started_pid): Update.
7698 (print_attached_pid): Update.
7699 (process_serial_event): Simplify read of ptid.
7700 * thread-db.c (thread_db_create_event): Update.
7701 (thread_db_get_tls_address): Update.
7702 * win32-low.c (current_inferior_ptid): Simplify.
7703
46917d26
TT
77042014-02-19 Tom Tromey <tromey@redhat.com>
7705
7706 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7707 argument.
7708 (target_supports_btrace): Update.
7709
0759a81e
YQ
77102014-02-14 Yao Qi <yao@codesourcery.com>
7711
7712 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7713 (rsp-low-ipa.o): New target.
7714
a7191e8b
TT
77152014-02-12 Tom Tromey <tromey@redhat.com>
7716
7717 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7718 convert_ascii_to_int.
7719 * regcache.c (registers_to_string): Likewise.
7720 * remote-utils.c (decode_M_packet): Likewise.
7721 * server.c (process_serial_event): Likewise.
7722
ff0e980e
TT
77232014-02-12 Tom Tromey <tromey@redhat.com>
7724
7725 * server.c (handle_query, handle_v_run): Use hex2bin, not
7726 unhexify.
7727 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7728
e9371aff
TT
77292014-02-12 Tom Tromey <tromey@redhat.com>
7730
7731 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7732 convert_int_to_ascii.
7733 * regcache.c (registers_to_string, collect_register_as_string):
7734 Likewise.
7735 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7736 Likewise.
7737 * server.c (process_serial_event): Likewise.
7738 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7739 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7740
971dc0b8
TT
77412014-02-12 Tom Tromey <tromey@redhat.com>
7742
7743 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7744 bin2hex, not hexify.
7745 * tracepoint.c (cmd_qtstatus): Likewise.
7746
0a822afb
TT
77472014-02-12 Tom Tromey <tromey@redhat.com>
7748
7749 * remote-utils.c (monitor_output): Pass explicit length to
7750 hexify.
7751
9c3d6531
TT
77522014-02-12 Tom Tromey <tromey@redhat.com>
7753
7754 * tracepoint.c: Include rsp-low.h.
7755 * server.c: Include rsp-low.h.
7756 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7757 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7758 declare.
7759 * remote-utils.c: Include rsp-low.h.
7760 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7761 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7762 (convert_int_to_ascii, convert_ascii_to_int): Move to
7763 common/rsp-low.c.
7764 * regcache.c: Include rsp-low.h.
7765 * ax.c: Include rsp-low.h.
7766 * Makefile.in (SFILES): Add common/rsp-low.c.
7767 (OBS): Add rsp-low.o.
7768 (rsp-low.o): New target.
7769
01fd3ea5
TT
77702014-02-12 Tom Tromey <tromey@redhat.com>
7771
7772 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7773 Include print-utils.h.
7774 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7775 (plongest, thirty_two, phex_nz): Remove.
7776 * Makefile.in (SFILES): Add common/print-utils.c.
7777 (OBS): Add print-utils.o.
7778 (print-utils-ipa.o): New target.
7779 (print-utils.o): New target.
7780 (IPA_OBJS): Add print-utils-ipa.o.
7781
e99dc820
TT
77822014-02-06 Tom Tromey <tromey@redhat.com>
7783
7784 * Makefile.in (SFILES): Fix indentation.
7785
ee1e2d4f
DE
77862014-02-05 Doug Evans <dje@google.com>
7787
7788 * linux-low.c (linux_wait_for_event): Improve comment.
7789 (linux_wait_1): Keep current_inferior in sync with event_child.
7790
f5a02773
DE
77912014-01-22 Doug Evans <dje@google.com>
7792
7793 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7794
87ce2a04
DE
77952014-01-22 Doug Evans <dje@google.com>
7796
7797 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7798 * configure: Regenerate.
7799 * config.in: Regenerate.
7800 * Makefile.in (SFILES): Add debug.c.
7801 (OBS): Add debug.o.
7802 * debug.c: New file.
7803 * debug.h: New file.
7804 * linux-aarch64-low.c (*): Update all debugging printfs to use
7805 debug_printf instead of fprintf.
7806 * linux-arm-low.c (*): Ditto.
7807 * linux-cris-low.c (*): Ditto.
7808 * linux-crisv32-low.c (*): Ditto.
7809 * linux-m32r-low.c (*): Ditto.
7810 * linux-sparc-low.c (*): Ditto.
7811 * linux-x86.c (*): Ditto.
7812 * linux-low.c (*): Ditto.
7813 (linux_wait_1): Add calls to debug_enter, debug_exit.
7814 (linux_wait): Remove redundant debugging printf.
7815 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7816 (linux_resume, unstop_all_lwps): Ditto.
7817 * mem-break.c (*): Update all debugging printfs to use
7818 debug_printf instead of fprintf.
7819 * remote-utils.c (*): Ditto.
7820 * thread-db.c (*): Ditto.
7821 * server.c #include <ctype.h>, "gdb_vecs.h".
7822 (debug_threads): Moved to debug.c.
7823 (*): Update all debugging printfs to use debug_printf instead of
7824 fprintf.
7825 (start_inferior): Replace call to fflush with call to debug_flush.
7826 (monitor_show_help): Mention set debug-format.
7827 (parse_debug_format_options): New function.
7828 (handle_monitor_command): Handle "monitor set debug-format".
7829 (gdbserver_usage): Mention --debug-format.
7830 (main): Parse --debug-format.
7831 * server.h (debug_threads): Declaration moved to debug.h.
7832 #include "debug.h".
7833 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7834 trace_debug_1 that uses debug_printf.
7835 (tracepoint_look_up_symbols): Update all debugging printfs to use
7836 debug_printf instead of fprintf.
7837
e671835b
BS
78382014-01-20 Baruch Siach <baruch@tkos.co.il>
7839
7840 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7841 sys/ptrace.h.
7842
b5737fa9
PA
78432014-01-17 Pedro Alves <palves@redhat.com>
7844
ea38d2a9 7845 PR build/16445
c7faa97a
PA
7846 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7847 defined after including gdb_proc_service.h.
b5737fa9 7848
40ed484e
DE
78492014-01-16 Doug Evans <dje@google.com>
7850
7851 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7852 (match_dll): Use it.
7853
969c39fb
MM
78542014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7855
7856 * target.h (target_ops) <read_btrace>: Change parameters and
7857 return type to allow error reporting.
7858 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7859 trace reading errors on.
7860 * linux-low.c (linux_low_read_btrace): Pass trace reading
7861 errors on.
7862 (linux_low_disable_btrace): New.
7863
ab7f45ba
DE
78642014-01-15 Doug Evans <dje@google.com>
7865
7866 * inferiors.c (thread_id_to_gdb_id): Delete.
7867 * inferiors.h (thread_id_to_gdb_id): Delete.
7868
66af0f44
EZ
78692014-01-13 Eli Zaretskii <eliz@gnu.org>
7870
7871 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7872 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7873 versions.
7874
9939e131
PA
78752014-01-08 Pedro Alves <palves@redhat.com>
7876
7877 * server.c (handle_status): Don't discard previous queued stop
7878 replies or thread's pending status here.
7879 (main) <disconnection>: Do it here instead.
7880
b7ea362b
PA
78812014-01-08 Pedro Alves <palves@redhat.com>
7882
7883 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7884 * server.c (visit_actioned_threads, handle_pending_status): New
7885 function.
7886 (handle_v_cont): Factor out parts to ...
7887 (resume): ... this new function. If in all-stop, and a thread
7888 being resumed has a pending status, report it without actually
7889 resuming.
7890 (myresume): Adjust to use the new 'resume' function.
7891 (clear_pending_status_callback, set_pending_status_callback)
7892 (find_status_pending_thread_callback): New functions.
7893 (handle_status): Handle the case of multiple threads having
7894 interesting statuses to report. Report threads' real last signal
7895 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7896 with an interesting thread to report the status for, instead of
7897 always reporting the status of the first thread.
7898
28498c42
JB
78992014-01-01 Joel Brobecker <brobecker@adacore.com>
7900
7901 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7902 * gdbreplay.c (gdbreplay_version): Likewise.
7903
f45c82da
YZ
79042013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7905
7906 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7907 iov.iov_len with the real length in use.
7908
379a5e2d
JB
79092013-12-13 Joel Brobecker <brobecker@adacore.com>
7910
7911 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7912 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7913 for all targets that use win32-low.c.
7914 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7915 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7916
4210d83e
PA
79172013-12-13 Pedro Alves <palves@redhat.com>
7918
7919 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7920 if equal to TARGET_WAITKIND_LOADED.
7921 * win32-low.c (cached_status): New static global.
7922 (win32_wait): Add declaration.
7923 (do_initial_child_stuff): Flush all initial pending debug events
7924 up to the initial breakpoint.
7925 (win32_wait): If CACHED_STATUS was set, return that instead
7926 of doing a real wait. Remove the code resuming the execution
7927 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7928 during the initial phase. Also remove the code changing
7929 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7930 TARGET_WAITKIND_STOPPED.
7931
e7f0d979
YQ
79322013-12-11 Yao Qi <yao@codesourcery.com>
7933
7934 * notif.c (handle_notif_ack): Return 0 if no notification
7935 matches.
7936
ebcf782c
DE
79372013-11-20 Doug Evans <dje@google.com>
7938
7939 * linux-low.c (linux_set_resume_request): Fix comment.
7940
20ad9378
DE
79412013-11-20 Doug Evans <dje@google.com>
7942
7943 * linux-low.c (resume_status_pending_p): Tweak comment.
7944
a196ebeb
WT
79452013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7946
7947 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7948 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7949 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7950 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7951 (srv_amd64_regobj): Add amd64-mpx.o.
7952 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7953 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7954 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7955 * i387-fp.c (num_pl_bnd_register) Added constant.
7956 (num_pl_bnd_cfg_registers) Added constant.
7957 (struct i387_xsave) Added reserved area and MPX fields.
7958 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7959 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7960 function.
7961 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7962 (init_registers_amd64_mpx_linux): Declare new function.
7963 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7964 (x86_64_regmap): Add MPX registers.
7965 (x86_linux_read_description): Add MPX case.
7966 (initialize_low_arch): Initialize MPX targets.
7967
0080a2f6
TT
79682013-11-18 Tom Tromey <tromey@redhat.com>
7969
7970 * configure: Rebuild.
7971 * configure.ac: Don't check for stdlib.h.
7972 * gdbreplay.c: Unconditionally include stdlib.h.
7973
2978b111
TT
79742013-11-18 Tom Tromey <tromey@redhat.com>
7975
7976 * config.in: Rebuild.
7977 * configure: Rebuild.
7978 * configure.ac: Don't use AC_HEADER_DIRENT.
7979
a3d08894
TT
79802013-11-18 Tom Tromey <tromey@redhat.com>
7981
7982 * server.h: Don't check HAVE_STRING_H.
7983 * gdbreplay.c: Don't check HAVE_STRING_H.
7984 * configure: Rebuild.
7985
0a5dd17d
TT
79862013-11-18 Tom Tromey <tromey@redhat.com>
7987
7988 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7989 LIBGNU.
7990
1bd2f0ba
TT
79912013-11-08 Tom Tromey <tromey@redhat.com>
7992
7993 * configure, config.in: Rebuild.
7994 * configure.ac: Remove unused configury.
7995
3266f10b
TT
79962013-11-08 Tom Tromey <tromey@redhat.com>
7997
7998 * acinclude.m4: Include common.m4, codeset.m4.
7999 * configure, config.in: Rebuild.
8000 * configure.ac: Use GDB_AC_COMMON.
8001
6682d959
AA
80022013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8003
8004 * linux-s390-low.c (HWCAP_S390_TE): New define.
8005 (s390_arch_setup): Consider the TE field in the HWCAP for
8006 determining 'have_regset_tdb'.
8007
fd0a4d76
SDJ
80082013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8009
8010 PR gdb/16014
8011 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8012 call to sizeof.
8013
1a3d890b
PA
80142013-10-02 Pedro Alves <palves@redhat.com>
8015
8016 * server.c (process_serial_event): Don't output "GDBserver
8017 exiting" if GDB is connected through stdio.
8018 * target.c (mywait): Likewise, be silent if GDB is connected
8019 through stdio.
8020
97ad4581
JB
80212013-10-01 Joel Brobecker <brobecker@adacore.com>
8022
8023 * lynx-low.c (lynx_add_threads_after_attach): New function.
8024 (lynx_attach): Remove call to add_thread. Add call to
8025 lynx_add_threads_after_attach instead.
8026
5b4e221c
MF
80272013-09-28 Mike Frysinger <vapier@gentoo.org>
8028
8029 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8030 * config.in, configure: Regenerated.
8031
ee47b2f8
YQ
80322013-09-18 Yao Qi <yao@codesourcery.com>
8033
8034 PR server/15959
8035 * server.c (start_inferior): Clear 'resume_info'.
8036
d6707650 80372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8038
d6707650
JW
8039 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8040 for each register.
8041
9243dd0e 80422013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8043
9243dd0e
JW
8044 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8045 linux-tile-low.o to srv_tgtobj.
8046
c623a6ef
WN
80472013-09-16 Will Newton <will.newton@linaro.org>
8048
8049 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8050 out regs.
8051
fb71d39e
PA
80522013-09-06 Pedro Alves <palves@redhat.com>
8053
8054 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8055 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8056 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8057 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8058 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8059 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8060
8e7e9910
PA
80612013-09-06 Pedro Alves <palves@redhat.com>
8062
8063 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8064 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8065
7c3a12ca
PA
80662013-09-06 Pedro Alves <palves@redhat.com>
8067
8068 * linux-amd64-ipa.c: Include tracepoint.h.
8069 * linux-i386-ipa.c: Include tracepoint.h.
8070
8eb3d7b6
RW
80712013-09-06 Ricard Wanderlof <ricardw@axis.com>
8072
8073 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8074 (ps_get_thread_area): New function.
8075
eddddb9d
RW
80762013-09-06 Ricard Wanderlof <ricardw@axis.com>
8077
8078 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8079 (initialize_low_arch): Call init_registers_crisv32 rather than
8080 init_register_crisv32.
8081
533b0600
PA
80822013-09-05 Pedro Alves <palves@redhat.com>
8083
8084 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8085 to ...
8086 * hostio.h: ... this new file.
8087 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8088 win32-low.c: Include hostio.h.
8089
0ce3d3b5
PA
80902013-09-05 Pedro Alves <palves@redhat.com>
8091
8092 * server.h (gdb_client_data, handler_func, callback_handler_func)
8093 (delete_file_handler, add_file_handler, append_callback_event)
8094 (delete_callback_event, start_event_loop, initialize_event_loop):
8095 Move to event-loop.h and include it.
8096 * event-loop.h: New file.
8097
799cdc37
PA
80982013-09-05 Pedro Alves <palves@redhat.com>
8099
8100 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8101 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8102 (loaded_dll, unloaded_dll): Move to ...
8103 * dll.h: ... this new file.
8104 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8105
6a6bbd9d
PA
81062013-09-05 Pedro Alves <palves@redhat.com>
8107
8108 * server.h (current_process, get_thread_process, all_processes)
8109 (add_inferior_to_list, for_each_inferior, current_inferior)
8110 (remove_inferior, add_process, remove_process, find_process_pid)
8111 (have_started_inferiors_p, have_attached_inferiors_p)
8112 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8113 (clear_inferiors, find_inferior, find_inferior_id)
8114 (inferior_target_data, set_inferior_target_data)
8115 (inferior_regcache_data, set_inferior_regcache_data): Move to
8116 inferiors.h, and include it.
8117 * inferiors.h: New file.
8118
f699aaba
PA
81192013-09-05 Pedro Alves <palves@redhat.com>
8120
8121 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8122 Move ...
72f4393d 8123 * ax.h: ... here.
f699aaba 8124
c144c7a0
PA
81252013-09-05 Pedro Alves <palves@redhat.com>
8126
8127 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8128 tracepoint.h.
8129 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8130 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8131 (handle_tracepoint_general_set, handle_tracepoint_query)
8132 (tracepoint_finished_step, tracepoint_was_hit)
8133 (release_while_stepping_state_list, current_traceframe)
8134 (in_readonly_region, traceframe_read_mem)
8135 (fetch_traceframe_registers, traceframe_read_sdata)
8136 (traceframe_read_info, struct fast_tpoint_collect_status)
8137 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8138 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8139 (supply_fast_tracepoint_registers)
8140 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8141 (ipa_tdesc, claim_trampoline_space)
8142 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8143 (agent_mem_read, agent_get_trace_state_variable_value)
8144 (agent_set_trace_state_variable_value, agent_tsv_read)
8145 (agent_mem_read_string, get_raw_reg_func_addr)
8146 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8147 * tracepoint.h: ... this new file.
8148
ff42e6ab
PA
81492013-09-05 Pedro Alves <palves@redhat.com>
8150
8151 * server.h (perror_with_name, error, fatal, warning, paddress)
8152 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8153 include it.
8154 * utils.h: New file.
8155
541af0f4
PA
81562013-09-05 Pedro Alves <palves@redhat.com>
8157
8158 * server.h (remote_debug, noack_mode, transport_is_reliable)
8159 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8160 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8161 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8162 (write_enn, initialize_async_io, enable_async_io)
8163 (disable_async_io, check_remote_input_interrupt_request)
8164 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8165 (dead_thread_notify, prepare_resume_reply)
8166 (decode_address_to_semicolon, decode_address, decode_m_packet)
8167 (decode_M_packet, decode_X_packet, decode_xfer_write)
8168 (decode_search_memory_packet, unhexify, hexify)
8169 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8170 (look_up_one_symbol, relocate_instruction)
8171 (monitor_output): Move to remote-utils.h, and include it.
8172 * remote-utils.h: New file.
8173
eebdf26b
PA
81742013-09-05 Pedro Alves <palves@redhat.com>
8175
8176 * server.h (_): Delete.
8177
3aafd2ff
PA
81782013-09-02 Pedro Alves <palves@redhat.com>
8179
8180 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8181 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8182 allocated.
8183 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8184
cee83bcb
PM
81852013-09-02 Pierre Muller <muller@sourceware.org>
8186
8187 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8188 or WriteProcessMemory complete successfully and handle
8189 ERROR_PARTIAL_COPY error.
8190
9a13b2fa
PA
81912013-09-02 Pedro Alves <palves@redhat.com>
8192
8193 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8194 error instead of EIO.
8195
602e3198
JK
81962013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8197
8198 PR server/15604
8199 * linux-low.c: Include filestuff.h.
8200 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8201 * lynx-low.c: Include filestuff.h.
8202 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8203 * server.c: Include filestuff.h.
8204 (main): Call notice_open_fds.
8205 * spu-low.c: Include filestuff.h.
8206 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8207
96d7229d
LM
82082013-08-22 Luis Machado <lgustavo@codesourcery.com>
8209
8210 * Makefile.in: Explain why ../target and ../nat are not
8211 listed as include file search paths.
8212 (linux-waitpid.o): New object file rule.
8213 * configure.srv (srv_native_linux_obj): New variable.
8214 Replace all occurrences of linux native object files with
8215 $srv_native_linux_obj.
8216 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8217 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8218 (linux_enable_event_reporting): Remove declaration.
8219 (my_waitpid): Moved to common/linux-waitpid.c.
8220 (linux_wait_for_event): Pass ptid when calling
8221 linux_enable_event_reporting.
8222 (linux_supports_tracefork_flag): Remove.
8223 (linux_enable_event_reporting): Likewise.
8224 (linux_tracefork_grandchild): Remove.
8225 (STACK_SIZE): Moved to common/linux-ptrace.c.
8226 (linux_tracefork_child): Remove.
8227 (linux_test_for_tracefork): Remove.
8228 (linux_look_up_symbols): Call linux_supports_traceclone.
8229 (initialize_low): Remove call to linux_test_for_tracefork.
8230 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8231 common/linux-ptrace.h.
8232 (PTRACE_TYPE_ARG4): Likewise.
8233 Include linux-ptrace.h.
8234
32940073
PA
82352013-08-21 Pedro Alves <palves@redhat.com>
8236
8237 * config.in: Renegerate.
8238
33b60d58 82392013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8240
33b60d58
LM
8241 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8242 (SFILES): Remove $(srcdir)/common/target-common.c and
8243 add $(srcdir)/target/waitstatus.c.
8244 (OBS): Remove target-common.o and add waitstatus.o.
8245 (server_h): Remove $(srcdir)/../common/target-common.h and
8246 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8247 and $(srcdir)/../target/waitstatus.h.
8248 (target-common.o): Remove.
8249 (waitstatus.o): New target object file.
8250 * target.h: Do not include target-common.h and
8251 include target/resume.h, target/wait.h and
8252 target/waitstatus.h.
8253
b8e1b30e
LM
82542013-08-13 Luis Machado <lgustavo@codesourcery.com>
8255
8256 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8257 to PTRACE_TYPE_ARG3.
8258 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8259 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8260 PTRACE_TYPE_ARG4.
8261 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8262 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8263
7a60ad40
YQ
82642013-07-27 Jie Zhang <jie@codesourcery.com>
8265 Daniel Jacobowitz <dan@codesourcery.com>
8266 Yao Qi <yao@codesourcery.com>
8267
8268 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8269 (mips-linux-watch.o): New rule.
8270 (mips_linux_watch_h): New variable.
8271 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8272 srv_tgtobj.
8273 * linux-mips-low.c: Include mips-linux-watch.h.
8274 (struct arch_process_info, struct arch_lwp_info): New.
8275 (update_watch_registers_callback): New function.
8276 (mips_linux_new_process, mips_linux_new_thread) New functions.
8277 (mips_linux_prepare_to_resume, mips_insert_point): New
8278 functions.
8279 (mips_remove_point, mips_stopped_by_watchpoint): New
8280 functions.
8281 (rsp_bp_type_to_target_hw_bp_type): New function.
8282 (mips_stopped_data_address): New function.
8283 (the_low_target): Add watchpoint support functions.
8284
de6f69ad
YQ
82852013-07-27 Yao Qi <yao@codesourcery.com>
8286
8287 * i386-low.c: Include break-common.h.
8288 (enum target_hw_bp_type): Remove.
8289
3360c0bf
LM
82902013-07-24 Luis Machado <lgustavo@codesourcery.com>
8291
8292 * Makefile.in (SFILES): /common/target-common.c.
8293 (OBS): Add target-common.o.
8294 (server_h): Add $(srcdir)/../common/target-common.h.
8295 (target-common.o): New target.
8296 * server.c (queue_stop_reply_callback): Free
8297 status string after use.
8298 * target.c (target_waitstatus_to_string): Remove.
8299 * target.h: Include target-common.h.
8300 (resume_kind): Likewise.
8301 (target_waitkind): Likewise.
8302 (target_waitstatus): Likewise.
8303 (TARGET_WNOHANG): Likewise.
8304
bd885420
YQ
83052013-07-04 Yao Qi <yao@codesourcery.com>
8306
8307 * Makefile.in (host_alias): Use @host_noncanonical@.
8308 (target_alias): Use @target_noncanonical@.
8309 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8310 ACX_NONCANONICAL_HOST.
8311 * configure: Regenerated.
8312
8313 Revert:
8314 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8315
8316 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8317 * configure: Rebuild.
8318 * Makefile.in (version_host, version_target): Get from configure.
8319 (version.c): Use $(version_host) and $(version_target).
8320
17ef446e
PA
83212013-07-03 Pedro Alves <palves@redhat.com>
8322
8323 * Makefile.in (config.status): Depend on development.sh.
8324 * acinclude.m4: Include libmcheck.m4.
8325 * configure: Regenerate.
8326
7a9a7487
MG
83272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8328
8329 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8330 attribute inside the parentheses.
8331 (winapi_DebugSetProcessKillOnExit): Ditto.
8332 (winapi_DebugBreakProcess): Ditto.
8333 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8334
49b64de6
MG
83352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8336
8337 * notif.h (notif_event): Add a dummy member to avoid compiler
8338 errors.
8339
d5749ee7
PA
83402013-07-01 Pedro Alves <palves@redhat.com>
8341
8342 * hostio.c (HOSTIO_PATH_MAX): Define.
8343 (require_filename, handle_open, handle_unlink, handle_readlink):
8344 Use it.
8345
d8d2a3ee
PA
83462013-07-01 Pedro Alves <palves@redhat.com>
8347
8348 * server.h: Include "pathmax.h".
8349 * linux-low.c: Don't include sys/param.h.
8350 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8351 MAXPATHLEN.
8352 * win32-low.c: Don't include sys/param.h.
8353 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8354
bc7dea8d
PA
83552013-07-01 Pedro Alves <palves@redhat.com>
8356
8357 * event-loop.c: Don't check HAVE_UNISTD_H before including
8358 <unistd.h>.
8359 * gdbreplay.c: Likewise.
8360 * remote-utils.c: Likewise.
8361 * server.c: Likewise.
8362 * configure.ac: Don't check for unistd.h.
8363 * configure: Regenerate.
8364
d6c2da54
TT
83652013-06-28 Tom Tromey <tromey@redhat.com>
8366
8367 * Makefile.in (version.c): Use version.in, not
8368 common/version.in.
8369
257b6bec
MG
83702013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8371
8372 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8373 * configure: Rebuild.
8374 * Makefile.in (version_host, version_target): Get from configure.
8375 (version.c): Use $(version_host) and $(version_target).
8376
86ebe149
DK
83772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8378
8379 Fix trace-status to output user name without trailing colon.
8380 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8381
f30aa5af
DK
83822013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8383
8384 Fix trace-status to output proper start-time and stop-time.
8385 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8386 output start time and stop time in hex as gdb expects.
8387
28a93511
YQ
83882013-06-26 Pedro Alves <pedro@codesourcery.com>
8389
8390 * tracepoint.c (build_traceframe_info_xml): Output trace state
8391 variables present in the trace buffer.
8392
01208463
TT
83932013-06-24 Tom Tromey <tromey@redhat.com>
8394
8395 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8396 create-version.sh.
8397 (version.o): Remove.
8398 * gdbreplay.c: Include version.h.
8399 (version, host_name): Don't declare.
8400 * server.h: Include version.h.
8401 (version, host_name): Don't declare.
8402
760256f9
PA
84032013-06-12 Pedro Alves <palves@redhat.com>
8404
8405 * linux-x86-low.c (linux_is_elf64): Delete global.
8406 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8407 with local linux_pid_exe_is_elf_64_file use.
8408
030031ee
PA
84092013-06-11 Pedro Alves <palves@redhat.com>
8410
8411 * linux-low.c (regset_disabled, disable_regset): New functions.
8412 (regsets_fetch_inferior_registers)
8413 (regsets_store_inferior_registers): Use them.
8414 (initialize_regsets_info); Don't allocate the disabled_regsets
8415 array here.
8416 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8417 comment.
8418
5da6eb0a
PA
84192013-06-11 Pedro Alves <palves@redhat.com>
8420
8421 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8422 xmalloc.
8423
7e5aaa09
PA
84242013-06-11 Pedro Alves <palves@redhat.com>
8425
8426 * linux-x86-low.c (initialize_low_arch): Call
8427 init_registers_x32_avx_linux.
8428
d878444c
JK
84292013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8430
8431 Fix compatibility with Android Bionic.
8432 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8433 it is not empty.
8434
3aee8918
PA
84352013-06-07 Pedro Alves <palves@redhat.com>
8436
5f2b57b5 8437 PR server/14823
3aee8918
PA
8438 * Makefile.in (OBS): Add tdesc.o.
8439 (IPA_OBJS): Add tdesc-ipa.o.
8440 (tdesc-ipa.o): New rule.
8441 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8442 interface.
8443 * linux-low.c (new_inferior): Delete.
8444 (disabled_regsets, num_regsets): Delete.
8445 (linux_add_process): Adjust to set the new per-process
8446 new_inferior flag.
8447 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8448 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8449 was a stop. When calling arch_setup, switch the current inferior
8450 to the thread that got an event.
8451 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8452 (regsets_fetch_inferior_registers)
8453 (regsets_store_inferior_registers): New regsets_info parameter.
8454 Adjust to use it.
8455 (linux_register_in_regsets): New regs_info parameter. Adjust to
8456 use it.
8457 (register_addr, fetch_register, store_register): New usrregs_info
8458 parameter. Adjust to use it.
8459 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8460 parameter regs_info. Adjust to use it.
8461 (linux_fetch_registers): Get the current inferior's regs_info, and
8462 adjust to use it.
8463 (linux_store_registers): Ditto.
8464 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8465 (initialize_low): Don't initialize the target_regsets here. Call
8466 initialize_low_arch.
8467 * linux-low.h (target_regsets): Delete declaration.
8468 (struct regsets_info): New.
8469 (struct usrregs_info): New.
8470 (struct regs_info): New.
8471 (struct process_info_private) <new_inferior>: New field.
8472 (struct linux_target_ops): Delete the num_regs, regmap, and
8473 regset_bitmap fields. New field regs_info.
8474 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8475 * i387-fp.c (num_xmm_registers): Delete.
8476 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8477 calls to new interface.
8478 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8479 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8480 Infer the number of xmm registers from the regcache's target
8481 description.
8482 * i387-fp.h (num_xmm_registers): Delete.
8483 * inferiors.c (add_thread): Don't install the thread's regcache
8484 here.
8485 * proc-service.c (gregset_info): Fetch the current inferior's
8486 regs_info. Adjust to use it.
8487 * regcache.c: Include tdesc.h.
8488 (register_bytes, reg_defs, num_registers)
8489 (gdbserver_expedite_regs): Delete.
8490 (get_thread_regcache): If the thread doesn't have a regcache yet,
8491 create one, instead of aborting gdbserver.
8492 (regcache_invalidate_one): Rename to ...
8493 (regcache_invalidate_thread): ... this.
8494 (regcache_invalidate_one): New.
8495 (regcache_invalidate): Only invalidate registers of the current
8496 process.
8497 (init_register_cache): Add target_desc parameter, and use it.
8498 (new_register_cache): Ditto. Assert the target description has a
8499 non zero registers_size.
8500 (regcache_cpy): Add assertions. Adjust.
8501 (realloc_register_cache, set_register_cache): Delete.
8502 (registers_to_string, registers_from_string): Adjust.
8503 (find_register_by_name, find_regno, find_register_by_number)
8504 (register_cache_size): Add target_desc parameter, and use it.
8505 (free_register_cache_thread, free_register_cache_thread_one)
8506 (regcache_release, register_cache_size): New.
8507 (register_size): Add target_desc parameter, and use it.
8508 (register_data, supply_register, supply_register_zeroed)
8509 (supply_regblock, supply_register_by_name, collect_register)
8510 (collect_register_as_string, collect_register_by_name): Adjust.
8511 * regcache.h (struct target_desc): Forward declare.
8512 (struct regcache) <tdesc>: New field.
8513 (init_register_cache, new_register_cache): Add target_desc
8514 parameter.
8515 (regcache_invalidate_thread): Declare.
8516 (regcache_invalidate_one): Delete declaration.
8517 (regcache_release): Declare.
8518 (find_register_by_number, register_cache_size, register_size)
8519 (find_regno): Add target_desc parameter.
8520 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8521 declarations.
8522 * remote-utils.c: Include tdesc.h.
8523 (outreg, prepare_resume_reply): Adjust.
8524 * server.c: Include tdesc.h.
8525 (gdbserver_xmltarget): Delete declaration.
8526 (get_features_xml, process_serial_event): Adjust.
8527 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8528 declare.
8529 (struct process_info) <tdesc>: New field.
8530 (ipa_tdesc): Declare.
8531 * tdesc.c: New file.
8532 * tdesc.h: New file.
8533 * tracepoint.c: Include tdesc.h.
8534 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8535 (get_context_regcache): Adjust to pass ipa_tdesc down.
8536 (do_action_at_tracepoint): Adjust to get the register cache size
8537 from the context regcache's description.
8538 (traceframe_walk_blocks): Adjust to get the register cache size
8539 from the current trace frame's description.
8540 (traceframe_get_pc): Adjust to get current trace frame's
8541 description and pass it down.
8542 (gdb_collect): Adjust to get the register cache size from the
8543 IPA's description.
8544 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8545 (gdbserver_xmltarget): Delete.
8546 (initialize_low_tracepoint): Set the ipa's target description.
8547 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8548 (initialize_low_tracepoint): Set the ipa's target description.
8549 * linux-x86-low.c: Include tdesc.h.
8550 [__x86_64__] (is_64bit_tdesc): New.
8551 (ps_get_thread_area, x86_get_thread_area): Use it.
8552 (i386_cannot_store_register): Rename to ...
8553 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8554 (i386_cannot_fetch_register): Rename to ...
8555 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8556 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8557 to new interface.
8558 (target_regsets): Rename to ...
8559 (x86_regsets): ... this.
8560 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8561 interface.
8562 (x86_siginfo_fixup): Use is_64bit_tdesc.
8563 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8564 (tdesc_x32_avx_linux, tdesc_x32_linux)
8565 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8566 Declare.
8567 (x86_linux_update_xmltarget): Delete.
8568 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8569 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8570 (AMD64_LINUX_USER64_CS): New.
8571 (x86_linux_read_description): New, based on
8572 x86_linux_update_xmltarget.
8573 (same_process_callback): New.
8574 (x86_arch_setup_process_callback): New.
8575 (x86_linux_update_xmltarget): New.
8576 (x86_regsets_info): New.
8577 (amd64_linux_regs_info): New.
8578 (i386_linux_usrregs_info): New.
8579 (i386_linux_regs_info): New.
8580 (x86_linux_regs_info): New.
8581 (x86_arch_setup): Reimplement.
8582 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8583 (x86_emit_ops): Ditto.
8584 (the_low_target): Adjust. Install x86_linux_regs_info,
8585 x86_cannot_fetch_register, and x86_cannot_store_register.
8586 (initialize_low_arch): New.
8587 * linux-ia64-low.c (tdesc_ia64): Declare.
8588 (ia64_fetch_register): Adjust.
8589 (ia64_usrregs_info, regs_info): New globals.
8590 (ia64_regs_info): New function.
8591 (the_low_target): Adjust.
8592 (initialize_low_arch): New function.
8593 * linux-sparc-low.c (tdesc_sparc64): Declare.
8594 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8595 Adjust.
8596 (sparc_arch_setup): New function.
8597 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8598 (the_low_target): Adjust.
8599 (initialize_low_arch): New function.
8600 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8601 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8602 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8603 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8604 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8605 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8606 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8607 (tdesc_powerpc_isa205_vsx64l): Declare.
8608 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8609 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8610 (ppc_set_pc, ppc_get_hwcap): Adjust.
8611 (ppc_usrregs_info): Forward declare.
8612 (!__powerpc64__) ppc_regmap_adjusted: New global.
8613 (ppc_arch_setup): Adjust to the current process'es target
8614 description.
8615 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8616 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8617 (ppc_store_evrregset): Adjust.
8618 (target_regsets): Rename to ...
8619 (ppc_regsets): ... this, and make static.
8620 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8621 (ppc_regs_info): New function.
8622 (the_low_target): Adjust.
8623 (initialize_low_arch): New function.
8624 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8625 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8626 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8627 (tdesc_s390x_linux64v2): Declare.
8628 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8629 (s390_fill_gregset, s390_store_last_break): Adjust.
8630 (target_regsets): Rename to ...
8631 (s390_regsets): ... this, and make static.
8632 (s390_get_pc, s390_set_pc): Adjust.
8633 (s390_get_hwcap): New target_desc parameter, and use it.
8634 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8635 (s390_arch_setup): Adjust to set the current process'es target
8636 description. Don't adjust the regmap.
8637 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8638 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8639 (regs_info_3264): New globals.
8640 (s390_regs_info): New function.
8641 (the_low_target): Adjust.
8642 (initialize_low_arch): New function.
8643 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8644 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8645 [__mips64] (init_registers_mips_linux)
8646 (init_registers_mips_dsp_linux): Delete defines.
8647 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8648 (have_dsp): New global.
8649 (mips_read_description): New, based on mips_arch_setup.
8650 (mips_arch_setup): Reimplement.
8651 (get_usrregs_info): New function.
8652 (mips_cannot_fetch_register, mips_cannot_store_register)
8653 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8654 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8655 (target_regsets): Rename to ...
8656 (mips_regsets): ... this, and make static.
8657 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8658 (dsp_regs_info, regs_info): New globals.
8659 (mips_regs_info): New function.
8660 (the_low_target): Adjust.
8661 (initialize_low_arch): New function.
8662 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8663 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8664 Declare.
8665 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8666 (arm_read_description): New, with bits factored from
8667 arm_arch_setup.
8668 (arm_arch_setup): Reimplement.
8669 (target_regsets): Rename to ...
8670 (arm_regsets): ... this, and make static.
8671 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8672 (arm_regs_info): New function.
8673 (the_low_target): Adjust.
8674 (initialize_low_arch): New function.
8675 * linux-m68k-low.c (tdesc_m68k): Declare.
8676 (target_regsets): Rename to ...
8677 (m68k_regsets): ... this, and make static.
8678 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8679 (m68k_regs_info): New function.
8680 (m68k_arch_setup): New function.
8681 (the_low_target): Adjust.
8682 (initialize_low_arch): New function.
8683 * linux-sh-low.c (tdesc_sharch): Declare.
8684 (target_regsets): Rename to ...
8685 (sh_regsets): ... this, and make static.
8686 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8687 (sh_regs_info, sh_arch_setup): New functions.
8688 (the_low_target): Adjust.
8689 (initialize_low_arch): New function.
8690 * linux-bfin-low.c (tdesc_bfin): Declare.
8691 (bfin_arch_setup): New function.
8692 (bfin_usrregs_info, regs_info): New globals.
8693 (bfin_regs_info): New function.
8694 (the_low_target): Adjust.
8695 (initialize_low_arch): New function.
8696 * linux-cris-low.c (tdesc_cris): Declare.
8697 (cris_arch_setup): New function.
8698 (cris_usrregs_info, regs_info): New globals.
8699 (cris_regs_info): New function.
8700 (the_low_target): Adjust.
8701 (initialize_low_arch): New function.
8702 * linux-cris-low.c (tdesc_crisv32): Declare.
8703 (cris_arch_setup): New function.
8704 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8705 (cris_regs_info): New function.
8706 (the_low_target): Adjust.
8707 (initialize_low_arch): New function.
8708 * linux-m32r-low.c (tdesc_m32r): Declare.
8709 (m32r_arch_setup): New function.
8710 (m32r_usrregs_info, regs_info): New globals.
8711 (m32r_regs_info): Adjust.
8712 (initialize_low_arch): New function.
8713 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8714 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8715 (tic6x_usrregs_info): Forward declare.
8716 (tic6x_read_description): New function, based on ...
8717 (tic6x_arch_setup): ... this. Reimplement.
8718 (target_regsets): Rename to ...
8719 (tic6x_regsets): ... this, and make static.
8720 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8721 (tic6x_regs_info): New function.
8722 (the_low_target): Adjust.
8723 (initialize_low_arch): New function.
8724 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8725 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8726 (target_regsets): Rename to ...
8727 (xtensa_regsets): ... this, and make static.
8728 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8729 globals.
8730 (xtensa_arch_setup, xtensa_regs_info): New functions.
8731 (the_low_target): Adjust.
8732 (initialize_low_arch): New function.
8733 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8734 (nios2_arch_setup): Set the current process'es tdesc.
8735 (target_regsets): Rename to ...
8736 (nios2_regsets): ... this.
8737 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8738 (nios2_regs_info): New function.
8739 (the_low_target): Adjust.
8740 (initialize_low_arch): New function.
a261b8f5
PA
8741 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8742 (aarch64_arch_setup): Set the current process'es tdesc.
8743 (target_regsets): Rename to ...
8744 (aarch64_regsets): ... this.
8745 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8746 (aarch64_regs_info): New function.
8747 (the_low_target): Adjust.
8748 (initialize_low_arch): New function.
3aee8918
PA
8749 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8750 globals.
8751 (target_regsets): Rename to ...
8752 (tile_regsets): ... this.
8753 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8754 (tile_regs_info): New function.
8755 (tile_arch_setup): Set the current process'es tdesc.
8756 (the_low_target): Adjust.
8757 (initialize_low_arch): New function.
8758 * spu-low.c (tdesc_spu): Declare.
8759 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8760 * win32-arm-low.c (tdesc_arm): Declare.
8761 (arm_arch_setup): New function.
8762 (the_low_target): Install arm_arch_setup instead of
8763 init_registers_arm.
8764 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8765 (init_windows_x86): Rename to ...
8766 (i386_arch_setup): ... this. Set `win32_tdesc'.
8767 (the_low_target): Adjust.
8768 * win32-low.c (win32_tdesc): New global.
8769 (child_add_thread): Don't create the thread cache here.
8770 (do_initial_child_stuff): Set the new process'es tdesc.
8771 * win32-low.h (struct target_desc): Forward declare.
8772 (win32_tdesc): Declare.
8773 * lynx-i386-low.c (tdesc_i386): Declare global.
8774 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8775 * lynx-low.c (lynx_tdesc): New global.
8776 (lynx_add_process): Set the new process'es tdesc.
8777 * lynx-low.h (struct target_desc): Forward declare.
8778 (lynx_tdesc): Declare global.
8779 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8780 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8781 * nto-low.c (nto_tdesc): New global.
8782 (do_attach): Set the new process'es tdesc.
8783 * nto-low.h (struct target_desc): Forward declare.
8784 (nto_tdesc): Declare.
8785 * nto-x86-low.c (tdesc_i386): Declare.
8786 (nto_x86_arch_setup): Set `nto_tdesc'.
8787
b1fbec62
GB
87882013-06-04 Gary Benson <gbenson@redhat.com>
8789
8790 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8791 to qSupported response when appropriate.
8792 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8793 with nonzero-length annex.
8794 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8795 arguments supplied in annex.
8796
d1ec4ce7
DE
87972013-05-31 Doug Evans <dje@google.com>
8798
ac44adcb 8799 PR server/15594
d1ec4ce7
DE
8800 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8801 64 bits in 64-cross-32 environment.
8802
9b25f2d3
PA
88032013-05-28 Pedro Alves <palves@redhat.com>
8804
8805 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8806 (aarch64-without-fpu.c): Delete rule.
8807 * configure.srv (aarch64*-*-linux*): Remove references to
8808 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8809 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8810 declaration.
8811
6740dc9c
PA
88122013-05-24 Pedro Alves <palves@redhat.com>
8813
8814 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8815 instead of strchr/decode_address. Error if the range isn't split
8816 with a ','. Don't assume there's be a ':' in the action.
8817
c2d6af84
PA
88182013-05-23 Yao Qi <yao@codesourcery.com>
8819 Pedro Alves <palves@redhat.com>
8820
8821 * linux-low.c (lwp_in_step_range): New function.
8822 (linux_wait_1): If the thread was range stepping and stopped
8823 outside the stepping range, report the stop to GDB. Otherwise,
8824 continue stepping. Add range stepping debug output.
8825 (linux_set_resume_request): Copy the step range from the resume
8826 request to the lwp.
8827 (linux_supports_range_stepping): New.
8828 (linux_target_ops) <supports_range_stepping>: Set to
8829 linux_supports_range_stepping.
8830 * linux-low.h (struct linux_target_ops)
8831 <supports_range_stepping>: New field.
8832 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8833 * linux-x86-low.c (x86_supports_range_stepping): New.
8834 (the_low_target) <supports_range_stepping>: Set to
8835 x86_supports_range_stepping.
8836 * server.c (handle_v_cont): Handle 'r' action.
8837 (handle_v_requests): Append ";r" if the target supports range
8838 stepping.
8839 * target.h (struct thread_resume) <step_range_start,
8840 step_range_end>: New fields.
8841 (struct target_ops) <supports_range_stepping>:
8842 New field.
8843 (target_supports_range_stepping): New macro.
8844
58794e1a
JB
88452013-05-17 Joel Brobecker <brobecker@adacore.com>
8846
8847 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8848 confusion in comment.
8849
d631c5a7
JB
88502013-05-17 Joel Brobecker <brobecker@adacore.com>
8851
8852 * lynx-low.c (struct process_info_private): New type.
8853 (lynx_add_process): New function.
8854 (lynx_create_inferior, lynx_attach): Replace calls to
8855 add_process by calls to lynx_add_process.
8856 (lynx_resume): If PTID is null, then try using
8857 current_process()->private->last_wait_event_ptid.
8858 Add comments.
8859 (lynx_clear_inferiors): Delete. The contents of that function
8860 has been inlined in lynx_mourn;
8861 (lynx_wait_1): Save the ptid in the process's private data.
8862 (lynx_mourn): Free the process' private data. Replace call
8863 to lynx_clear_inferiors by call to clear_inferiors.
8864
96f7a20f
YQ
88652013-05-17 Yao Qi <yao@codesourcery.com>
8866
8867 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8868 the right place.
8869
db0dfaa0
LM
88702013-05-16 Luis Machado <lgustavo@codesourcery.com>
8871
8872 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8873 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8874 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8875 PT_TEXT_END_ADDR guards. Update comments.
8876 (linux_target_op) <read_offsets>: Conditionally define to
8877 linux_read_offsets if the target is UCLIBC and if it defines
8878 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8879
68f5f838
SL
88802013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8881 Andrew Jenner <andrew@codesourcery.com>
8882
8883 * Makefile.in (SFILES): Add linux-nios2-low.c.
8884 (clean): Add action to delete nios2-linux.c.
8885 (nios2-linux.c): New rule.
8886 * configure.srv: Add nios2*-*-linux*.
8887 * linux-nios2-low.c: New.
8888
1ebff1fd
HAQ
88892013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8890
8891 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8892
f6150862
HZ
88932013-04-25 Hui Zhu <hui@codesourcery.com>
8894
8895 PR gdb/15186
f6150862
HZ
8896 * ax.c (ax_printf): Add fflush.
8897
614c279d
TT
88982013-04-22 Tom Tromey <tromey@redhat.com>
8899
8900 * Makefile.in (SFILES): Add filestuff.c.
8901 (OBS): Add filestuff.o.
8902 (filestuff.o): New target.
8903 * config.in, configure: Rebuild.
8904 * configure.ac: Check for fdwalk, pipe2.
8905
7d4e5717
PA
89062013-04-17 Pedro Alves <palves@redhat.com>
8907
8908 * configure.ac (USE_THREAD_DB): Delete variable.
8909 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8910 Don't AC_SUBST USE_THREAD_DB.
8911 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8912 * config.in, configure: Regenerate.
8913
d5c93e41
PA
89142013-04-16 Pedro Alves <palves@redhat.com>
8915
8916 * linux-low.h (struct lwp_info) <thread_known>: Move under
8917 the USE_THREAD_DB #ifdef.
8918
04f5fe89
PA
89192013-04-16 Pedro Alves <palves@redhat.com>
8920
8921 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8922 (linux-low.o): Delete rule.
8923 * linux-low.h: Always include "gdb_thread_db.h" instead of
8924 conditionally including thread_db.h.
8925 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8926 HAVE_THREAD_DB_H.
8927
480b27bf
JK
89282013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8929
8930 * Makefile.in (install-only): Fix make install regression.
8931
43662968
JK
89322013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8933
8934 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8935 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8936 installation.
8937 * gdbserver.1: Remove.
8938
3e74e146
PA
89392013-03-22 Pedro Alves <palves@redhat.com>
8940
8941 * linux-low.c (handle_extended_wait): Don't call
8942 linux_enable_event_reporting.
8943
a8347a2a
TT
89442013-03-15 Tony Theodore <tonyt@logyst.com>
8945
8946 PR build/9098:
8947 * Makefile.in (SHELL): Use @SHELL@.
8948
eeb56fa7
SDJ
89492013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8950
8951 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8952 compiler warning.
8953
4fa7e2ff
JB
89542013-03-13 Joel Brobecker <brobecker@adacore.com>
8955
8956 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8957 Remove extraneous NULL element.
8958
8ddb1965
YQ
89592013-03-13 Yao Qi <yao@codesourcery.com>
8960
8961 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8962 'V' block in trace frame.
8963
9accd112
MM
89642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8965
8966 * target.h (struct target_ops): Add btrace ops.
8967 (target_supports_btrace): New macro.
8968 (target_enable_btrace): New macro.
8969 (target_disable_btrace): New macro.
8970 (target_read_btrace): New macro.
8971 * gdbthread.h (struct thread_info): Add btrace field.
8972 * server.c: Include btrace-common.h.
8973 (handle_btrace_general_set): New function.
8974 (handle_btrace_enable): New function.
8975 (handle_btrace_disable): New function.
8976 (handle_general_set): Call handle_btrace_general_set.
8977 (handle_qxfer_btrace): New function.
8978 (struct qxfer qxfer_packets[]): Add btrace entry.
8979 * inferiors.c (remove_thread): Disable btrace.
8980 * linux-low: Include linux-btrace.h.
8981 (linux_low_enable_btrace): New function.
8982 (linux_low_read_btrace): New function.
8983 (linux_target_ops): Add btrace ops.
8984 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8985 Add srv_linux_btrace=yes.
8986 (x86_64-*-linux*): Add linux-btrace.o.
8987 Add srv_linux_btrace=yes.
8988 * configure.ac: Define HAVE_LINUX_BTRACE.
8989 * config.in: Regenerated.
8990 * configure: Regenerated.
8991
5cc22e4c
MM
89922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8993
8994 * server.c (handle_qxfer): Preserve error message if -3 is
8995 returned.
8996 (qxfer): Document the -3 return value.
8997
7c97f91e
MM
89982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8999
9000 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9001 (linux_btrace_h): New variable.
9002 (linux-btrace.o): New rule.
9003
be9a119c 90042013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9005 Hafiz Abid Qadeer <abidh@codesourcery.com>
9006
9007 * tracepoint.c (trace_buffer_size): New global.
9008 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9009 (init_trace_buffer): Change to one-argument function. Allocate
9010 trace buffer memory.
9011 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9012 handle QTBuffer:size packet.
9013 (cmd_bigqtbuffer_size): New function.
9014 (initialize_tracepoint): Call init_trace_buffer with
9015 DEFAULT_TRACE_BUFFER_SIZE.
9016 * server.c (handle_query): Add QTBuffer:size in the
9017 supported packets.
9018
e64f7499
YQ
90192013-03-07 Yao Qi <yao@codesourcery.com>
9020
9021 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9022 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9023 of -1.
9024 (cmd_qtsp): Adjust condition. Do post increment.
9025 Set cur_action and cur_step_action back to 0.
9026
f0ae6fc3
PA
90272013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9028
9029 PR server/15236
9030 * linux-low.c (linux_write_memory): Return early success if LEN is
9031 zero.
9032
b5b0b0af
CV
90332013-03-05 Corinna Vinschen <vinschen@redhat.de>
9034
334ad4a8 9035 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9036
589bc927
TT
90372013-02-28 Tom Tromey <tromey@redhat.com>
9038
9039 * configure.ac: Invoke AC_SYS_LARGEFILE.
9040 * configure, config.in: Rebuild.
9041
dfe07582
CV
90422013-02-28 Corinna Vinschen <vinschen@redhat.com>
9043
9044 * win32-low.c: Throughout, fix format strings and casts of
9045 printf-like functions to avoid type related warnings on all
9046 platforms.
9047 (get_child_debug_event): Print dwDebugEventCode as hex since
9048 that's how it's usually documented.
9049
736cd585
YQ
90502013-02-28 Yao Qi <yao@codesourcery.com>
9051
9052 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9053 pulongest.
9054
e1f58301
JW
90552013-02-27 Jiong Wang <jiwang@tilera.com>
9056
9057 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9058 (reg-tilegx32.c): New rule.
9059 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9060 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9061 different register info initializer according to elf class.
9062 (init_registers_tilgx32): New function. The tilegx32 register info
9063 initializer.
9064 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9065 (tile_store_gregset): Likewise.
9066
d171ca78
YQ
90672013-02-27 Yao Qi <yao@codesourcery.com>
9068
9069 * server.c (process_point_options): Print debug message when
9070 debug_threads is true.
9071
282bbdf3
YQ
90722013-02-26 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9075
aca22551
PA
90762013-02-19 Pedro Alves <palves@redhat.com>
9077 Kai Tietz <ktietz@redhat.com>
9078
9079 PR gdb/15161
9080
9081 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9082 instead of strtoul to extract address from packet.
9083 (process_serial_event) <'z'>: Likewise.
9084
4f3cee1c
YQ
90852013-02-18 Yao Qi <yao@codesourcery.com>
9086
9087 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9088
8e1d55a3
PA
90892013-02-14 Pedro Alves <palves@redhat.com>
9090
9091 Plug memory leak.
9092
9093 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9094 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9095
458820da
PA
90962013-02-14 Pedro Alves <palves@redhat.com>
9097
9098 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9099
baea0dae
PA
91002013-02-14 Pedro Alves <palves@redhat.com>
9101
9102 * tracepoint.c (save_string): Delete.
9103 (add_tracepoint_action): Use savestring instead of save_string.
9104
0b1afbb3
PA
91052013-02-12 Pedro Alves <palves@redhat.com>
9106
9107 * linux-xtensa-low.c: Ditto.
9108 * xtensa-xtregs.c: Ditto.
9109
8a4ac37e
PA
91102013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9111
9112 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9113 thread_db.
9114
148de6bb
MS
91152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9116
9117 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9118 aarch64_num_wp_regs and aarch64_num_bp_regs to
9119 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9120
55fac6e0
MS
91212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9122
9123 * linux-aarch64-low.c (ps_get_thread_area): Replace
9124 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9125
176eb98c
MS
91262013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9127 Marcus Shawcroft <marcus.shawcroft@arm.com>
9128 Nigel Stephens <nigel.stephens@arm.com>
9129 Yufeng Zhang <yufeng.zhang@arm.com>
9130
9131 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9132 (aarch64.c, aarch64-without-fpu.c): New targets.
9133 * configure.srv (aarch64*-*-linux*): New.
9134 * linux-aarch64-low.c: New file.
9135
56f7af9c
MS
91362013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9137
43aaf8b6 9138 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9139 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9140 (dequeue_one_deferred_signal, linux_resume_one_thread)
9141 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9142 (linux_tracefork_grandchild, linux_test_for_tracefork)
9143 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9144 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9145 where the argument is 0.
9146
60f662b0
YQ
91472013-01-25 Yao Qi <yao@codesourcery.com>
9148
9149 * event-loop.c: Include "queue.h".
9150 (gdb_event_p): New typedef.
9151 (struct gdb_event) <next_event>: Remove.
9152 (event_queue): Change to QUEUE(gdb_event_p).
9153 (async_queue_event): Remove.
9154 (gdb_event_xfree): New.
9155 (initialize_event_loop): New.
9156 (process_event): Use API from QUEUE.
9157 (wait_for_event): Likewise.
9158 * server.c (main): Call initialize_event_loop.
9159 * server.h (initialize_event_loop): Declare.
9160
5ae4861a
YQ
91612013-01-18 Yao Qi <yao@codesourcery.com>
9162
9163 * ax.h (struct eval_agent_expr_context): New.
9164 (gdb_eval_agent_expr): Update declaration.
9165 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9166 TFRAME. Add new argument CTX.
9167 * server.h (struct eval_agent_expr_context): Declare.
9168 (agent_mem_read, agent_tsv_read): Update declaration.
9169 (agent_mem_read_string): Likewise.
9170 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9171 (add_traceframe_block): Add new argument TPOINT.
9172 Increase TPOINT->traceframe_usage.
9173 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9174 eval_tracepoint_agent_expr.
9175 (condition_true_at_tracepoint): Likewise.
9176 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9177 (agent_mem_read_string, agent_tsv_read): Likewise.
9178
85e00e85
YQ
91792013-01-16 Yao Qi <yao@codesourcery.com>
9180
9181 * linux-low.c (linux_resume_one_lwp): Don't check
9182 'lwp->bp_reinsert != 0'.
9183
4039cf45
JB
91842013-01-07 Joel Brobecker <brobecker@adacore.com>
9185 Pedro Alves <palves@redhat.com>
9186
9187 * lynx-low.c (ptrace_request_to_str): Define a temporary
9188 macro and use it to simplify this function's implementation.
9189
9044dee2
JB
91902013-01-07 Joel Brobecker <brobecker@adacore.com>
9191
9192 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9193 sets errno.
9194
e6352c8f
JB
91952013-01-07 Joel Brobecker <brobecker@adacore.com>
9196
9197 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9198
50681a27
JB
91992013-01-07 Joel Brobecker <brobecker@adacore.com>
9200
9201 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9202
3f6e77ef
JB
92032013-01-07 Joel Brobecker <brobecker@adacore.com>
9204
9205 * lynx-low.c (lynx_resume): Use the resume_info parameter
9206 to determine the ptid for the lynx_ptrace call, unless
9207 it is equal to minus_one_ptid, in which case we use the
9208 ptid of the current_inferior.
9209 (lynx_wait_1): After having received a thread create/exit
9210 event, resume the inferior's execution using the signaling
9211 thread's ptid, rather than the old ptid.
9212
7fda33ae
JB
92132013-01-07 Joel Brobecker <brobecker@adacore.com>
9214
9215 * lynx-low.c (lynx_resume): Delete variable ret.
9216
b9786c74
JB
92172013-01-01 Joel Brobecker <brobecker@adacore.com>
9218
9219 * gdbreplay.c (gdbreplay_version): Update copyright year.
9220 * server.c (gdbserver_version): Likewise.
9221
8b93d60f
JB
92222012-12-17 Joel Brobecker <brobecker@adacore.com>
9223
9224 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9225 new thread.
9226
037335a7
JB
92272012-12-17 Joel Brobecker <brobecker@adacore.com>
9228
9229 * lynx-low.c (ptrace_request_to_str): Add handling for
9230 PTRACE_GETTRACESIG.
9231
52d4cbd8
JB
92322012-12-17 Joel Brobecker <brobecker@adacore.com>
9233
9234 * lynx-low.c (lynx_attach): Delete variable new_process.
9235
ab8f6ca9
JB
92362012-12-17 Joel Brobecker <brobecker@adacore.com>
9237
9238 * lynx-low.c (lynx_create_inferior): Delete variable
9239 new_process.
9240
78cbc024
JB
92412012-12-17 Joel Brobecker <brobecker@adacore.com>
9242
9243 * lynx-low.c (ptrace_request_to_str): Do not handle
9244 PTRACE_GETTHREADLIST if this macro does not exist.
9245
14a00470
YQ
92462012-12-15 Yao Qi <yao@codesourcery.com>
9247
9248 * Makefile.in (OBS): Add notif.o.
9249 * notif.c, notif.h: New.
9250 * server.c: Include "notif.h".
9251 (struct vstop_notif) <next>: Remove.
9252 <base>: New field.
9253 (queue_stop_reply): Update.
9254 (push_event, send_next_stop_reply): Remove.
9255 (discard_queued_stop_replies): Update.
9256 (notif_stop): New variable.
9257 (handle_v_stopped): Remove.
9258 (handle_v_requests): Don't call handle_v_stopped. Call
9259 handle_ack_notif instead.
9260 (queue_stop_reply_callback): Call notif_event_enque instead
9261 of queue_stop_reply.
9262 (handle_status): Don't call send_next_stop_reply, call
9263 notif_write_event instead.
9264 (kill_inferior_callback): Likewise.
9265 (detach_or_kill_inferior_callback): Likewise.
9266 (main): Call initialize_notif.
9267 (process_serial_event): Call QUEUE_is_empty.
9268 (handle_target_event): Call notif_push instead of push event.
9269 * server.h (push_event): Remove declaration.
9270
61c125b9
TT
92712012-12-10 Tom Tromey <tromey@redhat.com>
9272
9273 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9274 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9275 macros.
9276 (.c.o): Rewrite.
9277 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9278 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9279 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9280 (amd64-linux-ipa.o, ax.o): Rewrite.
9281 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9282 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9283 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9284 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9285 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9286 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9287 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9288 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9289 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9290 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9291 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9292 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9293 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9294 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9295 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9296 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9297 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9298 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9299 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9300 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9301 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9302 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9303 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9304 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9305 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9306 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9307 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9308 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9309 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9310 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9311 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9312 (reg-tilegx.o): Remove.
9313 (all_object_files): New macro.
9314 Include .deps files.
9315 * aclocal.m4, configure: Rebuild.
9316 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9317 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9318 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9319
e90e9ad9
TT
93202012-12-05 Tom Tromey <tromey@redhat.com>
9321
9322 PR gdb/14917:
9323 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9324
02d403bf 93252012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9326
9327 * configure.ac: Check for linux/perf_event.h.
9328 * config.in: Regenerated.
9329 * configure: Regenerated.
9330
0270a750
PA
93312012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9332
9333 * hostio.c (handle_readlink): Decrease buffer size
9334 parameter passed to readlink by one byte.
9335
8c29b58e
YQ
93362012-11-26 Yao Qi <yao@codesourcery.com>
9337
9338 * configure.ac (build_warnings): Append '-Wempty-body'.
9339 * configure: Regenerated.
9340 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9341 body.
9342
8bdce1ff
PM
93432012-11-15 Pierre Muller <muller@sourceware.org>
9344
9345 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9346 * config.in: Regenerate.
9347 * configure: Regenerate.
9348 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9349 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9350 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9351 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9352 header.
9353 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9354 instead of <sys/wait.h> header.
9355 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9356
02d403bf 93572012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9358
9359 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9360 (various make rules): Remove -DGDBSERVER
9361
fbd5db48
YQ
93622012-11-09 Yao Qi <yao@codesourcery.com>
9363
9364 * spu-low.c (current_ptid): Move it to ..
9365 * gdbthread.h: ... here. New.
9366 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9367 * server.c (myresume, process_serial_event): Likewise.
9368 * thread-db.c (thread_db_find_new_threads): Likewise.
9369 * tracepoint.c (run_inferior_command): Likewise.
9370
b3dc46ff
AB
93712012-10-01 Andrew Burgess <aburgess@broadcom.com>
9372
9373 * server.c (handle_search_memory_1): Include access length in
9374 warning message.
9375
07c04788
HPN
93762012-09-05 Michael Brandt <michael.brandt@axis.com>
9377
9378 * linux-crisv32-low.c: Fix compile errors.
9379
918d227b
YQ
93802012-09-04 Yao Qi <yao@codesourcery.com>
9381
9382 * tracepoint.c (cmd_qtsv): Adjust debug message.
9383 Don't check CUR_TPOINT.
9384
18c1b81a
YQ
93852012-08-28 Yao Qi <yao@codesourcery.com>
9386
9387 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9388 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9389 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9390 Remove declarations of xmalloc, xreallloc, xstrdup and
9391 freeargv.
9392 * Makefile.in (libiberty_h): New.
9393 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9394 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9395
dc82f37b
YQ
93962012-08-23 Yao Qi <yao@codesourcery.com>
9397
9398 * server.h: Remove declaration of 'xsnprintf'.
9399
406b1477
KS
94002012-08-22 Keith Seitz <keiths@redhat.com>
9401
9402 * server.h: Include build-gnulib-gbserver/config.h.
9403 * gdbreplay.c: Likewise.
9404
e6712ff1
DE
94052012-08-08 Doug Evans <dje@google.com>
9406
9407 * Makefile.in (SFILES): Add gdb_vecs.c.
9408 (OBS): Add gdb_vecs.o.
9409 (gdb_vecs_h, host_defs_h): New variables.
9410 (thread-db.o): Add $(gdb_vecs_h) dependency.
9411 (gdb_vecs.o): New rule.
9412 * thread-db.c: #include "gdb_vecs.h".
9413 (thread_db_load_search): Use a vector to iterate over path elements.
9414 Handle text appearing after "$pdir".
9415
9416 * configure.ac: Add check for strstr.
9417 * config.in: Regenerate.
9418 * configure: Regenerate.
9419
7c3270ae
UW
94202012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9421
9422 * hostio.c (handle_pread): If pread fails, fall back to attempting
9423 lseek/read.
9424 (handle_pwrite): Likewise for pwrite.
9425
b62e2b27
UW
94262012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9427
9428 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9429 between unsupported TYPE and unimplementable ADDR/LEN combination.
9430 (arm_insert_point): Act on new return value.
9431
78a99e91
PA
94322012-07-31 Pedro Alves <palves@redhat.com>
9433
9434 * server.c (process_point_options): Only skip tokens if we find
9435 one that is unrecognized. Don't treat 'X' specially while
9436 skipping unrecognized tokens.
9437
fcf303ab
UW
94382012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9439
9440 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9441 to 4-byte-align HW breakpoint addresses for Thumb.
9442
7255706c
YQ
94432012-07-27 Yao Qi <yao@codesourcery.com>
9444
9445 PR remote/14161.
9446
9447 * server.h: Declare gdb_agent_about_to_close.
9448 * target.c (kill_inferior): Include "agent.h".
9449 New. Send command 'kill'.
9450 * target.h (kill_inferior): Removed macro.
9451 * tracepoint.c (gdb_agent_about_to_close): New.
9452 (gdb_agent_helper_thread): Handle command 'close'.
9453 Wait endlessly until the inferior stops.
9454 Install gdb_agent_remove_socket to atexit hook.
9455 (agent_socket_name): New static variable.
9456 (gdb_agent_socket_init): Replace local variable 'name' with
9457 'agent_socket_name'.
9458 (gdb_agent_remove_socket): New.
9459
5a3f286f
YQ
94602012-07-27 Yao Qi <yao@codesourcery.com>
9461
9462 * server.c (process_point_options): Stop at 'X' when parsing.
9463
961bd387
ME
94642012-07-19 Michael Eager <eager@eagercon.com>
9465
a261b8f5 9466 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9467 to hw_execute.
9468 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9469 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9470 hardware breakpoint.
9471
aa7c7447
JK
94722012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9473
9474 * gdbserver/linux-low.c (initialize_low): Call
9475 linux_ptrace_init_warnings.
9476
7f216e7c
DE
94772012-07-02 Doug Evans <dje@google.com>
9478
9479 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9480 pointer to int.
9481
d3ce09f5
SS
94822012-07-02 Stan Shebs <stan@codesourcery.com>
9483
9484 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9485 (ax.o): Add it to build rule.
9486 (ax-ipa.o): Ditto.
9487 (OBS): Add format.o.
9488 (IPA_OBS): Add format.o.
9489 * server.c (handle_query): Claim support for breakpoint commands.
9490 (process_point_options): Add command case.
9491 (process_serial_event): Leave running if there are printfs in
9492 effect.
9493 * mem-break.h (any_persistent_commands): Declare.
9494 (add_breakpoint_commands): Declare.
9495 (gdb_no_commands_at_breakpoint): Declare.
9496 (run_breakpoint_commands): Declare.
9497 * mem-break.c (struct point_command_list): New struct.
9498 (struct breakpoint): New field command_list.
9499 (any_persistent_commands): New function.
9500 (add_commands_to_breakpoint): New function.
9501 (add_breakpoint_commands): New function.
9502 (gdb_no_commands_at_breakpoint): New function.
9503 (run_breakpoint_commands): New function.
9504 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9505 locally.
9506 * ax.c: Include format.h.
9507 (ax_printf): New function.
9508 (gdb_eval_agent_expr): Add printf opcode.
9509
2f8f6aed
YQ
95102012-06-13 Yao Qi <yao@codesourcery.com>
9511
9512 * server.c (start_inferior): Remove duplicated writes to fields
9513 'last_resume_kind' and 'last_status' of 'current_inferior'.
9514
0c9070b3
YQ
95152012-06-12 Yao Qi <yao@codesourcery.com>
9516 Pedro Alves <palves@redhat.com>
9517
9518 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9519 comment.
9520 * server.c (handle_v_cont): Extend comment.
9521
c52daf70
YQ
95222012-06-11 Yao Qi <yao@codesourcery.com>
9523
9524 * linux-low.c (linux_attach): Add 'static'.
9525
d38bbb0a
YQ
95262012-06-06 Yao Qi <yao@codesourcery.com>
9527
9528 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9529
89dc0afd
JK
95302012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9531
9532 Fix gcc -flto compilation warning.
9533 * server.c (main): Make variable multi_mode and attach volatile.
9534
75f62ce7
TJB
95352012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9536
9537 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9538 if the platform doesn't know about it.
9539
65f479b6
PA
95402012-05-30 Jeff Kenton <jkenton@tilera.com>
9541
9542 * Makefile.in (SFILES): Add linux-tile-low.c.
9543 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9544 * configure.srv: Handle tilegx-*-linux*.
9545 * linux-tile-low.c: New file.
9546
0c5bf5a9
JK
95472012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9548
9549 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9550
a493e3e2
PA
95512012-05-24 Pedro Alves <palves@redhat.com>
9552
9553 PR gdb/7205
9554
43aaf8b6 9555 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9556
2ea28649
PA
95572012-05-24 Pedro Alves <palves@redhat.com>
9558
9559 PR gdb/7205
9560
9561 Replace target_signal with gdb_signal throughout.
9562
8d409d16
MR
95632012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9564
9565 * linux-low.c (linux_store_registers): Avoid the copying sequence
9566 when no data has been retrieved by ptrace.
9567
23512c01
MGD
95682012-05-22 Will Deacon <will.deacon@arm.com>
9569
9570 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9571 Include asm/ptrace.h.
9572 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9573 already defined.
9574
4934b29e
MR
95752012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9576
9577 * linux-low.c (linux_store_registers): Don't re-retrieve data
9578 with ptrace that has already been obtained from /proc. Always
9579 copy any data retrieved with ptrace to the buffer supplied.
9580
bde24c0a
PA
95812012-05-11 Yao Qi <yao@codesourcery.com>
9582 Pedro Alves <palves@redhat.com>
9583
9584 * linux-low.c (enum stopping_threads_kind): New.
9585 (stopping_threads): Change type to `enum stopping_threads_kind'.
9586 (handle_extended_wait): If stopping and suspending threads, leave
9587 the new_lwp suspended too.
9588 (linux_wait_for_event): Adjust.
9589 (stop_all_lwps): Set `stopping_threads' to
9590 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9591 whether we're suspending threads or just stopping them. Assert no
9592 recursion happens.
9593
623b6bdf
YQ
95942012-04-29 Yao Qi <yao@codesourcery.com>
9595
9596 * server.h: Move some code to ...
9597 * gdbthread.h: ... here. New.
9598 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9599 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9600 (nto-low.o, win32-low.o): Likewise.
9601 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9602 * regcache.c, remote-utils.c, server.c: Likewise.
9603 * target.c, tracepoint.c, win32-low.c: Likewise.
9604
f15f9948
TJB
96052012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9606
9607 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9608 (PTRACE_ARG4_TYPE): Likewise.
9609 (PTRACE_XFER_TYPE): Likewise.
9610 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9611 ptrace to PTRACE_ARG3_TYPE.
9612 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9613 (PTRACE_ARG4_TYPE): Likewise.
9614 (PTRACE_XFER_TYPE): Likewise.
9615 (linux_detach_one_lwp): Cast fourth argument of
9616 ptrace to long then PTRACE_ARG4_TYPE.
9617 (regsets_fetch_inferior_registers): Cast third argument of
9618 ptrace to long then PTRACE_ARG3_TYPE.
9619 (regsets_store_inferior_registers): Likewise.
9620
38ea300a
PA
96212012-04-20 Pedro Alves <palves@redhat.com>
9622
9623 * configure: Regenerate.
9624
c971b7fa
PA
96252012-04-19 Pedro Alves <palves@redhat.com>
9626
43aaf8b6 9627 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9628 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9629 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9630 (all, install-only, uninstall, clean-info, all-lib, clean): No
9631 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9632 (maintainer-clean realclean distclean): Use subdir_do.
9633 (subdir_do): New.
9634 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9635 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9636 * acinclude.m4: Include acx_configure_dir.m4.
9637 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9638 calls. Call AC_PROG_RANLIB. Configure gnulib using
9639 ACX_CONFIGURE_DIR.
9640 (GNULIB): New.
9641 (GNULIB_STDINT_H): Adjust.
9642 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9643 * gdbreplay.c: Include build-gnulib/config.h.
9644 * server.h: Likewise.
9645 * aclocal.m4: Regenerate.
9646 * config.in: Regenerate.
9647 * configure: Regenerate.
c971b7fa 9648
809277f8
PA
96492012-04-19 Pedro Alves <palves@redhat.com>
9650
9651 * Makefile.in (LIBGNU, INCGNU): Adjust.
9652 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9653 (all, install-only, uninstall, clean-info, all-lib, clean)
9654 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9655 * configure.ac: Adjust AC_OUTPUT output.
9656 * aclocal.m4: Regenerate.
9657 * configure: Regenerate.
9658
fd9bb8b8
PA
96592012-04-19 Pedro Alves <palves@redhat.com>
9660
9661 * Makefile.in (generated_files): New.
9662 (server_h): Remove the explicit dependency on config.h, and depend
9663 on $generated_files.
9664
1c298c66
PA
96652012-04-19 Pedro Alves <palves@redhat.com>
9666
9667 * Makefile.in (INCGNU): Add -Ignulib.
9668
57c4b50b
PA
96692012-04-19 Pedro Alves <palves@redhat.com>
9670
9671 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9672 (INCGNU): ... this, and spell out -I here.
9673 (GNULIB_LIB): Rename to ...
9674 (LIBGNU): ... this.
9675 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9676
1030e047
PA
96772012-04-19 Pedro Alves <palves@redhat.com>
9678
9679 * config.in: Regenerate.
9680
447d4319
PA
96812012-04-19 Pedro Alves <palves@redhat.com>
9682
9683 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9684 * server.h (memmem): Remove declaration.
9685 * config.in: Regenerate.
9686 * configure: Regenerate.
9687
aad9eab9
YQ
96882012-04-19 Yao Qi <yao@codesourcery.com>
9689
9690 * Makefile.in (SFILES): Add common/vec.c.
9691 (OBS): Add vec.o.
9692 (vec.o): New rule.
9693
3e10640f
YQ
96942012-04-19 Yao Qi <yao@codesourcery.com>
9695
9696 * remote-utils.c (prepare_resume_reply): Replace with macro
9697 target_core_of_thread.
9698 * server.c (handle_qxfer_threads_proper): Likewise.
9699 * target.h (traget_core_of_thread): New macro.
9700
71622373
PA
97012012-04-18 Pedro Alves <palves@redhat.com>
9702
9703 * aclocal.m4: Regenerate.
9704 * configure: Regenerate.
9705
80d26939
YQ
97062012-04-16 Yao Qi <yao@codesourcery.com>
9707
9708 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9709 duplicated on address.
9710
42476b70
YQ
97112012-04-16 Yao Qi <yao@codesourcery.com>
9712
9713 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9714 (struct tracepoint_action_ops) <send>: New field.
9715 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9716 (agent_expr_send, x_tracepoint_action_send): New.
9717 (l_tracepoint_action_send): New.
9718 (cmd_qtdp): Download and install tracepoint
9719 according to `use_agent'.
9720 (run_inferior_command): Add one more parameter `len'.
9721 Update callers.
9722 (tracepoint_send_agent): New.
9723 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9724
7bc83639
YQ
97252012-04-16 Yao Qi <yao@codesourcery.com>
9726
9727 * tracepoint.c (download_tracepoints): Moved to ...
9728 (cmd_qtstart): ... here.
9729
5f18041e
YQ
97302012-04-14 Yao Qi <yao@codesourcery.com>
9731
9732 * tracepoint.c: Include inttypes.h.
9733 (struct collect_memory_action): Use sized types.
9734 (struct tracepoint): Likewise.
9735 (cmd_qtdp, stop_tracing): Update print specifiers.
9736 (cmd_qtp, response_tracepoint): Likewise.
9737 (collect_data_at_tracepoint): Likewise.
9738 (collect_data_at_step): Likewise.
9739
55a8c076
YQ
97402012-04-14 Yao Qi <yao@codesourcery.com>
9741
9742 Import gnulib module inttypes.
9743 * aclocal.m4, config.in, configure: Regenerated.
9744
dc750257
YQ
97452012-04-14 Yao Qi <yao@codesourcery.com>
9746
9747 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9748 Makefile and config.status at last.
9749
0ab5faf9
YQ
97502012-04-13 Yao Qi <yao@codesourcery.com>
9751
9752 * tracepoint.c: Include stdint.h unconditionally.
9753
18f5fd81
TJB
97542012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9755
9756 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9757 on BFD_HAVE_SYS_PROCFS_TYPE.
9758 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9759 * configure: Regenerate.
9760 * config.in: Likewise.
9761
4d47af5c
L
97622012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9763
9764 * Makefile.in (clean): Also remove x32.c x32-linux.c
9765 x32-avx.c x32-avx-linux.c.
9766 (x32.o): New target.
9767 (x32.c): Likewise.
9768 (x32-linux.o): Likewise.
9769 (x32-linux.c): Likewise.
9770 (x32-avx.o): Likewise.
9771 (x32-avx.c): Likewise.
9772 (x32-avx-linux.o): Likewise.
9773 (x32-avx-linux.c): Likewise.
9774
9775 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9776 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9777 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9778 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9779 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9780 i386/x32-avx-linux.xml.
9781
9782 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9783 (init_registers_x32_avx_linux): Likwise.
9784 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9785 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9786
ecedbe58
PA
97872012-04-13 Pedro Alves <palves@redhat.com>
9788
9789 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9790 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9791 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9792 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9793 the sub-make.
9794
c92b5177
L
97952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9796
9797 * linux-x86-low.c (compat_x32_clock_t): New.
9798 (compat_x32_siginfo_t): Likewise.
9799 (compat_x32_siginfo_from_siginfo): Likewise.
9800 (siginfo_from_compat_x32_siginfo): Likewise.
9801 (linux_is_elf64): Likewise.
9802 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9803 and siginfo_from_compat_x32_siginfo for x32.
9804 (x86_arch_setup): Set linux_is_elf64.
9805
214d508e
L
98062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9807
9808 PR gdb/13969
9809 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9810 e_machine field.
9811 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9812 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9813 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9814 compatible with process.
9815
c9a1864a
YQ
98162012-04-12 Yao Qi <yao@codesourcery.com>
9817
9818 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9819 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9820 (install-only, install-info, clean): Handle sub dir gnulib.
9821 (all-lib, am--refresh): New targets.
9822 (memmem.o): Remove target.
9823 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9824 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9825 (AC_REPLACE_FUNCS): Remove memmem.
9826 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9827 (AC_OUTPUT): Generate Makefile in gnulib/.
9828 * aclocal.m4, config.in, configure: Regenerated.
9829
367ba2c2
MR
98302012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9831
9832 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9833
9d236627
PA
98342012-04-05 Pedro Alves <palves@redhat.com>
9835
9836 -Werror=strict-aliasing
9837
9838 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9839 pointer.
9840
111217b3
PA
98412012-04-04 Pedro Alves <palves@redhat.com>
9842
9843 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9844 (sparc_store_gregset_from_stack, sparc_store_gregset)
9845 (sparc_breakpoint_at): Fix formatting.
9846
8365dcf5
TJB
98472012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9848
9849 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9850 are available.
9851 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9852 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9853 * config.in: Regenerate.
9854 * configure: Likewise.
9855
689cc2ae
PA
98562012-03-29 Pedro Alves <palves@redhat.com>
9857
9858 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9859 Correct ptrace arguments.
9860
c14dfd32
PA
98612012-03-28 Pedro Alves <palves@redhat.com>
9862
9863 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9864 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9865 (IA64_FR1_REGNUM): New defines.
9866 (ia64_fetch_register): New.
9867 (the_low_target): Install it.
9868 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9869 field.
9870 * linux-low.c (linux_fetch_registers): Try the
9871 the_low_target.fetch_register hook first.
9872
9873 * linux-arm-low.c (the_low_target): Adjust.
9874 * linux-bfin-low.c (the_low_target): Adjust.
9875 * linux-cris-low.c (the_low_target): Adjust.
9876 * linux-crisv32-low.c (the_low_target): Adjust.
9877 * linux-m32r-low.c (the_low_target): Adjust.
9878 * linux-m68k-low.c (the_low_target): Adjust.
9879 * linux-mips-low.c (the_low_target): Adjust.
9880 * linux-ppc-low.c (the_low_target): Adjust.
9881 * linux-s390-low.c (the_low_target): Adjust.
9882 * linux-sh-low.c (the_low_target): Adjust.
9883 * linux-sparc-low.c (the_low_target): Adjust.
9884 * linux-tic6x-low.c (the_low_target): Adjust.
9885 * linux-x86-low.c (the_low_target): Adjust.
9886 * linux-xtensa-low.c (the_low_target): Adjust.
9887
63c88e13
PA
98882012-03-26 Pedro Alves <palves@redhat.com>
9889
9890 * server.c (handle_qxfer_libraries): Don't bail early if
9891 the_target->qxfer_libraries_svr4 is not NULL.
9892
fb723180
PA
98932012-03-26 Pedro Alves <palves@redhat.com>
9894
9895 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9896
0afae3cf
PA
98972012-03-23 Pedro Alves <palves@redhat.com>
9898
9899 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9900 "library-list-svr4" element's start tag when the the DSO list is
9901 empty.
9902
485f1ee4
PA
99032012-03-23 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9906 a variable whose type size is the same as the inferior's pointer
9907 size.
9908
a5362b9a
TS
99092012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9910
9911 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9912 struct siginfo.
9913 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9914 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9915 * linux-low.h: Include <signal.h>.
9916 (struct siginfo): Remove forward declaration.
9917 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9918 struct siginfo.
9919
d226c142
MF
99202012-03-21 Mike Frysinger <vapier@gentoo.org>
9921
9922 * .gitignore: Ignore more files.
9923
122f36ef
PA
99242012-03-19 Pedro Alves <palves@redhat.com>
9925 Jan Kratochvil <jan.kratochvil@redhat.com>
9926
9927 * server.c (cont_thread, general_thread): Add describing comments.
9928 (start_inferior): Clear `cont_thread'.
9929 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9930 of a process.
9931
fc3e5175
YQ
99322012-03-15 Yao Qi <yao@codesourcery.com>
9933
9934 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9935 handling to ...
9936 (cmd_qtdp): ... here.
9937
8d0d92cd
YQ
99382012-03-15 Yao Qi <yao@codesourcery.com>
9939
9940 * tracepoint.c (struct tracepoint_action_ops): New.
9941 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9942 (m_tracepoint_action_download): New.
9943 (r_tracepoint_action_download): New.
9944 (x_tracepoint_action_download): New.
9945 (l_tracepoint_action_download): New.
9946 (add_tracepoint_action): Install `action->ops' according type.
9947 (download_tracepoint_1): Move code `download' function pointer
9948 of various tracepoint_action_ops.
9949
87b0bb13
JK
99502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9951
9952 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9953 linux_ptrace_attach_warnings.
9954
5f572dec
JK
99552012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9956
9957 * Makefile.in (linux-ptrace.o): New.
9958 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9959 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9960 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9961 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9962 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9963 of these targets.
9964 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9965
f4647387
YQ
99662012-03-08 Yao Qi <yao@codesourcery.com>
9967 Pedro Alves <palves@redhat.com>
9968
9969 Fix PR server/13392.
9970 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9971 offset of JMP insn.
9972 * tracepoint.c (remove_tracepoint): New.
9973 (cmd_qtdp): Call remove_tracepoint when failed to install.
9974
9b224c5e
PA
99752012-03-07 Pedro Alves <palves@redhat.com>
9976
9977 * linux-low.c (get_detach_signal): New.
9978 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9979 Pass on pending signals to PTRACE_DETACH. Check the result of the
9980 ptrace call.
9981 * server.c (program_signals, program_signals_p): New.
9982 (handle_general_set): Handle QProgramSignals.
9983 * server.h (program_signals, program_signals_p): Declare.
9984
e237a7e2
JK
99852012-03-05 Pedro Alves <palves@redhat.com>
9986 Jan Kratochvil <jan.kratochvil@redhat.com>
9987
9988 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9989 New comment why.
9990
5808517f
YQ
99912012-03-03 Yao Qi <yao@codesourcery.com>
9992
9993 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9994 agent_look_up_symbols.
9995
58b4daa5
YQ
99962012-03-03 Yao Qi <yao@codesourcery.com>
9997
9998 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9999 (linux-x86-low.o): Likewise.
10000 * server.h: Remove in_process_agent_loaded.
10001 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10002 common/agent.c.
10003 Update callers.
10004
8ffcbaaf
YQ
100052012-03-03 Yao Qi <yao@codesourcery.com>
10006
10007 * tracepoint.c (gdb_agent_capability): New global.
10008 (in_process_agent_loaded_ust): Renamed to
10009 `in_process_agent_supports_ust'.
10010 Update callers.
10011 (in_process_agent_supports_ust): Call agent_capability_check.
10012 (clear_installed_tracepoints): Assert that agent supports
10013 agent.
10014
d1feda86
YQ
100152012-03-03 Yao Qi <yao@codesourcery.com>
10016
10017 * linux-low.c (linux_supports_agent): New.
10018 (linux_target_ops): Initialize field `supports_agent' with
10019 linux_supports_agent.
10020 * target.h (struct target_ops) <supports_agent>: New.
10021 (target_supports_agent): New macro.
10022 * server.c (handle_general_set): Handle packet 'QAgent'.
10023 (handle_query): Send `QAgent+'.
10024 * Makefile.in (server.o): Depends on agent.h.
10025
2fa291ac
YQ
100262012-03-03 Yao Qi <yao@codesourcery.com>
10027
10028 * Makefile.in (OBS): Add agent.o.
10029 Add new rule for agent.o.
10030 Track dependence of tracepoint.c on agent.h.
10031 * tracepoint.c (run_inferior_command_1):
10032 (run_inferior_command): Call agent_run_command.
10033 (gdb_ust_connect_sync_socket): Deleted. Move it to
10034 common/agent.c.
10035 (resume_thread, stop_thread): Likewise.
10036 (gdb_ust_socket_init): Renamed to ...
10037 (gdb_agent_socket_init): ... New.
10038 (gdb_ust_thread): Renamed to ...
10039 (gdb_agent_helper_thread): ... New.
10040 (gdb_ust_init): Move some code to ...
10041 (gdb_agent_init): ... here. New.
10042 [HAVE_UST]: Call gdb_ust_init.
10043 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10044 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10045 * config.in, configure: Regenerated.
10046
05044653
PA
100472012-03-02 Pedro Alves <palves@redhat.com>
10048
10049 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10050 * linux-low.c (struct simple_pid_list): New.
10051 (stopped_pids): New a struct simple_pid_list pointer.
10052 (add_to_pid_list, pull_pid_from_list): New.
10053 (handle_extended_wait): Don't assume the first signal new children
10054 report is SIGSTOP. Adjust call to pull_pid_from_list.
10055 (linux_wait_for_lwp): Adjust.
10056
8d00225b
YQ
100572012-03-02 Yao Qi <yao@codesourcery.com>
10058
10059 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10060 debug log.
10061
19560ba5
YQ
100622012-03-02 Yao Qi <yao@codesourcery.com>
10063
10064 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10065 `stop_pc' and `tpoint'. Update caller.
10066
1faeff08
MR
100672012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10068
10069 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10070 * linux-low.c (use_linux_regsets): New macro.
10071 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10072 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10073 (linux_register_in_regsets): New function.
10074 (usr_fetch_inferior_registers): Skip registers covered by
10075 regsets.
10076 (usr_store_inferior_registers): Likewise.
10077 (usr_fetch_inferior_registers): New macro.
10078 (usr_store_inferior_registers): Likewise.
10079 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10080 (linux_store_registers): Likewise.
10081 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10082 prototype.
10083 (init_registers_mips64_dsp_linux): Likewise.
10084 (init_registers_mips_linux): New macro.
10085 (init_registers_mips_dsp_linux): Likewise.
10086 (mips_dsp_num_regs): Likewise.
10087 (DSP_BASE, DSP_CONTROL): New fallback macros.
10088 (mips_base_regs): New macro.
10089 (mips_regmap): Use it. Fix the size.
10090 (mips_dsp_regmap): New variable.
10091 (mips_dsp_regset_bitmap): Likewise.
10092 (mips_arch_setup): New function.
10093 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10094 than mips_regmap.
10095 (mips_cannot_store_register): Likewise.
10096 (the_low_target): Update .arch_setup, .num_regs and .regmap
10097 initializers. Add .regset_bitmap initializer.
10098 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10099 initializer.
10100 * linux-bfin-low.c (the_low_target): Likewise.
10101 * linux-cris-low.c (the_low_target): Likewise.
10102 * linux-crisv32-low.c (the_low_target): Likewise.
10103 * linux-ia64-low.c (the_low_target): Likewise.
10104 * linux-m32r-low.c (the_low_target): Likewise.
10105 * linux-m68k-low.c (the_low_target): Likewise.
10106 * linux-ppc-low.c (the_low_target): Likewise.
10107 * linux-s390-low.c (the_low_target): Likewise.
10108 * linux-sh-low.c (the_low_target): Likewise.
10109 * linux-sparc-low.c (the_low_target): Likewise.
10110 * linux-tic6x-low.c (the_low_target): Likewise.
10111 * linux-x86-low.c (the_low_target): Likewise.
10112 * linux-xtensa-low.c (the_low_target): Likewise.
10113 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10114 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10115 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10116 srv_xmlfiles.
10117 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10118 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10119
c03e6ccc
YQ
101202012-02-29 Yao Qi <yao@codesourcery.com>
10121 Pedro Alves <palves@redhat.com>
10122
10123 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10124 `step_over_finished' is true.
10125
644cebc9
PA
101262012-02-27 Pedro Alves <palves@redhat.com>
10127
10128 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10129 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10130
c14d7ab2
PA
101312012-02-27 Pedro Alves <palves@redhat.com>
10132
10133 PR server/9684
10134 * linux-low.c (pid_is_stopped): New.
10135 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10136
412c89dd
LM
101372012-02-25 Luis Machado <lgustavo@codesourcery.com>
10138
10139 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10140 of conditions.
10141
b745defe
MR
101422012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10143
10144 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10145
9f3a5c85
LM
101462012-02-24 Luis Machado <lgustavo@codesourcery>
10147
10148 * server.c (handle_query): Advertise support for target-side
10149 breakpoint condition evaluation.
10150 (process_point_options): New function.
10151 (process_serial_event): When inserting a breakpoint, check for
10152 a target-side condition that should be evaluated.
10153
10154 * mem-break.c: Include regcache.h and ax.h.
10155 (point_cond_list_t): New data structure.
10156 (breakpoint) <cond_list>: New field.
10157 (find_gdb_breakpoint_at): Make non-static.
10158 (delete_gdb_breakpoint_at): Clear any target-side
10159 conditions.
10160 (clear_gdb_breakpoint_conditions): New function.
10161 (add_condition_to_breakpoint): Likewise.
10162 (add_breakpoint_condition): Likewise.
10163 (gdb_condition_true_at_breakpoint): Likewise.
10164 (gdb_breakpoint_here): Return result directly instead
10165 of going through a local variable.
10166
10167 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10168 (clear_gdb_breakpoint_conditions): Likewise.
10169 (add_breakpoint_condition): Likewise.
10170 (gdb_condition_true_at_breakpoint): Likewise.
10171
10172 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10173 (need_step_over_p): Take target-side breakpoint condition into
10174 consideration.
10175
5e1dc496
LM
101762012-02-24 Luis Machado <lgustavo@codesourcery>
10177
10178 * server.h: Include tracepoint.h.
10179 (agent_mem_read, agent_get_trace_state_variable_value,
10180 agent_set_trace_state_variable_value,
10181 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10182 get_set_tsv_func_addr): New prototypes.
10183
10184 * ax.h: New include file.
10185 * ax.c: New source file.
10186
10187 * tracepoint.c: Include ax.h.
10188 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10189 agent_expr, eval_result_type): Move to ax.h.
10190 (parse_agent_expr): Rename to ...
10191 (gdb_parse_agent_expr): ... this, make it non-static and move
10192 to ax.h.
10193 (unparse_agent_expr) Rename to ...
10194 (gdb_unparse_agent_expr): ... this, make it non-static and move
10195 to ax.h.
10196 (eval_agent_expr): Rename to ...
10197 (eval_tracepoint_agent_expr): ... this.
10198 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10199 forward declarations.
10200 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10201 (agent_get_trace_state_variable_value): New function.
10202 (agent_set_trace_state_variable_value): New function.
10203 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10204 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10205 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10206 (condition_true_at_tracepoint): Likewise.
10207 (parse_agent_expr): Rename to ...
10208 (gdb_parse_agent_expr): ... this and move to ax.c.
10209 (unparse_agent_expr): Rename to ...
10210 (gdb_unparse_agent_expr): ... this and move to ax.c.
10211 (gdb_agent_op_name): Move to ax.c.
10212 (eval_agent_expr): Rename to ...
10213 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10214 and move to ax.c.
10215 (eval_tracepoint_agent_expr): New function.
10216 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10217 non-static.
5e1dc496
LM
10218 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10219 ax.c.
10220 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10221 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10222 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10223 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10224 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10225 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10226 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10227 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10228 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10229 (compile_bytecodes): Remove forward declaration.
10230 (is_goto_target): Move to ax.c.
10231 (compile_bytecodes): Move to ax.c and call
10232 agent_get_trace_state_variable_value (...) and
10233 agent_set_trace_state_variable_value (...).
10234
10235 * Makefile.in: Update ax.c and IPA dependencies.
10236
277e4e52
PA
102372012-02-24 Pedro Alves <palves@redhat.com>
10238
10239 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10240 (cmd_bigqtbuffer_circular): ... this. Only handle
10241 'QTBuffer:circular:'.
10242 (handle_tracepoint_general_set): Adjust.
10243
bf4c19f7
YQ
102442012-02-16 Yao Qi <yao@codesourcery.com>
10245
10246 * inferiors.c: Move code to ...
10247 * dll.c: .... here. New.
10248 * server.h: Declare clear_dlls.
10249 * Makefile.in (SFILES): Add dll.c.
10250 (OBS): Add dll.o
10251 (dll.o): New rule.
10252
d73f2619
YQ
102532012-02-11 Yao Qi <yao@codesourcery.com>
10254
10255 * server.c: (handle_monitor_command): Add a new parameter
10256 `own_buf'.
10257 (handle_query): Update caller.
10258
f8255c2a
JB
102592012-02-09 Joel Brobecker <brobecker@adacore.com>
10260
10261 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10262 * configure, config.in: Regenerate.
10263 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10264 is not defined.
10265
da84f473
PA
102662012-02-02 Pedro Alves <palves@redhat.com>
10267
10268 Try SIGKILL first, then PTRACE_KILL.
10269 * linux-low.c (linux_kill_one_lwp): New.
10270 (linux_kill_one_lwp): Rename to ...
10271 (kill_one_lwp_callback): ... this. Use the new
10272 linux_kill_one_lwp.
10273
e886a173
PA
102742012-02-02 Pedro Alves <palves@redhat.com>
10275
10276 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10277 inferior.
10278
be07f1a2
PA
102792012-01-27 Pedro Alves <palves@redhat.com>
10280
10281 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10282 (elf_64_file_p): Make static.
10283 (linux_pid_exe_is_elf_64_file): New.
10284 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10285 Delete declarations.
10286 (linux_pid_exe_is_elf_64_file): Declare.
10287 * linux-x86-low.c (x86_arch_setup): Use
10288 linux_pid_exe_is_elf_64_file.
10289
d8301ad1
JK
102902012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10291
10292 * linux-low.c (linux_wait_for_event_1): Rename to ...
10293 (linux_wait_for_event): ... here and merge it with former
10294 linux_wait_for_event - new variable wait_ptid, use it.
10295 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10296
01b17894
PA
102972012-01-23 Pedro Alves <palves@redhat.com>
10298
10299 * server.c (main): Avoid yet another case of infinite loop while
10300 detaching/killing after a longjmp.
10301
e825046f
JK
103022012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10303
10304 Code cleanup.
10305 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10306
b9e7b9c3
UW
103072012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10308
10309 * hostio.c (handle_readlink): New function.
10310 (handle_vFile): Call it to handle "vFile:readlink" packets.
10311
901f9912
UW
103122012-01-20 Pedro Alves <palves@redhat.com>
10313 Ulrich Weigand <ulrich.weigand@linaro.org>
10314
10315 * server.c (handle_v_requests): Only support vAttach and vRun to
10316 start multiple processes when in extended protocol mode.
10317
fc1ab1a0
PA
103182012-01-17 Pedro Alves <palves@redhat.com>
10319
10320 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10321 memalign plus mprotect to allocate the scratch buffer.
10322
7d5d4e98
PA
103232012-01-13 Pedro Alves <palves@redhat.com>
10324
10325 * server.c (attach_inferior): Clear `cont_thread'.
10326
f128d5e9
PA
103272012-01-13 Pedro Alves <palves@redhat.com>
10328
10329 * server.c (main): Avoid infinite loop while detaching/killing
10330 after a longjmp.
10331
06db92f0
DE
103322012-01-09 Doug Evans <dje@google.com>
10333
10334 * server.c (start_inferior): Set last_ptid in --wrapper case.
10335
32d92999
YQ
103362012-01-06 Yao Qi <yao@codesourcery.com>
10337
10338 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10339 defined.
10340 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10341
5e0a92a9
YQ
103422012-01-04 Yao Qi <yao@codesourcery.com>
10343
10344 * tracepoint.c (cmd_qtdp): Print debug message
10345 for static tracepoint.
10346
ae639e8c
YQ
103472012-01-04 Yao Qi <yao@codesourcery.com>
10348
10349 * tracepoint.c (trace_vdebug): Differentiate debug message
10350 between gdbserver and IPA.
10351
f72429c5
YQ
103522012-01-03 Yao Qi <yao@codesourcery.com>
10353
10354 * tracepoint.c (tracepoint_was_hit): Don't collect for
10355 static tracepoint.
10356
12c3e59c
JB
103572012-01-02 Joel Brobecker <brobecker@adacore.com>
10358
10359 * terminal.h: Reformat copyright header.
10360
67827812
JB
103612012-01-02 Joel Brobecker <brobecker@adacore.com>
10362
10363 * server.c (gdbserver_version): Update copyright year.
10364 * gdbreplay.c (gdbreplay_version): Likewise.
10365
3e52c33d
JK
103662011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10367
10368 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10369
10370 Revert:
10371 2011-12-18 Hui Zhu <teawater@gmail.com>
10372 * linux-low.c (linux_create_inferior): Save return value to ret.
10373
66f1260e
HZ
103742011-12-18 Hui Zhu <teawater@gmail.com>
10375
10376 * linux-low.c (linux_create_inferior): Save return value to ret.
10377
e77616d7
DE
103782011-12-16 Doug Evans <dje@google.com>
10379
e7b06c57
DE
10380 * linux-low.c (linux_create_inferior): If stdio connection,
10381 redirect stdin from /dev/null, stdout to stderr.
10382 * remote-utils.c (remote_is_stdio): New static global.
10383 (remote_connection_is_stdio): New function.
10384 (remote_prepare): Handle stdio connection.
10385 (remote_open): Ditto.
10386 (remote_close): Don't close stdin for stdio connections.
10387 (read_prim,write_prim): New functions. Replace all calls to
10388 read/write to these.
10389 * server.c (main): Watch for "-" argument. Move call to
10390 remote_prepare before start_inferior.
10391 * server.h (STDIO_CONNECTION_NAME): New macro.
10392 (remote_connection_is_stdio): Declare.
10393
e77616d7
DE
10394 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10395 in debugging output.
10396
82067193
YQ
103972011-12-15 Yao Qi <yao@codesourcery.com>
10398
10399 * tracepoint.c: Include sys/syscall.h.
10400 (gdb_ust_thread): Remove preprocessor conditional.
10401
82bfbe7e
PA
104022011-12-14 Pedro Alves <pedro@codesourcery.com>
10403
10404 * linux-low.c (linux_detach_one_lwp): Call
10405 the_low_target.prepare_to_resume before detaching.
10406
712c6575
YQ
104072011-12-14 Yao Qi <yao@codesourcery.com>
10408
10409 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10410 of write.
10411
d54d1edf
YQ
104122011-12-14 Yao Qi <yao@codesourcery.com>
10413
10414 * i386-low.c (i386_low_stopped_data_address): Initialize local
10415 variable `control'.
10416
6210a125
PA
104172011-12-13 Pedro Alves <pedro@codesourcery.com>
10418
10419 PR remote/13492
10420
10421 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10422 DR_CONTROL unless necessary. Extend comments.
10423 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10424 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10425
2ece8244
YQ
104262011-12-13 Yao Qi <yao@codesourcery.com>
10427
10428 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10429 macros.
10430 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10431
784867a5
JK
104322011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10433
10434 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10435 Print new debug message for such case.
10436
6bf36717
JK
104372011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10438
10439 Fix overlapping memcpy.
10440 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10441 the read_inferior_memory transfer.
10442 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10443 write_inferior_memory transfer.
10444 (set_fast_tracepoint_jump): New variable buf. Use it for the
10445 read_inferior_memory and write_inferior_memory transfers.
10446 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10447 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10448 Use it for the write_inferior_memory transfer.
10449 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10450 buffers.
10451
50275556
MR
104522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10453
10454 * linux-low.c (fetch_register, store_register): Make code
10455 consistent, fix formatting.
10456
7325beb4
MR
104572011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10458
10459 * linux-low.c (usr_store_inferior_registers): Factor out code
10460 to handle individual registers into...
10461 (store_register): ... this new function.
10462
c642a434
UW
104632011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10464
10465 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10466 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10467 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10468 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10469 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10470 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10471 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10472 (srv_xmlfiles): Add new XML files.
10473
10474 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10475 and <sys/uio.h>.
10476 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10477 (init_registers_s390_linux32v1): Add prototype.
10478 (init_registers_s390_linux32v2): Likewise.
10479 (init_registers_s390_linux64v1): Likewise.
10480 (init_registers_s390_linux64v2): Likewise.
10481 (init_registers_s390x_linux64v1): Likewise.
10482 (init_registers_s390x_linux64v2): Likewise.
10483 (s390_num_regs): Increment to 52.
10484 (s390_regmap): Add orig_r2 register.
10485 (s390_num_regs_3264): Increment to 68.
10486 (s390_regmap_3264): Add orig_r2 register.
10487 (s390_collect_ptrace_register): Handle orig_r2 register.
10488 (s390_supply_ptrace_register): Likewise.
10489 (s390_fill_last_break): New function.
10490 (s390_store_last_break): Likewise.
10491 (s390_fill_system_call): New function.
10492 (s390_store_system_call): Likewise.
10493 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10494 register sets.
10495 (s390_check_regset): New function.
10496 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10497 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10498 Update target_regsets for available register sets.
10499
2268b414
JK
105002011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10501 Jan Kratochvil <jan.kratochvil@redhat.com>
10502
10503 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10504 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10505 New.
10506 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10507 * linux-low.h (struct process_info_private): New member r_debug.
10508 * server.c (handle_qxfer_libraries): Call
10509 the_target->qxfer_libraries_svr4.
10510 (handle_qxfer_libraries_svr4): New function.
10511 (qxfer_packets): New entry "libraries-svr4".
10512 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10513 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10514 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10515 PACKET_qXfer_libraries_svr4.
10516
d6db1fab
UW
105172011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10518
10519 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10520 PSW address/mask between 8-byte and 16-byte formats.
10521 (s390_supply_ptrace_register): Likewise.
10522 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10523 basic addressing mode bit.
10524
242f5f1c
SS
105252011-11-24 Stan Shebs <stan@codesourcery.com>
10526
10527 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10528
f196051f
SS
105292011-11-17 Stan Shebs <stan@codesourcery.com>
10530
10531 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10532 (tracing_start_time): New global.
10533 (tracing_stop_time): New global.
10534 (tracing_user_name): New global.
10535 (tracing_notes): New global.
10536 (tracing_stop_note): New global.
10537 (cmd_qtstart): Set traceframe_usage, start_time.
10538 (stop_tracing): Set stop_time.
10539 (cmd_qtstatus): Report additional status.
10540 (cmd_qtp): New function.
10541 (handle_tracepoint_query): Call it.
10542 (cmd_qtnotes): New function.
10543 (handle_tracepoint_general_set): Call it.
10544 (get_timestamp): Rename from tsv_get_timestamp.
10545
405f8e94
SS
105462011-11-14 Stan Shebs <stan@codesourcery.com>
10547 Kwok Cheung Yeung <kcy@codesourcery.com>
10548
10549 * linux-x86-low.c (small_jump_insn): New.
10550 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10551 trampoline and error message, build a trampoline and issue a small
10552 jump instruction to it.
10553 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10554 trampoline and error message.
10555 (x86_get_min_fast_tracepoint_insn_len): New.
10556 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10557 * linux-low.h (struct linux_target_ops): Add arguments to
10558 install_fast_tracepoint_jump_pad operation, add new operation.
10559 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10560 arguments.
10561 (linux_get_min_fast_tracepoint_insn_len): New function.
10562 (linux_target_op): Add new operation.
10563 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10564 (gdb_trampoline_buffer_end): Ditto.
10565 (gdb_trampoline_buffer_error): Ditto.
10566 (struct ipa_sym_addresses): Add fields for new IPA variables.
10567 (symbol_list): Add entries for new IPA variables.
10568 (struct tracepoint): Add fields to hold the address range of the
10569 trampoline used by the tracepoint.
10570 (trampoline_buffer_head): New static variable.
10571 (trampoline_buffer_tail): Ditto.
10572 (claim_trampoline_space): New function.
10573 (have_fast_tracepoint_trampoline_buffer): New function.
10574 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10575 structure.
10576 (install_fast_tracepoint): Ditto, also add error buffer argument.
10577 (cmd_qtminftpilen): New function.
10578 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10579 (fast_tracepoint_from_trampoline_address): New function.
10580 (fast_tracepoint_collecting): Handle trampoline as part of jump
10581 pad space.
10582 (set_trampoline_buffer_space): New function.
10583 (initialize_tracepoint): Initialize new IPA variables.
10584 * target.h (struct target_ops): Add arguments to
10585 install_fast_tracepoint_jump_pad operation, add new
10586 get_min_fast_tracepoint_insn_len operation.
10587 (target_get_min_fast_tracepoint_insn_len): New.
10588 (install_fast_tracepoint_jump_pad): Add arguments.
10589 * server.h (IPA_BUFSIZ): Define.
10590 * linux-i386-ipa.c: Include extra header files.
10591 (initialize_fast_tracepoint_trampoline_buffer): New function.
10592 (initialize_low_tracepoint): Call it.
10593 * server.h (set_trampoline_buffer_space): Declare.
10594 (claim_trampoline_space): Ditto.
10595 (have_fast_tracepoint_trampoline_buffer): Ditto.
10596
1e4d1764
YQ
105972011-11-14 Yao Qi <yao@codesourcery.com>
10598
10599 * server.c (handle_query): Handle InstallInTrace for qSupported.
10600 * tracepoint.c (add_tracepoint): Sort list.
10601 (install_tracepoint, download_tracepoint): New.
10602 (cmd_qtdp): Call them to install and download tracepoints.
10603 (sort_tracepoints): Removed.
10604 (cmd_qtstart): Update.
10605
5c73ff4e
YQ
106062011-11-14 Yao Qi <yao@codesourcery.com>
10607
10608 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10609 * mem-break.h: Declare.
10610 * tracepoint.c (cmd_qtstart): Move some code to ...
10611 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10612 New.
10613 (download_tracepoints): Move some code to ...
10614 (download_tracepoint_1): ... here. New.
10615
86a30030
YQ
106162011-11-08 Yao Qi <yao@codesourcery.com>
10617
10618 * remote-utils.c (relocate_instruction): A comment fix.
10619
8d26e50c
JB
106202011-11-07 Joel Brobecker <brobecker@adacore.com>
10621
10622 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10623 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10624 dr_status_mirror and dr_control_mirror from debug_reg_state.
10625 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10626 (i386_initial_stuff): Remove use of deleted globals.
10627 (i386_get_thread_context, i386_set_thread_context,
10628 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10629 from debug_reg_state.
10630
a59306a3
YQ
106312011-11-05 Yao Qi <yao@codesourcery.com>
10632
10633 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10634 address as TPOINT's.
10635
3065dfb6
SS
106362011-11-02 Stan Shebs <stan@codesourcery.com>
10637
10638 * tracepoint.c (agent_mem_read_string): New function.
10639 (eval_agent_expr): Call it for tracenz.
10640 * server.c (handle_query): Report support for tracenz.
10641
fd0d8c7c
YQ
106422011-11-02 Yao Qi <yao@codesourcery.com>
10643
10644 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10645
609086b1
YQ
106462011-11-02 Yao Qi <yao@codesourcery.com>
10647
10648 * target.h: Fix a typo in comment.
10649
b9fd1791
PA
106502011-10-31 Pedro Alves <pedro@codesourcery.com>
10651
10652 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10653 clobber the breakpoints' shadows with fast tracepoint jumps.
10654 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10655 * target.c (write_inferior_memory): Also pass MYADDR down to
10656 check_mem_write.
10657
03583c20
UW
106582011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10659
10660 * configure.ac: Check support for personality routine.
10661 * configure: Regenerate.
10662 * config.in: Likewise.
10663 * linux-low.c: Include <sys/personality.h>.
10664 Define ADDR_NO_RANDOMIZE if necessary.
10665 (linux_create_inferior): Disable address space randomization when
10666 forking inferior, if requested.
10667 (linux_supports_disable_randomization): New function.
10668 (linux_target_ops): Install it.
10669 * server.h (disable_randomization): Declare.
10670 * server.c (disable_randomization): New global variable.
10671 (handle_general_set): Handle QDisableRandomization.
10672 (handle_query): Likewise for qSupported.
10673 (main): Support --disable-randomization and --no-disable-randomization
10674 command line arguments.
10675 * target.h (struct target_ops): Add supports_disable_randomization.
10676 (target_supports_disable_randomization): New macro.
10677
723b724b
MF
106782011-09-29 Mike Frysinger <vapier@gentoo.org>
10679
10680 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10681 ifdef check.
10682 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10683 [!PT_GETDSBT] (target_loadmap): New definition.
10684 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10685 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10686 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10687 and PT_GETDSBT to LINUX_LOADMAP.
10688 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10689 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10690
55329a5c 106912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10692
10693 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10694 (arm_linux_hwbp_cap): New static variable.
10695 (arm_linux_get_hwbp_cap): Replace by ...
10696 (arm_linux_init_hwbp_cap): ... this new function.
10697 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10698 (arm_linux_get_hw_watchpoint_count): Likewise.
10699 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10700 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10701 (arm_prepare_to_resume): Use perror_with_name instead of error.
10702
55329a5c 107032011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10704
10705 * linux-arm-low.c: Include <signal.h>.
10706 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10707 (struct arm_linux_hwbp_cap): New data type.
10708 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10709 (struct arm_linux_hw_breakpoint): New data type.
10710 (MAX_BPTS, MAX_WPTS): Define.
10711 (struct arch_process_info, struct arch_lwp_info): New data types.
10712 (arm_linux_get_hwbp_cap): New function.
10713 (arm_linux_get_hw_breakpoint_count): Likewise.
10714 (arm_linux_get_hw_watchpoint_count): Likewise.
10715 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10716 (arm_hwbp_control_initialize): Likewise.
10717 (arm_hwbp_control_is_enabled): Likewise.
10718 (arm_hwbp_control_is_initialized): Likewise.
10719 (arm_hwbp_control_disable): Likewise.
10720 (arm_linux_hw_breakpoint_equal): Likewise.
10721 (arm_linux_hw_point_initialize): Likewise.
10722 (struct update_registers_data): New data structure.
10723 (update_registers_callback: New function.
10724 (arm_insert_point): Likewise.
10725 (arm_remove_point): Likewise.
10726 (arm_stopped_by_watchpoint): Likewise.
10727 (arm_stopped_data_address): Likewise.
10728 (arm_new_process): Likewise.
10729 (arm_new_thread): Likewise.
10730 (arm_prepare_to_resume): Likewise.
10731 (the_low_target): Register arm_insert_point, arm_remove_point,
10732 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10733 arm_new_thread, and arm_prepare_to_resume.
10734
6b9801d4
SS
107352011-09-15 Stan Shebs <stan@codesourcery.com>
10736
10737 * server.h (struct emit_ops): Add compare-goto fields.
10738 * tracepoint.c (gdb_agent_op_sizes): New table.
10739 (emit_eq_goto): New function.
10740 (emit_ne_goto): New function.
10741 (emit_lt_goto): New function.
10742 (emit_le_goto): New function.
10743 (emit_gt_goto): New function.
10744 (emit_ge_goto): New function.
10745 (is_goto_target): New function.
10746 (compile_bytecodes): Recognize special cases of compare-goto
10747 combinations and call specialized emitters for them.
10748 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10749 (amd64_emit_ne_goto): New function.
10750 (amd64_emit_lt_goto): New function.
10751 (amd64_emit_le_goto): New function.
10752 (amd64_emit_gt_goto): New function.
10753 (amd64_emit_ge_goto): New function.
10754 (amd64_emit_ops): Add the new functions.
10755 (i386_emit_eq_goto): New function.
10756 (i386_emit_ne_goto): New function.
10757 (i386_emit_lt_goto): New function.
10758 (i386_emit_le_goto): New function.
10759 (i386_emit_gt_goto): New function.
10760 (i386_emit_ge_goto): New function.
10761 (i386_emit_ops): Add the new functions.
10762
bf15cbda
SS
107632011-09-08 Stan Shebs <stan@codesourcery.com>
10764
10765 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10766 (i386_emit_epilogue): Restore %ebx.
10767
943ca1dd
JZ
107682011-08-31 Jie Zhang <jzhang918@gmail.com>
10769
10770 * server.c (step_thread): Remove definition.
10771 (process_serial_event): Don't handle Hs.
10772 * server.h (step_thread): Remove declaration.
10773 * target.c (set_desired_inferior): Remove use of step_thread.
10774
e3deef73
LM
107752011-08-24 Luis Machado <lgustavo@codesourcery.com>
10776
10777 * linux-low.c: Include linux-procfs.h.
10778 (linux_attach_lwp_1): Update comments.
10779 (linux_attach): Scan for existing threads when attaching to a
10780 process that is the tgid.
10781 * Makefile.in: Update dependencies.
10782
13da1c97
LM
107832011-08-24 Luis Machado <lgustavo@codesourcery.com>
10784
10785 * configure.srv: Add linux-procfs.o dependencies.
10786
881127c9
YQ
107872011-08-14 Yao Qi <yao@codesourcery.com>
10788
10789 * target.h (struct target_ops): Fix indent.
10790 * win32-low.c (win32_target_ops): Fix comment.
10791
58dbd541
YQ
107922011-08-14 Andrew Jenner <andrew@codesourcery.com>
10793 Yao Qi <yao@codesourcery.com>
10794
10795 * Makefile.in (clean): Remove tic6x-*.c files.
10796 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10797 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10798 (tic6x-c64xp-linux.c): Likewise.
10799 * configure.srv: Add support for tic6x-*-uclinux.
10800 * linux-tic6x-low.c: New.
10801 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10802
78d85199
YQ
108032011-08-14 Andrew Stubbs <ams@codesourcery.com>
10804 Yao Qi <yao@codesourcery.com>
10805
10806 * target.h (struct target_ops): Add read_loadmap.
10807 * linux-low.c (struct target_loadseg): New type.
10808 (struct target_loadmap): New type.
10809 (linux_read_loadmap): New function.
10810 (linux_target_ops): Add linux_read_loadmap.
10811 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10812 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10813 to NULL.
78d85199 10814
a959a88d
EZ
108152011-08-05 Eli Zaretskii <eliz@gnu.org>
10816
10817 * win32-low.c: Include <stdint.h>.
10818
1ced966e
PA
108192011-07-22 Pedro Alves <pedro@codesourcery.com>
10820
10821 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10822 to the inferior here.
10823 (i386_remove_aligned_watchpoint): Ditto.
10824 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10825 fit part of the watchpoint in the debug registers.
10826 (i386_update_inferior_debug_regs): New.
10827 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10828 registers, and only update the inferior on success.
10829 (i386_low_remove_watchpoint): Ditto.
10830
d26e3629
KY
108312011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10832
10833 * linux-low.c (compare_ints, unique, list_threads, show_process,
10834 linux_core_of_thread): Delete.
10835 (linux_target_ops): Change linux_core_of_thread to
10836 linux_common_core_of_thread.
10837 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10838 * utils.c (malloc_failure): Change type of argument.
10839 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10840 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10841 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10842 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10843 (IPA_OBJS): Add common-utils-ipa.o.
10844 (ptid_h, linux_osdata_h): New macros.
10845 (server_h): Add common/common-utils.h, common/xml-utils.h,
10846 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10847 common/ptid.h.
10848 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10849 ptid.o, buffer.o): New rules.
10850 (linux-low.o): Add common/linux-osdata.h as a dependency.
10851 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10852 * configure.ac: Add AC_HEADER_DIRENT check.
10853 * config.in: Regenerate.
10854 * configure: Regenerate.
10855 * remote-utils.c (xml_escape_text): Delete.
10856 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10857 buffer_xml_printf): Move to common/buffer.c.
10858 * server.c (main): Remove call to initialize_inferiors.
10859 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10860 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10861 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10862 internal_error, gdb_assert, gdb_assert_fail): Delete.
10863 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10864 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10865 common/buffer.h.
10866 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10867 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10868 initialize_inferiors): Delete.
10869
2275a1a7
PA
108702011-07-20 Pedro Alves <pedro@codesourcery.com>
10871
10872 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10873 symbol error.
10874
0a5b1e09
PA
108752011-05-31 Pedro Alves <pedro@codesourcery.com>
10876
10877 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10878 assertion.
10879 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10880
6938fd34
YQ
108812011-05-26 Yao Qi <yao@codesourcery.com>
10882
10883 * Makefile.in (thread-db.o): Track dependence to
10884 common/gdb_thread_db.h.
10885 * thread-db.c: include gdb_thread_db.h from right place.
10886
b481f9e0
TT
108872011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10888
10889 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10890 __FILE__ and __LINE__ to internal_error.
10891
98a5dd13
DE
108922011-05-13 Doug Evans <dje@google.com>
10893
10894 * thread-db.c (try_thread_db_load_from_sdir): New function.
10895 (try_thread_db_load_from_dir): New function.
10896 (thread_db_load_search): Handle $sdir, ignore $pdir.
10897 Remove trying of system directories if search of
10898 libthread-db-search-path fails, that is now done via $sdir.
10899
d248b706
KY
109002011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10901
10902 * server.c (handle_query): Add EnableDisableTracepoints to the list
10903 of supported features.
43aaf8b6 10904 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10905 tracepoints.
43aaf8b6
PA
10906 (cmd_qtenable_disable): New.
10907 (cmd_qtstart): Install tracepoints even if disabled.
10908 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10909 receiving a QTEnable or QTDisable packet.
10910 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10911 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10912 tracepoints.
10913 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10914
84e578fb
DE
109152011-05-10 Doug Evans <dje@google.com>
10916
10917 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10918
71f55dd8
DE
109192011-05-04 Doug Evans <dje@google.com>
10920
10921 * linux-low.c (linux_join): Skip process lookup.
10922 * spu-low.c (spu_join): Ditto.
10923 * server.c (join_inferiors_callback): Delete.
10924 (process_serial_event): For 'D' packet (detach) call join_inferior
10925 directly.
10926
4d393d60
JM
109272011-05-04 Joseph Myers <joseph@codesourcery.com>
10928
10929 * README: Don't mention xscale*-*-linux*.
10930 * configure.srv (xscale*-*-linux*): Don't handle target.
10931
b00ad6ff
NF
109322011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10933
10934 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10935 casting pointers.
10936 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10937 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10938 (i386_emit_void_call_2): Likewise.
10939
af96c192
YQ
109402011-04-26 Yao Qi <yao@codesourcery.com>
10941
43aaf8b6
PA
10942 * linux-low.c: Move common macros to linux-ptrace.h.
10943 Include linux-ptrace.h.
af96c192
YQ
10944 * Makefile.in (linux_ptrace_h): New.
10945 (linux-low.o): Depends on linux-ptrace.h.
10946
03f2bd59
JK
109472011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10948
10949 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10950 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10951 (remote_prepare): New function with most of the TCP code from ...
10952 (remote_open): ... here. Detect PORT here unconditionally. Move also
10953 setting transport_is_reliable.
10954 * server.c (run_once): New variable.
10955 (gdbserver_usage): Document it.
10956 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10957 the first run if RUN_ONCE.
10958 * server.h (run_once, remote_prepare): New declarations.
10959
7a9dd1b2
TT
109602011-04-19 Tom Tromey <tromey@redhat.com>
10961
10962 * win32-low.c (handle_load_dll): Remove duplicate "the".
10963
81239425
PM
109642011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10965
10966 Remove support for old Cygwin 1.5 versions.
10967 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10968 function to avoid warning.
10969 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10970 warning.
10971
9e0627f1
PM
109722011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10973
10974 * gdbserver/server.h (Macro _): Define it if not available.
10975
588eebee
MS
109762011-03-14 Michael Snyder <msnyder@vmware.com>
10977
348af9f7 10978 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10979
43f70d4c
JB
109802011-03-10 Joel Brobecker <brobecker@adacore.com>
10981
10982 * Makefile.in (maintainer-clean realclean distclean): Remove
10983 "make ... subdir_do" command.
10984
348af9f7
MS
109852011-03-10 Michael Snyder <msnyder@vmware.com>
10986
10987 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10988
10989 * server.c (handle_v_run): Free alloced buffer on early return.
10990
e637a4f5
YQ
109912011-03-09 Yao Qi <yao@codesourcery.com>
10992
10993 Revert:
10994 2011-03-04 Yao Qi <yao@codesourcery.com>
10995
10996 * Makefile.in: Remove GNU make feature --directory.
10997
10998 2011-03-05 Yao Qi <yao@codesourcery.com>
10999
11000 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11001 (subdir_do): New make target. Copied from gdb/Makefile.
11002 (maintainer-clean, realclean, distclean, clean): Call corresponding
11003 make targets in common/Makefile.
11004
11005 2011-02-11 Yao Qi <yao@codesourcery.com>
11006
11007 * configure.ac: Call AC_PROG_RANLIB.
11008 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11009 * configure: Regenerate.
11010
e6edda56
JK
110112011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11012
11013 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11014
e5141119
JB
110152011-03-06 Yao Qi <yao@codesourcery.com>
11016
11017 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11018
64794aa4
JB
110192011-03-05 Yao Qi <yao@codesourcery.com>
11020
11021 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11022 (subdir_do): New make target. Copied from gdb/Makefile.
11023 (maintainer-clean, realclean, distclean, clean): Call corresponding
11024 make targets in common/Makefile.
11025
7a762829
YQ
110262011-03-04 Yao Qi <yao@codesourcery.com>
11027
11028 * Makefile.in: Remove GNU make feature --directory.
11029
348af9f7
MS
110302011-03-04 Michael Snyder <msnyder@vmware.com>
11031
11032 * server.c (queue_stop_reply): Call xmalloc not malloc.
11033
110342011-03-02 Michael Snyder <msnyder@vmware.com>
11035
11036 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11037
9f72fee2
MS
110382011-02-28 Michael Snyder <msnyder@vmware.com>
11039
588eebee
MS
11040 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11041 (cmd_qtframe): Ditto.
11042 (cmd_qtbuffer): Ditto.
11043 (cmd_bigqtbuffer): Ditto.
11044
9f72fee2
MS
11045 * utils.c (decimal2str): Initialize 'width' to nine, then
11046 don't mess with it.
11047
8040bd49
UW
110482011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11049
11050 * hostio.c (require_data): Free *data, not data.
11051
7e52cbd0
JK
110522011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11053
11054 * hostio.c (require_data): Use free, not xfree.
11055
9130f83e
MS
110562011-02-27 Michael Snyder <msnyder@vmware.com>
11057
4b812f4e
MS
11058 * server.c (handle_query): Discard unused value.
11059
9130f83e
MS
11060 * hostio.c (require_data): Free malloc memory before returning
11061 error.
11062
69d37113
MS
110632011-02-26 Michael Snyder <msnyder@vmware.com>
11064
11065 * linux-low.c (list_threads): Call closedir for dirent.
11066
35f5825a
MS
110672011-02-27 Michael Snyder <msnyder@vmware.com>
11068
2a589cef
MS
11069 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11070 a case statement falls through.
11071
0adea5f7
MS
11072 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11073
35f5825a
MS
11074 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11075 in comparison.
11076
238f1c74
MS
110772011-02-26 Michael Snyder <msnyder@vmware.com>
11078
11079 * utils.c (decimal2str): Eliminate dead code and dead param.
11080 (pulongest): Drop dead param from call to decimal2str.
11081 (plongest): Ditto.
11082
633ff500
JB
110832011-02-24 Joel Brobecker <brobecker@adacore.com>
11084
11085 Revert the following patch (not approved yet):
11086 2011-02-21 Hui Zhu <teawater@gmail.com>
11087 * tracepoint.c (tp_printf): New function.
11088 (eval_agent_expr): Handle gdb_agent_op_printf.
11089
f9c6ff72
HZ
110902011-02-21 Hui Zhu <teawater@gmail.com>
11091
11092 * tracepoint.c (tp_printf): New function.
11093 (eval_agent_expr): Handle gdb_agent_op_printf.
11094
94d5e490
TT
110952011-02-18 Tom Tromey <tromey@redhat.com>
11096
11097 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11098 (tracepoint.o): Likewise.
11099 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11100 (gdb_agent_op_names): Likewise.
11101
c7f96d2b
TT
111022011-02-18 Tom Tromey <tromey@redhat.com>
11103
11104 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11105 gdb_agent_op_rot>: New constants.
11106 (gdb_agent_op_names): Add pick and roll.
11107 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11108 cases.
11109
0feedb2c
JK
111102011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11111
11112 * aclocal.m4: Regenerated with aclocal-1.11.1.
11113
b3b9301e
PA
111142011-02-14 Pedro Alves <pedro@codesourcery.com>
11115
11116 * server.c (handle_qxfer_traceframe_info): New.
11117 (qxfer_packets): Register "traceframe-info".
11118 (handle_query): Report support for qXfer:traceframe-info:read+.
11119 * tracepoint.c (match_blocktype): New.
11120 (traceframe_find_block_type): Rename to ...
11121 (traceframe_walk_blocks): ... this. Add callback filter argument,
11122 and use it.
11123 (traceframe_find_block_type): New, reimplemented on top of
11124 traceframe_walk_blocks.
11125 (build_traceframe_info_xml): New.
11126 (traceframe_read_info): New.
11127 * server.h (traceframe_read_info): Declare.
11128
4f3e6fb7
YQ
111292011-02-11 Yao Qi <yao@codesourcery.com>
11130
11131 * configure.ac: Call AC_PROG_RANLIB.
11132 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11133 * configure: Regenerate.
11134
764880b7
PA
111352011-02-07 Pedro Alves <pedro@codesourcery.com>
11136
11137 * server.c (gdb_read_memory): Change return semantics to allow
11138 partial transfers.
11139 (handle_search_memory_1): Adjust.
11140 (process_serial_event) <'m' packet>: Handle partial transfers.
11141 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11142
1c79eb8a
PA
111432011-01-28 Pedro Alves <pedro@codesourcery.com>
11144
11145 * regcache.c (init_register_cache): Initialize
11146 regcache->register_status.
11147 (free_register_cache): Release regcache->register_status.
11148 (regcache_cpy): Copy register_status.
11149 (registers_to_string): Print 'x's for unavailable registers.
11150 (supply_register): Mark the register's status valid or
11151 unavailable, depending on whether a buffer was passed in or not.
11152 (supply_register_zeroed): New.
11153 (supply_regblock): Mark the registers' status valid or
11154 unavailable, depending on whether a buffer was passed in or not.
11155 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11156 (struct regcache): New `register_status' field.
11157 (supply_register_zeroed): Declare.
11158 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11159 supply_register_zeroed, rather than passing a NULL buffer to
11160 supply_register.
11161 * tracepoint.c (fetch_traceframe_registers): Update comment.
11162
85724a0e
PA
111632011-01-28 Pedro Alves <pedro@codesourcery.com>
11164
11165 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11166 buffer explicit.
11167
d08aafef
PA
111682011-01-25 Pedro Alves <pedro@codesourcery.com>
11169
11170 * server.h (decode_xfer_write): Change prototype.
11171 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11172 and don't extract the annex here.
11173 * server.c (decode_xfer_read): Remove `annex' parameter,
11174 and don't extract the annex here.
11175 (decode_xfer): New.
11176 (struct qxfer): New.
11177 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11178 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11179 (handle_qxfer_statictrace): New functions, abstracted out from
11180 handle_query, and made to use the struct qxfer interface.
11181 (handle_threads_qxfer_proper): Rename to ...
11182 (handle_qxfer_threads_proper): ... this.
11183 (handle_threads_qxfer): Rename to ...
11184 (handle_qxfer_threads): ... this. Adjust.
11185 (qxfer_packets): New array.
11186 (handle_qxfer): New function.
11187 (handle_query): Use handle_qxfer.
11188
493e2a69
MS
111892011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11190
11191 * gdbreplay.c: Shorten lines of >= 80 columns.
11192 * linux-low.c: Ditto.
11193 * linux-ppc-low.c: Ditto.
11194 * linux-s390-low.c: Ditto.
11195 * linux-sparc-low.c: Ditto.
11196 * linux-x86-low.c: Ditto.
11197 * linux-xtensa-low.c: Ditto.
11198 * mem-break.c: Ditto.
11199 * nto-low.c: Ditto.
11200 * regcache.h: Ditto.
11201 * remote-utils.c: Ditto.
11202 * server.c: Ditto.
11203 * server.h: Ditto.
11204 * thread-db.c: Ditto.
11205 * tracepoint.c: Ditto.
11206 * utils.c: Ditto.
11207 * win32-low.h: Ditto.
11208
44944448
JB
112092011-01-05 Joel Brobecker <brobecker@adacore.com>
11210
11211 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11212 update.
11213
71ce852c
JB
112142011-01-01 Joel Brobecker <brobecker@adacore.com>
11215
11216 * server.c (gdbserver_version): Update copyright year in version
11217 output.
11218 * gdbreplay.c (gdbreplay_version): Ditto.
11219
eb826dc6
MF
112202010-12-29 Jie Zhang <jie.zhang@analog.com>
11221
11222 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11223 * linux-bfin-low.c: New file.
11224 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11225 PT_DATA_ADDR for BFIN targets.
11226 * Makefile.in (SFILES): Add linux-bfin-low.c.
11227 (clean): Remove reg-bfin.c.
11228 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11229 * README: Mention supported Blackfin targets.
11230
39ab222a
MF
112312010-12-23 Mike Frysinger <vapier@gentoo.org>
11232
11233 * .gitignore: New file.
11234
a1f2ce7d
MF
112352010-11-16 Mike Frysinger <vapier@gentoo.org>
11236
11237 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11238
f474844c
JZ
112392010-10-22 Jie Zhang <jie@codesourcery.com>
11240
11241 * Makefile.in: Add FLAGS_TO_PASS variable.
11242 (install): Remove dependency of install-only and recursively
11243 invoke make for install-only.
11244
f1048712
DE
112452010-10-04 Doug Evans <dje@google.com>
11246
11247 * Makefile.in (uninstall): Use $(DESTDIR).
11248
b53a1623
PA
112492010-09-24 Pedro Alves <pedro@codesourcery.com>
11250
e6ee044d
PA
11251 PR gdb/11842
11252
b53a1623
PA
11253 * linux-x86-low.c (compat_siginfo_from_siginfo)
11254 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11255 si_code is < 0. Check for si_code == SI_TIMER before checking for
11256 si_code < 0.
11257
fa1bd1e4
JB
112582010-09-13 Joel Brobecker <brobecker@adacore.com>
11259
11260 * lynx-i386-low.c: New file.
11261 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11262
47fac8f8
JB
112632010-09-13 Joel Brobecker <brobecker@adacore.com>
11264
11265 * lynx-low.c (ptrace_request_to_str): Remove handling for
11266 request values that have been removed in LynxOS 5.x.
11267
1adfc54d
JB
112682010-09-13 Joel Brobecker <brobecker@adacore.com>
11269
11270 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11271 <ptrace.h>
11272
c2a66c29
NS
112732010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11274
11275 * configure.ac: Add --enable-inprocess-agent option.
11276 * configure: Rebuilt.
11277
32fcada3
YQ
112782010-09-06 Yao Qi <yao@codesourcery.com>
11279
11280 * linux-low.c (linux_kill): Remove unused variable.
11281 (linux_stabilize_threads): Likewise.
11282 * server.c (start_inferior): Likewise.
11283 (queue_stop_reply_callback): Likewise.
11284 * tracepoint.c (do_action_at_tracepoint): Likewise.
11285
0cccb683
YQ
112862010-09-06 Yao Qi <yao@codesourcery.com>
11287
11288 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11289 on return.
11290
423ec54c
JK
112912010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11292
11293 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11294
12ac6819
PA
112952010-09-06 Pedro Alves <pedro@codesourcery.com>
11296
11297 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11298 "$(IPA_DEPFILES)".
11299
8ed54b31
JB
113002010-09-01 Joel Brobecker <brobecker@adacore.com>
11301
11302 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11303 gdbserver/lynx-ppc-low.c: New files.
11304 * Makefile.in (lynx_low_h): New variable.
11305 (lynx-low.o, lynx-ppc-low.o): New rules.
11306 * configure.ac: On LynxOS, link with -lnetinet.
11307 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11308 * configure: regenerate.
11309
bb0116a4
JB
113102010-09-01 Joel Brobecker <brobecker@adacore.com>
11311
11312 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11313 * configure.ac: Add check for vasprintf and vsnprintf.
11314 * configure, config.in: Regenerate.
11315 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11316
a778ab81 113172010-09-01 Joel Brobecker <brobecker@adacore.com>
11318
11319 * gdbreplay.c: Move include of alloca.h up, next to include of
11320 malloc.h.
11321 * server.h: Add include of malloc.h.
11322 * mem-break.c: Remove include of malloc.h.
11323 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11324
8b034a19 113252010-09-01 Joel Brobecker <brobecker@adacore.com>
11326
11327 * Makefile.in (memmem.o): Build with -Wno-error.
11328
113292010-09-01 Joel Brobecker <brobecker@adacore.com>
11330
11331 * utils.c (xsnprintf): Make non-static.
11332 * server.h: Add xsnprintf declaration.
11333 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11334 replace calls to snprintf by calls to xsnprintf throughout.
11335
113362010-09-01 Joel Brobecker <brobecker@adacore.com>
11337
11338 * configure.ac: Add configure check for alloca.
11339 * configure, config.in: Regenerate.
11340 * server.h: Include alloca.h if it exists.
11341 * gdbreplay.c: Include alloca.h if it exists.
11342
1a981360
PA
113432010-08-28 Pedro Alves <pedro@codesourcery.com>
11344
11345 * linux-low.c (__SIGRTMIN): Define if not already defined.
11346 (linux_create_inferior): Check for __ANDROID__ rather than
11347 __SIGRTMIN.
11348 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11349 are already deferred.
11350 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11351 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11352 stopped and already has a pending signal to report.
11353 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11354 a pending signal to report or is moving out of a jump pad.
11355 (linux_init_signals): Check for __ANDROID__ rather than
11356 __SIGRTMIN.
11357
b4d51a55
PA
113582010-08-28 Pedro Alves <pedro@codesourcery.com>
11359
11360 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11361 debug_threads check. Avoid a linear search when not doing debug
11362 output.
11363
ec48365d
PA
113642010-08-27 Pedro Alves <pedro@codesourcery.com>
11365
11366 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11367 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11368 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11369 (process_event): Change local fd's type to gdb_fildes_t.
11370 (create_file_handler): Adjust prototype.
11371 (delete_file_handler): Adjust prototype.
11372 (handle_file_event): Adjust prototype. Use pfildes.
11373 (create_file_event): Adjsut prototype.
11374 * remote-utils.c (remote_desc, listen_desc): Change type to
11375 gdb_fildes_t.
11376 * server.h: New gdb_fildes_t typedef.
11377 [USE_WIN32API]: Include winsock2.h.
11378 (delete_file_handler, add_file_handler): Adjust prototypes.
11379 (pfildes): Declare.
11380 * utils.c (pfildes): New.
11381
854d88f0
PA
113822010-08-27 Pedro Alves <pedro@codesourcery.com>
11383
11384 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11385 * configure: Regenerate.
11386
0146f85b
PA
113872010-08-27 Pedro Alves <pedro@codesourcery.com>
11388
11389 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11390 (linux_done_accessing_memory): ... this.
11391 (linux_target_ops): Adjust.
11392 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11393 * nto-low.c (nto_target_ops): Adjust comment.
11394 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11395 * spu-low.c (spu_target_ops): Adjust comment.
11396 * target.h (target_ops): Rename unprepare_to_access_memory field
11397 to done_accessing_memory.
11398 (unprepare_to_access_memory): Rename to ...
11399 (done_accessing_memory): ... this.
11400
90d74c30
PA
114012010-08-26 Pedro Alves <pedro@codesourcery.com>
11402
11403 * linux-low.c (linux_prepare_to_access_memory): New.
11404 (linux_unprepare_to_access_memory): New.
11405 (linux_target_ops): Install them.
11406 * server.c (read_memory): Rename to ...
11407 (gdb_read_memory): ... this. Use
11408 prepare_to_access_memory/prepare_to_access_memory.
11409 (write_memory): Rename to ...
11410 (gdb_write_memory): ... this. Use
11411 prepare_to_access_memory/prepare_to_access_memory.
11412 (handle_search_memory_1): Adjust.
11413 (process_serial_event): Adjust.
11414 * target.h (struct target_ops): New fields
11415 prepare_to_access_memory and unprepare_to_access_memory.
11416 (prepare_to_access_memory, unprepare_to_access_memory): New.
11417 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11418 prepare_to_access_memory/prepare_to_access_memory.
11419 * nto-low.c (nto_target_ops): Adjust.
11420 * spu-low.c (spu_target_ops): Adjust.
11421 * win32-low.c (win32_target_ops): Adjust.
11422
fd467969
PA
114232010-08-26 Pedro Alves <pedro@codesourcery.com>
11424
11425 * Makefile.in (WARN_CFLAGS): Get it from configure.
11426 (WERROR_CFLAGS): New.
11427 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11428 * configure.ac: Introduce --enable-werror, which adds -Werror to
11429 the compiler command line. Enabled by default. Disable with
11430 --disable-werror. Add -Wdeclaration-after-statement
11431 Wpointer-arith and -Wformat-nonliteral to warning flags.
11432 * configure: Regenerate.
11433
331e2f5f
PA
114342010-08-26 Pedro Alves <pedro@codesourcery.com>
11435
11436 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11437
e581f2b4
PA
114382010-08-26 Pedro Alves <pedro@codesourcery.com>
11439
11440 * gdbreplay.c (remote_error): New.
11441 (gdbchar): New.
11442 (expect): Use gdbchar. Check for error reading from GDB.
11443 Clarify sync error output.
11444 (play): Check for errors writing to GDB.
11445 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11446 * remote-utils.c (getpkt): Check for errors writing to the remote
11447 descriptor.
11448
3c11dd79
PA
114492010-08-25 Pedro Alves <pedro@codesourcery.com>
11450
11451 * linux-low.c (linux_wait_1): Move non-debugging code out of
11452 `debug_threads' control.
11453
d20a8ad9
PA
114542010-08-25 Pedro Alves <pedro@codesourcery.com>
11455
11456 * linux-low.c (linux_wait_1): Don't set last_status here.
11457 * server.c (push_event, queue_stop_reply_callback): Assert we're
11458 not pushing a TARGET_WAITKIND_IGNORE event.
11459 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11460 (myresume, handle_target_event): Set the thread's last_resume_kind
11461 and last_status from the target returned status.
11462
964e4306
PA
114632010-08-25 Pedro Alves <pedro@codesourcery.com>
11464
11465 PR threads/10729
11466
11467 * linux-x86-low.c (update_debug_registers_callback): New.
11468 (i386_dr_low_set_addr): Use it.
11469 (i386_dr_low_get_addr): New.
11470 (i386_dr_low_set_control): Use update_debug_registers_callback.
11471 (i386_dr_low_get_control): New.
11472 (i386_dr_low_get_status): Adjust.
11473 * linux-low.c (linux_stop_lwp): New.
11474 * linux-low.h (linux_stop_lwp): Declare.
11475
11476 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11477 argument instead of a i386_debug_reg_state.
11478 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11479 a i386_debug_reg_state.
11480 (i386_insert_aligned_watchpoint): Adjust.
11481 (i386_remove_aligned_watchpoint): Adjust.
11482 (i386_low_stopped_data_address): Read the debug registers from the
11483 inferior instead of from the mirrors.
11484 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11485 (i386_dr_low_get_addr): Declare.
11486 (i386_dr_low_get_control): Declare.
11487 (i386_dr_low_get_status): Change prototype.
11488
11489 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11490 (i386_dr_low_get_addr): New.
11491 (i386_dr_low_get_control): New.
11492 (i386_dr_low_get_status): Adjust prototype. Return
11493 dr_status_mirror.
11494 (i386_initial_stuff): Clear dr_status_mirror and
11495 dr_control_mirror.
11496 (i386_get_thread_context): Adjust.
11497 (i386_set_thread_context): Adjust.
11498 (i386_thread_added): Adjust.
11499
5f21a75b
PA
115002010-08-24 Pedro Alves <pedro@codesourcery.com>
11501
11502 * linux-low.h (linux_thread_area): Delete declaration.
11503
3e4c1235
TS
115042010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11505
11506 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11507 after its termination.
11508
1971b033
PA
115092010-08-09 Pedro Alves <pedro@codesourcery.com>
11510
11511 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11512 (gdb_wants_all_stopped): Delete.
11513 (linux_wait_1): Don't call them.
11514 * server.c (handle_v_cont): Tag all threads as want-stopped.
11515 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11516 stopped as "client-wants-stopped".
11517
310444ac
PA
115182010-07-31 Pedro Alves <pedro@codesourcery.com>
11519
11520 * Makefile.in (signals_h): New.
11521 (server_h): Depend on it.
11522 (server.o): Don't depend on $(signals_def).
11523 (signals.o): Depend on $(signals_def).
11524
a19cae16
JK
115252010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11526
11527 * Makefile.in (signals_def): New.
11528 (server_h): Append include/gdb/signals.h and signals_def.
11529 (server.o): Append signals_def.
11530
30d50328
JK
115312010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11532
11533 * server.c (handle_target_event): Use target_signal_to_host for
11534 resume_info.sig initialization.
11535 * target.h (struct thread_resume) <sig>: New comment.
11536
5c3216e2
OS
115372010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11538
c6f46ca0
OS
11539 * server.c (handle_query): strcpy() the returned string from paddress()
11540 instead of sprintf().
5c3216e2
OS
11541 * utils.c (paddress): Return phex_nz().
11542
6bd31874
JB
115432010-07-07 Joel Brobecker <brobecker@adacore.com>
11544
11545 * server.c (handle_v_cont): Call mourn_inferior if process
11546 just exited.
11547 (myresume): Likewise.
11548
0fb4aa4b
PA
115492010-07-01 Pedro Alves <pedro@codesourcery.com>
11550
11551 Static tracepoints, and integration with UST.
11552
11553 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11554 * mem-break.c (uninsert_all_breakpoints)
11555 (reinsert_all_breakpoints): New.
11556 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11557 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11558 (gdb_agent_ust_loaded, helper_thread_id)
11559 (gdb_agent_helper_thread_id): New macros.
11560 (struct ipa_sym_addresses): Add addr_ust_loaded,
11561 addr_helper_thread_id, addr_cmd_buf.
11562 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11563 (in_process_agent_loaded_ust): New.
11564 (write_e_ust_not_loaded): New.
11565 (maybe_write_ipa_ust_not_loaded): New.
11566 (struct collect_static_trace_data_action): New.
11567 (enum tracepoint_type) <static_tracepoint>: New.
11568 (struct tracepoint) <handle>: Mention static tracepoints.
11569 (struct static_tracepoint_ctx): New.
11570 (CMD_BUF_SIZE): New.
11571 (add_tracepoint_action): Handle static tracepoint actions.
11572 (unprobe_marker_at): New.
11573 (clear_installed_tracepoints): Handle static tracepoints.
11574 (cmd_qtdp): Handle static tracepoints.
11575 (probe_marker_at): New.
11576 (cmd_qtstart): Handle static tracepoints.
11577 (response_tracepoint): Handle static tracepoints.
11578 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11579 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11580 (get_context_regcache): Handle static tracepoints.
11581 (do_action_at_tracepoint): Handle static tracepoint actions.
11582 (traceframe_find_block_type): Handle static trace data blocks.
11583 (traceframe_read_sdata): New.
11584 (download_tracepoints): Download static tracepoint actions.
11585 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11586 (GDB_PROBE_NAME): New.
11587 (ust_ops): New.
11588 (GET_UST_SYM): New.
11589 (USTF): New.
11590 (dlsym_ust): New.
11591 (ust_marker_to_static_tracepoint): New.
11592 (gdb_probe): New.
11593 (collect_ust_data_at_tracepoint): New.
11594 (gdb_ust_probe): New.
11595 (UNIX_PATH_MAX, SOCK_DIR): New.
11596 (gdb_ust_connect_sync_socket): New.
11597 (resume_thread, stop_thread): New.
11598 (run_inferior_command): New.
11599 (init_named_socket): New.
11600 (gdb_ust_socket_init): New.
11601 (cstr_to_hexstr): New.
11602 (next_st): New.
11603 (first_marker, next_marker): New.
11604 (response_ust_marker): New.
11605 (cmd_qtfstm, cmd_qtsstm): New.
11606 (unprobe_marker_at, probe_marker_at): New.
11607 (cmd_qtstmat, gdb_ust_thread): New.
11608 (gdb_ust_init): New.
11609 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11610 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11611 (ST_REGENTRY): New.
11612 (x86_64_st_collect_regmap): New.
11613 (X86_64_NUM_ST_COLLECT_GREGS): New.
11614 (AMD64_RIP_REGNUM): New.
11615 (supply_static_tracepoint_registers): New.
11616 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11617 (ST_REGENTRY): New.
11618 (i386_st_collect_regmap): New.
11619 (i386_NUM_ST_COLLECT_GREGS): New.
11620 (supply_static_tracepoint_registers): New.
11621 * server.c (handle_query): Handle qXfer:statictrace:read.
11622 <qSupported>: Report support for StaticTracepoints, and
11623 qXfer:statictrace:read features.
11624 * server.h (traceframe_read_sdata)
11625 (supply_static_tracepoint_registers): Declare.
11626 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11627 (unpack_varlen_hex): Include in IPA build.
11628 * Makefile.in (ustlibs, ustinc): New.
11629 (IPA_OBJS): Add remote-utils-ipa.o.
11630 ($(IPA_LIB)): Link -ldl and -lpthread.
11631 (UST_CFLAGS): New.
11632 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11633 * config.in, configure: Regenerate.
11634
9e4344e5
PA
116352010-06-20 Ian Lance Taylor <iant@google.com>
11636 Pedro Alves <pedro@codesourcery.com>
11637
11638 * linux-x86-low.c (always_true): Delete.
11639 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11640 trying to fool the compiler with always_true.
11641
c6beb2cb
PA
116422010-06-20 Pedro Alves <pedro@codesourcery.com>
11643
11644 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11645 conditions in gdbserver.
11646
d2ed6730
UW
116472010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11648
11649 * spu-low.c (spu_read_memory): Wrap around local store limit.
11650 (spu_write_memory): Likewise.
11651
4e29fb54
PA
116522010-06-15 Pedro Alves <pedro@codesourcery.com>
11653
11654 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11655 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11656 LONGEST uses.
11657 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11658 uses.
11659 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11660 uses with LONGEST uses.
11661
6a271cae
PA
116622010-06-14 Stan Shebs <stan@codesourcery.com>
11663 Pedro Alves <pedro@codesourcery.com>
11664
11665 Bytecode compiler.
11666
11667 * linux-x86-low.c: Include limits.h.
11668 (add_insns): New.
11669 (always_true): New.
11670 (EMIT_ASM): New.
11671 (EMIT_ASM32): New.
11672 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11673 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11674 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11675 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11676 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11677 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11678 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11679 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11680 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11681 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11682 (amd64_emit_void_call_2): New.
11683 (amd64_emit_ops): New.
11684 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11685 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11686 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11687 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11688 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11689 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11690 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11691 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11692 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11693 (i386_emit_stack_adjust, i386_emit_int_call_1)
11694 (i386_emit_void_call_2): New.
11695 (i386_emit_ops): New.
11696 (x86_emit_ops): New.
11697 (the_low_target): Install x86_emit_ops.
11698 * server.h (struct emit_ops): New.
11699 (get_raw_reg_func_addr): Declare.
11700 (current_insn_ptr, emit_error): Declare.
11701 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11702 (set_trace_state_variable_value): New defines.
11703 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11704 addr_get_trace_state_variable_value and
11705 addr_set_trace_state_variable_value.
11706 (symbol_list): New fields for get_raw_reg,
11707 get_trace_state_variable_value and set_trace_state_variable_value.
11708 (condfn): New typedef.
11709 (struct tracepoint): New field `compiled_cond'.
11710 (do_action_at_tracepoint): Clear compiled_cond.
11711 (get_trace_state_variable_value, set_trace_state_variable_value):
11712 Export in the IPA.
11713 (condition_true_at_tracepoint): If there's a compiled condition,
11714 run that.
11715 (current_insn_ptr, emit_error): New globals.
11716 (struct bytecode_address): New.
11717 (get_raw_reg_func_addr): New.
11718 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11719 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11720 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11721 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11722 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11723 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11724 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11725 (compile_tracepoint_condition, compile_bytecodes): New.
11726 * target.h (emit_ops): Forward declare.
11727 (struct target_ops): New field emit_ops.
11728 (target_emit_ops): New.
11729 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11730 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11731 * linux-low.c (linux_emit_ops): New.
11732 (linux_target_ops): Install it.
11733 * linux-low.h (struct linux_target_ops): New field emit_ops.
11734
92b72907
UW
117352010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11736
11737 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11738 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11739
fa593d66
PA
117402010-06-01 Pedro Alves <pedro@codesourcery.com>
11741 Stan Shebs <stan@codesourcery.com>
11742
11743 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11744 (all): Depend on $(extra_libraries).
11745 (install-only): Install the IPA.
11746 (IPA_OBJS, IPA_LIB): New.
11747 (clean): Remove the IPA lib.
11748 (IPAGENT_CFLAGS): New.
11749 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11750 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11751 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11752 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11753 * configure.ac: Check for atomic builtins support in the compiler.
11754 (IPA_DEPFILES, extra_libraries): Define.
11755 * configure.srv (ipa_obj): Add description.
11756 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11757 (i[34567]86-*-linux*): Set ipa_obj.
11758 (x86_64-*-linux*): Set ipa_obj.
11759 * linux-low.c (stabilizing_threads): New.
11760 (supports_fast_tracepoints): New.
11761 (linux_detach): Stabilize threads before detaching.
11762 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11763 the lwp is either not stabilizing, or is moving out of a jump pad.
11764 (linux_fast_tracepoint_collecting): New.
11765 (maybe_move_out_of_jump_pad): New.
11766 (enqueue_one_deferred_signal): New.
11767 (dequeue_one_deferred_signal): New.
11768 (linux_wait_for_event_1): If moving out of a jump pad, defer
11769 pending signals to later.
11770 (linux_stabilize_threads): New.
11771 (linux_wait_1): Check if threads need moving out of jump pads, and
11772 do it if so.
11773 (stuck_in_jump_pad_callback): New.
11774 (move_out_of_jump_pad_callback): New.
11775 (lwp_running): New.
11776 (linux_resume_one_lwp): Handle moving out of jump pads.
11777 (linux_set_resume_request): Dequeue deferred signals.
11778 (need_step_over_p): Also step over fast tracepoint jumps.
11779 (start_step_over): Also uninsert fast tracepoint jumps.
11780 (finish_step_over): Also reinsert fast tracepoint jumps.
11781 (linux_install_fast_tracepoint_jump): New.
11782 (linux_target_ops): Install linux_stabilize_threads and
11783 linux_install_fast_tracepoint_jump_pad.
11784 * linux-low.h (linux_target_ops) <get_thread_area,
11785 install_fast_tracepoint_jump_pad>: New fields.
11786 (struct lwp_info) <collecting_fast_tracepoint,
11787 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11788 (linux_get_thread_area): Declare.
11789 * linux-x86-low.c (jump_insn): New.
11790 (x86_get_thread_area): New.
11791 (append_insns): New.
11792 (push_opcode): New.
11793 (amd64_install_fast_tracepoint_jump_pad): New.
11794 (i386_install_fast_tracepoint_jump_pad): New.
11795 (x86_install_fast_tracepoint_jump_pad): New.
11796 (the_low_target): Install x86_get_thread_area and
11797 x86_install_fast_tracepoint_jump_pad.
11798 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11799 (struct fast_tracepoint_jump): New.
11800 (fast_tracepoint_jump_insn): New.
11801 (fast_tracepoint_jump_shadow): New.
11802 (find_fast_tracepoint_jump_at): New.
11803 (fast_tracepoint_jump_here): New.
11804 (delete_fast_tracepoint_jump): New.
11805 (set_fast_tracepoint_jump): New.
11806 (uninsert_fast_tracepoint_jumps_at): New.
11807 (reinsert_fast_tracepoint_jumps_at): New.
11808 (set_breakpoint_at): Use write_inferior_memory.
11809 (uninsert_raw_breakpoint): Use write_inferior_memory.
11810 (check_mem_read): Mask out fast tracepoint jumps.
11811 (check_mem_write): Mask out fast tracepoint jumps.
11812 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11813 (set_fast_tracepoint_jump): Declare.
11814 (delete_fast_tracepoint_jump)
11815 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11816 (reinsert_fast_tracepoint_jumps_at): Declare.
11817 * regcache.c: Don't compile many functions when building the
11818 in-process agent library.
11819 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11820 the register buffer in the heap.
11821 (free_register_cache): If the register buffer isn't owned by the
11822 regcache, don't free it.
11823 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11824 pre-existing register caches.
11825 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11826 type.
11827 (convert_ascii_to_int): : Constify `from' parameter type.
11828 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11829 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11830 the needed buffer in-place.
11831 (relocate_instruction): New.
11832 * server.c (handle_query) <qSymbols>: If the target supports
11833 tracepoints, give it a chance of looking up symbols. Report
11834 support for fast tracepoints.
11835 (handle_status): Stabilize threads.
11836 (process_serial_event): Adjust.
11837 * server.h (struct fast_tracepoint_jump): Forward declare.
11838 (struct process_info) <fast_tracepoint_jumps>: New field.
11839 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11840 (decode_X_packet, decode_M_packet): Adjust.
11841 (relocate_instruction): Declare.
11842 (in_process_agent_loaded): Declare.
11843 (tracepoint_look_up_symbols): Declare.
11844 (struct fast_tpoint_collect_status): Declare.
11845 (fast_tracepoint_collecting): Declare.
11846 (force_unlock_trace_buffer): Declare.
11847 (handle_tracepoint_bkpts): Declare.
11848 (initialize_low_tracepoint)
11849 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11850 * target.h (struct target_ops) <stabilize_threads,
11851 install_fast_tracepoint_jump_pad>: New fields.
11852 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11853 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11854 [HAVE_STDINT_H]: Include stdint.h.
11855 (trace_debug_1): Rename to ...
11856 (trace_vdebug): ... this.
11857 (trace_debug): Rename to ...
11858 (trace_debug_1): ... this. Add `level' parameter.
11859 (trace_debug): New.
11860 (ATTR_USED, ATTR_NOINLINE): New.
11861 (IP_AGENT_EXPORT): New.
11862 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11863 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11864 (about_to_request_buffer_space, trace_buffer_is_full)
11865 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11866 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11867 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11868 (traceframe_write_count, traceframes_created)
11869 (trace_state_variables)
11870 New renaming defines.
11871 (struct ipa_sym_addresses): New.
11872 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11873 (symbol_list): New.
11874 (ipa_sym_addrs): New.
11875 (all_tracepoint_symbols_looked_up): New.
11876 (in_process_agent_loaded): New.
11877 (write_e_ipa_not_loaded): New.
11878 (maybe_write_ipa_not_loaded): New.
11879 (tracepoint_look_up_symbols): New.
11880 (debug_threads) [IN_PROCESS_AGENT]: New.
11881 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11882 (UNKNOWN_SIDE_EFFECTS): New.
11883 (stop_tracing): New.
11884 (flush_trace_buffer): New.
11885 (stop_tracing_bkpt): New.
11886 (flush_trace_buffer_bkpt): New.
11887 (read_inferior_integer): New.
11888 (read_inferior_uinteger): New.
11889 (read_inferior_data_pointer): New.
11890 (write_inferior_data_pointer): New.
11891 (write_inferior_integer): New.
11892 (write_inferior_uinteger): New.
11893 (struct collect_static_trace_data_action): Delete.
11894 (enum tracepoint_type): New.
11895 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11896 <actions_str, step_actions, step_actions_str>: Only include in
11897 GDBserver.
fa593d66
PA
11898 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11899 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11900 (tracepoints): Use IP_AGENT_EXPORT.
11901 (last_tracepoint): Don't include in the IPA.
11902 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11903 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11904 (alloced_trace_state_variables): New.
11905 (trace_state_variables): Use IP_AGENT_EXPORT.
11906 (traceframe_t): Delete unused variable.
11907 (circular_trace_buffer): Don't include in the IPA.
11908 (trace_buffer_start): Delete.
11909 (struct trace_buffer_control): New.
11910 (trace_buffer_free): Delete.
11911 (struct ipa_trace_buffer_control): New.
11912 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11913 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11914 New.
11915 (trace_buffer_ctrl): New.
11916 (TRACE_BUFFER_CTRL_CURR): New.
11917 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11918 Reimplement as macros.
11919 (trace_buffer_wrap): Delete.
11920 (traceframe_write_count, traceframe_read_count)
11921 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11922 (struct tracepoint_hit_ctx) <type>: New field.
11923 (struct fast_tracepoint_ctx): New.
11924 (memory_barrier): New.
11925 (cmpxchg): New.
11926 (record_tracepoint_error): Update atomically in the IPA.
11927 (clear_inferior_trace_buffer): New.
11928 (about_to_request_buffer_space): New.
11929 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11930 updating the same buffer.
11931 (add_tracepoint): Default the tracepoint's type to trap
11932 tracepoint, and orig_size to -1.
11933 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11934 internal variables.
11935 (create_trace_state_variable): New parameter `gdb'. Handle it.
11936 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11937 (cmd_qtdp): Handle fast tracepoints.
11938 (cmd_qtdv): Adjust.
11939 (max_jump_pad_size): New.
11940 (gdb_jump_pad_head): New.
11941 (get_jump_space_head): New.
11942 (claim_jump_space): New.
11943 (sort_tracepoints): New.
11944 (MAX_JUMP_SIZE): New.
11945 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11946 IPA.
11947 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11948 support. Upload fast traceframes, and delete internal IPA
11949 breakpoints.
11950 (stop_tracing_handler): New.
11951 (flush_trace_buffer_handler): New.
11952 (cmd_qtstop): Upload fast tracepoints.
11953 (response_tracepoint): Handle fast tracepoints.
11954 (tracepoint_finished_step): Upload fast traceframes. Set the
11955 tracepoint hit context's tracepoint type.
11956 (handle_tracepoint_bkpts): New.
11957 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11958 type. Add comment about fast tracepoints.
11959 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11960 non-existing action_str field.
11961 (get_context_regcache): Handle fast tracepoints.
11962 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11963 to the regcache.
11964 (fast_tracepoint_from_jump_pad_address): New.
11965 (fast_tracepoint_from_ipa_tpoint_address): New.
11966 (collecting_t): New.
11967 (force_unlock_trace_buffer): New.
11968 (fast_tracepoint_collecting): New.
11969 (collecting): New.
11970 (gdb_collect): New.
11971 (write_inferior_data_ptr): New.
11972 (target_tp_heap): New.
11973 (target_malloc): New.
11974 (download_agent_expr): New.
11975 (UALIGN): New.
11976 (download_tracepoints): New.
11977 (download_trace_state_variables): New.
11978 (upload_fast_traceframes): New.
11979 (IPA_FIRST_TRACEFRAME): New.
11980 (IPA_NEXT_TRACEFRAME_1): New.
11981 (IPA_NEXT_TRACEFRAME): New.
11982 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11983 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11984 (gdb_jump_pad_buffer_end): New.
11985 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11986 (initialize_tracepoint): Adjust.
11987 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11988 buffer. Initialize the low module.
11989 * utils.c (PREFIX, TOOLNAME): New.
11990 (malloc_failure): Use PREFIX.
11991 (error): In the IPA, an error causes an exit.
11992 (fatal, warning): Use PREFIX.
11993 (internal_error): Use TOOLNAME.
11994 (NUMCELLS): Increase to 10.
11995 * configure, config.in: Regenerate.
11996
d149dd1d
PA
119972010-06-01 Pedro Alves <pedro@codesourcery.com>
11998
11999 * server.c (handle_query) <qSupported>: Do two passes over the
12000 qSupported string to avoid nesting strtok.
12001
f6528abd
JK
120022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12003
12004 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12005 (CDEPS): New.
12006 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12007 -Wl,--dynamic-list.
12008 * configure: Regenerate.
12009 * proc-service.list: New.
12010
ca2a87a0
JK
120112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12012
12013 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12014 New comment.
12015
363a6e9f
OS
120162010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12017
12018 * gdbreplay.c (remote_open): Check error return from socket() call by
12019 its equality to -1 not by it being negative.
12020 * remote-utils.c (remote_open): Likewise.
12021
d23b6cb1
PA
120222010-05-23 Pedro Alves <pedro@codesourcery.com>
12023
12024 * config.h: Regenerate.
12025
28d3cf85
MK
120262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12027
12028 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12029 doesn't provide PTRACE_GET_THREAD_AREA.
12030
fea36a59
MK
120312010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12032
12033 * linux-m68k-low.c: Include <asm/ptrace.h>
12034 (ps_get_thread_area): Implement.
12035
24b066ba
DE
120362010-05-03 Doug Evans <dje@google.com>
12037
12038 * event-loop.c (struct callback_event): New struct.
12039 (callback_list): New global.
12040 (append_callback_event, delete_callback_event): New functions.
12041 (process_callback): New function.
12042 (start_event_loop): Call it.
12043 * remote-utils.c (NOT_SCHEDULED): Define.
12044 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12045 moved out of readchar.
12046 (readchar): Rewrite. Call reschedule before returning.
12047 (reset_readchar): New function.
12048 (remote_close): Call it.
12049 (process_remaining, reschedule): New functions.
12050 * server.h (callback_handler_func): New typedef.
12051 (append_callback_event, delete_callback_event): Declare.
12052
9836d6ea
PA
120532010-05-03 Pedro Alves <pedro@codesourcery.com>
12054
12055 * proc-service.c (ps_pglobal_lookup): Use
12056 thread_db_look_up_one_symbol.
12057 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12058 parameter. Use it instead of all_symbols_looked_up.
12059 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12060 field.
12061 (all_symbols_looked_up): Don't declare.
12062 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12063 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12064 field.
12065 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12066 Set all_symbols_looked_up here.
12067 (thread_db_look_up_one_symbol): New.
12068 (thread_db_get_tls_address): Adjust.
12069 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12070 thread_db object on the heap, and tentatively set it in the
12071 process structure.
12072 (thread_db_init): Don't set all_symbols_looked_up here.
12073 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12074
7984d532
PA
120752010-05-03 Pedro Alves <pedro@codesourcery.com>
12076
12077 * linux-low.c (linux_kill, linux_detach): Adjust.
12078 (status_pending_p_callback): Remove redundant statement. Check
12079 for !TARGET_WAITIKIND_IGNORE, instead of
12080 TARGET_WAITKIND_STOPPED.
12081 (handle_tracepoints): Make sure LWP is locked. Adjust.
12082 (linux_wait_for_event_1): Adjust.
12083 (linux_cancel_breakpoints): New.
12084 (unsuspend_one_lwp): New.
12085 (unsuspend_all_lwps): New.
12086 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12087 (send_sigstop_callback): Change return type to int, add new
12088 `except' parameter and handle it.
12089 (suspend_and_send_sigstop_callback): New.
12090 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12091 pass them down. If SUSPEND, also increment the lwp's suspend
12092 count.
12093 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12094 (need_step_over_p): Don't consider suspended LWPs.
12095 (start_step_over): Adjust.
12096 (proceed_one_lwp): Change return type to int, add new `except'
12097 parameter and handle it.
12098 (unsuspend_and_proceed_one_lwp): New.
12099 (proceed_all_lwps): Use find_inferior instead of
12100 for_each_inferior.
12101 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12102 also decrement the suspend count of LWPs. Pass `except' down,
12103 instead of hacking its suspend count.
12104 (linux_pause_all): Add `freeze' parameter. Adjust.
12105 (linux_unpause_all): New.
12106 (linux_target_ops): Install linux_unpause_all.
12107 * server.c (handle_status): Adjust.
12108 * target.h (struct target_ops): New fields `unpause_all' and
12109 `cancel_breakpoints'. Add new parameter to `pause_all'.
12110 (pause_all): Add new `freeze' parameter.
12111 (unpause_all): New.
12112 (cancel_breakpoints): New.
12113 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12114 cancel breakpoints.
12115 (cmd_qtstart): Pause threads.
12116 (stop_tracing): Pause threads, and cancel breakpoints.
12117 * win32-low.c (win32_target_ops): Adjust.
12118
e471f25b
PA
121192010-05-03 Pedro Alves <pedro@codesourcery.com>
12120
12121 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12122 the inferior right away from here...
12123 (linux_wait_1): ... to here, and adjust to check the thread's
12124 last_resume_kind instead of the lwp's step or stop_expected flags.
12125
1915ef4f
PA
121262010-05-02 Pedro Alves <pedro@codesourcery.com>
12127
12128 * README: Use consistent `GDB' and `GDBserver' spellings.
12129
f9e39928
PA
121302010-05-02 Pedro Alves <pedro@codesourcery.com>
12131
12132 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12133 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12134 (linux_detach_one_lwp): Assume the lwp is stopped.
12135 (any_thread_of): Delete.
12136 (linux_detach): Stop all lwps here. Don't blindly delete all
12137 breakpoints.
12138 (delete_lwp_callback): New.
12139 (linux_mourn): Delete all lwps of the process that is gone.
12140 (linux_wait_1): Don't delete the last lwp of the process here.
12141 * mem-break.h (mark_breakpoints_out): Declare.
12142 * mem-break.c (mark_breakpoints_out): New.
12143 (free_all_breakpoints): Use it.
12144 * server.c (handle_target_event): If the process is gone, mark
12145 breakpoints out.
12146 * thread-db.c (struct thread_db) <create_bp>: New field.
12147 (thread_db_enable_reporting): Fix prototype. Store a thread event
12148 breakpoint reference in the thread_db struct.
12149 (thread_db_load_search): Clear the thread_db object.
12150 (try_thread_db_load_1): Ditto.
12151 (switch_to_process): New.
12152 (disable_thread_event_reporting): Use it.
12153 (remove_thread_event_breakpoints): New.
12154 (thread_db_detach, thread_db_mourn): Use it.
12155
1e7fc18c
PA
121562010-05-01 Pedro Alves <pedro@codesourcery.com>
12157
12158 * linux-low.c (linux_enable_event_reporting): New.
12159 (linux_wait_for_event_1, handle_extended_wait): Use it.
12160
02fc4de7
PA
121612010-04-30 Pedro Alves <pedro@codesourcery.com>
12162
12163 * linux-low.c (linux_kill_one_lwp, linux_kill)
12164 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12165 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12166 SIGSTOP even if the LWP is stopped.
12167 (send_sigstop_callback): New.
12168 (stop_all_lwps): Use send_sigstop_callback instead.
12169 (linux_resume_one_thread): Adjust.
12170 (proceed_one_lwp): Still proceed an LWP that the client has
12171 requested to stop, if we haven't reported it as stopped yet. Make
12172 sure that LWPs the client want stopped, have a pending SIGSTOP.
12173
bc3b5632
DE
121742010-04-26 Doug Evans <dje@google.com>
12175
ae1ada35
DE
12176 * server.c (handle_general_set): Make static.
12177
bc3b5632
DE
12178 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12179 Print received char after testing for error/eof instead of before.
12180 (input_interrupt): Tweak comment.
12181
65730243
DE
121822010-04-23 Doug Evans <dje@google.com>
12183
12184 * server.c (start_inferior): Print inferior argv if --debug.
12185
a8ae7dc0
AR
121862010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12187
12188 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12189 * nto-x86-low.c: Include server.h
12190
1c07cc19
PM
121912010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12192
12193 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12194 be consistent with other sources of this directory.
12195 (init_registers_amd64): Correct name of source file of this function
12196 in the comment.
12197
e0a61e09
PM
121982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12199
12200 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12201 64-bit executables.
12202
54709339
PM
122032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12204
12205 * win32-i386-low.c: Add 64-bit support.
12206 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12207 (init_registers_amd64): Declare.
12208 (mappings): Add 64-bit version of array.
12209 (init_windows_x86): New function.
12210 (the_low_target): Change init_arch field to init_windows_x86.
12211
e8f0053d
PM
122122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12213
12214 * win32-low.c: Adapt to support also 64-bit architecture.
12215 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12216 (get_image_name): Use SIZE_T type for local variable `done'.
12217 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12218 (toolhelp_get_dll_name): Idem.
12219 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12220 Use uintptr_t typecast to avoid warning.
12221 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12222 (handle_exception): Use phex_nz to avoid warning.
12223 (win32_wait): Remove unused local variable `process'.
12224
c481e77e
PM
122252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12226
12227 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12228 `amd64-avx.o'.
12229
12ea4b69
PM
122302010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12231
12232 * configure.ac: Use `ws2_32' library for srv_mingw.
12233 * configure: Regenerate.
12234 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12235 * remote-utils.c: Likewise.
12236
f6d1620c
L
122372010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12238
12239 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12240 if __x86_64__ is defined.
12241
8e642873
PM
122422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12243
12244 * configure: Regenerate.
12245
711e434b
PM
122462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12247
12248 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12249 * target.h (target_ops): New get_tib_address field.
12250 * win32-low.h (win32_thread_info): Add thread_local_base field.
12251 * win32-low.c (child_add_thread): Add tlb argument.
12252 Set thread_local_base field to TLB.
12253 (get_child_debug_event): Adapt to child_add_thread change.
12254 (win32_get_tib_address): New function.
12255 (win32_target_ops): Set get_tib_address field to
12256 win32_get_tib_address.
12257 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12258
505106cd
PA
122592010-04-12 Pedro Alves <pedro@codesourcery.com>
12260
505106cd
PA
12261 * linux-low.c (linux_mourn): Also remove the process.
12262 * server.c (handle_target_event): Don't remove the process here.
12263 * nto-low.c (nto_mourn): New.
12264 (nto_target_ops): Install it.
12265 * spu-low.c (spu_mourn): New.
12266 (spu_target_ops): Install it.
12267 * win32-low.c (win32_mourn): New.
12268 (win32_target_ops): Install it.
12269
e8470a06
PA
122702010-04-12 Pedro Alves <pedro@codesourcery.com>
12271
12272 * server.h (buffer_xml_printf): Remove redundant `;'.
12273
45ba0d02
PA
122742010-04-12 Pedro Alves <pedro@codesourcery.com>
12275
12276 * regcache.c (set_register_cache): Invalidate regcaches before
12277 changing the register cache layout.
12278 (regcache_invalidate_one): Allow a NULL regcache.
12279 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12280 regcaches before changing the register cache layout or the target
12281 regsets.
12282
59e04013
L
122832010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12284
12285 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12286 variable warning on Linux/x86-64.
12287
8336d594
PA
122882010-04-11 Pedro Alves <pedro@codesourcery.com>
12289
12290 GDBserver disconnected tracing support.
12291
12292 * linux-low.c (linux_remove_process): Delete.
12293 (add_lwp): Don't set last_resume_kind here.
12294 (linux_kill): Use `mourn'.
12295 (linux_detach): Use `thread_db_detach', and `mourn'.
12296 (linux_mourn): New.
12297 (linux_attach_lwp_1): Adjust comment.
12298 (linux_attach): last_resume_kind moved the thread_info; adjust.
12299 (status_pending_p_callback): Adjust.
12300 (linux_wait_for_event_1): Adjust.
12301 (count_events_callback, select_singlestep_lwp_callback)
12302 (select_event_lwp_callback, cancel_breakpoints_callback)
12303 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12304 (proceed_one_lwp): Adjust.
12305 (linux_async): Add debug output.
12306 (linux_thread_stopped): New.
12307 (linux_pause_all): New.
12308 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12309 linux_pause_all.
12310 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12311 (thread_db_free): Delete declaration.
12312 (thread_db_detach, thread_db_mourn): Declare.
12313 * thread-db.c (thread_db_init): Use thread_db_mourn.
12314 (thread_db_free): Delete, split in two.
12315 (disable_thread_event_reporting): New.
12316 (thread_db_detach): New.
12317 (thread_db_mourn): New.
12318
12319 * server.h (struct thread_info) <last_resume_kind>: New field.
12320 <attached>: Add comment.
12321 <gdb_detached>: New field.
12322 (handler_func): Change return type to int.
12323 (handle_serial_event, handle_target_event): Ditto.
12324 (gdb_connected): Declare.
12325 (tracing): Delete.
12326 (disconnected_tracing): Declare.
12327 (stop_tracing): Declare.
12328
12329 * server.c (handle_query) <qSupported>: Report support for
12330 disconnected tracing.
12331 (queue_stop_reply_callback): Account for running threads.
12332 (gdb_wants_thread_stopped): New.
12333 (gdb_wants_all_threads_stopped): New.
12334 (gdb_reattached_process): New.
12335 (handle_status): Clear the `gdb_detached' flag of all processes.
12336 In all-stop, stop all threads.
12337 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12338 (process_serial_event): If the remote connection breaks, or if an
12339 exit was forced with "monitor exit", force an event loop exit.
12340 Handle disconnected tracing on detach.
12341 (handle_serial_event): Adjust.
12342 (handle_target_event): If GDB isn't connected, forward events back
12343 to the inferior, unless the last process exited, in which case,
12344 exit gdbserver. Adjust interface.
12345
12346 * remote-utils.c (remote_open): Don't block in accept. Instead
12347 register an event loop source on the listen socket file
12348 descriptor. Refactor bits into ...
12349 (listen_desc): ... this new global.
12350 (gdb_connected): ... this new function.
12351 (enable_async_notification): ... this new function.
12352 (handle_accept_event): ... this new function.
12353 (remote_close): Clear remote_desc.
12354
12355 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12356
12357 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12358 New fields.
12359 (mourn_inferior): Define.
12360 (target_process_qsupported): Avoid the dangling else problem.
12361 (thread_stopped): Define.
12362 (pause_all): Define.
12363 (target_waitstatus_to_string): Declare.
12364 * target.c (target_waitstatus_to_string): New.
12365
12366 * tracepoint.c (tracing): Make extern.
12367 (disconnected_tracing): New.
12368 (stop_tracing): Make extern. Handle tracing stops due to GDB
12369 disconnecting.
12370 (cmd_qtdisconnected): New.
12371 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12372 (handle_tracepoint_general_set): Handle QTDisconnected.
12373
12374 * event-loop.c (event_handler_func): Change return type to int.
12375 (process_event): Bail out if the event handler wants the event
12376 loop to stop.
12377 (handle_file_event): Ditto.
12378 (start_event_loop): Bail out if the event handler wants the event
12379 loop to stop.
12380
12381 * nto-low.c (nto_target_ops): Adjust.
12382 * spu-low.c (spu_wait): Don't remove the process here.
12383 (spu_target_ops): Adjust.
12384 * win32-low.c (win32_wait): Don't remove the process here.
12385 (win32_target_ops): Adjust.
12386
5d267c4c
PA
123872010-04-11 Pedro Alves <pedro@codesourcery.com>
12388
12389 * regcache.c (realloc_register_cache): Invalidate inferior's
12390 regcache before recreating it.
12391
623ccd72
PA
123922010-04-09 Pedro Alves <pedro@codesourcery.com>
12393
12394 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12395
219f2f23
PA
123962010-04-09 Stan Shebs <stan@codesourcery.com>
12397 Pedro Alves <pedro@codesourcery.com>
12398
12399 * server.h (LONGEST): New.
12400 (struct thread_info) <while_stepping>: New field.
12401 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12402 Declare.
12403 (initialize_tracepoint, handle_tracepoint_general_set)
12404 (handle_tracepoint_query, tracepoint_finished_step)
12405 (tracepoint_was_hit, release_while_stepping_state_list):
12406 (current_traceframe): Declare.
12407 * server.c (handle_general_set): Handle tracepoint packets.
12408 (read_memory): New.
12409 (write_memory): New.
12410 (handle_search_memory_1): Use read_memory.
12411 (handle_query): Report support for conditional tracepoints, trace
12412 state variables, and tracepoint sources. Handle tracepoint
12413 queries.
12414 (main): Initialize the tracepoints module.
12415 (process_serial_event): Handle traceframe reads/writes.
12416
12417 * linux-low.c (handle_tracepoints): New.
12418 (linux_wait_1): Call it.
12419 (linux_resume_one_lwp): Handle while-stepping.
12420 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12421 (linux_target_ops): Install them.
12422 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12423 New field.
12424 * linux-x86-low.c (x86_supports_tracepoints): New.
12425 (the_low_target). Install it.
12426
12427 * mem-break.h (delete_breakpoint): Declare.
12428 * mem-break.c (delete_breakpoint): Make external.
12429
12430 * target.h (struct target_ops): Add `supports_tracepoints',
12431 `read_pc', and `write_pc' fields.
12432 (target_supports_tracepoints): Define.
12433 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12434 (phex_nz): New.
12435
12436 * regcache.h (struct regcache) <registers_owned>: New field.
12437 (init_register_cache, regcache_cpy): Declare.
12438 (regcache_read_pc, regcache_write_pc): Declare.
12439 (register_cache_size): Declare.
12440 (supply_regblock): Declare.
12441 * regcache.c (init_register_cache): New.
12442 (new_register_cache): Use it.
12443 (regcache_cpy): New.
12444 (register_cache_size): New.
12445 (supply_regblock): New.
12446 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12447
219f2f23
PA
12448 * tracepoint.c: New.
12449
12450 * Makefile.in (OBS): Add tracepoint.o.
12451 (tracepoint.o): New rule.
12452
3a13a53b
L
124532010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12454
12455 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12456 (i386-mmx.o): New.
12457 (i386-mmx.c): Likewise.
12458 (i386-mmx-linux.o): Likewise.
12459 (i386-mmx-linux.c): Likewise.
12460
12461 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12462 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12463 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12464 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12465
12466 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12467 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12468 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12469
1570b33e
L
124702010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12471
12472 * Makefile.in (clean): Updated.
12473 (i386-avx.o): New.
12474 (i386-avx.c): Likewise.
12475 (i386-avx-linux.o): Likewise.
12476 (i386-avx-linux.c): Likewise.
12477 (amd64-avx.o): Likewise.
12478 (amd64-avx.c): Likewise.
12479 (amd64-avx-linux.o): Likewise.
12480 (amd64-avx-linux.c): Likewise.
12481
12482 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12483 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12484 (srv_amd64_regobj): Add amd64-avx.o.
12485 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12486 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12487 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12488 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12489 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12490 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12491 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12492
12493 * i387-fp.c: Include "i386-xstate.h".
12494 (i387_xsave): New.
12495 (i387_cache_to_xsave): Likewise.
12496 (i387_xsave_to_cache): Likewise.
12497 (x86_xcr0): Likewise.
12498
12499 * i387-fp.h (i387_cache_to_xsave): Likewise.
12500 (i387_xsave_to_cache): Likewise.
12501 (x86_xcr0): Likewise.
12502
12503 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12504 * linux-crisv32-low.c (target_regsets): Likewise.
12505 * linux-m68k-low.c (target_regsets): Likewise.
12506 * linux-mips-low.c (target_regsets): Likewise.
12507 * linux-ppc-low.c (target_regsets): Likewise.
12508 * linux-s390-low.c (target_regsets): Likewise.
12509 * linux-sh-low.c (target_regsets): Likewise.
12510 * linux-sparc-low.c (target_regsets): Likewise.
12511 * linux-xtensa-low.c (target_regsets): Likewise.
12512
12513 * linux-low.c: Include <sys/uio.h>.
12514 (regsets_fetch_inferior_registers): Support nt_type.
12515 (regsets_store_inferior_registers): Likewise.
12516 (linux_process_qsupported): New.
12517 (linux_target_ops): Add linux_process_qsupported.
12518
12519 * linux-low.h (regset_info): Add nt_type.
12520 (linux_target_ops): Add process_qsupported.
12521
12522 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12523 and <sys/uio.h>.
12524 (init_registers_i386_avx_linux): New.
12525 (init_registers_amd64_avx_linux): Likewise.
12526 (xmltarget_i386_linux_no_xml): Likewise.
12527 (xmltarget_amd64_linux_no_xml): Likewise.
12528 (PTRACE_GETREGSET): Likewise.
12529 (PTRACE_SETREGSET): Likewise.
12530 (x86_fill_xstateregset): Likewise.
12531 (x86_store_xstateregset): Likewise.
12532 (use_xml): Likewise.
12533 (x86_linux_update_xmltarget): Likewise.
12534 (x86_linux_process_qsupported): Likewise.
12535 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12536 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12537 init_registers_i386_linux here. Call
12538 x86_linux_update_xmltarget.
12539 (the_low_target): Add x86_linux_process_qsupported.
12540
12541 * server.c (handle_query): Call target_process_qsupported.
12542
12543 * target.h (target_ops): Add process_qsupported.
12544 (target_process_qsupported): New.
12545
fc7238bb
PA
125462010-04-03 Pedro Alves <pedro@codesourcery.com>
12547
12548 * inferiors.c (add_thread): Set last_status kind to
12549 TARGET_WAITKIND_IGNORE.
12550 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12551 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12552 (linux_wait_1): Move `thread' local definition to block that uses
12553 it. Don't NULL initialize `event_child'.
12554 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12555 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12556 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12557
bdabb078
PA
125582010-04-01 Pedro Alves <pedro@codesourcery.com>
12559
12560 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12561 an extended waitstatus, or by a watchpoint.
12562 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12563 thread was stepping or has been stopped by a watchpoint.
12564
d3bbe7a0
PA
125652010-04-01 Pedro Alves <pedro@codesourcery.com>
12566
12567 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12568 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12569 of another, then delete the previous, and validate all
12570 breakpoints.
12571 (validate_inserted_breakpoint): New.
12572 (delete_disabled_breakpoints): New.
12573 (validate_breakpoints): New.
12574 (check_mem_read): Validate breakpoints before trusting their
12575 shadow. Delete disabled breakpoints.
12576 (check_mem_write): Validate breakpoints before trusting they
12577 should be inserted. Delete disabled breakpoints.
12578 * mem-break.h (validate_breakpoints):
12579 * server.c (handle_query): Validate breakpoints when we see a
12580 qSymbol query.
12581
8b07ae33
PA
125822010-04-01 Pedro Alves <pedro@codesourcery.com>
12583
12584 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12585 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12586 if we could tell there's a GDB breakpoint at stop_pc.
12587 (need_step_over_p): Don't do a step over if we find a GDB
12588 breakpoint at the resume PC.
12589
12590 * mem-break.c (struct raw_breakpoint): New.
12591 (enum bkpt_type): New type `gdb_breakpoint'.
12592 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12593 fields. New field `raw'.
12594 (find_raw_breakpoint_at): New.
12595 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12596 breakpoint instead.
12597 (set_breakpoint_at): Adjust.
12598 (delete_raw_breakpoint): New.
12599 (release_breakpoint): New.
12600 (delete_breakpoint): Rename to...
12601 (delete_breakpoint_1): ... this. Add proc parameter. Use
12602 release_breakpoint. Return ENOENT.
12603 (delete_breakpoint): Reimplement.
12604 (find_breakpoint_at): Delete.
12605 (find_gdb_breakpoint_at): New.
12606 (delete_breakpoint_at): Delete.
12607 (set_gdb_breakpoint_at): New.
12608 (delete_gdb_breakpoint_at): New.
12609 (gdb_breakpoint_here): New.
12610 (set_reinsert_breakpoint): Use release_breakpoint.
12611 (uninsert_breakpoint): Rename to ...
12612 (uninsert_raw_breakpoint): ... this.
12613 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12614 (reinsert_raw_breakpoint): Change parameter type to
12615 raw_breakpoint.
12616 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12617 instead.
12618 (check_breakpoints): Adjust. Use release_breakpoint.
12619 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12620 (breakpoint_inserted_here): Ditto.
12621 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12622 Don't trust the breakpoint's shadow if it is not inserted.
12623 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12624 (delete_all_breakpoints): Adjust.
12625 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12626 use delete_breakpoint_1.
12627
12628 * mem-break.h (breakpoints_supported): Delete declaration.
12629 (set_gdb_breakpoint_at): Declare.
12630 (gdb_breakpoint_here): Declare.
12631 (delete_breakpoint_at): Delete.
12632 (delete_gdb_breakpoint_at): Declare.
12633
12634 * server.h (struct raw_breakpoint): Forward declare.
12635 (struct process_info): New field `raw_breakpoints'.
12636
12637 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12638 breakpoints.
12639
6bf5e0ba
PA
126402010-03-24 Pedro Alves <pedro@codesourcery.com>
12641
12642 * linux-low.c (status_pending_p_callback): Fix comment.
12643 (linux_wait_for_event_1): Move most of the internal breakpoint
12644 handling from here...
12645 (linux_wait_1): ... to here.
12646 (count_events_callback): New.
12647 (select_singlestep_lwp_callback): New.
12648 (select_event_lwp_callback): New.
12649 (cancel_breakpoints_callback): New.
12650 (select_event_lwp): New.
12651 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12652 priority to all LWPs that have had events that should be reported
12653 to the client. Cancel breakpoints when about to reporting the
12654 event to the client, not while stopping lwps. No longer cancel
12655 finished single-steps here.
12656 (cancel_finished_single_step): Delete.
12657 (cancel_finished_single_steps): Delete.
12658
414a389f
PA
126592010-03-24 Pedro Alves <pedro@codesourcery.com>
12660
12661 * mem-break.c (enum bkpt_type): New.
12662 (struct breakpoint): New field `type'.
12663 (set_breakpoint_at): Change return type to struct breakpoint
12664 pointer. Set type to `other_breakpoint' by default.
12665 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12666 in the breakpoint list.
12667 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12668 (reinsert_breakpoint): Rename to ...
12669 (reinsert_raw_breakpoint): ... this.
12670 (reinsert_breakpoints_at): Adjust.
12671 * mem-break.h (struct breakpoint): Declare.
12672 (set_breakpoint_at): Change return type to struct breakpoint
12673 pointer.
12674
2280c721
PA
126752010-03-24 Pedro Alves <pedro@codesourcery.com>
12676
12677 * server.c (handle_query): Assign, not compare.
12678
d50171e4
PA
126792010-03-24 Pedro Alves <pedro@codesourcery.com>
12680
12681 Teach linux gdbserver to step-over-breakpoints.
12682
12683 * linux-low.c (can_hardware_single_step): New.
12684 (supports_breakpoints): New.
12685 (handle_extended_wait): If stopping threads, read the stop pc of
12686 the new cloned LWP.
12687 (get_pc): New.
12688 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12689 low target doesn't support retrieving the PC.
12690 (add_lwp): Set last_resume_kind to resume_continue.
12691 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12692 (linux_attach): Don't clear stop_expected. Set the lwp's
12693 last_resume_kind to resume_stop.
12694 (linux_detach_one_lwp): Don't check for removed breakpoints.
12695 (check_removed_breakpoint): Delete.
12696 (status_pending_p): Rename to ...
12697 (status_pending_p_callback): ... this. Don't check for removed
12698 breakpoints. Don't consider threads that are stopped from GDB's
12699 perspective.
12700 (linux_wait_for_lwp): Always read the stop_pc here.
12701 (cancel_breakpoint): New.
12702 (step_over_bkpt): New global.
12703 (linux_wait_for_event_1): Implement stepping over breakpoints.
12704 (gdb_wants_lwp_stopped): New.
12705 (gdb_wants_all_stopped): New.
12706 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12707 single-step traps here. Store the thread's last reported target
12708 wait status.
12709 (send_sigstop): Don't clear stop_expected. Always set it,
12710 instead.
12711 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12712 (cancel_finished_single_step): New.
12713 (cancel_finished_single_steps): New.
12714 (wait_for_sigstop): Don't cancel finished single-step traps here.
12715 (linux_resume_one_lwp): Don't check for removed breakpoints.
12716 Don't set `step' on non-hardware step archs.
12717 (linux_set_resume_request): Ignore resume_stop requests if already
12718 stopping or stopped. Set the lwp's last_resume_kind.
12719 (resume_status_pending_p): Don't check for removed breakpoints.
12720 (need_step_over_p): New.
12721 (start_step_over): New.
12722 (finish_step_over): New.
12723 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12724 requests. Clear the thread's last reported target waitstatus.
12725 Don't use the `suspended' flag. Don't consider pending breakpoints.
12726 (linux_resume): Start a step-over if necessary.
12727 (proceed_one_lwp): New.
12728 (proceed_all_lwps): New.
12729 (unstop_all_lwps): New.
12730 * linux-low.h (struct lwp_info): Rewrite comment for the
12731 `suspended' flag. Add the `stop_pc' field. Delete the
12732 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12733 Add `'last_resume_kind' and `need_step_over' fields.
12734 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12735 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12736 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12737 (set_raw_breakpoint_at): New.
12738 (set_breakpoint_at): Rewrite to use it.
12739 (reinsert_breakpoint_handler): Delete.
12740 (set_reinsert_breakpoint): New.
12741 (reinsert_breakpoint_by_bp): Delete.
12742 (delete_reinsert_breakpoints): New.
12743 (uninsert_breakpoint): Rewrite.
12744 (uninsert_breakpoints_at): New.
12745 (reinsert_breakpoint): Rewrite.
12746 (reinsert_breakpoints_at): New.
12747 (check_breakpoints): Rewrite.
12748 (breakpoint_here): New.
12749 (breakpoint_inserted_here): New.
12750 (check_mem_read): Adjust.
12751 * mem-break.h (breakpoints_supported, breakpoint_here)
12752 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12753 (reinsert_breakpoint_by_bp): Delete declaration.
12754 (delete_reinsert_breakpoints): Declare.
12755 (reinsert_breakpoint): Delete declaration.
12756 (reinsert_breakpoints_at): Declare.
12757 (uninsert_breakpoint): Delete declaration.
12758 (uninsert_breakpoints_at): Declare.
12759 (check_breakpoints): Adjust prototype.
12760 * server.h: Adjust include order.
12761 (struct thread_info): Declare here. Add a `last_status' field.
12762
30ba68cb
MS
127632010-03-23 Michael Snyder <msnyder@vmware.com>
12764
12765 * server.c (crc32): New function.
12766 (handle_query): Add handling for 'qCRC:' request.
12767
b9a881c2
PA
127682010-03-23 Pedro Alves <pedro@codesourcery.com>
12769
12770 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12771 lwp had been stopped by a watchpoint.
12772
e92d13d5
PA
127732010-03-16 Pedro Alves <pedro@codesourcery.com>
12774
12775 * server.h (internal_error): Declare.
12776 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12777 * utils.c (internal_error): New function.
12778
64daa791
AS
127792010-03-15 Andreas Schwab <schwab@redhat.com>
12780
12781 * configure.srv: Fix typo setting srv_regobj.
12782
f52cd8cd
PA
127832010-03-15 Pedro Alves <pedro@codesourcery.com>
12784
12785 * linux-low.c (fetch_register): Avoid passing a non string literal
12786 format to `error'.
12787 (usr_store_inferior_registers): Ditto.
12788
93ae6fdc
PA
127892010-03-14 Pedro Alves <pedro@codesourcery.com>
12790
12791 * linux-low.c (linux_write_memory): Bail out early if peeking
12792 memory failed.
12793
c3adc08c
PA
127942010-03-14 Pedro Alves <pedro@codesourcery.com>
12795
12796 * linux-low.h (struct lwp_info): New fields
12797 `stopped_by_watchpoint' and `stopped_data_address'.
12798 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12799 here, and cache them in the lwp object.
12800 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12801 directly.
12802 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12803 field.
12804 (linux_stopped_by_watchpoint): Rewrite.
12805 (linux_stopped_data_address): Rewrite.
12806
bce522a2
PA
128072010-03-06 Simo Melenius <simo.melenius@iki.fi>
12808
12809 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12810 switching the current inferior, not before.
12811
90884b2b
L
128122010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12813
12814 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12815 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12816 i386-linux.c and amd64-linux.c.
12817 (reg-i386.o): Removed.
12818 (reg-i386.c): Likewise.
12819 (reg-i386-linux.o): Likewise.
12820 (reg-i386-linux.c): Likewise.
12821 (reg-x86-64.o): Likewise.
12822 (reg-x86-64.c): Likewise.
12823 (reg-x86-64-linux.o): Likewise.
12824 (reg-x86-64-linux.c): Likewise.
12825 (i386.o): New.
12826 (i386.c): Likewise.
12827 (i386-linux.o): Likewise.
12828 (i386-linux.c): Likewise.
12829 (amd64.o): Likewise.
12830 (amd64.c): Likewise.
12831 (amd64-linux.o): Likewise.
12832 (amd64-linux.c): Likewise.
12833
12834 * configure.srv (srv_i386_regobj): New.
12835 (srv_i386_linux_regobj): Likewise.
12836 (srv_amd64_regobj): Likewise.
12837 (srv_amd64_linux_regobj): Likewise.
12838 (srv_i386_32bit_xmlfiles): Likewise.
12839 (srv_i386_64bit_xmlfiles): Likewise.
12840 (srv_i386_xmlfiles): Likewise.
12841 (srv_amd64_xmlfiles): Likewise.
12842 (srv_i386_linux_xmlfiles): Likewise.
12843 (srv_amd64_linux_xmlfiles): Likewise.
12844 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12845 srv_xmlfiles to $srv_i386_xmlfiles.
12846 (i[34567]86-*-mingw32ce*): Likewise.
12847 (i[34567]86-*-mingw*): Likewise.
12848 (i[34567]86-*-nto*): Likewise.
12849 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12850 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12851 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12852 (x86_64-*-linux*): Likewise.
12853
12854 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12855 (init_registers_amd64_linux): New.
12856 (x86_arch_setup): Replace init_registers_x86_64_linux with
12857 init_registers_amd64_linux.
12858
193f13e6
MK
128592010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12860
12861 * configure.ac: Check for libdl. If it is not available link against
12862 static libthread_db.
12863 * configure: Regenerate.
12864
85d721b8
PA
128652010-02-22 Pedro Alves <pedro@codesourcery.com>
12866
12867 PR9605
12868
12869 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12870 handing a read watchpoint.
12871 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12872
6076632b
DE
128732010-02-12 Doug Evans <dje@google.com>
12874
12875 * linux-low.c (linux_supports_tracefork_flag): Document.
12876 (linux_look_up_symbols): Add comment.
12877
3327ccf7
L
128782010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12879
12880 * regcache.c (supply_register): Clear regcache if buf is NULL.
12881
0718675c 128822010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12883 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12884
12885 * inferiors.c (find_inferior): Add function documentation.
12886 (unloaded_dll): Handle the case where the unloaded dll has not
12887 been previously registered in the dll list.
12888
177321bd
DJ
128892010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12890
12891 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12892 (thumb2_breakpoint): New.
12893 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12894
2b009048
DJ
128952010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12896
12897 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12898 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12899 breakpoints.
12900
3be029c7
PA
129012010-01-21 Pedro Alves <pedro@codesourcery.com>
12902
12903 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12904
18f5de3b
JK
129052010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12906
12907 * linux-s390-low.c (s390_collect_ptrace_register)
12908 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12909
3743bb4f
DE
129102010-01-21 Doug Evans <dje@google.com>
12911
14ce3065
DE
12912 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12913 (PTRACE_ARG4_TYPE): New macro.
12914 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12915 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12916 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12917 (usr_store_inferior_registers): Ditto.
12918 (linux_read_memory, linux_write_memory): Ditto.
12919 (linux_test_for_tracefork): Ditto.
12920
3743bb4f
DE
12921 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12922 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12923
8b315be5
PA
129242010-01-21 Pedro Alves <pedro@codesourcery.com>
12925
12926 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12927 target.
12928
85492558
PA
129292010-01-21 Pedro Alves <pedro@codesourcery.com>
12930
12931 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12932 prototype to take a regcache. Adjust.
12933
442ea881
PA
129342010-01-20 Pedro Alves <pedro@codesourcery.com>
12935
12936 * regcache.h (struct thread_info): Forward declare.
12937 (struct regcache): New.
12938 (new_register_cache): Adjust prototype.
12939 (get_thread_regcache): Declare.
12940 (free_register_cache): Adjust prototype.
12941 (registers_to_string, registers_from_string): Ditto.
12942 (supply_register, supply_register_by_name, collect_register)
12943 (collect_register_as_string, collect_register_by_name): Ditto.
12944 * regcache.c (struct inferior_regcache_data): Delete.
12945 (get_regcache): Rename to ...
12946 (get_thread_regcache): ... this. Adjust. Switch inferior before
12947 fetching registers.
12948 (regcache_invalidate_one): Adjust.
12949 (regcache_invalidate): Fix prototype.
12950 (new_register_cache): Return the new register cache.
12951 (free_register_cache): Change prototype.
12952 (realloc_register_cache): Adjust.
12953 (registers_to_string): Change prototype to take a regcache. Adjust.
12954 (registers_from_string): Ditto.
12955 (register_data): Ditto.
12956 (supply_register): Ditto.
12957 (supply_register_by_name): Ditto.
12958 (collect_register): Ditto.
12959 (collect_register_as_string): Ditto.
12960 (collect_register_by_name): Ditto.
12961 * server.c (process_serial_event): Adjust.
12962 * linux-low.h (regset_fill_func, regset_store_func): Change
12963 prototype.
12964 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12965 Change prototype.
12966 * linux-low.c (get_stop_pc): Adjust.
12967 (check_removed_breakpoint): Adjust.
12968 (linux_wait_for_event): Adjust.
12969 (linux_resume_one_lwp): Adjust.
12970 (fetch_register): Add regcache parameter. Adjust.
12971 (usr_store_inferior_registers): Ditto.
12972 (regsets_fetch_inferior_registers): Ditto.
12973 (regsets_store_inferior_registers): Ditto.
12974 (linux_fetch_registers, linux_store_registers): Ditto.
12975 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12976 regcache. Adjust.
43aaf8b6
PA
12977 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12978 Ditto.
442ea881
PA
12979 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12980 prototype to take a regcache.
12981 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12982 * remote-utils.c (convert_ascii_to_int, outreg)
12983 (prepare_resume_reply): Change prototype to take a regcache.
12984 Adjust.
12985 * target.h (struct target_ops) <fetch_registers, store_registers>:
12986 Change prototype to take a regcache.
12987 (fetch_inferior_registers, store_inferior_registers): Change
12988 prototype to take a regcache. Adjust.
12989 * proc-service.c (ps_lgetregs): Adjust.
12990 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12991 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12992 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12993 take a regcache. Adjust.
12994 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12995 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12996 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12997 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12998 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12999 (cris_cannot_fetch_register):
13000 (cris_breakpoint_at): Change prototype to take a regcache.
13001 Adjust.
13002 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13003 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13004 to take a regcache. Adjust.
13005 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13006 Adjust.
13007 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13008 take a regcache. Adjust.
13009 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13010 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13011 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13012 * linux-mips-low.c (mips_get_pc):
13013 (mips_set_pc): Change prototype to take a regcache. Adjust.
13014 (mips_reinsert_addr): Adjust.
13015 (mips_collect_register): Change prototype to take a regcache.
13016 Adjust.
13017 (mips_supply_register):
13018 (mips_collect_register_32bit, mips_supply_register_32bit)
13019 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13020 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13021 * linux-ppc-low.c (ppc_supply_ptrace_register)
13022 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13023 (parse_spufs_run): Adjust.
13024 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13025 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13026 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13027 take a regcache. Adjust.
13028 * linux-s390-low.c (s390_collect_ptrace_register)
13029 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13030 (s390_set_pc): Change prototype to take a regcache. Adjust.
13031 (s390_arch_setup): Adjust.
13032 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13033 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13034 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13035 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13036 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13037 regcache. Adjust.
13038 (sparc_breakpoint_at): Adjust.
13039 * linux-xtensa-low.c (xtensa_fill_gregset):
13040 (xtensa_store_gregset):
13041 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13042 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13043 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13044 prototype to take a regcache. Adjust.
13045 * win32-arm-low.c (arm_fetch_inferior_register)
13046 (arm_store_inferior_register): Change prototype to take a
13047 regcache. Adjust.
13048 * win32-i386-low.c (i386_fetch_inferior_register)
13049 (i386_store_inferior_register): Change prototype to take a
13050 regcache. Adjust.
13051 * win32-low.c (child_fetch_inferior_registers)
13052 (child_store_inferior_registers): Change prototype to take a
13053 regcache. Adjust.
13054 (win32_wait): Adjust.
13055 (win32_fetch_inferior_registers): Change prototype to take a
13056 regcache. Adjust.
13057 (win32_store_inferior_registers): Adjust.
13058 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13059 store_inferior_register>: Change prototype to take a regcache.
13060
60c3d7b0
DE
130612010-01-20 Doug Evans <dje@google.com>
13062
13063 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13064 #ifdef.
13065 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13066 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13067
dc146f7c
VP
130682010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13069
13070 * linux-low.c (linux_core_of_thread): New.
13071 (compare_ints, show_process, list_threads): New.
13072 (linux_qxfer_osdata): Report threads and cores.
13073 (linux_target_op): Register linux_core_of_thread.
13074 * remote-utils.c (prepare_resume_reply): Report the core.
13075 (buffer_xml_printf): Support %d specifier.
13076 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13077 New.
13078 (handle_query): Handle qXfer:threads. Announce availability
13079 thereof.
13080 * target.h (struct target_ops): New field core_of_thread.
13081
7803799a
UW
130822010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13083
13084 * Makefile.in (clean): Remove new generated files.
13085 (reg-s390.o, reg-s390.c): Remove rules.
13086 (reg-s390x.o, reg-s390x.c): Likewise.
13087 (s390-linux32.o, s390-linux32.c): Add rules.
13088 (s390-linux64.o, s390-linux64.c): Likewise.
13089 (s390x-linux64.o, s390x-linux64.c): Likewise.
13090 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13091 * linux-s390-low.c: Include <elf.h>.
13092 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13093 (init_registers_s390): Remove prototype.
13094 (init_registers_s390x): Likewise.
13095 (init_registers_s390_linux32): Add prototype.
13096 (init_registers_s390_linux64): Likewise.
13097 (init_registers_s390x_linux64): Likewise.
13098 (s390_num_regs_3264): New define.
13099 (s390_regmap_3264): New global variable.
13100 (s390_cannot_fetch_register): Remove obsolete check.
13101 (s390_cannot_store_register): Likewise.
13102 (s390_collect_ptrace_register): Handle upper/lower register halves.
13103 (s390_supply_ptrace_register): Likewise.
13104 (s390_fill_gregset): Update to register number changes.
13105 (s390_get_hwcap): New routine.
13106 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13107 Install appropriate regmap and register set.
13108
6e7ffa39
JB
131092010-01-01 Joel Brobecker <brobecker@adacore.com>
13110
13111 * server.c (gdbserver_version): Update copyright year to 2010.
13112 * gdbreplay.c (gdbreplay_version): Likewise.
13113
957f3f49
DE
131142009-12-28 Doug Evans <dje@google.com>
13115
13116 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13117 elf/external.h. Include <elf.h> instead but only if necessary.
13118
ca5c370d
PA
131192009-12-28 Pedro Alves <pedro@codesourcery.com>
13120
13121 * linux-low.c (linux_remove_process): Remove `detaching'
13122 parameter. Don't release/detach from thread_db here.
13123 (linux_kill): Release/detach from thread_db here, ...
13124 (linux_detach): ... and here, before actually detaching.
13125 (linux_wait_1): ... and here, when a process exits.
13126 * thread-db.c (any_thread_of): New.
13127 (thread_db_free): Switch the current inferior to a thread of the
13128 passed in process.
13129
4ee62156
DE
131302009-12-21 Doug Evans <dje@google.com>
13131
d90e6a88
DE
13132 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13133
c5f62d5f
DE
13134 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13135 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13136 warning ifndef __NR_tkill. Move setting of errno there too.
13137 Delete unnecessary resetting of errno after syscall.
13138 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13139
10e86dd7
DE
13140 * configure.ac: Check for dladdr.
13141 * config.in: Regenerate.
13142 * configure: Regenerate.
13143 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13144 (try_thread_db_load): Update.
13145
4ee62156
DE
13146 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13147
00f515da
DE
131482009-12-18 Doug Evans <dje@google.com>
13149
e9464885
DE
13150 * event-loop.c: Include unistd.h if it exists.
13151
07d4f67e
DE
13152 * linux-low.c (my_waitpid): Move definition away from being in
13153 between linux_tracefork_child/linux_test_for_tracefork.
13154
00f515da
DE
13155 * gdb_proc_service.h (psaddr_t): Fix type.
13156 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13157 signature to match glibc.
13158
1de1badb
DE
131592009-12-16 Doug Evans <dje@google.com>
13160
13161 * linux-low.c (linux_read_memory): Fix argument to read.
13162
aeeb81d1
PA
131632009-11-26 Pedro Alves <pedro@codesourcery.com>
13164
13165 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13166 events, don't leave current_inferior pointing at null.
13167
10357975
PA
131682009-11-26 Pedro Alves <pedro@codesourcery.com>
13169
13170 * win32-low.c (LOG): Delete.
13171 (OUTMSG): Output to stderr.
13172 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13173 on compile time LOG macro.
13174 (win32_wait): Fix debug output.
13175
cf6e3471
PA
131762009-11-26 Pedro Alves <pedro@codesourcery.com>
13177
13178 * win32-low.c (win32_add_one_solib): If the dll name is
13179 "ntdll.dll", prepend the system directory to the dll path.
13180
0c85e18e
MK
131812009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13182
13183 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13184
9ac544ce 131852009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13186 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13187
13188 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13189 * configure.ac: Check for __mcoldfire__ and set
13190 gdb_cv_m68k_is_coldfire.
13191 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13192 reg-cf.o and reg-m68k.o.
13193 * configure: Regenerated.
13194
fd7dd3e6
PA
131952009-11-16 Pedro Alves <pedro@codesourcery.com>
13196
13197 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13198 Pass it to thread_db_free.
13199 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13200 proper `detaching' argument to linux_remove_process.
13201 * linux-low.h (thread_db_free): Add `detaching' parameter.
13202 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13203 to thread_db_free.
13204 (thread_db_free): Add `detaching' parameter. Only
13205 call td_ta_clear_event if detaching from process.
13206
75aa492e
MK
132072009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13208
13209 * thread-db.c (thread_db_free): Fix typo.
13210
21e1bee4
PP
132112009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13212
13213 PR gdb/10838
13214 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13215
8838b45e
NS
132162009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13217
13218 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13219 with an i686 compiler.
13220 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13221 needed.
13222 * configure: Rebuilt.
13223
8a35fb51
SL
132242009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13225
13226 PR gdb/10783
13227
13228 * server.c (handle_search_memory_1): Correct read_addr initialization
13229 in loop for searching subsequent chunks.
13230
96f15937
PP
132312009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13232
13233 * configure.ac: New --with-libthread-db option.
13234 * thread-db.c: Allow direct dependence on libthread_db.
13235 (thread_db_free): Adjust.
13236 * config.in: Regenerate.
13237 * configure: Likewise.
889bf7c5 13238
5f7d1694
PP
132392009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13240
13241 PR gdb/10757
13242 * thread-db.c (attach_thread): New function.
13243 (maybe_attach_thread): Return success/failure.
13244 (find_new_threads_callback): Adjust.
889bf7c5
PA
13245 (thread_db_find_new_threads): Loop until no new threads.
13246
88e3b899
PA
132472009-10-13 Pedro Alves <pedro@codesourcery.com>
13248
13249 * proc-service.c (ps_lgetregs): Formatting.
13250
cdbfd419
PP
132512009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13252
13253 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13254 * configure.ac: Adjust.
13255 * linux-low.h (struct process_info_private): Move members to struct
13256 thread_db.
13257 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13258 * linux-low.c (linux_remove_process): Adjust.
13259 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13260 * server.c (handle_query): Move code ...
13261 (handle_monitor_command): ... here. New function.
13262 * target.h (struct target_ops): New member.
13263 * thread-db.c (struct thread_db): New.
13264 (libthread_db_search_path): New variable.
13265 (thread_db_create_event, thread_db_enable_reporting)
13266 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13267 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13268 (try_thread_db_load_1, dladdr_to_soname): New functions.
13269 (try_thread_db_load, thread_db_load_search): New functions.
13270 (thread_db_init): Search for libthread_db.
13271 (thread_db_free): New function.
13272 (thread_db_handle_monitor_command): Likewise.
13273 * config.in: Regenerate.
13274 * configure: Regenerate.
889bf7c5 13275
4168d2d6
UW
132762009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13277
13278 * spu-low.c (spu_kill): Wait for inferior to terminate.
13279 Call clear_inferiors.
13280 (spu_detach): Call clear_inferiors.
13281
81ecdfbb
RW
132822009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13283
13284 * aclocal.m4: Regenerate.
13285 * config.in: Likewise.
13286 * configure: Likewise.
13287
0b9ff2c0
UW
132882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13289
13290 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13291 (parse_spufs_run): New function.
13292 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13293 (ppc_breakpoint_at): Handle SPU breakpoints.
13294
efcbbd14
UW
132952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13296
13297 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13298 (SPUFS_MAGIC): Define.
13299 (spu_enumerate_spu_ids): New function.
13300 (linux_qxfer_spu): New function.
13301 (linux_target_ops): Install linux_qxfer_spu.
13302
f4d9bade
UW
133032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13304
13305 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13306 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13307 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13308 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13309 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13310 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13311 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13312 (init_registers_powerpc_cell32l): Add prototype.
13313 (init_registers_powerpc_cell64l): Likewise.
13314 (ppc_arch_setup): Detect Cell/B.E. architecture.
13315
96e946ca
RW
133162009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13317
13318 * Makefile.in (datarootdir): New variable.
13319
58d6951d
DJ
133202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13321
13322 * linux-low.c (linux_write_memory): Update debugging output.
13323 * Makefile.in (clean): Add new descriptions.
13324 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13325 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13326 * configure.srv: Add new files for arm*-*-linux*.
13327 * linux-arm-low.c: Add new declarations.
13328 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13329 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13330 (HWCAP_VFPv3D16): New.
13331 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13332 instead of __IWMMXT__.
13333 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13334 (arm_arch_setup): New.
13335 (target_regsets): Remove #ifdef. Add VFP regset.
13336 (the_low_target): Use arm_arch_setup.
13337
12b42a12
DJ
133382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13339
13340 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13341 the main thread again.
13342
ac8c974e
AR
133432009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13344
13345 Adding Neutrino gdbserver.
13346 * configure: Regenerated.
13347 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13348 * configure.srv (i[34567]86-*-nto*): New target.
13349 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13350 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13351 (nto_comctrl) [__QNX__]: New function.
13352 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13353
4424e0c3 133542009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13355
13356 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13357 srv_tgtobj.
13358
912cf4ba
PA
133592009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13360 Pedro Alves <pedro@codesourcery.com>
13361
13362 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13363 don't support CONTEXT_EXTENDED_REGISTERS.
13364 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13365 (the_low_target): Install them.
13366 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13367 failing with ERROR_PIPE_NOT_CONNECTED.
13368
aa5ca48f
DE
133692009-06-30 Doug Evans <dje@google.com>
13370 Pierre Muller <muller@ics.u-strasbg.fr>
13371
13372 Add h/w watchpoint support to x86-linux, win32-i386.
13373 * Makefile.in (SFILES): Add i386-low.c
13374 (i386_low_h): Define.
13375 (i386-low.o): Add dependencies.
13376 (linux-x86-low.o): Add i386-low.h dependency.
13377 (win32-i386-low.o): Ditto.
13378 * i386-low.c: New file.
13379 * i386-low.h: New file.
13380 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13381 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13382 * linux-low.c (linux_add_process): Initialize arch_private.
13383 (linux_remove_process): Free arch_private.
13384 (add_lwp): Initialize arch_private.
13385 (delete_lwp): Free arch_private.
13386 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13387 provided.
13388 * linux-low.h (process_info_private): New member arch_private.
13389 (lwp_info): New member arch_private.
13390 (linux_target_ops): New members new_process, new_thread,
13391 prepare_to_resume.
13392 (ptid_of): New macro.
13393 * linux-x86-low.c: Include stddef.h, i386-low.h.
13394 (arch_process_info): New struct.
13395 (arch_lwp_info): New struct.
13396 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13397 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13398 (i386_dr_low_get_status): New function.
13399 (x86_insert_point, x86_remove_point): New functions.
13400 (x86_stopped_by_watchpoint): New function.
13401 (x86_stopped_data_address): New function.
13402 (x86_linux_new_process, x86_linux_new_thread): New functions.
13403 (x86_linux_prepare_to_resume): New function.
13404 (the_low_target): Add entries for insert_point, remove_point,
13405 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13406 prepare_to_resume.
13407 * server.c (debug_hw_points): New global.
13408 (monitor_show_help): Document set debug-hw-points.
13409 (handle_query): Process "set debug-hw-points".
13410 * server.h (debug_hw_points): Declare.
13411 (paddress): Declare.
13412 * utils.c (NUMCELLS, CELLSIZE): New macros.
13413 (get_sell, xsnprintf, paddress): New functions.
13414 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13415 remove_point, stopped_by_watchpoint, stopped_data_address.
13416 * win32-i386-low.c: Include i386-low.h.
13417 (debug_reg_state): Replaces dr.
13418 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13419 (i386_dr_low_get_status): New function.
13420 (i386_insert_point, i386_remove_point): New functions.
13421 (i386_stopped_by_watchpoint): New function.
13422 (i386_stopped_data_address): New function.
13423 (i386_initial_stuff): Update.
13424 (get_thread_context,set_thread_context,i386_thread_added): Update.
13425 (the_low_target): Add entries for insert_point,
13426 remove_point, stopped_by_watchpoint, stopped_data_address.
13427 * win32-low.c (win32_insert_watchpoint): New function.
13428 (win32_remove_watchpoint): New function.
13429 (win32_stopped_by_watchpoint): New function.
13430 (win32_stopped_data_address): New function.
13431 (win32_target_ops): Add entries for insert_watchpoint,
13432 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13433 * win32-low.h (win32_target_ops): New members insert_point,
13434 remove_point, stopped_by_watchpoint, stopped_data_address.
13435
d993e290
PA
134362009-06-25 Pedro Alves <pedro@codesourcery.com>
13437
13438 * server.c (process_serial_event): Re-return unsupported, not
13439 error, if the type isn't recognized. Re-allow supporting only
13440 insert or remove packets. Also call require_running for
13441 breakpoints. Add missing break statement to default case. Tidy.
13442 * target.h (struct target_ops): Rename insert_watchpoint to
13443 insert_point, and remove_watchpoint to remove_point.
13444
13445 * linux-low.h (struct linux_target_ops): Likewise.
13446 * linux-low.c (linux_insert_watchpoint): Rename to ...
13447 (linux_insert_point): ... this. Adjust.
13448 (linux_remove_watchpoint): Rename to ...
13449 (linux_remove_point): ... this. Adjust.
13450 (linux_target_ops): Adjust.
13451 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13452 (cris_insert_point): ... this.
13453 (cris_remove_watchpoint): Rename to ...
13454 (cris_remove_point): ... this.
13455 (the_low_target): Adjust.
13456
0f54c268
PM
134572009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13458
13459 * server.c (handle_v_kill): Pass signal_pid to
13460 kill_inferior if multi_process is zero.
13461
c6314022
AR
134622009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13463
13464 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13465 * target.h (target_ops): Comment for *_watchpoint to make it clear
13466 the functions can get types '0' and '1'.
13467
4463ce24
AR
134682009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13469
13470 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13471 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13472 * regcache.c (get_regcache): Likewise.
13473 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13474 * win32-low.c (child_fetch_inferior_registers): Remove check for
13475 regno 0.
13476
cf8fd78b
PA
134772009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13478 Pedro Alves <pedro@codesourcery.com>
13479
13480 * target.h (struct target_ops) <supports_multi_process>: New
13481 callback.
13482 (target_supports_multi_process): New.
13483 * server.c (handle_query): Even if GDB reports support, only
13484 enable multi-process if the target also supports it. Report
13485 multi-process support only if the target backend supports it.
13486 * linux-low.c (linux_supports_multi_process): New function.
13487 (linux_target_ops): Install it as target_supports_multi_process
13488 callback.
13489
47c0c975
DE
134902009-05-24 Doug Evans <dje@google.com>
13491
e09875d4
DE
13492 Global renaming of find_thread_pid to find_thread_ptid.
13493 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13494 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13495 All callers updated.
13496
e27d73f6
DE
13497 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13498 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13499 directly.
13500
47c0c975
DE
13501 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13502 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13503 (linux_resume_one_lwp): Ditto.
13504
2acc282a
DE
135052009-05-23 Doug Evans <dje@google.com>
13506
13507 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13508 from struct inferior_list_entry * to struct lwp_info *.
13509 All callers updated.
13510
9f1036c1
DE
135112009-05-13 Doug Evans <dje@google.com>
13512
13513 * linux-x86-low.c: Don't include assert.h.
13514 (x86_siginfo_fixup): Use fatal, not assert.
13515 (x86_arch_setup): Fix comment.
13516
d0722149
DE
135172009-05-12 Doug Evans <dje@google.com>
13518
13519 Biarch support for i386/amd64 gdbserver.
13520 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13521 Add linux-x86-low.c.
13522 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13523 (linux-x86-low.o): Add.
13524 * linux-x86-64-low.c: Delete.
13525 * linux-i386-low.c: Delete.
13526 * linux-x86-low.c: New file.
13527 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13528 linux-x86-low.o.
13529 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13530 linux-x86-low.o.
13531 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13532 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13533 (linux_child_pid_to_exec_file): New function.
13534 (elf_64_header_p, elf_64_file_p): New functions.
13535 (siginfo_fixup): New function.
13536 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13537 give target a chance to convert layout.
13538 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13539 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13540
fdeb2a12
DE
135412009-05-07 Doug Evans <dje@google.com>
13542
13543 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13544 (regsets_store_inferior_registers): Ditto.
13545
a6dbe5df
PA
135462009-05-06 Pedro Alves <pedro@codesourcery.com>
13547
13548 PR server/10048
13549
13550 * linux-low.c (must_set_ptrace_flags): Delete.
13551 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13552 of the global.
13553 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13554 `lwp->must_set_ptrace_flags' instead.
ba42693b 13555 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13556 (linux_wait_1): ... not here.
13557
5091eb23
DE
135582009-04-30 Doug Evans <dje@google.com>
13559
9f767825
DE
13560 * inferiors.c (started_inferior_callback): New function.
13561 (attached_inferior_callback): New function.
13562 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13563 * server.c (print_started_pid, print_attached_pid): New functions.
13564 (detach_or_kill_for_exit): New function.
13565 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13566 * server.h (have_started_inferiors_p): Declare.
13567 (have_attached_inferiors_p): Declare.
13568
5091eb23
DE
13569 * inferiors.c (remove_process): Fix memory leak, free process.
13570 * linux-low.c (linux_remove_process): New function.
13571 (linux_kill): Call it instead of remove_process.
13572 (linux_detach, linux_wait_1): Ditto.
13573
155c8968
PA
135742009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13575
13576 * configure.srv: Add x86 Windows CE target.
13577
7fe519cb
UW
135782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13579
13580 * inferiors.c (get_thread_process): Make global.
13581 * server.h (get_thread_process): Add prototype.
13582 * thread-db.c (find_one_thread): Use get_thread_process
13583 instead of current_process.
13584 (thread_db_get_tls_address): Do not crash if called when
13585 thread layer is not yet initialized.
13586
5472f405
UW
135872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13588
13589 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13590 * spu-low.c (current_tid): Rename to ...
13591 (current_ptid): ... this.
13592 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13593 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13594 ptid_get_lwp (current_ptid) instead of current_tid.
13595 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13596 instead of current_tid. Use find_process_pid to verify pid
13597 argument is valid. Pass proper argument to remove_process.
13598 (spu_thread_alive): Compare current_ptid instead of current_tid.
13599 (spu_resume): Likewise.
13600
55ac2b99
PA
136012009-04-02 Pedro Alves <pedro@codesourcery.com>
13602
13603 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13604 variable.
13605
95954743
PA
136062009-04-01 Pedro Alves <pedro@codesourcery.com>
13607
13608 Implement the multiprocess extensions, and add linux multiprocess
13609 support.
13610
13611 * server.h (ULONGEST): Declare.
13612 (struct ptid, ptid_t): New.
13613 (minus_one_ptid, null_ptid): Declare.
13614 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13615 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13616 (struct inferior_list_entry): Change `id' type from unsigned from
13617 to ptid_t.
13618 (struct sym_cache, struct breakpoint, struct
13619 process_info_private): Forward declare.
13620 (struct process_info): Declare.
13621 (current_process): Declare.
13622 (all_processes): Declare.
13623 (initialize_inferiors): Declare.
13624 (add_thread): Adjust to use ptid_t.
13625 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13626 (add_process, remove_process, find_thread_pid): Declare.
13627 (find_inferior_id): Adjust to use ptid_t.
13628 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13629 (multi_process): Declare.
13630 (push_event): Adjust to use ptid_t.
13631 (read_ptid, write_ptid): Declare.
13632 (prepare_resume_reply): Adjust to use ptid_t.
13633 (clear_symbol_cache): Declare.
13634 * inferiors.c (all_processes): New.
13635 (null_ptid, minus_one_ptid): New.
13636 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13637 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13638 (add_thread): Change unsigned long to ptid. Remove gdb_id
13639 parameter. Adjust.
13640 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13641 (gdb_id_to_thread): Rename to ...
13642 (find_thread_pid): ... this. Change unsigned long to ptid.
13643 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13644 (loaded_dll, pull_pid_from_list): Adjust.
13645 (add_process, remove_process, find_process_pid)
13646 (get_thread_process, current_process, initialize_inferiors): New.
13647 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13648 (struct target_waitstatus) <related_pid>: Ditto.
13649 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13650 return type to int.
13651 (struct target_ops) <join>: Add `pid' argument.
13652 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13653 (struct target_ops) <wait>: Add `ptid' field. Change return type
13654 to ptid.
13655 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13656 (mywait): Add `ptid' argument. Change return type to ptid_t.
13657 (target_pid_to_str): Declare.
13658 * target.c (set_desired_inferior): Adjust to use ptids.
13659 (mywait): Add new `ptid' argument. Adjust.
13660 (target_pid_to_str): New.
13661 * mem-break.h (free_all_breakpoints): Declare.
13662 * mem-break.c (breakpoints): Delelete.
13663 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13664 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13665 to use per-process breakpoint list.
13666 (free_all_breakpoints): New.
13667 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13668 (symbol_cache, all_symbols_looked_up): Delete.
13669 (hexchars): New.
13670 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13671 read_ptid): New.
13672 (prepare_resume_reply): Change ptid argument's type from unsigned
13673 long to ptid_t. Adjust. Implement W;process and X;process.
13674 (free_sym_cache, clear_symbol_cache): New.
13675 (look_up_one_symbol): Adjust to per-process symbol cache. *
13676 * server.c (cont_thread, general_thread, step_thread): Change type
13677 to ptid_t.
13678 (attached): Delete.
13679 (multi_process): New.
13680 (last_ptid): Change type to ptid_t.
13681 (struct vstop_notif) <ptid>: Change type to ptid_t.
13682 (queue_stop_reply, push_event): Change `ptid' argument's type to
13683 ptid_t.
13684 (discard_queued_stop_replies): Add `pid' argument.
13685 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13686 changes. Don't reference the `attached' global.
13687 (attach_inferior): Adjust to mywait interface changes.
13688 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13689 features. Handle and report "multiprocess+". Handle
13690 "qAttached:PID".
13691 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13692 changes.
13693 (handle_v_kill): New.
13694 (handle_v_stopped): Adjust to use target_pid_to_str.
13695 (handle_v_requests): Allow multiple attaches and runs when
13696 multiprocess extensions are in effect. Handle "vKill".
13697 (myresume): Adjust to use ptids.
13698 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13699 (handle_status): Adjust to discard_queued_stop_replies interface
13700 change.
13701 (first_thread_of, kill_inferior_callback)
13702 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13703 (main): Call initialize_inferiors. Adjust to use ptids, killing
13704 and detaching from all inferiors. Handle multiprocess packet
13705 variants.
13706 * linux-low.h: Include gdb_proc_service.h.
13707 (struct process_info_private): New.
13708 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13709 <lwpid_of>: Use ptid_get_lwp.
13710 (get_lwp_thread): Adjust.
13711 (struct lwp_info): Add `dead' member.
13712 (find_lwp_pid): Declare.
13713 * linux-low.c (thread_db_active): Delete.
13714 (new_inferior): Adjust comment.
13715 (inferior_pid): Delete.
13716 (linux_add_process): New.
13717 (handle_extended_wait): Adjust.
13718 (add_lwp): Change unsigned long to ptid.
13719 (linux_create_inferior): Add process to processes table. Adjust
13720 to use ptids. Don't set new_inferior here.
13721 (linux_attach_lwp): Rename to ...
13722 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13723 it. Adjust to use ptids.
13724 (linux_attach_lwp): New.
13725 (linux_attach): Add process to processes table. Don't set
13726 new_inferior here.
13727 (struct counter): New.
13728 (second_thread_of_pid_p, last_thread_of_process_p): New.
13729 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13730 multiple processes.
13731 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13732 processes. Remove process from process table.
13733 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13734 to multiple processes.
13735 (any_thread_of): New.
13736 (linux_detach): Add `pid' argument, and handle it. Remove process
13737 from processes table.
13738 (linux_join): Add `pid' argument. Handle it.
13739 (linux_thread_alive): Change unsighed long argument to ptid_t.
13740 Consider dead lwps as not being alive.
13741 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13742 threads we're not interested in.
13743 (same_lwp, find_lwp_pid): New.
13744 (linux_wait_for_lwp): Change `pid' argument's type from int to
13745 ptid_t. Adjust.
13746 (linux_wait_for_event): Rename to ...
13747 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13748 from int to ptid_t. Adjust.
13749 (linux_wait_for_event): New.
13750 (linux_wait_1): Add `ptid' argument. Change return type to
13751 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13752 that exit from the process table.
13753 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13754 Adjust.
13755 (mark_lwp_dead): New.
13756 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13757 stopping all threads, mark its main lwp as dead.
13758 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13759 ptids.
13760 (fetch_register, usr_store_inferior_registers)
13761 (regsets_fetch_inferior_registers)
13762 (regsets_store_inferior_registers, linux_read_memory)
13763 (linux_write_memory): Inline `inferior_pid'.
13764 (linux_look_up_symbols): Adjust to use per-process
13765 `thread_db_active'.
13766 (linux_request_interrupt): Adjust to use ptids.
13767 (linux_read_auxv): Inline `inferior_pid'.
13768 (initialize_low): Don't reference thread_db_active.
13769 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13770 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13771 (ps_getpid): Return the pid of the current inferior.
13772 * thread-db.c (proc_handle, thread_agent): Delete.
13773 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13774 per-process data.
13775 (find_one_thread): Change argument type to ptid_t. Adjust to
13776 per-process data.
13777 (maybe_attach_thread): Adjust to per-process data and ptids.
13778 (thread_db_find_new_threads): Ditto.
13779 (thread_db_init): Ditto.
13780 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13781 processes table. Adjust to use ptids.
13782 (spu_kill, spu_detach): Adjust interface. Remove process from
13783 processes table.
13784 (spu_join, spu_thread_alive): Adjust interface.
13785 (spu_wait): Adjust interface. Remove process from processes
13786 table. Adjust to use ptids.
13787 * win32-low.c (current_inferior_tid): Delete.
13788 (current_inferior_ptid): New.
13789 (debug_event_ptid): New.
13790 (thread_rec): Take a ptid. Adjust.
13791 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13792 (child_delete_thread): Ditto.
13793 (do_initial_child_stuff): Add `attached' argument. Add process to
13794 processes table.
13795 (child_fetch_inferior_registers, child_store_inferior_registers):
13796 Adjust.
13797 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13798 (win32_attach): Pass 1 to do_initial_child_stuff.
13799 (win32_kill): Adjust interface. Remove process from processes
13800 table.
13801 (win32_detach): Ditto.
13802 (win32_join): Adjust interface.
13803 (win32_thread_alive): Take a ptid.
13804 (win32_resume): Adjust to use ptids.
13805 (get_child_debug_event): Ditto.
13806 (win32_wait): Adjust interface. Remove exiting process from
13807 processes table.
13808
bd99dc85
PA
138092009-04-01 Pedro Alves <pedro@codesourcery.com>
13810
13811 Non-stop mode support.
13812
13813 * server.h (non_stop): Declare.
13814 (gdb_client_data, handler_func): Declare.
13815 (delete_file_handler, add_file_handler, start_event_loop):
13816 Declare.
13817 (handle_serial_event, handle_target_event, push_event)
13818 (putpkt_notif): Declare.
13819 * target.h (enum resume_kind): New.
13820 (struct thread_resume): Replace `step' field by `kind' field.
13821 (TARGET_WNOHANG): Define.
13822 (struct target_ops) <wait>: Add `options' argument.
13823 <supports_non_stop, async, start_non_stop>: New fields.
13824 (target_supports_non_stop, target_async): New.
13825 (start_non_stop): Declare.
13826 (mywait): Add `options' argument.
13827 * target.c (mywait): Add `options' argument. Print child exit
13828 notifications here.
13829 (start_non_stop): New.
13830 * server.c (non_stop, own_buf, mem_buf): New globals.
13831 (struct vstop_notif): New.
13832 (notif_queue): New global.
13833 (queue_stop_reply, push_event, discard_queued_stop_replies)
13834 (send_next_stop_reply): New.
13835 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13836 interface changes.
13837 (attach_inferior): In non-stop mode, don't wait for the target
13838 here.
13839 (handle_general_set): Handle QNonStop.
13840 (handle_query): When handling qC, return the current general
13841 thread, instead of the first thread of the list.
13842 (handle_query): If the backend supports non-stop mode, include
13843 QNonStop+ in the qSupported query response.
13844 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13845 and non-stop mode.
13846 (handle_v_attach, handle_v_run): Handle non-stop mode.
13847 (handle_v_stopped): New.
13848 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13849 (myresume): Adjust to use resume_kind. Handle non-stop.
13850 (queue_stop_reply_callback): New.
13851 (handle_status): Handle non-stop mode.
13852 (main): Clear non_stop flag on reconnection. Use the event-loop.
13853 Refactor serial protocol handling from here ...
13854 (process_serial_event): ... to this new function. When GDB
13855 selects any thread, select one here. In non-stop mode, wait until
13856 GDB acks all pending events before exiting.
13857 (handle_serial_event, handle_target_event): New.
13858 * remote-utils.c (remote_open): Install remote_desc in the event
13859 loop.
13860 (remote_close): Remove remote_desc from the event loop.
13861 (putpkt_binary): Rename to...
13862 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13863 (putpkt_binary): New as wrapper around putpkt_binary_1.
13864 (putpkt_notif): New.
13865 (prepare_resume_reply): In non-stop mode, don't change the
13866 general_thread.
13867 * event-loop.c: New.
13868 * Makefile.in (OBJ): Add event-loop.o.
13869 (event-loop.o): New rule.
13870
13871 * linux-low.h (pid_of): Moved here.
13872 (lwpid_of): New.
13873 (get_lwp_thread): Use lwpid_of.
13874 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13875 * linux-low.c (pid_of): Delete.
13876 (inferior_pid): Use lwpid_of.
13877 (linux_event_pipe): New.
13878 (target_is_async_p): New.
13879 (delete_lwp): New.
13880 (handle_extended_wait): Use lwpid_of.
13881 (add_lwp): Don't set lwpid field.
13882 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13883 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13884 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13885 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13886 first. Adjust to linux_wait_for_event interface changes. Use
13887 lwpid_of.
13888 (linux_detach): Don't delete the main lwp here.
13889 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13890 (status_pending_p): Don't consider explicitly suspended lwps.
13891 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13892 pointer. Add OPTIONS argument. Change return type to int. Use
13893 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13894 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13895 pointer. Add status pointer argument. Return a pid instead of a
13896 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13897 changes. In non-stop mode, don't switch to a random thread.
13898 (linux_wait): Rename to...
13899 (linux_wait_1): ... this. Add target_options argument, and handle
13900 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13901 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13902 clean exit and signal exit code. Don't stop all threads in
13903 non-stop mode. In all-stop mode, only stop all threads when
13904 reporting a stop to GDB. Handle explicit thread stop requests.
13905 (async_file_flush, async_file_mark): New.
13906 (linux_wait): New.
13907 (send_sigstop): Use lwpid_of.
13908 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13909 interface changes. In non-stop mode, don't switch to a random
13910 thread.
13911 (linux_resume_one_lwp): Use lwpid_of.
13912 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13913 (linux_resume_one_thread): ... this. Handle resume_stop. In
13914 non-stop mode, don't look for pending flag in all threads.
13915 (resume_status_pending_p): Don't consider explicitly suspended
13916 threads.
13917 (my_waitpid): Reimplement. Emulate __WALL.
13918 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13919 Use lwpid_of.
13920 (sigchld_handler, linux_supports_non_stop, linux_async)
13921 (linux_start_non_stop): New.
13922 (linux_target_ops): Register linux_supports_non_stop, linux_async
13923 and linux_start_non_stop.
13924 (initialize_low): Install SIGCHLD handler.
13925 * thread-db.c (thread_db_create_event, find_one_thread)
13926 (thread_db_get_tls_address): Use lwpid_of.
13927 * win32-low.c (win32_detach): Adjust to use resume_kind.
13928 (win32_wait): Add `options' argument.
13929 * spu-low.c (spu_resume): Adjust to use resume_kind.
13930 (spu_wait): Add `options' argument.
13931
5b1c542e
PA
139322009-04-01 Pedro Alves <pedro@codesourcery.com>
13933
13934 Decouple target code from remote protocol.
13935
13936 * target.h (enum target_waitkind): New.
13937 (struct target_waitstatus): New.
13938 (struct target_ops) <wait>: Return an unsigned long. Take a
13939 target_waitstatus pointer instead of a char pointer.
13940 (mywait): Likewise.
13941 * target.c (mywait): Change prototype to return an unsigned long.
13942 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13943 * server.h (thread_from_wait, old_thread_from_wait): Delete
13944 declarations.
13945 (prepare_resume_reply): Change prototype to take a
13946 target_waitstatus.
13947 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13948 (last_status, last_ptid): New.
13949 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13950 pid instead of a signal.
13951 (attach_inferior): Remove "status" and "signal" parameters.
13952 Adjust.
13953 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13954 not as an address.
13955 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13956 (handle_v_requests, myresume): Remove "status" and "signal"
13957 parameters. Adjust.
13958 (handle_status): New.
13959 (main): Delete local `status'. Adjust.
13960 * remote-utils.c: Include target.h.
13961 (prepare_resume_reply): Change prototype to take a
13962 target_waitstatus. Adjust.
13963
13964 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13965 interface.
13966 * spu-low.c (spu_wait): Adjust.
13967 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13968 Delete.
13969 (win32_wait): Adjust.
13970
2bd7c093
PA
139712009-04-01 Pedro Alves <pedro@codesourcery.com>
13972
13973 * target.h (struct thread_resume): Delete leave_stopped member.
13974 (struct target_ops): Add a `n' argument to the `resume' callback.
13975 * server.c (start_inferior): Adjust.
13976 (handle_v_cont, myresume): Adjust.
13977 * linux-low.c (check_removed_breakpoint): Adjust to resume
13978 interface change, and to removed leave_stopped field.
13979 (resume_ptr): Delete.
13980 (struct thread_resume_array): New.
13981 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13982 resume interface change.
13983 (linux_continue_one_thread, linux_queue_one_thread)
13984 (resume_status_pending_p): Check if the resume field is NULL
13985 instead of checking the leave_stopped member.
13986 (linux_resume): Adjust to the target resume interface change.
13987 * spu-low.c (spu_resume): Adjust to the target resume interface
13988 change.
13989 * win32-low.c (win32_detach, win32_resume): Ditto.
13990
c35fafde
PA
139912009-04-01 Pedro Alves <pedro@codesourcery.com>
13992
13993 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13994 flag.
13995 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13996 pending.
13997 (linux_continue_one_thread): Only preserve the stepping flag if
13998 there's a pending breakpoint.
13999
0a59d50b
PA
140002009-03-31 Pedro Alves <pedro@codesourcery.com>
14001
14002 * server.c (main): After the inferior having exited, call
14003 remote_close before exiting gdbserver.
14004
f04c6d38
TJB
140052009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14006
14007 Fix size of FPSCR in Power 7 processors.
14008 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14009 (PPC_FEATURE_HAS_DFP): New #define.
14010 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14011 size of the FPSCR.
14012
78e5cee6
PA
140132009-03-23 Pedro Alves <pedro@codesourcery.com>
14014
14015 * server.c (handle_query) Whitespace and formatting.
14016
1b3f6016
PA
140172009-03-22 Pedro Alves <pedro@codesourcery.com>
14018
14019 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14020 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14021 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14022 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14023 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14024 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14025 Makefile.in, configure.ac: Fix whitespace throughout.
14026 * configure: Regenerate.
14027
a07b2135
PA
140282009-03-22 Pedro Alves <pedro@codesourcery.com>
14029
14030 * inferiors.c (find_inferior): Make it safe for the callback
14031 function to delete the currently iterated inferior.
14032
67cc2626
PA
140332009-03-22 Pedro Alves <pedro@codesourcery.com>
14034
14035 * Makefile.in (linuw_low_h): Move higher.
14036 (thread-db.o): Depend on $(linux_low_h).
14037
54a0b537
PA
140382009-03-17 Pedro Alves <pedro@codesourcery.com>
14039
14040 Rename "process" to "lwp" throughout.
14041
14042 * linux-low.c (all_processes): Rename to...
14043 (all_lwps): ... this.
14044 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14045 (add_process): Rename to ...
14046 (add_lwp): ... this. Adjust.
14047 (linux_create_inferior): Adjust.
14048 (linux_attach_lwp): Adjust.
14049 (linux_attach): Adjust.
14050 (linux_kill_one_process): Rename to ...
14051 (linux_kill_one_lwp): ... this. Adjust.
14052 (linux_kill): Adjust.
14053 (linux_detach_one_process): Rename to ...
14054 (linux_detach_one_lwp): ... this. Adjust.
14055 (linux_detach): Adjust.
14056 (check_removed_breakpoint): Adjust.
14057 (status_pending_p): Adjust.
14058 (linux_wait_for_process): Rename to ...
14059 (linux_wait_for_lwp): ... this. Adjust.
14060 (linux_wait_for_event): Adjust.
14061 (send_sigstop): Adjust.
14062 (wait_for_sigstop): Adjust.
14063 (stop_all_processes): Rename to ...
14064 (stop_all_lwps): ... this.
14065 (linux_resume_one_process): Rename to ...
14066 (linux_resume_one_lwp): ... this. Adjust.
14067 (linux_set_resume_request, linux_continue_one_thread)
14068 (linux_queue_one_thread, resume_status_pending_p)
14069 (usr_store_inferior_registers, regsets_store_inferior_registers)
14070 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14071 Adjust.
14072 * linux-low.h (get_process): Rename to ...
14073 (get_lwp): ... this. Adjust.
14074 (get_thread_process): Rename to ...
14075 (get_thread_lwp): ... this. Adjust.
14076 (get_process_thread): Rename to ...
14077 (get_lwp_thread): ... this. Adjust.
14078 (struct process_info): Rename to ...
14079 (struct lwp_info): ... this.
14080 (all_processes): Rename to ...
14081 (all_lwps): ... this.
14082 * proc-service.c (ps_lgetregs): Adjust.
14083 * thread-db.c (thread_db_create_event, find_one_thread)
14084 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14085
0b16c5cf
PA
140862009-03-14 Pedro Alves <pedro@codesourcery.com>
14087
14088 * server.c (handle_query): Handle "qAttached".
14089
32de4b9d
NS
140902009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14091
14092 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14093 GPLv3, update license URL.
14094
2aecd87f
DE
140952009-03-01 Doug Evans <dje@google.com>
14096
93efd302 14097 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14098 (server_h): Add gdb_signals.h.
14099 (signals.o): Update.
14100 * server.h (target_signal_from_host,target_signal_to_host_p)
14101 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14102
86b1f9c5
PM
141032009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14104
14105 * remote-utils.c (getpkt): Also generate remote-debug
14106 information if noack_mode is set.
14107
4aa995e1
PA
141082009-02-06 Pedro Alves <pedro@codesourcery.com>
14109
14110 * server.c (handle_query): Report qXfer:siginfo:read and
14111 qXfer:siginfo:write as supported and handle them.
14112 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14113 * linux-low.c (linux_xfer_siginfo): New.
14114 (linux_target_ops): Set it.
14115
62709adf
PA
141162009-01-26 Pedro Alves <pedro@codesourcery.com>
14117
14118 * server.c (gdbserver_usage): Mention --remote-debug.
14119 (main): Accept '--remote-debug' switch.
14120
aef93bd7
DE
141212009-01-18 Doug Evans <dje@google.com>
14122
14123 * regcache.c (new_register_cache): No need to check result of xcalloc.
14124 * server.c (handle_search_memory): Back out calls to xmalloc,
14125 result is checked and error is returned to user upon failure.
14126 (handle_query): Ditto. Add more checks for result of malloc.
14127 (handle_v_cont): Check result of malloc, report error back to
14128 user upon failure.
14129 (handle_v_run): Ditto. Call freeargv.
14130 * server.h (freeargv): Declare.
14131 * utils.c (freeargv): New fn.
14132
54363045
DE
141332009-01-15 Doug Evans <dje@google.com>
14134
f626972c
DE
14135 * gdbreplay.c (perror_with_name): Make arg const char *.
14136 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14137 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14138 * utils.c (perror_with_name): Make arg const char *.
54363045 14139
18aae699
PA
141402009-01-14 Pedro Alves <pedro@codesourcery.com>
14141
14142 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14143 when handling a EXIT_PROCESS_DEBUG_EVENT.
14144
ff703abe
JB
141452009-01-06 Joel Brobecker <brobecker@adacore.com>
14146
14147 * gdbreplay.c (gdbreplay_version): Update copyright year.
14148 * server.c (gdbserver_version): Likewise.
14149
f21cc1a2 141502009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14151
14152 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14153 (handle_extended_wait): Improve comment.
0e21c1ec 14154
bca929d3
DE
141552008-12-13 Doug Evans <dje@google.com>
14156
14157 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14158 * server.h (ATTR_MALLOC): New macro.
14159 (xmalloc,xcalloc,xstrdup): Declare.
14160 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14161 * inferiors.c: Ditto.
14162 * linux-low.c: Ditto.
14163 * mem-break.c: Ditto.
14164 * regcache.c: Ditto.
14165 * remote-utils.c: Ditto.
14166 * server.c: Ditto.
14167 * target.c: Ditto.
14168 * win32-low.c: Ditto.
14169
97438e3f
DE
141702008-12-12 Doug Evans <dje@google.com>
14171
896c7fbb
DE
14172 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14173 in debugging printf.
14174
97438e3f
DE
14175 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14176
e3b886f8
DE
141772008-12-09 Doug Evans <dje@google.com>
14178
14179 * linux-low.h (struct process_info): Delete member tid, unused.
14180 * thread-db.c (find_one_thread): Update.
14181 (maybe_attach_thread): Update.
14182
07e059b5
VP
141832008-12-02 Pedro Alves <pedro@codesourcery.com>
14184
889bf7c5
PA
14185 * target.h (struct target_ops): Add qxfer_osdata member.
14186 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14187 and dirent.h.
14188 (linux_qxfer_osdata): New functions.
14189 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14190 callback.
14191 * server.c (handle_query): Handle "qXfer:osdata:read:".
14192 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14193 (buffer_xml_printf): New functions.
14194 * server.h (struct buffer): New.
14195 (buffer_grow_str, buffer_grow_str0): New macros.
14196 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14197 (buffer_xml_printf): Declare.
07e059b5 14198
4cab47ab
DE
141992008-11-24 Doug Evans <dje@google.com>
14200
14201 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14202
f142445f
DJ
142032008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14204
14205 * server.c (handle_v_run): Always use the supplied argument list.
14206
d0107bb6 142072008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14208
d0107bb6
BW
14209 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14210 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14211
2c4ad781
TJB
142122008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14213
14214 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14215 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14216 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14217 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14218 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14219 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14220 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14221 XML target descriptions.
14222 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14223 when inferior is running on an ISA 2.05 or later processor. Add
14224 special case to return offset for full 64-bit slot of FPSCR when
14225 in 32-bits.
14226
dfb64f85
DJ
142272008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14228
14229 * Makefile.in (SFILES, clean): Added sparc64 files.
14230 (reg-sparc64.o, reg-sparc64.c): New.
14231 * configure.srv (sparc*-*-linux*): New configuration.
14232 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14233 syscall arguments for SPARC.
14234 (regsets_store_inferior_registers): Likewise.
14235 * linux-sparc-low.c: New file.
14236
66b6e1dd
DE
142372008-10-21 Doug Evans <dje@google.com>
14238
14239 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14240 (READLINE_DIR,READLINE_DEP): Delete.
14241 (INTERNAL_CFLAGS): Update.
14242 (LINTFLAGS): Update.
14243
9b710a42
PA
142442008-10-10 Pedro Alves <pedro@codesourcery.com>
14245
14246 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14247 whole argv from the last run, not just argv[0].
14248
5822d809
PA
142492008-09-08 Pedro Alves <pedro@codesourcery.com>
14250
14251 * regcache.c (new_register_cache): Return NULL if the register
14252 cache size isn't known yet.
14253 (free_register_cache): Avoid dereferencing a NULL regcache.
14254
74aac56f
DJ
142552008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14256
14257 * configure.srv: Merge MIPS and MIPS64.
14258
400b20f5
MR
142592008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14260
14261 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14262
677c5bb1
LM
142632008-08-18 Luis Machado <luisgpm@br.ibm.com>
14264
14265 * Makefile.in: Add required vsx dependencies.
14266
14267 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14268 Declare init_registers_powerpc_vsx32l.
14269 Declare init_registers_powerpc_vsx64l.
14270 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14271 (ppc_arch_setup): Check for VSX in hwcap.
14272 (ppc_fill_vsxregset): New function.
14273 (ppc_store_vsxregset): New function.
14274 Add new VSX entry in regset_info target_regsets.
14275
14276 * configure.srv: Add new VSX dependencies.
14277
a6f3e723
SL
142782008-08-12 Pedro Alves <pedro@codesourcery.com>
14279
14280 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14281 (remote_open): Set or clear transport_is_reliable.
14282 (putpkt_binary): Don't expect acks in noack mode.
14283 (getpkt): Don't send ack/nac in noack mode.
14284 * server.c (handle_general_set): Handle QStartNoAckMode.
14285 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14286 qSupported.
14287 (main): Reset noack_mode on every connection.
14288 * server.h (noack_mode): Declare.
14289
a417dc56
RW
142902008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14291
14292 * Makefile.in (GDBREPLAY_OBS): New variable.
14293 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14294
3221518c
UW
142952008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14296 Daniel Jacobowitz <dan@codesourcery.com>
14297
14298 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14299 (usr_store_inferior_registers): Likewise.
14300 (regsets_store_inferior_registers): Likewise.
14301
ec56be1b
PA
143022008-07-31 Rolf Jansen <rj@surtec.com>
14303 Pedro Alves <pedro@codesourcery.com>
14304
14305 * configure.ac: Check for memmem declaration.
14306 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14307 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14308 (disable_packet_qfThreadInfo): Unconditionally compile.
14309 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14310 * configure, config.in: Regenerate.
14311
2fe5e3ff
DE
143122008-07-28 Doug Kwan <dougkwan@google.com>
14313
14314 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14315 (linux_write_memory): Remove declaration of errno.
14316
836acd6d
UW
143172008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14318
14319 * linux-low.c (handle_extended_wait): Do not use "status"
14320 variable uninitialized.
14321
aeba519e
PA
143222008-07-07 Pedro Alves <pedro@codesourcery.com>
14323
14324 * server.c (handle_v_attach): Inhibit reporting dll changes.
14325
db42f210
PA
143262008-06-27 Pedro Alves <pedro@codesourcery.com>
14327
14328 * remote-utils.c (prepare_resume_reply): If requested, don't
14329 output "thread:TID" in the T stop reply.
14330
14331 * server.c (disable_packet_vCont, disable_packet_Tthread)
14332 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14333 (handle_query): If requested, disable support for qC, qfThreadInfo
14334 and qsThreadInfo.
14335 (handle_v_requests): If requested, disable support for vCont.
14336 (gdbserver_show_disableable): New.
14337 (main): Handle --disable-packet and --disable-packet=LIST.
14338
14339 * server.h (disable_packet_vCont, disable_packet_Tthread)
14340 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14341
8e4c5421
CD
143422008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14343
14344 * server.c (gdbserver_usage): Mention --version.
14345
6e23a804
DJ
143462008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14347
14348 * Makefile.in (gdbreplay.o): New rule.
14349
90aa6a40
JM
143502008-06-06 Joseph Myers <joseph@codesourcery.com>
14351
14352 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14353 message, not gdbserver.
14354
c16158bc 143552008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14356 Nathan Sidwell <nathan@codesourcery.com>
14357 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14358
14359 * acinclude.m4: Include ../../config/acx.m4.
14360 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14361 * configure, config.in: Regenerate.
14362 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14363 * server.c (gdbserver_version): Print PKGVERSION.
14364 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14365 (main): Adjust gdbserver_usage calls.
14366 * gdbreplay.c (version, host_name): Add declarations.
14367 (gdbreplay_version, gdbreplay_usage): New.
14368 (main): Accept --version and --help options.
14369
aeb75bf5
DJ
143702008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14371
14372 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14373 (arm_breakpoint_at): Handle Thumb.
14374 (the_low_target): Add comment.
14375
76b233dd
UW
143762008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14379
08388c79
DE
143802008-05-09 Doug Evans <dje@google.com>
14381
a3c83fae
DE
14382 * server.h (decode_search_memory_packet): Declare.
14383 * remote-utils.c (decode_search_memory_packet): New fn.
14384 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14385 (handle_search_memory): New fn.
14386 (handle_query): Process qSearch:memory packets.
14387
bb9c3d36
UW
143882008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14389
14390 * regcache.c (registers_length): Remove.
14391 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14392 full register packet.
14393 * regcache.h (registers_length): Remove prototype.
14394 * server.h (PBUFSIZ): Define to 16384.
14395
7284e1be
UW
143962008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14397
14398 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14399 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14400 powerpc-64l.o, and powerpc-altivec64l.o.
14401 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14402 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14403 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14404 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14405 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14406 to srv_xmlfiles.
14407
14408 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14409 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14410 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14411 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14412 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14413 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14414 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14415 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14416 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14417 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14418 (clean): Update.
14419
14420 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14421 (init_registers_powerpc_32l): ... this new prototype.
14422 (init_registers_powerpc_32): Remove, replace by ...
14423 (init_registers_powerpc_altivec32l): ... this new prototype.
14424 (init_registers_powerpc_e500): Remove, replace by ...
14425 (init_registers_powerpc_e500l): ... this new prototype.
14426 (init_registers_ppc64): Remove, replace by ...
14427 (init_registers_powerpc_64l): ... this new prototype.
14428 (init_registers_powerpc_64): Remove, replace by ...
14429 (init_registers_powerpc_altivec64l): ... this new prototype.
14430 (ppc_num_regs): Set to 73.
14431 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14432 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14433 (ppc_cannot_store_register): Handle orig_r3 and trap.
14434 (ppc_arch_setup): Update init_registers_... calls.
14435 (ppc_fill_gregset): Handle orig_r3 and trap.
14436
14437 * inferiors.c (clear_inferiors): Reset current_inferior.
14438
fdc59709
PB
144392008-04-23 Paolo Bonzini <bonzini@gnu.org>
14440
889bf7c5
PA
14441 * acinclude.m4: Add override.m4.
14442 * configure: Regenerate.
fdc59709 14443
c9b2f845
UW
144442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14445
14446 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14447 initial call to init_register_ppc64.
14448
550512b8
UW
144492008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14450
43aaf8b6
PA
14451 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14452 single powerpc*-*-linux* case.
550512b8
UW
14453 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14454
b6430ec3
UW
144552008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14456
14457 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14458 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14459 from reg_xmlfiles.
14460 * linux-ppc-low.c: Include <elf.h>.
14461 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14462 (ppc_hwcap): New global variable.
14463 (ppc_regmap): Remove __SPE__ #ifdef sections.
14464 (ppc_regmap_e500): New global variable.
14465 (ppc_cannot_store_register): Update __SPE__ special case.
14466 (ppc_get_hwcap): New function.
14467 (ppc_arch_setup): Use it to determine whether inferior supports
14468 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14469 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14470 Do not access registers if target does not support AltiVec.
14471 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14472 Do not access registers if target does not support SPE.
14473 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14474
52fa2412
UW
144752008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-low.c (disabled_regsets, num_regsets): New.
14478 (use_regsets_p): Delete.
14479 (linux_wait_for_process): Clear disabled_regsets.
14480 (regsets_fetch_inferior_registers): Check and set it.
14481 (regsets_store_inferior_registers): Likewise.
14482 (linux_fetch_registers, linux_store_registers): Do not use
14483 use_regsets_p.
14484 (initialize_low): Allocate disabled_regsets.
14485
e28b3332
DJ
144862008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * Makefile.in (LIBOBJS): New.
14489 (OBS): Use LIBOBJS.
14490 (memmem.o): New rule.
14491 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14492 * configure: Regenerated.
14493
4536995d
UW
144942008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14495
14496 * server.c (handle_query): Never return "unsupported" for
14497 qXfer:features:read queries.
14498
221c031f
UW
144992008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14500
14501 * server.c (get_features_xml): Fix inverted condition.
14502 (handle_query): Always support qXfer:feature:read.
14503
ccd213ac
DJ
145042008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * server.c (wrapper_argv): New.
14507 (start_inferior): Handle wrapper_argv. If set, expect an extra
14508 trap.
14509 (gdbserver_usage): Document --wrapper.
14510 (main): Parse --wrapper.
14511
6fe305f7
UW
145122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14513
14514 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14515 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14516 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14517 (ppc_set_pc): Likewise.
14518 (ppc_arch_setup): New function.
14519 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14520 of collect_register.
889bf7c5 14521 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14522
5b0a002e
UW
145232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14524
14525 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14526 instead of linux-ppc64-low.o.
14527 * linux-ppc64-low.c: Remove file.
14528 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14529 (linux-ppc64-low.o): Remove rule.
14530
14531 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14532 (init_registers_powerpc_64): Likewise.
14533 (ppc_regmap): Conditionally define depending on __powerpc64__.
14534 (ppc_cannot_store_register): Do not special-case "fpscr" when
14535 compiled on __powerpc64__.
14536 (ppc_collect_ptrace_register): New function.
14537 (ppc_supply_ptrace_register): New function.
14538 (ppc_breakpoint): Change type to "unsigned int".
14539 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14540 (the_low_target): Conditionally provide initializers for the
889bf7c5 14541 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14542 collect_ptrace_register and supply_ptrace_register members.
14543
9b4b61c8
UW
145442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14545
14546 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14547 * server.c (gdbserver_xmltarget): Define.
14548 (get_features_xml): Use it to replace "target.xml" and arch_string.
14549
14550 * configure.srv: Remove srv_xmltarget. Add XML files that were
14551 mentioned there to srv_xmlfiles instead. Remove conditional tests
14552 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14553 srv_xmlfiles and srv_regobj to include all possible choices.
14554 * configure.ac (srv_xmltarget): Remove.
14555 (srv_xmlfiles): Do not add "target.xml".
14556 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14557 checks for supplementary target information.
14558 * configure: Regenerate.
14559 * Makefile.in (XML_TARGET): Remove.
14560 (target.xml): Remove rule.
14561 (clean): Do not clean up target.xml.
14562 (.PRECIOUS): Do not mention target.xml.
14563
14564 * target.h (struct target_ops): Remove arch_string member.
14565 * linux-low.c (linux_arch_string): Remove.
14566 (linux_target_ops): Remove arch_string initializer.
14567 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14568 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14569 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14570 * spu-low.c (spu_arch_string): Remove.
14571 (spu_target_ops): Remove arch_string initializer.
14572 * win32-low.c (win32_arch_string): Remove.
14573 (win32_target_ops): Remove arch_string initializer.
14574 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14575 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14576 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14577
ee1a7ae4
UW
145782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14579
14580 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14581 by collect_ptrace_register and supply_ptrace_register hooks.
14582 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14583 instead of checking for the_low_target.left_pad_xfer.
14584 (usr_store_inferior_registers): Use collect_ptrace_register callback
14585 instead of checking for the_low_target.left_pad_xfer.
14586
14587 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14588 (s390_supply_ptrace_register): Likewise.
14589 (s390_fill_gregset): Call s390_collect_ptrace_register.
14590 (the_low_target): Update.
14591
14592 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14593 (ppc_supply_ptrace_register): Likewise.
14594 (the_low_target): Update.
14595
14596 * linux-i386-low.c (the_low_target): Update.
14597 * linux-x86-64-low.c (the_low_target): Update.
14598
d61ddec4
UW
145992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14600
14601 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14602 reg-s390.o and reg-s390x.o.
14603
14604 * linux-low.c (new_inferior): New global variable.
14605 (linux_create_inferior, linux_attach): Set it.
14606 (linux_wait_for_process): Call the_low_target.arch_setup after the
14607 target has stopped for the first time.
14608 (initialize_low): Do not call the_low_target.arch_setup.
14609
14610 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14611 (s390_set_pc): Likewise.
14612 (s390_arch_setup): New function.
14613 (the_low_target): Use s390_arch_setup as arch_setup routine.
14614
14615 * regcache.c (realloc_register_cache): New function.
14616 (set_register_cache): Call it for each existing regcache.
14617
d05b4ac3
UW
146182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14619
14620 * server.h (init_registers): Remove prototype.
14621
14622 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14623 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14624 instead of init_registers ().
14625 * linux-arm-low.c (init_registers_arm): Add prototype.
14626 (init_registers_arm_with_iwmmxt): Likewise.
14627 (the_low_target): Add initializer for arch_setup field.
14628 * linux-cris-low.c (init_registers_cris): Add prototype.
14629 (the_low_target): Add initializer for arch_setup field.
14630 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14631 (the_low_target): Add initializer for arch_setup field.
14632 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14633 (the_low_target): Add initializer for arch_setup field.
14634 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14635 (the_low_target): Add initializer for arch_setup field.
14636 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14637 (the_low_target): Add initializer for arch_setup field.
14638 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14639 (the_low_target): Add initializer for arch_setup field.
14640 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14641 (init_registers_mips64_linux): Likewise.
14642 (the_low_target): Add initializer for arch_setup field.
14643 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14644 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14645 (the_low_target): Add initializer for arch_setup field.
14646 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14647 (init_registers_powerpc_64): Likewise.
14648 (the_low_target): Add initializer for arch_setup field.
14649 * linux-s390-low.c (init_registers_s390): Add prototype.
14650 (init_registers_s390x): Likewise.
14651 (the_low_target): Add initializer for arch_setup field.
14652 * linux-sh-low.c (init_registers_sh): Add prototype.
14653 (the_low_target): Add initializer for arch_setup field.
14654 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14655 (the_low_target): Add initializer for arch_setup field.
14656 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14657 (the_low_target): Add initializer for arch_setup field.
14658
14659 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14660 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14661 instead of init_registers ().
14662 * win32-arm-low.c (init_registers_arm): Add prototype.
14663 (the_low_target): Add initializer for arch_setup field.
14664 * win32-i386-low.c (init_registers_i386): Add prototype.
14665 (the_low_target): Add initializer for arch_setup field.
14666
14667 * spu-low.c (init_registers_spu): Add prototype.
14668 (initialize_low): Call initialie_registers_spu () instead of
14669 initialize_registers ().
14670
fd96d250
PA
146712008-02-19 Pedro Alves <pedro@codesourcery.com>
14672
14673 * server.c (handle_v_requests): When handling the vRun and vAttach
14674 packets, if already debugging a process, don't kill it. Return an
14675 error instead.
14676
d41b6bb4
DJ
146772008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * server.c (handle_query): Correct length check.
14680
5ac588cf
PA
146812008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14682
14683 * win32-low.c (do_initial_child_stuff): Add process handle
14684 parameter. Set current_process_handle and current_process_id from the
14685 parameters. Clear globals.
14686 (win32_create_inferior): Don't set current_process_handle and
14687 current_process_id here. Instead pass them on the call to
14688 do_initial_child_stuff.
14689 (win32_attach): Likewise.
14690 (win32_clear_inferiors): New.
14691 (win32_kill): Don't close the current process handle or the
14692 current thread handle here. Instead call win32_clear_inferiors.
14693 (win32_detach): Don't open a new handle to the process. Call
14694 win32_clear_inferiors.
14695 (win32_join): Don't rely on current_process_handle; open a new
14696 handle using the process id.
14697 (win32_wait): Call win32_clear_inferiors when the inferior process
14698 has exited.
14699
ecd7ecbc
DJ
147002008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * server.c (monitor_show_help): Add "exit".
14703
1525d545
MG
147042008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14705
ecd7ecbc 14706 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14707 (clean): Add reg-xtensa.c.
14708 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14709 * configure.srv (xtensa*-*-linux*) New target.
14710 * linux-xtensa-low.c: New.
14711 * xtensa-xtregs.c: New.
1525d545 14712
59a016f0
PA
147132008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14714
14715 * hostio.c: Don't include errno.h.
14716 (errno_to_fileio_errno): Move to hostio-errno.
14717 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14718 error number outputting to the target->hostio_last_error callback.
14719 (hostio_packet_error): Use FILEIO_EINVAL directly.
14720 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14721 calls to hostio_error.
14722 * hostio-errno.c: New.
14723 * server.h (hostio_last_error_from_errno): Declare.
14724 * target.h (target_ops): Add hostio_last_error member.
14725 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14726 as hostio_last_error handler.
889bf7c5 14727 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14728 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14729 (wince_hostio_last_error): New functions.
14730 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14731 as hostio_last_error handler.
14732 (win32_target_ops) [!_WIN32_WCE]: Register
14733 hostio_last_error_from_errno as hostio_last_error handler.
14734 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14735 (hostio-errno.o): New rule.
14736 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14737 * configure.srv (srv_hostio_err_objs): New variable. Default to
14738 hostio-errno.o.
14739 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14740 * configure: Regenerate.
14741
2d717e4f
DJ
147422008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14743
14744 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14745 (linux_kill, linux_detach): Clean up the process list.
14746 * remote-utils.c (remote_open): Improve port number parsing.
14747 (putpkt_binary, input_interrupt): Only send interrupts if the target
14748 is running.
14749 * server.c (extended_protocol): Make static.
14750 (attached): Define earlier.
14751 (exit_requested, response_needed, program_argv): New variables.
14752 (target_running): New.
14753 (start_inferior): Clear attached here.
14754 (attach_inferior): Set attached here.
14755 (require_running): Define.
14756 (handle_query): Use require_running and target_running. Implement
14757 "monitor exit".
14758 (handle_v_attach, handle_v_run): New.
14759 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14760 (gdbserver_usage): Update.
14761 (main): Redo argument parsing. Handle --debug and --multi. Handle
14762 --attach along with other options or after the port. Save
14763 program_argv. Support no initial program. Resynchronize
14764 communication with GDB after an error. Handle "monitor exit".
14765 Use require_running and target_running. Always allow the extended
14766 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14767 restart in extended mode.
14768 * README: Refer to the GDB manual. Update --attach usage.
14769
7407e2de
AS
147702007-12-20 Andreas Schwab <schwab@suse.de>
14771
14772 * linux-low.c (STACK_SIZE): Define.
14773 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14774 (linux_test_for_tracefork): Likewise.
14775
b65d95c5
DJ
147762007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14777
14778 * linux-low.c (linux_wait_for_event): Update messages. Do not
14779 reinsert auto-delete breakpoints.
14780 * mem-break.c (struct breakpoint): Change return type of handler to
14781 int.
14782 (set_breakpoint_at): Update handler type.
14783 (reinsert_breakpoint_handler): Return 1 instead of calling
14784 delete_breakpoint.
14785 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14786 setting a new one.
14787 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14788 * mem-break.h (set_breakpoint_at): Update handler type.
14789 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14790 * win32-low.c (auto_delete_breakpoint): New.
14791 (get_child_debug_event): Use it.
14792
4e799345
DJ
147932007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14794
14795 * configure.ac: Check for pread and pwrite.
14796 * hostio.c (handle_pread): Fall back to lseek and read.
14797 (handle_pwrite): Fall back to lseek and write.
14798 * config.in, configure: Regenerated.
14799
27524b67
DJ
148002007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * server.c (myresume): Add own_buf argument.
14803 (main): Update calls.
14804
a20d5e98
DJ
148052007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14806
14807 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14808 * remote-utils.c (remote_open): Do not call disable_async_io.
14809 (block_async_io): Delete.
14810 (unblock_async_io): Make static.
14811 (initialize_async_io): New.
14812 * server.c (handle_v_cont): Handle async I/O here.
14813 (myresume): Likewise. Move other common resume tasks here...
14814 (main): ... from here. Call initialize_async_io. Disable async
14815 I/O before the main loop.
14816 * server.h (initialize_async_io): Declare.
14817 (block_async_io, unblock_async_io): Delete prototypes.
14818 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14819
b79d787e
DJ
148202007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14821
14822 * remote-utils.c (readchar): Allow binary data in received messages.
14823
d97903b2
PA
148242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14825
14826 * win32-low.c (attaching): New global.
14827 (win32_create_inferior): Clear the `attaching' global.
14828 (win32_attach): Set the `attaching' global.
14829 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14830 attaching. Only set a breakpoint at the entry point if not
14831 attaching.
14832
311de423
PA
148332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14834
14835 * server.c (main): Don't report dll events on the initial
14836 connection on attaches.
14837
6c2d16d2
PA
148382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14839
14840 * server.c (main): Relax numerical bases supported for the pid of
14841 the --attach command line argument.
14842
5ca906e6
PA
148432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14844
14845 * win32-low.c (win32_attach): Call OpenProcess before
14846 DebugActiveProcess, not after. Add last error output to error
14847 call.
14848
9c6c8194
PA
148492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14850
14851 * win32-low.c (win32_get_thread_context)
14852 (win32_set_thread_context): New functions.
14853 (thread_rec): Use win32_get_thread_context.
14854 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14855 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14856 field.
14857
4d5d1aaa
PA
148582007-12-03 Leo Zayas
14859 Pedro Alves <pedro_alves@portugalmail.pt>
14860
14861 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14862 global variables.
14863 (child_add_thread): Minor cleanup.
14864 (child_continue): Resume artificially suspended threads before
14865 calling ContinueDebugEvent.
14866 (suspend_one_thread): New.
14867 (fake_breakpoint_event): New.
14868 (get_child_debug_event): Change return type to int. Check here if
14869 gdb sent an interrupt request. If a soft interrupt was requested,
14870 fake a breakpoint event. Return 0 if there is no event to handle,
14871 and 1 otherwise.
14872 (win32_wait): Don't check here if gdb sent an interrupt request.
14873 Ensure there is a valid event to handle.
14874 (win32_request_interrupt): Add soft interruption method as last
14875 resort.
14876
c436e841
PA
148772007-12-03 Leo Zayas
14878 Pedro Alves <pedro_alves@portugalmail.pt>
14879
14880 * win32-low.h (win32_thread_info): Add descriptions to the
14881 structure members. Replace `suspend_count' counter by a
14882 `suspended' flag.
14883 * win32-low.c (thread_rec): Update condition of when to get the
14884 context from the inferior. Rely on ContextFlags being set if it
14885 has already been retrieved. Only suspend the inferior thread if
14886 we haven't already. Warn if that fails.
14887 (continue_one_thread): s/suspend_count/suspended/. Only call
14888 ResumeThread once. Warn if that fails.
14889
e7b5fa67
PA
148902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14891
14892 * win32-low.c (win32_wait): Don't read from the inferior when it
14893 has already exited.
14894
a385171d
PA
148952007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14896
14897 * Makefile.in (win32_low_h): New variable.
14898 (win32-low.o): Add dependency on $(win32_low_h).
14899 (win32-arm-low.o, win32-i386-low.o): New rules.
14900
f80c84b3
DJ
149012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * hostio.c: Correct copyright year.
14904
a6b151f1
DJ
149052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * Makefile.in (OBS): Add hostio.o.
14908 (hostio.o): New rule.
14909 * server.h (handle_vFile): Declare.
14910 * hostio.c: New file.
14911 * server.c (handle_v_requests): Take packet_len and new_packet_len
14912 for binary packets. Call handle_vFile.
14913 (main): Update call to handle_v_requests.
14914
f9387fc3
DJ
149152007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14916
14917 * linux-low.c: Include <sched.h>.
14918
51c2684e
DJ
149192007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14920
14921 * linux-low.c (linux_tracefork_grandchild): New.
14922 (linux_tracefork_child): Use clone.
14923 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14924
75f83163
JB
149252007-10-31 Joel Brobecker <brobecker@adacore.com>
14926
14927 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14928
da5898ce
DJ
149292007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14932
24a09b5f
DJ
149332007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14934
14935 * inferiors.c (change_inferior_id): Delete.
14936 (add_pid_to_list, pull_pid_from_list): New.
14937 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14938 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14939 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14940 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14941 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14942 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14943 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14944 (using_threads): Always set to 1.
14945 (handle_extended_wait): New.
14946 (add_process): Do not set TID.
14947 (linux_create_inferior): Set must_set_ptrace_flags.
14948 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14949 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14950 (linux_thread_alive): Rename TID argument to LWPID.
14951 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14952 (linux_wait_for_event): Do not use TID or check using_threads. Update
14953 call to dead_thread_notify. Call handle_extended_wait.
14954 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14955 (send_sigstop): Delete sigstop_sent.
14956 (wait_for_sigstop): Avoid TID.
14957 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14958 (linux_test_for_tracefork): New.
14959 (linux_lookup_signals): Use thread_db_active and
14960 linux_supports_tracefork_flag.
14961 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14962 * linux-low.h (get_process_thread): Avoid TID.
14963 (struct process_ifo): Move thread_known and tid to the end. Remove
14964 sigstop_sent.
14965 (linux_attach_lwp, thread_db_init): Update prototypes.
14966 * server.h (change_inferior_id): Delete prototype.
14967 (add_pid_to_list, pull_pid_from_list): New prototypes.
14968 * thread-db.c (thread_db_use_events): New.
14969 (find_first_thread): Rename to...
14970 (find_one_thread): ...this. Update callers and messages. Do not
14971 call fatal. Check thread_db_use_events. Do not call
14972 change_inferior_id or new_thread_notify.
14973 (maybe_attach_thread): Update. Do not call new_thread_notify.
14974 (thread_db_init): Set thread_db_use_events. Check use_events.
14975 * utils.c (fatal, warning): Correct message prefix.
14976
30ed0a8f
DJ
149772007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * Makefile.in (clean): Remove new files.
14980 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14981 (powerpc-64.o, powerpc-64.c): New rules.
14982 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14983 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14984 with SPE.
14985 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14986 SPE targets.
14987 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14988 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14989 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14990 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14991 (target_regsets): Add AltiVec and SPE register sets.
14992 * configure.ac: Check for AltiVec and SPE.
14993 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14994 (ppc_fill_vrregset, ppc_store_vrregset): New.
14995 (target_regsets): Add AltiVec register set.
14996 * configure: Regenerated.
14997
fd462a61
DJ
149982007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14999
15000 * linux-low.c (O_LARGEFILE): Define.
15001 (linux_read_memory): Use /proc/PID/mem.
15002 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15003 * configure, config.in: Regenerated.
15004
69f223ed
DJ
150052007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15006
15007 * linux-low.c (linux_wait_for_event): Do not pass signals while
15008 single-stepping.
15009
aec18585
PA
150102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15011
15012 * win32-low.c (create_process): New.
15013 (win32_create_inferior): Use create_process instead of
15014 CreateProcess. If create_process failed retry appending an ".exe"
15015 suffix. Store the GetLastError result immediatelly after
15016 create_process calls and use it on the call to error.
15017
34d86ddd
PA
150182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15019
15020 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15021
5a0e3bd0
JB
150222007-08-23 Joel Brobecker <brobecker@adacore.com>
15023
15024 * configure.ac: Switch license to GPLv3.
15025
f88c79e6
MS
150262007-08-01 Michael Snyder <msnyder@access-company.com>
15027
15028 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15029
6b3d9b83
PA
150302007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15031
15032 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15033 typedef.
15034 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15035 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15036 CloseToolhelp32Snapshot.
15037 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15038 CloseToolhelp32Snapshot.
15039
c588c53c
MS
150402007-07-27 Michael Snyder <michael.snyder@access-company.com>
15041
15042 * server.c (main): Check for inferior exit before main loop.
15043
aa0403d9
PA
150442007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15045
15046 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15047 instead of on tmp_desc.
15048
255e7678
DJ
150492007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15050 Daniel Jacobowitz <dan@codesourcery.com>
15051
15052 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15053 (add_thread): Minor cleanups.
15054 (clear_inferiors): Move lower in the file. Clear the DLL
15055 list.
15056 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15057 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15058 (xml_escape_text): New.
15059 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15060 for qSupported.
15061 (handle_v_cont): Report errors.
15062 (gdbserver_version): Update.
15063 (main): Correct size of own_buf. Do not report initial DLL events.
15064 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15065 (unloaded_dll, xml_escape_text): New.
15066 * win32-low.c (enum target_waitkind): Update comments.
15067 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15068 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15069 (win32_EnumProcessModules, win32_GetModuleInformation)
15070 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15071 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15072 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15073 (win32_Module32First, win32_Module32Next, load_toolhelp)
15074 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15075 (get_child_debug_event): Handle DLL events.
15076 (win32_wait): Likewise.
15077
0d37add9
DJ
150782007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15079
15080 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15081 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15082
45e2715e
PA
150832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15084
15085 * win32-low.c (handle_output_debug_string): Ignore event if not
15086 waiting.
15087
c5674cf1
PA
150882007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15089
15090 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15091
2bbe3cc1
DJ
150922007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15095
ae13219e
DJ
150962007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15097
15098 * inferiors.c (change_inferior_id): Add comment.
15099 * linux-low.c (check_removed_breakpoint): Add an early
15100 prototype. Improve debug output.
15101 (linux_attach): Doc update.
15102 (linux_detach_one_process, linux_detach): Clean up before releasing
15103 each process.
15104 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15105 * linux-low.h (struct process_info): Doc improvement.
15106 * mem-break.c (delete_all_breakpoints): New.
15107 * mem-break.h (delete_all_breakpoints): New prototype.
15108 * thread-db.c (find_first_thread): New.
15109 (thread_db_create_event): Call it instead of
15110 thread_db_find_new_threads. Clean up unused variables.
15111 (maybe_attach_thread): Remove first thread handling.
15112 (thread_db_find_new_threads): Use find_first_thread.
15113 (thread_db_get_tls_address): Likewise.
15114
4105de34
DJ
151152007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * thread-db.c (thread_db_find_new_threads): Add prototype.
15118 (thread_db_create_event): Check for the main thread before adding
15119 a new thread.
15120 (maybe_attach_thread): Only enable event reporting if TID == 0.
15121 (thread_db_get_tls_address): Check for new threads.
15122
2b876972
DJ
151232007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15124
15125 * linux-low.c (linux_create_inferior): Try execv before execvp.
15126 * spu-low.c (spu_create_inferior): Likewise.
15127
7a245884
DJ
151282007-06-13 Mike Frysinger <vapier@gentoo.org>
15129
15130 * linux-low.c (linux_create_inferior): Change execv to execvp.
15131 * spu-low.c (spu_create_inferior): Likewies.
15132
117ce543
DJ
151332007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * Makefile.in (clean): Clean new files instead of deleted ones.
15136 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15137 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15138 rules.
15139 * configure.srv: Specify XML files and new regformats for MIPS and
15140 MIPS64 GNU/Linux.
15141 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15142 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15143 an entry for the restart register.
15144 (mips_cannot_fetch_register, mips_cannot_store_register)
15145 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15146 register names to match the XML descriptions.
15147 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15148 restart register instead of $0.
15149
0e7f50da
UW
151502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15151 Markus Deuling <deuling@de.ibm.com>
15152
15153 * remote-utils.c (decode_xfer_write): New function.
15154 * server.h (decode_xfer_write): Add prototype.
15155 * server.c (handle_query): Add PACKET_LEN argument. Support
15156 qXfer:spu:read and qXfer:spu:write packets.
15157 (main): Pass packet_len to handle_query.
15158 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15159 * target.h (target_ops): Add qxfer_spu.
15160
374c1d38
UW
151612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15162
15163 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15164 accessing non-seekable spufs files.
15165
bb63802a
UW
151662007-05-16 Markus Deuling <deuling@de.ibm.com>
15167
889bf7c5 15168 * server.c (handle_query): Add reply for qC packet.
bb63802a 15169
7390519e
PA
151702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15171 Leo Zayas <lerele@champenstudios@com>
15172
15173 * server.h (check_remote_input_interrupt_request): New function.
15174 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15175 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15176 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15177 (check_remote_input_interrupt_request): New function.
15178 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15179 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15180 winapi_GenerateConsoleCtrlEvent): New typedefs.
15181 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15182 to 250 ms.
15183 (win32_wait): Check for remote interrupt request
15184 with check_remote_input_interrupt_request.
15185 (win32_request_interrupt): New function.
15186 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15187
34b34921
PA
151882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15189
15190 * win32-low.c (debug_registers_changed,
15191 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15192 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15193 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15194 (thread_rec): Get context using the low target.
15195 (child_add_thread): Call thread_added on the low target,
15196 which does the same thing.
15197 (regptr): Delete.
15198 (do_initial_child_stuff): Remove debug registers references.
15199 Set context using the low target. Resume threads after
15200 setting the contexts.
15201 (child_continue): Remove dead variable. Remove debug
15202 registers references.
15203 (child_fetch_inferior_registers): Go through the low target.
15204 (do_child_store_inferior_registers): Remove.
15205 (child_store_inferior_registers): Go through the low target.
15206 (win32_resume): Remove debug registers references.
15207 Set context using the low target.
15208 (handle_exception): Change return type to void. Don't record
15209 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15210 first chance exception.
889bf7c5 15211 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15212 goto loop. Always return after waiting for debug event.
15213 (win32_wait): Convert to switch statement. Handle spurious
15214 events.
15215
15216 * win32-i386-low.c (debug_registers_changed,
15217 debug_registers_used): New.
15218 (initial_stuff): Rename to ...
15219 (i386_initial_stuff): ... this. Clear debug registers
15220 state variables.
15221 (store_debug_registers): Delete.
15222 (i386_get_thread_context): New.
15223 (load_debug_registers): Delete.
15224 (i386_set_thread_context): New.
15225 (i386_thread_added): New.
15226 (single_step): Rename to ...
15227 (i386_single_step): ... this.
15228 (do_fetch_inferior_registers): Rename to ...
15229 (i386_fetch_inferior_register): ... this.
15230 (i386_store_inferior_register): New.
15231 (the_low_target): Adapt to new interface.
15232
15233 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15234 (arm_get_thread_context): New.
15235 (arm_set_thread_context): New.
15236 (regptr): New.
15237 (do_fetch_inferior_registers): Rename to ...
15238 (arm_fetch_inferior_register): ... this.
15239 (arm_store_inferior_register): New.
15240 (arm_wince_breakpoint): Reimplement as unsigned long.
15241 (arm_wince_breakpoint_len): Define.
15242 (the_low_target): Adapt to new interface.
15243
15244 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15245 load_debug_registers. Add get_thread_context, set_thread_context,
15246 thread_added and store_inferior_register. Rename
15247 fetch_inferior_registers to fetch_inferior_register.
15248 (regptr): Remove declaration.
15249
dd6953e1
PA
152502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15251
15252 * linux-low.c (linux_detach): Change return type to int. Return 0.
15253 * spu-low.c (spu_detach): Likewise.
15254
444d6139
PA
152552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15256
15257 * target.h (target_ops): Change return type of detach to int.
15258 Add join.
15259 (join_inferior): New.
15260 * server.c (main): Don't skip detach support on mingw32.
15261 If the inferior doesn't support detaching return error.
15262 Call join_inferior instead of using waitpid.
15263 * linux-low.c (linux_join): New.
15264 (linux_target_op): Add linux_join.
15265 * spu-low.c (spu_join): New.
15266 (spu_target_ops): Add spu_join.
15267 * win32-low.c (win32_detach): Adapt to new interface.
15268 Reopen current_process_handle before detaching. Issue a child
15269 resume before detaching.
15270 (win32_join): New.
15271 (win32_target_op): Add win32_join.
15272
1d5315fe
PA
152732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15274
15275 * win32-low.c (win32-attach): Fix return value.
15276 * target.h (target_ops): Describe ATTACH return values.
15277
bf914831
PA
152782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15279
15280 * win32-low.c (GETPROCADDRESS): Define.
15281 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15282 (winapi_DebugSetProcessKillOnExit): Likewise.
15283 (win32_create_inferior): Force usage of ansi CreateProcessA.
15284 (win32_attach): Use GETPROCADDRESS.
15285 (win32_detach): Likewise.
15286
f72f3e60
PA
152872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15288
15289 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15290
ed50f18f
PA
152912007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15292
15293 * win32-low.c: Commit leftover changes from 2007-03-29.
15294
0c2ead7e
DJ
152952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15296
15297 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15298 fields short instead of int. Add explicit padding.
15299 (i387_cache_to_fsave): Remove unnecessary casts.
15300 (i387_fsave_to_cache): Doc fix.
15301 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15302
73725ff3
DJ
153032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15304
15305 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15306 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15307
d99f33d8
PA
153082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15309
15310 * configure.srv (arm*-*-mingw32ce*): Move near the other
15311 arm targets.
15312
68070c10
PA
153132007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15314
2482afc6 15315 * configure.ac: Add errno checking.
68070c10
PA
15316 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15317 sys/file.h and malloc.h.
15318 (AC_CHECK_DECLS): Add perror.
15319 (srv_mingwce): Handle.
2482afc6 15320 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15321 win32-i386-low.o to srv_tgtobj.
15322 (i[34567]86-*-mingw*): Likewise.
15323 (arm*-*-mingw32ce*): Add case.
15324 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15325 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15326 [__MINGW32CE__] (strerror): New function.
15327 [__MINGW32CE__] (errno): Define to GetLastError.
15328 [__MINGW32CE__] (COUNTOF): New macro.
15329 (remote_open): Remove extra close call.
15330 * mem-break.c (delete_breakpoint_at): New function.
15331 * mem-break.h (delete_breakpoint_at): Declare.
15332 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15333 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15334 [USE_WIN32API] (read, write): Add char* casts.
15335 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15336 * server.h: Include wincecompat.h on Windows CE.
15337 [HAVE_ERRNO_H]: Check.
15338 (perror): Declare if not declared.
15339 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15340 (perror_with_name): Remove errno declaration.
15341 * wincecompat.h: New.
15342 * wincecompat.c: New.
15343 * win32-low.h: New.
15344 * win32-arm-low.c: New.
15345 * win32-i386-low.c: New.
15346 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15347 (OUTMSG2): Make it safe.
15348 (_T): New macro.
15349 (COUNTOF): New macro.
15350 (NUM_REGS): Get it from the low target.
15351 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15352 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15353 (thread_rec): Let low target handle debug registers.
15354 (child_add_thread): Likewise.
15355 (child_init_thread_list): Likewise.
15356 (continue_one_thread): Likewise.
15357 (regptr): New.
15358 (do_child_fetch_inferior_registers): Move to ...
15359 * win32-i386-low.c: ... here, and rename to ...
15360 (do_fetch_inferior_registers): ... this.
889bf7c5 15361 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15362 Go through the low target.
15363 (do_child_store_inferior_registers): Use regptr.
15364 (strwinerror): New function.
15365 (win32_create_inferior): Handle Windows CE.
15366 Use strwinerror instead of strerror on Windows error
15367 codes. Add program to the error output.
15368 Don't close the main thread handle on Windows CE.
15369 (win32_attach): Use coredll.dll on Windows CE.
15370 (win32_kill): Close current process and current
15371 thread handles.
15372 (win32_detach): Use coredll.dll on Windows CE.
15373 (win32_resume): Let low target handle debug registers, and
15374 step request.
15375 (handle_exception): Add/Remove initial breakpoint. Avoid
15376 non-existant WSTOPSIG on Windows CE.
15377 (win32_read_inferior_memory): Cast to remove warning.
15378 (win32_arch_string): Go through the low target.
15379 (initialize_low): Call set_breakpoint_data with the low
15380 target's breakpoint.
15381 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15382 FOP_REGNUM, mappings): Move to ...
15383 * win32-i386-low.c: ... here.
15384 * win32-low.c (win32_thread_info): Move to ...
15385 * win32-low.h: ... here.
15386 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15387 win32-arm-low.c and wincecompat.c.
15388 (all:): Add $EXEEXT.
15389 (install-only:): Likewise.
15390 (gdbserver:): Likewise.
15391 (gdbreplay:): Likewise.
15392 * config.in: Regenerate.
15393 * configure: Regenerate.
15394
41093d81
PA
153952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15396
15397 * win32-low.c: Rename typedef thread_info to
15398 win32_thread_info throughout.
15399
544afa54
PA
154002007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15401
15402 * win32-i386-low.c: Rename to ...
15403 * win32-low.c: ... this.
15404 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15405 * Makefile.in: Likewise.
15406
bce7165d
PA
154072007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15408
15409 * remote-utils.c (monitor_output): Constify msg parameter.
15410 * server.h (monitor_output): Likewise.
15411 * win32-i386-low.c (handle_output_debug_string): New.
15412 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15413 handle_output_debug_string.
15414 (get_child_debug_event): Likewise.
15415
506c7aa0
DJ
154162007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15417
15418 * server.c (main): Correct strtoul check.
15419
42c81e2a
DJ
154202007-03-27 Jon Ringle <jon@ringle.org>
15421
15422 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15423
9453113a
DJ
154242007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15425
15426 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15427
64a69107
DJ
154282007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15429
15430 * terminal.h: Check HAVE_SGTTY_H.
15431
154322007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15433
15434 * remote-utils.c (remote_open): Print out the assigned port number.
15435
c74d0ad8
DJ
154362007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * remote-utils.c (monitor_output): New function.
15439 * server.c (debug_threads): Define here.
15440 (monitor_show_help): New function.
15441 (handle_query): Handle qRcmd.
15442 (main): Do not handle 'd' packet.
15443 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15444 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15445 of debug_threads.
15446
de7c3b4a
PA
154472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15448
15449 * Makefile.in (EXEEXT): New.
15450 (clean): Use $(EXEEXT).
15451
ef57601b
PA
154522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15453
15454 * target.h (target_ops): Rename send_signal to request_interrupt,
15455 and remove enum target_signal parameter.
15456 * linux-low.c (linux_request_interrupt): Rename from
15457 linux_send_signal, and always send SIGINT.
15458 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15459 and always send SIGINT.
15460 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15461 of send_signal.
15462 (input_interrupt): Likewise.
15463
820f2bda
PA
154642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15465
15466 * server.c (get_features_xml): Check if target implemented
15467 arch_string.
15468 * win32-i386-low.c (win32_arch_string): New.
15469 (win32_target_ops): Add win32_arch_string as arch_string member.
15470
ab39bf24
UW
154712007-02-22 Markus Deuling <deuling@de.ibm.com>
15472
15473 * spu-low.c (spu_arch_string): New.
15474 (spu_target_ops): Add spu_arch_string.
15475
61ff6e04
DJ
154762007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15479 * configure.ac: Do not check for terminal.h.
15480 * configure, config.in: Regenerated.
15481
fb1e4ffc
DJ
154822007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15483
15484 * Makefile.in (OBS): Add $(XML_BUILTIN).
15485 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15486 (clean): Update.
15487 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15488 (arm-with-iwmmxt.c): New.
15489 * config.in, configure: Regenerate.
15490 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15491 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15492 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15493 (arm*-*-linux*): Add iWMMXt and regset support.
15494 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15495 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15496 (arm_store_wmmxregset, target_regsets): New.
15497 * server.c (get_features_xml): Take annex argument. Check builtin
15498 XML documents.
15499 (handle_query): Handle multiple annexes.
15500
0f48aa01
DJ
155012007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * remote-utils.c [USE_WIN32API] (read, write): Define.
15504 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15505 write.
15506
23181151
DJ
155072007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15508
15509 * linux-i386-low.c (the_low_target): Set arch_string.
15510 * linux-x86-64-low.c (the_low_target): Likewise.
15511 * linux-low.c (linux_arch_string): New.
15512 (linux_target_ops): Add it.
15513 * linux-low.h (struct linux_target_ops): Add arch_string.
15514 * server.c (write_qxfer_response): Use const void * for DATA.
15515 (get_features_xml): New.
15516 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15517 * target.h (struct target_ops): Add arch_string method.
15518
9d606399
DJ
155192007-01-03 Denis Pilat <denis.pilat@st.com>
15520 Daniel Jacobowitz <dan@codesourcery.com>
15521
15522 * linux-low.c (linux_kill): Handle being called with no threads.
15523 * win32-i386-low.c (win32_kill): Likewise.
15524 (get_child_debug_event): Clear current_process_handle.
15525
155262006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15527 Daniel Jacobowitz <dan@codesourcery.com>
15528
15529 * remote-utils.c (remote_open): Check the type of specified
15530 serial port devices before opening them.
15531 * server.c (main): Kill the inferior if an error occurs during
15532 the first remote_open.
15533
a5e13d24
DJ
155342006-12-05 Markus Deuling <deuling@de.ibm.com>
15535
15536 * README: Update supported targets.
15537
186947f7
DJ
155382006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15539
15540 * Makefile.in (clean): Remove reg-mips64.c.
15541 (reg-mips64.c, reg-mips64.o): New rules.
15542 * configure.srv: Handle mips64. Include regset support for mips.
15543 * linux-mips-low.c (union mips_register): New.
15544 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15545 (mips_breakpoint, mips_breakpoint_at): Use int.
15546 (mips_collect_register, mips_supply_register)
15547 (mips_collect_register_32bit, mips_supply_register_32bit)
15548 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15549 (mips_store_fpregset, target_regsets): New.
15550 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15551
a13e2c95
UW
155522006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15553
15554 * configure.srv: Add target "spu*-*-*".
15555 * Makefile.in (clean): Remove reg-spu.c.
15556 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15557 * spu-low.c: New file.
15558
cb7283db
DJ
155592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * configure.ac: Correct td_thr_tls_get_addr test.
15562 * configure: Regenerated.
15563
89be2091
DJ
155642006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * linux-low.c (linux_wait_for_event): Reformat. Use the
15567 pass_signals array.
15568 * remote-utils.c (decode_address_to_semicolon): New.
15569 * server.c (pass_signals, handle_general_set): New.
15570 (handle_query): Mention QPassSignals for qSupported.
15571 (main): Call handle_general_set.
15572 * server.h (pass_signals, decode_address_to_semicolon): New.
15573
000ef4f0
DJ
155742006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * server.c (handle_query): Correct error handling for read_auxv.
15577
b7149293
UW
155782005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15579
15580 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15581 and srv_linux_thread_db to yes.
15582 * linux-s390-low.c (s390_fill_gregset): New function.
15583 (target_regsets): Define data structure.
15584
dae5f5cf
DJ
155852006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15588 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15589 * config.in, configure: Regenerated.
15590 * inferiors.c (gdb_id_to_thread): New function.
15591 (gdb_id_to_thread_id): Use it.
15592 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15593 * linux-low.h (struct process_info): Add th member.
15594 (thread_db_get_tls_address): New prototype.
15595 * remote-utils.c (decode_address): Make non-static.
15596 * server.c (handle_query): Handle qGetTLSAddr.
15597 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15598 * target.h (struct target_ops): Add get_tls_address.
15599 * thread-db.c (maybe_attach_thread): Save the thread handle.
15600 (thread_db_get_tls_address): New.
15601
32ca6d61
DJ
156022006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15603
15604 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15605 (linux_resume_one_process): Take a siginfo_t *. Update all
15606 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15607 (struct pending_signals): Add a siginfo_t.
15608 (linux_wait_for_process): Always set last_status.
15609 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15610 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15611 * linux-low.h (struct process_info): Add last_status.
15612
5ffff7c1
DJ
156132006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * remote-utils.c (try_rle): New function.
15616 (putpkt_binary): Use it.
15617
8695c747
DJ
156182006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15619
15620 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15621 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15622 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15623 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15624 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15625 point registers.
15626
290fadea
RS
156272006-08-08 Richard Sandiford <richard@codesourcery.com>
15628
15629 * server.c (terminal_fd): New variable.
15630 (old_foreground_pgrp): Likewise.
15631 (restore_old_foreground_pgrp): New function.
15632 (start_inferior): Record the terminal file descriptor in terminal_fd
15633 and its original foreground group in old_foreground_pgrp. Register
15634 restore_old_foreground_pgrp with atexit().
15635
9f2e1e63
DJ
156362006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15637
15638 * server.c (handle_query): Correct qPart to qXfer.
15639
b80864fb
DJ
156402006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15641
15642 * configure.ac: Check for more headers which are missing on
15643 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15644 * configure.srv: Add Cygwin and mingw32.
15645 * remote-utils.c: Don't include headers unconditionally which
15646 are missing on mingw32. Include <winsock.h> for mingw32.
15647 (remote_open): Adjust for mingw32 support. Flush
15648 standard error after writing to it.
15649 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15650 (unblock_async_io, enable_async_io, disable_async_io)
15651 (readchar, getpkt): Update for Winsock support.
15652 (prepare_resume_reply): Expect a protocol signal number.
15653 * server.c: Disable <sys/wait.h> on mingw32.
15654 (start_inferior): Adjust for mingw32 support. Flush
15655 standard error after writing to it.
15656 (attach_inferior): Likewise. Use protocol signal
15657 numbers.
15658 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15659 and names.
15660 * win32-i386-low.c: New file.
15661 * Makefile.in (XM_CLIBS): Set.
15662 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15663 (win32-i386-low.o): New dependency rule.
15664 * linux-low.c (linux_wait): Use target signal numbers.
15665 * target.h (struct target_ops): Doc fix.
15666 * server.h (target_signal_to_name): New prototype.
15667 * gdbreplay.c: Don't include headers unconditionally which
15668 are missing on mingw32. Include <winsock.h> for mingw32.
15669 (remote_close, remote_open): Adjust for Winsock support.
15670 * configure, config.in: Regenerated.
15671
0876f84a
DJ
156722006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15673
15674 * server.c (decode_xfer_read, write_qxfer_response): New.
15675 (handle_query): Take a packet length argument. Handle
15676 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15677 the qSupported response.
15678 (main): Update call to handle_query.
15679
01f9e8fa
DJ
156802006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15681
15682 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15683 (putpkt_binary): Renamed from putpkt and adjusted for binary
15684 data.
15685 (putpkt): New wrapper for putpkt_binary.
15686 (readchar): Don't mask off the high bit.
15687 (decode_X_packet): New function.
15688 * server.c (main): Call putpkt_binary if a handler sets the packet
15689 length. Save the length of the incoming packet. Handle 'X'.
15690 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15691
be2a5f71
DJ
156922006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15693
15694 * server.c (handle_query): Handle qSupported.
15695
ea025f5f
DJ
156962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15697
15698 * remote-utils.c (all_symbols_looked_up): New variable.
15699 (look_up_one_symbol): Check it.
15700 * server.h (look_up_one_symbol): New declaration.
15701 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15702
9308fc88
DJ
157032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15704
15705 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15706 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15707 (PTRACE_GET_THREAD_AREA): Define.
15708 (ps_get_thread_area): New function.
15709
52fb6437
NS
157102006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15711
15712 * configure.srv (m68k*-*-uclinux*): New target.
15713 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15714 (linux_resume_one_process): Remove extraneous cast.
15715 (linux_read_offsets): New.
15716 (linux_target_op): Add linux_read_offsets on mmuless systems.
15717 * server.c (handle_query): Add qOffsets logic.
15718 * target.h (struct target_ops): Add read_offsets.
15719
21b0f40c
DJ
157202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15721
15722 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15723 (PTRACE_GET_THREAD_AREA): Define.
15724 (ps_get_thread_area): New function.
15725 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15726 (linux-x86-64-low.o): Update.
15727
0050a760
DJ
157282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15729
15730 * configure.ac: Remove checks for prfpregset_t.
15731 * gdb_proc_service.h: New file.
15732 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15733 new "gdb_proc_service.h".
15734 * proc-service.c: Likewise.
15735 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15736 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15737 * Makefile.in (gdb_proc_service_h): Updated.
15738 * configure, config.in: Regenerated.
15739
b92a518e
DJ
157402006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15741
15742 * remote-utils.c (prepare_resume_reply): Move declaration
15743 of gdb_id_from_wait to the top of the block.
15744
545587ee
DJ
157452006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15746
15747 * linux-low.c (regsets_store_inferior_registers): Read the regset
15748 from the target before filling it.
15749
9db87ebd
DJ
157502006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * server.c (attach_inferior): Return SIGTRAP for a successful
15753 attach.
15754
dd24457d
DJ
157552006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * Makefile.in (OBS): Add version.o.
15758 (STAGESTUFF): Delete.
15759 (version.o): Add dependencies.
15760 (version.c): Replace rule.
15761 (clean): Remove version.c.
15762 * server.c (gdbserver_version): New.
15763 (gdbserver_usage): Use printf.
15764 (main): Handle --version and --help.
15765 * server.h (version, host_name): Add declarations.
15766
6f0f660e
EZ
157672005-12-23 Eli Zaretskii <eliz@gnu.org>
15768
889bf7c5
PA
15769 * linux-arm-low.c:
15770 * linux-arm-low.c:
15771 * inferiors.c:
15772 * i387-fp.h:
15773 * i387-fp.c:
15774 * gdbreplay.c:
15775 * regcache.c:
15776 * proc-service.c:
15777 * mem-break.h:
15778 * mem-break.c:
15779 * linux-x86-64-low.c:
15780 * linux-sh-low.c:
15781 * linux-s390-low.c:
15782 * linux-ppc64-low.c:
15783 * linux-ppc-low.c:
15784 * linux-mips-low.c:
15785 * linux-m68k-low.c:
15786 * linux-m32r-low.c:
15787 * linux-low.h:
15788 * linux-low.c:
15789 * linux-ia64-low.c:
15790 * linux-i386-low.c:
15791 * linux-crisv32-low.c:
15792 * thread-db.c:
15793 * terminal.h:
15794 * target.h:
15795 * target.c:
15796 * server.h:
15797 * server.c:
15798 * remote-utils.c:
15799 * regcache.h:
15800 * utils.c:
15801 * Makefile.in:
15802 * configure.ac:
6f0f660e
EZ
15803 * gdbserver.1: Add (C) after Copyright. Update the FSF
15804 address.
15805
9d1fb177
DJ
158062005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15807
15808 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15809 (arm_breakpoint_at): Recognize both breakpoints.
15810 (the_low_target): Use the correct breakpoint instruction.
15811
011a70c2
DJ
158122005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15813
15814 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15815 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15816 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15817 (the_low_target): Update.
15818
7fb85e41
AS
158192005-10-25 Andreas Schwab <schwab@suse.de>
15820
15821 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15822
15823 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15824 (ia64_num_regs): Reduce to 462.
15825
3db0444b
DJ
158262005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15827
15828 * acinclude.m4: Correct quoting.
15829 * aclocal.m4: Regenerated.
15830
15831 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15832 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15833 (thread_db_init): Call thread_db_err_str.
15834 * configure.ac: Check for TD_VERSION.
15835 * config.in, configure: Regenerated.
15836
bee0189a
DJ
158372005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15838
15839 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15840
e9d25b98
DJ
158412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15844 is not available. Define HAVE_PTRACE_GETREGS if it is.
15845 * config.in, configure: Regenerated.
15846 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15847 * linux-i386-low.c, linux-m68k-low.c: Update to use
15848 HAVE_PTRACE_GETREGS.
15849 * linux-low.c (regsets_fetch_inferior_registers)
15850 (regsets_store_inferior_registers): Only return 0 if we processed
15851 GENERAL_REGS.
15852 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15853 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15854
a06660f7
DJ
158552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * inferiors.c (struct thread_info): Add gdb_id.
15858 (add_thread): Add gdb_id argument.
15859 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15860 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15861 calls to add_thread.
15862 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15863 * server.c (handle_query): Use thread_to_gdb_id.
15864 (handle_v_cont, main): Use gdb_id_to_thread_id.
15865 * server.h (add_thread): Update prototype.
15866 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15867 prototypes.
15868
5a1f5858
DJ
158692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15872 left-padded registers.
15873 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15874 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15875
e122f1f5
SE
158762005-07-01 Steve Ellcey <sje@cup.hp.com>
15877
15878 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15879 * configure: Regenerate.
15880 * config.in: Regenerate.
15881 * server.h (NEED_DECLARATION_STRERROR):
15882 Replace with !HAVE_DECL_STRERROR.
15883
d592fa2f
DJ
158842005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15885
15886 * linux-low.c (linux_wait, linux_send_signal): Don't test
15887 an unsigned long variable for > 0 if it could be MAX_ULONG.
15888 * server.c (myresume): Likewise.
15889 * target.c (set_desired_inferior): Likewise.
15890
ccbd4912
MK
158912005-06-13 Mark Kettenis <kettenis@gnu.org>
15892
15893 * configure.ac: Simplify and improve check for socklen_t.
15894 * configure, config.in: Regenerate.
15895
f450004a
DJ
158962005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15897
15898 * acconfig.h: Remove.
15899 * configure.ac: Add a test for socklen_t. Use three-argument
15900 AC_DEFINE throughout.
15901 * config.in: Regenerated using autoheader 2.59.
15902 * configure: Regenerated.
15903
15904 * gdbreplay.c (socklen_t): Provide a default.
15905 (remote_open): Use socklen_t.
15906 * remote-utils.c (socklen_t): Provide a default.
15907 (remote_open): Use socklen_t.
15908 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15909 unsigned char.
15910
15911 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15912 char for buffers.
15913 * linux-low.c (linux_read_memory, linux_write_memory)
15914 (linux_read_auxv): Likewise.
15915 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15916 (check_mem_write): Likewise.
15917 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15918 Likewise.
15919 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15920 (registers_from_string, register_data): Likewise.
15921 * server.c (handle_query, main): Likewise.
15922 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15923 (decode_M_packet): Likewise.
15924 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15925 * target.h (struct target_ops): Update read_memory, write_memory,
15926 and read_auxv.
15927 (read_inferior_memory, write_inferior_memory): Update.
15928 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15929 to unsigned char *.
15930 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15931 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15932 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15933 linux-s390-low.c, linux-sh-low.c: Update for changes in
15934 read_inferior_memory and the_low_target->breakpoint.
15935
eee84df1
DJ
159362005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15937
15938 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15939 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15940 * configure.srv: Add powerpc64-*-linux*.
15941 * linux-ppc64-low.c: New file.
15942
45b134e5
OF
159432005-05-23 Orjan Friberg <orjanf@axis.com>
15944
15945 * linux-cris-low.c: New file with support for CRIS.
15946 * linux-crisv32-low.c: Ditto for CRISv32.
15947 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15948 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15949 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15950 reg-crisv32.o, and reg-crisv32.c to make rules.
15951 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15952 recognized targets.
15953
48d93c75
UW
159542005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15955
15956 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15957 of sizeof (PTRACE_XFER_TYPE).
15958 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15959
e013ee27
OF
159602005-05-12 Orjan Friberg <orjanf@axis.com>
15961
889bf7c5 15962 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15963 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15964 pointers for hardware watchpoint support.
15965 * linux-low.h (struct linux_target_ops): Ditto.
15966 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15967 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15968 to linux_target_ops.
15969 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15970 reply packet.
15971 * server.c (main): Recognize 'Z' and 'z' packets.
15972
b0ded00b
UW
159732005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15974
15975 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15976 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15977 (the_low_target): Add new members.
15978
8643e2ad
DJ
159792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15980
15981 * proc-service.c (ps_lgetregs): Search all_processes instead of
15982 all_threads.
15983
fc620387
DJ
159842005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * server.c (start_inferior): Change return type to int.
15987 (attach_inferior): Change sigptr to int *.
15988 (handle_v_cont, handle_v_requests): Change signal to int *.
15989 (main): Change signal to int.
15990
159912005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15992
15993 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15994 * configure.srv: Add m32r*-*-linux*.
15995 * linux-m32r-low.c: New file.
15996
e0e76420
DJ
159972005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15998
15999 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16000
a1928bad
DJ
160012005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16002
16003 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16004 Take unsigned long arguments for PIDs.
16005 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16006 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16007 (wait_for_sigstop, linux_resume_one_process)
16008 (regsets_fetch_inferior_registers, linux_send_signal)
16009 (linux_read_auxv): Likewise. Update the types of variables holding
16010 PIDs. Update format string specifiers.
16011 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16012 * remote-utils.c (prepare_resume_reply): Likewise.
16013 * server.c (cont_thread, general_thread, step_thread)
16014 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16015 unsigned long.
16016 (handle_query): Update format specifiers.
16017 (handle_v_cont, main): Use strtoul for thread IDs.
16018 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16019 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16020 (general_thread, step_thread, thread_from_wait)
16021 (old_thread_from_wait): Update.
16022 * target.h (struct thread_resume): Use unsigned long for THREAD.
16023 (struct target_ops): Use unsigned long for arguments to attach and
16024 thread_alive.
16025
dcdb98d2
DJ
160262005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * acinclude.m4: Include bfd/bfd.m4 directly.
16029 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16030 <agriffis@toolchain.org>.
16031 * aclocal.m4, configure: Regenerated.
16032
bec39cab
AC
160332005-01-07 Andrew Cagney <cagney@gnu.org>
16034
16035 * configure.ac: Rename configure.in, require autoconf 2.59.
16036 * configure: Re-generate.
16037
434c4c77
DJ
160382004-12-08 Daniel Jacobowitz <dan@debian.org>
16039
16040 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16041 LIBS when finished.
16042 * aclocal.m4: Regenerated.
16043 * configure: Regenerated.
16044
db1d3e1b
AS
160452004-11-21 Andreas Schwab <schwab@suse.de>
16046
16047 * linux-m68k-low.c (m68k_num_gregs): Define.
16048 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16049 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16050 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16051 (m68k_breakpoint_at): New. Add to the_low_target.
16052
16053 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16054 srv_linux_thread_db to yes.
16055
43360365
JB
160562004-10-20 Joel Brobecker <brobecker@gnat.com>
16057
16058 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16059 (ARCH_SET_FS): Likewise.
16060 (ARCH_GET_FS): Likewise.
16061 (ARCH_GET_GS): Likewise.
16062
fd500816
DJ
160632004-10-16 Daniel Jacobowitz <dan@debian.org>
16064
16065 * linux-i386-low.c (ps_get_thread_area): New.
16066 * linux-x86-64-low.c (ps_get_thread_area): New.
16067 * linux-low.c: Include <sys/syscall.h>.
16068 (linux_kill_one_process): Don't kill the first thread here.
16069 (linux_kill): Kill the first thread here.
16070 (kill_lwp): New function.
16071 (send_sigstop, linux_send_signal): Use it.
16072 * proc-service.c: Clean up #ifdefs.
16073 (fpregset_info): Delete.
16074 (ps_lgetregs): Update and enable implementation.
16075 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16076 implementations.
16077 * remote-utils.c (struct sym_cache, symbol_cache): New.
16078 (input_interrupt): Print a clearer message.
16079 (async_io_enabled): New variable.
16080 (enable_async_io, disable_async_io): Use it. Update comments.
16081 (look_up_one_symbol): Use the symbol cache.
16082 * thread-db.c (thread_db_look_up_symbols): New function.
16083 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16084
f6de3c42
DJ
160852004-10-16 Daniel Jacobowitz <dan@debian.org>
16086
16087 * configure.in: Test for -rdynamic.
16088 * configure: Regenerated.
16089 * Makefile (INTERNAL_LDFLAGS): New.
16090 (gdbserver, gdbreplay): Use it.
16091
2c0fc042
AC
160922004-09-02 Andrew Cagney <cagney@gnu.org>
16093
16094 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16095
075b3282
DJ
160962004-03-23 Daniel Jacobowitz <drow@mvista.com>
16097
16098 * linux-low.c (linux_wait): Clear all_processes list also.
16099
fa6a77dc
DJ
161002004-03-12 Daniel Jacobowitz <drow@mvista.com>
16101
16102 * linux-low.c: Include <errno.h>. Remove extern declaration of
16103 errno.
16104
6d782a97
DJ
161052004-03-12 Daniel Jacobowitz <drow@mvista.com>
16106
16107 * gdbreplay.c, server.h, utils.c: Update copyright years.
16108
3a7fb99b
DJ
161092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16110
16111 * server.c (main): Print child status or termination signal from
16112 variable 'signal', not 'sig'.
16113
c3e735a6
DJ
161142004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16115
16116 * linux-low.c (linux_read_memory): Change return type to
16117 int. Check for and return error from ptrace().
16118 * target.c (read_inferior_memory): Change return type to int. Pass
16119 back return status from the_target->read_memory().
16120 * target.h (struct target_ops): Adapt *read_memory() prototype.
16121 Update comment.
16122 (read_inferior_memory): Adapt prototype.
16123 * server.c (main): Return an error packet if
16124 read_inferior_memory() returns an error.
16125
a59d1c82
DJ
161262004-03-04 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16129 Unify with other clean targets.
16130
dc3f8883
DJ
161312004-02-29 Daniel Jacobowitz <drow@mvista.com>
16132
16133 * server.c (handle_v_cont): Call set_desired_inferior.
16134
89a208da
DJ
161352004-02-29 Daniel Jacobowitz <drow@mvista.com>
16136
16137 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16138
62ea82f5
DJ
161392004-02-29 Daniel Jacobowitz <drow@mvista.com>
16140
16141 * linux-low.c (linux_wait): Unblock async I/O.
16142 (linux_resume): Block and enable async I/O.
16143 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16144 * server.h (block_async_io, unblock_async_io): Add prototypes.
16145
6910d122
DJ
161462004-02-29 Daniel Jacobowitz <drow@mvista.com>
16147
16148 * remote-utils.c (remote_open): Print a status notice after
16149 opening a TCP port.
16150 * server.c (attach_inferior): Print a status notice after
16151 attaching.
16152
161532004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16154
16155 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16156
c89dc5d4
DJ
161572004-02-26 Daniel Jacobowitz <drow@mvista.com>
16158
16159 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16160 error packet.
16161 * server.c, target.h: Update copyright years.
16162
4b8dad4a
RM
161632004-02-25 Roland McGrath <roland@redhat.com>
16164
16165 * target.h (struct target_ops): New member `read_auxv'.
16166 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16167 * linux-low.c (linux_read_auxv): New function.
16168 (linux_target_ops): Initialize `read_auxv' member to that.
16169
d7446758
JB
161702004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16171
16172 Committed by Jim Blandy <jimb@redhat.com>.
16173
16174 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16175 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16176 instead of GPR_SIZE to distiguish s390 and s390x targets.
16177
5544ad89
DJ
161782004-01-31 Daniel Jacobowitz <drow@mvista.com>
16179
16180 * linux-low.c: Update copyright year.
16181 (check_removed_breakpoint): Clear pending_is_breakpoint.
16182 (linux_set_resume_request, linux_queue_one_thread)
16183 (resume_status_pending_p): New functions.
16184 (linux_continue_one_thread): Use process->resume.
16185 (linux_resume): Only resume threads if there are no pending events.
16186 * linux-low.h (struct process_info): Add resume request
16187 pointer.
16188
2a68b70e
DJ
161892004-01-30 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * regcache.c (new_register_cache): Clear the allocated register
16192 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16193
64386c31
DJ
161942003-10-13 Daniel Jacobowitz <drow@mvista.com>
16195
16196 * linux-low.c (linux_resume): Take a struct thread_resume *
16197 argument.
16198 (linux_wait): Update call.
16199 (resume_ptr): New static variable.
16200 (linux_continue_one_thread): Renamed from
16201 linux_continue_one_process. Use resume_ptr.
16202 (linux_resume): Use linux_continue_one_thread.
16203 * server.c (handle_v_cont, handle_v_requests): New functions.
16204 (myresume): New function.
16205 (main): Handle 'v' case.
16206 * target.h (struct thread_resume): New type.
16207 (struct target_ops): Change argument of "resume" to struct
16208 thread_resume *.
16209 (myresume): Delete macro.
16210
c938e9b0
L
162112003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16212
16213 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16214 (uninstall): Support DESTDIR.
16215
7f313d07
BC
16216Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16217
16218 * configure.srv: Add xscale*linux copy of arm*linux entry.
16219
3b2fc2ea
DJ
162202003-07-24 Daniel Jacobowitz <drow@mvista.com>
16221
16222 * linux-arm-low.c (arm_reinsert_addr): New function.
16223 (the_low_target): Add arm_reinsert_addr.
16224
1c0a559e
MK
162252003-07-08 Mark Kettenis <kettenis@gnu.org>
16226
16227 * mem-break.c: Remove whitespace at end of file.
16228
43d5792c
DJ
162292003-06-28 Daniel Jacobowitz <drow@mvista.com>
16230
16231 * configure.in: Check whether we need to prototype strerror.
16232 * server.h: Optionally prototype strerror.
16233 * gdbreplay.c (perror_with_name): Use strerror.
16234 * linux-low.c (linux_attach_lwp): Use strerror.
16235 * utils.c (perror_with_name): Use strerror.
16236 * config.in, configure: Regenerated.
16237
c8a86edf
DJ
162382003-06-28 Daniel Jacobowitz <drow@mvista.com>
16239
16240 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16241 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16242
73d37363
DJ
162432003-06-20 Daniel Jacobowitz <drow@mvista.com>
16244
16245 * Makefile.in (SFILES): Update.
16246 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16247 low-sun3.c: Remove files.
16248
6ad8ae5c
DJ
162492003-06-17 Daniel Jacobowitz <drow@mvista.com>
16250
16251 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16252 (linux_detach_one_process, linux_detach): New functions.
16253 (linux_target_ops): Add linux_detach.
16254 * server.c (main): Handle 'D' packet.
16255 * target.h (struct target_ops): Add "detach" member.
16256 (detach_inferior): Define.
16257
1581182a
MK
162582003-06-13 Mark Kettenis <kettenis@gnu.org>
16259
16260 From Kelley Cook <kelleycook@wideopenwest.com>:
16261 * configure.srv: Accept i[34567]86 variants.
16262
e5379b03
DJ
162632003-06-05 Daniel Jacobowitz <drow@mvista.com>
16264
16265 * linux-low.c (linux_wait_for_event): Correct comment typos.
16266 (linux_resume_one_process): Call check_removed_breakpoint.
16267 (linux_send_signal): New function.
16268 (linux_target_ops): Add linux_send_signal.
16269 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16270 of kill.
16271 * target.h (struct target_ops): Add send_signal.
16272
2ff29de4
JB
162732003-05-29 Jim Blandy <jimb@redhat.com>
16274
16275 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16276 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16277 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16278 away part of the register's value.
16279
254787d4
DJ
162802003-03-26 Daniel Jacobowitz <drow@mvista.com>
16281
16282 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16283 (linux_wait_for_event, linux_init_signals): Likewise.
16284
94e10508
DJ
162852003-03-17 Daniel Jacobowitz <drow@mvista.com>
16286
16287 * configure.in: Check for stdlib.h.
16288 * configure: Regenerated.
16289 * config.in: Regenerated.
16290
4c0711e0
DJ
162912003-01-04 Andreas Schwab <schwab@suse.de>
16292
16293 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16294
ef66e766
AC
162952003-01-02 Andrew Cagney <ac131313@redhat.com>
16296
16297 * Makefile.in: Remove obsolete code.
16298
a1358604
DJ
162992002-11-20 Daniel Jacobowitz <drow@mvista.com>
16300
16301 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16302 defined(PT_FPR0_HI).
16303
23ce3b1c
DJ
163042002-11-17 Stuart Hughes <seh@zee2.com>
16305
16306 * linux-arm-low.c (arm_num_regs): Increase.
16307 (arm_regmap): Include status register.
16308
163092002-11-17 Daniel Jacobowitz <drow@mvista.com>
16310
16311 * linux-low.c (register_addr): Remove incorrect -1 check.
16312
a9fa9f7d
DJ
163132002-08-29 Daniel Jacobowitz <drow@mvista.com>
16314
16315 * linux-low.c (linux_create_inferior): Call setpgid. Return
16316 the new PID.
16317 (unstopped_p, linux_signal_pid): Remove.
16318 (linux_target_ops): Remove linux_signal_pid.
16319 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16320 global instead of target method.
16321 * target.h (struct target_ops): Remove signal_pid. Update comment
16322 for create_inferior.
16323 * server.c (signal_pid): New variable.
16324 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16325 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16326 (attach_inferior): Set signal_pid.
16327
17574093
DJ
163282002-08-23 Daniel Jacobowitz <drow@mvista.com>
16329
16330 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16331
163322002-08-20 Jim Blandy <jimb@redhat.com>
16333
16334 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16335 default for this.
16336
163372002-08-01 Andrew Cagney <cagney@redhat.com>
16338
16339 * Makefile.in: Make chill references obsolete.
16340
163412002-07-24 Kevin Buettner <kevinb@redhat.com>
16342
16343 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16344 * configure: Regenerate.
16345 * config.in: Regenerate.
16346
163472002-07-09 David O'Brien <obrien@FreeBSD.org>
16348
16349 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16350 (perror_with_name, remote_close, remote_open, expect, play): Static.
16351
163522002-07-04 Michal Ludvig <mludvig@suse.cz>
16353
4b8dad4a 16354 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16355 byte offsets instead of an array of indexes.
16356 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16357
163582002-06-13 Daniel Jacobowitz <drow@mvista.com>
16359
16360 * regcache.c: Add comment.
16361
163622002-06-11 Daniel Jacobowitz <drow@mvista.com>
16363
16364 * thread-db.c: New file.
16365 * proc-service.c: New file.
16366 * acinclude.m4: New file.
16367 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16368 proc-service.o, and thread-db.o.
16369 (linux-low.o): Add USE_THREAD_DB.
16370 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16371 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16372 * aclocal.m4: Regenerated.
16373 * config.in: Regenerated.
16374 * configure: Regenerated.
16375 * configure.in: Check for proc_service.h, sys/procfs.h,
16376 thread_db.h, and linux/elf.h headrs.
16377 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16378 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16379 Check for -lthread_db and thread support.
16380 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16381 PowerPC, and SuperH.
16382 * i387-fp.c: Constify arguments.
16383 * i387-fp.h: Likewise.
16384 * inferiors.c: (struct thread_info): Renamed from
16385 `struct inferior_info'. Remove PID member. Use generic inferior
16386 list header. All uses updated.
16387 (inferiors, signal_pid): Removed.
16388 (all_threads): New variable.
16389 (get_thread): Define.
16390 (add_inferior_to_list): New function.
16391 (for_each_inferior): New function.
16392 (change_inferior_id): New function.
16393 (add_inferior): Removed.
16394 (remove_inferior): New function.
16395 (add_thread): New function.
16396 (free_one_thread): New function.
16397 (remove_thread): New function.
16398 (clear_inferiors): Use for_each_inferior and free_one_thread.
16399 (find_inferior): New function.
16400 (find_inferior_id): New function.
16401 (inferior_target_data): Update argument type.
16402 (set_inferior_target_data): Likewise.
16403 (inferior_regcache_data): Likewise.
16404 (set_inferior_regcache_data): Likewise.
16405 * linux-low.c (linux_bp_reinsert): Remove.
16406 (all_processes, stopping_threads, using_thrads)
16407 (struct pending_signals, debug_threads, pid_of): New.
16408 (inferior_pid): Replace with macro.
16409 (struct inferior_linux_data): Remove.
16410 (get_stop_pc, add_process): New functions.
16411 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16412 Use add_process and add_thread.
16413 (linux_attach_lwp): New function, based on old linux_attach. Use
16414 add_process and add_thread. Set stop_expected for new threads.
16415 (linux_attach): New function.
16416 (linux_kill_one_process): New function.
16417 (linux_kill): Kill all LWPs.
16418 (linux_thread_alive): Use find_inferior_id.
16419 (check_removed_breakpoints, status_pending_p): New functions.
16420 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16421 Update. Use WNOHANG. Wait for cloned processes also. Update process
16422 struct for the found process.
16423 (linux_wait_for_event): New function.
16424 (linux_wait): Use it. Support LWPs.
16425 (send_sigstop, wait_for_sigstop, stop_all_processes)
16426 (linux_resume_one_process, linux_continue_one_process): New functions.
16427 (linux_resume): Support LWPs.
16428 (REGISTER_RAW_SIZE): Remove.
16429 (fetch_register): Use register_size instead. Call supply_register.
16430 (usr_store_inferior_registers): Likewise. Call collect_register.
16431 Fix recursive case.
16432 (regsets_fetch_inferior_registers): Improve error message.
16433 (regsets_store_inferior_registers): Add debugging.
16434 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16435 (unstopped_p, linux_signal_pid): New functions.
16436 (linux_target_ops): Add linux_signal_pid.
16437 (linux_init_signals): New function.
16438 (initialize_low): Call it. Initialize using_threads.
16439 * regcache.c (inferior_regcache_data): Add valid
16440 flag.
16441 (get_regcache): Fetch registers lazily. Add fetch argument
16442 and update all callers.
16443 (regcache_invalidate_one, regcache_invalidate): New
16444 functions.
16445 (new_register_cache): Renamed from create_register_cache.
16446 Return the new regcache.
16447 (free_register_cache): Change argument to a void *.
16448 (registers_to_string, registers_from_string): Call get_regcache
16449 with fetch flag set.
16450 (register_data): Make static. Pass fetch flag to get_regcache.
16451 (supply_register): Call get_regcache with fetch flag clear.
16452 (collect_register): Call get_regcache with fetch flag set.
16453 (collect_register_as_string): New function.
16454 * regcache.h: Update.
16455 * remote-utils.c (putpkt): Flush after debug output and use
16456 stderr.
16457 Handle input interrupts while waiting for an ACK.
16458 (input_interrupt): Use signal_pid method.
16459 (getpkt): Flush after debug output and use stderr.
16460 (outreg): Use collect_register_as_string.
16461 (new_thread_notify, dead_thread_notify): New functions.
16462 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16463 and general_thread.
16464 (look_up_one_symbol): Flush after debug output.
16465 * server.c (step_thread, server_waiting): New variables.
16466 (start_inferior): Don't use signal_pid. Update call to mywait.
16467 (attach_inferior): Update call to mywait.
16468 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16469 (main): Don't fetch/store registers explicitly. Use
16470 set_desired_inferior. Support proposed ``Hs'' packet. Update
16471 calls to mywait.
16472 * server.h: Update.
16473 (struct inferior_list, struct_inferior_list_entry): New.
16474 * target.c (set_desired_inferior): New.
16475 (write_inferior_memory): Constify.
16476 (mywait): New function.
16477 * target.h: Update.
16478 (struct target_ops): New signal_pid method.
16479 (mywait): Removed macro, added prototype.
16480
16481 * linux-low.h (regset_func): Removed.
16482 (regset_fill_func, regset_store_func): New.
16483 (enum regset_type): New.
16484 (struct regset_info): Add type field. Use new operation types.
16485 (struct linux_target_ops): stop_pc renamed to get_pc.
16486 Add decr_pc_after_break and breakpoint_at.
16487 (get_process, get_thread_proess, get_process_thread)
16488 (strut process_info, all_processes, linux_attach_lwp)
16489 (thread_db_init): New.
16490
16491 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16492 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16493 (the_low_target): Add new members.
16494 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16495 (i386_store_fpxregset): Constify.
16496 (target_regsets): Add new kind identifier.
16497 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16498 (i386_set_pc): Add debugging.
16499 (i386_breakpoint_at): New function.
16500 (the_low_target): Add new members.
16501 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16502 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16503 (mips_breakpoint_at): New.
16504 (the_low_target): Add new members.
16505 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16506 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16507 (the_low_target): Add new members.
16508 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16509 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16510 (the_low_target): Add new members.
16511 * linux-x86-64-low.c (target_regsets): Add new kind
16512 identifier.
16513
165142002-05-15 Daniel Jacobowitz <drow@mvista.com>
16515
16516 From Martin Pool <mbp@samba.org>:
16517 * server.c (gdbserver_usage): New function.
16518 (main): Call it.
16519
165202002-05-14 Daniel Jacobowitz <drow@mvista.com>
16521
16522 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16523 stop_at -> stop_pc.
16524
165252002-05-04 Andrew Cagney <ac131313@redhat.com>
16526
16527 * Makefile.in: Remove obsolete code.
16528
165292002-04-24 Michal Ludvig <mludvig@suse.cz>
16530
16531 * linux-low.c (regsets_fetch_inferior_registers),
16532 (regsets_store_inferior_registers): Removed cast to int from
16533 ptrace() calls.
16534 * regcache.h: Added declaration of struct inferior_info.
16535
165362002-04-20 Daniel Jacobowitz <drow@mvista.com>
16537
16538 * inferiors.c (struct inferior_info): Add regcache_data.
16539 (add_inferior): Call create_register_cache.
16540 (clear_inferiors): Call free_register_cache.
16541 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16542 * regcache.c (struct inferior_regcache_data): New.
16543 (registers): Remove.
16544 (get_regcache): New function.
16545 (create_register_cache, free_register_cache): New functions.
16546 (set_register_cache): Don't initialize the register cache here.
16547 (registers_to_string, registers_from_string, register_data): Call
16548 get_regcache.
16549 * regcache.h: Add prototypes.
16550 * server.h: Likewise.
16551
165522002-04-20 Daniel Jacobowitz <drow@mvista.com>
16553
16554 * mem-break.c: New file.
16555 * mem-break.h: New file.
16556 * Makefile.in: Add mem-break.o rule; update server.h
16557 dependencies.
16558 * inferiors.c (struct inferior_info): Add target_data
16559 member.
16560 (clear_inferiors): Free target_data member if set.
16561 (inferior_target_data, set_inferior_target_data): New functions.
16562 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16563 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16564 * linux-low.c (linux_bp_reinsert): New variable.
16565 (struct inferior_linux_data): New.
16566 (linux_create_inferior): Use set_inferior_target_data.
16567 (linux_attach): Likewise. Call add_inferior.
16568 (linux_wait_for_one_inferior): New function.
16569 (linux_wait): Call it.
16570 (linux_write_memory): Add const.
16571 (initialize_low): Call set_breakpoint_data.
16572 * linux-low.h (struct linux_target_ops): Add breakpoint
16573 handling members.
16574 * server.c (attach_inferior): Remove extra add_inferior
16575 call.
16576 * server.h: Include mem-break.h. Update inferior.c
16577 prototypes.
16578 * target.c (read_inferior_memory)
16579 (write_inferior_memory): New functions.
16580 * target.h (read_inferior_memory)
16581 (write_inferior_memory): Change macros to prototypes.
16582 (struct target_ops): Update comments. Add const to write_memory
16583 definition.
16584
165852002-04-11 Daniel Jacobowitz <drow@mvista.com>
16586
16587 * linux-low.c (usr_store_inferior_registers): Support
16588 registers which are allowed to fail to store.
16589 * linux-low.h (linux_target_ops): Likewise.
16590 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16591 (ppc_cannot_store_register): FPSCR may not be storable.
16592
165932002-04-09 Daniel Jacobowitz <drow@mvista.com>
16594
16595 * server.h: Include <string.h> if HAVE_STRING_H.
16596 * ChangeLog: Correct paths in last ChangeLog entry.
16597
165982002-04-09 Daniel Jacobowitz <drow@mvista.com>
16599
16600 * linux-low.h: Remove obsolete prototypes.
16601 (struct linux_target_ops): New.
16602 (extern the_low_target): New.
16603 * linux-low.c (num_regs, regmap): Remove declarations.
16604 (register_addr): Use the_low_target explicitly.
16605 (fetch_register): Likewise.
16606 (usr_fetch_inferior_registers): Likewise.
16607 (usr_store_inferior_registers): Likewise.
16608 * linux-arm-low.c (num_regs): Remove.
16609 (arm_num_regs): Define.
16610 (arm_regmap): Renamed from regmap, made static.
16611 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16612 made static.
16613 (arm_cannot_store_register): Renamed from cannot_store_register,
16614 made static.
16615 (the_low_target): New.
16616 * linux-i386-low.c (num_regs): Remove.
16617 (i386_num_regs): Define.
16618 (i386_regmap): Renamed from regmap, made static.
16619 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16620 made static.
16621 (i386_cannot_store_register): Renamed from cannot_store_register,
16622 made static.
16623 (the_low_target): New.
16624 * linux-ia64-low.c (num_regs): Remove.
16625 (ia64_num_regs): Define.
16626 (ia64_regmap): Renamed from regmap, made static.
16627 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16628 made static.
16629 (ia64_cannot_store_register): Renamed from cannot_store_register,
16630 made static.
16631 (the_low_target): New.
16632 * linux-m68k-low.c (num_regs): Remove.
16633 (m68k_num_regs): Define.
16634 (m68k_regmap): Renamed from regmap, made static.
16635 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16636 made static.
16637 (m68k_cannot_store_register): Renamed from cannot_store_register,
16638 made static.
16639 (the_low_target): New.
16640 * linux-mips-low.c (num_regs): Remove.
16641 (mips_num_regs): Define.
16642 (mips_regmap): Renamed from regmap, made static.
16643 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16644 made static.
16645 (mips_cannot_store_register): Renamed from cannot_store_register,
16646 made static.
16647 (the_low_target): New.
16648 * linux-ppc-low.c (num_regs): Remove.
16649 (ppc_num_regs): Define.
16650 (ppc_regmap): Renamed from regmap, made static.
16651 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16652 made static.
16653 (ppc_cannot_store_register): Renamed from cannot_store_register,
16654 made static.
16655 (the_low_target): New.
16656 * linux-s390-low.c (num_regs): Remove.
16657 (s390_num_regs): Define.
16658 (s390_regmap): Renamed from regmap, made static.
16659 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16660 made static.
16661 (s390_cannot_store_register): Renamed from cannot_store_register,
16662 made static.
16663 (the_low_target): New.
16664 * linux-sh-low.c (num_regs): Remove.
16665 (sh_num_regs): Define.
16666 (sh_regmap): Renamed from regmap, made static.
16667 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16668 made static.
16669 (sh_cannot_store_register): Renamed from cannot_store_register,
16670 made static.
16671 (the_low_target): New.
16672 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16673 (the_low_target): New.
16674
166752002-04-09 Daniel Jacobowitz <drow@mvista.com>
16676
16677 * Makefile.in: Add stamp-h target.
16678 * configure.in: Create stamp-h.
16679 * configure: Regenerated.
16680
166812002-04-09 Daniel Jacobowitz <drow@mvista.com>
16682
16683 * inferiors.c: New file.
16684 * target.c: New file.
16685 * target.h: New file.
16686 * Makefile.in: Add target.o and inferiors.o. Update
16687 dependencies.
16688 * linux-low.c (inferior_pid): New static variable,
16689 moved from server.c.
16690 (linux_create_inferior): Renamed from create_inferior.
16691 Call add_inferior. Return 0 on success instead of a PID.
16692 (linux_attach): Renamed from myattach.
16693 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16694 (linux_thread_alive): Renamed from mythread_alive.
16695 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16696 child dies.
16697 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16698 (regsets_store_inferior_registers): Correct error message.
16699 Add missing ``return 0''.
16700 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16701 (linux_store_registers): Renamed from store_inferior_registers.
16702 (linux_read_memory): Renamed from read_inferior_memory.
16703 (linux_write_memory): Renamed from write_inferior_memory.
16704 (linux_target_ops): New structure.
16705 (initialize_low): Call set_target_ops ().
16706 * remote-utils.c (unhexify): New function.
16707 (hexify): New function.
16708 (input_interrupt): Send signals to ``signal_pid''.
16709 * server.c (inferior_pid): Remove.
16710 (start_inferior): Update create_inferior call.
16711 (attach_inferior): Call add_inferior.
16712 (handle_query): New function.
16713 (main): Call handle_query for `q' packets.
16714 * server.h: Include "target.h". Remove obsolete prototypes.
16715 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16716
167172002-04-09 Daniel Jacobowitz <drow@mvista.com>
16718
16719 * Makefile.in: Add WARN_CFLAGS. Update configury
16720 dependencies.
16721 * configure.in: Check for <string.h>
16722 * configure: Regenerate.
16723 * config.in: Regenerate.
16724 * gdbreplay.c: Include needed system headers.
16725 (remote_open): Remove strchr prototype.
16726 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16727 * regcache.c (supply_register): Change buf argument to const void *.
16728 (supply_register_by_name): Likewise.
16729 (collect_register): Change buf argument to void *.
16730 (collect_register_by_name): Likewise.
16731 * regcache.h: Add missing prototypes.
16732 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16733 * server.c (handle_query): New function.
16734 (attached): New static variable, moved out of main.
16735 (main): Quiet longjmp clobber warnings.
16736 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16737 * utils.c (error): Remove NORETURN.
16738 (fatal): Likewise.
This page took 2.487141 seconds and 4 git commands to generate.