]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Ptrace support for Aarch64 SVE
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e9902bfc
AH
12018-06-18 Alan Hayward <alan.hayward@arm.com>
2
3 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4
fefa175e
AH
52018-06-11 Alan Hayward <alan.hayward@arm.com>
6
7 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
8 (initialize_low_tracepoint): Likewise
9 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
10 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
11 param.
12 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
13 checks.
14 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
15
b91ad3ff
AH
162018-06-11 Alan Hayward <alan.hayward@arm.com>
17
18 * server.h (PBUFSIZ): Increase size
19
f868386e
AH
202018-06-11 Alan Hayward <alan.hayward@arm.com>
21
22 * regcache.c (regcache::raw_compare): New function.
23 * regcache.h (regcache::raw_compare): New declaration.
24
9c861883
AH
252018-06-11 Alan Hayward <alan.hayward@arm.com>
26
27 * regcache.c (new_register_cache): Use new.
28 (free_register_cache): Use delete.
29 (register_data): Use const.
30 (supply_register): Move body inside regcache.
31 (regcache::raw_supply): New override function.
32 (collect_register): Move body inside regcache.
33 (regcache::raw_collect): New override function.
34 (regcache::get_register_status): New override function.
35 * regcache.h (struct regcache): Inherit from reg_buffer_common.
36
40591844
TT
372018-06-09 Tom Tromey <tom@tromey.com>
38
39 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
40 declare queue.
41 (event_queue): Use std::queue.
42 (gdb_event_xfree): Remove.
43 (initialize_event_loop, process_event, wait_for_event): Update.
44
6341380d
SC
452018-06-08 Stan Cox <scox@redhat.com>
46
47 * win32-low.c (win32_create_inferior): last_ptid and last_status
48 moved to client_state.
49
03349c93
PA
502018-06-08 Pedro Alves <palves@redhat.com>
51
52 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
53 common/common-exceptions.o, common/common-utils.o,
54 common/errors.o, common/print-utils.o and utils.o.
55 * gdbreplay.c: Include "common-defs.h" instead of the two
56 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
57 string.h or alloca.h.
58 (perror_with_name): Delete.
59 (remote_open): Use xstrdup instead of strdup.
60 (main): Rename to ...
61 (captured_main): ... this.
62 (main): New.
63
8dcc53b3
TT
642018-06-08 Tom Tromey <tom@tromey.com>
65
66 * linux-low.c (linux_low_read_btrace): Update.
67
c12a5089
SC
682018-06-04 Stan Cox <scox@redhat.com>
69
70 * server.h (struct client_state): New.
71 * server.c (cont_thread, general_thread, multi_process)
72 (report_fork_events, report_vfork_events, report_exec_events)
73 (report_thread_events, swbreak_feature, hwbreak_feature)
74 (vCont_supported, disable_randomization, pass_signals)
75 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
76 Moved to client_state.
77 * remote-utils.c (remote_debug, noack_mode)
78 (transport_is_reliable): Moved to client_state.
79 * tracepoint.c (current_traceframe): Moved to client_state.
80
81 Update all callers.
82 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
83 linux-low.c, remote-utils.h, target.c: Use client_state.
84
122394f1
AH
852018-05-31 Alan Hayward <alan.hayward@arm.com>
86
87 * configure.srv: Add new c/h file.
88
95228a0d
AH
892018-05-31 Alan Hayward <alan.hayward@arm.com>
90
91 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
92 null VQ.
93
d8dab6c3
MR
942018-05-25 Maciej W. Rozycki <macro@mips.com>
95
96 * gdb.arch/mips-fpregset-core.exp: New test.
97 * gdb.arch/mips-fpregset-core.c: New test source.
98
81e25b7c
EK
992018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
100
101 PR server/23198
102 * hostio.c (require_int): Do not report overflow for integers
103 between 0xfffffff and 0x7fffffff.
104
7e947ad3
MR
1052018-05-22 Maciej W. Rozycki <macro@mips.com>
106
107 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
108 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
109 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
110 functions.
111 (the_low_target): Wire them.
112
1d75a658
PFC
1132018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
114
115 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
116 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
117 mode. Call collect_register_by_name with vscr using
118 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
119 (ppc_store_vrregset): Add and set vscr_offset variable as in
120 ppc_fill_vrregset. Call supply_register_by_name with vscr using
121 vscr_offset.
122
d078308a
PFC
1232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
124
125 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
126 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
127 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
128
7273b5fc
PFC
1292018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
130
131 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
132 (ppc_store_vsxregset): Likewise.
133 (ppc_fill_vrregset): Likewise.
134 (ppc_store_vrregset): Likewise.
135 (ppc_fill_evrregset): Likewise.
136 (ppc_store_evrregset): Likewise.
137 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
138 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
139 needed.
140
2e077f5e
PFC
1412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
142
143 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
144 wordsize of the inferior. Call ppc_linux_target_wordsize.
145
bd64614e
PFC
1462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
147
148 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
149 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
150 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
151 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
152 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
153 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
154 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
155 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
156 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
157 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
158 (tdesc_powerpc_e500l): Remove.
159 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
160 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
161 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
162 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
163 linux-ppc-tdesc.h.
164 (ppc_arch_setup): Remove target description matching code. Fill a
165 ppc_linux_features struct and call ppc_linux_match_description
166 with it.
167
75d74cca
MR
1682018-05-22 Maciej W. Rozycki <macro@mips.com>
169
170 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
171 width of the requested register exceeds the width of the
172 `ptrace' data type.
173 (mips_cannot_store_register): Likewise.
174
e4439e43
MR
1752018-05-21 Maciej W. Rozycki <macro@mips.com>
176
177 * linux-mips-low.c (mips_fetch_register): New function. Update
178 preceding comment.
179 (mips_store_gregset): Supply 0 rather than $restart for $zero.
180 (the_low_target): Wire `mips_fetch_register'.
181
55271bf9
JB
1822018-05-10 Joel Brobecker <brobecker@adacore.com>
183
184 * lynx-i386-low.c (LYNXOS_178): New macro.
185 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
186 the layout on LynxOS-178.
187 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
188 handle floating point registers that are not supported by
189 LynxOS-178.
190
1a34f210
TT
1912018-05-10 Tom Tromey <tom@tromey.com>
192
193 * configure: Rebuild.
194
190852c8
JB
1952018-05-10 Joel Brobecker <brobecker@adacore.com>
196
197 PR server/23158:
198 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
199 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
200 Use it to set the expedite_regs field in the given tdesc.
201 * x86-tdesc.h: New file.
202 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
203 Adjust following the addition of the new expedite_regs parameter
204 to init_target_desc.
205 * linux-tic6x-low.c (tic6x_read_description): Likewise.
206 * linux-x86-tdesc.c: #include "x86-tdesc.h".
207 (i386_linux_read_description, amd64_linux_read_description):
208 Adjust following the addition of the new expedite_regs parameter
209 to init_target_desc.
210 * lynx-i386-low.c: #include "x86-tdesc.h".
211 (lynx_i386_arch_setup): Adjust following the addition of the new
212 expedite_regs parameter to init_target_desc.
213 * nto-x86-low.c: #include "x86-tdesc.h".
214 (nto_x86_arch_setup): Adjust following the addition of the new
215 expedite_regs parameter to init_target_desc.
216 * win32-i386-low.c: #include "x86-tdesc.h".
217 (i386_arch_setup): Adjust following the addition of the new
218 expedite_regs parameter to init_target_desc.
219
7dbac825
JB
2202018-05-10 Joel Brobecker <brobecker@adacore.com>
221
222 PR server/23158:
223 * win32-low.c (win32_create_inferior): Add call to my_wait
224 setting last_status global.
225
906994d9
JB
2262018-05-10 Joel Brobecker <brobecker@adacore.com>
227
228 PR server/23158:
229 * win32-low.c (create_process): Only call gdb_tilde_expand if
230 inferior_cwd is not NULL.
231
8ee22052
AB
2322018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
233
234 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
235 registers to the cache if their values have changed.
236 (i387_xsave_to_cache): Provide default values for x87 control
237 registers when these features are available, but disabled.
238 * regcache.c (supply_register_by_name_zeroed): New function.
239 * regcache.h (supply_register_by_name_zeroed): Declare new
240 function.
241
aff689d3
TT
2422018-05-07 Tom Tromey <tom@tromey.com>
243
244 * configure: Rebuild.
245
85e26832
TT
2462018-05-04 Tom Tromey <tom@tromey.com>
247
248 * configure: Rebuild.
249
a3b60e45
JK
2502018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
251 Pedro Alves <palves@redhat.com>
252
253 * linux-aarch64-low.c (aarch64_stopped_data_address):
254 Likewise.
255
632e107b
TT
2562018-04-27 Tom Tromey <tom@tromey.com>
257
258 * configure: Rebuild.
259
458412c3
TT
2602018-04-23 Tom Tromey <tom@tromey.com>
261
262 * configure: Rebuild.
263
f31c089e
SM
2642018-04-19 Simon Marchi <simon.marchi@ericsson.com>
265
266 * Makefile.in (depcomp): Add "..".
267 (all_deps_files): New and use it.
268
b319b098
AH
2692018-04-18 Alan Hayward <alan.hayward@arm.com>
270
271 * configure.srv (aarch64*-*-linux*): Don't include xml.
272 (i[34567]86-*-cygwin*): Likewise.
273 (i[34567]86-*-linux*): Likewise.
274 (i[34567]86-*-lynxos*): Likewise.
275 (i[34567]86-*-mingw32ce*): Likewise.
276 (i[34567]86-*-mingw*): Likewise.
277 (i[34567]86-*-nto*): Likewise.
278 (tic6x-*-uclinux): Likewise.
279 (x86_64-*-linux*): Likewise.
280 (x86_64-*-mingw*): Likewise.
281 (x86_64-*-cygwin*): Likewise.
282
3b74854b
AH
2832018-04-18 Alan Hayward <alan.hayward@arm.com>
284
285 * tdesc.c: Remove xml parameter.
286
e98577a9
AH
2872018-04-18 Alan Hayward <alan.hayward@arm.com>
288
289 * server.c (get_features_xml): Remove cast.
290 * tdesc.c (void target_desc::accept): Fill in function.
291 (tdesc_get_features_xml): Remove old xml creation.
292 (print_xml_feature::visit_pre): Add xml vistor.
293 * tdesc.h (struct target_desc): Make xmltarget mutable.
294 (tdesc_get_features_xml): Remove declaration.
295
d278f585
AH
2962018-04-18 Alan Hayward <alan.hayward@arm.com>
297
298 * tdesc.c (tdesc_architecture_name): Add new function.
299 (tdesc_osabi_name): Likewise.
300 (tdesc_get_features_xml): Use new functions.
301
eee8a18d
AH
3022018-04-18 Alan Hayward <alan.hayward@arm.com>
303
304 * tdesc.c (tdesc_create_flags): Remove.
305 (tdesc_add_flag): Likewise.
306 (tdesc_named_type): Likewise.
307 (tdesc_create_union): Likewise.
308 (tdesc_create_struct): Likewise.
309 (tdesc_create_vector): Likewise.
310 (tdesc_add_bitfield): Likewise.
311 (tdesc_add_field): Likewise.
312 (tdesc_set_struct_size): Likewise.
313
82ec9bc7
AH
3142018-04-18 Alan Hayward <alan.hayward@arm.com>
315
316 * tdesc.c (~target_desc): Remove implictly deleted items.
317 (init_target_desc): Iterate all features.
318 (tdesc_get_features_xml): Use vector.
319 (tdesc_create_feature): Create feature.
320 * tdesc.h (tdesc_feature) Remove
321 (target_desc): Add features.
322
ea3e7d71
AH
3232018-04-18 Alan Hayward <alan.hayward@arm.com>
324
325 * Makefile.in: Add common/tdesc.c
326 * tdesc.c (init_target_desc): init all reg_defs from register
327 vector.
328 (tdesc_create_reg): Create tdesc_reg.
329 * tdesc.h (tdesc_feature): Add register vector.
330
17d08cd4
SM
3312018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * tdesc.h (struct target_desc) <features>: Change type to
334 std::vector<std::string>.
335 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
336 changes.
337 (tdesc_get_features_xml): Likewise.
338 (tdesc_create_feature): Likewise.
339
5cd3e386
AH
3402018-03-26 Alan Hayward <alan.hayward@arm.com>
341
342 * regcache.c (find_register_by_number): Return a ref.
343 (find_regno): Use references.
344 (register_size): Likewise.
345 (register_data): Likewise.
346 * tdesc.c (target_desc::~target_desc): Remove free calls.
347 (target_desc::operator==): Use std::vector compare.
348 (init_target_desc): Use reference.
349 (tdesc_create_reg): Use reg constructors.
350 * tdesc.h (struct target_desc): Replace pointer with object.
351
dff7492c
AH
3522018-03-23 Alan Hayward <alan.hayward@arm.com>
353
354 * regcache.c (find_register_by_number): Make static.
355 (find_regno): Use find_register_by_number
356 * regcache.h (struct reg): Remove declaration.
357
d80e5242
AH
3582018-03-23 Alan Hayward <alan.hayward@arm.com>
359
360 * tdesc.c (target_desc::~target_desc): Move to here.
361 (target_desc::operator==): Likewise.
362 * tdesc.h (target_desc::~target_desc): Move from here.
363 (target_desc::operator==): Likewise.
364
f69c5afb
AA
3652018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
366
367 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
368
ce29f843
AA
3692018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
370
371 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
372 S390_TDESC_GS.
373 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
374 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
375 and init_registers_s390_gs_linux64.
376
c49bd90b
AA
3772018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
378
379 * linux-s390-low.c (s390_fill_gs): Remove function.
380 (s390_fill_gsbc): Remove function.
381 (s390_regsets): Set fill functions for the guarded storage regsets
382 to NULL.
383
7edb9bd3
AA
3842018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
385
386 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
387 the word size. Add comment.
388 (s390_get_wordsize): New function.
389 (s390_arch_setup): No longer select a temporary tdesc to fetch the
390 pswm with it. Instead, use s390_get_wordsize to determine the
391 word size first and derive the correct tdesc from that directly.
392
39be3c7e
SM
3932018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * Makefile.in: Include silent-rules.mk.
396 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
397 (COMPILE): Add ECHO_CXX.
398 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
399 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
400 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
401 (version-generated.c): Add ECHO_GEN.
402 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
403 (IPAGENT_COMPILE): Add ECHO_CXX.
404 (%-generated.c): Add ECHO_REGDAT.
405
3ae9ce5d
TT
4062018-03-14 Tom Tromey <tom@tromey.com>
407
408 PR cli/14977:
409 * ax.c (ax_printf): Special case for NULL.
410
e6a58aa8
SM
4112018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
412
413 * linux-low.c (linux_qxfer_libraries_svr4): Use
414 xml_escape_text_append.
415
f6e8a41e
SM
4162018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
417
418 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
419
b9671caf
SM
4202018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * server.c (handle_general_set): Remove unnecessary xstrdup.
423
e80aaf61
SM
4242018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * server.c (parse_debug_format_options): Adjust to
427 delim_string_to_char_ptr_vec changes.
428 * thread-db.c (thread_db_load_search): Adjust to
429 dirnames_to_char_ptr_vec changes.
430
b1223e78
MM
4312018-03-01 Markus Metzger <markus.t.metzger@intel.com>
432
433 * target.h (target_enable_btrace, target_disable_btrace)
434 (target_read_btrace, target_read_btrace_conf): Turn macro into
435 inline function. Throw error if target method is not defined.
436 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
437 check for btrace target method. Be prepared to handle exceptions
438 from btrace target methods.
439
81561546
SDJ
4402018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
441
442 * server.c (captured_main): Change order of error message printed
443 when the current working directory cannot be found.
444
25e3c82c
SDJ
4452018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
446
447 * server.c: Include "filenames.h" and "pathstuff.h".
448 (program_name): Delete variable.
449 (program_path): New anonymous class.
450 (get_exec_wrapper): Use "program_path" instead of
451 "program_name".
452 (handle_v_run): Likewise.
453 (captured_main): Likewise.
454 (process_serial_event): Likewise.
455
b4987c95
SDJ
4562018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
457
458 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
459 (OBJS): Add "pathstuff.o".
460 * server.c (current_directory): New global variable.
461 (captured_main): Initialize "current_directory".
462
f46cd62a
AH
4632018-02-26 Alan Hayward <alan.hayward@arm.com>
464
465 * tdesc.c: Use common/tdesc.h.
466 * tdesc.h: Likewise.
467
a543c5ca
AH
4682018-02-20 Alan Hayward <alan.hayward@arm.com>
469 Simon Marchi <simon.marchi@ericsson.com>
470
471 * Makefile.in: Switch order of make rules.
472
b5884fa7
AH
4732018-02-19 Alan Hayward <alan.hayward@arm.com>
474
475 * Makefile.in: Add common directory in build.
476 * configure.ac: Add common reference.
477 * configure: Regenerate.
478
de6242d3
MM
4792018-02-09 Markus Metzger <markus.t.metzger@intel.com>
480
481 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
482 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
483 * spu-low.c (spu_target_ops): Likewise.
484 * win32-low.c (win32_target_ops): Likewise.
485 * server.c (supported_btrace_packets): Report packets unconditionally.
486 * target.h (target_ops) <supports_btrace>: Remove.
487 (target_supports_btrace): Remove.
488
9ee23a85
MM
4892018-02-09 Markus Metzger <markus.t.metzger@intel.com>
490
491 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
492 (handle_btrace_disable): Change return type to void. Use exceptions
493 to report errors.
494 (handle_btrace_general_set): Catch exception and copy message to
495 return message.
496
8ce47547
TT
4972018-02-08 Tom Tromey <tom@tromey.com>
498
499 * linux-low.c (install_software_single_step_breakpoints): Use
500 make_scoped_restore.
501 * inferiors.c (make_cleanup_restore_current_thread): Remove.
502 (do_restore_current_thread_cleanup): Remove.
503 * gdbthread.h (make_cleanup_restore_current_thread): Don't
504 declare.
505
45dd3607
TT
5062018-02-08 Tom Tromey <tom@tromey.com>
507
508 * mem-break.c (set_raw_breakpoint_at): Use
509 gdb::unique_xmalloc_ptr.
510
e671cd59
PA
5112018-01-30 Pedro Alves <palves@redhat.com>
512
513 PR gdb/13211
514 * target.c (target_terminal::terminal_state): Rename to ...
515 (target_terminal::m_terminal_state): ... this.
516
a0aad537
JC
5172018-01-19 James Clarke <jrtc27@jrtc27.com>
518
519 * linux-low.c (handle_extended_wait): Surround call to
520 thread_db_notice_clone with #ifdef USE_THREAD_DB.
521
4d9b86e1
SM
5222018-01-17 Simon Marchi <simon.marchi@ericsson.com>
523
524 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
525 linux_ptrace_attach_fail_reason_string now returning an
526 std::string.
527 (linux_attach): Likewise.
528 * thread-db.c (attach_thread): Likewise.
529
f517c180
EA
5302018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
531
532 PR gdb/21559
533 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
534 checking for fs_base/gs_base fields in struct user_regs_struct.
535 * configure: Regenerate.
536
9a70f35c
YQ
5372018-01-16 Yao Qi <yao.qi@linaro.org>
538
539 PR gdb/18749
540 * linux-low.c (fetch_register): Call supply_register instead of
541 error.
542
605fd3c6
YQ
5432018-01-08 Yao Qi <yao.qi@linaro.org>
544 Simon Marchi <simon.marchi@ericsson.com>
545
546 * Makefile.in (OBS): Remove selftest.o.
547 * configure.ac: Set srv_selftest_objs if $development is true.
548 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
549 * configure: Re-generated.
550 * server.c (captured_main): Wrap variable selftest_filter with
551 GDB_SELF_TEST.
552
2cc05030
SM
5532018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
554
555 * server.c (parse_debug_format_options): Return std::string.
556 (handle_monitor_command, captured_main): Adjust.
557
e379cee6
PA
5582018-01-05 Pedro Alves <palves@redhat.com>
559
560 PR gdb/18653
561 * server.c (captured_main): Pass quiet=false to
562 save_original_signals_state.
563
82e1e79a
JB
5642018-01-01 Joel Brobecker <brobecker@adacore.com>
565
566 * gdbreplay.c (gdbreplay_version): Update copyright year in
567 version message.
568 * server.c (gdbserver_version): Likewise.
569
8e481c3b
TT
5702017-12-08 Tom Tromey <tom@tromey.com>
571
572 * ax.c (ax_printf): Update.
573
a8806230
YQ
5742017-12-07 Yao Qi <yao.qi@linaro.org>
575
576 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
577 aarch64_linux_read_description.
578 * linux-amd64-ipa.c (idx2mask): New array.
579 (get_ipa_tdesc): Move idx2mask out.
580 (initialize_low_tracepoint): Initialize target descriptions.
581 * linux-i386-ipa.c (idx2mask): New array.
582 (get_ipa_tdesc): Move idx2mask out.
583 (initialize_low_tracepoint): Initialize target descriptions.
584
d4a0e8b5
SM
5852017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
586
587 * tdesc.c (struct tdesc_type): Change return type.
588 (tdesc_add_flag): Change parameter type.
589 (tdesc_add_bitfield): Likewise.
590 (tdesc_add_field): Likewise.
591 (tdesc_set_struct_size): Likewise.
592
798a7429
SM
5932017-12-05 Simon Marchi <simon.marchi@ericsson.com>
594
595 * regcache.c (registers_to_string): Remove unused variable.
596
c0e15c9b
SM
5972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * inferiors.c (for_each_inferior_with_data): Remove.
600 * inferiors.h (for_each_inferior_with_data): Remove.
601 * server.c (handle_qxfer_threads_worker): Change parameter type.
602 (handle_qxfer_threads_proper): Use for_each_thread.
603
f0045347
SM
6042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
605
606 * inferiors.c (for_each_inferior): Remove.
607 (clear_inferiors): Use for_each_thread.
608 * inferiors.h (for_each_inferior): Remove.
609 * linux-low.c (linux_wait_for_event_filtered): Use
610 for_each_thread.
611 (linux_stabilize_threads): Likewise.
612 * regcache.c (regcache_release): Likewise.
613 * server.c (gdb_wants_all_threads_stopped): Likewise.
614 (clear_pending_status_callback): Remove.
615 (handle_status): Use for_each_thread.
616 (captured_main): Likewise.
617 * win32-low.c (child_init_thread_list): Likewise.
618 (win32_clear_inferiors): Likewise.
619 (fake_breakpoint_event): Likewise.
620
9521758b
SM
6212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
622
623 * inferiors.h (find_inferior): Remove.
624 * inferiors.c (find_inferior): Remove.
625
8f86d7aa
SM
6262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
627
628 * linux-low.c (resume_status_pending_p): Update comment.
629 (need_step_over_p): Update comment.
630
e2b44075
SM
6312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
632
633 * linux-low.c (proceed_one_lwp): Return void, change parameter
634 type.
635 (unsuspend_and_proceed_one_lwp): Likewise.
636 (proceed_all_lwps): Use for_each_thread.
637 (unstop_all_lwps): Likewise.
638
c80825ff
SM
6392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * linux-low.c (linux_resume_one_thread): Return void, take
642 parameter directly.
643 (linux_resume): Use for_each_thread.
644
df3e4dbe
SM
6452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
646
647 * linux-low.c (send_sigstop_callback): Return void, change
648 parameter type. Rename to...
649 (send_sigstop): ... this.
650 (suspend_and_send_sigstop_callback): Return void, change parameter
651 type. Rename to...
652 (suspend_and_send_sigstop): ... this.
653 (stop_all_lwps): Use for_each_thread.
654
5a6b0a41
SM
6552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
656
657 * linux-low.c (lwp_running): Return bool, remove unused
658 argument.
659 (linux_stabilize_threads): Use find_thread.
660
39a64da5
SM
6612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
662
663 * linux-low.c (select_singlestep_lwp_callback): Remove.
664 (count_events_callback): Remove.
665 (select_event_lwp_callback): Remove.
666 (select_event_lwp): Use find_thread/for_each_thread.
667
a1385b7b
SM
6682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * linux-low.c (not_stopped_callback): Return bool, take filter
671 argument directly.
672 (linux_wait_for_event_filtered): Use find_thread.
673 (linux_wait_1): Likewise.
674
454296a2
SM
6752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * linux-low.c (same_lwp): Remove.
678 (find_lwp_pid): Use find_thread.
679
6b2a85da
SM
6802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * linux-low.c (delete_lwp_callback): Remove.
683 (linux_mourn): Use for_each_thread.
684
798a38e8
SM
6852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * linux-low.c (linux_detach_lwp_callback): Return void, remove
688 args parameter, don't check for pid.
689 (linux_detach): Use for_each_thread.
690
e4eb0dec
SM
6912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * linux-low.c (struct counter): Remove.
694 (second_thread_of_pid_p): Remove.
695 (last_thread_of_process_p): Use find_thread.
696
83e1b6c1
SM
6972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
698
699 * inferiors.c (find_inferior_in_random): Remove.
700 * inferiors.h (find_inferior_in_random): Remove.
701 * linux-low.c (status_pending_p_callback): Return bool, accept
702 parameter ptid directly.
703 (linux_wait_for_event_filtered): Use find_thread_in_random.
704 (linux_wait_1): Likewise.
705
8dc7b443
SM
7062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * inferiors.c (find_inferior_id): Remove.
709 (find_thread_ptid): Move implemention from find_inferior_id to
710 here.
711 * inferiors.h (find_inferior_id): Remove.
712 * server.c (handle_status): Use find_thread_ptid.
713 (process_serial_event): Likewise.
714 * thread-db.c (find_one_thread): Likewise.
715 (thread_db_thread_handle): Likewise.
716 * win32-low.c (thread_rec): Likewise.
717 (child_delete_thread): Likewise.
718 (win32_thread_alive): Likewise.
719 (get_child_debug_event): Likewise.
720
da25033c
SM
7212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * linux-mips-low.c (update_watch_registers_callback): Return
724 void, remove pid_p parameter, don't check for pid.
725 (mips_insert_point, mips_remove_point): Use for_each_thread.
726
c91bb56b
SM
7272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
728
729 * lynx.low (lynx_delete_thread_callback): Remove.
730 (lynx_mourn): Use for_each_thread.
731
634a3254
SM
7322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
733
734 * regcache.c (regcache_invalidate_one): Remove.
735 (regcache_invalidate_pid): use for_each_thread.
736
41272101
TT
7372017-11-26 Tom Tromey <tom@tromey.com>
738
739 * linux-low.c (linux_create_inferior): Update.
740
f5291a6f
UW
7412017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
742
743 * spu-low.c (spu_create_inferior): Fix typo in argument name.
744
6654d750
AH
7452017-11-24 Alan Hayward <alan.hayward@arm.com>
746
747 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
748 * linux-aarch64-low.c (initialize_low_arch): Call init func.
749 * linux-aarch64-tdesc-selftest.c: New file.
750 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
751
7522017-11-24 Alan Hayward <alan.hayward@arm.com>
753
754 * configure.srv: Add new file.
755 * linux-aarch64-low.c (initialize_low_arch): Call init func.
756 * linux-aarch64-tdesc-selftest.c: New file.
757 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
758
49bdb7ee
AH
7592017-11-24 Alan Hayward <alan.hayward@arm.com>
760
761 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
762 * linux-aarch64-low.c (initialize_low_arch): Remove init.
763 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
764
d6d7ce56
AH
7652017-11-24 Alan Hayward <alan.hayward@arm.com>
766
767 * configure.srv: Add new files.
768 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
769 aarch64_linux_read_description.
770 * linux-aarch64-low.c (aarch64_linux_read_description):
771 Merge with aarch64_arch_setup.
772 (aarch64_arch_setup): Call aarch64_linux_read_description.
773 * linux-aarch64-tdesc.c: New file.
774 * linux-aarch64-tdesc.h: New file.
775
506fe5f4
YQ
7762017-11-24 Yao Qi <yao.qi@linaro.org>
777
778 * configure.srv: Set $srv_regobj for tic6x-linux.
779 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
780 (tic6x_read_description): Move some code to tic6x_arch_setup.
781 (tic6x_tdesc_test): New function.
782 (initialize_low_arch): Call selftests::register_test.
783
29f9a567
YQ
7842017-11-22 Yao Qi <yao.qi@linaro.org>
785
786 * remote-utils.c (prepare_resume_reply): Use memcpy.
787
578290ec
SM
7882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
789
790 * linux-low.c (kill_one_lwp_callback): Return void, take
791 argument directly, don't filter on pid.
792 (linux_kill): Use for_each_thread.
793
eca55aec
SM
7942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
795
796 * linux-low.c (need_step_over_p): Return bool, remove dummy
797 argument.
798 (linux_resume, proceed_all_lwps): Use find_thread.
799
25c28b4d
SM
8002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
801
802 * linux-low.c (resume_status_pending_p): Return bool, remove
803 flag_p argument.
804 (linux_resume): Use find_thread.
805
5fdda392
SM
8062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
807
808 * linux-low.c (struct thread_resume_array): Remove.
809 (linux_set_resume_request): Return void, take arguments
810 directly.
811 (linux_resume): Use for_each_thread.
812
fcb056a5
SM
8132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
814
815 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
816 return bool, remove data argument.
817 (linux_stabilize_threads): Use find_thread.
818
139720c5
SM
8192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
820
821 * linux-low.c (unsuspend_one_lwp): Remove.
822 (unsuspend_all_lwps): Use for_each_thread, inline code from
823 unsuspend_one_lwp.
824
6d1e5673
SM
8252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
826
827 * gdbthread.h (find_thread): Add overload with ptid_t filter.
828 * linux-low.c (struct iterate_over_lwps_args): Remove.
829 (iterate_over_lwps_filter): Remove.
830 (iterate_over_lwps): Use find_thread.
831
bbf550d5
SM
8322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
833
834 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
835 (linux_handle_new_gdb_connection): Use for_each_thread, inline
836 code from reset_lwp_ptrace_options_callback.
837
00192f77
SM
8382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
839
840 * linux-arm-low.c (struct update_registers_data): Remove.
841 (update_registers_callback): Return void, take arguments
842 directly, don't check thread's pid.
843 (arm_insert_point, arm_remove_point): Use for_each_thread.
844
2bee2b6c
SM
8452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
846
847 * win32-low.c (continue_one_thread): Return void, take argument
848 directly.
849 (child_continue): Use for_each_thread.
850
0b360f19
SM
8512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
852
853 * win32-i386-low.c (update_debug_registers_callback): Rename
854 to ...
855 (update_debug_registers): ... this, return void, remove pid_p arg.
856 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
857
f27866ba
SM
8582017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
859
860 * inferiors.h (struct process_info): Add constructor, initialize
861 fields..
862 <syscalls_to_catch>: Change type to std::vector<int>.
863 * inferiors.c (add_process): Allocate process_info with new.
864 (remove_process): Free process_info with delete.
865 * linux-low.c (handle_extended_wait): Adjust.
866 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
867 * server.c (handle_general_set): Adjust.
868
e849ea89
PA
8692017-11-16 Pedro Alves <palves@redhat.com>
870
871 * remote-utils.c (remote_close): Block SIGIO signals instead of
872 uninstalling the SIGIO handler.
873
1d0aa65c
AH
8742017-11-16 Alan Hayward <alan.hayward@arm.com>
875
876 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
877
3491a34c
YQ
8782017-11-16 Yao Qi <yao.qi@linaro.org>
879
880 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
881 (tic6x_store_gregset): Likewise.
882 (tic6x_usrregs_info): Move it up.
883
a602f924
AH
8842017-11-15 Alan Hayward <alan.hayward@arm.com>
885
886 * Makefile.in: Update arch rules.
887 * configure.srv: Explicitly mark arch/ files.
888
5616b6c3
AS
8892017-11-13 Andreas Schwab <schwab@suse.de>
890
891 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
892 function.
893 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
894
d1928160
PA
8952017-11-06 Pedro Alves <palves@redhat.com>
896
897 * config.in, configure: Regenerate.
898
bac608e7
SM
8992017-10-27 Simon Marchi <simon.marchi@ericsson.com>
900
901 * target.c (struct thread_search): Remove.
902 (thread_search_callback): Remove.
903 (prepare_to_access_memory): Use for_each_thread instead of
904 find_inferior. Inline code from thread_search_callback.
905
eaddb425
SM
9062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
907
908 * server.c (struct visit_actioned_threads_data): Remove.
909 (visit_actioned_threads): Change prototype to take arguments
910 directly.
911 (resume): Use find_thread instead of find_inferior.
912
99078d34
SM
9132017-10-27 Simon Marchi <simon.marchi@ericsson.com>
914
915 * server.c (queue_stop_reply_callback): Change prototype, return
916 void.
917 (find_status_pending_thread_callback): Remove.
918 (handle_status): Replace find_inferior with find_thread and
919 for_each_thread.
920
cc628f3d
AH
9212017-10-25 Alan Hayward <alan.hayward@arm.com>
922
923 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
924 with REGNO.
925 (aarch64_store_gregset): Likewise.
926 (aarch64_fill_fpregset): Likewise.
927 (aarch64_store_fpregset): Likewise.
928
4d3bb80e
SM
9292017-10-21 Simon Marchi <simon.marchi@ericsson.com>
930
931 * gdbthread.h (find_thread, for_each_thread): New functions.
932 * inferiors.c (thread_of_pid): Remove.
933 (find_any_thread_of_pid): Use find_thread.
934 * linux-low.c (num_lwps): Use for_each_thread.
935
7a7cdfa0
YQ
9362017-10-17 Yao Qi <yao.qi@linaro.org>
937
938 * Makefile.in: Remove one rule.
939 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
940
e675d170
YQ
9412017-10-17 Yao Qi <yao.qi@linaro.org>
942
943 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
944 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
945
7eb4e0f9
YQ
9462017-10-17 Yao Qi <yao.qi@linaro.org>
947
948 * configure.srv: Rename arm.o with arch/arm.o.
949
60d6cfc9
YQ
9502017-10-17 Yao Qi <yao.qi@linaro.org>
951
952 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
953 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
954 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
955 (arch-i386.o, arch-amd64.o): Remove rules.
956 (arch/%.o): New rule.
957 Update POSTCOMPILE and COMPILE.pre.
958 * configure.ac: Invoke AC_CONFIG_COMMANDS.
959 * configure: Re-generated.
960 * configure.srv: Replace arch-i386.o with arch/i386.o.
961 Replace arch-amd64.o with arch/amd64.o.
962
5bfda255
YQ
9632017-10-16 Yao Qi <yao.qi@linaro.org>
964
965 * configure: Regenerated.
966
9c80ecd6
SM
9672017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
968
969 * inferiors.h: (struct inferior_list): Remove.
970 (struct inferior_list_entry); Remove.
971 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
972 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
973 get_first_inferior): Remove.
974 (for_each_inferior, for_each_inferior_with_data, find_inferior,
975 find_inferior_id, find_inferior_in_random): Change signature.
976 * inferiors.c (all_threads): Change type to
977 std::list<thread_info *>.
978 (get_thread): Remove macro.
979 (find_inferior, find_inferior_id): Change signature, implement
980 using find_thread.
981 (find_inferior_in_random): Change signature, implement using
982 find_thread_in_random.
983 (for_each_inferior, for_each_inferior_with_data): Change
984 signature, implement using for_each_thread.
985 (add_inferior_to_list, remove_inferior): Remove.
986 (add_thread, get_first_thread, thread_of_pid,
987 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
988 (get_first_inferior, one_inferior_p, clear_inferior_list):
989 Remove.
990 (clear_inferiors, get_thread_process): Update.
991 * gdbthread.h: Include <list>.
992 (struct thread_info) <entry>: Remove field.
993 <id>: New field.
994 (all_threads): Change type to std::list<thread_info *>.
995 (get_first_inferior): Add doc.
996 (find_thread, for_each_thread, find_thread_in_random): New
997 functions.
998 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
999 * linux-arm-low.c (update_registers_callback): Update.
1000 * linux-low.c (second_thread_of_pid_p): Update.
1001 (kill_one_lwp_callback, linux_detach_lwp_callback,
1002 delete_lwp_callback, status_pending_p_callback, same_lwp,
1003 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1004 iterate_over_lwps, not_stopped_callback,
1005 resume_stopped_resumed_lwps, count_events_callback,
1006 select_singlestep_lwp_callback, select_event_lwp_callback,
1007 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1008 suspend_and_send_sigstop_callback, wait_for_sigstop,
1009 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1010 lwp_running, linux_set_resume_request, resume_status_pending_p,
1011 need_step_over_p, start_step_over, linux_resume_one_thread,
1012 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1013 reset_lwp_ptrace_options_callback): Update.
1014 * linux-mips-low.c (update_watch_registers_callback): Update.
1015 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1016 Update.
1017 (free_register_cache_thread_one): Remove.
1018 (regcache_release): Update.
1019 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1020 handle_qxfer_threads_worker): Update.
1021 (handle_query): Update, use list iterator.
1022 (visit_actioned_threads, handle_pending_status,
1023 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1024 clear_pending_status_callback, set_pending_status_callback,
1025 find_status_pending_thread_callback, handle_status,
1026 process_serial_event): Update.
1027 * target.c (thread_search_callback): Update.
1028 * thread-db.c (thread_db_get_tls_address): Update.
1029 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1030 Update.
1031 * win32-i386-low.c (update_debug_registers_callback): Update.
1032 * win32-low.c (delete_thread_info, child_delete_thread,
1033 continue_one_thread, suspend_one_thread,
1034 get_child_debug_event): Adjust.
1035
9179355e
SM
10362017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1037
1038 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1039 * inferiors.h: Include <list>.
1040 (struct process_info) <entry>: Remove field.
1041 <pid>: New field.
1042 (pid_of): Change macro to function.
1043 (ptid_of, lwpid_of): Remove macro.
1044 (all_processes): Change type to std::list<process_info *>.
1045 (ALL_PROCESSES): Remove macro.
1046 (for_each_process, find_process): New function.
1047 * inferiors.c (all_processes): Change type to
1048 std::list<process_info *>.
1049 (find_thread_process): Adjust.
1050 (add_process): Likewise.
1051 (remove_process): Likewise.
1052 (find_process_pid): Likewise.
1053 (get_first_process): Likewise.
1054 (started_inferior_callback): Remove.
1055 (have_started_inferiors_p): Adjust.
1056 (attached_inferior_callback): Remove.
1057 (have_attached_inferiors_p): Adjust.
1058 * linux-low.c (check_zombie_leaders): Likewise.
1059 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1060 (x86_linux_update_xmltarget): Adjust.
1061 * server.c (handle_query): Likewise.
1062 (gdb_reattached_process): Remove.
1063 (handle_status): Adjust.
1064 (kill_inferior_callback): Likewise.
1065 (detach_or_kill_inferior): Remove.
1066 (print_started_pid): Likewise.
1067 (print_attached_pid): Likewise.
1068 (detach_or_kill_for_exit): Update.
1069 (process_serial_event): Likewise.
1070 * linux-arm-low.c (arm_new_fork): Likewise.
1071
c9cb8905
SM
10722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1073
1074 * dll.h: Include <list>.
1075 (struct dll_info): Add constructor.
1076 <entry>: Remove field.
1077 (all_dlls): Change type to std::list<dll_info>.
1078 * dll.c: Include <algorithm>.
1079 (get_dll): Remove macro.
1080 (all_dlls): Change type to std::list<dll_info *>.
1081 (free_one_dll): Remove.
1082 (match_dll): Likewise.
1083 (loaded_dll): Adjust.
1084 (unloaded_dll): Adjust to all_dlls type change, use
1085 std::find_if. Inline code from match_dll.
1086 (clear_dlls): Adjust to all_dlls type change.
1087 * server.c (emit_dll_description): Remove.
1088 (handle_qxfer_libraries): Adjust to all_dlls type change,
1089 integrate emit_dll_description's functionality.
1090
04ec7890
SM
10912017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * linux-low.h (struct linux_target_ops) <delete_process>: New
1094 field.
1095 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1096 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1097 (struct linux_target_ops): Add delete_process callback.
1098 * linux-arm-low.c (arm_delete_process): New.
1099 (struct linux_target_ops): Add delete_process callback.
1100 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1101 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1102 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1103 * linux-mips-low.c (mips_linux_delete_process): New.
1104 (struct linux_target_ops): Add delete_process callback.
1105 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1106 * linux-s390-low.c (struct linux_target_ops): Likewise.
1107 * linux-sh-low.c (struct linux_target_ops): Likewise.
1108 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1109 * linux-tile-low.c (struct linux_target_ops): Likewise.
1110 * linux-x86-low.c (x86_linux_delete_process): New.
1111 (struct linux_target_ops): Add delete_process callback.
1112 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1113
466eecee
SM
11142017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * linux-aarch64-low.c (the_low_target): Add thread delete
1117 callback.
1118 * linux-arm-low.c (arm_delete_thread): New function.
1119 (the_low_target): Add thread delete callback.
1120 * linux-bfin-low.c (the_low_target): Likewise.
1121 * linux-crisv32-low.c (the_low_target): Likewise.
1122 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1123 set.
1124 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1125 field.
1126 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1127 * linux-mips-low.c (mips_linux_delete_thread): New function.
1128 (the_low_target): Add thread delete callback.
1129 * linux-ppc-low.c (the_low_target): Likewise.
1130 * linux-s390-low.c (the_low_target): Likewise.
1131 * linux-sh-low.c (the_low_target): Likewise.
1132 * linux-tic6x-low.c (the_low_target): Likewise.
1133 * linux-tile-low.c (the_low_target): Likewise.
1134 * linux-x86-low.c (the_low_target): Likewise.
1135 * linux-xtensa-low.c (the_low_target): Likewise.
1136
b79f7801
YZ
11372017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1138
1139 * win32-low.c: Include "common-inferior.h".
1140
bc3b087d
SDJ
11412017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1142
1143 * inferiors.c (set_inferior_cwd): New function.
1144 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1145 (handle_query): Inform that QSetWorkingDir is supported.
1146 * win32-low.c (create_process): Pass the inferior's cwd to
1147 CreateProcess.
1148
d092c5a2
SDJ
11492017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1150
1151 * inferiors.c (current_inferior_cwd): New global variable.
1152 (get_inferior_cwd): New function.
1153 * inferiors.h (struct process_info) <cwd>: New field.
1154
7da0a886
SDJ
11552017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1156
1157 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1158 (OBS): Add gdb_tilde_expand.o.
1159
289a6840
SM
11602017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1161
1162 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1163 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1164
256642e8
PA
11652017-09-29 Pedro Alves <palves@redhat.com>
1166
1167 * ax.c (gdb_parse_agent_expr): Constify.
1168 * ax.h (gdb_parse_agent_expr): Constify.
1169 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1170 Constify.
1171 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1172 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1173 * remote-utils.h (read_ptid): Constify.
1174 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1175 (process_point_options, process_serial_event): Constify.
1176 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1177 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1178 (cmd_qtbuffer): Constify.
1179
5b9ca4d4
PA
11802017-09-29 Pedro Alves <palves@redhat.com>
1181
1182 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1183 fails.
1184
94c207e0
PA
11852017-09-29 Pedro Alves <palves@redhat.com>
1186
1187 * linux-low.c (handle_extended_wait): Pass parent thread instead
1188 of process to thread_db_notice_clone.
1189 * linux-low.h (thread_db_notice_clone): Replace parent process
1190 parameter with parent thread parameter.
1191 * thread-db.c (find_one_thread): Add comment.
1192 (thread_db_notice_clone): Replace parent process parameter with
1193 parent thread parameter. Temporarily switch to the parent thread.
1194
75352e28
SDJ
11952017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1196
1197 * gdbthread.h: Include "common-gdbthread.h".
1198 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1199 "if" when validating the ptid.
1200 * remote-utils.c: Include "gdbthread.h".
1201 (prepare_resume_reply): Use "switch_to_thread".
1202 * target.c (done_accessing_memory): Likewise.
1203
ad339634
AA
12042017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1205
1206 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1207 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1208 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1209 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1210 s390x-gs-linux64-ipa.o to ipa_obj.
1211 * linux-s390-low.c (HWCAP_S390_GS): New define.
1212 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1213 New functions.
1214 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1215 (s390_arch_setup): Check for guarded-storage support and choose
1216 appropriate tdesc.
1217 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1218 init_registers_s390x_gs_linux64.
1219 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1220 enum value.
1221 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1222 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1223
cc4d742f
SM
12242017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1225
1226 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1227
f6327dcb
KB
12282017-09-21 Kevin Buettner <kevinb@redhat.com>
1229
1230 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1231 (thread_db_thread_handle): Declare.
1232 * linux-low.c (linux_target_ops): Initialize thread_handle.
1233 * server.c (handle_qxfer_threads_worker): Add support for
1234 "handle" attribute.
1235 * target.h (struct target_ops): Add new function pointer,
1236 thread_handle.
1237 (target_thread_handle): Define.
1238 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1239 field in lwp.
1240 (thread_db_thread_handle): New function.
1241
86299109
KB
12422017-09-21 Kevin Buettner <kevinb@redhat.com>
1243
1244 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1245 * linux-low.h (thread_db_notice_clone): Declare.
1246 * thread-db.c (thread_db_notice_clone): New function.
1247
f557a88a
PA
12482017-09-21 Pedro Alves <palves@redhat.com>
1249
1250 * server.c (gdb_read_memory, handle_status, process_serial_event)
1251 (handle_serial_event, handle_target_event): Adjust to
1252 set_desired_thread prototype change.
1253 * target.c (set_desired_thread): Remove 'use_general' parameter
1254 and adjust.
1255 * target.h (set_desired_thread): Remove 'use_general' parameter.
1256
223ffa71
TT
12572017-09-20 Tom Tromey <tom@tromey.com>
1258
1259 * target.c (target_terminal::terminal_state): Define.
1260 (target_terminal::init): Rename from target_terminal_init.
1261 (target_terminal::inferior): Rename from
1262 target_terminal_inferior.
1263 (target_terminal::ours): Rename from target_terminal_ours.
1264 (target_terminal::ours_for_output, target_terminal::info): New.
1265
04fd3ba9
SM
12662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * server.c (accumulate_file_name_length): Remove.
1269 (emit_dll_description): Adjust to std::string change.
1270 (handle_qxfer_libraries): Use std::string to hold document.
1271
5e187554
SM
12722017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1273
1274 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1275 return type of xml_escape_text.
1276 * server.c (emit_dll_description): Likewise.
1277
1526853e
SM
12782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * server.c (captured_main): Accept argument for --selftest.
1281 Update run_tests call.
1282 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1283 when registering selftests.
1284
c4dfafab
SDJ
12852017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1286
1287 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1288 instead of "VEC" for "target_desc.reg_defs".
1289 (regcache_cpy): Likewise.
1290 (registers_to_string): Likewise.
1291 (registers_from_string): Likewise.
1292 (find_regno): Likewise.
1293 (supply_regblock): Likewise.
1294 (regcache_raw_read_unsigned): Likewise.
1295 * tdesc.c (init_target_desc): Likewise.
1296 (tdesc_create_reg): Likewise.
1297 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1298 (struct target_desc) <reg_defs>: Convert to "std::vector".
1299 (target_desc): Do not initialize "reg_defs".
1300 (~target_desc): Update code to use "std::vector" instead of "VEC"
1301 for "target_desc.reg_defs".
1302 (operator==): Likewise.
1303
124aceb4
SM
13042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1305
1306 * inferiors.h (thread_to_gdb_id): Remove.
1307 * inferiors.c (thread_to_gdb_id): Remove.
1308 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1309 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1310 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1311 Likewise.
1312 * nto-low.c (nto_fetch_registers, nto_store_registers,
1313 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1314
96cde54f
SM
13152017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * inferiors.h (gdb_id_to_thread_id): Remove.
1318 * inferiors.c (gdb_id_to_thread_id): Remove.
1319 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1320 removal. Move pid declaration closer to where it's used.
1321
e8ca139e
SM
13222017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1323
1324 * server.c (handle_detach): New function.
1325 (process_serial_event): Move code out, call handle_detach.
1326
f8a4e119
SM
13272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * server.c (require_running): Rename to ...
1330 (require_running_or_return): ... this ...
1331 (require_running_or_break): ... and this.
1332 (handle_query, process_serial_event): Adjust.
1333
0eb0a407
SM
13342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1335
1336 * linux-low.c (linux_set_resume_request): Remove unused
1337 variables.
1338
785922a5
SM
13392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * server.c (first_thread_of): Remove.
1342 (process_serial_event): Replace usage of first_thread_of with
1343 find_any_thread_of_pid.
1344 * tracepoint.c (same_process_p): Remove.
1345 (gdb_agent_about_to_close): Replace usage of same_process_p with
1346 find_any_thread_of_pid.
1347 * linux-x86-low.c (same_process_callback): Remove.
1348 (x86_arch_setup_process_callback): Replace usage of
1349 same_process_callback with find_any_thread_of_pid.
1350 * thread-db.c (any_thread_of): Remove.
1351 (switch_to_process): Replace usage of any_thread_of with
1352 find_any_thread_of_pid.
1353 * inferiors.c (thread_pid_matches_callback): Remove.
1354 (find_thread_process): Adjust to use find_any_thread_of_pid.
1355
a059f00c
SDJ
13562017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1357
1358 * regcache.c (get_thread_regcache): Guard calls to "memset"
1359 with "!VEC_empty".
1360
cc397f3a
SDJ
13612017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1362
1363 * linux-low.c (handle_extended_wait): Use
1364 "allocate_target_description" instead of "XNEW".
1365 * linux-x86-low.c (initialize_low_arch): Likewise.
1366
22916b07
YQ
13672017-09-05 Yao Qi <yao.qi@linaro.org>
1368
1369 * configure.srv (srv_i386_regobj): Remove.
1370 (srv_amd64_regobj): Remove.
1371 (srv_regobj): Set it to "" for x86 non-linux targets.
1372 * linux-x86-tdesc.c (i386_linux_read_description):
1373 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1374 (init_registers_i386): Remove the declaration.
1375 (tdesc_i386): Remove the declaration.
1376 (lynx_i386_arch_setup): Call i386_create_target_description.
1377 * nto-x86-low.c: Likewise.
1378 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1379 [!__x86_64__]: include arch/i386.h.
1380 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1381
38602d55
YQ
13822017-09-05 Yao Qi <yao.qi@linaro.org>
1383
1384 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1385 i386/amd64-XXX-linux from it.
1386
44b886ff
YQ
13872017-09-05 Yao Qi <yao.qi@linaro.org>
1388
1389 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1390 false.
1391 (ipa_amd64_linux_regobj): Remove.
1392 (ipa_x32_linux_regobj): Remove.
1393
b4570e4b
YQ
13942017-09-05 Yao Qi <yao.qi@linaro.org>
1395
1396 * Makefile.in (arch-amd64.o): New rule.
1397 * configure.srv: Append arch-amd64.o.
1398 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1399 (get_ipa_tdesc): Call amd64_linux_read_description.
1400 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1401 and init_registers_amd64_XXX.
1402 * linux-x86-low.c (x86_linux_read_description): Call
1403 amd64_linux_read_description.
1404 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1405 (initialize_low_arch): Don't call init_registers_x32_XXX and
1406 init_registers_amd64_XXX.
1407 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1408 and tdesc_amd64_XXX.
1409 [__x86_64__] (amd64_tdesc_test): New function.
1410 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1411 and init_registers_amd64_XXX.
1412 * linux-x86-tdesc.c: Include arch/amd64.h.
1413 (xcr0_to_tdesc_idx): New function.
1414 (i386_linux_read_description): New function.
1415 (amd64_get_ipa_tdesc_idx): New function.
1416 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1417 (amd64_get_ipa_tdesc): Declare.
1418
d1f28ea2
YQ
14192017-09-05 Yao Qi <yao.qi@linaro.org>
1420
1421 * configure.srv (srv_i386_linux_xmlfiles): Remove
1422 i386/i386-XXX-linux.xml from it.
1423
25a93583
YQ
14242017-09-05 Yao Qi <yao.qi@linaro.org>
1425
1426 * configure.srv: Set srv_i386_linux_regobj empty if $development
1427 is false.
1428 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1429 initialize_low_tdesc.
1430 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1431 with #if initialize_low_tdesc.
1432 * linux-x86-tdesc-selftest.c: New file.
1433 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1434
5f035c07
YQ
14352017-09-05 Yao Qi <yao.qi@linaro.org>
1436
1437 * Makefile.in (arch-i386.o): New rule.
1438 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1439 (x86_64-*-linux*): Likewise.
1440 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1441 include arch/i386.h.
1442 (i386_linux_read_description): Remove code and call
1443 i386_create_target_description.
1444 * tdesc.c (allocate_target_description): New function.
1445 * tdesc.h (set_tdesc_architecture): Remove declaration.
1446 (set_tdesc_osabi): Likewise.
1447
0abe8a89
YQ
14482017-09-05 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1451 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1452 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1453 .xmltarget.
1454 * server.c (get_features_xml): Call tdesc_get_features_xml.
1455 * tdesc.c (set_tdesc_architecture): New function.
1456 (set_tdesc_osabi): New function.
1457 (tdesc_get_features_xml): New function.
1458 (tdesc_create_feature): Add an argument.
1459 * tdesc.h (struct target_desc) <features>: New field.
1460 <arch, osabi>: New field.
1461 (~target_desc): xfree features, arch, and osabi.
1462 (target_desc::oerator==): Don't compare .xmltarget.
1463 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1464 (set_tdesc_osabi): Likewise.
1465 (tdesc_get_features_xml): Likewise.
1466
0a188386
YQ
14672017-09-05 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-x86-tdesc.c: Include selftest.h.
1470 (i386_tdesc_test): New function.
1471 (initialize_low_tdesc): Call selftests::register_test.
1472 * tdesc.h: Include regdef.h.
1473 (target_desc): Override operator == and !=.
1474
f49ff000
YQ
14752017-09-05 Yao Qi <yao.qi@linaro.org>
1476
1477 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1478 (ipa_obj): Likewise.
1479 * linux-i386-ipa.c: Include common/x86-xstate.h
1480 (get_ipa_tdesc): Call i386_linux_read_description.
1481 (initialize_low_tracepoint): Don't call init_registers_XXX
1482 functions, call initialize_low_tdesc instead.
1483 * linux-x86-low.c (x86_linux_read_description): Call
1484 i386_linux_read_description.
1485 (initialize_low_arch): Don't call init_registers_i386_XXX
1486 functions, call initialize_low_tdesc.
1487 * linux-x86-tdesc.c: New file.
1488 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1489 (i386_get_ipa_tdesc_idx): Declare.
1490 (i386_get_ipa_tdesc): Declare.
1491 (initialize_low_tdesc): Declare.
1492
2b68ef2f
YQ
14932017-09-05 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1496 instead of 0.
1497
f7000548
YQ
14982017-09-05 Yao Qi <yao.qi@linaro.org>
1499
1500 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1501 * regcache.c (get_thread_regcache): Use VEC_length.
1502 (init_register_cache): Likewise.
1503 (regcache_cpy): Likewise.
1504 (registers_to_string): Iterate reg_defs via VEC_iterate.
1505 (find_regno): Likewise.
1506 (find_register_by_number): Use VEC_index.
1507 (register_size): Call find_register_by_number.
1508 (register_data): Call find_register_by_number.
1509 (supply_regblock): Use VEC_length.
1510 (regcache_raw_read_unsigned): Likewise.
1511 * tdesc.c (init_target_desc): Iterate reg_defs via
1512 VEC_iterate.
1513 (default_description): Update initializer.
1514 (copy_target_description): Don't update field num_registers.
1515 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1516 <num_registers>: Remove.
1517
50a421ac
SM
15182017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * Makefile.in (.SECONDARY): Define target.
1521
23fdd69e
SM
15222017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1523
1524 * linux-low.c (linux_wait_1): Adjust.
1525 * server.c (queue_stop_reply_callback): Adjust.
1526
0a2dde4a
SDJ
15272017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1528
1529 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1530 QEnvironmentUnset and QEnvironmentReset packets.
1531 (handle_query): Inform remote that QEnvironmentHexEncoded,
1532 QEnvironmentUnset and QEnvironmentReset are supported.
1533
6afd337d
SM
15342017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * inferiors.h (inferior_target_data): Rename to ...
1537 (thread_target_data): ... this.
1538 (inferior_regcache_data): Rename to ...
1539 (thread_regcache_data): ... this.
1540 (set_inferior_regcache_data): Rename to ...
1541 (set_thread_regcache_data): ... this.
1542 * inferiors.c (inferior_target_data): Rename to ...
1543 (thread_target_data): ... this.
1544 (inferior_regcache_data): Rename to ...
1545 (thread_regcache_data): ... this.
1546 (set_inferior_regcache_data): Rename to ...
1547 (set_thread_regcache_data): ... this.
1548 (free_one_thread): Update.
1549 * linux-low.h (get_thread_lwp): Update.
1550 * regcache.c (get_thread_regcache): Update.
1551 (regcache_invalidate_thread): Update.
1552 (free_register_cache_thread): Update.
1553 * win32-i386-low.c (update_debug_registers_callback): Update.
1554 (win32_get_current_dr): Update.
1555 * win32-low.c (thread_rec): Update.
1556 (delete_thread_info): Update.
1557 (continue_one_thread): Update.
1558 (suspend_one_thread): Update.
1559
a160cc46
SM
15602017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * inferiors.c (set_inferior_target_data): Remove.
1563 * inferiors.h (set_inferior_target_data): Remove.
1564
6d580b63
YQ
15652017-08-18 Yao Qi <yao.qi@linaro.org>
1566
1567 * Makefile.in (OBS): Add selftest.o.
1568 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1569 * configure, config.in: Re-generated.
1570 * server.c: Include common/sefltest.h.
1571 (captured_main): Handle option --selftest.
1572
f5a29eb0
YQ
15732017-08-09 Yao Qi <yao.qi@linaro.org>
1574
1575 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1576 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1577 i386-avx-mpx.o and i386-mmx.o.
1578 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1579 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1580 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1581 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1582 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1583 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1584 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1585 i386/amd64-avx-mpx.xml.
1586
57757c2f
YQ
15872017-08-09 Yao Qi <yao.qi@linaro.org>
1588
1589 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1590 and x32-avx-avx512.o.
1591 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1592 i386/x32-avx-avx512.xml.
1593
229d26fc
SM
15942017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * tracepoint.h (enum class fast_tpoint_collect_result): New
1597 enumeration.
1598 (fast_tracepoint_collecting): Change return type to
1599 fast_tpoint_collect_result.
1600 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1601 * linux-low.h: Include tracepoint.h.
1602 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1603 fast_tpoint_collect_result.
1604 * linux-low.c (handle_tracepoints): Adjust.
1605 (linux_fast_tracepoint_collecting): Change return type to
1606 fast_tpoint_collect_result.
1607 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1608 linux_wait_1, stuck_in_jump_pad_callback,
1609 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1610 proceed_one_lwp): Adjust to type change.
1611
2e1e43e1
YQ
16122017-07-10 Yao Qi <yao.qi@linaro.org>
1613
1614 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1615
adc764e7
YQ
16162017-06-29 Yao Qi <yao.qi@linaro.org>
1617
1618 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1619 Remove.
1620 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1621
a206891a
SM
16222017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1623
1624 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1625
9a6c7d9c
SDJ
16262017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1627
1628 * linux-low.c (linux_create_inferior): Adjust code to access the
1629 environment information via 'gdb_environ' class.
1630 * lynx-low.c (lynx_create_inferior): Likewise.
1631 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1632 (get_environ): Return a pointer to 'our_environ'.
1633 (captured_main): Initialize 'our_environ'.
1634 * server.h (get_environ): Adjust prototype.
1635 * spu-low.c (spu_create_inferior): Adjust code to access the
1636 environment information via 'gdb_environ' class.
1637
ae3e2ccf
SM
16382017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1641 usage of "register" keyword.
1642
3e019bdc
SM
16432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1644
1645 * configure: Re-generate.
1646
8465943a
SM
16472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1648
1649 * configure: Re-generate.
1650
cf0dd6f0
SM
16512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * Makefile.in (COMPILE.pre): Add "-x c++".
1654
9845682b
SDJ
16552017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1656
1657 * fork-child.c: Conditionally include <signal.h>.
1658
aefd8b33
SDJ
16592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1660
1661 * server.c (handle_general_set): Handle new packet
1662 "QStartupWithShell".
1663 (handle_query): Add "QStartupWithShell" to the list of supported
1664 packets.
1665 (gdbserver_usage): Add help text explaining the
1666 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1667 options.
1668 (captured_main): Recognize and act upon the presence of the new
1669 CLI options.
1670
2090129c
SDJ
16712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1672 Pedro Alves <palves@redhat.com>
1673
1674 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1675 * configure: Regenerate.
1676 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1677 "fork-inferior.o".
1678 (i[34567]86-*-lynxos*): Likewise.
1679 (spu*-*-*): Likewise.
1680 * fork-child.c: New file.
1681 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1682 and "environ.h".
1683 (linux_ptrace_fun): New function.
1684 (linux_create_inferior): Adjust function prototype to reflect
1685 change on "target.h". Adjust function code to use
1686 "fork_inferior".
1687 (linux_request_interrupt): Delete "signal_pid".
1688 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1689 (lynx_ptrace_fun): New function.
1690 (lynx_create_inferior): Adjust function prototype to reflect
1691 change on "target.h". Adjust function code to use
1692 "fork_inferior".
1693 * nto-low.c (nto_create_inferior): Adjust function prototype and
1694 code to reflect change on "target.h". Update comments.
1695 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1696 "common-terminal.h" and "environ.h".
1697 (terminal_fd): Moved to fork-child.c.
1698 (old_foreground_pgrp): Likewise.
1699 (restore_old_foreground_pgrp): Likewise.
1700 (last_status): Make it global.
1701 (last_ptid): Likewise.
1702 (our_environ): New variable.
1703 (startup_with_shell): Likewise.
1704 (program_name): Likewise.
1705 (program_argv): Rename to...
1706 (program_args): ...this.
1707 (wrapper_argv): New variable.
1708 (start_inferior): Delete function.
1709 (get_exec_wrapper): New function.
1710 (get_exec_file): Likewise.
1711 (get_environ): Likewise.
1712 (prefork_hook): Likewise.
1713 (post_fork_inferior): Likewise.
1714 (postfork_hook): Likewise.
1715 (postfork_child_hook): Likewise.
1716 (handle_v_run): Update code to deal with arguments coming from the
1717 remote host. Update calls from "start_inferior" to
1718 "create_inferior".
1719 (captured_main): Likewise. Initialize environment variable. Call
1720 "have_job_control".
1721 * server.h (post_fork_inferior): New prototype.
1722 (get_environ): Likewise.
1723 (last_status): Declare.
1724 (last_ptid): Likewise.
1725 (signal_pid): Likewise.
1726 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1727 (spu_ptrace_fun): New function.
1728 (spu_create_inferior): Adjust function prototype to reflect change
1729 on "target.h". Adjust function code to use "fork_inferior".
1730 * target.c (target_terminal_init): New function.
1731 (target_terminal_inferior): Likewise.
1732 (target_terminal_ours): Likewise.
1733 * target.h: Include <vector>.
1734 (struct target_ops) <create_inferior>: Update prototype.
1735 (create_inferior): Update macro.
1736 * utils.c (gdb_flush_out_err): New function.
1737 * win32-low.c (win32_create_inferior): Adjust function prototype
1738 and code to reflect change on "target.h".
1739
043a4934
SDJ
17402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1741
1742 * inferiors.c (switch_to_thread): New function.
1743
15652511
SDJ
17442017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1745
1746 * Makefile.in (SFILE): Add "common/job-control.c".
1747 (OBS): Add "job-control.o".
1748
21ea5acd
SDJ
17492017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1750
1751 * Makefile: Remove "@host_makefile_frag@".
1752
e13cb306
PA
17532017-05-05 Pedro Alves <palves@redhat.com>
1754
1755 * configure: Regenerate.
1756
c94fee56
SDJ
17572017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1758
1759 * configure: Regenerate.
1760
a0ff9e1a
SM
17612017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1762
1763 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1764 software_single_step change of return type to
1765 std::vector<CORE_ADDR>.
1766 * linux-low.c (install_software_single_step_breakpoints):
1767 Likewise.
1768 * linux-low.h (install_software_single_step_breakpoints):
1769 Likewise.
1770
be628ab8
SDJ
17712017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1772
1773 * remote-utils.c: Include "gdb_termios.h" instead of
1774 "terminal.h".
1775 * terminal.h: Delete file.
1776
7c5ded6a
SDJ
17772017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1778
1779 * server.c: Include <vector>.
1780 <program_argv, wrapper_argv>: Convert to std::vector.
1781 (start_inferior): Rewrite function to use C++.
1782 (handle_v_run): Likewise. Update code that calculates the argv
1783 based on the vRun packet; use C++.
1784 (captured_main): Likewise.
1785
436252de
SM
17862017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * server.c (handle_v_cont): Initialize thread_resume::thread
1789 with null_ptid.
1790
9bf2a700
PA
17912017-04-05 Pedro Alves <palves@redhat.com>
1792
1793 * configure: Regenerate.
1794
a121b7c1
PA
17952017-04-05 Pedro Alves <palves@redhat.com>
1796
1797 * gdbreplay.c (sync_error): Constify.
1798 * linux-x86-low.c (push_opcode): Constify.
1799
21c8a587
PA
18002017-04-05 Pedro Alves <palves@redhat.com>
1801
1802 * win32-low.c (get_child_debug_event)
1803 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1804 Report TARGET_WAITKIND_SPURIOUS instead.
1805
fb32b4f7
PA
18062017-04-05 Pedro Alves <palves@redhat.com>
1807
1808 * remote-utils.c (remote_prepare, remote_open): Constify.
1809 * remote-utils.h (remote_prepare, remote_open): Constify.
1810 * server.c (captured_main): Constify 'port' handling.
1811
65dd1e59
SM
18122017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * Makefile.in (clean): Clear .deps.
1815
8fa5b777
SM
18162017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1817
1818 * .gitignore: Remove generated files, replace with wildcard.
1819 * (clean): Replace removal of generated files with wildcard.
1820 (version.c): Replace with...
1821 (version-generated.c): ...this.
1822 (xml-builtin.c): Replace with...
1823 (xml-builtin-generated.c): ...this.
1824 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1825 (%.c: *regformats*): Replace with...
1826 (%-generated.c: *regformats*): ...this.
1827
a12e714b
MF
18282017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1829
1830 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1831 (xtensa_fill_gregset): Call collect_register_by_name for
1832 threadptr register.
1833 (xtensa_store_gregset): Call supply_register_by_name for
1834 threadptr register.
1835
1a09b50a
MF
18362017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1837
1838 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1839 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1840 (xtensa_store_gregset): Call supply_register for all registers in
1841 a0_regnum..a0_regnum + C0_NREGS range.
1842
1a01e7c6
SM
18432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1844
1845 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1846 (ax-ipa.o: ax.c): Remove.
1847 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1848 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1849 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1850 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1851 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1852
36bc18a8
SM
18532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1856 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1857 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1858 (errors-ipa.o: ../common/errors.c): Remove.
1859 (format-ipa.o: ../common/format.c): Remove.
1860 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1861
a8ebe3d5
SM
18622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1863
1864 * Makefile.in (%-ipa.o: %.c): New rule.
1865 (tracepoint-ipa.o: tracepoint.c): Remove.
1866 (utils-ipa.o: utils.c): Remove.
1867 (remote-utils-ipa.o: remote-utils.c): Remove.
1868 (regcache-ipa.o: regcache.c): Remove.
1869 (i386-linux-ipa.o: i386-linux.c): Remove.
1870 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1871 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1872 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1873 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1874 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1875 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1876 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1877 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1878 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1879 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1880 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1881 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1882 (aarch64-ipa.o: aarch64.c): Remove.
1883 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1884 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1885 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1886 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1887 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1888 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1889 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1890 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1891 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1892 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1893 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1894 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1895 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1896 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1897 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1898 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1899 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1900 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1901 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1902 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1903 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1904 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1905 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1906 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1907 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1908 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1909 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1910 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1911 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1912 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1913 (tdesc-ipa.o: tdesc.c): Remove.
1914 (x32-linux-ipa.o: x32-linux.c): Remove.
1915 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1916 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1917
50cfacb7
SM
19182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1919
1920 * Makefile.in (%.o: ../arch/%.c): New rule.
1921 (arm.o: ../arch/arm.c): Remove.
1922 (arm-linux.o: ../arch/arm-linux.c): Remove.
1923 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1924 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1925
c5a22423
SM
19262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1927
1928 * Makefile.in (%.o: ../nat/%.c): New rule.
1929 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1930 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1931 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1932 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1933 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1934 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1935 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1936 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1937 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1938 (linux-personality.o: ../nat/linux-personality.c): Remove.
1939 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1940 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1941 (x86-linux.o: ../nat/x86-linux.c): Remove.
1942 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1943 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1944
6bda016b
SM
19452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1946
1947 * Makefile.in (%.o: ../common/%.c): New rule.
1948 (signals.o: ../common/signals.c): Remove.
1949 (print-utils.o: ../common/print-utils.c): Remove.
1950 (rsp-low.o: ../common/rsp-low.c): Remove.
1951 (common-utils.o: ../common/common-utils.c): Remove.
1952 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1953 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1954 (vec.o: ../common/vec.c): Remove.
1955 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1956 (xml-utils.o: ../common/xml-utils.c): Remove.
1957 (ptid.o: ../common/ptid.c): Remove.
1958 (buffer.o: ../common/buffer.c): Remove.
1959 (format.o: ../common/format.c): Remove.
1960 (filestuff.o: ../common/filestuff.c): Remove.
1961 (agent.o: ../common/agent.c): Remove.
1962 (errors.o: ../common/errors.c): Remove.
1963 (environ.o: ../common/environ.c): Remove.
1964 (common-debug.o: ../common/common-debug.c): Remove.
1965 (cleanups.o: ../common/cleanups.c): Remove.
1966 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1967 (fileio.o: ../common/fileio.c): Remove.
1968 (common-regcache.o: ../common/common-regcache.c): Remove.
1969 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1970 (new-op.o: ../common/new-op.c): Remove.
1971 (btrace-common.o: ../common/btrace-common.c): Remove.
1972
21122961
SM
19732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * Makefile.in (%.o: ../target/%.c): New rule.
1976 (waitstatus.o: ../target/waitstatus.c): Remove.
1977
c362e621
SM
19782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1979
1980 * Makefile.in
1981 (%.c: ../regformats/%.dat,
1982 (%.c: ../regformats/arm/%.dat,
1983 (%.c: ../regformats/i386/%.dat,
1984 (%.c: ../regformats/rs6000/%.dat): New rules.
1985 (aarch64.c): Remove.
1986 (reg-arm.c): Remove.
1987 (arm-with-iwmmxt.c): Remove.
1988 (arm-with-vfpv2.c): Remove.
1989 (arm-with-vfpv3.c): Remove.
1990 (arm-with-neon.c): Remove.
1991 (reg-bfin.c): Remove.
1992 (reg-cris.c): Remove.
1993 (reg-crisv32.c): Remove.
1994 (i386.c): Remove.
1995 (i386-linux.c): Remove.
1996 (i386-avx.c): Remove.
1997 (i386-avx-linux.c): Remove.
1998 (i386-avx-avx512.c): Remove.
1999 (i386-avx-avx512-linux.c): Remove.
2000 (i386-mpx.c): Remove.
2001 (i386-mpx-linux.c): Remove.
2002 (i386-avx-mpx-avx512-pku.c): Remove.
2003 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2004 (i386-avx-mpx.c): Remove.
2005 (i386-avx-mpx-linux.c): Remove.
2006 (i386-mmx.c): Remove.
2007 (i386-mmx-linux.c): Remove.
2008 (reg-ia64.c): Remove.
2009 (reg-m32r.c): Remove.
2010 (reg-m68k.c): Remove.
2011 (reg-cf.c): Remove.
2012 (mips-linux.c): Remove.
2013 (mips-dsp-linux.c): Remove.
2014 (mips64-linux.c): Remove.
2015 (mips64-dsp-linux.c): Remove.
2016 (nios2-linux.c): Remove.
2017 (powerpc-32.c): Remove.
2018 (powerpc-32l.c): Remove.
2019 (powerpc-altivec32l.c): Remove.
2020 (powerpc-cell32l.c): Remove.
2021 (powerpc-vsx32l.c): Remove.
2022 (powerpc-isa205-32l.c): Remove.
2023 (powerpc-isa205-altivec32l.c): Remove.
2024 (powerpc-isa205-vsx32l.c): Remove.
2025 (powerpc-e500l.c): Remove.
2026 (powerpc-64l.c): Remove.
2027 (powerpc-altivec64l.c): Remove.
2028 (powerpc-cell64l.c): Remove.
2029 (powerpc-vsx64l.c): Remove.
2030 (powerpc-isa205-64l.c): Remove.
2031 (powerpc-isa205-altivec64l.c): Remove.
2032 (powerpc-isa205-vsx64l.c): Remove.
2033 (s390-linux32.c): Remove.
2034 (s390-linux32v1.c): Remove.
2035 (s390-linux32v2.c): Remove.
2036 (s390-linux64.c): Remove.
2037 (s390-linux64v1.c): Remove.
2038 (s390-linux64v2.c): Remove.
2039 (s390-te-linux64.c): Remove.
2040 (s390-vx-linux64.c): Remove.
2041 (s390-tevx-linux64.c): Remove.
2042 (s390x-linux64.c): Remove.
2043 (s390x-linux64v1.c): Remove.
2044 (s390x-linux64v2.c): Remove.
2045 (s390x-te-linux64.c): Remove.
2046 (s390x-vx-linux64.c): Remove.
2047 (s390x-tevx-linux64.c): Remove.
2048 (tic6x-c64xp-linux.c): Remove.
2049 (tic6x-c64x-linux.c): Remove.
2050 (tic6x-c62x-linux.c): Remove.
2051 (reg-sh.c): Remove.
2052 (reg-sparc64.c): Remove.
2053 (reg-spu.c): Remove.
2054 (amd64.c): Remove.
2055 (amd64-linux.c): Remove.
2056 (amd64-avx.c): Remove.
2057 (amd64-avx-linux.c): Remove.
2058 (amd64-avx-avx512.c): Remove.
2059 (amd64-avx-avx512-linux.c): Remove.
2060 (amd64-mpx.c): Remove.
2061 (amd64-mpx-linux.c): Remove.
2062 (amd64-avx-mpx-avx512-pku.c): Remove.
2063 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2064 (amd64-avx-mpx.c): Remove.
2065 (amd64-avx-mpx-linux.c): Remove.
2066 (x32.c): Remove.
2067 (x32-linux.c): Remove.
2068 (x32-avx.c): Remove.
2069 (x32-avx-linux.c): Remove.
2070 (x32-avx-avx512.c): Remove.
2071 (x32-avx-avx512-linux.c): Remove.
2072 (reg-xtensa.c): Remove.
2073 (reg-tilegx.c): Remove.
2074 (reg-tilegx32.c): Remove.
2075
1672e0d9
SDJ
20762017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2077
2078 * Makefile.in (SFILES): Add "common/environ.c".
2079 (OBJS): Add "common/environ.h".
2080
239b6d10
WT
20812017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2082
2083 * configure.ac: Check if the fs_base and gs_base members of
2084 `struct user_regs_struct' exist.
2085 * config.in: Regenerated.
2086 * configure: Likewise.
2087
694b382c
AT
20882017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2089
2090 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2091 target_read_memory.
2092 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2093 (get_next_pcs_syscall_next_pc): Likewise.
2094
7dc53023
LM
20952016-12-23 Luis Machado <lgustavo@codesourcery.com>
2096
2097 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2098 * nto-x86-low.c: Likewise.
2099
ad02e4fe
SM
21002016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2101
2102 * Makefile.in: Include disable-implicit-rules.mk.
2103
dcb07cfa
PA
21042016-11-23 Pedro Alves <palves@redhat.com>
2105
2106 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2107 (debug_vprintf): Use std::chrono::steady_clock instead of
2108 gettimeofday. Use '.' instead of ':'.
2109 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2110 (get_timestamp): Use std::chrono::steady_clock instead of
2111 gettimeofday.
2112
8629c02c
SM
21132016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2114
2115 * Makefile.in: Fix whitespace formatting.
2116
b593ecca
SM
21172016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2118
2119 * Makefile.in (SFILES, OBS): Flatten list and order
2120 alphabetically.
2121
9986ba08
PA
21222016-11-23 Pedro Alves <palves@redhat.com>
2123
2124 * event-loop.c (handle_file_event): Use warning.
2125 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2126 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2127 Use warning.
2128
4eefa7bc
PA
21292016-11-23 Pedro Alves <palves@redhat.com>
2130
2131 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2132 output.
2133 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2134 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2135 debug_printf and debug_flush for debug output.
2136 * server.c (handle_general_set): Likewise.
2137 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2138 output.
2139
5443506e
SM
21402016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2141
2142 * Makefile.in (.c.o): Replace rule with ...
2143 (%.o: %.c): ... this one.
2144
3b165252
SM
21452016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2146
2147 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2148 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2149 make.
2150 * configure.ac: Remove checks for the make program.
2151 * configure: Re-generate.
2152
0bcda685
PA
21532016-10-28 Pedro Alves <palves@redhat.com>
2154
2155 * Makefile.in (CXX_DIALECT): Get from configure.
2156 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2157 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2158 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2159 * config.in: Regenerate.
2160 * configure: Regenerate.
2161
c3805894
YQ
21622016-10-27 Yao Qi <yao.qi@linaro.org>
2163
2164 * linux-low.c (linux_supports_range_stepping): Return true if
2165 can_software_single_step return true.
2166
89342618
YQ
21672016-10-27 Yao Qi <yao.qi@linaro.org>
2168
2169 * inferiors.c (find_inferior_in_random): New function.
2170 * inferiors.h (find_inferior_in_random): Declare.
2171 * linux-low.c (linux_wait_for_event_filtered): Call
2172 find_inferior_in_random instead of find_inferior.
2173
e3652c84
YQ
21742016-10-27 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-low.c (linux_wait_1): If single-step breakpoints are
2177 inserted, remove them.
2178
5a04c4cf
PA
21792016-10-26 Pedro Alves <palves@redhat.com>
2180
2181 * linux-low.c (handle_extended_wait): Link parent/child fork
2182 threads.
2183 (linux_wait_1): Unlink them.
2184 (linux_set_resume_request): Ignore resume requests for
2185 already-resumed and unhandled fork child threads.
2186 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2187 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2188 New functions.
2189 (handle_v_requests) <vCont>: Don't call require_running.
2190 * server.h (in_queued_stop_replies): New declaration.
2191
cb93dc7f
YQ
21922016-10-24 Yao Qi <yao.qi@linaro.org>
2193
2194 PR server/20733
2195 * linux-aarch64-low.c (append_insns): Cast the return value to
2196 'uint32_t *'.
2197
a1078bea
YQ
21982016-10-10 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2201
1fb77080
SDJ
22022016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2203
2204 * target.c (target_supports_multi_process): New function, moved
2205 from...
2206 * target.h (target_supports_multi_process): ... here. Remove
2207 macro.
2208
39b5a3b9
TT
22092016-10-05 Tom Tromey <tom@tromey.com>
2210
2211 PR remote/20655:
2212 * tracepoint.c (handle_tracepoint_bkpts): Check
2213 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2214
c1d0b70a
YQ
22152016-10-05 Yao Qi <yao.qi@linaro.org>
2216
2217 * configure.srv: Update the path of arm-*.xml files.
2218
0a69eedb
YQ
22192016-10-05 Terry Guo <terry.guo@arm.com>
2220 Yao Qi <yao.qi@linaro.org>
2221
2222 * Makefile.in: Adjust the path of rules.
2223 * configure.srv: Update the path of xml files.
2224 * regformats/arm-with-iwmmxt.dat: Regenerated.
2225 * regformats/arm-with-neon.dat: Likewise.
2226 * regformats/arm-with-vfpv2.dat: Likewise.
2227 * regformats/arm-with-vfpv3.dat Likewise.
2228
17e16485
YQ
22292016-09-30 Yao Qi <yao.qi@linaro.org>
2230
2231 PR gdbserver/20627
2232 * target.c (target_stop_and_wait): Don't call
2233 target_continue_no_signal, use resume_stop instead.
2234
edeeb602
YQ
22352016-09-26 Yao Qi <yao.qi@linaro.org>
2236
2237 * linux-low.c (linux_wait_1): Call debug_exit.
2238
503b1c39
PA
22392016-09-23 Pedro Alves <palves@redhat.com>
2240
2241 * Makefile.in (SFILES): Add common/new-op.c.
2242 (OBS): Add common/new-op.o.
2243 (new-op.o): New rule.
2244
74172ecf
SM
22452016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2246
2247 * .gitinore: Ignore more files.
2248
fc6cda2e
YQ
22492016-09-21 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2252 23.
2253
bc1e6c81
SDJ
22542016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2255
2256 * server.c (start_inferior): Call target_mourn_inferior instead of
2257 mourn_inferior; pass ptid_t argument to it.
2258 (resume): Likewise.
2259 (handle_target_event): Likewise.
2260 * target.c (target_mourn_inferior): New function.
2261 * target.h (mourn_inferior): Delete macro.
2262
0e00e962
AA
22632016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2264
2265 * linux-low.c (lwp_is_stepping): New function.
2266
1d8cb77d
CL
22672016-09-06 Carl Love <cel@us.ibm.com>
2268
2269 * server.c (start_inferior): Fixed comment, requested comment change
2270 didn't get updated correctly. Removed reference to ptrace () call as
2271 it is only true on Linux systems.
2272
7313bced
CL
22732016-09-06 Carl Love <cel@us.ibm.com>
2274
2275 * server.c (start_inferior): Do not call
2276 function target_post_create_inferior () if the
2277 inferior process has already exited.
2278
cf6de44d
PA
22792016-09-05 Pedro Alves <palves@redhat.com>
2280
2281 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2282 (COMPILE.pre, CC_LD): Use CXX directly.
2283 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2284 * acinclude.m4: Don't include build-with-cxx.m4.
2285 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2286 * configure: Regenerate.
2287
c1da6748
AT
22882016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2289
2290 PR gdb/19495
2291 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2292 call writing data to own_buf.
2293
f2b9e3df
SDJ
22942016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2295
2296 * target.c (mywait): Call target_wait instead of
2297 the_target->wait.
2298 (target_wait): New function.
2299
049a8570
SDJ
23002016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2301
2302 * server.c (start_inferior): New variable 'ptid'. Replace calls
2303 to the_target->resume by target_continue{,_no_signal}, depending
2304 on the case.
2305 * target.c (target_stop_and_wait): Call target_continue_no_signal
2306 instead of the_target->resume.
2307 (target_continue): New function.
2308
3aa5cfa0
AT
23092016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2310
2311 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2312
754653a7
AZ
23132016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2314
2315 PR server/20491
2316 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2317 ps_prochandle.
2318 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2319 * linux-arm-low.c (ps_get_thread_area): Likewise.
2320 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2321 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2322 * linux-mips-low.c (ps_get_thread_area): Likewise.
2323 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2324 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2325 * linux-x86-low.c (ps_get_thread_area): Likewise.
2326 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2327
ed036b40
PA
23282016-08-19 Pedro Alves <palves@redhat.com>
2329
2330 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2331
c8ef42ee
PA
23322016-08-19 Pedro Alves <palves@redhat.com>
2333
2334 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2335 comment. Use memcpy instead of casting through unsigned long.
2336
9c235a72
PA
23372016-08-19 Pedro Alves <palves@redhat.com>
2338
2339 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2340 allocating around 0x80000000.
2341
201506da
PA
23422016-08-19 Pedro Alves <palves@redhat.com>
2343
2344 PR gdb/20415
2345 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2346 (x32-avx512-linux-ipa.o): New rules.
2347 * configure.ac (x86_64-*-linux*): New x32 check.
2348 * configure.srv (ipa_x32_linux_regobj): New.
2349 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2350 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2351 descriptions.
2352 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2353 descriptions.
2354 * configure: Regenerate.
2355
f348d89a
PA
23562016-08-09 Pedro Alves <palves@redhat.com>
2357
2358 PR gdb/18653
2359 * Makefile.in (OBS): Add signals-state-save-restore.o.
2360 (signals-state-save-restore.o): New rule.
2361 * config.in: Regenerate.
2362 * configure: Regenerate.
2363 * linux-low.c: Include "signals-state-save-restore.h".
2364 (linux_create_inferior): Call
2365 restore_original_signals_state.
2366 * server.c: Include "dispositions-save-restore.h".
2367 (captured_main): Call save_original_signals_state.
2368
1baf5149
PA
23692016-08-05 Pedro Alves <palves@redhat.com>
2370
2371 * configure: Regenerate.
2372
fcd4a73d
YQ
23732016-08-04 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-low.c (regsets_fetch_inferior_registers): Check
2376 errno is ESRCH or not.
2377
979659d0
YQ
23782016-08-02 Yao Qi <yao.qi@linaro.org>
2379
2380 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2381 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2382 (thread_db_load_search): Update.
2383 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2384 td_ta_set_event and td_ta_event_getmsg.
2385
6598661d
PA
23862016-07-26 Pedro Alves <palves@redhat.com>
2387
2388 PR server/20414
2389 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2390 of unsigned long for 64-bit registers and use uint32_t instead of
2391 unsigned int for 32-bit registers.
2392
9cf12d57
PA
23932016-07-26 Pedro Alves <palves@redhat.com>
2394
2395 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2396 to 'ptrace'.
2397
305450ed
TT
23982016-07-21 Tom Tromey <tom@tromey.com>
2399
2400 * configure: Rebuild.
2401
2583da7c
YQ
24022016-07-21 Yao Qi <yao.qi@linaro.org>
2403
2404 * mem-break.c (find_gdb_breakpoint): Cast bp to
2405 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2406
21536b36
YQ
24072016-07-21 Yao Qi <yao.qi@linaro.org>
2408
2409 * server.c (handle_v_requests): Support s and S actions
2410 if target_supports_software_single_step return true.
2411
8901d193
YQ
24122016-07-21 Yao Qi <yao.qi@linaro.org>
2413
2414 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2415 is resume_step, call maybe_hw_step.
2416 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2417 and unstop them.
2418 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2419 breakpoints or not.
2420 (proceed_one_lwp): If resume request is resume_step, install
2421 reinsert breakpoints and call maybe_hw_step.
2422
0e9a339e
YQ
24232016-07-21 Yao Qi <yao.qi@linaro.org>
2424
2425 * linux-low.c (proceed_one_lwp): Declare.
2426 (linux_resume_one_thread): Remove local variable 'step'.
2427 Lift code enqueue signal. Call proceed_one_lwp instead of
2428 linux_resume_one_lwp.
2429
4281b351
YQ
24302016-07-21 Yao Qi <yao.qi@linaro.org>
2431
2432 * linux-low.c (linux_resume_one_thread): Call
2433 enqueue_pending_signal.
2434
984a2c04
YQ
24352016-07-21 Yao Qi <yao.qi@linaro.org>
2436
2437 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2438 * inferiors.c (do_restore_current_thread_cleanup): New function.
2439 (make_cleanup_restore_current_thread): Likewise.
2440 * linux-low.c (install_software_single_step_breakpoints): Call
2441 make_cleanup_restore_current_thread. Switch current_thread to
2442 thread.
2443
bec903c9
YQ
24442016-07-21 Yao Qi <yao.qi@linaro.org>
2445
2446 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2447 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2448 (clone_one_breakpoint): Likewise.
2449 (delete_reinsert_breakpoints): Change parameter to thread.
2450 Callers updated.
2451 (has_reinsert_breakpoints): Likewise.
2452 (uninsert_reinsert_breakpoints): Likewise.
2453 (reinsert_reinsert_breakpoints): Likewise.
2454 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2455 (delete_reinsert_breakpoints): Likewise.
2456 (reinsert_reinsert_breakpoints): Likewise.
2457 (uninsert_reinsert_breakpoints): Likewise.
2458 (has_reinsert_breakpoints): Likewise.
2459
63c40ec7
YQ
24602016-07-21 Yao Qi <yao.qi@linaro.org>
2461
2462 * inferiors.c (get_thread_process): Make parameter const.
2463 * inferiors.h (get_thread_process): Update declaration.
2464 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2465 Add new parameters child_thread and parent_thread. Callers
2466 updated.
2467 * mem-break.h (clone_all_breakpoints): Update declaration.
2468
9aa76cd0
YQ
24692016-07-21 Yao Qi <yao.qi@linaro.org>
2470
2471 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2472 <command_list, handler>: Remove.
2473 (struct gdb_breakpoint): New.
2474 (struct other_breakpoint): New.
2475 (struct reinsert_breakpoint): New.
2476 (is_gdb_breakpoint): New function.
2477 (any_persistent_commands): Update command_list if
2478 is_gdb_breakpoint returns true.
2479 (set_breakpoint): Create breakpoints according to their types.
2480 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2481 (set_gdb_breakpoint_1): Likewise.
2482 (set_gdb_breakpoint): Likewise.
2483 (clear_breakpoint_conditions): Change parameter type to
2484 'struct gdb_breakpoint *'.
2485 (clear_breakpoint_commands): Likewise.
2486 (clear_breakpoint_conditions_and_commands): Likewise.
2487 (add_condition_to_breakpoint): Likewise.
2488 (add_breakpoint_condition): Likewise.
2489 (add_commands_to_breakpoint): Likewise.
2490 (check_breakpoints): Check other_breakpoint.
2491 (clone_one_breakpoint): Clone breakpopint according to its type.
2492 * mem-break.h (struct gdb_breakpoint): Declare.
2493 (set_gdb_breakpoint): Update declaration.
2494 (clear_breakpoint_conditions_and_commands): Likewise.
2495 (add_breakpoint_condition): Likewise.
2496 (add_breakpoint_commands): Likewise.
2497 * server.c (process_point_options): Change parameter type to
2498 'struct gdb_breakpoint *'.
2499
811f8301
YQ
25002016-07-21 Yao Qi <yao.qi@linaro.org>
2501
2502 * mem-break.c (set_breakpoint_at): Rename it to ...
2503 (set_breakpoint_type_at): ... it.
2504 (set_breakpoint_at): Call set_breakpoint_type_at.
2505 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2506 * mem-break.h (set_breakpoint_at): Update comments.
2507
b1c51e36
CLT
25082016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2509
2510 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2511 to buf parameter.
2512 (nios2_store_gregset): Likewise.
2513
ced2dffb
PA
25142016-07-01 Pedro Alves <palves@redhat.com>
2515 Antoine Tremblay <antoine.tremblay@ericsson.com>
2516
2517 * linux-low.c: Change interface to take the target lwp_info
2518 pointer directly and return void. Handle detaching from a zombie
2519 thread.
2520 (linux_detach_lwp_callback): New function.
2521 (linux_detach): Detach from the leader thread after detaching from
2522 the clone threads.
2523
2ac09a5b
YQ
25242016-06-28 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2527 for variable new_offset.
2528 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2529 (aarch64_ftrace_insn_reloc_cb): Likewise.
2530 (aarch64_ftrace_insn_reloc_tb): Likewise.
2531 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2532 PRIx64 instead of PRIx32.
2533
79e7fd4f
YQ
25342016-06-28 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2537 (the_low_target): Install arm_get_syscall_trapinfo.
2538
061fc021
YQ
25392016-06-28 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2542 function.
2543 (the_low_target): Install aarch64_get_syscall_trapinfo.
2544
4cc32bec
YQ
25452016-06-28 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2548 Callers updated.
2549 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2550 Remove parameter sysno.
2551 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2552 sysret.
2553
782c1122
AA
25542016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2555
2556 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2557 (s390_emit_ne_goto): Likewise.
2558 (s390_emit_lt_goto): Likewise.
2559 (s390_emit_le_goto): Likewise.
2560 (s390_emit_gt_goto): Likewise.
2561 (s390_emit_ge_goto): Likewise.
2562 (s390x_emit_eq_goto): Likewise.
2563 (s390x_emit_ne_goto): Likewise.
2564 (s390x_emit_lt_goto): Likewise.
2565 (s390x_emit_le_goto): Likewise.
2566 (s390x_emit_gt_goto): Likewise.
2567 (s390x_emit_ge_goto): Likewise.
2568 (s390_emit_ops_impl): Mark variable static.
2569 (s390x_emit_ops): Likewise.
2570
2e7b624b
YQ
25712016-06-17 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-low.c (handle_extended_wait): Call
2574 uninsert_reinsert_breakpoints for the parent process. Remove
2575 reinsert breakpoints from the child process. Reinsert them to
2576 the parent process when vfork is done.
2577 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2578 (reinsert_reinsert_breakpoints): New function.
2579 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2580 (reinsert_reinsert_breakpoints): Declare.
2581
8a81c5d7
YQ
25822016-06-17 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-low.c (handle_extended_wait): If the parent is doing
2585 step-over, remove the reinsert breakpoints from the forked child.
2586
f50bf8e5
YQ
25872016-06-17 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-low.c (unsuspend_all_lwps): Declare.
2590 (linux_low_filter_event): If thread exited, call finish_step_over.
2591 If step-over is finished, unsuspend other threads.
2592
8376a3cb
YQ
25932016-06-17 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-low.c (linux_resume_one_lwp_throw): Assert
2596 has_reinsert_breakpoints returns false.
2597 * mem-break.c (delete_disabled_breakpoints): Assert
2598 bp type isn't reinsert_breakpoint.
2599
f79b145d
YQ
26002016-06-17 Yao Qi <yao.qi@linaro.org>
2601
2602 * linux-low.c (maybe_hw_step): New function.
2603 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2604 (finish_step_over): Switch current_thread to lwp temporarily,
2605 and assert has_reinsert_breakpoints returns true.
2606 (proceed_one_lwp): Call maybe_hw_step.
2607 * mem-break.c (has_reinsert_breakpoints): New function.
2608 * mem-break.h (has_reinsert_breakpoints): Declare.
2609
0ae534d2
JT
26102016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2611
2612 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2613
fcdad592
YQ
26142016-05-17 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2617 instead of find_inferior.
2618
9e784964
YQ
26192016-05-05 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2622 Initialize res to zero.
2623
cf2ebb6e
YQ
26242016-05-05 Yao Qi <yao.qi@linaro.org>
2625
2626 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2627 to uint32_t.
2628
c1aebf87
UW
26292016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2630
2631 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2632 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2633 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2634
35fd2deb 26352016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2636 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2637
2638 * tracepoint.c (write_inferior_int8): New function.
2639 (cmd_qtenable_disable): Write enable flag using
2640 write_inferior_int8.
2641
484b3c32
YQ
26422016-04-25 Yao Qi <yao.qi@linaro.org>
2643
2644 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2645 (need_step_over_p): Return zero if the LWP has pending signals
2646 can be delivered on software single step target.
2647
85ba7d86
YQ
26482016-04-25 Yao Qi <yao.qi@linaro.org>
2649
2650 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2651 return instead of error.
2652
3539aa13
YQ
26532016-04-22 Yao Qi <yao.qi@linaro.org>
2654
2655 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2656 to 23.
2657
5b061e98
YQ
26582016-04-22 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2661 signal when stepping over breakpoint with software single
2662 step.
2663
3451269c
PA
26642016-04-21 Pedro Alves <palves@redhat.com>
2665
2666 * linux-s390-low.c (s390_collect_ptrace_register)
2667 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2668 add casts.
2669 (s390_check_regset): Use void * instead of gdb_byte *.
2670
a2358508
PA
26712016-04-20 Pedro Alves <palves@redhat.com>
2672
2673 * configure: Renegerate.
2674
6885166d
YQ
26752016-04-20 Yao Qi <yao.qi@linaro.org>
2676
2677 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2678 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2679 number 16.
2680 (arm_store_gregset): Likewise.
2681
2b863f51
WT
26822016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2683
2684 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2685 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2686 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2687 (amd64-avx-mpx-linux.c): New rules.
2688 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2689 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2690 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2691 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2692 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2693 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2694 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2695 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2696 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2697 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2698 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2699 * linux-x86-low.c (x86_linux_read_description): Add case for
2700 X86_XSTATE_AVX_MPX_MASK.
2701 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2702 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2703 init_registers_i386_avx_mpx_linux.
2704 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2705 (initialize_low_tracepoint): Call
2706 init_registers_i386_avx_mpx_linux.
2707 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2708 (initialize_low_tracepoint): Call
2709 init_registers_amd64_avx_mpx_linux.
2710 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2711 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2712 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2713 declarations.
2714
9b30624b
PA
27152016-04-18 Pedro Alves <palves@redhat.com>
2716
2717 * configure: Regenerate.
2718
45e3745e
AT
27192016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2720
2721 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2722 (aarch64_emit_sub): Likewise.
2723
2afc13ff
PA
27242016-04-12 Pedro Alves <palves@redhat.com>
2725
2726 * utils.c (prepare_to_throw_exception): Delete.
2727
6e774b13
SM
27282016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2729
2730 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2731
4dca19f8
MK
27322016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2733
2734 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2735
d0a9981f
MK
27362016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2737
2738 * linux-aarch64-ipa.c: Add <elf.h> include.
2739 * linux-ppc-ipa.c: Add <elf.h> include.
2740 * linux-s390-ipa.c: Add <elf.h> include.
2741
252db07e
MK
27422016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2745 (get_raw_reg_ptr): Likewise.
2746 (get_trace_state_variable_value_ptr): Likewise.
2747 (set_trace_state_variable_value_ptr): Likewise.
2748 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2749 char *.
2750
14e2b6d9
MK
27512016-03-31 Wei-cheng Wang <cole945@gmail.com>
2752 Marcin Kościelnicki <koriakin@0x04.net>
2753
2754 PR/17221
2755 * linux-ppc-low.c (emit_insns): New function.
2756 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2757 (ppc_emit_prologue): New function.
2758 (ppc_emit_epilogue): New function.
2759 (ppc_emit_add): New function.
2760 (ppc_emit_sub): New function.
2761 (ppc_emit_mul): New function.
2762 (ppc_emit_lsh): New function.
2763 (ppc_emit_rsh_signed): New function.
2764 (ppc_emit_rsh_unsigned): New function.
2765 (ppc_emit_ext): New function.
2766 (ppc_emit_zero_ext): New function.
2767 (ppc_emit_log_not): New function.
2768 (ppc_emit_bit_and): New function.
2769 (ppc_emit_bit_or): New function.
2770 (ppc_emit_bit_xor): New function.
2771 (ppc_emit_bit_not): New function.
2772 (ppc_emit_equal): New function.
2773 (ppc_emit_less_signed): New function.
2774 (ppc_emit_less_unsigned): New function.
2775 (ppc_emit_ref): New function.
2776 (ppc_emit_const): New function.
2777 (ppc_emit_reg): New function.
2778 (ppc_emit_pop): New function.
2779 (ppc_emit_stack_flush): New function.
2780 (ppc_emit_swap): New function.
2781 (ppc_emit_stack_adjust): New function.
2782 (ppc_emit_call): New function.
2783 (ppc_emit_int_call_1): New function.
2784 (ppc_emit_void_call_2): New function.
2785 (ppc_emit_if_goto): New function.
2786 (ppc_emit_goto): New function.
2787 (ppc_emit_eq_goto): New function.
2788 (ppc_emit_ne_goto): New function.
2789 (ppc_emit_lt_goto): New function.
2790 (ppc_emit_le_goto): New function.
2791 (ppc_emit_gt_goto): New function.
2792 (ppc_emit_ge_goto): New function.
2793 (ppc_write_goto_address): New function.
2794 (ppc_emit_ops_impl): New static variable.
2795 (ppc64v1_emit_prologue): New function.
2796 (ppc64v2_emit_prologue): New function.
2797 (ppc64_emit_epilogue): New function.
2798 (ppc64_emit_add): New function.
2799 (ppc64_emit_sub): New function.
2800 (ppc64_emit_mul): New function.
2801 (ppc64_emit_lsh): New function.
2802 (ppc64_emit_rsh_signed): New function.
2803 (ppc64_emit_rsh_unsigned): New function.
2804 (ppc64_emit_ext): New function.
2805 (ppc64_emit_zero_ext): New function.
2806 (ppc64_emit_log_not): New function.
2807 (ppc64_emit_bit_and): New function.
2808 (ppc64_emit_bit_or): New function.
2809 (ppc64_emit_bit_xor): New function.
2810 (ppc64_emit_bit_not): New function.
2811 (ppc64_emit_equal): New function.
2812 (ppc64_emit_less_signed): New function.
2813 (ppc64_emit_less_unsigned): New function.
2814 (ppc64_emit_ref): New function.
2815 (ppc64_emit_const): New function.
2816 (ppc64v1_emit_reg): New function.
2817 (ppc64v2_emit_reg): New function.
2818 (ppc64_emit_pop): New function.
2819 (ppc64_emit_stack_flush): New function.
2820 (ppc64_emit_swap): New function.
2821 (ppc64v1_emit_call): New function.
2822 (ppc64v2_emit_call): New function.
2823 (ppc64v1_emit_int_call_1): New function.
2824 (ppc64v2_emit_int_call_1): New function.
2825 (ppc64v1_emit_void_call_2): New function.
2826 (ppc64v2_emit_void_call_2): New function.
2827 (ppc64_emit_if_goto): New function.
2828 (ppc64_emit_eq_goto): New function.
2829 (ppc64_emit_ne_goto): New function.
2830 (ppc64_emit_lt_goto): New function.
2831 (ppc64_emit_le_goto): New function.
2832 (ppc64_emit_gt_goto): New function.
2833 (ppc64_emit_ge_goto): New function.
2834 (ppc64v1_emit_ops_impl): New static variable.
2835 (ppc64v2_emit_ops_impl): New static variable.
2836 (ppc_emit_ops): New function.
2837 (linux_low_target): Wire in ppc_emit_ops.
2838
a2174ba4
MK
28392016-03-31 Wei-cheng Wang <cole945@gmail.com>
2840 Marcin Kościelnicki <koriakin@0x04.net>
2841
2842 PR/17221
2843 * Makefile.in: Add powerpc-*-ipa.o
2844 * configure.srv: Add ipa_obj for powerpc*-linux.
2845 * linux-ppc-ipa.c: New file.
2846 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2847 includes.
2848 (PPC_FIELD): New macro.
2849 (PPC_SEXT): New macro.
2850 (PPC_OP6): New macro.
2851 (PPC_BO): New macro.
2852 (PPC_LI): New macro.
2853 (PPC_BD): New macro.
2854 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2855 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2856 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2857 (ppc_get_thread_area): New function.
2858 (is_elfv2_inferior): New function.
2859 (gen_ds_form): New function.
2860 (GEN_STD): New macro.
2861 (GEN_STDU): New macro.
2862 (GEN_LD): New macro.
2863 (GEN_LDU): New macro.
2864 (gen_d_form): New function.
2865 (GEN_ADDI): New macro.
2866 (GEN_ADDIS): New macro.
2867 (GEN_LI): New macro.
2868 (GEN_LIS): New macro.
2869 (GEN_ORI): New macro.
2870 (GEN_ORIS): New macro.
2871 (GEN_LWZ): New macro.
2872 (GEN_STW): New macro.
2873 (GEN_STWU): New macro.
2874 (gen_xfx_form): New function.
2875 (GEN_MFSPR): New macro.
2876 (GEN_MTSPR): New macro.
2877 (GEN_MFCR): New macro.
2878 (GEN_MTCR): New macro.
2879 (GEN_SYNC): New macro.
2880 (GEN_LWSYNC): New macro.
2881 (gen_x_form): New function.
2882 (GEN_OR): New macro.
2883 (GEN_MR): New macro.
2884 (GEN_LWARX): New macro.
2885 (GEN_STWCX): New macro.
2886 (GEN_CMPW): New macro.
2887 (gen_md_form): New function.
2888 (GEN_RLDICL): New macro.
2889 (GEN_RLDICR): New macro.
2890 (gen_i_form): New function.
2891 (GEN_B): New macro.
2892 (GEN_BL): New macro.
2893 (gen_b_form): New function.
2894 (GEN_BNE): New macro.
2895 (GEN_LOAD): New macro.
2896 (GEN_STORE): New macro.
2897 (gen_limm): New function.
2898 (gen_atomic_xchg): New function.
2899 (gen_call): New function.
2900 (ppc_relocate_instruction): New function.
2901 (ppc_install_fast_tracepoint_jump_pad): New function.
2902 (ppc_get_min_fast_tracepoint_insn_len): New function.
2903 (ppc_get_ipa_tdesc_idx): New function.
2904 (the_low_target): Wire in the new functions.
2905 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2906 tdescs.
2907 * linux-ppc-tdesc.h: New file.
2908
a13c4696
MK
29092016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2910
2911 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2912 (alloc_jump_pad_buffer): New function.
2913 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2914 (alloc_jump_pad_buffer): New function.
2915 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2916 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2917 (alloc_jump_pad_buffer): New function.
2918 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2919 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2920 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2921 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2922
1cda1512
MK
29232016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2924
2925 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2926 * linux-amd64-ipa.c: Likewise.
2927 * linux-i386-ipa.c: Likewise.
2928 * linux-s390-ipa.c: Likewise.
2929 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2930 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2931 set_trace_state_variable_value_ptr.
2932 (struct ipa_sym_addresses): Likewise.
2933 (symbol_list): Likewise.
2934 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2935 accessing gdb_collect directly.
2936 (gdb_collect_ptr_type): New typedef.
2937 (get_raw_reg_ptr_type): New typedef.
2938 (get_trace_state_variable_value_ptr_type): New typedef.
2939 (set_trace_state_variable_value_ptr_type): New typedef.
2940 (gdb_collect_ptr): New global.
2941 (get_raw_reg_ptr): New global.
2942 (get_trace_state_variable_value_ptr): New global.
2943 (set_trace_state_variable_value_ptr): New global.
2944 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2945 accessing get_raw_reg directly.
2946 (get_get_tsv_func_addr): Likewise for
2947 get_trace_state_variable_value_ptr.
2948 (get_set_tsv_func_addr): Likewise for
2949 set_trace_state_variable_value_ptr.
2950 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2951
72fb5488
SM
29522016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2955
28170b88
MK
29562016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2957
2958 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2959 packets.
2960 (relocate_instruction): Remove own_buf.
2961 * server.c (own_buf): Make global.
2962 (handle_v_requests): Make global.
2963 * server.h (own_buf): New declaration.
2964 (handle_v_requests): New prototype.
2965
f39e8743
MK
29662016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2967
2968 PR 18377
2969 * linux-s390-low.c (add_insns): New function.
2970 (s390_emit_prologue): New function.
2971 (s390_emit_epilogue): New function.
2972 (s390_emit_add): New function.
2973 (s390_emit_sub): New function.
2974 (s390_emit_mul): New function.
2975 (s390_emit_lsh): New function.
2976 (s390_emit_rsh_signed): New function.
2977 (s390_emit_rsh_unsigned): New function.
2978 (s390_emit_ext): New function.
2979 (s390_emit_log_not): New function.
2980 (s390_emit_bit_and): New function.
2981 (s390_emit_bit_or): New function.
2982 (s390_emit_bit_xor): New function.
2983 (s390_emit_bit_not): New function.
2984 (s390_emit_equal): New function.
2985 (s390_emit_less_signed): New function.
2986 (s390_emit_less_unsigned): New function.
2987 (s390_emit_ref): New function.
2988 (s390_emit_if_goto): New function.
2989 (s390_emit_goto): New function.
2990 (s390_write_goto_address): New function.
2991 (s390_emit_litpool): New function.
2992 (s390_emit_const): New function.
2993 (s390_emit_call): New function.
2994 (s390_emit_reg): New function.
2995 (s390_emit_pop): New function.
2996 (s390_emit_stack_flush): New function.
2997 (s390_emit_zero_ext): New function.
2998 (s390_emit_swap): New function.
2999 (s390_emit_stack_adjust): New function.
3000 (s390_emit_set_r2): New function.
3001 (s390_emit_int_call_1): New function.
3002 (s390_emit_void_call_2): New function.
3003 (s390_emit_eq_goto): New function.
3004 (s390_emit_ne_goto): New function.
3005 (s390_emit_lt_goto): New function.
3006 (s390_emit_le_goto): New function.
3007 (s390_emit_gt_goto): New function.
3008 (s390_emit_ge_goto): New function.
3009 (s390x_emit_prologue): New function.
3010 (s390x_emit_epilogue): New function.
3011 (s390x_emit_add): New function.
3012 (s390x_emit_sub): New function.
3013 (s390x_emit_mul): New function.
3014 (s390x_emit_lsh): New function.
3015 (s390x_emit_rsh_signed): New function.
3016 (s390x_emit_rsh_unsigned): New function.
3017 (s390x_emit_ext): New function.
3018 (s390x_emit_log_not): New function.
3019 (s390x_emit_bit_and): New function.
3020 (s390x_emit_bit_or): New function.
3021 (s390x_emit_bit_xor): New function.
3022 (s390x_emit_bit_not): New function.
3023 (s390x_emit_equal): New function.
3024 (s390x_emit_less_signed): New function.
3025 (s390x_emit_less_unsigned): New function.
3026 (s390x_emit_ref): New function.
3027 (s390x_emit_if_goto): New function.
3028 (s390x_emit_const): New function.
3029 (s390x_emit_call): New function.
3030 (s390x_emit_reg): New function.
3031 (s390x_emit_pop): New function.
3032 (s390x_emit_stack_flush): New function.
3033 (s390x_emit_zero_ext): New function.
3034 (s390x_emit_swap): New function.
3035 (s390x_emit_stack_adjust): New function.
3036 (s390x_emit_int_call_1): New function.
3037 (s390x_emit_void_call_2): New function.
3038 (s390x_emit_eq_goto): New function.
3039 (s390x_emit_ne_goto): New function.
3040 (s390x_emit_lt_goto): New function.
3041 (s390x_emit_le_goto): New function.
3042 (s390x_emit_gt_goto): New function.
3043 (s390x_emit_ge_goto): New function.
3044 (s390_emit_ops): New function.
3045 (struct linux_target_ops): Fill in emit_ops hook.
3046
abd9baf9
MK
30472016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3048
3049 PR 18377
3050 * Makefile.in: Add s390 IPA files.
3051 * configure.srv: Build IPA for s390.
3052 * linux-s390-ipa.c: New file.
3053 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3054 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3055 (tdesc_s390_linux32): Likewise.
3056 (init_registers_s390_linux32v1): Likewise.
3057 (tdesc_s390_linux32v1): Likewise.
3058 (init_registers_s390_linux32v2): Likewise.
3059 (tdesc_s390_linux32v2): Likewise.
3060 (init_registers_s390_linux64): Likewise.
3061 (tdesc_s390_linux64): Likewise.
3062 (init_registers_s390_linux64v1): Likewise.
3063 (tdesc_s390_linux64v1): Likewise.
3064 (init_registers_s390_linux64v2): Likewise.
3065 (tdesc_s390_linux64v2): Likewise.
3066 (init_registers_s390_te_linux64): Likewise.
3067 (tdesc_s390_te_linux64): Likewise.
3068 (init_registers_s390_vx_linux64): Likewise.
3069 (tdesc_s390_vx_linux64): Likewise.
3070 (init_registers_s390_tevx_linux64): Likewise.
3071 (tdesc_s390_tevx_linux64): Likewise.
3072 (init_registers_s390x_linux64): Likewise.
3073 (tdesc_s390x_linux64): Likewise.
3074 (init_registers_s390x_linux64v1): Likewise.
3075 (tdesc_s390x_linux64v1): Likewise.
3076 (init_registers_s390x_linux64v2): Likewise.
3077 (tdesc_s390x_linux64v2): Likewise.
3078 (init_registers_s390x_te_linux64): Likewise.
3079 (tdesc_s390x_te_linux64): Likewise.
3080 (init_registers_s390x_vx_linux64): Likewise.
3081 (tdesc_s390x_vx_linux64): Likewise.
3082 (init_registers_s390x_tevx_linux64): Likewise.
3083 (tdesc_s390x_tevx_linux64): Likewise.
3084 (have_hwcap_s390_vx): New static variable.
3085 (s390_arch_setup): Fill have_hwcap_s390_vx.
3086 (s390_get_thread_area): New function.
3087 (s390_ft_entry_gpr_esa): New const.
3088 (s390_ft_entry_gpr_zarch): New const.
3089 (s390_ft_entry_misc): New const.
3090 (s390_ft_entry_fr): New const.
3091 (s390_ft_entry_vr): New const.
3092 (s390_ft_main_31): New const.
3093 (s390_ft_main_64): New const.
3094 (s390_ft_exit_fr): New const.
3095 (s390_ft_exit_vr): New const.
3096 (s390_ft_exit_misc): New const.
3097 (s390_ft_exit_gpr_esa): New const.
3098 (s390_ft_exit_gpr_zarch): New const.
3099 (append_insns): New function.
3100 (s390_relocate_instruction): New function.
3101 (s390_install_fast_tracepoint_jump_pad): New function.
3102 (s390_get_min_fast_tracepoint_insn_len): New function.
3103 (s390_get_ipa_tdesc_idx): New function.
3104 (struct linux_target_ops): Wire in the above functions.
3105 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3106 * linux-s390-tdesc.h: New file.
3107
a4105d04
MK
31082016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3109
3110 * linux-s390-low.c (s390_supports_tracepoints): New function.
3111 (struct linux_target_ops): Fill supports_tracepoints hook.
3112
35ac8b3e
YQ
31132016-03-18 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-low.c (lwp_signal_can_be_delivered): New function.
3116 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3117
94610ec4
YQ
31182016-03-18 Yao Qi <yao.qi@linaro.org>
3119
3120 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3121 0 if signal is enqueued. Remove 'signal' from one debugging
3122 message. Move one debugging message to some lines below.
3123 Remove code setting 'signal' to 0.
3124
80aea927
YQ
31252016-03-18 Yao Qi <yao.qi@linaro.org>
3126
3127 * linux-low.c (linux_low_filter_event): Remove redundant
3128 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3129
b04fd3be
MK
31302016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3131
3132 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3133 (struct linux_target_ops): Wire in the above.
3134
c40c8d4b
YQ
31352016-03-03 Yao Qi <yao.qi@linaro.org>
3136
3137 * linux-low.c: Update comments to start_step_over.
3138
0f8288ae
YQ
31392016-03-03 Yao Qi <yao.qi@linaro.org>
3140
3141 PR server/19736
3142 * linux-low.c (handle_extended_wait): Set child suspended
3143 if event_lwp->bp_reinsert isn't zero.
3144
fdbd04a8
YQ
31452016-03-02 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3148 enqueue_pending_signal.
3149
6896a8fa
MK
31502016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3151
3152 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3153 is actually loaded.
3154
ab503087
MK
31552016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3156
3157 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3158 (s390_regmap_3264) [!__s390x__]: New global.
3159 (s390_collect_ptrace_register): Skip map entries containing -1.
3160 (s390_supply_ptrace_register): Ditto.
3161 (s390_fill_gprs_high): New function.
3162 (s390_store_gprs_high): New function.
3163 (s390_regsets): Add NT_S390_HIGH_GPRS.
3164 (s390_get_hwcap): Enable on 31-bit.
3165 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3166 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3167 Detect NT_S390_HIGH_GPRS.
3168 (s390_usrregs_info_3264): Enable on 31-bit.
3169 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3170 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3171
ae91f625
MK
31722016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3173
3174 PR gdb/13808
3175 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3176 * configure.srv: Ditto.
3177 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3178 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3179 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3180 (init_registers_amd64_linux): Remove prototype.
3181 (tdesc_amd64_linux): Remove declaration.
3182 (get_ipa_tdesc): New function.
3183 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3184 initialize remaining tdescs.
3185 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3186 (init_registers_i386_linux): Remove prototype.
3187 (tdesc_i386_linux): Remove declaration.
3188 (get_ipa_tdesc): New function.
3189 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3190 initialize remaining tdescs.
3191 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3192 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3193 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3194 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3195 (x86_get_ipa_tdesc_idx): New function.
3196 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3197 * linux-x86-tdesc.h: New file.
3198 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3199 (target_get_ipa_tdesc_idx): New macro.
3200 * tracepoint.c (ipa_tdesc_idx): New macro.
3201 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3202 (symbol_list): Add ipa_tdesc_idx.
3203 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3204 (ipa_tdesc): Remove.
3205 (ipa_tdesc_idx): New variable.
3206 (get_context_regcache): Use get_ipa_tdesc.
3207 (gdb_collect): Ditto.
3208 (gdb_probe): Ditto.
3209 * tracepoint.h (get_ipa_tdesc): New prototype.
3210 (ipa_tdesc): Remove.
3211
e7ad2f14
PA
32122016-02-24 Pedro Alves <palves@redhat.com>
3213
3214 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3215 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3216 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3217 Factor out common code between the USE_SIGTRAP_SIGINFO and
3218 !USE_SIGTRAP_SIGINFO blocks.
3219 (linux_low_filter_event): Call save_stop_reason instead of
3220 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3221 Update comments.
3222 (linux_wait_1): Update comments.
3223
657f9cde
WW
32242016-02-24 Wei-cheng Wang <cole945@gmail.com>
3225
3226 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3227 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3228 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3229 ppc_insert_point, ppc_remove_point.
3230
b00b61e1
MK
32312016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3232
3233 * linux-s390-low.c (s390_supports_z_point_type): New function.
3234 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3235
553cb527
YQ
32362016-02-16 Yao Qi <yao.qi@linaro.org>
3237
3238 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3239 PC. Get pc from regcache_read_pc.
3240
a5652c21
YQ
32412016-02-12 Yao Qi <yao.qi@linaro.org>
3242
3243 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3244 or linux_get_pc_32bit.
3245 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3246
ed443b61
YQ
32472016-02-12 Yao Qi <yao.qi@linaro.org>
3248
3249 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3250 arm_linux_get_next_pcs_fixup.
3251
020ecd38
MK
32522016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3253
3254 * tracepoint.c (x_tracepoint_action_download): Change
3255 write_inferior_data_ptr to write_inferior_data_pointer.
3256 (cmd_qtstart): Likewise.
3257 (write_inferior_data_ptr): Remove.
3258 (download_agent_expr): Change write_inferior_data_ptr to
3259 write_inferior_data_pointer.
3260 (download_tracepoint_1): Likewise.
3261 (download_tracepoint): Likewise.
3262 (download_trace_state_variables): Likewise.
3263
7cae9051
WW
32642016-02-11 Wei-cheng Wang <cole945@gmail.com>
3265 Marcin Kościelnicki <koriakin@0x04.net>
3266
3267 * tracepoint.c (struct tracepoint_action_ops): Remove.
3268 (struct tracepoint_action): Remove ops.
3269 (m_tracepoint_action_download, r_tracepoint_action_download)
3270 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3271 size and offset accordingly.
3272 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3273 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3274 (tracepoint_action_send, tracepoint_action_download): New functions.
3275 Helpers for trace action handlers.
3276 (add_tracepoint_action): Remove setup actions ops.
3277 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3278
9f6a71b4
YQ
32792016-02-10 Yao Qi <yao.qi@linaro.org>
3280
3281 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3282
1e94266c
SM
32832016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3284
3285 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3286 to AC_OUTPUT.
3287 * configure: Regenerate.
3288
8adce034
SM
32892016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3292 void * to gdb_byte *.
3293 * linux-low.c (siginfo_fixup): Likewise.
3294 (linux_xfer_siginfo): Likewise.
3295 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3296 Likewise.
3297 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3298
93813b37
WT
32992016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3300
3301 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3302 to srv_tgtobj.
3303 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3304 to srv_tgtobj.
3305 * linux-x86-low.c [__x86_64__]: Include
3306 "nat/amd64-linux-siginfo.h".
3307 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3308 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3309 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3310 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3311 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3312 (cpt_si_fd, si_timerid, si_overrun): Move from
3313 nat/amd64-linux-siginfo.c.
3314 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3315
8424cc97
SM
33162016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3317
3318 * server.c (skip_to_semicolon): Remove.
3319 (process_point_options): Use strchrnul instead of
3320 skip_to_semicolon.
3321
4d18591b
YQ
33222016-01-26 Yao Qi <yao.qi@linaro.org>
3323
3324 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3325 * linux-low.c (install_software_single_step_breakpoints): Don't
3326 call regcache_read_pc.
3327 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3328 argument pc.
3329
d8020970
YQ
33302016-01-26 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-low.c (install_software_single_step_breakpoints): Call
3333 regcache_read_pc instead of get_pc.
3334
8b207339
YQ
33352016-01-26 Yao Qi <yao.qi@linaro.org>
3336
3337 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3338 (unblock_async_io): Rename to ...
3339 (block_unblock_async_io): ... it. New function.
3340 (enable_async_io): Don't install SIGIO handler. Unblock it
3341 instead.
3342 (disable_async_io): Don't ignore SIGIO. Block it instead.
3343 (initialize_async_io): Install SIGIO handler. Don't call
3344 unblock_async_io.
3345
18879fef
YQ
33462016-01-26 Yao Qi <yao.qi@linaro.org>
3347
3348 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3349 first character is '\003', call *the_target->request_interrupt.
3350
a0f8e08a
YQ
33512016-01-25 Yao Qi <yao.qi@linaro.org>
3352
3353 * remote-utils.c (new_thread_notify): Remove.
3354 (dead_thread_notify): Likewise.
3355 * remote-utils.h (new_thread_notify): Remove declaration.
3356 (dead_thread_notify): Likewise.
3357
cc5fd9ab
MK
33582016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3359
3360 * gdb.trace/pending.exp: Fix expected message on continue.
3361
99e8eb11
MK
33622016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3363
3364 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3365 it works properly on big-endian machines where sizeof (CORE_ADDR)
3366 != sizeof (void *).
3367
a994041d
PA
33682016-01-21 Pedro Alves <palves@redhat.com>
3369
3370 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3371 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3372 * configure: Regenerate.
3373
f7a6a40d
YQ
33742016-01-21 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3377 is_thumb and set it according to CPSR saved on the stack.
3378 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3379 arm_sigreturn_next_pc.
3380
6f69e520
YQ
33812016-01-18 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-low.c (linux_set_pc_64bit): New function.
3384 (linux_get_pc_64bit): New function.
3385 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3386 Declare.
3387 * linux-sparc-low.c (debug_threads): Remove declaration.
3388 (sparc_get_pc): Remove.
3389 (the_low_target): Use linux_get_pc_64bit instead of
3390 sparc_get_pc.
3391 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3392 (the_low_target): Use linux_get_pc_64bit and
3393 linux_set_pc_64bit.
3394
276d4552
YQ
33952016-01-18 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-arm-low.c (debug_threads): Remove declaration.
3398 (arm_get_pc, arm_set_pc): Remove.
3399 (the_low_target): Use linux_get_pc_32bit and
3400 linux_set_pc_32bit.
3401 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3402 (the_low_target): Use linux_get_pc_32bit and
3403 linux_set_pc_32bit.
3404 * linux-cris-low.c (debug_threads): Remove declaration.
3405 (cris_get_pc, cris_set_pc,): Remove.
3406 (the_low_target): Use linux_get_pc_32bit and
3407 linux_set_pc_32bit.
3408 * linux-crisv32-low.c (debug_threads): Remove declaration.
3409 (cris_get_pc, cris_set_pc): Remove.
3410 (the_low_target): Use linux_get_pc_32bit and
3411 linux_set_pc_32bit.
3412 * linux-low.c: Include inttypes.h.
3413 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3414 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3415 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3416 (the_low_target): Use linux_get_pc_32bit and
3417 linux_set_pc_32bit.
3418 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3419 (the_low_target): Use linux_get_pc_32bit and
3420 linux_set_pc_32bit.
3421 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3422 (the_low_target): Use linux_get_pc_32bit and
3423 linux_set_pc_32bit.
3424 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3425 (the_low_target): Use linux_get_pc_32bit and
3426 linux_set_pc_32bit.
3427 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3428 (the_low_target): Use linux_get_pc_32bit and
3429 linux_set_pc_32bit.
3430
eb0edac8
GB
34312016-01-18 Gary Benson <gbenson@redhat.com>
3432
3433 * configure.ac (AC_FUNC_FORK): New check.
3434 * config.in: Regenerate.
3435 * configure: Likewise.
3436
1b451dda
YQ
34372016-01-14 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3440 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3441 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3442 arm_get_next_pcs_ctor.
3443
82075af2
JS
34442016-01-12 Josh Stone <jistone@redhat.com>
3445 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3446
3447 * inferiors.h: Include "gdb_vecs.h".
3448 (struct process_info): Add syscalls_to_catch.
3449 * inferiors.c (remove_process): Free syscalls_to_catch.
3450 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3451 syscall_return stops.
3452 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3453 * server.c (handle_general_set): Handle QCatchSyscalls.
3454 (handle_query): Report support for QCatchSyscalls.
3455 * target.h (struct target_ops): Add supports_catch_syscall.
3456 (target_supports_catch_syscall): New macro.
3457 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3458 (struct lwp_info): Add syscall_state.
3459 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3460 Maintain syscall_state and syscalls_to_catch across exec.
3461 (get_syscall_trapinfo): New function, proxy to the_low_target.
3462 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3463 (linux_low_filter_event): Toggle syscall_state entry/return for
3464 syscall traps, and set it ignored for all others.
3465 (gdb_catching_syscalls_p): New function.
3466 (gdb_catch_this_syscall_p): New function.
3467 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3468 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3469 (linux_supports_catch_syscall): New function.
3470 (linux_target_ops): Install it.
3471 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3472 (the_low_target): Install it.
3473
8f13a3ce
MF
34742016-01-12 Mike Frysinger <vapier@gentoo.org>
3475
3476 * acinclude.m4: Include new ../warning.m4 file.
3477 * configure: Regenerated.
3478 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3479
5b3da067
MF
34802016-01-12 Mike Frysinger <vapier@gentoo.org>
3481
3482 * ax.c (is_goto_target): Mark static.
3483 * linux-low.c (register_addr): Likewise.
3484 (linux_fetch_registers, linux_store_registers): Likewise.
3485 * mem-break.c (any_persistent_commands): Fix old prototype.
3486 (add_commands_to_breakpoint): Mark static.
3487 * regcache.c (find_register_by_name): Delete unused func.
3488 * remote-utils.c (hex_or_minus_one): Mark static.
3489 * server.c (monitor_show_help): Mark static.
3490 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3491 handle_v_requests): Likewise.
3492
bc504a31
PA
34932016-01-12 Pedro Alves <palves@redhat.com>
3494
3495 Remove use of the registered trademark symbol throughout.
3496
5a0dd67a
YQ
34972016-01-08 Yao Qi <yao.qi@linaro.org>
3498
3499 * remote-utils.c (getpkt): If c is '\003', call target hook
3500 request_interrupt.
3501
b2ca446f
YQ
35022016-01-06 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3505 linux-aarch32-low.c.
3506 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3507 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3508 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3509 (thumb2_breakpoint): Declare.
3510 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3511 linux-aarch32-low.h.
3512 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3513 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3514 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3515
edd88788
JB
35162016-01-01 Joel Brobecker <brobecker@adacore.com>
3517
3518 * gdbreplay.c (gdbreplay_version): Change copyright year in
3519 version message.
3520 * server.c (gdbserver_version): Likewise.
3521
65da7f14
PP
35222015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3523
3524 * server.c (crc32_table): Delete.
3525 (crc32): Use libiberty's xcrc32 function.
3526
4abd5ed2
JB
35272015-12-22 Joel Brobecker <brobecker@adacore.com>
3528
3529 * lynx-low.c (lynx_delete_thread_callback): New function.
3530 (lynx_mourn): Properly delete our process and all of its
3531 threads. Remove call to clear_inferiors.
3532
0e50fe5c
JB
35332015-12-22 Joel Brobecker <brobecker@adacore.com>
3534
3535 * target.c (thread_search_callback): Add check that
3536 the thread_stopped target callback is not NULL before
3537 calling it.
3538
35adc03f
YQ
35392015-12-21 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3542 arm breakpoint.
3543
bd2b2909
AT
35442015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3545
3546 * server.c (handle_query): Call target_supports_software_single_step.
3547
7fe5e27e
AT
35482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3549
3550 * linux-low.c (single_step): New function.
3551 (linux_resume_one_lwp_throw): Call single_step.
3552 (start_step_over): Likewise.
3553
d9311bfa
AT
35542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3555
3556 * Makefile.in (SFILES): Append arch/arm-linux.c,
3557 arch/arm-get-next-pcs.c.
3558 (arm-linux.o): New rule.
3559 (arm-get-next-pcs.o): New rule.
3560 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3561 arm-linux.o.
3562 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3563 to linux-aarch32-low.c.
3564 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3565 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3566 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3567 (thumb2_breakpoint_len): Likewise.
3568 (arm_is_thumb_mode): Make non-static.
3569 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3570 from linux-aarch32-low.c.
3571 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3572 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3573 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3574 (thumb2_breakpoint_len): Likewise.
3575 (arm_is_thumb_mode): New declaration.
3576 * linux-arm-low.c: Include arch/arm-linux.h
3577 aarch/arm-get-next-pcs.h, sys/syscall.h.
3578 (get_next_pcs_ops): New struct.
3579 (get_next_pcs_addr_bits_remove): New function.
3580 (get_next_pcs_is_thumb): New function.
3581 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3582 (arm_sigreturn_next_pc): Likewise.
3583 (get_next_pcs_syscall_next_pc): Likewise.
3584 (arm_gdbserver_get_next_pcs): Likewise.
3585 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3586 Initialize.
3587 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3588 * server.h: Include gdb_vecs.h.
3589
68ce2059
AT
35902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3591
3592 * Makefile.in (SFILES): Append common/common-regcache.c.
3593 (OBS): Append common-regcache.o.
3594 (common-regcache.o): New rule.
3595 * regcache.c (init_register_cache): Initialize cache to
3596 REG_UNAVAILABLE.
3597 (regcache_raw_read_unsigned): New function.
3598 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3599 register_status enum.
3600
fa5308bd
AT
36012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3602
3603 * linux-aarch64-low.c (the_low_targets): Rename
3604 breakpoint_reinsert_addr to get_next_pcs.
3605 * linux-arm-low.c (the_low_targets): Likewise.
3606 * linux-bfin-low.c (the_low_targets): Likewise.
3607 * linux-cris-low.c (the_low_targets): Likewise.
3608 * linux-crisv32-low.c (the_low_targets): Likewise.
3609 * linux-low.c (can_software_single_step): Likewise.
3610 (install_software_single_step_breakpoints): New function.
3611 (start_step_over): Use install_software_single_step_breakpoints.
3612 * linux-low.h: New CORE_ADDR vector.
3613 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3614 get_next_pcs.
3615 * linux-mips-low.c (the_low_targets): Likewise.
3616 * linux-nios2-low.c (the_low_targets): Likewise.
3617 * linux-sparc-low.c (the_low_targets): Likewise.
3618
4a6ed09b
PA
36192015-12-17 Pedro Alves <palves@redhat.com>
3620
3621 * linux-low.c (linux_kill_one_lwp): Remove references to
3622 LinuxThreads.
3623 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3624 to 'kill'.
3625 (linux_init_signals): Delete.
3626 (initialize_low): Adjust.
3627 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3628
7544db95
PA
36292015-12-16 Pedro Alves <palves@redhat.com>
3630
3631 * configure.ac (compiler warning flags): When testing a
3632 -Wno-foo option, check whether -Wfoo works instead.
3633 * configure: Regenerate.
3634
8020350c
DB
36352015-12-11 Don Breazeal <donb@codesourcery.com>
3636
3637 * server.c (process_serial_event): Don't exit from gdbserver
3638 in remote mode if there are still active inferiors.
3639
db91f502
YQ
36402015-12-11 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3643 arm_breakpoint_at if the process is 32-bit.
3644
b37a6290
YQ
36452015-12-11 Yao Qi <yao.qi@linaro.org>
3646
3647 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3648 arm breakpoint.
3649
17b1509a
YQ
36502015-12-07 Yao Qi <yao.qi@linaro.org>
3651
3652 * configure.srv: Append arm.o to srv_tgtobj for
3653 aarch64*-*-linux* target.
3654 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3655 from linux-arm-low.c.
3656 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3657 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3658 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3659 (thumb2_breakpoint_len): Likewise.
3660 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3661 (arm_breakpoint_kinds): Likewise.
3662 (arm_breakpoint_kind_from_pc): Likewise.
3663 (arm_sw_breakpoint_from_kind): Likewise.
3664 (arm_breakpoint_kind_from_current_state): Likewise.
3665 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3666 (arm_sw_breakpoint_from_kind): Declare.
3667 (arm_breakpoint_kind_from_current_state): Declare.
3668 (arm_breakpoint_at): Declare.
3669 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3670 arm_sw_breakpoint_from_kind if process is 32-bit.
3671 (aarch64_breakpoint_kind_from_pc): New function.
3672 (aarch64_breakpoint_kind_from_current_state): New function.
3673 (the_low_target): Initialize fields breakpoint_kind_from_pc
3674 and breakpoint_kind_from_current_state.
3675 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3676 linux-aarch32-low.c.
3677 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3678 (arm_breakpoint, arm_breakpoint_len): Likewise.
3679 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3680 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3681 (arm_is_thumb_mode): Likewise.
3682 (arm_breakpoint_at): Likewise.
3683 (arm_breakpoint_kind_from_pc): Likewise.
3684 (arm_sw_breakpoint_from_kind): Likewise.
3685 (arm_breakpoint_kind_from_current_state): Likewise.
3686
3687 Revert:
3688 2015-08-04 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3691 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3692 * server.c (extended_protocol): Remove "static".
3693 * server.h (extended_protocol): Declare it.
3694
ece66d65
JS
36952015-12-04 Josh Stone <jistone@redhat.com>
3696
3697 * target.h (struct target_ops) <arch_setup>: Rename to ...
3698 (struct target_ops) <post_create_inferior>: ... this.
3699 (target_arch_setup): Rename to ...
3700 (target_post_create_inferior): ... this, calling post_create_inferior.
3701 * server.c (start_inferior): Update target_arch_setup calls to
3702 target_post_create_inferior.
3703 * linux-low.c (linux_low_ptrace_options): Forward declare.
3704 (linux_arch_setup): Update its comment for general use.
3705 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3706 (struct linux_target_ops): Use linux_post_create_inferior.
3707 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3708 to post_create_inferior.
3709 * nto-low.c (struct nto_target_ops): Likewise.
3710 * spu-low.c (struct spu_target_ops): Likewise.
3711 * win32-low.c (struct win32_target_ops): Likewise.
3712
e58c48b4
AT
37132015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3714
3715 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3716
fbec8956
AT
37172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3718
3719 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3720 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3721 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3722 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3723 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3724 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3725 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3726 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3727 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3728 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3729 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3730 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3731
9b4c5f87
AT
37322015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3733
3734 * linux-low.c (linux_look_up_symbols): Don't call
3735 linux_supports_traceclone.
3736 * linux-low.h (thread_db_init): Remove use_events argument.
3737 * thread-db.c (thread_db_use_event): Remove global variable.
3738 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3739 (struct thread_db) <td_create_bp>: Remove field.
3740 (thread_db_create_event): Remove function.
3741 (thread_db_enable_reporting): Likewise.
3742 (find_one_thread): Don't check for thread_db_use_events.
3743 (attach_thread): Likewise.
3744 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3745 (try_thread_db_load_1): Don't check for thread_db_use_events.
3746 (thread_db_init): Remove use_events argument and thread events
3747 handling.
3748 (remove_thread_event_breakpoints): Remove function.
3749 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3750
7d00775e
AT
37512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3752
3753 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3754 New function.
3755 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3756 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3757 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3758 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3759 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3760 Initialize.
3761 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3762 New function.
3763 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3764 * linux-low.c (can_hardware_single_step): Use
3765 supports_hardware_single_step.
3766 (can_software_single_step): New function.
3767 (start_step_over): Call can_software_single_step.
3768 (linux_supports_hardware_single_step): New function.
3769 (struct target_ops) <supports_software_single_step>: Initialize.
3770 * linux-low.h (struct linux_target_ops)
3771 <supports_hardware_single_step>: Initialize.
3772 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3773 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3774 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3775 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3776 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3777 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3778 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3779 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3780 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3781 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3782 Initialize.
3783 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3784 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3785 Initialize.
3786 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3787 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3788 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3789 New function.
3790 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3791 * target.h (struct target_ops): <supports_software_single_step>:
3792 New field.
3793 (target_supports_software_single_step): New macro.
3794
2d97cd35
AT
37952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3796
3797 * linux-low.c (linux_wait_1): Fix pc advance condition.
3798 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3799 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3800
769ef81f
AT
38012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3802
3803 * linux-arm-low.c (arm_is_thumb_mode): New function.
3804 (arm_breakpoint_at): Use arm_is_thumb_mode.
3805 (arm_breakpoint_kind_from_current_state): New function.
3806 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3807 Initialize.
3808 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3809 (linux_breakpoint_kind_from_current_state): New function.
3810 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3811 * linux-low.h (struct linux_target_ops)
3812 <breakpoint_kind_from_current_state>: New field.
3813 * target.h (struct target_ops): Likewise.
3814 (target_breakpoint_kind_from_current_state): New macro.
3815
1bebeeca
PA
38162015-11-30 Pedro Alves <palves@redhat.com>
3817
3818 * linux-low.c (linux_resume): Wake up the event loop before
3819 returning.
3820
a67a9fae
PA
38212015-11-30 Pedro Alves <palves@redhat.com>
3822
3823 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3824 check.
3825 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3826 to -1.
3827 * target.c (struct thread_search): New structure.
3828 (thread_search_callback): New function.
3829 (prev_general_thread): New global.
3830 (prepare_to_access_memory, done_accessing_memory): New functions.
3831 * target.h (prepare_to_access_memory, done_accessing_memory):
3832 Replace macros with function declarations.
3833
f2faf941
PA
38342015-11-30 Pedro Alves <palves@redhat.com>
3835
3836 PR 14618
3837 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3838 report TARGET_WAITKIND_NO_RESUMED.
3839 * remote-utils.c (prepare_resume_reply): Handle
3840 TARGET_WAITKIND_NO_RESUMED.
3841 * server.c (report_no_resumed): New global.
3842 (handle_query) <qSupported>: Handle "no-resumed+". Report
3843 "no-resumed+" support.
3844 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3845 return error if the client doesn't support no-resumed events.
3846 (push_stop_notification): New function.
3847 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3848 events if the client supports them.
3849
a681f9c9
PA
38502015-11-30 Pedro Alves <palves@redhat.com>
3851
3852 * linux-low.c (thread_still_has_status_pending_p): Don't check
3853 vCont;t here.
3854 (lwp_resumed): New function.
3855 (status_pending_p_callback): Return early if the LWP is not
3856 supposed to be resumed.
3857
65706a29
PA
38582015-11-30 Pedro Alves <palves@redhat.com>
3859
3860 * linux-low.c (handle_extended_wait): Assert that the LWP's
3861 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3862 thread create events, leave the new child's status pending.
3863 (linux_low_filter_event): If GDB wants to hear about thread exit
3864 events, leave the LWP marked dead and don't delete it.
3865 (linux_wait_for_event_filtered): Don't check for thread exit.
3866 (filter_exit_event): New function.
3867 (linux_wait_1): Use it, when returning an exit event.
3868 (linux_resume_one_lwp_throw): Assert that the LWP's
3869 waitstatus is TARGET_WAITKIND_IGNORE.
3870 * remote-utils.c (prepare_resume_reply): Handle
3871 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3872 * server.c (report_thread_events): New global.
3873 (handle_general_set): Handle QThreadEvents.
3874 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3875 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3876 TARGET_WAITKIND_THREAD_EXITED.
3877 * server.h (report_thread_events): Declare.
3878
56cf4bed
PA
38792015-11-30 Pedro Alves <palves@redhat.com>
3880
3881 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3882 the thread's last_resume_kind was resume_stop.
3883
500c1d85
PA
38842015-11-30 Pedro Alves <palves@redhat.com>
3885
3886 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3887 before returning.
3888
de979965
PA
38892015-11-30 Pedro Alves <palves@redhat.com>
3890
3891 * server.c (handle_v_requests): Handle vCtrlC.
3892
34c65914
PA
38932015-11-30 Pedro Alves <palves@redhat.com>
3894
3895 * gdbthread.h (find_any_thread_of_pid): Declare.
3896 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3897 functions.
3898 * server.c (handle_query): If current_thread is NULL, look for
3899 another thread of the selected process.
3900
79efa585 39012015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3902 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3903
3904 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3905 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3906 name in reply.
3907 * target.h (struct target_ops) <thread_name>: New field.
3908 (target_thread_name): New macro.
3909
80d82c19
JB
39102015-11-23 Joel Brobecker <brobecker@adacore.com>
3911
3912 * regcache.h (regcache_invalidate_pid): Add declaration.
3913 * regcache.c (regcache_invalidate_pid): New function, extracted
3914 from regcache_invalidate.
3915 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3916 Add trivial documentation comment.
3917 * lynx-low.c: Use regcache_invalidate_pid instead of
3918 regcache_invalidate.
3919
64da5dd5
JB
39202015-11-23 Joel Brobecker <brobecker@adacore.com>
3921
3922 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3923 and Elf64_auxv_t if the target is Android.
3924
37ce4055
DE
39252015-11-22 Doug Evans <xdje42@gmail.com>
3926
3927 * target.h: #include <sys/types.h>.
3928
06e03fff
PA
39292015-11-19 Pedro Alves <palves@redhat.com>
3930
3931 * linux-low.c (linux_process_qsupported): Change prototype.
3932 Adjust.
3933 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3934 Change prototype.
3935 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3936 and adjust to loop over all features.
3937 * server.c (handle_query) <qSupported>: Adjust to call
3938 target_process_qsupported once, passing it a vector of unprocessed
3939 features.
3940 * target.h (struct target_ops) <process_qsupported>: Change
3941 prototype.
3942 (target_process_qsupported): Adjust.
3943
9a084706
PA
39442015-11-19 Pedro Alves <palves@redhat.com>
3945
3946 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3947 mode.
3948 * configure: Regenerate.
3949
dad44a1f
PA
39502015-11-19 Pedro Alves <palves@redhat.com>
3951
3952 * configure: Regenerate.
3953
231c0592
YQ
39542015-11-19 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3957 type to uint32_t.
3958
6c1c9a8b
YQ
39592015-11-19 Yao Qi <yao.qi@linaro.org>
3960
3961 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3962 (struct aarch64_operand): Move enum out.
3963
9caa3311
YQ
39642015-11-19 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3967 struct user_fpsimd_state *.
3968 (aarch64_store_fpregset): Likewise.
3969
6a69a054
YQ
39702015-11-19 Yao Qi <yao.qi@linaro.org>
3971
3972 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3973 struct user_pt_regs *.
3974 (aarch64_store_gregset): Likewise.
3975
1798301e
PA
39762015-11-18 Pedro Alves <palves@redhat.com>
3977
3978 * Makefile.in (all_object_files): Add $IPA_OBJS.
3979
ce7715e2
PA
39802015-11-17 Pedro Alves <palves@redhat.com>
3981
3982 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3983 GDB_SIGNAL_0 and gdb_signal_to_string.
3984
c0879059
PA
39852015-11-17 Pedro Alves <palves@redhat.com>
3986
3987 * win32-low.c (handle_output_debug_string): Remove parameter.
3988 (win32_kill): Remove our_status local and adjust call to
3989 handle_output_debug_string.
3990 (get_child_debug_event): Adjust call to
3991 handle_output_debug_string.
3992
1996e237
SM
39932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3994
3995 * linux-mips-low.c (mips_fill_gregset): Add cast.
3996 (mips_store_gregset): Likewise.
3997 (mips_fill_fpregset): Likewise.
3998 (mips_store_fpregset): Likewise.
3999
cbec665b
SM
40002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4001
4002 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4003 priv.
4004
eb3e3c67
SM
40052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4006
4007 * linux-mips-low.c (mips_linux_new_thread): Change type of
4008 watch_type to enum target_hw_bp_type.
4009
171de4b8
SM
40102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4011
4012 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4013 Change return type to arm_hwbp_type.
4014
04248ead
SM
40152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4016
4017 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4018 (arm_store_gregset): Likewise.
4019 * linux-arm-low.c (arm_get_hwcap): Likewise.
4020 (arm_read_description): Likewise.
4021
04b3479c
SM
40222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4023
4024 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4025
2bc84e8a
SM
40262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4027
4028 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4029 (ppc_fill_vsxregset): Likewise.
4030 (ppc_store_vsxregset): Likewise.
4031 (ppc_fill_vrregset): Likewise.
4032 (ppc_store_vrregset): Likewise.
4033 (ppc_fill_evrregset): Likewise.
4034 (ppc_store_evrregset): Likewise.
4035
e6c5bb05
SM
40362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4037
4038 * linux-ppc-low.c (ppc_usrregs_info): Remove
4039 forward-declaration.
4040 (ppc_arch_setup): Move lower in file.
4041
7ea45d72
SM
40422015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4043
4044 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4045 (ps_pdwrite): Likewise.
4046
69291610
HW
40472015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4048
4049 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4050 to after assert checks.
4051
b42945fd
SM
40522015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * proc-service.c (ps_pdread): Add/adjust casts.
4055 (ps_pdwrite): Add/adjust casts.
4056
d6f85c84
SM
40572015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4058
4059 * server.c (handle_search_memory_1): Cast return value of
4060 memmem.
4061
f98cd059
SM
40622015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4063
4064 * server.c (write_qxfer_response): Change type of data to
4065 gdb_byte *.
4066
d2412fa5
PA
40672015-10-29 Pedro Alves <palves@redhat.com>
4068
4069 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4070
c17414a2
PA
40712015-10-29 Pedro Alves <palves@redhat.com>
4072
4073 * tracepoint.c (clear_installed_tracepoints): Add casts.
4074
e053fbc4
PA
40752015-10-29 Pedro Alves <palves@redhat.com>
4076
4077 * server.c (handle_v_cont, process_serial_event): Add enum
4078 gdb_signal casts to signal parsing code.
4079
add67df8
PA
40802015-10-29 Pedro Alves <palves@redhat.com>
4081
4082 * linux-low.h (NULL_REGSET): Define.
4083 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4084 * linux-arm-low.c (arm_regsets): Likewise.
4085 * linux-crisv32-low.c (cris_regsets): Likewise.
4086 * linux-m68k-low.c (m68k_regsets): Likewise.
4087 * linux-mips-low.c (mips_regsets): Likewise.
4088 * linux-nios2-low.c (nios2_regsets): Likewise.
4089 * linux-ppc-low.c (ppc_regsets): Likewise.
4090 * linux-s390-low.c (s390_regsets): Likewise.
4091 * linux-sh-low.c (sh_regsets): Likewise.
4092 * linux-sparc-low.c (sparc_regsets): Likewise.
4093 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4094 * linux-tile-low.c (tile_regsets): Likewise.
4095 * linux-x86-low.c (x86_regsets): Likewise.
4096 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4097
50bc912a
PA
40982015-10-29 Pedro Alves <palves@redhat.com>
4099
4100 * linux-low.h (NULL_REGSET): Define.
4101 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4102 * linux-arm-low.c (arm_regsets): Likewise.
4103 * linux-crisv32-low.c (cris_regsets): Likewise.
4104 * linux-m68k-low.c (m68k_regsets): Likewise.
4105 * linux-mips-low.c (mips_regsets): Likewise.
4106 * linux-nios2-low.c (nios2_regsets): Likewise.
4107 * linux-ppc-low.c (ppc_regsets): Likewise.
4108 * linux-s390-low.c (s390_regsets): Likewise.
4109 * linux-sh-low.c (sh_regsets): Likewise.
4110 * linux-sparc-low.c (sparc_regsets): Likewise.
4111 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4112 * linux-tile-low.c (tile_regsets): Likewise.
4113 * linux-x86-low.c (x86_regsets): Likewise.
4114 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4115
682b2546
DE
41162015-10-26 Doug Evans <dje@google.com>
4117
4118 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4119
963843d4
DE
41202015-10-26 Doug Evans <dje@google.com>
4121
4122 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4123
d41401ac
DE
41242015-10-26 Doug Evans <dje@google.com>
4125
4126 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4127 for debug_printf.
4128 (attach_thread, find_new_threads_callback): Ditto.
4129
3db28855
AT
41302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4131
4132 * mem-break.h (set_breakpoint_data): Remove.
4133
fb78e89c
AT
41342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4135
4136 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4137 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4138 (initialize_low): Remove set_breakpoint_data call.
4139 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4140 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4141 (initialize_low): Remove set_breakpoint_data call.
4142 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4143 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4144 (initialize_low): Remove set_breakpoint_data call.
4145
2e6ee069
AT
41462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4147
4148 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4149 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4150 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4151 * target.h (target_breakpoint_kind_from_pc): New macro.
4152
1652a986
AT
41532015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4154
4155 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4156 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4157 the default breakpoint kind.
4158
abeead09
AT
41592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4160
4161 * linux-arm-low.c (arm_supports_z_point_type): Add software
4162 breakpoint support.
4163
b0b4b501
AT
41642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4165
4166 * linux-arm-low.c: Refactor breakpoint definitions.
4167 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4168 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4169
8689682c
AT
41702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4171
4172 * Makefile.in: Add arm.c/o.
4173 * configure.srv: Likewise.
4174 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4175 (arm_breakpoint_kind_from_pc): New function.
4176 (arm_sw_breakpoint_from_kind): Return proper kind.
4177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4178
27165294
AT
41792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4180
4181 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4182 removal.
4183 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4184 (struct raw_breakpoint) <size>: Remove.
4185 (struct raw_breakpoint) <kind>: Add.
4186 (bp_size): New function.
4187 (bp_opcode): Likewise.
4188 (find_raw_breakpoint_at): Adjust for kind.
4189 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4190 (remove_memory_breakpoint): Adjust for kind call bp_size.
4191 (set_raw_breakpoint_at): Adjust for kind.
4192 (set_breakpoint): Likewise.
4193 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4194 (delete_raw_breakpoint): Adjust for kind.
4195 (delete_breakpoint): Likewise.
4196 (find_gdb_breakpoint): Likewise.
4197 (set_gdb_breakpoint_1): Likewise.
4198 (set_gdb_breakpoint): Likewise.
4199 (delete_gdb_breakpoint_1): Likewise.
4200 (delete_gdb_breakpoint): Likewise.
4201 (uninsert_raw_breakpoint): Likewise.
4202 (reinsert_raw_breakpoint): Likewise.
4203 (set_breakpoint_data): Remove.
4204 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4205 (check_mem_read): Adjust for kind call bp_size.
4206 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4207 (clone_one_breakpoint): Adjust for kind.
4208 * mem-break.h (set_gdb_breakpoint): Likewise.
4209 (delete_gdb_breakpoint): Likewise.
4210 * server.c (process_serial_event): Likewise.
4211
dd373349
AT
42122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4213
4214 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4215 (struct linux_target_ops) <breakpoint>: Remove.
4216 (struct linux_target_ops) <breakpoint_len>: Remove.
4217 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4218 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4219 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4220 (arm_sw_breakpoint_from_kind): New function.
4221 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4222 (struct linux_target_ops) <breakpoint>: Remove.
4223 (struct linux_target_ops) <breakpoint_len>: Remove.
4224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4226 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4227 (struct linux_target_ops) <breakpoint>: Remove.
4228 (struct linux_target_ops) <breakpoint_len>: Remove.
4229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4231 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4232 (struct linux_target_ops) <breakpoint>: Remove.
4233 (struct linux_target_ops) <breakpoint_len>: Remove.
4234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4236 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4237 and sw_breakpoint_from_kind to increment the pc.
4238 (linux_breakpoint_kind_from_pc): New function.
4239 (linux_sw_breakpoint_from_kind): New function.
4240 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4241 (initialize_low): Call breakpoint_kind_from_pc and
4242 sw_breakpoint_from_kind to replace breakpoint_data/len.
4243 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4244 New field.
4245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4246 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4247 (struct linux_target_ops) <breakpoint>: Remove.
4248 (struct linux_target_ops) <breakpoint_len>: Remove.
4249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4251 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4252 (struct linux_target_ops) <breakpoint>: Remove.
4253 (struct linux_target_ops) <breakpoint_len>: Remove.
4254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4256 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4257 (struct linux_target_ops) <breakpoint>: Remove.
4258 (struct linux_target_ops) <breakpoint_len>: Remove.
4259 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4260 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4261 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4262 (struct linux_target_ops) <breakpoint>: Remove.
4263 (struct linux_target_ops) <breakpoint_len>: Remove.
4264 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4265 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4266 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4267 (struct linux_target_ops) <breakpoint>: Remove.
4268 (struct linux_target_ops) <breakpoint_len>: Remove.
4269 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4270 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4271 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4272 (struct linux_target_ops) <breakpoint>: Remove.
4273 (struct linux_target_ops) <breakpoint_len>: Remove.
4274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4276 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4277 (struct linux_target_ops) <breakpoint>: Remove.
4278 (struct linux_target_ops) <breakpoint_len>: Remove.
4279 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4280 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4281 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4282 (struct linux_target_ops) <breakpoint>: Remove.
4283 (struct linux_target_ops) <breakpoint_len>: Remove.
4284 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4285 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4286 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4287 (struct linux_target_ops) <breakpoint>: Remove.
4288 (struct linux_target_ops) <breakpoint_len>: Remove.
4289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4291 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4292 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4293 (struct linux_target_ops) <breakpoint>: Remove.
4294 (struct linux_target_ops) <breakpoint_len>: Remove.
4295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4297 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4298 (struct linux_target_ops) <breakpoint>: Remove.
4299 (struct linux_target_ops) <breakpoint_len>: Remove.
4300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4302
4cd98a19
AT
43032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4304
4305 * linux-cris-low.c (cris_get_pc): Remove void arg.
4306
774ee6d2
AR
43072015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4308
4309 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4310 variable name.
4311
833dcd29
AR
43122015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4313
4314 * inferiors.c (thread_pid_matches_callback): New function.
4315 (find_thread_process): New function.
4316 (remove_thread): Reset current_thread.
4317 (remove_process): Assert threads have been removed first.
4318
8d689ee5
YQ
43192015-10-15 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4322 if it is 3.
4323 (aarch64_remove_point): Likewise.
4324 * regcache.c (regcache_register_size): New function.
4325
1c2e1515
YQ
43262015-10-12 Yao Qi <yao.qi@linaro.org>
4327
4328 * linux-aarch64-low.c: Update all callers as emit_load_store
4329 is renamed to aarch64_emit_load_store.
4330
e1c587c3
YQ
43312015-10-12 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-aarch64-low.c: Update all callers of function renaming
4334 from emit_insn to aarch64_emit_insn.
4335
b6542f81
YQ
43362015-10-12 Yao Qi <yao.qi@linaro.org>
4337
4338 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4339 arch/aarch64-insn.h.
4340 (struct aarch64_memory_operand): Likewise.
4341 (ENCODE): Likewise.
4342 (emit_insn): Move to arch/aarch64-insn.c.
4343 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4344 (emit_load_store): Move to arch/aarch64-insn.c.
4345 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4346 (can_encode_int32): Remove.
4347
246994ce
YQ
43482015-10-12 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4351 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4352 (aarch64_relocate_instruction): Likewise.
4353 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4354 (struct aarch64_insn_visitor): Likewise.
4355
0badd99f
YQ
43562015-10-12 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4359 (struct aarch64_insn_visitor): New.
4360 (struct aarch64_insn_relocation_data): New.
4361 (aarch64_ftrace_insn_reloc_b): New function.
4362 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4363 (aarch64_ftrace_insn_reloc_cb): Likewise.
4364 (aarch64_ftrace_insn_reloc_tb): Likewise.
4365 (aarch64_ftrace_insn_reloc_adr): Likewise.
4366 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4367 (aarch64_ftrace_insn_reloc_others): Likewise.
4368 (visitor): New.
4369 (aarch64_relocate_instruction): Use visitor.
4370
dfaffe9d
YQ
43712015-10-12 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4374 int. Add argument buf.
4375 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4376 aarch64_relocate_instruction.
4377
70b439f0
YQ
43782015-10-12 Yao Qi <yao.qi@linaro.org>
4379
4380 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4381 argument insn. Remove local variable insn. Don't call
4382 target_read_uint32.
4383 (aarch64_install_fast_tracepoint_jump_pad): Call
4384 target_read_uint32.
4385
7781c06f
YQ
43862015-09-30 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4389 (emit_load_store_pair): Likewise.
4390
9a3c8263
SM
43912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * dll.c (match_dll): Add cast(s).
4394 (unloaded_dll): Likewise.
4395 * linux-low.c (second_thread_of_pid_p): Likewise.
4396 (delete_lwp_callback): Likewise.
4397 (count_events_callback): Likewise.
4398 (select_event_lwp_callback): Likewise.
4399 (linux_set_resume_request): Likewise.
4400 * server.c (accumulate_file_name_length): Likewise.
4401 (emit_dll_description): Likewise.
4402 (handle_qxfer_threads_worker): Likewise.
4403 (visit_actioned_threads): Likewise.
4404 * thread-db.c (any_thread_of): Likewise.
4405 * tracepoint.c (same_process_p): Likewise.
4406 (match_blocktype): Likewise.
4407 (build_traceframe_info_xml): Likewise.
4408
224c3ddb
SM
44092015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4410
4411 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4412 assignment.
4413 (gdb_unparse_agent_expr): Likewise.
4414 * hostio.c (require_data): Likewise.
4415 (handle_pread): Likewise.
4416 * linux-low.c (disable_regset): Likewise.
4417 (fetch_register): Likewise.
4418 (store_register): Likewise.
4419 (get_dynamic): Likewise.
4420 (linux_qxfer_libraries_svr4): Likewise.
4421 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4422 (set_fast_tracepoint_jump): Likewise.
4423 (uninsert_fast_tracepoint_jumps_at): Likewise.
4424 (reinsert_fast_tracepoint_jumps_at): Likewise.
4425 (validate_inserted_breakpoint): Likewise.
4426 (clone_agent_expr): Likewise.
4427 * regcache.c (init_register_cache): Likewise.
4428 * remote-utils.c (putpkt_binary_1): Likewise.
4429 (decode_M_packet): Likewise.
4430 (decode_X_packet): Likewise.
4431 (look_up_one_symbol): Likewise.
4432 (relocate_instruction): Likewise.
4433 (monitor_output): Likewise.
4434 * server.c (handle_search_memory): Likewise.
4435 (handle_qxfer_exec_file): Likewise.
4436 (handle_qxfer_libraries): Likewise.
4437 (handle_qxfer): Likewise.
4438 (handle_query): Likewise.
4439 (handle_v_cont): Likewise.
4440 (handle_v_run): Likewise.
4441 (captured_main): Likewise.
4442 * target.c (write_inferior_memory): Likewise.
4443 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4444 * tracepoint.c (init_trace_buffer): Likewise.
4445 (add_tracepoint_action): Likewise.
4446 (add_traceframe): Likewise.
4447 (add_traceframe_block): Likewise.
4448 (cmd_qtdpsrc): Likewise.
4449 (cmd_qtdv): Likewise.
4450 (cmd_qtstatus): Likewise.
4451 (response_source): Likewise.
4452 (response_tsv): Likewise.
4453 (cmd_qtnotes): Likewise.
4454 (gdb_collect): Likewise.
4455 (initialize_tracepoint): Likewise.
4456
afbe19f8
PL
44572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4458
4459 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4460 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4461 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4462 <NOP>: New.
4463 (enum aarch64_condition_codes): New enum.
4464 (w0): New static global.
4465 (fp): Likewise.
4466 (lr): Likewise.
4467 (struct aarch64_memory_operand) <type>: New
4468 MEMORY_OPERAND_POSTINDEX type.
4469 (postindex_memory_operand): New helper function.
4470 (emit_ret): New function.
4471 (emit_load_store_pair): New function, factored out of emit_stp
4472 with support for MEMORY_OPERAND_POSTINDEX.
4473 (emit_stp): Rewrite using emit_load_store_pair.
4474 (emit_ldp): New function.
4475 (emit_load_store): Likewise.
4476 (emit_ldr): Mention post-index instruction in comment.
4477 (emit_ldrh): New function.
4478 (emit_ldrb): New function.
4479 (emit_ldrsw): Mention post-index instruction in comment.
4480 (emit_str): Likewise.
4481 (emit_subs): New function.
4482 (emit_cmp): Likewise.
4483 (emit_and): Likewise.
4484 (emit_orr): Likewise.
4485 (emit_orn): Likewise.
4486 (emit_eor): Likewise.
4487 (emit_mvn): Likewise.
4488 (emit_lslv): Likewise.
4489 (emit_lsrv): Likewise.
4490 (emit_asrv): Likewise.
4491 (emit_mul): Likewise.
4492 (emit_sbfm): Likewise.
4493 (emit_sbfx): Likewise.
4494 (emit_ubfm): Likewise.
4495 (emit_ubfx): Likewise.
4496 (emit_csinc): Likewise.
4497 (emit_cset): Likewise.
4498 (emit_nop): Likewise.
4499 (emit_ops_insns): New helper function.
4500 (emit_pop): Likewise.
4501 (emit_push): Likewise.
4502 (aarch64_emit_prologue): New function.
4503 (aarch64_emit_epilogue): Likewise.
4504 (aarch64_emit_add): Likewise.
4505 (aarch64_emit_sub): Likewise.
4506 (aarch64_emit_mul): Likewise.
4507 (aarch64_emit_lsh): Likewise.
4508 (aarch64_emit_rsh_signed): Likewise.
4509 (aarch64_emit_rsh_unsigned): Likewise.
4510 (aarch64_emit_ext): Likewise.
4511 (aarch64_emit_log_not): Likewise.
4512 (aarch64_emit_bit_and): Likewise.
4513 (aarch64_emit_bit_or): Likewise.
4514 (aarch64_emit_bit_xor): Likewise.
4515 (aarch64_emit_bit_not): Likewise.
4516 (aarch64_emit_equal): Likewise.
4517 (aarch64_emit_less_signed): Likewise.
4518 (aarch64_emit_less_unsigned): Likewise.
4519 (aarch64_emit_ref): Likewise.
4520 (aarch64_emit_if_goto): Likewise.
4521 (aarch64_emit_goto): Likewise.
4522 (aarch64_write_goto_address): Likewise.
4523 (aarch64_emit_const): Likewise.
4524 (aarch64_emit_call): Likewise.
4525 (aarch64_emit_reg): Likewise.
4526 (aarch64_emit_pop): Likewise.
4527 (aarch64_emit_stack_flush): Likewise.
4528 (aarch64_emit_zero_ext): Likewise.
4529 (aarch64_emit_swap): Likewise.
4530 (aarch64_emit_stack_adjust): Likewise.
4531 (aarch64_emit_int_call_1): Likewise.
4532 (aarch64_emit_void_call_2): Likewise.
4533 (aarch64_emit_eq_goto): Likewise.
4534 (aarch64_emit_ne_goto): Likewise.
4535 (aarch64_emit_lt_goto): Likewise.
4536 (aarch64_emit_le_goto): Likewise.
4537 (aarch64_emit_gt_goto): Likewise.
4538 (aarch64_emit_ge_got): Likewise.
4539 (aarch64_emit_ops_impl): New static global variable.
4540 (aarch64_emit_ops): New target function, return
4541 &aarch64_emit_ops_impl.
4542 (struct linux_target_ops): Install it.
4543
bb903df0
PL
45442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4545
4546 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4547 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4548 aarch64-ipa.o.
4549 * linux-aarch64-ipa.c: New file.
4550 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4551 and endian.h.
4552 (aarch64_get_thread_area): New target method.
4553 (extract_signed_bitfield): New helper function.
4554 (aarch64_decode_ldr_literal): New function.
4555 (enum aarch64_opcodes): New enum.
4556 (struct aarch64_register): New struct.
4557 (struct aarch64_operand): New struct.
4558 (x0): New static global.
4559 (x1): Likewise.
4560 (x2): Likewise.
4561 (x3): Likewise.
4562 (x4): Likewise.
4563 (w2): Likewise.
4564 (ip0): Likewise.
4565 (sp): Likewise.
4566 (xzr): Likewise.
4567 (aarch64_register): New helper function.
4568 (register_operand): Likewise.
4569 (immediate_operand): Likewise.
4570 (struct aarch64_memory_operand): New struct.
4571 (offset_memory_operand): New helper function.
4572 (preindex_memory_operand): Likewise.
4573 (enum aarch64_system_control_registers): New enum.
4574 (ENCODE): New macro.
4575 (emit_insn): New helper function.
4576 (emit_b): New function.
4577 (emit_bcond): Likewise.
4578 (emit_cb): Likewise.
4579 (emit_tb): Likewise.
4580 (emit_blr): Likewise.
4581 (emit_stp): Likewise.
4582 (emit_ldp_q_offset): Likewise.
4583 (emit_stp_q_offset): Likewise.
4584 (emit_load_store): Likewise.
4585 (emit_ldr): Likewise.
4586 (emit_ldrsw): Likewise.
4587 (emit_str): Likewise.
4588 (emit_ldaxr): Likewise.
4589 (emit_stxr): Likewise.
4590 (emit_stlr): Likewise.
4591 (emit_data_processing_reg): Likewise.
4592 (emit_data_processing): Likewise.
4593 (emit_add): Likewise.
4594 (emit_sub): Likewise.
4595 (emit_mov): Likewise.
4596 (emit_movk): Likewise.
4597 (emit_mov_addr): Likewise.
4598 (emit_mrs): Likewise.
4599 (emit_msr): Likewise.
4600 (emit_sevl): Likewise.
4601 (emit_wfe): Likewise.
4602 (append_insns): Likewise.
4603 (can_encode_int32_in): New helper function.
4604 (aarch64_relocate_instruction): New function.
4605 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4606 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4607 (struct linux_target_ops): Install aarch64_get_thread_area,
4608 aarch64_install_fast_tracepoint_jump_pad and
4609 aarch64_get_min_fast_tracepoint_insn_len.
4610
787749ea
PL
46112015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4612
4613 * Makefile.in (aarch64-insn.o): New rule.
4614 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4615
9812b2e6
YQ
46162015-09-21 Yao Qi <yao.qi@linaro.org>
4617
4618 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4619
18fe412b
YQ
46202015-09-21 Yao Qi <yao.qi@linaro.org>
4621
4622 * tracepoint.c (max_jump_pad_size): Remove.
4623
a0cc84cd
YQ
46242015-09-18 Yao Qi <yao.qi@linaro.org>
4625
4626 * linux-aarch64-low.c: Don't include sys/uio.h.
4627 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4628
d78908cf
WW
46292015-09-16 Wei-cheng Wang <cole945@gmail.com>
4630
4631 * tracepoint.c (eval_result_type): Change prototype.
4632 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4633
d57e0d50
PA
46342015-09-15 Pedro Alves <palves@redhat.com>
4635
4636 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4637 Check whether to report exec events instead of checking whether
4638 multiprocess is enabled.
4639
5a676acc
PA
46402015-09-15 Pedro Alves <palves@redhat.com>
4641
4642 PR remote/18965
4643 * remote-utils.c (prepare_resume_reply): Merge
4644 TARGET_WAITKIND_VFORK_DONE switch case with the
4645 TARGET_WAITKIND_FORKED case.
4646
7c5d0fad
YQ
46472015-09-15 Yao Qi <yao.qi@linaro.org>
4648
4649 * server.c (handle_query): Check string comparison using
4650 "else if" instead of "if".
4651
750ce8d1
YQ
46522015-09-15 Yao Qi <yao.qi@linaro.org>
4653
4654 * server.c (vCont_supported): New global variable.
4655 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4656 matches. Append ";vContSupported+" to own_buf.
4657 (handle_v_requests): Append ";s;S" to own_buf if target supports
4658 hardware single step or vCont_supported is false.
4659 (capture_main): Set vCont_supported to zero.
4660
70b90b91
YQ
46612015-09-15 Yao Qi <yao.qi@linaro.org>
4662
4663 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4664 it to ...
4665 (linux_supports_hardware_single_step): ... New function.
4666 (linux_target_ops): Update.
4667 * lynx-low.c (lynx_target_ops): Set field
4668 supports_hardware_single_step to target_can_do_hardware_single_step.
4669 * nto-low.c (nto_target_ops): Likewise.
4670 * spu-low.c (spu_target_ops): Likewise.
4671 * win32-low.c (win32_target_ops): Likewise.
4672 * target.c (target_can_do_hardware_single_step): New function.
4673 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4674 Remove. <supports_hardware_single_step>: New field.
4675 (target_supports_conditional_breakpoints): Remove.
4676 (target_supports_hardware_single_step): New macro.
4677 (target_can_do_hardware_single_step): Declare.
4678 * server.c (handle_query): Use target_supports_hardware_single_step
4679 instead of target_supports_conditional_breakpoints.
4680
ade90bde
YQ
46812015-09-15 Yao Qi <yao.qi@linaro.org>
4682
4683 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4684 function.
4685 (struct linux_target_ops the_low_target): Install
4686 aarch64_linux_siginfo_fixup.
4687
94585166
DB
46882015-09-11 Don Breazeal <donb@codesourcery.com>
4689 Luis Machado <lgustavo@codesourcery.com>
4690
4691 * linux-low.c (linux_mourn): Static declaration.
4692 (linux_arch_setup): Move in front of
4693 handle_extended_wait.
4694 (linux_arch_setup_thread): New function.
4695 (handle_extended_wait): Handle exec events. Call
4696 linux_arch_setup_thread. Make event_lwp argument a
4697 pointer-to-a-pointer.
4698 (check_zombie_leaders): Do not check stopped threads.
4699 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4700 (linux_low_filter_event): Add lwp and thread for exec'ing
4701 non-leader thread if leader thread has been deleted.
4702 Refactor code into linux_arch_setup_thread and call it.
4703 Pass child lwp pointer by reference to handle_extended_wait.
4704 (linux_wait_for_event_filtered): Update comment.
4705 (linux_wait_1): Prevent clobbering exec event status.
4706 (linux_supports_exec_events): New function.
4707 (linux_target_ops) <supports_exec_events>: Initialize new member.
4708 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4709 new member.
4710 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4711 * server.c (report_exec_events): New global variable.
4712 (handle_query): Handle qSupported query for exec-events feature.
4713 (captured_main): Initialize report_exec_events.
4714 * server.h (report_exec_events): Declare new global variable.
4715 * target.h (struct target_ops) <supports_exec_events>: New
4716 member.
4717 (target_supports_exec_events): New macro.
4718 * win32-low.c (win32_target_ops) <supports_exec_events>:
4719 Initialize new member.
4720
0568462b
MM
47212015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4722
4723 * linux-low.c (linux_low_enable_btrace): Remove.
4724 (linux_target_ops): Replace linux_low_enable_btrace with
4725 linux_enable_btrace.
4726
39edd165
YQ
47272015-09-03 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-aarch64-low.c (aarch64_insert_point): Call
4730 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4731 returns true.
4732
1db33b5a
UW
47332015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4734
4735 * linux-low.c (check_stopped_by_breakpoint): Use
4736 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4737
ab290430
PA
47382015-08-27 Pedro Alves <palves@redhat.com>
4739
4740 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4741
8d749320
SM
47422015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4743
6711b7f8
SM
4744 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4745 the XNEW-family equivalent.
8d749320
SM
4746 (compile_bytecodes): Likewise.
4747 * dll.c (loaded_dll): Likewise.
4748 * event-loop.c (append_callback_event): Likewise.
4749 (create_file_handler): Likewise.
4750 (create_file_event): Likewise.
4751 * hostio.c (handle_open): Likewise.
4752 * inferiors.c (add_thread): Likewise.
4753 (add_process): Likewise.
4754 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4755 * linux-arm-low.c (arm_new_process): Likewise.
4756 (arm_new_thread): Likewise.
4757 * linux-low.c (add_to_pid_list): Likewise.
4758 (linux_add_process): Likewise.
4759 (handle_extended_wait): Likewise.
4760 (add_lwp): Likewise.
4761 (enqueue_one_deferred_signal): Likewise.
4762 (enqueue_pending_signal): Likewise.
4763 (linux_resume_one_lwp_throw): Likewise.
4764 (linux_resume_one_thread): Likewise.
4765 (linux_read_memory): Likewise.
4766 (linux_write_memory): Likewise.
4767 * linux-mips-low.c (mips_linux_new_process): Likewise.
4768 (mips_linux_new_thread): Likewise.
4769 (mips_add_watchpoint): Likewise.
4770 * linux-x86-low.c (initialize_low_arch): Likewise.
4771 * lynx-low.c (lynx_add_process): Likewise.
4772 * mem-break.c (set_raw_breakpoint_at): Likewise.
4773 (set_breakpoint): Likewise.
4774 (add_condition_to_breakpoint): Likewise.
4775 (add_commands_to_breakpoint): Likewise.
4776 (clone_agent_expr): Likewise.
4777 (clone_one_breakpoint): Likewise.
4778 * regcache.c (new_register_cache): Likewise.
4779 * remote-utils.c (look_up_one_symbol): Likewise.
4780 * server.c (queue_stop_reply): Likewise.
4781 (start_inferior): Likewise.
4782 (queue_stop_reply_callback): Likewise.
4783 (handle_target_event): Likewise.
4784 * spu-low.c (fetch_ppc_memory): Likewise.
4785 (store_ppc_memory): Likewise.
4786 * target.c (set_target_ops): Likewise.
4787 * thread-db.c (thread_db_load_search): Likewise.
4788 (try_thread_db_load_1): Likewise.
4789 * tracepoint.c (add_tracepoint): Likewise.
4790 (add_tracepoint_action): Likewise.
4791 (create_trace_state_variable): Likewise.
4792 (cmd_qtdpsrc): Likewise.
4793 (cmd_qtro): Likewise.
4794 (add_while_stepping_state): Likewise.
4795 * win32-low.c (child_add_thread): Likewise.
4796 (get_image_name): Likewise.
4797
ed8b7b42
YQ
47982015-08-25 Yao Qi <yao.qi@linaro.org>
4799
4800 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4801
db3cb7cb
YQ
48022015-08-25 Yao Qi <yao.qi@linaro.org>
4803
4804 * Makefile.in (aarch64-linux.o): New rule.
4805 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4806 srv_tgtobj.
4807 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4808 (aarch64_init_debug_reg_state): Make it extern.
4809 (aarch64_linux_prepare_to_resume): Remove.
4810
f6011a1c
YQ
48112015-08-25 Yao Qi <yao.qi@linaro.org>
4812
4813 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4814 lwp_arch_private_info and ptid_of_lwp.
4815
88e2cf7e
YQ
48162015-08-25 Yao Qi <yao.qi@linaro.org>
4817
4818 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4819 Find proc_info by find_process_pid. All callers updated.
4820
5e35436e
YQ
48212015-08-25 Yao Qi <yao.qi@linaro.org>
4822
4823 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4824 Remove.
4825 (debug_reg_change_callback): Remove.
4826 (aarch64_notify_debug_reg_change): Remove.
4827
4a8a7965
YQ
48282015-08-25 Yao Qi <yao.qi@linaro.org>
4829
4830 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4831 Call current_lwp_ptid.
4832
32a271ee
YQ
48332015-08-25 Yao Qi <yao.qi@linaro.org>
4834
4835 * linux-aarch64-low.c (debug_reg_change_callback): Use
4836 debug_printf.
4837
0d51c8d7
YQ
48382015-08-25 Yao Qi <yao.qi@linaro.org>
4839
4840 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4841
31a43dd5
YQ
48422015-08-25 Yao Qi <yao.qi@linaro.org>
4843
4844 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4845
8ee52567
YQ
48462015-08-25 Yao Qi <yao.qi@linaro.org>
4847
4848 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4849 the code.
4850
ff3f0f45
YQ
48512015-08-25 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4854 Remove.
4855 (debug_reg_change_callback): Remove argument entry and add argument
4856 lwp. Remove local variable thread. Don't print thread id in the
4857 debugging output. Don't check whether pid of thread equals to pid.
4858 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4859 iterate_over_lwps instead find_inferior.
4860
3d40fbb5
PA
48612015-08-24 Pedro Alves <palves@redhat.com>
4862
4863 * inferiors.c (get_first_process): New function.
4864 * inferiors.h (get_first_process): New declaration.
4865 * remote-utils.c (read_ptid): Default to the first process in the
4866 list, instead of to the current thread's process.
4867
438e1e42
PA
48682015-08-24 Pedro Alves <palves@redhat.com>
4869
4870 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4871 * event-loop.c: Likewise.
4872 * remote-utils.c: Likewise.
4873 * tracepoint.c: Likewise.
4874
a8c6d4fc
PA
48752015-08-24 Pedro Alves <palves@redhat.com>
4876
4877 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4878 ptid_get_lwp.
4879
99b0bb12
PA
48802015-08-21 Pedro Alves <palves@redhat.com>
4881
4882 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4883 instead of literal 1.
4884
f8904751
PA
48852015-08-21 Pedro Alves <palves@redhat.com>
4886
4887 * tdesc.c (default_description): Explicitly zero-initialize.
4888
465a859e
PA
48892015-08-21 Pedro Alves <palves@redhat.com>
4890
4891 PR gdb/18749
4892 * inferiors.c (remove_thread): Discard any pending stop reply for
4893 this thread.
4894 * server.c (remove_all_on_match_pid): Rename to ...
4895 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4896 instead of a pid.
4897 (discard_queued_stop_replies): Change parameter to a ptid. Now
4898 extern.
4899 (handle_v_kill, kill_inferior_callback, captured_main)
4900 (process_serial_event): Adjust.
4901 * server.h (discard_queued_stop_replies): Declare.
4902
f0db101d
PA
49032015-08-21 Pedro Alves <palves@redhat.com>
4904
4905 * linux-low.c (wait_for_sigstop): Always switch to no thread
4906 selected if the previously current thread dies.
4907 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4908 process instead of the current thread's.
4909 * remote-utils.c (input_interrupt): Don't check if there's no
4910 current thread.
4911 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4912 current thread to the general thread fails, error out.
4913 (handle_qxfer_auxv, handle_qxfer_libraries)
4914 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4915 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4916 (handle_query): Check if there's a thread selected instead of
4917 checking whether there's any thread in the thread list.
4918 (handle_qxfer_threads, handle_qxfer_btrace)
4919 (handle_qxfer_btrace_conf): Don't error out early if there's no
4920 thread in the thread list.
4921 (handle_v_cont, myresume): Don't set the current thread to the
4922 continue thread.
4923 (process_serial_event) <Hg handling>: Also set thread_id if the
4924 previous general thread is still alive.
4925 (process_serial_event) <g/G handling>: If setting the current
4926 thread to the general thread fails, error out.
4927 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4928 thread's lwp instead of the current thread's.
4929 * target.c (set_desired_thread): If the desired thread was not
4930 found, leave the current thread pointing to NULL. Return an int
4931 (boolean) indicating success.
4932 * target.h (set_desired_thread): Change return type to int.
4933
40045d91
MF
49342015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4935
4936 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4937 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4938 #includes.
4939 (ps_get_thread_area): New function.
4940
45face3b
GB
49412015-08-19 Gary Benson <gbenson@redhat.com>
4942
4943 * hostio.c (handle_pread): Do not attempt to read more data
4944 than hostio_reply_with_data can fit in a packet.
4945
16d5f642
JB
49462015-08-18 Joel Brobecker <brobecker@adacore.com>
4947
4948 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4949
a738da3a
MF
49502015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4951
4952 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4953
33ebda9d
PA
49542015-08-06 Pedro Alves <palves@redhat.com>
4955
4956 * tracepoint.c (expr_eval_result): Now an int.
4957
a44892be
PA
49582015-08-06 Pedro Alves <palves@redhat.com>
4959
4960 * gdbthread.h (struct regcache): Forward declare.
4961 (struct thread_info) <regcache_data>: Now a struct regcache
4962 pointer.
4963 * inferiors.c (inferior_regcache_data)
4964 (set_inferior_regcache_data): Now work with struct regcache
4965 pointers.
4966 * inferiors.h (struct regcache): Forward declare.
4967 (inferior_regcache_data, set_inferior_regcache_data): Now work
4968 with struct regcache pointers.
4969 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4970 (free_register_cache_thread): Remove struct regcache pointer
4971 casts.
4972
608a1e46
PA
49732015-08-06 Pedro Alves <palves@redhat.com>
4974
4975 * server.c (captured_main): On error, print the exception message
4976 to stderr, and if run_once is set, throw a quit.
4977
f0ce0d3a
PA
49782015-08-06 Pedro Alves <palves@redhat.com>
4979
4980 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4981 the current thread.
4982
bf47e248
PA
49832015-08-06 Pedro Alves <palves@redhat.com>
4984
4985 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4986 reading beyond the passed in buffer length.
4987
b6b9ffcc
PL
49882015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4989
4990 * tracepoint.c (symbol_list) <required>: Remove.
4991
863d01bd
PA
49922015-08-06 Pedro Alves <palves@redhat.com>
4993
4994 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4995 count if stopping and suspending threads.
4996 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4997 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4998 (linux_detach): Complete an ongoing step-over.
4999 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5000 throughout.
5001 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5002 (linux_wait_1): If passing a signal to the inferior after
5003 finishing a step-over, unsuspend and re-resume all lwps. If we
5004 see a single-step event but the thread should be continuing, don't
5005 pass the trap to gdb.
5006 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5007 internal_error instead of gdb_assert.
5008 (enqueue_pending_signal): New function.
5009 (check_ptrace_stopped_lwp_gone): Add debug output.
5010 (start_step_over): Use internal_error instead of gdb_assert.
5011 (complete_ongoing_step_over): New function.
5012 (linux_resume_one_thread): Don't resume a suspended thread.
5013 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5014 it stepping.
5015
00db26fa
PA
50162015-08-06 Pedro Alves <palves@redhat.com>
5017
5018 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5019 (linux_thread_alive): Use lwp_is_marked_dead.
5020 (extended_event_reported): Delete.
5021 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5022 instead of extended_event_reported.
5023 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5024 as well.
5025 (lwp_is_marked_dead): New function.
5026 (lwp_running): Use lwp_is_marked_dead.
5027 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5028 comment.
5029
ad071a30
PA
50302015-08-06 Pedro Alves <palves@redhat.com>
5031
5032 * linux-low.c (linux_wait_1): Move fork event output out of the
5033 !report_to_gdb check. Pass event_child->waitstatus to
5034 target_waitstatus_to_string instead of ourstatus.
5035
524b57e6
YQ
50362015-08-04 Yao Qi <yao.qi@linaro.org>
5037
5038 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5039 if current_thread is 32 bit.
5040
6085d6f6
YQ
50412015-08-04 Yao Qi <yao.qi@linaro.org>
5042
5043 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5044 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5045 * server.c (extended_protocol): Remove "static".
5046 * server.h (extended_protocol): Declare it.
5047
8a7e4587
YQ
50482015-08-04 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5051 both aarch64 and aarch32.
5052 (aarch64_set_pc): Likewise.
5053
3b53ae99
YQ
50542015-08-04 Yao Qi <yao.qi@linaro.org>
5055
5056 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5057 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5058 arm-with-neon.xml to srv_xmlfiles.
5059 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5060 (is_64bit_tdesc): New function.
5061 (aarch64_linux_read_description): New function.
5062 (aarch64_arch_setup): Call aarch64_linux_read_description.
5063 (regs_info): Rename to regs_info_aarch64.
5064 (aarch64_regs_info): Return right regs_info.
5065 (initialize_low_arch): Call initialize_low_arch_aarch32.
5066
bd9e6534
YQ
50672015-08-04 Yao Qi <yao.qi@linaro.org>
5068
5069 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5070 * linux-aarch32-low.c: New file.
5071 * linux-aarch32-low.h: New file.
5072 * linux-arm-low.c (arm_fill_gregset): Move it to
5073 linux-aarch32-low.c.
5074 (arm_store_gregset): Likewise.
5075 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5076 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5077 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5078 (regs_info): Rename to regs_info_arm.
5079 (arm_regs_info): Return regs_info_aarch32 if
5080 have_ptrace_getregset is 1 and target description is
5081 arm_with_neon or arm_with_vfpv3.
5082 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5083 Call initialize_low_arch_aarch32 instead.
5084
ded48a5e
YQ
50852015-08-04 Yao Qi <yao.qi@linaro.org>
5086
5087 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5088 * linux-low.c: ... here.
5089 * linux-low.h (have_ptrace_getregset): Declare it.
5090
96e9210f
PA
50912015-08-04 Pedro Alves <palves@redhat.com>
5092
5093 * thread-db.c (struct thread_db): Use new typedefs.
5094 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5095 CHK calls.
5096 (disable_thread_event_reporting): Cast result of dlsym to
5097 destination function pointer type.
5098 (thread_db_mourn): Use td_ta_delete_ftype.
5099
af60a1ef
SL
51002015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5101
5102 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5103 arch variant.
5104 (CDX_BREAKPOINT): Define for R2.
5105 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5106 (the_low_target): Add comments.
5107
e8b41681
YQ
51082015-07-30 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-arm-low.c (arm_hwcap): Remove it.
5111 (arm_read_description): New local variable arm_hwcap. Don't
5112 set arm_hwcap to zero.
5113
89abb039
YQ
51142015-07-30 Yao Qi <yao.qi@linaro.org>
5115
5116 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5117 Use regcache->tdesc instead.
5118 (arm_store_wmmxregset): Likewise.
5119 (arm_fill_vfpregset): Likewise.
5120 (arm_store_vfpregset): Likewise.
5121
deca266c
YQ
51222015-07-30 Yao Qi <yao.qi@linaro.org>
5123
5124 * linux-arm-low.c: Include arch/arm.h.
5125 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5126 (arm_store_gregset): Likewise.
5127
aa58a496
SM
51282015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5129
5130 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5131 ptrace's 4th parameter.
5132
50904b25
YQ
51332015-07-27 Yao Qi <yao.qi@linaro.org>
5134
5135 * configure.srv (case aarch64*-*-linux*): Don't set
5136 srv_linux_usrregs.
5137
5826e159
PA
51382015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5139
5140 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5141 sys/ptrace.h.
5142 * linux-arm-low.c: Likewise.
5143 * linux-cris-low.c: Likewise.
5144 * linux-crisv32-low.c: Likewise.
5145 * linux-low.c: Likewise.
5146 * linux-m68k-low.c: Likewise.
5147 * linux-mips-low.c: Likewise.
5148 * linux-nios2-low.c: Likewise.
5149 * linux-s390-low.c: Likewise.
5150 * linux-sparc-low.c: Likewise.
5151 * linux-tic6x-low.c: Likewise.
5152 * linux-tile-low.c: Likewise.
5153 * linux-x86-low.c: Likewise.
5154
54019719
PA
51552015-07-24 Pedro Alves <palves@redhat.com>
5156
5157 * config.in: Regenerate.
5158 * configure: Regenerate.
5159
eb7aa561
PA
51602015-07-24 Pedro Alves <palves@redhat.com>
5161
5162 * acinclude.m4: Include ../ptrace.m4.
5163 * configure.ac: Call GDB_AC_PTRACE.
5164 * config.in, configure: Regenerate.
5165
55d7b841
YQ
51662015-07-24 Yao Qi <yao.qi@linaro.org>
5167
5168 * linux-low.c (linux_create_inferior): Remove setting to
5169 proc->priv->new_inferior.
5170 (linux_attach): Likewise.
5171 (linux_low_filter_event): Likewise.
5172 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5173
c06cbd92
YQ
51742015-07-24 Yao Qi <yao.qi@linaro.org>
5175
5176 * linux-low.c (linux_arch_setup): New function.
5177 (linux_low_filter_event): If proc->tdesc is NULL and
5178 proc->attached is true, call the_low_target.arch_setup.
5179 Otherwise, keep status pending, and return.
5180 (linux_resume_one_lwp_throw): Don't call get_pc if
5181 thread->while_stepping isn't NULL. Don't call
5182 get_thread_regcache if proc->tdesc is NULL.
5183 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5184 (linux_target_ops): Install arch_setup.
5185 * server.c (start_inferior): Call the_target->arch_setup.
5186 * target.h (struct target_ops) <arch_setup>: New field.
5187 (target_arch_setup): New marco.
5188 * lynx-low.c (lynx_target_ops): Update.
5189 * nto-low.c (nto_target_ops): Update.
5190 * spu-low.c (spu_target_ops): Update.
5191 * win32-low.c (win32_target_ops): Update.
5192
5ae3ebba
YQ
51932015-07-24 Yao Qi <yao.qi@linaro.org>
5194
5195 * linux-low.c (linux_add_process): Don't set
5196 proc->priv->new_inferior.
5197 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5198 (linux_attach): Likewise.
5199
eb97750b
YQ
52002015-07-24 Yao Qi <yao.qi@linaro.org>
5201
5202 * server.c (start_inferior): Code refactor.
5203
51aee833
YQ
52042015-07-24 Yao Qi <yao.qi@linaro.org>
5205
5206 * server.c (process_serial_event): Set general_thread.
5207
af1b22f3
YQ
52082015-07-21 Yao Qi <yao.qi@linaro.org>
5209
5210 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5211 aarch64_linux_get_debug_reg_capacity.
5212
554717a3
YQ
52132015-07-17 Yao Qi <yao.qi@linaro.org>
5214
5215 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5216 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5217 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5218 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5219 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5220 (AARCH64_HWP_ALIGNMENT): Likewise.
5221 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5222 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5223 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5224 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5225 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5226 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5227 (struct aarch64_debug_reg_state): Likewise.
5228 (struct arch_lwp_info): Likewise.
5229 (aarch64_align_watchpoint): Likewise.
5230 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5231 (aarch64_watchpoint_length): Likewise.
5232 (aarch64_point_encode_ctrl_reg): Likewise
5233 (aarch64_point_is_aligned): Likewise.
5234 (aarch64_align_watchpoint): Likewise.
5235 (aarch64_linux_set_debug_regs):
5236 (aarch64_dr_state_insert_one_point): Likewise.
5237 (aarch64_dr_state_remove_one_point): Likewise.
5238 (aarch64_handle_breakpoint): Likewise.
5239 (aarch64_handle_aligned_watchpoint): Likewise.
5240 (aarch64_handle_unaligned_watchpoint): Likewise.
5241 (aarch64_handle_watchpoint): Likewise.
5242
c67ca4de
YQ
52432015-07-17 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5246 and don't aarch64_get_debug_reg_state. All callers update.
5247 (aarch64_handle_aligned_watchpoint): Likewise.
5248 (aarch64_handle_unaligned_watchpoint): Likewise.
5249 (aarch64_handle_watchpoint): Likewise.
5250 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5251 (aarch64_remove_point): Likewise.
5252
25abf979
YQ
52532015-07-17 Yao Qi <yao.qi@linaro.org>
5254
5255 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5256 debug_printf.
5257 (aarch64_handle_unaligned_watchpoint): Likewise.
5258
db1ff28b
JK
52592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5260
5261 Revert the previous 3 commits:
5262 Move gdb_regex* to common/
5263 Move linux_find_memory_regions_full & co.
5264 gdbserver build-id attribute generator
5265
700ca40f
JK
52662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5267 Jan Kratochvil <jan.kratochvil@redhat.com>
5268
5269 gdbserver build-id attribute generator.
5270 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5271 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5272 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5273 (find_phdr): New.
5274 (get_dynamic): Use find_pdhr to traverse program headers.
5275 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5276 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5277 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5278 (get_hex_build_id): New.
5279 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5280 to reply XML document.
5281
9904185c
JK
52822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5283 Jan Kratochvil <jan.kratochvil@redhat.com>
5284
5285 * target.c: Include target/target-utils.h and fcntl.h.
5286 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5287 (target_fileio_read_stralloc): New functions.
5288
6e5b4429
JK
52892015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5290
5291 * Makefile.in (OBS): Add gdb_regex.o.
5292 (gdb_regex.o): New.
5293 * config.in: Rebuilt.
5294 * configure: Rebuilt.
5295
ddc98fbf
JK
52962015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5297 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5300 * Makefile.in (OBS): Add target-utils.o.
5301 (linux-maps.o, target-utils.o): New.
5302 * configure.srv (srv_linux_obj): Add linux-maps.o.
5303
e57bb7a0
PL
53042015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5305
5306 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5307 function, return 1.
5308 (the_low_target): Install it.
5309
586b02a9
PA
53102015-07-14 Pedro Alves <palves@redhat.com>
5311
5312 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5313 Instead, ignore ECHILD, and throw an error for other errnos.
5314
58c1b36c
PA
53152015-07-10 Pedro Alves <palves@redhat.com>
5316
5317 * event-loop.c (struct callback_event) <data>: Change type to
5318 gdb_client_data instance instead of gdb_client_data pointer.
5319 (append_callback_event): Adjust.
5320
421530db
PL
53212015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5322
5323 * linux-aarch64-low.c: Add comments for each linux_target_ops
5324 method. Remove comments already covered in target_ops and
5325 linux_target_ops definitions.
5326 (the_low_target): Add comments for each unimplemented method.
5327
c2d65f38
YQ
53282015-07-09 Yao Qi <yao.qi@linaro.org>
5329
5330 * linux-aarch64-low.c (aarch64_regmap): Remove.
5331 (aarch64_usrregs_info): Remove.
5332 (regs_info): Set field usrregs to NULL.
5333
b20a6524
MM
53342015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5335
5336 * linux-low.c: Include "rsp-low.h"
5337 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5338 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5339 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5340 (handle_btrace_enable_pt): New.
5341 (handle_btrace_general_set): Support "pt".
5342 (handle_btrace_conf_general_set): Support "pt:size".
5343
96c97461
PL
53442015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5345
5346 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5347 Z_PACKET_SW_BP.
5348
37d66942
PL
53492015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5350
5351 * linux-aarch64-low.c: Remove comment about endianness.
5352 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5353 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5354 memcmp.
5355
dc06243f
GB
53562015-06-24 Gary Benson <gbenson@redhat.com>
5357
5358 * linux-i386-ipa.c (stdint.h): Do not include.
5359 * lynx-i386-low.c (stdint.h): Likewise.
5360 * lynx-ppc-low.c (stdint.h): Likewise.
5361 * mem-break.c (stdint.h): Likewise.
5362 * thread-db.c (stdint.h): Likewise.
5363 * tracepoint.c (stdint.h): Likewise.
5364 * win32-low.c (stdint.h): Likewise.
5365
124e13d9
SM
53662015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5367
5368 * server.c (write_qxfer_response): Update call to
5369 remote_escape_output.
5370
909c2cda
JK
53712015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5372 Jan Kratochvil <jan.kratochvil@redhat.com>
5373
5374 Merge multiple hex conversions.
5375 * gdbreplay.c (tohex): Rename to 'fromhex'.
5376 (logchar): Use fromhex.
5377
24c05f46
JK
53782015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5379
5380 * server.c (handle_qxfer_libraries): Set `version' attribute for
5381 <library-list>.
5382
14d2069a
GB
53832015-06-10 Gary Benson <gbenson@redhat.com>
5384
5385 * target.h (struct target_ops) <multifs_open>: New field.
5386 <multifs_unlink>: Likewise.
5387 <multifs_readlink>: Likewise.
5388 * linux-low.c (nat/linux-namespaces.h): New include.
5389 (linux_target_ops): Initialize the_target->multifs_open,
5390 the_target->multifs_unlink and the_target->multifs_readlink.
5391 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5392 * hostio.c (hostio_fs_pid): New static variable.
5393 (hostio_handle_new_gdb_connection): New function.
5394 (handle_setfs): Likewise.
5395 (handle_open): Use the_target->multifs_open as appropriate.
5396 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5397 (handle_readlink): Use the_target->multifs_readlink as
5398 appropriate.
5399 (handle_vFile): Handle vFile:setfs packets.
5400 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5401 after target_handle_new_gdb_connection.
5402
4b8b5e72
GB
54032015-06-10 Gary Benson <gbenson@redhat.com>
5404
5405 * configure.ac (AC_CHECK_FUNCS): Add setns.
5406 * config.in: Regenerate.
5407 * configure: Likewise.
5408 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5409 (linux-namespaces.o): New rule.
5410 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5411
3ac2e371
GB
54122015-06-09 Gary Benson <gbenson@redhat.com>
5413
5414 * hostio.c (handle_open): Process mode argument with
5415 fileio_to_host_mode.
5416
ca9b78ce
YQ
54172015-06-01 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5420 * linux-x86-low.c: Likewise.
5421
bfacd19d
DB
54222015-05-28 Don Breazeal <donb@codesourcery.com>
5423
5424 * linux-low.c (handle_extended_wait): Initialize
5425 thread_info.last_resume_kind for new fork children.
5426
452003ef
PA
54272015-05-15 Pedro Alves <palves@redhat.com>
5428
5429 * target.h (target_handle_new_gdb_connection): Rewrite using if
5430 wrapped in do/while.
5431
1041a03c
JB
54322015-05-14 Joel Brobecker <brobecker@adacore.com>
5433
5434 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5435 * configure, config.in: Regenerate.
5436 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5437 Declare typedef.
5438
c269dbdb
DB
54392015-05-12 Don Breazeal <donb@codesourcery.com>
5440
5441 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5442 PTRACE_EVENT_VFORK_DONE.
5443 (linux_low_ptrace_options, extended_event_reported): Add vfork
5444 events.
5445 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5446 and "vforkdone" for RSP 'T' Stop Reply Packet.
5447 * server.h (report_vfork_events): Declare
5448 global variable.
5449
3a8a0396
DB
54502015-05-12 Don Breazeal <donb@codesourcery.com>
5451
5452 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5453 (the_low_target) <new_fork>: Initialize new member.
5454 * linux-arm-low.c (arm_new_fork): New function.
5455 (the_low_target) <new_fork>: Initialize new member.
5456 * linux-low.c (handle_extended_wait): Call new target function
5457 new_fork.
5458 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5459 * linux-mips-low.c (mips_add_watchpoint): New function
5460 extracted from mips_insert_point.
5461 (the_low_target) <new_fork>: Initialize new member.
5462 (mips_linux_new_fork): New function.
5463 (mips_insert_point): Call mips_add_watchpoint.
5464 * linux-x86-low.c (x86_linux_new_fork): New function.
5465 (the_low_target) <new_fork>: Initialize new member.
5466
de0d863e
DB
54672015-05-12 Don Breazeal <donb@codesourcery.com>
5468
5469 * linux-low.c (handle_extended_wait): Implement return value,
5470 rename argument 'event_child' to 'event_lwp', handle
5471 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5472 (linux_low_ptrace_options): New function.
5473 (linux_low_filter_event): Call linux_low_ptrace_options,
5474 use different argument fo linux_enable_event_reporting,
5475 use return value from handle_extended_wait.
5476 (extended_event_reported): New function.
5477 (linux_wait_1): Call extended_event_reported and set
5478 status to report fork events.
5479 (linux_write_memory): Add pid to debug message.
5480 (reset_lwp_ptrace_options_callback): New function.
5481 (linux_handle_new_gdb_connection): New function.
5482 (linux_target_ops): Initialize new structure member.
5483 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5484 * lynx-low.c: Initialize new structure member.
5485 * remote-utils.c (prepare_resume_reply): Implement stop reason
5486 "fork" for "T" stop message.
5487 * server.c (handle_query): Call handle_new_gdb_connection.
5488 * server.h (report_fork_events): Declare global flag.
5489 * target.h (struct target_ops) <handle_new_gdb_connection>:
5490 New member.
5491 (target_handle_new_gdb_connection): New macro.
5492 * win32-low.c: Initialize new structure member.
5493
ddcbc397
DB
54942015-05-12 Don Breazeal <donb@codesourcery.com>
5495
5496 * mem-break.c (APPEND_TO_LIST): Define macro.
5497 (clone_agent_expr): New function.
5498 (clone_one_breakpoint): New function.
5499 (clone_all_breakpoints): New function.
5500 * mem-break.h: Declare new functions.
5501
89245bc0
DB
55022015-05-12 Don Breazeal <donb@codesourcery.com>
5503
5504 * linux-low.c (linux_supports_fork_events): New function.
5505 (linux_supports_vfork_events): New function.
5506 (linux_target_ops): Initialize new structure members.
5507 (initialize_low): Call linux_check_ptrace_features.
5508 * lynx-low.c (lynx_target_ops): Initialize new structure
5509 members.
5510 * server.c (report_fork_events, report_vfork_events):
5511 New global flags.
5512 (handle_query): Add new features to qSupported packet and
5513 response.
5514 (captured_main): Initialize new global variables.
5515 * target.h (struct target_ops) <supports_fork_events>:
5516 New member.
5517 <supports_vfork_events>: New member.
5518 (target_supports_fork_events): New macro.
5519 (target_supports_vfork_events): New macro.
5520 * win32-low.c (win32_target_ops): Initialize new structure
5521 members.
5522
835205d0
GB
55232015-05-12 Gary Benson <gbenson@redhat.com>
5524
5525 * server.c (handle_qxfer_exec_file): Use current process
5526 if annex is empty.
5527
21e94bd9
SL
55282015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5529
5530 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5531 Remove HAVE_PTRACE_GETREGS conditionals.
5532 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5533 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5534
45614f15
YQ
55352015-05-08 Yao Qi <yao.qi@linaro.org>
5536
5537 * linux-low.c (linux_supports_conditional_breakpoints): New
5538 function.
5539 (linux_target_ops): Install new target method.
5540 * lynx-low.c (lynx_target_ops): Install NULL hook for
5541 supports_conditional_breakpoints.
5542 * nto-low.c (nto_target_ops): Likewise.
5543 * spu-low.c (spu_target_ops): Likewise.
5544 * win32-low.c (win32_target_ops): Likewise.
5545 * server.c (handle_query): Check
5546 target_supports_conditional_breakpoints.
5547 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5548 New field.
5549 (target_supports_conditional_breakpoints): New macro.
5550
80ad801e
PA
55512015-05-06 Pedro Alves <palves@redhat.com>
5552
5553 PR server/18081
5554 * server.c (start_inferior): If the process exits, mourn it.
5555
819843c7
GB
55562015-04-21 Gary Benson <gbenson@redhat.com>
5557
5558 * hostio.c (fileio_open_flags_to_host): Factored out to
5559 fileio_to_host_openflags in common/fileio.c. Single use
5560 updated.
5561
a2d5a9d7
MF
55622015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5563
5564 * linux-xtensa-low.c (xtensa_fill_gregset)
5565 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5566 XCHAL_HAVE_LOOP.
5567
deb44829
MF
55682015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5569
5570 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5571 (regs_info): Replace usrregs pointer with NULL.
5572
e57f1de3
GB
55732015-04-17 Gary Benson <gbenson@redhat.com>
5574
5575 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5576 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5577 * server.c (handle_qxfer_exec_file): New function.
5578 (qxfer_packets): Add exec-file entry.
5579 (handle_query): Report qXfer:exec-file:read as supported packet.
5580
62828379
RN
55812015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5582
5583 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5584
b88bb450
GB
55852015-04-09 Gary Benson <gbenson@redhat.com>
5586
5587 * hostio-errno.c (errno_to_fileio_error): Remove function.
5588 Update caller to use remote_fileio_to_fio_error.
5589
c8f4bfdd
YQ
55902015-04-09 Yao Qi <yao.qi@linaro.org>
5591
5592 * linux-low.c (linux_insert_point): Call
5593 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5594 (linux_remove_point): Call remove_memory_breakpoint if type is
5595 raw_bkpt_type_sw.
5596 * linux-x86-low.c (x86_insert_point): Don't call
5597 insert_memory_breakpoint.
5598 (x86_remove_point): Don't call remove_memory_breakpoint.
5599
41f98f02
PA
56002015-04-01 Pedro Alves <palves@redhat.com>
5601 Cleber Rosa <crosa@redhat.com>
5602
5603 * server.c (gdbserver_usage): Reorganize and extend the usage
5604 message.
5605
2bf6fb9d
PA
56062015-03-24 Pedro Alves <palves@redhat.com>
5607
5608 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5609 output. Also dump TRAP_TRACE.
5610 (linux_low_filter_event): In debug output, distinguish a
5611 resume_stop SIGSTOP from a delayed SIGSTOP.
5612
369f6daa
GB
56132015-03-24 Gary Benson <gbenson@redhat.com>
5614
5615 * linux-x86-low.c (x86_linux_new_thread): Moved to
5616 nat/x86-linux.c.
5617 (x86_linux_prepare_to_resume): Likewise.
5618
8e5d4070
GB
56192015-03-24 Gary Benson <gbenson@redhat.com>
5620
5621 * Makefile.in (x86-linux-dregs.o): New rule.
5622 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5623 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5624 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5625 (x86_linux_dr_get): Likewise.
5626 (x86_linux_dr_set): Likewise.
5627 (update_debug_registers_callback): Likewise.
5628 (x86_linux_dr_set_addr): Likewise.
5629 (x86_linux_dr_get_addr): Likewise.
5630 (x86_linux_dr_set_control): Likewise.
5631 (x86_linux_dr_get_control): Likewise.
5632 (x86_linux_dr_get_status): Likewise.
5633 (x86_linux_update_debug_registers): Likewise.
5634
2b95d440
GB
56352015-03-24 Gary Benson <gbenson@redhat.com>
5636
5637 * linux-x86-low.c (x86_linux_update_debug_registers):
5638 New function, factored out from...
5639 (x86_linux_prepare_to_resume): ...this.
5640
14b0bc68
GB
56412015-03-24 Gary Benson <gbenson@redhat.com>
5642
5643 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5644 (x86_linux_dr_set): Likewise.
5645 (update_debug_registers_callback): Likewise.
5646 (x86_linux_dr_set_addr): Likewise.
5647 (x86_linux_dr_get_addr): Likewise.
5648 (x86_linux_dr_set_control): Likewise.
5649 (x86_linux_dr_get_control): Likewise.
5650 (x86_linux_dr_get_status): Likewise.
5651 (x86_linux_prepare_to_resume): Likewise.
5652
5dfe6ca8
GB
56532015-03-24 Gary Benson <gbenson@redhat.com>
5654
5655 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5656 Use perror_with_name. Pass string through gettext.
5657 (x86_linux_dr_set): Likewise.
5658
d33472ad
GB
56592015-03-24 Gary Benson <gbenson@redhat.com>
5660
5661 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5662 (x86_linux_dr_set_addr): ...this.
5663 (x86_dr_low_get_addr): Rename to...
5664 (x86_linux_dr_get_addr): ...this.
5665 (x86_dr_low_set_control): Rename to...
5666 (x86_linux_dr_set_control): ...this.
5667 (x86_dr_low_get_control): Rename to...
5668 (x86_linux_dr_get_control): ...this.
5669 (x86_dr_low_get_status): Rename to...
5670 (x86_linux_dr_get_status): ...this.
5671 (x86_dr_low): Update with new function names.
5672
4b134ca1
GB
56732015-03-24 Gary Benson <gbenson@redhat.com>
5674
5675 * Makefile.in (x86-linux.o): New rule.
5676 * configure.srv: Add x86-linux.o to relevant targets.
5677 * linux-low.c (lwp_set_arch_private_info): New function.
5678 (lwp_arch_private_info): Likewise.
5679 * linux-x86-low.c: Include nat/x86-linux.h.
5680 (arch_lwp_info): Removed structure.
5681 (update_debug_registers_callback):
5682 Use lwp_set_debug_registers_changed.
5683 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5684 and lwp_set_debug_registers_changed.
5685 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5686
34c703da
GB
56872015-03-24 Gary Benson <gbenson@redhat.com>
5688
5689 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5690 * linux-arm-low.c (arm_new_thread): Likewise.
5691 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5692 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5693 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5694 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5695
cff068da
GB
56962015-03-24 Gary Benson <gbenson@redhat.com>
5697
5698 * linux-low.c (ptid_of_lwp): New function.
5699 (lwp_is_stopped): Likewise.
5700 (lwp_stop_reason): Likewise.
5701 * linux-x86-low.c (update_debug_registers_callback):
5702 Use lwp_is_stopped.
5703 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5704 lwp_stop_reason.
5705
b2f7c7e8
GB
57062015-03-24 Gary Benson <gbenson@redhat.com>
5707
5708 * linux-low.h (linux_stop_lwp): Remove declaration.
5709
6d4ee8c6
GB
57102015-03-24 Gary Benson <gbenson@redhat.com>
5711
5712 * linux-low.h: Include nat/linux-nat.h.
5713 * linux-low.c (iterate_over_lwps_args): New structure.
5714 (iterate_over_lwps_filter): New function.
5715 (iterate_over_lwps): Likewise.
5716 * linux-x86-low.c (update_debug_registers_callback):
5717 Update signature to what iterate_over_lwps expects.
5718 Remove PID check that iterate_over_lwps now performs.
5719 (x86_dr_low_set_addr): Use iterate_over_lwps.
5720 (x86_dr_low_set_control): Likewise.
5721
70a0bb6b
GB
57222015-03-24 Gary Benson <gbenson@redhat.com>
5723
5724 * linux-x86-low.c (x86_debug_reg_state): New function.
5725 (x86_linux_prepare_to_resume): Use the above.
5726
7b669087
GB
57272015-03-24 Gary Benson <gbenson@redhat.com>
5728
5729 * linux-low.c (current_lwp_ptid): New function.
5730 * linux-x86-low.c: Include nat/linux-nat.h.
5731 (x86_dr_low_get_addr): Use current_lwp_ptid.
5732 (x86_dr_low_get_control): Likewise.
5733 (x86_dr_low_get_status): Likewise.
5734
eef49a3d
PA
57352015-03-20 Pedro Alves <palves@redhat.com>
5736
5737 * tracepoint.c (cmd_qtstatus): Make "str" const.
5738
b2333d22
PA
57392015-03-20 Pedro Alves <palves@redhat.com>
5740
5741 * server.c (handle_general_set): Make "req_str" const.
5742
23f238d3
PA
57432015-03-19 Pedro Alves <palves@redhat.com>
5744
5745 * linux-low.c (linux_resume_one_lwp): Rename to ...
5746 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5747 instead call perror_with_name.
5748 (check_ptrace_stopped_lwp_gone): New function.
5749 (linux_resume_one_lwp): Reimplement as wrapper around
5750 linux_resume_one_lwp_throw that swallows errors if the LWP is
5751 gone.
5752
91baf43f
PA
57532015-03-19 Pedro Alves <palves@redhat.com>
5754
5755 * linux-low.c (count_events_callback, select_event_lwp_callback):
5756 No longer check whether the thread has resume_stop as last resume
5757 kind.
5758
8bf3b159
PA
57592015-03-19 Pedro Alves <palves@redhat.com>
5760
5761 * linux-low.c (count_events_callback, select_event_lwp_callback):
5762 Use the lwp's status_pending_p field, not the thread's.
5763
b90fc188
PA
57642015-03-19 Pedro Alves <palves@redhat.com>
5765
5766 * linux-low.c (select_event_lwp_callback): Update comments to
5767 no longer mention SIGTRAP.
5768
464b0089
GB
57692015-03-18 Gary Benson <gbenson@redhat.com>
5770
5771 * server.c (handle_query): Do not report vFile:fstat as supported.
5772
aa9e327f
GB
57732015-03-11 Gary Benson <gbenson@redhat.com>
5774
5775 * hostio.c (sys/types.h): New include.
5776 (sys/stat.h): Likewise.
5777 (common-remote-fileio.h): Likewise.
5778 (handle_fstat): New function.
5779 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5780
791c0056
GB
57812015-03-11 Gary Benson <gbenson@redhat.com>
5782
5783 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5784 struct stat.st_blocks and struct stat.st_blksize.
5785 * configure: Regenerate.
5786 * config.in: Likewise.
5787 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5788 (OBS): Add common-remote-fileio.o.
5789 (common-remote-fileio.o): New rule.
5790
9a9df970
PA
57912015-03-09 Pedro Alves <palves@redhat.com>
5792
5793 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5794 'struct sockaddr' pointer in 'accept' call.
5795
9eb1356e
PA
57962015-03-09 Pedro Alves <palves@redhat.com>
5797
5798 Revert:
5799 2015-03-07 Pedro Alves <palves@redhat.com>
5800 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5801 or <winsock2.h> here. Instead include "gdb_socket.h".
5802 (remote_open): Use union gdb_sockaddr_u.
5803 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5804 or <winsock2.h> here. Instead include "gdb_socket.h".
5805 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5806 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5807 or <sys/un.h>.
5808 (init_named_socket, gdb_agent_helper_thread): Use union
5809 gdb_sockaddr_u.
5810
aac331e4
PA
58112015-03-07 Pedro Alves <palves@redhat.com>
5812
5813 * configure.ac (build_warnings): Move
5814 -Wdeclaration-after-statement to the C-specific set.
5815 * configure: Regenerate.
5816
366c75fc
PA
58172015-03-07 Pedro Alves <palves@redhat.com>
5818
5819 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5820 or <winsock2.h> here. Instead include "gdb_socket.h".
5821 (remote_open): Use union gdb_sockaddr_u.
5822 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5823 or <winsock2.h> here. Instead include "gdb_socket.h".
5824 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5825 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5826 or <sys/un.h>.
5827 (init_named_socket, gdb_agent_helper_thread): Use union
5828 gdb_sockaddr_u.
5829
492d29ea
PA
58302015-03-07 Pedro Alves <palves@redhat.com>
5831
5832 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5833 instead.
5834
60a191ed
YQ
58352015-03-06 Yao Qi <yao.qi@linaro.org>
5836
5837 * linux-aarch64-low.c (aarch64_insert_point): Use
5838 show_debug_regs as a boolean.
5839 (aarch64_remove_point): Likewise.
5840
f5771b1d
PA
58412015-03-05 Pedro Alves <palves@redhat.com>
5842
5843 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5844 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5845 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5846 * nto-low.c (nto_target_ops): Likewise.
5847 * spu-low.c (spu_target_ops): Likewise.
5848 * win32-low.c (win32_target_ops): Likewise.
5849
3e572f71
PA
58502015-03-04 Pedro Alves <palves@redhat.com>
5851
72f4393d 5852 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5853 Decide whether a breakpoint triggered based on the SIGTRAP's
5854 siginfo.si_code.
72f4393d
L
5855 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5856 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5857 (linux_low_filter_event): Check for breakpoints before checking
5858 watchpoints.
5859 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5860 siginfo.si_code.
72f4393d
L
5861 (linux_stopped_by_sw_breakpoint)
5862 (linux_supports_stopped_by_sw_breakpoint)
5863 (linux_stopped_by_hw_breakpoint)
5864 (linux_supports_stopped_by_hw_breakpoint): New functions.
5865 (linux_target_ops): Install new target methods.
3e572f71 5866
1ec68e26
PA
58672015-03-04 Pedro Alves <palves@redhat.com>
5868
5869 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5870 * server.c (swbreak_feature, hwbreak_feature): New globals.
5871 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5872 (captured_main): Clear swbreak_feature and hwbreak_feature.
5873 * server.h (swbreak_feature, hwbreak_feature): Declare.
5874 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5875 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5876 supports_stopped_by_hw_breakpoint>: New fields.
5877 (target_supports_stopped_by_sw_breakpoint)
5878 (target_stopped_by_sw_breakpoint)
5879 (target_supports_stopped_by_hw_breakpoint)
5880 (target_stopped_by_hw_breakpoint): Declare.
5881
15c66dd6
PA
58822015-03-04 Pedro Alves <palves@redhat.com>
5883
5884 enum lwp_stop_reason -> enum target_stop_reason
5885 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5886 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5887 (linux_wait_1, stuck_in_jump_pad_callback)
5888 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5889 (linux_stopped_by_watchpoint):
5890 * linux-low.h (enum lwp_stop_reason): Delete.
5891 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5892 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5893
98fc70d6
YQ
58942015-03-04 Yao Qi <yao.qi@linaro.org>
5895
5896 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5897
dd2ac174
GB
58982015-03-03 Gary Benson <gbenson@redhat.com>
5899
5900 * hostio.c (handle_vFile): Fix prefix lengths.
5901
d68e53f4
MM
59022015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5903
5904 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5905 ptr_bits.
5906
bf2d68ab
AA
59072015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5908
5909 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5910 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5911 (clean): Add "rm -f" for above C files.
5912 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5913 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5914 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5915 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5916 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5917 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5918 (init_registers_s390x_vx_linux64)
5919 (init_registers_s390x_tevx_linux64)
5920 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5921 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5922 declarations.
5923 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5924 (s390_store_vxrs_high): New functions.
5925 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5926 NT_S390_VXRS_HIGH.
5927 (s390_arch_setup): Add logic for selecting one of the new target
5928 descriptions. Activate the new vector regsets if applicable.
5929 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5930 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5931 and init_registers_s390x_tevx_linux64.
5932
c966a859
PA
59332015-03-01 Pedro Alves <palves@redhat.com>
5934
5935 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5936 parameter.
5937
4180215b
PA
59382015-02-27 Pedro Alves <palves@redhat.com>
5939
5940 * linux-x86-low.c (u_debugreg_offset): New function.
5941 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5942
749bab01
PA
59432015-02-27 Pedro Alves <palves@redhat.com>
5944
5945 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5946 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5947 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5948 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5949 (ps_lsetfpregs, ps_getpid)
5950 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5951 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5952 (ps_lsetxregs, ps_plog): Declare.
5953
3c14e5a3
PA
59542015-02-27 Pedro Alves <palves@redhat.com>
5955
5956 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5957 IP_AGENT_EXPORT_FUNC.
5958 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5959 IP_AGENT_EXPORT_FUNC.
5960 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5961 (IP_AGENT_EXPORT): Delete.
5962 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5963 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5964 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5965 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5966 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5967 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5968 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5969 (traceframe_read_count, traceframe_write_count)
5970 (traceframes_created, trace_state_variables, get_raw_reg)
5971 (get_trace_state_variable_value, set_trace_state_variable_value)
5972 (ust_loaded, helper_thread_id, cmd_buf): Use
5973 IPA_SYM_EXPORTED_NAME.
5974 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5975 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5976 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5977 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5978 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5979 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5980 EXTERN_C_PUSH/EXTERN_C_POP.
5981 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5982 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5983 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5984 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5985 (traceframe_write_count, traceframe_read_count)
5986 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5987 (about_to_request_buffer_space, get_trace_state_variable_value)
5988 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5989 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5990 EXTERN_C_PUSH/EXTERN_C_POP.
5991 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5992 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5993 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5994 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5995 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5996 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5997 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5998 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5999 Define.
6000 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6001 (IP_AGENT_EXPORT_VAR_DECL): Define.
6002 (tracing): Declare.
6003 (gdb_agent_get_raw_reg): Declare.
6004
fe978cb0
PA
60052015-02-27 Tom Tromey <tromey@redhat.com>
6006 Pedro Alves <palves@redhat.com>
6007
6008 Rename symbols whose names are reserved C++ keywords throughout.
6009
3bc3d82a
PA
60102015-02-27 Pedro Alves <palves@redhat.com>
6011
6012 * Makefile.in (COMPILER): New, get it from autoconf.
6013 (CXX): Get from autoconf instead.
6014 (COMPILE.pre): Use COMPILER.
6015 (CC-LD): Rename to ...
6016 (CC_LD): ... this. Use COMPILER.
6017 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6018 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6019 * acinclude.m4: Include build-with-cxx.m4.
6020 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6021 Disable -Werror by default if building in C++ mode.
6022 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6023 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6024 the C++ compiler. Save/restore CXXFLAGS too.
6025 * configure: Regenerate.
6026
07697489
PA
60272015-02-27 Pedro Alves <palves@redhat.com>
6028
6029 * acinclude.m4: Include libiberty.m4.
6030 * configure.ac: Call libiberty_INIT.
6031 * config.in, configure: Regenerate.
6032
9beb7c4e
PA
60332015-02-26 Pedro Alves <palves@redhat.com>
6034
6035 * linux-low.c (linux_wait_1): When incrementing the PC past a
6036 program breakpoint always use the_low_target.breakpoint_len as
6037 increment, rather than the maximum between that and
6038 the_low_target.decr_pc_after_break.
6039
8090aef2
PA
60402015-02-23 Pedro Alves <palves@redhat.com>
6041
6042 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6043 thread was doing a step-over; always adjust the PC if
6044 we stepped over a permanent breakpoint.
6045 (linux_wait_1): If we stepped over breakpoint that was on top of a
6046 permanent breakpoint, manually advance the PC past it.
6047
bc9540e8
PA
60482015-02-23 Pedro Alves <palves@redhat.com>
6049
6050 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6051 modes.
6052 (x86_fill_gregset, x86_store_gregset): Use it when handling
6053 $orig_eax.
6054
2db9a427
PA
60552015-02-20 Pedro Alves <palves@redhat.com>
6056
6057 * thread-db.c: Include "nat/linux-procfs.h".
6058 (thread_db_init): Skip listing new threads if the kernel supports
6059 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6060
afa8d396
PA
60612015-02-20 Pedro Alves <palves@redhat.com>
6062
6063 * linux-low.c (status_pending_p_callback): Use ptid_match.
6064
c9587f88
AT
60652015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6066
6067 PR breakpoints/16812
6068 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6069 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6070 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6071
b05ec7a5
AT
60722015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6073
6074 PR breakpoints/15956
6075 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6076
d33501a5
MM
60772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6078
6079 * linux-low.c (linux_low_btrace_conf): Print size.
6080 * server.c (handle_btrace_conf_general_set): New.
6081 (hanle_general_set): Call handle_btrace_conf_general_set.
6082 (handle_query): Report Qbtrace-conf:bts:size as supported.
6083
f4abbc16
MM
60842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6085
6086 * linux-low.c (linux_low_enable_btrace): Update parameters.
6087 (linux_low_btrace_conf): New.
6088 (linux_target_ops)<to_btrace_conf>: Initialize.
6089 * server.c (current_btrace_conf): New.
6090 (handle_btrace_enable): Rename to ...
6091 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6092 to target_enable_btrace. Update comment. Update users.
6093 (handle_qxfer_btrace_conf): New.
6094 (qxfer_packets): Add btrace-conf entry.
6095 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6096 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6097 (target_ops)<read_btrace_conf>: New.
6098 (target_enable_btrace): Update parameters.
6099 (target_read_btrace_conf): New.
6100
043c3577
MM
61012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6102
6103 * server.c (handle_btrace_general_set): Remove call to
6104 target_supports_btrace.
6105 (supported_btrace_packets): New.
6106 (handle_query): Call supported_btrace_packets.
6107 * target.h: include btrace-common.h.
6108 (btrace_target_info): Removed.
6109 (supports_btrace, target_supports_btrace): Update parameters.
6110
734b0e4b
MM
61112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6112
6113 * Makefile.in (SFILES): Add common/btrace-common.c.
6114 (OBS): Add common/btrace-common.o.
6115 (btrace-common.o): Add build rules.
6116 * linux-low: Include btrace-common.h.
6117 (linux_low_read_btrace): Use struct btrace_data. Call
6118 btrace_data_init and btrace_data_fini.
6119
d6c146e9
PA
61202015-02-06 Pedro Alves <palves@redhat.com>
6121
6122 * thread-db.c (find_new_threads_callback): Add debug output.
6123
20ba1ce6
PA
61242015-02-04 Pedro Alves <palves@redhat.com>
6125
6126 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6127 (resume_stopped_resumed_lwps): New function.
6128 (linux_wait_for_event_filtered): Use it.
6129
8cc73a39
SDJ
61302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6131
6132 * Makefile.in (SFILES): Add linux-personality.c.
6133 (linux-personality.o): New rule.
6134 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6135 list of objects to be built.
6136 * linux-low.c: Include nat/linux-personality.h.
6137 (linux_create_inferior): Remove code to disable address space
6138 randomization (moved to ../nat/linux-personality.c). Create
6139 cleanup to disable address space randomization.
6140
fb23d554
SDJ
61412015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6142
6143 * Makefile.in (posix-strerror.o): New rule.
6144 (mingw-strerror.o): Likewise.
6145 * configure: Regenerated.
6146 * configure.ac: Source file ../common/common.host. Initialize new
6147 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6148
cdf43629
YQ
61492015-01-14 Yao Qi <yao@codesourcery.com>
6150
6151 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6152 (ppc-linux.o): New rule.
6153 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6154 * configure.ac: AC_CHECK_FUNCS(getauxval).
6155 * config.in: Re-generated.
6156 * configure: Re-generated.
6157 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6158 ppc64_64bit_inferior_p
6159
514c5338
YQ
61602015-01-14 Yao Qi <yao@codesourcery.com>
6161
6162 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6163 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6164 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6165 (PT_ORIG_R3, PT_TRAP): Likewise.
6166 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6167 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6168 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6169
3368c1e5
JB
61702015-01-10 Joel Brobecker <brobecker@adacore.com>
6171
6172 * i387-fp.c (i387_cache_to_xsave): In look over
6173 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6174 zmmh_low_space field by use of zmmh_high_space.
6175
582511be
PA
61762015-01-09 Pedro Alves <palves@redhat.com>
6177
6178 * linux-low.c (step_over_bkpt): Move higher up in the file.
6179 (handle_extended_wait): Don't store the stop_pc here.
6180 (get_stop_pc): Adjust comments and rename to ...
6181 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6182 stopped for a software breakpoint or hardware breakpoint.
6183 (thread_still_has_status_pending_p): New function.
6184 (status_pending_p_callback): Use
6185 thread_still_has_status_pending_p. If the event is no longer
6186 interesting, resume the LWP.
6187 (handle_tracepoints): Add assert.
6188 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6189 (wstatus_maybe_breakpoint): New function.
6190 (cancel_breakpoint): Delete function.
6191 (check_stopped_by_watchpoint): New function, factored out from
6192 linux_low_filter_event.
6193 (lp_status_maybe_breakpoint): Delete function.
6194 (linux_low_filter_event): Remove filter_ptid argument.
6195 Leave thread group exits pending here. Store the LWP's stop PC.
6196 Always leave events pending.
6197 (linux_wait_for_event_filtered): Pull all events out of the
6198 kernel, and leave them all pending.
6199 (count_events_callback, select_event_lwp_callback): Consider all
6200 events.
6201 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6202 (select_event_lwp): Only give preference to the stepping LWP in
6203 all-stop mode. Adjust comments.
6204 (ignore_event): New function.
6205 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6206 references to cancel_breakpoints. Adjust to renames. Also give
6207 equal priority to all LWPs that have had events in non-stop mode.
6208 If reporting a software breakpoint event, unadjust the LWP's PC.
6209 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6210 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6211 Adjust.
6212 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6213 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6214 (linux_stopped_by_watchpoint): Adjust.
6215 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6216 * linux-low.h (enum lwp_stop_reason): New.
6217 (struct lwp_info) <stop_pc>: Adjust comment.
6218 <stopped_by_watchpoint>: Delete field.
6219 <stop_reason>: New field.
6220 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6221 * mem-break.c (software_breakpoint_inserted_here)
6222 (hardware_breakpoint_inserted_here): New function.
6223 * mem-break.h (software_breakpoint_inserted_here)
6224 (hardware_breakpoint_inserted_here): Declare.
6225 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6226 (cancel_breakpoints): Delete.
6227 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6228 (upload_fast_traceframes): Remove references to
6229 cancel_breakpoints.
6230
a33e3959
PA
62312015-01-09 Pedro Alves <palves@redhat.com>
6232
6233 * thread-db.c (find_new_threads_callback): Ignore thread if the
6234 kernel thread ID is -1.
6235
8784d563
PA
62362015-01-09 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c (linux_attach_fail_reason_string): Move to
6239 nat/linux-ptrace.c, and rename.
6240 (linux_attach_lwp): Update comment.
6241 (attach_proc_task_lwp_callback): New function.
6242 (linux_attach): Adjust to rename and use
6243 linux_proc_attach_tgid_threads.
6244 (linux_attach_fail_reason_string): Delete declaration.
6245
76f2b779
JB
62462015-01-01 Joel Brobecker <brobecker@adacore.com>
6247
6248 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6249 * server.c (gdbserver_version): Likewise.
6250
fafcc06a
SDJ
62512014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6252
6253 * remote-utils.c: Include ctype.h.
6254 (input_interrupt): Explicitly handle the case when the char
6255 received is the NUL byte. Improve the printing of non-ASCII
6256 characters.
6257
beed38b8
JB
62582014-12-16 Joel Brobecker <brobecker@adacore.com>
6259
6260 * linux-low.c (linux_low_filter_event): Update call to
6261 linux_enable_event_reporting following the addition of
6262 a new parameter to that function.
6263
bf330350
CU
62642014-12-16 Catalin Udma <catalin.udma@freescale.com>
6265
6266 PR server/17457
6267 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6268 (AARCH64_FPCR_REGNO): Likewise.
6269 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6270 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6271 (aarch64_store_fpregset): Likewise.
6272
5227d625
JB
62732014-12-15 Joel Brobecker <brobecker@adacore.com>
6274
6275 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6276 Remove FIXME comment about assumption about N.
6277
f93b65a0
JB
62782014-12-13 Joel Brobecker <brobecker@adacore.com>
6279
6280 * configure.ac: If large-file support is disabled in GDBserver,
6281 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6282 * configure: Regenerate.
6283
e5a9158d
AA
62842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6285
6286 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6287 warning upon ENODATA from ptrace.
6288 * linux-s390-low.c (s390_store_tdb): New.
6289 (s390_regsets): Add regset for NT_S390_TDB.
6290
feea5f36
AA
62912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6292
6293 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6294 without a fill_function.
6295 * linux-s390-low.c (s390_fill_last_break): Remove.
6296 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6297 (s390_arch_setup): Use regset's size instead of fill_function for
6298 loop end condition.
6299
098dbe61
AA
63002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6301
6302 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6303 the regset's store function when ptrace returned an error.
6304 * regcache.c (get_thread_regcache): Invalidate register cache
6305 before fetching inferior's registers.
6306
28eef672
AA
63072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6308
6309 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6310 while-loop as for-loop.
6311 (regsets_store_inferior_registers): Likewise.
6312
bdca27a2
YQ
63132014-11-28 Yao Qi <yao@codesourcery.com>
6314
6315 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6316 * config.in, configure: Re-generate.
6317 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6318 is defined.
6319
9c232dda
YQ
63202014-11-21 Yao Qi <yao@codesourcery.com>
6321
6322 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6323 (AC_CHECK_HEADERS): Remove malloc.h.
6324 * configure: Re-generated.
6325 * config.in: Re-generated.
6326 * server.h: Don't include alloca.h and malloc.h.
6327 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6328 Don't include malloc.h.
6329
43968415
JB
63302014-11-17 Joel Brobecker <brobecker@adacore.com>
6331
6332 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6333 corresponding ERRNO check in same block.
6334
40e91bc7
PA
63352014-11-12 Pedro Alves <palves@redhat.com>
6336
6337 * server.c (cont_thread): Update comment.
6338 (start_inferior, attach_inferior): No longer clear cont_thread.
6339 (handle_v_cont): No longer set cont_thread.
6340 (captured_main): Clear cont_thread each time a GDB connects.
6341
c2c118cf
PA
63422014-11-12 Pedro Alves <palves@redhat.com>
6343
6344 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6345 thread, and don't resume all threads if the Hc thread has exited.
6346
78708b7c
PA
63472014-11-12 Pedro Alves <palves@redhat.com>
6348
6349 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6350 the process group instead of to a specific LWP.
6351
a2abc7de
PA
63522014-10-15 Pedro Alves <palves@redhat.com>
6353
6354 PR server/17487
6355 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6356 parameter.
6357 (arm_set_thread_context): Delete.
6358 (the_low_target): Adjust.
6359 * win32-i386-low.c (debug_registers_changed)
6360 (debug_registers_used): Delete.
6361 (update_debug_registers_callback): New function.
6362 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6363 needing to update their debug registers.
6364 (win32_get_current_dr): New function.
6365 (x86_dr_low_get_addr, x86_dr_low_get_control)
6366 (x86_dr_low_get_status): Fetch the debug register from the thread
6367 record's context.
6368 (i386_initial_stuff): Adjust.
6369 (i386_get_thread_context): Remove current_event parameter. Don't
6370 clear debug_registers_changed nor copy DR values to
6371 debug_reg_state.
6372 (i386_set_thread_context): Delete.
6373 (i386_prepare_to_resume): New function.
6374 (i386_thread_added): Mark the thread as needing to update irs
6375 debug registers.
6376 (the_low_target): Remove i386_set_thread_context and install
6377 i386_prepare_to_resume.
6378 * win32-low.c (win32_get_thread_context): Adjust.
6379 (win32_set_thread_context): Use SetThreadContext
6380 directly.
6381 (win32_prepare_to_resume): New function.
6382 (win32_require_context): New function, factored out from ...
6383 (thread_rec): ... this.
6384 (continue_one_thread): Call win32_prepare_to_resume on each thread
6385 we're about to continue.
6386 (win32_resume): Call win32_prepare_to_resume on the event thread.
6387 * win32-low.h (struct win32_thread_info)
6388 <debug_registers_changed>: New field.
6389 (struct win32_target_ops): Change prototype of set_thread_context,
6390 delete set_thread_context and add prepare_to_resume.
6391 (win32_require_context): New declaration.
6392
a442d071
GB
63932014-10-08 Gary Benson <gbenson@redhat.com>
6394
6395 * server.h: Do not include common-exceptions.h.
6396
6f1947e8
GB
63972014-10-08 Gary Benson <gbenson@redhat.com>
6398
6399 * server.h: Do not include cleanups.h.
6400
63b434a4
JH
64012014-09-30 James Hogan <james.hogan@imgtec.com>
6402
6403 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6404 mips64-dsp-linux.c.
6405
c4d9ceb6
YQ
64062014-09-23 Yao Qi <yao@codesourcery.com>
6407
6408 * linux-low.c (lp_status_maybe_breakpoint): New function.
6409 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6410 (count_events_callback): Likewise.
6411 (select_event_lwp_callback): Likewise.
6412 (cancel_breakpoints_callback): Likewise.
6413
89a5711c
DB
64142014-09-19 Don Breazeal <donb@codesourcery.com>
6415
6416 * linux-low.c (handle_extended_wait): Call
6417 linux_ptrace_get_extended_event.
6418 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6419 linux_is_extended_waitstatus.
6420
bffc0964
JB
64212014-09-16 Joel Brobecker <brobecker@adacore.com>
6422
6423 * Makefile.in (CPPFLAGS): Define.
6424 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6425 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6426
0bfdf32f
GB
64272014-09-16 Gary Benson <gbenson@redhat.com>
6428
6429 * inferiors.h (current_inferior): Renamed as...
6430 (current_thread): New variable. All uses updated.
6431 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6432 (maybe_move_out_of_jump_pad): Likewise.
6433 (cancel_breakpoint): Likewise.
6434 (linux_low_filter_event): Likewise.
6435 (wait_for_sigstop): Likewise.
6436 (linux_resume_one_lwp): Likewise.
6437 (need_step_over_p): Likewise.
6438 (start_step_over): Likewise.
6439 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6440 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6441 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6442 and save_inferior as saved_thread.
6443 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6444 saved_thread.
6445 (regcache_invalidate_thread): Likewise.
6446 * remote-utils.c (prepare_resume_reply): Likewise.
6447 * thread-db.c (thread_db_get_tls_address): Likewise.
6448 (disable_thread_event_reporting): Likewise.
6449 (remove_thread_event_breakpoints): Likewise.
6450 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6451 as saved_thread.
6452 * target.h (set_desired_inferior): Renamed as...
6453 (set_desired_thread): New declaration. All uses updated.
6454 * server.c (myresume): Updated comment to reference thread instead
6455 of inferior.
6456 (handle_serial_event): Likewise.
6457 (handle_target_event): Likewise.
6458
361c8ade
GB
64592014-09-12 Tom Tromey <tromey@redhat.com>
6460 Gary Benson <gbenson@redhat.com>
6461
6462 * regcache.h: Include common-regcache.h.
6463 (regcache_read_pc): Don't declare.
6464 * regcache.c (get_thread_regcache_for_ptid): New function.
6465
bd9269f7
GB
64662014-09-11 Tom Tromey <tromey@redhat.com>
6467 Gary Benson <gbenson@redhat.com>
6468
6469 * symbol.c: New file.
6470 * Makefile.in (SFILES): Add symbol.c.
6471 (OBS): Add symbol.o.
6472
f8c1d06b
GB
64732014-09-11 Gary Benson <gbenson@redhat.com>
6474
6475 * target.c (target_stop_ptid, target_continue_ptid): New
6476 functions.
6477
721ec300
GB
64782014-09-11 Tom Tromey <tromey@redhat.com>
6479 Gary Benson <gbenson@redhat.com>
6480
6481 * target.h: Include target/target.h.
6482 * target.c (target_read_memory, target_read_uint32)
6483 (target_write_memory): New functions.
6484
c5e92cca
GB
64852014-09-11 Gary Benson <gbenson@redhat.com>
6486
6487 * server.h (debug_hw_points): Don't declare.
6488 * server.c (debug_hw_points): Don't define. Replace all uses
6489 with show_debug_regs.
6490 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6491 all uses with show_debug_regs.
6492
2e4bb98a
EBM
64932014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6494
6495 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6496 endianness into account.
6497 (ppc_supply_ptrace_register): Likewise.
6498
ac740bc7
JH
64992014-09-03 James Hogan <james.hogan@imgtec.com>
6500
6501 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6502 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6503
97ea6506
GB
65042014-09-03 Gary Benson <gbenson@redhat.com>
6505
6506 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6507 ALL_DEBUG_ADDRESS_REGISTERS.
6508
df7e5265
GB
65092014-09-02 Gary Benson <gbenson@redhat.com>
6510
6511 * i386-low.h: Renamed as...
6512 * x86-low.h: New file. All type, function and variable name
6513 prefixes changed from "i386_" to "x86_". All references updated.
6514 * i386-low.c: Renamed as...
6515 * x86-low.c: New file. All type, function and variable name
6516 prefixes changed from "i386_" to "x86_". All references updated.
6517
ed859da7
GB
65182014-09-02 Gary Benson <gbenson@redhat.com>
6519
6520 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6521 (x86_linux_new_thread): Likewise.
6522
860789c7
GB
65232014-08-29 Gary Benson <gbenson@redhat.com>
6524
6525 * server.h (setjmp.h): Do not include.
6526 (toplevel): Do not declare.
6527 (common-exceptions.h): Include.
6528 (cleanups.h): Likewise.
6529 * server.c (toplevel): Do not define.
6530 (exit_code): New static global.
6531 (detach_or_kill_for_exit_cleanup): New function.
6532 (main): New function. Original main renamed to...
6533 (captured_main): New function.
6534 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6535
ff55e1b5
GB
65362014-08-29 Gary Benson <gbenson@redhat.com>
6537
6538 * Makefile.in (SFILES): Add common/common-exceptions.c.
6539 (OBS): Add common-exceptions.o.
6540 (common-exceptions.o): New rule.
6541 * utils.c (prepare_to_throw_exception): New function.
6542
e9bcb658
GB
65432014-08-29 Gary Benson <gbenson@redhat.com>
6544
6545 * config.in: Regenerate.
6546 * configure: Likewise.
6547
e3180625
GB
65482014-08-29 Gary Benson <gbenson@redhat.com>
6549
6550 * Makefile.in (SFILES): Add common/cleanups.c.
6551 (OBS): cleanups.o.
6552 (cleanups.o): New rule.
6553
e3d6ba5d
GB
65542014-08-29 Gary Benson <gbenson@redhat.com>
6555
6556 * utils.c (internal_vwarning): New function.
6557
7096e886
GB
65582014-08-28 Gary Benson <gbenson@redhat.com>
6559
6560 * utils.h (fatal): Remove declaration.
6561 * utils.c (fatal): Remove function.
6562
14ce3192
GB
65632014-08-28 Gary Benson <gbenson@redhat.com>
6564
6565 * tracepoint.c (gdb_agent_init): Replace fatal with
6566 perror_with_name.
6567 (initialize_tracepoint): Likewise.
6568
50278d59
GB
65692014-08-28 Gary Benson <gbenson@redhat.com>
6570
6571 * remote-utils.c (remote_prepare): Replace fatal with error.
6572
aa96c426
GB
65732014-08-28 Gary Benson <gbenson@redhat.com>
6574
6575 * linux-low.c (linux_async): Replace fatal with warning.
6576 Tidy up and return.
6577 (linux_start_non_stop): Return -1 if linux_async failed.
6578
f7160e97
GB
65792014-08-28 Gary Benson <gbenson@redhat.com>
6580
6581 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6582 gdb_assert.
6583 (i386_dr_low_get_addr): Remove vague comment.
6584 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6585 gdb_assert.
6586
38e08fca
GB
65872014-08-28 Gary Benson <gbenson@redhat.com>
6588
6589 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6590 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6591 internal_error.
6592 (linux_resume_one_lwp): Likewise.
6593 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6594 gdb_assert.
6595 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6596 with internal_error.
6597 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6598 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6599 (find_register_by_name): Replace fatal with internal_error.
6600 (find_regno): Likewise.
6601 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6602 * thread-db.c (thread_db_create_event): Likewise.
6603 (thread_db_load_search): Likewise.
6604 (try_thread_db_load_1): Likewise.
6605 * tracepoint.c (get_jump_space_head): Replace fatal with
6606 internal_error.
6607 (claim_trampoline_space): Likewise.
6608 (have_fast_tracepoint_trampoline_buffer): Likewise.
6609 (cmd_qtstart): Likewise.
6610 (stop_tracing): Likewise.
6611 (fast_tracepoint_collecting): Likewise.
6612 (target_malloc): Likewise.
6613 (download_tracepoint): Likewise.
6614 (download_trace_state_variables): Replace check with gdb_assert.
6615 (upload_fast_traceframes): Replace fatal with internal_error.
6616
34abf635
GB
66172014-08-19 Tom Tromey <tromey@redhat.com>
6618 Gary Benson <gbenson@redhat.com>
6619
6620 * Makefile.in (SFILES): Add common/common-debug.c.
6621 (OBS): Add common-debug.o.
6622 (common-debug.o): New rule.
6623 * debug.h (debug_printf): Don't declare.
6624 * debug.c (debug_printf): Renamed and rewritten as...
6625 (debug_vprintf): New function.
6626
f6e94d78
GB
66272014-08-19 Gary Benson <gbenson@redhat.com>
6628
6629 * utils.h: Do not include print-utils.h.
6630
9239eeab
GB
66312014-08-19 Tom Tromey <tromey@redhat.com>
6632 Gary Benson <gbenson@redhat.com>
6633
6634 * server.h: Add static assertion.
6635 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6636
ef87c8bb
GB
66372014-08-19 Tom Tromey <tromey@redhat.com>
6638 Gary Benson <gbenson@redhat.com>
6639
6640 * Makefile.in (SFILES): Add common/errors.c.
6641 (OBS): Add errors.o.
6642 (IPA_OBS): Add errors-ipa.o.
6643 (errors.o): New rule.
6644 (errors-ipa.o): Likewise.
6645 * utils.h (perror_with_name, error, warning): Don't declare.
6646 * utils.c (warning): Renamed and rewritten as...
6647 (vwarning): New function.
6648 (error): Renamed and rewritten as...
6649 (verror): New function.
6650 (internal_error): Renamed and rewritten as...
6651 (internal_verror): New function.
6652
bb974a24
GB
66532014-08-07 Gary Benson <gbenson@redhat.com>
6654
6655 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6656 * configure: Regenerate.
6657 * config.in: Likewise.
6658 * server.h: Do not include errno.h.
6659 * event-loop.c: Likewise.
6660 * hostio-errno.c: Likewise.
6661 * linux-low.c: Likewise.
6662 * remote-utils.c: Likewise.
6663 * spu-low.c: Likewise.
6664 * utils.c: Likewise.
6665 * gdbreplay.c: Unconditionally include errno.h.
6666
6d3d12eb
GB
66672014-08-07 Gary Benson <gbenson@redhat.com>
6668
6669 * server.h: Do not include string.h.
6670 * event-loop.c: Likewise.
6671 * linux-low.c: Likewise.
6672 * regcache.c: Likewise.
6673 * remote-utils.c: Likewise.
6674 * spu-low.c: Likewise.
6675 * utils.c: Likewise.
6676
dccbb609
GB
66772014-08-07 Gary Benson <gbenson@redhat.com>
6678
6679 * server.h: Do not include gdb_assert.h.
6680
e76df0d0
GB
66812014-08-07 Gary Benson <gbenson@redhat.com>
6682
6683 * server.h: Do not include common-utils.h.
6684
4cb9c816
GB
66852014-08-07 Gary Benson <gbenson@redhat.com>
6686
6687 * server.h: Do not include ptid.h.
6688 * notif.h: Likewise.
6689
3995eeee
GB
66902014-08-07 Gary Benson <gbenson@redhat.com>
6691
6692 * server.h: Do not include gdb_locale.h.
6693
cb9f1a9b
GB
66942014-08-07 Gary Benson <gbenson@redhat.com>
6695
6696 * server.h: Do not include gdb/signals.h.
6697 * win32-low.c: Likewise.
6698
a5fceff8
GB
66992014-08-07 Gary Benson <gbenson@redhat.com>
6700
6701 * server.h: Do not include pathmax.h.
6702
b9391142
GB
67032014-08-07 Gary Benson <gbenson@redhat.com>
6704
6705 * server.h: Do not include libiberty.h.
6706 * linux-bfin-low.c: Likewise.
6707
0e443c87
GB
67082014-08-07 Gary Benson <gbenson@redhat.com>
6709
6710 * server.h: Do not include ansidecl.h.
6711
8ebb3f56
GB
67122014-08-07 Gary Benson <gbenson@redhat.com>
6713
6714 * linux-x86-low.c: Do not include stddef.h.
6715 * lynx-ppc-low.c: Likewise.
6716 * tracepoint.c: Likewise.
6717
8980bdf6
GB
67182014-08-07 Gary Benson <gbenson@redhat.com>
6719
6720 * server.h: Do not include stdarg.h.
6721 * nto-low.c: Likewise.
6722
d7096f71
GB
67232014-08-07 Gary Benson <gbenson@redhat.com>
6724
6725 * server.h: Do not include stdlib.h.
6726 * inferiors.c: Likewise.
6727 * linux-low.c: Likewise.
6728 * regcache.c: Likewise.
6729 * spu-low.c: Likewise.
6730 * tracepoint.c: Likewise.
6731 * utils.c: Likewise.
6732
d02f550d
GB
67332014-08-07 Gary Benson <gbenson@redhat.com>
6734
6735 * server.h: Do not include stdio.h.
6736 * linux-low.c: Likewise.
6737 * remote-utils.c: Likewise.
6738 * spu-low.c: Likewise.
6739 * utils.c: Likewise.
6740 * wincecompat.c: Likewise.
6741
87f6c4e3
GB
67422014-08-06 Gary Benson <gbenson@redhat.com>
6743
6744 * regcache.c (init_register_cache): Move conditionals inside if.
6745
7089dca4
GB
67462014-08-06 Gary Benson <gbenson@redhat.com>
6747
6748 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6749
462f517e
GB
67502014-07-31 Gary Benson <gbenson@redhat.com>
6751
6752 * ax.h: Do not include server.h.
6753 * gdbthread.h: Likewise.
6754 * lynx-low.h: Likewise.
6755 * notif.h: Likewise.
6756
976411d6
GB
67572014-07-30 Gary Benson <gbenson@redhat.com>
6758
6759 * server.h: Include common-defs.h.
6760 Do not include config.h or build-gnulib-gdbserver/config.h.
6761
d41f6d8e
GB
67622014-07-30 Gary Benson <gbenson@redhat.com>
6763
6764 * hostio-errno.c: Move server.h to top of includes list.
6765 * inferiors.c: Likewise.
6766 * linux-x86-low.c: Likewise.
6767 * notif.c: Include server.h.
6768
314c6a35
TT
67692014-07-24 Tom Tromey <tromey@redhat.com>
6770 Gary Benson <gbenson@redhat.com>
6771
6772 * server.h (CORE_ADDR): Now unsigned.
6773
69ff6be5
PA
67742014-07-16 Pedro Alves <palves@redhat.com>
6775
6776 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6777
ce9e3fe7
PA
67782014-07-15 Pedro Alves <palves@redhat.com>
6779
6780 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6781 copy.
6782
e76126e8
PA
67832014-07-11 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.c (kill_wait_lwp): New function, based on
6786 kill_one_lwp_callback, but use my_waitpid directly.
6787 (kill_one_lwp_callback, linux_kill): Use it.
6788
8e9db26e
PA
67892014-06-23 Pedro Alves <palves@redhat.com>
6790
6791 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6792 before setting DR0..DR3.
6793
698b3e08
GB
67942014-06-20 Gary Benson <gbenson@redhat.com>
6795
6796 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6797 * configure: Regenerated.
6798 * config.in: Likewise.
6799
125f8a3d
GB
68002014-06-20 Gary Benson <gbenson@redhat.com>
6801
6802 * Makefile.in (SFILES): Update locations for files moved
6803 from common to nat.
6804 (object file files): Reordered.
6805
42995dbd
GB
68062014-06-20 Gary Benson <gbenson@redhat.com>
6807
6808 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6809 (i386_dr_low_set_addr): Likewise.
6810 (i386_dr_low_get_addr): Likewise.
6811 (i386_dr_low_can_set_control): Likewise.
6812 (i386_dr_low_set_control): Likewise.
6813 (i386_dr_low_get_control): Likewise.
6814 (i386_dr_low_get_status): Likewise.
6815 (i386_get_debug_register_length): Likewise.
6816 * linux-x86-low.c (i386_dr_low_set_addr):
6817 Changed signature. Made static.
6818 (i386_dr_low_get_addr): Likewise.
6819 (i386_dr_low_set_control): Likewise.
6820 (i386_dr_low_get_control): Likewise.
6821 (i386_dr_low_get_status): Likewise.
6822 (i386_dr_low): New global variable.
6823 * win32-i386-low.c (i386_dr_low_set_addr):
6824 Changed signature. Made static.
6825 (i386_dr_low_get_addr): Likewise.
6826 (i386_dr_low_set_control): Likewise.
6827 (i386_dr_low_get_control): Likewise.
6828 (i386_dr_low_get_status): Likewise.
6829 (i386_dr_low): New global variable.
6830
e1d2394b
MS
68312014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6832
6833 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6834 * Makefile.in (AR, AR_FLAGS): Define.
6835 * configure: Regenerate.
6836
3a8ee006
GB
68372014-06-19 Gary Benson <gbenson@redhat.com>
6838
6839 * Makefile.in (i386-dregs.o): New rule.
6840 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6841 * i386-low.c (target.h): Remove include.
6842 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6843 (DR_CONTROL_SHIFT): Likewise.
6844 (DR_CONTROL_SIZE): Likewise.
6845 (DR_RW_EXECUTE): Likewise.
6846 (DR_RW_WRITE): Likewise.
6847 (DR_RW_READ): Likewise.
6848 (DR_RW_IORW): Likewise.
6849 (DR_LEN_1): Likewise.
6850 (DR_LEN_2): Likewise.
6851 (DR_LEN_4): Likewise.
6852 (DR_LEN_8): Likewise.
6853 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6854 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6855 (DR_ENABLE_SIZE): Likewise.
6856 (DR_LOCAL_SLOWDOWN): Likewise.
6857 (DR_GLOBAL_SLOWDOWN): Likewise.
6858 (DR_CONTROL_RESERVED): Likewise.
6859 (I386_DR_CONTROL_MASK): Likewise.
6860 (I386_DR_VACANT): Likewise.
6861 (I386_DR_LOCAL_ENABLE): Likewise.
6862 (I386_DR_GLOBAL_ENABLE): Likewise.
6863 (I386_DR_DISABLE): Likewise.
6864 (I386_DR_SET_RW_LEN): Likewise.
6865 (I386_DR_GET_RW_LEN): Likewise.
6866 (I386_DR_WATCH_HIT): Likewise.
6867 (i386_wp_op_t): Likewise.
6868 (i386_show_dr): Likewise.
6869 (i386_length_and_rw_bits): Likewise.
6870 (i386_insert_aligned_watchpoint): Likewise.
6871 (i386_remove_aligned_watchpoint): Likewise.
6872 (i386_handle_nonaligned_watchpoint): Likewise.
6873 i386_update_inferior_debug_regs(): Likewise.
6874 (i386_dr_insert_watchpoint): Likewise.
6875 (i386_dr_remove_watchpoint): Likewise.
6876 (i386_dr_region_ok_for_watchpoint): Likewise.
6877 (i386_dr_stopped_data_address): Likewise.
6878 (i386_dr_stopped_by_watchpoint): Likewise.
6879
8f26655c
GB
68802014-06-19 Gary Benson <gbenson@redhat.com>
6881
6882 * i386-low.c (i386_dr_show): Renamed to
6883 i386_show_dr and made static. All uses updated.
6884 (i386_dr_length_and_rw_bits): Renamed to
6885 i386_length_and_rw_bits and made static.
6886 All uses updated.
6887 (i386_dr_insert_aligned_watchpoint): Renamed to
6888 i386_insert_aligned_watchpoint and made static.
6889 All uses updated.
6890 (i386_dr_remove_aligned_watchpoint): Renamed to
6891 i386_remove_aligned_watchpoint and made static.
6892 All uses updated.
6893 (i386_dr_update_inferior_debug_regs): Renamed to
6894 i386_update_inferior_debug_regs and made static.
6895 All uses updated.
6896
b9228891
GB
68972014-06-18 Gary Benson <gbenson@redhat.com>
6898
5171def3
GB
6899 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6900 (i386_dr_low_can_set_control): Likewise.
6901 (i386_get_debug_register_length): Likewise.
6902 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6903 (i386_dr_low_can_set_control): Likewise.
6904 (i386_get_debug_register_length): Likewise.
6905
69062014-06-17 Gary Benson <gbenson@redhat.com>
6907
b9228891
GB
6908 * i386-low.h (i386-dregs.h): New include.
6909 (DR_FIRSTADDR): Now in i386-dregs.h.
6910 (DR_LASTADDR): Likewise.
6911 (DR_NADDR): Likewise.
6912 (DR_STATUS): Likewise.
6913 (DR_CONTROL): Likewise.
6914 (i386_debug_reg_state): Likewise.
6915 (i386_dr_insert_watchpoint): Likewise.
6916 (i386_dr_remove_watchpoint): Likewise.
6917 (i386_dr_region_ok_for_watchpoint): Likewise.
6918 (i386_dr_stopped_data_address): Likewise.
6919 (i386_dr_stopped_by_watchpoint): Likewise.
6920 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6921
4be83cc2
GB
69222014-06-18 Gary Benson <gbenson@redhat.com>
6923
6924 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6925 i386_dr_insert_watchpoint.
6926 (i386_low_remove_watchpoint): Renamed to
6927 i386_dr_remove_watchpoint.
6928 (i386_low_region_ok_for_watchpoint): Renamed to
6929 i386_dr_region_ok_for_watchpoint.
6930 (i386_low_stopped_data_address): Renamed to
6931 i386_dr_stopped_data_address.
6932 (i386_low_stopped_by_watchpoint): Renamed to
6933 i386_dr_stopped_by_watchpoint.
6934 * i386-low.c (i386_show_dr): Renamed to
6935 i386_dr_show and made nonstatic. All uses updated.
6936 (i386_length_and_rw_bits): Renamed to
6937 i386_dr_length_and_rw_bits and made nonstatic.
6938 All uses updated.
6939 (i386_insert_aligned_watchpoint): Renamed to
6940 i386_dr_insert_aligned_watchpoint and made nonstatic.
6941 All uses updated.
6942 (i386_remove_aligned_watchpoint): Renamed to
6943 i386_dr_remove_aligned_watchpoint and made nonstatic.
6944 All uses updated.
6945 (i386_update_inferior_debug_regs): Renamed to
6946 i386_dr_update_inferior_debug_regs and made nonstatic.
6947 All uses updated.
6948 (i386_low_insert_watchpoint): Renamed to
6949 i386_dr_insert_watchpoint. All uses updated.
6950 (i386_low_remove_watchpoint): Renamed to
6951 i386_dr_remove_watchpoint. All uses updated.
6952 (i386_low_region_ok_for_watchpoint): Renamed to
6953 i386_dr_region_ok_for_watchpoint. All uses updated.
6954 (i386_low_stopped_data_address): Renamed to
6955 i386_dr_stopped_data_address. All uses updated.
6956 (i386_low_stopped_by_watchpoint): Renamed to
6957 i386_dr_stopped_by_watchpoint. All uses updated.
6958
131aa0d4
GB
69592014-06-18 Gary Benson <gbenson@redhat.com>
6960
6961 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6962 (i386_dr_low_can_set_control): Likewise.
6963 (i386_insert_aligned_watchpoint): New check.
6964
d9305f7f
GB
69652014-06-18 Gary Benson <gbenson@redhat.com>
6966
6967 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6968 Renamed to state.
6969
e927c9fc
GB
69702014-06-18 Gary Benson <gbenson@redhat.com>
6971
6972 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6973 instead of fatal and error.
6974 (i386_handle_nonaligned_watchpoint): Likewise.
6975
1b6d4134
GB
69762014-06-18 Gary Benson <gbenson@redhat.com>
6977
6978 * i386-low.c (i386_get_debug_register_length): New macro.
6979 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6980 (i386_show_dr): Use debug_printf instead of fprintf. Use
6981 phex to format values.
6982
6e62758f
GB
69832014-06-18 Gary Benson <gbenson@redhat.com>
6984
6985 * i386-low.h: Comment changes.
6986 * i386-low.c: Likewise.
6987
fc6e2f03
GB
69882014-06-18 Gary Benson <gbenson@redhat.com>
6989
6990 * i386-low.c: Whitespace changes.
6991
f9d1eeed
TT
69922014-06-12 Tom Tromey <tromey@redhat.com>
6993
6994 * utils.c (freeargv): Remove.
6995
0b04e523
TT
69962014-06-12 Tom Tromey <tromey@redhat.com>
6997
6998 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6999 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7000 (parse_debug_format_options): Likewise.
7001 (gdbserver_usage): Likewise.
7002 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7003 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7004 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7005 against libiberty.
7006 ($(LIBGNU)): Depend on libiberty.
7007 (all-lib): Recurse into all subdirs.
7008 (install-only): Invoke "install" target in subdirs.
7009 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7010 targets.
7011 * configure: Rebuild.
7012 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7013 for vasprintf, vsnprintf, or gettimeofday.
7014 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7015 srv_tgtobj.
7016
270c9937
JB
70172014-06-05 Joel Brobecker <brobecker@adacore.com>
7018
7019 * development.sh: Delete.
7020 * Makefile.in (config.status): Adjust dependency on development.sh.
7021 * configure.ac: Adjust development.sh source call.
7022 * configure: Regenerate.
7023
0a261ed8
PA
70242014-06-02 Pedro Alves <palves@redhat.com>
7025
7026 * ax.c (gdb_free_agent_expr): New function.
7027 * ax.h (gdb_free_agent_expr): New declaration.
7028 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7029 list.
7030 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7031 static.
7032 (clear_breakpoint_conditions_and_commands): New function.
7033 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7034 (clear_breakpoint_conditions_and_commands): New declaration.
7035
e9dae05e
RR
70362014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7037
7038 * linux-aarch64-low.c (asm/ptrace.h): Include.
7039
5876f503
JK
70402014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7041
7042 Fix TLS access for -static -pthread.
7043 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7044 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7045 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7046
802e8e6d
PA
70472014-05-20 Pedro Alves <palves@redhat.com>
7048
7049 * linux-aarch64-low.c (aarch64_insert_point)
7050 (aarch64_remove_point): No longer check whether the type is
7051 supported here. Adjust to new interface.
7052 (the_low_target): Install aarch64_supports_z_point_type as
7053 supports_z_point_type method.
7054 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7055 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7056 instead of a Z packet char. Adjust.
7057 (arm_supports_z_point_type): New function.
7058 (arm_insert_point, arm_remove_point): Adjust to new interface.
7059 (the_low_target): Install arm_supports_z_point_type.
7060 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7061 (cris_insert_point, cris_remove_point): Adjust to new interface.
7062 Don't check whether the type is supported here.
7063 (the_low_target): Install cris_supports_z_point_type.
7064 * linux-low.c (linux_supports_z_point_type): New function.
7065 (linux_insert_point, linux_remove_point): Adjust to new interface.
7066 * linux-low.h (struct linux_target_ops) <insert_point,
7067 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7068 raw_breakpoint pointer parameter.
7069 <supports_z_point_type>: New method.
7070 * linux-mips-low.c (mips_supports_z_point_type): New function.
7071 (mips_insert_point, mips_remove_point): Adjust to new interface.
7072 Use mips_supports_z_point_type.
7073 (the_low_target): Install mips_supports_z_point_type.
7074 * linux-ppc-low.c (the_low_target): Install NULL as
7075 supports_z_point_type method.
7076 * linux-s390-low.c (the_low_target): Install NULL as
7077 supports_z_point_type method.
7078 * linux-sparc-low.c (the_low_target): Install NULL as
7079 supports_z_point_type method.
7080 * linux-x86-low.c (x86_supports_z_point_type): New function.
7081 (x86_insert_point): Adjust to new insert_point interface. Use
7082 insert_memory_breakpoint. Adjust to new
7083 i386_low_insert_watchpoint interface.
7084 (x86_remove_point): Adjust to remove_point interface. Use
7085 remove_memory_breakpoint. Adjust to new
7086 i386_low_remove_watchpoint interface.
7087 (the_low_target): Install x86_supports_z_point_type.
7088 * lynx-low.c (lynx_target_ops): Install NULL as
7089 supports_z_point_type callback.
7090 * nto-low.c (nto_supports_z_point_type): New.
7091 (nto_insert_point, nto_remove_point): Adjust to new interface.
7092 (nto_target_ops): Install nto_supports_z_point_type.
7093 * mem-break.c: Adjust intro comment.
7094 (struct raw_breakpoint) <raw_type, size>: New fields.
7095 <inserted>: Update comment.
7096 <shlib_disabled>: Delete field.
7097 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7098 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7099 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7100 (raw_bkpt_type_to_target_hw_bp_type): New function.
7101 (find_enabled_raw_code_breakpoint_at): New function.
7102 (find_raw_breakpoint_at): New type and size parameters. Use them.
7103 (insert_memory_breakpoint): New function, based off
7104 set_raw_breakpoint_at.
7105 (remove_memory_breakpoint): New function.
7106 (set_raw_breakpoint_at): Reimplement.
7107 (set_breakpoint): New, based on set_breakpoint_at.
7108 (set_breakpoint_at): Reimplement.
7109 (delete_raw_breakpoint): Go through the_target->remove_point
7110 instead of assuming memory breakpoints.
7111 (find_gdb_breakpoint_at): Delete.
7112 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7113 (find_gdb_breakpoint): New function.
7114 (set_gdb_breakpoint_at): Delete.
7115 (z_type_supported): New function.
7116 (set_gdb_breakpoint_1): New function, loosely based off
7117 set_gdb_breakpoint_at.
7118 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7119 (delete_gdb_breakpoint_at): Delete.
7120 (delete_gdb_breakpoint_1): New function, loosely based off
7121 delete_gdb_breakpoint_at.
7122 (delete_gdb_breakpoint): New function.
7123 (clear_gdb_breakpoint_conditions): Rename to ...
7124 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7125 breakpoint.
7126 (add_condition_to_breakpoint): Make static.
7127 (add_breakpoint_condition): Take a struct breakpoint pointer
7128 instead of an address. Adjust.
7129 (gdb_condition_true_at_breakpoint): Rename to ...
7130 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7131 z_type parameter.
7132 (gdb_condition_true_at_breakpoint): Reimplement.
7133 (add_breakpoint_commands): Take a struct breakpoint pointer
7134 instead of an address. Adjust.
7135 (gdb_no_commands_at_breakpoint): Rename to ...
7136 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7137 parameter. Return true if no breakpoint was found. Change debug
7138 output.
7139 (gdb_no_commands_at_breakpoint): Reimplement.
7140 (run_breakpoint_commands): Rename to ...
7141 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7142 and change return type to boolean.
7143 (run_breakpoint_commands): New function.
7144 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7145 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7146 breakpoint. Go through the_target->remove_point instead of
7147 assuming memory breakpoint.
7148 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7149 software and hardware breakpoints.
7150 (reinsert_raw_breakpoint): Go through the_target->insert_point
7151 instead of assuming memory breakpoint.
7152 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7153 software and hardware breakpoints.
7154 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7155 Check both software and hardware breakpoints.
7156 (validate_inserted_breakpoint): Assert the breakpoint is a
7157 software breakpoint. Set the inserted flag to -1 instead of
7158 setting shlib_disabled.
7159 (delete_disabled_breakpoints): Adjust.
7160 (validate_breakpoints): Only validate software breakpoints.
7161 Adjust to inserted flag change.
7162 (check_mem_read, check_mem_write): Skip breakpoint types other
7163 than software breakpoints. Adjust to inserted flag change.
7164 * mem-break.h (enum raw_bkpt_type): New enum.
7165 (raw_breakpoint, struct process_info): Forward declare.
7166 (Z_packet_to_target_hw_bp_type): Delete declaration.
7167 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7168 (set_gdb_breakpoint, delete_gdb_breakpoint)
7169 (clear_breakpoint_conditions): New declarations.
7170 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7171 (breakpoint_inserted_here): Update comment.
7172 (add_breakpoint_condition, add_breakpoint_commands): Replace
7173 address parameter with a breakpoint pointer parameter.
7174 (gdb_breakpoint_here): Update comment.
7175 (delete_gdb_breakpoint_at): Delete.
7176 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7177 * server.c (process_point_options): Take a struct breakpoint
7178 pointer instead of an address. Adjust.
7179 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7180 delete_gdb_breakpoint.
7181 * spu-low.c (spu_target_ops): Install NULL as
7182 supports_z_point_type method.
7183 * target.h: Include mem-break.h.
7184 (struct target_ops) <prepare_to_access_memory>: Update comment.
7185 <supports_z_point_type>: New field.
7186 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7187 instead of a char. Also take a raw breakpoint pointer.
7188 * win32-arm-low.c (the_low_target): Install NULL as
7189 supports_z_point_type.
7190 * win32-i386-low.c (i386_supports_z_point_type): New function.
7191 (i386_insert_point, i386_remove_point): Adjust to new interface.
7192 (the_low_target): Install i386_supports_z_point_type.
7193 * win32-low.c (win32_supports_z_point_type): New function.
7194 (win32_insert_point, win32_remove_point): Adjust to new interface.
7195 (win32_target_ops): Install win32_supports_z_point_type.
7196 * win32-low.h (struct win32_target_ops):
7197 <supports_z_point_type>: New method.
7198 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7199 instead of a char. Also take a raw breakpoint pointer.
7200
932539e3
PA
72012014-05-20 Pedro Alves <palves@redhat.com>
7202
7203 * mem-break.h: Include break-common.h.
7204 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7205 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7206 (Z_packet_to_target_hw_bp_type): New declaration.
7207 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7208 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7209 (Z_PACKET_ACCESS_WP): Delete macros.
7210 (Z_packet_to_hw_type): Delete function.
7211 * i386-low.h: Don't include break-common.h here.
7212 (Z_packet_to_hw_type): Delete declaration.
7213 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7214 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7215 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7216 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7217 * linux-aarch64-low.c: Don't include break-common.h here.
7218 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7219 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7220 (Z_packet_to_target_hw_bp_type): Delete function.
7221 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7222 function.
7223 (mips_insert_point, mips_remove_point): Use
7224 Z_packet_to_target_hw_bp_type.
7225
4ff0d3d8
PA
72262014-05-20 Pedro Alves <palves@redhat.com>
7227
7228 * linux-aarch64-low.c: Include break-common.h.
7229 (enum target_point_type): Delete.
7230 (Z_packet_to_point_type): Rename to ...
7231 (Z_packet_to_target_hw_bp_type): ... this, and return a
7232 target_hw_bp_type instead.
7233 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7234 instead of an enum target_point_type.
7235 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7236 breakpoint type.
7237 (aarch64_dr_state_insert_one_point)
7238 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7239 (aarch64_handle_aligned_watchpoint)
7240 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7241 Take an enum target_hw_bp_type instead of an enum
7242 target_point_type.
7243 (aarch64_supports_z_point_type): New function.
7244 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7245 use Z_packet_to_target_hw_bp_type.
7246
786dc519
JB
72472014-05-20 Joel Brobecker <brobecker@adacore.com>
7248
7249 * configure.ac: Only use -Werror by default when DEVELOPMENT
7250 is true.
7251 * configure: Regenerate.
7252
9e0aa64f
JK
72532014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7254
7255 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7256 * linux-x86-low.c (X86_64_USER_REGS): New.
7257 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7258
2b577b92
YQ
72592014-04-28 Yao Qi <yao@codesourcery.com>
7260
7261 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7262 name.
7263
94611da2
PA
72642014-04-25 Pedro Alves <palves@redhat.com>
7265
7266 PR server/16255
7267 * linux-low.c (linux_attach_fail_reason_string): New function.
7268 (linux_attach_lwp): Delete.
7269 (linux_attach_lwp_1): Rename to ...
7270 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7271 argument. Remove "initial" parameter. Return int instead of
7272 void. Don't error or warn here.
7273 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7274 failure to attach to the tgid. Call warning when failing to
7275 attach to an lwp.
7276 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7277 argument. Remove "initial" parameter. Return int instead of
7278 void. Don't error or warn here.
7279 (linux_attach_fail_reason_string): New declaration.
7280 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7281 interface change. Use linux_attach_fail_reason_string.
7282
01f9f808
MS
72832014-04-24 Michael Sturm <michael.sturm@mintel.com>
7284 Walfred Tedeschi <walfred.tedeschi@intel.com>
7285
7286 * Makefile.in: Added rules to handle new files
7287 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7288 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7289 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7290 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7291 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7292 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7293 x32-avx512-linux.o.
7294 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7295 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7296 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7297 i386/x32-avx512.xml.
7298 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7299 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7300 i386/x32-avx512-linux.xml.
7301 * i387-fp.c (num_avx512_k_registers): New constant for number
7302 of K registers.
7303 (num_avx512_zmmh_low_registers): New constant for number of
7304 lower ZMM registers (0-15).
7305 (num_avx512_zmmh_high_registers): New constant for number of
7306 higher ZMM registers (16-31).
7307 (num_avx512_ymmh_registers): New contant for number of higher
7308 YMM registers (ymm16-31 added by avx521 on x86_64).
7309 (num_avx512_xmm_registers): New constant for number of higher
7310 XMM registers (xmm16-31 added by AVX512 on x86_64).
7311 (struct i387_xsave): Add space for AVX512 registers.
7312 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7313 Add code to handle AVX512 registers.
7314 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7315 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7316 prototypei from generated file.
7317 (tdesc_amd64_avx512_linux): Likewise.
7318 (init_registers_x32_avx512_linux): Likewise.
7319 (tdesc_x32_avx512_linux): Likewise.
7320 (init_registers_i386_avx512_linux): Likewise.
7321 (tdesc_i386_avx512_linux): Likewise.
7322 (x86_64_regmap): Add AVX512 registers.
7323 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7324 mask.
7325 (initialize_low_arch): Add code to initialize AVX512 registers.
7326
51aa91f9
PA
73272014-04-23 Pedro Alves <palves@redhat.com>
7328
7329 * mem-break.c (find_gdb_breakpoint_at): Make static.
7330 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7331
a4165e94
PA
73322014-04-23 Pedro Alves <palves@redhat.com>
7333
7334 * i386-low.c: Don't include break-common.h here.
7335 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7336 prototype to take target_hw_bp_type as argument instead of a Z
7337 packet char.
7338 * i386-low.h: Include break-common.h here.
7339 (Z_packet_to_hw_type): Declare.
7340 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7341 prototypes.
7342 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7343 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7344 (x86_remove_point): Convert the packet number to a
7345 target_hw_bp_type before calling i386_low_remove_watchpoint.
7346 * win32-i386-low.c (i386_insert_point): Convert the packet number
7347 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7348 (i386_remove_point): Convert the packet number to a
7349 target_hw_bp_type before calling i386_low_remove_watchpoint.
7350
b8acf843
PA
73512014-04-23 Pedro Alves <palves@redhat.com>
7352
7353 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7354
d708bcd1
PA
73552014-04-10 Pedro Alves <palves@redhat.com>
7356
7357 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7358 Check if the condition or command is NULL before checking if the
7359 breakpoint is known. On success, return true.
7360 * mem-break.h (add_breakpoint_condition): Document return.
7361 (add_breakpoint_commands): Add describing comment.
7362 * server.c (skip_to_semicolon): New function.
7363 (process_point_options): Use it.
7364
2eec7d5b
PA
73652014-04-09 Pedro Alves <palves@redhat.com>
7366
7367 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7368 to lwpid_of.
7369
fa96cb38
PA
73702014-02-27 Pedro Alves <palves@redhat.com>
7371
7372 PR 12702
7373 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7374 macros.
7375 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7376 output.
7377 (last_thread_of_process_p): Take a PID argument instead of a
7378 thread pointer.
7379 (linux_wait_for_lwp): Delete.
7380 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7381 functions.
7382 (linux_low_filter_event): New function, party factored out from
7383 linux_wait_for_event.
7384 (linux_wait_for_event): Rename to ...
7385 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7386 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7387 sigsuspend. Check for zombie leaders.
7388 (linux_wait_for_event): Reimplement as wrapper around
7389 linux_wait_for_event_filtered.
7390 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7391 a normal or signal exit is seen, it's the whole process exiting.
7392 (wait_for_sigstop): No longer a for_each_inferior callback.
7393 Rewrite on top of linux_wait_for_event_filtered.
7394 (stop_all_lwps): Call wait_for_sigstop directly.
7395 * server.c (resume, handle_target_event): Handle
7396 TARGET_WAITKIND_NO_RESUMED.
7397
d763de10
JB
73982014-02-26 Joel Brobecker <brobecker@adacore.com>
7399
7400 * win32-low.c (psapi_get_dll_name,
7401 * win32_CreateToolhelp32Snapshot): Delete.
7402 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7403 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7404 Delete.
7405 (handle_load_dll): Add function description.
7406 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7407
850a0f76
JB
74082014-02-26 Joel Brobecker <brobecker@adacore.com>
7409
7410 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7411 Add comment.
7412 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7413 base address when calling win32_add_one_solib.
7414 (handle_load_dll): Delete local variable load_addr.
7415 Remove 0x1000 offset applied to DLL base address when calling
7416 win32_add_one_solib.
7417 (handle_unload_dll): Add comment.
7418
f25b3fc3
JB
74192014-02-26 Joel Brobecker <brobecker@adacore.com>
7420
7421 * win32-low.c (win32_add_all_dlls): Renames
7422 win32_ensure_ntdll_loaded. Rewrite function documentation.
7423 Adjust implementation to always load all DLLs.
7424 Add 0x1000 offset to DLL base address when calling
7425 win32_add_one_solib.
7426 (child_initialization_done): New static global.
7427 (do_initial_child_stuff): Set child_initialization_done to
7428 zero during child initialization, and 1 after. Replace call
7429 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7430 Add comment.
7431 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7432 (handle_unload_dll): Add function documentation.
7433 (get_child_debug_event): Ignore load and unload DLL events
7434 during child initialization.
7435
d86d4aaf
DE
74362014-02-20 Doug Evans <dje@google.com>
7437
3bc32da3 7438 Remove global all_lwps.
d86d4aaf
DE
7439 * inferiors.h (ptid_of): Move here from linux-low.h.
7440 (pid_of, lwpid_of): Ditto.
7441 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7442 parameter is a struct thread_info * now.
7443 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7444 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7445 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7446 directly.
7447 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7448 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7449 * linux-arm-low.c (update_registers_callback): Update, "entry"
7450 parameter is a struct thread_info * now.
7451 Fetch lwpid from current_inferior directly.
7452 (arm_insert_point): Pass &all_threads to find_inferior instead of
7453 &all_lwps.
7454 (arm_remove_point): Ditto.
7455 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7456 (arm_prepare_to_resume): Fetch pid from thread.
7457 (arm_read_description): Fetch lwpid from current_inferior directly.
7458 * linux-low.c (all_lwps): Delete.
7459 (delete_lwp): Delete call to remove_inferior.
7460 (handle_extended_wait): Fetch lwpid from thread.
7461 (add_lwp): Don't set lwp->entry.id. Remove call to
7462 add_inferior_to_list.
7463 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7464 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7465 (kill_one_lwp_callback): Ditto.
7466 (linux_kill): Don't dereference NULL pointer.
7467 Fetch ptid,lwpid from thread.
7468 (get_detach_signal): Fetch ptid from thread.
7469 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7470 Simplify call to regcache_invalidate_thread.
7471 (delete_lwp_callback): Update, "entry" parameter is a
7472 struct thread_info * now. Fetch pid from thread.
7473 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7474 (status_pending_p_callback): Update, "entry" parameter is a
7475 struct thread_info * now. Fetch ptid from thread.
7476 (find_lwp_pid): Update, "entry" parameter is a
7477 struct thread_info * now.
7478 (linux_wait_for_lwp): Fetch pid from thread.
7479 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7480 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7481 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7482 (dequeue_one_deferred_signal): Ditto.
7483 (cancel_breakpoint): Fetch ptid from current_inferior.
7484 (linux_wait_for_event): Pass &all_threads to find_inferior,
7485 not &all_lwps. Fetch ptid, lwpid from thread.
7486 (count_events_callback): Update, "entry" parameter is a
7487 struct thread_info * now.
7488 (select_singlestep_lwp_callback): Ditto.
7489 (select_event_lwp_callback): Ditto.
7490 (cancel_breakpoints_callback): Ditto.
7491 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7492 not &all_lwps.
7493 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7494 (unsuspend_one_lwp): Update, "entry" parameter is a
7495 struct thread_info * now.
7496 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7497 not &all_lwps.
7498 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7499 Fetch lwpid from thread, not lwp.
7500 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7501 Pass &all_threads to find_inferior, not &all_lwps.
7502 (send_sigstop): Fetch lwpid from thread, not lwp.
7503 (send_sigstop_callback): Update, "entry" parameter is a
7504 struct thread_info * now.
7505 (suspend_and_send_sigstop_callback): Ditto.
7506 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7507 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7508 struct thread_info * now.
7509 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7510 from thread, lwp.
7511 (lwp_running): Update, "entry" parameter is a
7512 struct thread_info * now.
7513 (stop_all_lwps): Fetch ptid from thread.
7514 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7515 (linux_resume_one_lwp): Fetch lwpid from thread.
7516 (linux_set_resume_request): Update, "entry" parameter is a
7517 struct thread_info * now. Fetch pid, lwpid from thread.
7518 (resume_status_pending_p): Update, "entry" parameter is a
7519 struct thread_info * now.
7520 (need_step_over_p): Ditto. Fetch lwpid from thread.
7521 (start_step_over): Fetch lwpid from thread.
7522 (linux_resume_one_thread): Update, "entry" parameter is a
7523 struct thread_info * now. Fetch lwpid from thread.
7524 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7525 (proceed_one_lwp): Update, "entry" parameter is a
7526 struct thread_info * now. Fetch lwpid from thread.
7527 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7528 struct thread_info * now.
7529 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7530 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7531 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7532 directly.
7533 (regsets_store_inferior_registers): Ditto.
7534 (fetch_register, store_register): Ditto.
7535 (linux_read_memory, linux_write_memory): Ditto.
7536 (linux_request_interrupt): Ditto.
7537 (linux_read_auxv): Ditto.
7538 (linux_xfer_siginfo): Ditto.
7539 (linux_qxfer_spu): Ditto.
7540 (linux_qxfer_libraries_svr4): Ditto.
7541 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7542 moved to inferiors.h.
7543 (get_lwp): Delete.
7544 (get_thread_lwp): Update.
7545 (struct lwp_info): Delete member "entry". Simplify comment for
7546 member "thread".
7547 (all_lwps): Delete.
7548 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7549 current_inferior directly.
7550 (update_watch_registers_callback): Update, "entry" parameter is a
7551 struct thread_info * now. Fetch pid from thread.
7552 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7553 (mips_insert_point): Fetch lwpid from current_inferior.
7554 Pass &all_threads to find_inferior, not &all_lwps.
7555 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7556 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7557 directly.
7558 (mips_stopped_data_address): Ditto.
7559 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7560 directly.
7561 * linux-tile-low.c (tile_arch_setup): Ditto.
7562 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7563 (update_debug_registers_callback): Update, "entry" parameter is a
7564 struct thread_info * now. Fetch pid from thread.
7565 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7566 Pass &all_threads to find_inferior, not &all_lwps.
7567 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7568 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7569 Pass &all_threads to find_inferior, not &all_lwps.
7570 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7571 (i386_dr_low_get_status): Ditto.
7572 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7573 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7574 (x86_linux_read_description): Ditto.
7575 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7576
3b8361aa
DE
75772014-02-20 Doug Evans <dje@google.com>
7578
7579 * inferiors.c (get_first_inferior): Fix buglet.
7580
f7667f0d
DE
75812014-02-19 Doug Evans <dje@google.com>
7582
7583 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7584 * inferiors.c (add_thread): Change result type to struct thread_info *.
7585 All callers updated.
7586 (add_lwp): Call add_thread here instead of in callers.
7587 All callers updated.
7588 * linux-low.h (get_lwp_thread): Rewrite.
7589 (struct lwp_info): New member "thread".
7590
b3312d80
DE
75912014-02-19 Doug Evans <dje@google.com>
7592
7593 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7594 All callers updated.
7595
ecc6f45c
DE
75962014-02-19 Doug Evans <dje@google.com>
7597
7598 * inferiors.c (add_thread): Fix whitespace.
7599
649ebbca
DE
76002014-02-19 Doug Evans <dje@google.com>
7601
7602 * dll.c (clear_dlls): Replace accessing list implemention details
7603 with API function.
7604 * gdbthread.h (get_first_thread): Declare.
7605 * inferiors.c (for_each_inferior_with_data): New function.
7606 (get_first_thread): New function.
7607 (find_thread_ptid): Simplify.
7608 (get_first_inferior): New function.
7609 (clear_list): Delete.
7610 (one_inferior_p): New function.
7611 (clear_inferior_list): New function.
7612 (clear_inferiors): Update.
7613 * inferiors.h (for_each_inferior_with_data): Declare.
7614 (clear_inferior_list): Declare.
7615 (one_inferior_p): Declare.
7616 (get_first_inferior): Declare.
7617 * linux-low.c (linux_wait_for_event): Replace accessing list
7618 implemention details with API function.
7619 * server.c (target_running): Ditto.
7620 (accumulate_file_name_length): New function.
7621 (emit_dll_description): New function.
7622 (handle_qxfer_libraries): Replace accessing list implemention
7623 details with API function.
7624 (handle_qxfer_threads_worker): New function.
7625 (handle_qxfer_threads_proper): Replace accessing list implemention
7626 details with API function.
7627 (handle_query): Ditto.
7628 (visit_actioned_threads_callback_ftype): New typedef.
7629 (visit_actioned_threads_data): New struct.
7630 (visit_actioned_threads): Rewrite to be find_inferior callback.
7631 (resume): Call find_inferior.
7632 (handle_status): Replace accessing list implemention
7633 details with API function.
7634 (process_serial_event): Replace accessing list implemention details
7635 with API function.
7636 * target.c (set_desired_inferior): Replace accessing list implemention
7637 details with API function.
7638 * tracepoint.c (same_process_p): New function.
7639 (gdb_agent_about_to_close): Replace accessing list implemention
7640 details with API function.
7641 * win32-low.c (child_delete_thread): Replace accessing list
7642 implemention details with API function.
7643 (match_dll_by_basename): New function.
7644 (dll_is_loaded_by_basename): New function.
7645 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7646 details call to dll_is_loaded_by_basename.
7647
80894984
DE
76482014-02-19 Doug Evans <dje@google.com>
7649
7650 * dll.h (struct dll_info): Add comment.
7651 * gdbthread.h (struct thread_info): Add comment.
7652 (current_ptid): Simplify.
7653 * inferiors.c (add_process): Update.
7654 (remove_process): Update.
7655 * inferiors.h (struct process_info): Rename member "head" to "entry".
7656 * linux-low.c (delete_lwp): Update.
7657 (add_lwp): Update.
7658 (last_thread_of_process_p): Update.
7659 (kill_one_lwp_callback, linux_kill): Update.
7660 (status_pending_p_callback): Update.
7661 (wait_for_sigstop): Update. Simplify read of ptid.
7662 (start_step_over): Update.
7663 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7664 (get_lwp_thread): Update.
7665 (struct lwp_info): Rename member "head" to "entry".
7666 * regcache.h (inferior_list_entry): Delete.
7667 * server.c (kill_inferior_callback): Update.
7668 (detach_or_kill_inferior_callback): Update.
7669 (print_started_pid): Update.
7670 (print_attached_pid): Update.
7671 (process_serial_event): Simplify read of ptid.
7672 * thread-db.c (thread_db_create_event): Update.
7673 (thread_db_get_tls_address): Update.
7674 * win32-low.c (current_inferior_ptid): Simplify.
7675
46917d26
TT
76762014-02-19 Tom Tromey <tromey@redhat.com>
7677
7678 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7679 argument.
7680 (target_supports_btrace): Update.
7681
0759a81e
YQ
76822014-02-14 Yao Qi <yao@codesourcery.com>
7683
7684 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7685 (rsp-low-ipa.o): New target.
7686
a7191e8b
TT
76872014-02-12 Tom Tromey <tromey@redhat.com>
7688
7689 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7690 convert_ascii_to_int.
7691 * regcache.c (registers_to_string): Likewise.
7692 * remote-utils.c (decode_M_packet): Likewise.
7693 * server.c (process_serial_event): Likewise.
7694
ff0e980e
TT
76952014-02-12 Tom Tromey <tromey@redhat.com>
7696
7697 * server.c (handle_query, handle_v_run): Use hex2bin, not
7698 unhexify.
7699 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7700
e9371aff
TT
77012014-02-12 Tom Tromey <tromey@redhat.com>
7702
7703 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7704 convert_int_to_ascii.
7705 * regcache.c (registers_to_string, collect_register_as_string):
7706 Likewise.
7707 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7708 Likewise.
7709 * server.c (process_serial_event): Likewise.
7710 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7711 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7712
971dc0b8
TT
77132014-02-12 Tom Tromey <tromey@redhat.com>
7714
7715 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7716 bin2hex, not hexify.
7717 * tracepoint.c (cmd_qtstatus): Likewise.
7718
0a822afb
TT
77192014-02-12 Tom Tromey <tromey@redhat.com>
7720
7721 * remote-utils.c (monitor_output): Pass explicit length to
7722 hexify.
7723
9c3d6531
TT
77242014-02-12 Tom Tromey <tromey@redhat.com>
7725
7726 * tracepoint.c: Include rsp-low.h.
7727 * server.c: Include rsp-low.h.
7728 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7729 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7730 declare.
7731 * remote-utils.c: Include rsp-low.h.
7732 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7733 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7734 (convert_int_to_ascii, convert_ascii_to_int): Move to
7735 common/rsp-low.c.
7736 * regcache.c: Include rsp-low.h.
7737 * ax.c: Include rsp-low.h.
7738 * Makefile.in (SFILES): Add common/rsp-low.c.
7739 (OBS): Add rsp-low.o.
7740 (rsp-low.o): New target.
7741
01fd3ea5
TT
77422014-02-12 Tom Tromey <tromey@redhat.com>
7743
7744 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7745 Include print-utils.h.
7746 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7747 (plongest, thirty_two, phex_nz): Remove.
7748 * Makefile.in (SFILES): Add common/print-utils.c.
7749 (OBS): Add print-utils.o.
7750 (print-utils-ipa.o): New target.
7751 (print-utils.o): New target.
7752 (IPA_OBJS): Add print-utils-ipa.o.
7753
e99dc820
TT
77542014-02-06 Tom Tromey <tromey@redhat.com>
7755
7756 * Makefile.in (SFILES): Fix indentation.
7757
ee1e2d4f
DE
77582014-02-05 Doug Evans <dje@google.com>
7759
7760 * linux-low.c (linux_wait_for_event): Improve comment.
7761 (linux_wait_1): Keep current_inferior in sync with event_child.
7762
f5a02773
DE
77632014-01-22 Doug Evans <dje@google.com>
7764
7765 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7766
87ce2a04
DE
77672014-01-22 Doug Evans <dje@google.com>
7768
7769 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7770 * configure: Regenerate.
7771 * config.in: Regenerate.
7772 * Makefile.in (SFILES): Add debug.c.
7773 (OBS): Add debug.o.
7774 * debug.c: New file.
7775 * debug.h: New file.
7776 * linux-aarch64-low.c (*): Update all debugging printfs to use
7777 debug_printf instead of fprintf.
7778 * linux-arm-low.c (*): Ditto.
7779 * linux-cris-low.c (*): Ditto.
7780 * linux-crisv32-low.c (*): Ditto.
7781 * linux-m32r-low.c (*): Ditto.
7782 * linux-sparc-low.c (*): Ditto.
7783 * linux-x86.c (*): Ditto.
7784 * linux-low.c (*): Ditto.
7785 (linux_wait_1): Add calls to debug_enter, debug_exit.
7786 (linux_wait): Remove redundant debugging printf.
7787 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7788 (linux_resume, unstop_all_lwps): Ditto.
7789 * mem-break.c (*): Update all debugging printfs to use
7790 debug_printf instead of fprintf.
7791 * remote-utils.c (*): Ditto.
7792 * thread-db.c (*): Ditto.
7793 * server.c #include <ctype.h>, "gdb_vecs.h".
7794 (debug_threads): Moved to debug.c.
7795 (*): Update all debugging printfs to use debug_printf instead of
7796 fprintf.
7797 (start_inferior): Replace call to fflush with call to debug_flush.
7798 (monitor_show_help): Mention set debug-format.
7799 (parse_debug_format_options): New function.
7800 (handle_monitor_command): Handle "monitor set debug-format".
7801 (gdbserver_usage): Mention --debug-format.
7802 (main): Parse --debug-format.
7803 * server.h (debug_threads): Declaration moved to debug.h.
7804 #include "debug.h".
7805 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7806 trace_debug_1 that uses debug_printf.
7807 (tracepoint_look_up_symbols): Update all debugging printfs to use
7808 debug_printf instead of fprintf.
7809
e671835b
BS
78102014-01-20 Baruch Siach <baruch@tkos.co.il>
7811
7812 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7813 sys/ptrace.h.
7814
b5737fa9
PA
78152014-01-17 Pedro Alves <palves@redhat.com>
7816
ea38d2a9 7817 PR build/16445
c7faa97a
PA
7818 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7819 defined after including gdb_proc_service.h.
b5737fa9 7820
40ed484e
DE
78212014-01-16 Doug Evans <dje@google.com>
7822
7823 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7824 (match_dll): Use it.
7825
969c39fb
MM
78262014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7827
7828 * target.h (target_ops) <read_btrace>: Change parameters and
7829 return type to allow error reporting.
7830 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7831 trace reading errors on.
7832 * linux-low.c (linux_low_read_btrace): Pass trace reading
7833 errors on.
7834 (linux_low_disable_btrace): New.
7835
ab7f45ba
DE
78362014-01-15 Doug Evans <dje@google.com>
7837
7838 * inferiors.c (thread_id_to_gdb_id): Delete.
7839 * inferiors.h (thread_id_to_gdb_id): Delete.
7840
66af0f44
EZ
78412014-01-13 Eli Zaretskii <eliz@gnu.org>
7842
7843 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7844 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7845 versions.
7846
9939e131
PA
78472014-01-08 Pedro Alves <palves@redhat.com>
7848
7849 * server.c (handle_status): Don't discard previous queued stop
7850 replies or thread's pending status here.
7851 (main) <disconnection>: Do it here instead.
7852
b7ea362b
PA
78532014-01-08 Pedro Alves <palves@redhat.com>
7854
7855 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7856 * server.c (visit_actioned_threads, handle_pending_status): New
7857 function.
7858 (handle_v_cont): Factor out parts to ...
7859 (resume): ... this new function. If in all-stop, and a thread
7860 being resumed has a pending status, report it without actually
7861 resuming.
7862 (myresume): Adjust to use the new 'resume' function.
7863 (clear_pending_status_callback, set_pending_status_callback)
7864 (find_status_pending_thread_callback): New functions.
7865 (handle_status): Handle the case of multiple threads having
7866 interesting statuses to report. Report threads' real last signal
7867 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7868 with an interesting thread to report the status for, instead of
7869 always reporting the status of the first thread.
7870
28498c42
JB
78712014-01-01 Joel Brobecker <brobecker@adacore.com>
7872
7873 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7874 * gdbreplay.c (gdbreplay_version): Likewise.
7875
f45c82da
YZ
78762013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7877
7878 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7879 iov.iov_len with the real length in use.
7880
379a5e2d
JB
78812013-12-13 Joel Brobecker <brobecker@adacore.com>
7882
7883 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7884 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7885 for all targets that use win32-low.c.
7886 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7887 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7888
4210d83e
PA
78892013-12-13 Pedro Alves <palves@redhat.com>
7890
7891 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7892 if equal to TARGET_WAITKIND_LOADED.
7893 * win32-low.c (cached_status): New static global.
7894 (win32_wait): Add declaration.
7895 (do_initial_child_stuff): Flush all initial pending debug events
7896 up to the initial breakpoint.
7897 (win32_wait): If CACHED_STATUS was set, return that instead
7898 of doing a real wait. Remove the code resuming the execution
7899 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7900 during the initial phase. Also remove the code changing
7901 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7902 TARGET_WAITKIND_STOPPED.
7903
e7f0d979
YQ
79042013-12-11 Yao Qi <yao@codesourcery.com>
7905
7906 * notif.c (handle_notif_ack): Return 0 if no notification
7907 matches.
7908
ebcf782c
DE
79092013-11-20 Doug Evans <dje@google.com>
7910
7911 * linux-low.c (linux_set_resume_request): Fix comment.
7912
20ad9378
DE
79132013-11-20 Doug Evans <dje@google.com>
7914
7915 * linux-low.c (resume_status_pending_p): Tweak comment.
7916
a196ebeb
WT
79172013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7918
7919 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7920 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7921 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7922 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7923 (srv_amd64_regobj): Add amd64-mpx.o.
7924 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7925 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7926 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7927 * i387-fp.c (num_pl_bnd_register) Added constant.
7928 (num_pl_bnd_cfg_registers) Added constant.
7929 (struct i387_xsave) Added reserved area and MPX fields.
7930 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7931 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7932 function.
7933 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7934 (init_registers_amd64_mpx_linux): Declare new function.
7935 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7936 (x86_64_regmap): Add MPX registers.
7937 (x86_linux_read_description): Add MPX case.
7938 (initialize_low_arch): Initialize MPX targets.
7939
0080a2f6
TT
79402013-11-18 Tom Tromey <tromey@redhat.com>
7941
7942 * configure: Rebuild.
7943 * configure.ac: Don't check for stdlib.h.
7944 * gdbreplay.c: Unconditionally include stdlib.h.
7945
2978b111
TT
79462013-11-18 Tom Tromey <tromey@redhat.com>
7947
7948 * config.in: Rebuild.
7949 * configure: Rebuild.
7950 * configure.ac: Don't use AC_HEADER_DIRENT.
7951
a3d08894
TT
79522013-11-18 Tom Tromey <tromey@redhat.com>
7953
7954 * server.h: Don't check HAVE_STRING_H.
7955 * gdbreplay.c: Don't check HAVE_STRING_H.
7956 * configure: Rebuild.
7957
0a5dd17d
TT
79582013-11-18 Tom Tromey <tromey@redhat.com>
7959
7960 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7961 LIBGNU.
7962
1bd2f0ba
TT
79632013-11-08 Tom Tromey <tromey@redhat.com>
7964
7965 * configure, config.in: Rebuild.
7966 * configure.ac: Remove unused configury.
7967
3266f10b
TT
79682013-11-08 Tom Tromey <tromey@redhat.com>
7969
7970 * acinclude.m4: Include common.m4, codeset.m4.
7971 * configure, config.in: Rebuild.
7972 * configure.ac: Use GDB_AC_COMMON.
7973
6682d959
AA
79742013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7975
7976 * linux-s390-low.c (HWCAP_S390_TE): New define.
7977 (s390_arch_setup): Consider the TE field in the HWCAP for
7978 determining 'have_regset_tdb'.
7979
fd0a4d76
SDJ
79802013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7981
7982 PR gdb/16014
7983 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7984 call to sizeof.
7985
1a3d890b
PA
79862013-10-02 Pedro Alves <palves@redhat.com>
7987
7988 * server.c (process_serial_event): Don't output "GDBserver
7989 exiting" if GDB is connected through stdio.
7990 * target.c (mywait): Likewise, be silent if GDB is connected
7991 through stdio.
7992
97ad4581
JB
79932013-10-01 Joel Brobecker <brobecker@adacore.com>
7994
7995 * lynx-low.c (lynx_add_threads_after_attach): New function.
7996 (lynx_attach): Remove call to add_thread. Add call to
7997 lynx_add_threads_after_attach instead.
7998
5b4e221c
MF
79992013-09-28 Mike Frysinger <vapier@gentoo.org>
8000
8001 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8002 * config.in, configure: Regenerated.
8003
ee47b2f8
YQ
80042013-09-18 Yao Qi <yao@codesourcery.com>
8005
8006 PR server/15959
8007 * server.c (start_inferior): Clear 'resume_info'.
8008
d6707650 80092013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8010
d6707650
JW
8011 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8012 for each register.
8013
9243dd0e 80142013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8015
9243dd0e
JW
8016 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8017 linux-tile-low.o to srv_tgtobj.
8018
c623a6ef
WN
80192013-09-16 Will Newton <will.newton@linaro.org>
8020
8021 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8022 out regs.
8023
fb71d39e
PA
80242013-09-06 Pedro Alves <palves@redhat.com>
8025
8026 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8027 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8028 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8029 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8030 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8031 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8032
8e7e9910
PA
80332013-09-06 Pedro Alves <palves@redhat.com>
8034
8035 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8036 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8037
7c3a12ca
PA
80382013-09-06 Pedro Alves <palves@redhat.com>
8039
8040 * linux-amd64-ipa.c: Include tracepoint.h.
8041 * linux-i386-ipa.c: Include tracepoint.h.
8042
8eb3d7b6
RW
80432013-09-06 Ricard Wanderlof <ricardw@axis.com>
8044
8045 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8046 (ps_get_thread_area): New function.
8047
eddddb9d
RW
80482013-09-06 Ricard Wanderlof <ricardw@axis.com>
8049
8050 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8051 (initialize_low_arch): Call init_registers_crisv32 rather than
8052 init_register_crisv32.
8053
533b0600
PA
80542013-09-05 Pedro Alves <palves@redhat.com>
8055
8056 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8057 to ...
8058 * hostio.h: ... this new file.
8059 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8060 win32-low.c: Include hostio.h.
8061
0ce3d3b5
PA
80622013-09-05 Pedro Alves <palves@redhat.com>
8063
8064 * server.h (gdb_client_data, handler_func, callback_handler_func)
8065 (delete_file_handler, add_file_handler, append_callback_event)
8066 (delete_callback_event, start_event_loop, initialize_event_loop):
8067 Move to event-loop.h and include it.
8068 * event-loop.h: New file.
8069
799cdc37
PA
80702013-09-05 Pedro Alves <palves@redhat.com>
8071
8072 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8073 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8074 (loaded_dll, unloaded_dll): Move to ...
8075 * dll.h: ... this new file.
8076 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8077
6a6bbd9d
PA
80782013-09-05 Pedro Alves <palves@redhat.com>
8079
8080 * server.h (current_process, get_thread_process, all_processes)
8081 (add_inferior_to_list, for_each_inferior, current_inferior)
8082 (remove_inferior, add_process, remove_process, find_process_pid)
8083 (have_started_inferiors_p, have_attached_inferiors_p)
8084 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8085 (clear_inferiors, find_inferior, find_inferior_id)
8086 (inferior_target_data, set_inferior_target_data)
8087 (inferior_regcache_data, set_inferior_regcache_data): Move to
8088 inferiors.h, and include it.
8089 * inferiors.h: New file.
8090
f699aaba
PA
80912013-09-05 Pedro Alves <palves@redhat.com>
8092
8093 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8094 Move ...
72f4393d 8095 * ax.h: ... here.
f699aaba 8096
c144c7a0
PA
80972013-09-05 Pedro Alves <palves@redhat.com>
8098
8099 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8100 tracepoint.h.
8101 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8102 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8103 (handle_tracepoint_general_set, handle_tracepoint_query)
8104 (tracepoint_finished_step, tracepoint_was_hit)
8105 (release_while_stepping_state_list, current_traceframe)
8106 (in_readonly_region, traceframe_read_mem)
8107 (fetch_traceframe_registers, traceframe_read_sdata)
8108 (traceframe_read_info, struct fast_tpoint_collect_status)
8109 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8110 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8111 (supply_fast_tracepoint_registers)
8112 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8113 (ipa_tdesc, claim_trampoline_space)
8114 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8115 (agent_mem_read, agent_get_trace_state_variable_value)
8116 (agent_set_trace_state_variable_value, agent_tsv_read)
8117 (agent_mem_read_string, get_raw_reg_func_addr)
8118 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8119 * tracepoint.h: ... this new file.
8120
ff42e6ab
PA
81212013-09-05 Pedro Alves <palves@redhat.com>
8122
8123 * server.h (perror_with_name, error, fatal, warning, paddress)
8124 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8125 include it.
8126 * utils.h: New file.
8127
541af0f4
PA
81282013-09-05 Pedro Alves <palves@redhat.com>
8129
8130 * server.h (remote_debug, noack_mode, transport_is_reliable)
8131 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8132 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8133 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8134 (write_enn, initialize_async_io, enable_async_io)
8135 (disable_async_io, check_remote_input_interrupt_request)
8136 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8137 (dead_thread_notify, prepare_resume_reply)
8138 (decode_address_to_semicolon, decode_address, decode_m_packet)
8139 (decode_M_packet, decode_X_packet, decode_xfer_write)
8140 (decode_search_memory_packet, unhexify, hexify)
8141 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8142 (look_up_one_symbol, relocate_instruction)
8143 (monitor_output): Move to remote-utils.h, and include it.
8144 * remote-utils.h: New file.
8145
eebdf26b
PA
81462013-09-05 Pedro Alves <palves@redhat.com>
8147
8148 * server.h (_): Delete.
8149
3aafd2ff
PA
81502013-09-02 Pedro Alves <palves@redhat.com>
8151
8152 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8153 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8154 allocated.
8155 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8156
cee83bcb
PM
81572013-09-02 Pierre Muller <muller@sourceware.org>
8158
8159 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8160 or WriteProcessMemory complete successfully and handle
8161 ERROR_PARTIAL_COPY error.
8162
9a13b2fa
PA
81632013-09-02 Pedro Alves <palves@redhat.com>
8164
8165 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8166 error instead of EIO.
8167
602e3198
JK
81682013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8169
8170 PR server/15604
8171 * linux-low.c: Include filestuff.h.
8172 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8173 * lynx-low.c: Include filestuff.h.
8174 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8175 * server.c: Include filestuff.h.
8176 (main): Call notice_open_fds.
8177 * spu-low.c: Include filestuff.h.
8178 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8179
96d7229d
LM
81802013-08-22 Luis Machado <lgustavo@codesourcery.com>
8181
8182 * Makefile.in: Explain why ../target and ../nat are not
8183 listed as include file search paths.
8184 (linux-waitpid.o): New object file rule.
8185 * configure.srv (srv_native_linux_obj): New variable.
8186 Replace all occurrences of linux native object files with
8187 $srv_native_linux_obj.
8188 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8189 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8190 (linux_enable_event_reporting): Remove declaration.
8191 (my_waitpid): Moved to common/linux-waitpid.c.
8192 (linux_wait_for_event): Pass ptid when calling
8193 linux_enable_event_reporting.
8194 (linux_supports_tracefork_flag): Remove.
8195 (linux_enable_event_reporting): Likewise.
8196 (linux_tracefork_grandchild): Remove.
8197 (STACK_SIZE): Moved to common/linux-ptrace.c.
8198 (linux_tracefork_child): Remove.
8199 (linux_test_for_tracefork): Remove.
8200 (linux_look_up_symbols): Call linux_supports_traceclone.
8201 (initialize_low): Remove call to linux_test_for_tracefork.
8202 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8203 common/linux-ptrace.h.
8204 (PTRACE_TYPE_ARG4): Likewise.
8205 Include linux-ptrace.h.
8206
32940073
PA
82072013-08-21 Pedro Alves <palves@redhat.com>
8208
8209 * config.in: Renegerate.
8210
33b60d58 82112013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8212
33b60d58
LM
8213 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8214 (SFILES): Remove $(srcdir)/common/target-common.c and
8215 add $(srcdir)/target/waitstatus.c.
8216 (OBS): Remove target-common.o and add waitstatus.o.
8217 (server_h): Remove $(srcdir)/../common/target-common.h and
8218 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8219 and $(srcdir)/../target/waitstatus.h.
8220 (target-common.o): Remove.
8221 (waitstatus.o): New target object file.
8222 * target.h: Do not include target-common.h and
8223 include target/resume.h, target/wait.h and
8224 target/waitstatus.h.
8225
b8e1b30e
LM
82262013-08-13 Luis Machado <lgustavo@codesourcery.com>
8227
8228 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8229 to PTRACE_TYPE_ARG3.
8230 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8231 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8232 PTRACE_TYPE_ARG4.
8233 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8234 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8235
7a60ad40
YQ
82362013-07-27 Jie Zhang <jie@codesourcery.com>
8237 Daniel Jacobowitz <dan@codesourcery.com>
8238 Yao Qi <yao@codesourcery.com>
8239
8240 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8241 (mips-linux-watch.o): New rule.
8242 (mips_linux_watch_h): New variable.
8243 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8244 srv_tgtobj.
8245 * linux-mips-low.c: Include mips-linux-watch.h.
8246 (struct arch_process_info, struct arch_lwp_info): New.
8247 (update_watch_registers_callback): New function.
8248 (mips_linux_new_process, mips_linux_new_thread) New functions.
8249 (mips_linux_prepare_to_resume, mips_insert_point): New
8250 functions.
8251 (mips_remove_point, mips_stopped_by_watchpoint): New
8252 functions.
8253 (rsp_bp_type_to_target_hw_bp_type): New function.
8254 (mips_stopped_data_address): New function.
8255 (the_low_target): Add watchpoint support functions.
8256
de6f69ad
YQ
82572013-07-27 Yao Qi <yao@codesourcery.com>
8258
8259 * i386-low.c: Include break-common.h.
8260 (enum target_hw_bp_type): Remove.
8261
3360c0bf
LM
82622013-07-24 Luis Machado <lgustavo@codesourcery.com>
8263
8264 * Makefile.in (SFILES): /common/target-common.c.
8265 (OBS): Add target-common.o.
8266 (server_h): Add $(srcdir)/../common/target-common.h.
8267 (target-common.o): New target.
8268 * server.c (queue_stop_reply_callback): Free
8269 status string after use.
8270 * target.c (target_waitstatus_to_string): Remove.
8271 * target.h: Include target-common.h.
8272 (resume_kind): Likewise.
8273 (target_waitkind): Likewise.
8274 (target_waitstatus): Likewise.
8275 (TARGET_WNOHANG): Likewise.
8276
bd885420
YQ
82772013-07-04 Yao Qi <yao@codesourcery.com>
8278
8279 * Makefile.in (host_alias): Use @host_noncanonical@.
8280 (target_alias): Use @target_noncanonical@.
8281 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8282 ACX_NONCANONICAL_HOST.
8283 * configure: Regenerated.
8284
8285 Revert:
8286 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8287
8288 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8289 * configure: Rebuild.
8290 * Makefile.in (version_host, version_target): Get from configure.
8291 (version.c): Use $(version_host) and $(version_target).
8292
17ef446e
PA
82932013-07-03 Pedro Alves <palves@redhat.com>
8294
8295 * Makefile.in (config.status): Depend on development.sh.
8296 * acinclude.m4: Include libmcheck.m4.
8297 * configure: Regenerate.
8298
7a9a7487
MG
82992013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8300
8301 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8302 attribute inside the parentheses.
8303 (winapi_DebugSetProcessKillOnExit): Ditto.
8304 (winapi_DebugBreakProcess): Ditto.
8305 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8306
49b64de6
MG
83072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8308
8309 * notif.h (notif_event): Add a dummy member to avoid compiler
8310 errors.
8311
d5749ee7
PA
83122013-07-01 Pedro Alves <palves@redhat.com>
8313
8314 * hostio.c (HOSTIO_PATH_MAX): Define.
8315 (require_filename, handle_open, handle_unlink, handle_readlink):
8316 Use it.
8317
d8d2a3ee
PA
83182013-07-01 Pedro Alves <palves@redhat.com>
8319
8320 * server.h: Include "pathmax.h".
8321 * linux-low.c: Don't include sys/param.h.
8322 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8323 MAXPATHLEN.
8324 * win32-low.c: Don't include sys/param.h.
8325 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8326
bc7dea8d
PA
83272013-07-01 Pedro Alves <palves@redhat.com>
8328
8329 * event-loop.c: Don't check HAVE_UNISTD_H before including
8330 <unistd.h>.
8331 * gdbreplay.c: Likewise.
8332 * remote-utils.c: Likewise.
8333 * server.c: Likewise.
8334 * configure.ac: Don't check for unistd.h.
8335 * configure: Regenerate.
8336
d6c2da54
TT
83372013-06-28 Tom Tromey <tromey@redhat.com>
8338
8339 * Makefile.in (version.c): Use version.in, not
8340 common/version.in.
8341
257b6bec
MG
83422013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8343
8344 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8345 * configure: Rebuild.
8346 * Makefile.in (version_host, version_target): Get from configure.
8347 (version.c): Use $(version_host) and $(version_target).
8348
86ebe149
DK
83492013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8350
8351 Fix trace-status to output user name without trailing colon.
8352 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8353
f30aa5af
DK
83542013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8355
8356 Fix trace-status to output proper start-time and stop-time.
8357 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8358 output start time and stop time in hex as gdb expects.
8359
28a93511
YQ
83602013-06-26 Pedro Alves <pedro@codesourcery.com>
8361
8362 * tracepoint.c (build_traceframe_info_xml): Output trace state
8363 variables present in the trace buffer.
8364
01208463
TT
83652013-06-24 Tom Tromey <tromey@redhat.com>
8366
8367 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8368 create-version.sh.
8369 (version.o): Remove.
8370 * gdbreplay.c: Include version.h.
8371 (version, host_name): Don't declare.
8372 * server.h: Include version.h.
8373 (version, host_name): Don't declare.
8374
760256f9
PA
83752013-06-12 Pedro Alves <palves@redhat.com>
8376
8377 * linux-x86-low.c (linux_is_elf64): Delete global.
8378 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8379 with local linux_pid_exe_is_elf_64_file use.
8380
030031ee
PA
83812013-06-11 Pedro Alves <palves@redhat.com>
8382
8383 * linux-low.c (regset_disabled, disable_regset): New functions.
8384 (regsets_fetch_inferior_registers)
8385 (regsets_store_inferior_registers): Use them.
8386 (initialize_regsets_info); Don't allocate the disabled_regsets
8387 array here.
8388 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8389 comment.
8390
5da6eb0a
PA
83912013-06-11 Pedro Alves <palves@redhat.com>
8392
8393 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8394 xmalloc.
8395
7e5aaa09
PA
83962013-06-11 Pedro Alves <palves@redhat.com>
8397
8398 * linux-x86-low.c (initialize_low_arch): Call
8399 init_registers_x32_avx_linux.
8400
d878444c
JK
84012013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8402
8403 Fix compatibility with Android Bionic.
8404 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8405 it is not empty.
8406
3aee8918
PA
84072013-06-07 Pedro Alves <palves@redhat.com>
8408
5f2b57b5 8409 PR server/14823
3aee8918
PA
8410 * Makefile.in (OBS): Add tdesc.o.
8411 (IPA_OBJS): Add tdesc-ipa.o.
8412 (tdesc-ipa.o): New rule.
8413 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8414 interface.
8415 * linux-low.c (new_inferior): Delete.
8416 (disabled_regsets, num_regsets): Delete.
8417 (linux_add_process): Adjust to set the new per-process
8418 new_inferior flag.
8419 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8420 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8421 was a stop. When calling arch_setup, switch the current inferior
8422 to the thread that got an event.
8423 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8424 (regsets_fetch_inferior_registers)
8425 (regsets_store_inferior_registers): New regsets_info parameter.
8426 Adjust to use it.
8427 (linux_register_in_regsets): New regs_info parameter. Adjust to
8428 use it.
8429 (register_addr, fetch_register, store_register): New usrregs_info
8430 parameter. Adjust to use it.
8431 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8432 parameter regs_info. Adjust to use it.
8433 (linux_fetch_registers): Get the current inferior's regs_info, and
8434 adjust to use it.
8435 (linux_store_registers): Ditto.
8436 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8437 (initialize_low): Don't initialize the target_regsets here. Call
8438 initialize_low_arch.
8439 * linux-low.h (target_regsets): Delete declaration.
8440 (struct regsets_info): New.
8441 (struct usrregs_info): New.
8442 (struct regs_info): New.
8443 (struct process_info_private) <new_inferior>: New field.
8444 (struct linux_target_ops): Delete the num_regs, regmap, and
8445 regset_bitmap fields. New field regs_info.
8446 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8447 * i387-fp.c (num_xmm_registers): Delete.
8448 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8449 calls to new interface.
8450 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8451 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8452 Infer the number of xmm registers from the regcache's target
8453 description.
8454 * i387-fp.h (num_xmm_registers): Delete.
8455 * inferiors.c (add_thread): Don't install the thread's regcache
8456 here.
8457 * proc-service.c (gregset_info): Fetch the current inferior's
8458 regs_info. Adjust to use it.
8459 * regcache.c: Include tdesc.h.
8460 (register_bytes, reg_defs, num_registers)
8461 (gdbserver_expedite_regs): Delete.
8462 (get_thread_regcache): If the thread doesn't have a regcache yet,
8463 create one, instead of aborting gdbserver.
8464 (regcache_invalidate_one): Rename to ...
8465 (regcache_invalidate_thread): ... this.
8466 (regcache_invalidate_one): New.
8467 (regcache_invalidate): Only invalidate registers of the current
8468 process.
8469 (init_register_cache): Add target_desc parameter, and use it.
8470 (new_register_cache): Ditto. Assert the target description has a
8471 non zero registers_size.
8472 (regcache_cpy): Add assertions. Adjust.
8473 (realloc_register_cache, set_register_cache): Delete.
8474 (registers_to_string, registers_from_string): Adjust.
8475 (find_register_by_name, find_regno, find_register_by_number)
8476 (register_cache_size): Add target_desc parameter, and use it.
8477 (free_register_cache_thread, free_register_cache_thread_one)
8478 (regcache_release, register_cache_size): New.
8479 (register_size): Add target_desc parameter, and use it.
8480 (register_data, supply_register, supply_register_zeroed)
8481 (supply_regblock, supply_register_by_name, collect_register)
8482 (collect_register_as_string, collect_register_by_name): Adjust.
8483 * regcache.h (struct target_desc): Forward declare.
8484 (struct regcache) <tdesc>: New field.
8485 (init_register_cache, new_register_cache): Add target_desc
8486 parameter.
8487 (regcache_invalidate_thread): Declare.
8488 (regcache_invalidate_one): Delete declaration.
8489 (regcache_release): Declare.
8490 (find_register_by_number, register_cache_size, register_size)
8491 (find_regno): Add target_desc parameter.
8492 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8493 declarations.
8494 * remote-utils.c: Include tdesc.h.
8495 (outreg, prepare_resume_reply): Adjust.
8496 * server.c: Include tdesc.h.
8497 (gdbserver_xmltarget): Delete declaration.
8498 (get_features_xml, process_serial_event): Adjust.
8499 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8500 declare.
8501 (struct process_info) <tdesc>: New field.
8502 (ipa_tdesc): Declare.
8503 * tdesc.c: New file.
8504 * tdesc.h: New file.
8505 * tracepoint.c: Include tdesc.h.
8506 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8507 (get_context_regcache): Adjust to pass ipa_tdesc down.
8508 (do_action_at_tracepoint): Adjust to get the register cache size
8509 from the context regcache's description.
8510 (traceframe_walk_blocks): Adjust to get the register cache size
8511 from the current trace frame's description.
8512 (traceframe_get_pc): Adjust to get current trace frame's
8513 description and pass it down.
8514 (gdb_collect): Adjust to get the register cache size from the
8515 IPA's description.
8516 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8517 (gdbserver_xmltarget): Delete.
8518 (initialize_low_tracepoint): Set the ipa's target description.
8519 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8520 (initialize_low_tracepoint): Set the ipa's target description.
8521 * linux-x86-low.c: Include tdesc.h.
8522 [__x86_64__] (is_64bit_tdesc): New.
8523 (ps_get_thread_area, x86_get_thread_area): Use it.
8524 (i386_cannot_store_register): Rename to ...
8525 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8526 (i386_cannot_fetch_register): Rename to ...
8527 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8528 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8529 to new interface.
8530 (target_regsets): Rename to ...
8531 (x86_regsets): ... this.
8532 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8533 interface.
8534 (x86_siginfo_fixup): Use is_64bit_tdesc.
8535 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8536 (tdesc_x32_avx_linux, tdesc_x32_linux)
8537 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8538 Declare.
8539 (x86_linux_update_xmltarget): Delete.
8540 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8541 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8542 (AMD64_LINUX_USER64_CS): New.
8543 (x86_linux_read_description): New, based on
8544 x86_linux_update_xmltarget.
8545 (same_process_callback): New.
8546 (x86_arch_setup_process_callback): New.
8547 (x86_linux_update_xmltarget): New.
8548 (x86_regsets_info): New.
8549 (amd64_linux_regs_info): New.
8550 (i386_linux_usrregs_info): New.
8551 (i386_linux_regs_info): New.
8552 (x86_linux_regs_info): New.
8553 (x86_arch_setup): Reimplement.
8554 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8555 (x86_emit_ops): Ditto.
8556 (the_low_target): Adjust. Install x86_linux_regs_info,
8557 x86_cannot_fetch_register, and x86_cannot_store_register.
8558 (initialize_low_arch): New.
8559 * linux-ia64-low.c (tdesc_ia64): Declare.
8560 (ia64_fetch_register): Adjust.
8561 (ia64_usrregs_info, regs_info): New globals.
8562 (ia64_regs_info): New function.
8563 (the_low_target): Adjust.
8564 (initialize_low_arch): New function.
8565 * linux-sparc-low.c (tdesc_sparc64): Declare.
8566 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8567 Adjust.
8568 (sparc_arch_setup): New function.
8569 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8570 (the_low_target): Adjust.
8571 (initialize_low_arch): New function.
8572 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8573 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8574 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8575 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8576 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8577 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8578 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8579 (tdesc_powerpc_isa205_vsx64l): Declare.
8580 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8581 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8582 (ppc_set_pc, ppc_get_hwcap): Adjust.
8583 (ppc_usrregs_info): Forward declare.
8584 (!__powerpc64__) ppc_regmap_adjusted: New global.
8585 (ppc_arch_setup): Adjust to the current process'es target
8586 description.
8587 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8588 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8589 (ppc_store_evrregset): Adjust.
8590 (target_regsets): Rename to ...
8591 (ppc_regsets): ... this, and make static.
8592 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8593 (ppc_regs_info): New function.
8594 (the_low_target): Adjust.
8595 (initialize_low_arch): New function.
8596 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8597 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8598 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8599 (tdesc_s390x_linux64v2): Declare.
8600 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8601 (s390_fill_gregset, s390_store_last_break): Adjust.
8602 (target_regsets): Rename to ...
8603 (s390_regsets): ... this, and make static.
8604 (s390_get_pc, s390_set_pc): Adjust.
8605 (s390_get_hwcap): New target_desc parameter, and use it.
8606 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8607 (s390_arch_setup): Adjust to set the current process'es target
8608 description. Don't adjust the regmap.
8609 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8610 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8611 (regs_info_3264): New globals.
8612 (s390_regs_info): New function.
8613 (the_low_target): Adjust.
8614 (initialize_low_arch): New function.
8615 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8616 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8617 [__mips64] (init_registers_mips_linux)
8618 (init_registers_mips_dsp_linux): Delete defines.
8619 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8620 (have_dsp): New global.
8621 (mips_read_description): New, based on mips_arch_setup.
8622 (mips_arch_setup): Reimplement.
8623 (get_usrregs_info): New function.
8624 (mips_cannot_fetch_register, mips_cannot_store_register)
8625 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8626 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8627 (target_regsets): Rename to ...
8628 (mips_regsets): ... this, and make static.
8629 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8630 (dsp_regs_info, regs_info): New globals.
8631 (mips_regs_info): New function.
8632 (the_low_target): Adjust.
8633 (initialize_low_arch): New function.
8634 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8635 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8636 Declare.
8637 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8638 (arm_read_description): New, with bits factored from
8639 arm_arch_setup.
8640 (arm_arch_setup): Reimplement.
8641 (target_regsets): Rename to ...
8642 (arm_regsets): ... this, and make static.
8643 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8644 (arm_regs_info): New function.
8645 (the_low_target): Adjust.
8646 (initialize_low_arch): New function.
8647 * linux-m68k-low.c (tdesc_m68k): Declare.
8648 (target_regsets): Rename to ...
8649 (m68k_regsets): ... this, and make static.
8650 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8651 (m68k_regs_info): New function.
8652 (m68k_arch_setup): New function.
8653 (the_low_target): Adjust.
8654 (initialize_low_arch): New function.
8655 * linux-sh-low.c (tdesc_sharch): Declare.
8656 (target_regsets): Rename to ...
8657 (sh_regsets): ... this, and make static.
8658 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8659 (sh_regs_info, sh_arch_setup): New functions.
8660 (the_low_target): Adjust.
8661 (initialize_low_arch): New function.
8662 * linux-bfin-low.c (tdesc_bfin): Declare.
8663 (bfin_arch_setup): New function.
8664 (bfin_usrregs_info, regs_info): New globals.
8665 (bfin_regs_info): New function.
8666 (the_low_target): Adjust.
8667 (initialize_low_arch): New function.
8668 * linux-cris-low.c (tdesc_cris): Declare.
8669 (cris_arch_setup): New function.
8670 (cris_usrregs_info, regs_info): New globals.
8671 (cris_regs_info): New function.
8672 (the_low_target): Adjust.
8673 (initialize_low_arch): New function.
8674 * linux-cris-low.c (tdesc_crisv32): Declare.
8675 (cris_arch_setup): New function.
8676 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8677 (cris_regs_info): New function.
8678 (the_low_target): Adjust.
8679 (initialize_low_arch): New function.
8680 * linux-m32r-low.c (tdesc_m32r): Declare.
8681 (m32r_arch_setup): New function.
8682 (m32r_usrregs_info, regs_info): New globals.
8683 (m32r_regs_info): Adjust.
8684 (initialize_low_arch): New function.
8685 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8686 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8687 (tic6x_usrregs_info): Forward declare.
8688 (tic6x_read_description): New function, based on ...
8689 (tic6x_arch_setup): ... this. Reimplement.
8690 (target_regsets): Rename to ...
8691 (tic6x_regsets): ... this, and make static.
8692 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8693 (tic6x_regs_info): New function.
8694 (the_low_target): Adjust.
8695 (initialize_low_arch): New function.
8696 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8697 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8698 (target_regsets): Rename to ...
8699 (xtensa_regsets): ... this, and make static.
8700 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8701 globals.
8702 (xtensa_arch_setup, xtensa_regs_info): New functions.
8703 (the_low_target): Adjust.
8704 (initialize_low_arch): New function.
8705 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8706 (nios2_arch_setup): Set the current process'es tdesc.
8707 (target_regsets): Rename to ...
8708 (nios2_regsets): ... this.
8709 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8710 (nios2_regs_info): New function.
8711 (the_low_target): Adjust.
8712 (initialize_low_arch): New function.
a261b8f5
PA
8713 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8714 (aarch64_arch_setup): Set the current process'es tdesc.
8715 (target_regsets): Rename to ...
8716 (aarch64_regsets): ... this.
8717 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8718 (aarch64_regs_info): New function.
8719 (the_low_target): Adjust.
8720 (initialize_low_arch): New function.
3aee8918
PA
8721 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8722 globals.
8723 (target_regsets): Rename to ...
8724 (tile_regsets): ... this.
8725 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8726 (tile_regs_info): New function.
8727 (tile_arch_setup): Set the current process'es tdesc.
8728 (the_low_target): Adjust.
8729 (initialize_low_arch): New function.
8730 * spu-low.c (tdesc_spu): Declare.
8731 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8732 * win32-arm-low.c (tdesc_arm): Declare.
8733 (arm_arch_setup): New function.
8734 (the_low_target): Install arm_arch_setup instead of
8735 init_registers_arm.
8736 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8737 (init_windows_x86): Rename to ...
8738 (i386_arch_setup): ... this. Set `win32_tdesc'.
8739 (the_low_target): Adjust.
8740 * win32-low.c (win32_tdesc): New global.
8741 (child_add_thread): Don't create the thread cache here.
8742 (do_initial_child_stuff): Set the new process'es tdesc.
8743 * win32-low.h (struct target_desc): Forward declare.
8744 (win32_tdesc): Declare.
8745 * lynx-i386-low.c (tdesc_i386): Declare global.
8746 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8747 * lynx-low.c (lynx_tdesc): New global.
8748 (lynx_add_process): Set the new process'es tdesc.
8749 * lynx-low.h (struct target_desc): Forward declare.
8750 (lynx_tdesc): Declare global.
8751 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8752 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8753 * nto-low.c (nto_tdesc): New global.
8754 (do_attach): Set the new process'es tdesc.
8755 * nto-low.h (struct target_desc): Forward declare.
8756 (nto_tdesc): Declare.
8757 * nto-x86-low.c (tdesc_i386): Declare.
8758 (nto_x86_arch_setup): Set `nto_tdesc'.
8759
b1fbec62
GB
87602013-06-04 Gary Benson <gbenson@redhat.com>
8761
8762 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8763 to qSupported response when appropriate.
8764 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8765 with nonzero-length annex.
8766 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8767 arguments supplied in annex.
8768
d1ec4ce7
DE
87692013-05-31 Doug Evans <dje@google.com>
8770
ac44adcb 8771 PR server/15594
d1ec4ce7
DE
8772 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8773 64 bits in 64-cross-32 environment.
8774
9b25f2d3
PA
87752013-05-28 Pedro Alves <palves@redhat.com>
8776
8777 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8778 (aarch64-without-fpu.c): Delete rule.
8779 * configure.srv (aarch64*-*-linux*): Remove references to
8780 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8781 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8782 declaration.
8783
6740dc9c
PA
87842013-05-24 Pedro Alves <palves@redhat.com>
8785
8786 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8787 instead of strchr/decode_address. Error if the range isn't split
8788 with a ','. Don't assume there's be a ':' in the action.
8789
c2d6af84
PA
87902013-05-23 Yao Qi <yao@codesourcery.com>
8791 Pedro Alves <palves@redhat.com>
8792
8793 * linux-low.c (lwp_in_step_range): New function.
8794 (linux_wait_1): If the thread was range stepping and stopped
8795 outside the stepping range, report the stop to GDB. Otherwise,
8796 continue stepping. Add range stepping debug output.
8797 (linux_set_resume_request): Copy the step range from the resume
8798 request to the lwp.
8799 (linux_supports_range_stepping): New.
8800 (linux_target_ops) <supports_range_stepping>: Set to
8801 linux_supports_range_stepping.
8802 * linux-low.h (struct linux_target_ops)
8803 <supports_range_stepping>: New field.
8804 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8805 * linux-x86-low.c (x86_supports_range_stepping): New.
8806 (the_low_target) <supports_range_stepping>: Set to
8807 x86_supports_range_stepping.
8808 * server.c (handle_v_cont): Handle 'r' action.
8809 (handle_v_requests): Append ";r" if the target supports range
8810 stepping.
8811 * target.h (struct thread_resume) <step_range_start,
8812 step_range_end>: New fields.
8813 (struct target_ops) <supports_range_stepping>:
8814 New field.
8815 (target_supports_range_stepping): New macro.
8816
58794e1a
JB
88172013-05-17 Joel Brobecker <brobecker@adacore.com>
8818
8819 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8820 confusion in comment.
8821
d631c5a7
JB
88222013-05-17 Joel Brobecker <brobecker@adacore.com>
8823
8824 * lynx-low.c (struct process_info_private): New type.
8825 (lynx_add_process): New function.
8826 (lynx_create_inferior, lynx_attach): Replace calls to
8827 add_process by calls to lynx_add_process.
8828 (lynx_resume): If PTID is null, then try using
8829 current_process()->private->last_wait_event_ptid.
8830 Add comments.
8831 (lynx_clear_inferiors): Delete. The contents of that function
8832 has been inlined in lynx_mourn;
8833 (lynx_wait_1): Save the ptid in the process's private data.
8834 (lynx_mourn): Free the process' private data. Replace call
8835 to lynx_clear_inferiors by call to clear_inferiors.
8836
96f7a20f
YQ
88372013-05-17 Yao Qi <yao@codesourcery.com>
8838
8839 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8840 the right place.
8841
db0dfaa0
LM
88422013-05-16 Luis Machado <lgustavo@codesourcery.com>
8843
8844 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8845 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8846 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8847 PT_TEXT_END_ADDR guards. Update comments.
8848 (linux_target_op) <read_offsets>: Conditionally define to
8849 linux_read_offsets if the target is UCLIBC and if it defines
8850 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8851
68f5f838
SL
88522013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8853 Andrew Jenner <andrew@codesourcery.com>
8854
8855 * Makefile.in (SFILES): Add linux-nios2-low.c.
8856 (clean): Add action to delete nios2-linux.c.
8857 (nios2-linux.c): New rule.
8858 * configure.srv: Add nios2*-*-linux*.
8859 * linux-nios2-low.c: New.
8860
1ebff1fd
HAQ
88612013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8862
8863 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8864
f6150862
HZ
88652013-04-25 Hui Zhu <hui@codesourcery.com>
8866
8867 PR gdb/15186
f6150862
HZ
8868 * ax.c (ax_printf): Add fflush.
8869
614c279d
TT
88702013-04-22 Tom Tromey <tromey@redhat.com>
8871
8872 * Makefile.in (SFILES): Add filestuff.c.
8873 (OBS): Add filestuff.o.
8874 (filestuff.o): New target.
8875 * config.in, configure: Rebuild.
8876 * configure.ac: Check for fdwalk, pipe2.
8877
7d4e5717
PA
88782013-04-17 Pedro Alves <palves@redhat.com>
8879
8880 * configure.ac (USE_THREAD_DB): Delete variable.
8881 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8882 Don't AC_SUBST USE_THREAD_DB.
8883 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8884 * config.in, configure: Regenerate.
8885
d5c93e41
PA
88862013-04-16 Pedro Alves <palves@redhat.com>
8887
8888 * linux-low.h (struct lwp_info) <thread_known>: Move under
8889 the USE_THREAD_DB #ifdef.
8890
04f5fe89
PA
88912013-04-16 Pedro Alves <palves@redhat.com>
8892
8893 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8894 (linux-low.o): Delete rule.
8895 * linux-low.h: Always include "gdb_thread_db.h" instead of
8896 conditionally including thread_db.h.
8897 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8898 HAVE_THREAD_DB_H.
8899
480b27bf
JK
89002013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8901
8902 * Makefile.in (install-only): Fix make install regression.
8903
43662968
JK
89042013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8905
8906 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8907 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8908 installation.
8909 * gdbserver.1: Remove.
8910
3e74e146
PA
89112013-03-22 Pedro Alves <palves@redhat.com>
8912
8913 * linux-low.c (handle_extended_wait): Don't call
8914 linux_enable_event_reporting.
8915
a8347a2a
TT
89162013-03-15 Tony Theodore <tonyt@logyst.com>
8917
8918 PR build/9098:
8919 * Makefile.in (SHELL): Use @SHELL@.
8920
eeb56fa7
SDJ
89212013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8922
8923 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8924 compiler warning.
8925
4fa7e2ff
JB
89262013-03-13 Joel Brobecker <brobecker@adacore.com>
8927
8928 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8929 Remove extraneous NULL element.
8930
8ddb1965
YQ
89312013-03-13 Yao Qi <yao@codesourcery.com>
8932
8933 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8934 'V' block in trace frame.
8935
9accd112
MM
89362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8937
8938 * target.h (struct target_ops): Add btrace ops.
8939 (target_supports_btrace): New macro.
8940 (target_enable_btrace): New macro.
8941 (target_disable_btrace): New macro.
8942 (target_read_btrace): New macro.
8943 * gdbthread.h (struct thread_info): Add btrace field.
8944 * server.c: Include btrace-common.h.
8945 (handle_btrace_general_set): New function.
8946 (handle_btrace_enable): New function.
8947 (handle_btrace_disable): New function.
8948 (handle_general_set): Call handle_btrace_general_set.
8949 (handle_qxfer_btrace): New function.
8950 (struct qxfer qxfer_packets[]): Add btrace entry.
8951 * inferiors.c (remove_thread): Disable btrace.
8952 * linux-low: Include linux-btrace.h.
8953 (linux_low_enable_btrace): New function.
8954 (linux_low_read_btrace): New function.
8955 (linux_target_ops): Add btrace ops.
8956 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8957 Add srv_linux_btrace=yes.
8958 (x86_64-*-linux*): Add linux-btrace.o.
8959 Add srv_linux_btrace=yes.
8960 * configure.ac: Define HAVE_LINUX_BTRACE.
8961 * config.in: Regenerated.
8962 * configure: Regenerated.
8963
5cc22e4c
MM
89642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8965
8966 * server.c (handle_qxfer): Preserve error message if -3 is
8967 returned.
8968 (qxfer): Document the -3 return value.
8969
7c97f91e
MM
89702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8971
8972 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8973 (linux_btrace_h): New variable.
8974 (linux-btrace.o): New rule.
8975
be9a119c 89762013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8977 Hafiz Abid Qadeer <abidh@codesourcery.com>
8978
8979 * tracepoint.c (trace_buffer_size): New global.
8980 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8981 (init_trace_buffer): Change to one-argument function. Allocate
8982 trace buffer memory.
8983 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8984 handle QTBuffer:size packet.
8985 (cmd_bigqtbuffer_size): New function.
8986 (initialize_tracepoint): Call init_trace_buffer with
8987 DEFAULT_TRACE_BUFFER_SIZE.
8988 * server.c (handle_query): Add QTBuffer:size in the
8989 supported packets.
8990
e64f7499
YQ
89912013-03-07 Yao Qi <yao@codesourcery.com>
8992
8993 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8994 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8995 of -1.
8996 (cmd_qtsp): Adjust condition. Do post increment.
8997 Set cur_action and cur_step_action back to 0.
8998
f0ae6fc3
PA
89992013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9000
9001 PR server/15236
9002 * linux-low.c (linux_write_memory): Return early success if LEN is
9003 zero.
9004
b5b0b0af
CV
90052013-03-05 Corinna Vinschen <vinschen@redhat.de>
9006
334ad4a8 9007 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9008
589bc927
TT
90092013-02-28 Tom Tromey <tromey@redhat.com>
9010
9011 * configure.ac: Invoke AC_SYS_LARGEFILE.
9012 * configure, config.in: Rebuild.
9013
dfe07582
CV
90142013-02-28 Corinna Vinschen <vinschen@redhat.com>
9015
9016 * win32-low.c: Throughout, fix format strings and casts of
9017 printf-like functions to avoid type related warnings on all
9018 platforms.
9019 (get_child_debug_event): Print dwDebugEventCode as hex since
9020 that's how it's usually documented.
9021
736cd585
YQ
90222013-02-28 Yao Qi <yao@codesourcery.com>
9023
9024 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9025 pulongest.
9026
e1f58301
JW
90272013-02-27 Jiong Wang <jiwang@tilera.com>
9028
9029 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9030 (reg-tilegx32.c): New rule.
9031 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9032 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9033 different register info initializer according to elf class.
9034 (init_registers_tilgx32): New function. The tilegx32 register info
9035 initializer.
9036 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9037 (tile_store_gregset): Likewise.
9038
d171ca78
YQ
90392013-02-27 Yao Qi <yao@codesourcery.com>
9040
9041 * server.c (process_point_options): Print debug message when
9042 debug_threads is true.
9043
282bbdf3
YQ
90442013-02-26 Yao Qi <yao@codesourcery.com>
9045
9046 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9047
aca22551
PA
90482013-02-19 Pedro Alves <palves@redhat.com>
9049 Kai Tietz <ktietz@redhat.com>
9050
9051 PR gdb/15161
9052
9053 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9054 instead of strtoul to extract address from packet.
9055 (process_serial_event) <'z'>: Likewise.
9056
4f3cee1c
YQ
90572013-02-18 Yao Qi <yao@codesourcery.com>
9058
9059 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9060
8e1d55a3
PA
90612013-02-14 Pedro Alves <palves@redhat.com>
9062
9063 Plug memory leak.
9064
9065 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9066 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9067
458820da
PA
90682013-02-14 Pedro Alves <palves@redhat.com>
9069
9070 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9071
baea0dae
PA
90722013-02-14 Pedro Alves <palves@redhat.com>
9073
9074 * tracepoint.c (save_string): Delete.
9075 (add_tracepoint_action): Use savestring instead of save_string.
9076
0b1afbb3
PA
90772013-02-12 Pedro Alves <palves@redhat.com>
9078
9079 * linux-xtensa-low.c: Ditto.
9080 * xtensa-xtregs.c: Ditto.
9081
8a4ac37e
PA
90822013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9083
9084 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9085 thread_db.
9086
148de6bb
MS
90872013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9088
9089 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9090 aarch64_num_wp_regs and aarch64_num_bp_regs to
9091 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9092
55fac6e0
MS
90932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9094
9095 * linux-aarch64-low.c (ps_get_thread_area): Replace
9096 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9097
176eb98c
MS
90982013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9099 Marcus Shawcroft <marcus.shawcroft@arm.com>
9100 Nigel Stephens <nigel.stephens@arm.com>
9101 Yufeng Zhang <yufeng.zhang@arm.com>
9102
9103 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9104 (aarch64.c, aarch64-without-fpu.c): New targets.
9105 * configure.srv (aarch64*-*-linux*): New.
9106 * linux-aarch64-low.c: New file.
9107
56f7af9c
MS
91082013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9109
43aaf8b6 9110 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9111 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9112 (dequeue_one_deferred_signal, linux_resume_one_thread)
9113 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9114 (linux_tracefork_grandchild, linux_test_for_tracefork)
9115 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9116 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9117 where the argument is 0.
9118
60f662b0
YQ
91192013-01-25 Yao Qi <yao@codesourcery.com>
9120
9121 * event-loop.c: Include "queue.h".
9122 (gdb_event_p): New typedef.
9123 (struct gdb_event) <next_event>: Remove.
9124 (event_queue): Change to QUEUE(gdb_event_p).
9125 (async_queue_event): Remove.
9126 (gdb_event_xfree): New.
9127 (initialize_event_loop): New.
9128 (process_event): Use API from QUEUE.
9129 (wait_for_event): Likewise.
9130 * server.c (main): Call initialize_event_loop.
9131 * server.h (initialize_event_loop): Declare.
9132
5ae4861a
YQ
91332013-01-18 Yao Qi <yao@codesourcery.com>
9134
9135 * ax.h (struct eval_agent_expr_context): New.
9136 (gdb_eval_agent_expr): Update declaration.
9137 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9138 TFRAME. Add new argument CTX.
9139 * server.h (struct eval_agent_expr_context): Declare.
9140 (agent_mem_read, agent_tsv_read): Update declaration.
9141 (agent_mem_read_string): Likewise.
9142 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9143 (add_traceframe_block): Add new argument TPOINT.
9144 Increase TPOINT->traceframe_usage.
9145 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9146 eval_tracepoint_agent_expr.
9147 (condition_true_at_tracepoint): Likewise.
9148 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9149 (agent_mem_read_string, agent_tsv_read): Likewise.
9150
85e00e85
YQ
91512013-01-16 Yao Qi <yao@codesourcery.com>
9152
9153 * linux-low.c (linux_resume_one_lwp): Don't check
9154 'lwp->bp_reinsert != 0'.
9155
4039cf45
JB
91562013-01-07 Joel Brobecker <brobecker@adacore.com>
9157 Pedro Alves <palves@redhat.com>
9158
9159 * lynx-low.c (ptrace_request_to_str): Define a temporary
9160 macro and use it to simplify this function's implementation.
9161
9044dee2
JB
91622013-01-07 Joel Brobecker <brobecker@adacore.com>
9163
9164 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9165 sets errno.
9166
e6352c8f
JB
91672013-01-07 Joel Brobecker <brobecker@adacore.com>
9168
9169 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9170
50681a27
JB
91712013-01-07 Joel Brobecker <brobecker@adacore.com>
9172
9173 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9174
3f6e77ef
JB
91752013-01-07 Joel Brobecker <brobecker@adacore.com>
9176
9177 * lynx-low.c (lynx_resume): Use the resume_info parameter
9178 to determine the ptid for the lynx_ptrace call, unless
9179 it is equal to minus_one_ptid, in which case we use the
9180 ptid of the current_inferior.
9181 (lynx_wait_1): After having received a thread create/exit
9182 event, resume the inferior's execution using the signaling
9183 thread's ptid, rather than the old ptid.
9184
7fda33ae
JB
91852013-01-07 Joel Brobecker <brobecker@adacore.com>
9186
9187 * lynx-low.c (lynx_resume): Delete variable ret.
9188
b9786c74
JB
91892013-01-01 Joel Brobecker <brobecker@adacore.com>
9190
9191 * gdbreplay.c (gdbreplay_version): Update copyright year.
9192 * server.c (gdbserver_version): Likewise.
9193
8b93d60f
JB
91942012-12-17 Joel Brobecker <brobecker@adacore.com>
9195
9196 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9197 new thread.
9198
037335a7
JB
91992012-12-17 Joel Brobecker <brobecker@adacore.com>
9200
9201 * lynx-low.c (ptrace_request_to_str): Add handling for
9202 PTRACE_GETTRACESIG.
9203
52d4cbd8
JB
92042012-12-17 Joel Brobecker <brobecker@adacore.com>
9205
9206 * lynx-low.c (lynx_attach): Delete variable new_process.
9207
ab8f6ca9
JB
92082012-12-17 Joel Brobecker <brobecker@adacore.com>
9209
9210 * lynx-low.c (lynx_create_inferior): Delete variable
9211 new_process.
9212
78cbc024
JB
92132012-12-17 Joel Brobecker <brobecker@adacore.com>
9214
9215 * lynx-low.c (ptrace_request_to_str): Do not handle
9216 PTRACE_GETTHREADLIST if this macro does not exist.
9217
14a00470
YQ
92182012-12-15 Yao Qi <yao@codesourcery.com>
9219
9220 * Makefile.in (OBS): Add notif.o.
9221 * notif.c, notif.h: New.
9222 * server.c: Include "notif.h".
9223 (struct vstop_notif) <next>: Remove.
9224 <base>: New field.
9225 (queue_stop_reply): Update.
9226 (push_event, send_next_stop_reply): Remove.
9227 (discard_queued_stop_replies): Update.
9228 (notif_stop): New variable.
9229 (handle_v_stopped): Remove.
9230 (handle_v_requests): Don't call handle_v_stopped. Call
9231 handle_ack_notif instead.
9232 (queue_stop_reply_callback): Call notif_event_enque instead
9233 of queue_stop_reply.
9234 (handle_status): Don't call send_next_stop_reply, call
9235 notif_write_event instead.
9236 (kill_inferior_callback): Likewise.
9237 (detach_or_kill_inferior_callback): Likewise.
9238 (main): Call initialize_notif.
9239 (process_serial_event): Call QUEUE_is_empty.
9240 (handle_target_event): Call notif_push instead of push event.
9241 * server.h (push_event): Remove declaration.
9242
61c125b9
TT
92432012-12-10 Tom Tromey <tromey@redhat.com>
9244
9245 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9246 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9247 macros.
9248 (.c.o): Rewrite.
9249 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9250 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9251 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9252 (amd64-linux-ipa.o, ax.o): Rewrite.
9253 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9254 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9255 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9256 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9257 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9258 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9259 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9260 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9261 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9262 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9263 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9264 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9265 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9266 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9267 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9268 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9269 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9270 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9271 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9272 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9273 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9274 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9275 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9276 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9277 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9278 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9279 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9280 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9281 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9282 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9283 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9284 (reg-tilegx.o): Remove.
9285 (all_object_files): New macro.
9286 Include .deps files.
9287 * aclocal.m4, configure: Rebuild.
9288 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9289 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9290 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9291
e90e9ad9
TT
92922012-12-05 Tom Tromey <tromey@redhat.com>
9293
9294 PR gdb/14917:
9295 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9296
02d403bf 92972012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9298
9299 * configure.ac: Check for linux/perf_event.h.
9300 * config.in: Regenerated.
9301 * configure: Regenerated.
9302
0270a750
PA
93032012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9304
9305 * hostio.c (handle_readlink): Decrease buffer size
9306 parameter passed to readlink by one byte.
9307
8c29b58e
YQ
93082012-11-26 Yao Qi <yao@codesourcery.com>
9309
9310 * configure.ac (build_warnings): Append '-Wempty-body'.
9311 * configure: Regenerated.
9312 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9313 body.
9314
8bdce1ff
PM
93152012-11-15 Pierre Muller <muller@sourceware.org>
9316
9317 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9318 * config.in: Regenerate.
9319 * configure: Regenerate.
9320 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9321 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9322 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9323 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9324 header.
9325 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9326 instead of <sys/wait.h> header.
9327 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9328
02d403bf 93292012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9330
9331 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9332 (various make rules): Remove -DGDBSERVER
9333
fbd5db48
YQ
93342012-11-09 Yao Qi <yao@codesourcery.com>
9335
9336 * spu-low.c (current_ptid): Move it to ..
9337 * gdbthread.h: ... here. New.
9338 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9339 * server.c (myresume, process_serial_event): Likewise.
9340 * thread-db.c (thread_db_find_new_threads): Likewise.
9341 * tracepoint.c (run_inferior_command): Likewise.
9342
b3dc46ff
AB
93432012-10-01 Andrew Burgess <aburgess@broadcom.com>
9344
9345 * server.c (handle_search_memory_1): Include access length in
9346 warning message.
9347
07c04788
HPN
93482012-09-05 Michael Brandt <michael.brandt@axis.com>
9349
9350 * linux-crisv32-low.c: Fix compile errors.
9351
918d227b
YQ
93522012-09-04 Yao Qi <yao@codesourcery.com>
9353
9354 * tracepoint.c (cmd_qtsv): Adjust debug message.
9355 Don't check CUR_TPOINT.
9356
18c1b81a
YQ
93572012-08-28 Yao Qi <yao@codesourcery.com>
9358
9359 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9360 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9361 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9362 Remove declarations of xmalloc, xreallloc, xstrdup and
9363 freeargv.
9364 * Makefile.in (libiberty_h): New.
9365 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9366 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9367
dc82f37b
YQ
93682012-08-23 Yao Qi <yao@codesourcery.com>
9369
9370 * server.h: Remove declaration of 'xsnprintf'.
9371
406b1477
KS
93722012-08-22 Keith Seitz <keiths@redhat.com>
9373
9374 * server.h: Include build-gnulib-gbserver/config.h.
9375 * gdbreplay.c: Likewise.
9376
e6712ff1
DE
93772012-08-08 Doug Evans <dje@google.com>
9378
9379 * Makefile.in (SFILES): Add gdb_vecs.c.
9380 (OBS): Add gdb_vecs.o.
9381 (gdb_vecs_h, host_defs_h): New variables.
9382 (thread-db.o): Add $(gdb_vecs_h) dependency.
9383 (gdb_vecs.o): New rule.
9384 * thread-db.c: #include "gdb_vecs.h".
9385 (thread_db_load_search): Use a vector to iterate over path elements.
9386 Handle text appearing after "$pdir".
9387
9388 * configure.ac: Add check for strstr.
9389 * config.in: Regenerate.
9390 * configure: Regenerate.
9391
7c3270ae
UW
93922012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9393
9394 * hostio.c (handle_pread): If pread fails, fall back to attempting
9395 lseek/read.
9396 (handle_pwrite): Likewise for pwrite.
9397
b62e2b27
UW
93982012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9399
9400 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9401 between unsupported TYPE and unimplementable ADDR/LEN combination.
9402 (arm_insert_point): Act on new return value.
9403
78a99e91
PA
94042012-07-31 Pedro Alves <palves@redhat.com>
9405
9406 * server.c (process_point_options): Only skip tokens if we find
9407 one that is unrecognized. Don't treat 'X' specially while
9408 skipping unrecognized tokens.
9409
fcf303ab
UW
94102012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9411
9412 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9413 to 4-byte-align HW breakpoint addresses for Thumb.
9414
7255706c
YQ
94152012-07-27 Yao Qi <yao@codesourcery.com>
9416
9417 PR remote/14161.
9418
9419 * server.h: Declare gdb_agent_about_to_close.
9420 * target.c (kill_inferior): Include "agent.h".
9421 New. Send command 'kill'.
9422 * target.h (kill_inferior): Removed macro.
9423 * tracepoint.c (gdb_agent_about_to_close): New.
9424 (gdb_agent_helper_thread): Handle command 'close'.
9425 Wait endlessly until the inferior stops.
9426 Install gdb_agent_remove_socket to atexit hook.
9427 (agent_socket_name): New static variable.
9428 (gdb_agent_socket_init): Replace local variable 'name' with
9429 'agent_socket_name'.
9430 (gdb_agent_remove_socket): New.
9431
5a3f286f
YQ
94322012-07-27 Yao Qi <yao@codesourcery.com>
9433
9434 * server.c (process_point_options): Stop at 'X' when parsing.
9435
961bd387
ME
94362012-07-19 Michael Eager <eager@eagercon.com>
9437
a261b8f5 9438 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9439 to hw_execute.
9440 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9441 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9442 hardware breakpoint.
9443
aa7c7447
JK
94442012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9445
9446 * gdbserver/linux-low.c (initialize_low): Call
9447 linux_ptrace_init_warnings.
9448
7f216e7c
DE
94492012-07-02 Doug Evans <dje@google.com>
9450
9451 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9452 pointer to int.
9453
d3ce09f5
SS
94542012-07-02 Stan Shebs <stan@codesourcery.com>
9455
9456 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9457 (ax.o): Add it to build rule.
9458 (ax-ipa.o): Ditto.
9459 (OBS): Add format.o.
9460 (IPA_OBS): Add format.o.
9461 * server.c (handle_query): Claim support for breakpoint commands.
9462 (process_point_options): Add command case.
9463 (process_serial_event): Leave running if there are printfs in
9464 effect.
9465 * mem-break.h (any_persistent_commands): Declare.
9466 (add_breakpoint_commands): Declare.
9467 (gdb_no_commands_at_breakpoint): Declare.
9468 (run_breakpoint_commands): Declare.
9469 * mem-break.c (struct point_command_list): New struct.
9470 (struct breakpoint): New field command_list.
9471 (any_persistent_commands): New function.
9472 (add_commands_to_breakpoint): New function.
9473 (add_breakpoint_commands): New function.
9474 (gdb_no_commands_at_breakpoint): New function.
9475 (run_breakpoint_commands): New function.
9476 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9477 locally.
9478 * ax.c: Include format.h.
9479 (ax_printf): New function.
9480 (gdb_eval_agent_expr): Add printf opcode.
9481
2f8f6aed
YQ
94822012-06-13 Yao Qi <yao@codesourcery.com>
9483
9484 * server.c (start_inferior): Remove duplicated writes to fields
9485 'last_resume_kind' and 'last_status' of 'current_inferior'.
9486
0c9070b3
YQ
94872012-06-12 Yao Qi <yao@codesourcery.com>
9488 Pedro Alves <palves@redhat.com>
9489
9490 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9491 comment.
9492 * server.c (handle_v_cont): Extend comment.
9493
c52daf70
YQ
94942012-06-11 Yao Qi <yao@codesourcery.com>
9495
9496 * linux-low.c (linux_attach): Add 'static'.
9497
d38bbb0a
YQ
94982012-06-06 Yao Qi <yao@codesourcery.com>
9499
9500 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9501
89dc0afd
JK
95022012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9503
9504 Fix gcc -flto compilation warning.
9505 * server.c (main): Make variable multi_mode and attach volatile.
9506
75f62ce7
TJB
95072012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9508
9509 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9510 if the platform doesn't know about it.
9511
65f479b6
PA
95122012-05-30 Jeff Kenton <jkenton@tilera.com>
9513
9514 * Makefile.in (SFILES): Add linux-tile-low.c.
9515 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9516 * configure.srv: Handle tilegx-*-linux*.
9517 * linux-tile-low.c: New file.
9518
0c5bf5a9
JK
95192012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9520
9521 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9522
a493e3e2
PA
95232012-05-24 Pedro Alves <palves@redhat.com>
9524
9525 PR gdb/7205
9526
43aaf8b6 9527 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9528
2ea28649
PA
95292012-05-24 Pedro Alves <palves@redhat.com>
9530
9531 PR gdb/7205
9532
9533 Replace target_signal with gdb_signal throughout.
9534
8d409d16
MR
95352012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9536
9537 * linux-low.c (linux_store_registers): Avoid the copying sequence
9538 when no data has been retrieved by ptrace.
9539
23512c01
MGD
95402012-05-22 Will Deacon <will.deacon@arm.com>
9541
9542 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9543 Include asm/ptrace.h.
9544 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9545 already defined.
9546
4934b29e
MR
95472012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9548
9549 * linux-low.c (linux_store_registers): Don't re-retrieve data
9550 with ptrace that has already been obtained from /proc. Always
9551 copy any data retrieved with ptrace to the buffer supplied.
9552
bde24c0a
PA
95532012-05-11 Yao Qi <yao@codesourcery.com>
9554 Pedro Alves <palves@redhat.com>
9555
9556 * linux-low.c (enum stopping_threads_kind): New.
9557 (stopping_threads): Change type to `enum stopping_threads_kind'.
9558 (handle_extended_wait): If stopping and suspending threads, leave
9559 the new_lwp suspended too.
9560 (linux_wait_for_event): Adjust.
9561 (stop_all_lwps): Set `stopping_threads' to
9562 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9563 whether we're suspending threads or just stopping them. Assert no
9564 recursion happens.
9565
623b6bdf
YQ
95662012-04-29 Yao Qi <yao@codesourcery.com>
9567
9568 * server.h: Move some code to ...
9569 * gdbthread.h: ... here. New.
9570 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9571 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9572 (nto-low.o, win32-low.o): Likewise.
9573 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9574 * regcache.c, remote-utils.c, server.c: Likewise.
9575 * target.c, tracepoint.c, win32-low.c: Likewise.
9576
f15f9948
TJB
95772012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9578
9579 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9580 (PTRACE_ARG4_TYPE): Likewise.
9581 (PTRACE_XFER_TYPE): Likewise.
9582 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9583 ptrace to PTRACE_ARG3_TYPE.
9584 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9585 (PTRACE_ARG4_TYPE): Likewise.
9586 (PTRACE_XFER_TYPE): Likewise.
9587 (linux_detach_one_lwp): Cast fourth argument of
9588 ptrace to long then PTRACE_ARG4_TYPE.
9589 (regsets_fetch_inferior_registers): Cast third argument of
9590 ptrace to long then PTRACE_ARG3_TYPE.
9591 (regsets_store_inferior_registers): Likewise.
9592
38ea300a
PA
95932012-04-20 Pedro Alves <palves@redhat.com>
9594
9595 * configure: Regenerate.
9596
c971b7fa
PA
95972012-04-19 Pedro Alves <palves@redhat.com>
9598
43aaf8b6 9599 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9600 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9601 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9602 (all, install-only, uninstall, clean-info, all-lib, clean): No
9603 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9604 (maintainer-clean realclean distclean): Use subdir_do.
9605 (subdir_do): New.
9606 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9607 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9608 * acinclude.m4: Include acx_configure_dir.m4.
9609 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9610 calls. Call AC_PROG_RANLIB. Configure gnulib using
9611 ACX_CONFIGURE_DIR.
9612 (GNULIB): New.
9613 (GNULIB_STDINT_H): Adjust.
9614 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9615 * gdbreplay.c: Include build-gnulib/config.h.
9616 * server.h: Likewise.
9617 * aclocal.m4: Regenerate.
9618 * config.in: Regenerate.
9619 * configure: Regenerate.
c971b7fa 9620
809277f8
PA
96212012-04-19 Pedro Alves <palves@redhat.com>
9622
9623 * Makefile.in (LIBGNU, INCGNU): Adjust.
9624 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9625 (all, install-only, uninstall, clean-info, all-lib, clean)
9626 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9627 * configure.ac: Adjust AC_OUTPUT output.
9628 * aclocal.m4: Regenerate.
9629 * configure: Regenerate.
9630
fd9bb8b8
PA
96312012-04-19 Pedro Alves <palves@redhat.com>
9632
9633 * Makefile.in (generated_files): New.
9634 (server_h): Remove the explicit dependency on config.h, and depend
9635 on $generated_files.
9636
1c298c66
PA
96372012-04-19 Pedro Alves <palves@redhat.com>
9638
9639 * Makefile.in (INCGNU): Add -Ignulib.
9640
57c4b50b
PA
96412012-04-19 Pedro Alves <palves@redhat.com>
9642
9643 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9644 (INCGNU): ... this, and spell out -I here.
9645 (GNULIB_LIB): Rename to ...
9646 (LIBGNU): ... this.
9647 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9648
1030e047
PA
96492012-04-19 Pedro Alves <palves@redhat.com>
9650
9651 * config.in: Regenerate.
9652
447d4319
PA
96532012-04-19 Pedro Alves <palves@redhat.com>
9654
9655 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9656 * server.h (memmem): Remove declaration.
9657 * config.in: Regenerate.
9658 * configure: Regenerate.
9659
aad9eab9
YQ
96602012-04-19 Yao Qi <yao@codesourcery.com>
9661
9662 * Makefile.in (SFILES): Add common/vec.c.
9663 (OBS): Add vec.o.
9664 (vec.o): New rule.
9665
3e10640f
YQ
96662012-04-19 Yao Qi <yao@codesourcery.com>
9667
9668 * remote-utils.c (prepare_resume_reply): Replace with macro
9669 target_core_of_thread.
9670 * server.c (handle_qxfer_threads_proper): Likewise.
9671 * target.h (traget_core_of_thread): New macro.
9672
71622373
PA
96732012-04-18 Pedro Alves <palves@redhat.com>
9674
9675 * aclocal.m4: Regenerate.
9676 * configure: Regenerate.
9677
80d26939
YQ
96782012-04-16 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9681 duplicated on address.
9682
42476b70
YQ
96832012-04-16 Yao Qi <yao@codesourcery.com>
9684
9685 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9686 (struct tracepoint_action_ops) <send>: New field.
9687 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9688 (agent_expr_send, x_tracepoint_action_send): New.
9689 (l_tracepoint_action_send): New.
9690 (cmd_qtdp): Download and install tracepoint
9691 according to `use_agent'.
9692 (run_inferior_command): Add one more parameter `len'.
9693 Update callers.
9694 (tracepoint_send_agent): New.
9695 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9696
7bc83639
YQ
96972012-04-16 Yao Qi <yao@codesourcery.com>
9698
9699 * tracepoint.c (download_tracepoints): Moved to ...
9700 (cmd_qtstart): ... here.
9701
5f18041e
YQ
97022012-04-14 Yao Qi <yao@codesourcery.com>
9703
9704 * tracepoint.c: Include inttypes.h.
9705 (struct collect_memory_action): Use sized types.
9706 (struct tracepoint): Likewise.
9707 (cmd_qtdp, stop_tracing): Update print specifiers.
9708 (cmd_qtp, response_tracepoint): Likewise.
9709 (collect_data_at_tracepoint): Likewise.
9710 (collect_data_at_step): Likewise.
9711
55a8c076
YQ
97122012-04-14 Yao Qi <yao@codesourcery.com>
9713
9714 Import gnulib module inttypes.
9715 * aclocal.m4, config.in, configure: Regenerated.
9716
dc750257
YQ
97172012-04-14 Yao Qi <yao@codesourcery.com>
9718
9719 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9720 Makefile and config.status at last.
9721
0ab5faf9
YQ
97222012-04-13 Yao Qi <yao@codesourcery.com>
9723
9724 * tracepoint.c: Include stdint.h unconditionally.
9725
18f5fd81
TJB
97262012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9727
9728 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9729 on BFD_HAVE_SYS_PROCFS_TYPE.
9730 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9731 * configure: Regenerate.
9732 * config.in: Likewise.
9733
4d47af5c
L
97342012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9735
9736 * Makefile.in (clean): Also remove x32.c x32-linux.c
9737 x32-avx.c x32-avx-linux.c.
9738 (x32.o): New target.
9739 (x32.c): Likewise.
9740 (x32-linux.o): Likewise.
9741 (x32-linux.c): Likewise.
9742 (x32-avx.o): Likewise.
9743 (x32-avx.c): Likewise.
9744 (x32-avx-linux.o): Likewise.
9745 (x32-avx-linux.c): Likewise.
9746
9747 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9748 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9749 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9750 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9751 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9752 i386/x32-avx-linux.xml.
9753
9754 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9755 (init_registers_x32_avx_linux): Likwise.
9756 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9757 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9758
ecedbe58
PA
97592012-04-13 Pedro Alves <palves@redhat.com>
9760
9761 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9762 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9763 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9764 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9765 the sub-make.
9766
c92b5177
L
97672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9768
9769 * linux-x86-low.c (compat_x32_clock_t): New.
9770 (compat_x32_siginfo_t): Likewise.
9771 (compat_x32_siginfo_from_siginfo): Likewise.
9772 (siginfo_from_compat_x32_siginfo): Likewise.
9773 (linux_is_elf64): Likewise.
9774 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9775 and siginfo_from_compat_x32_siginfo for x32.
9776 (x86_arch_setup): Set linux_is_elf64.
9777
214d508e
L
97782012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9779
9780 PR gdb/13969
9781 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9782 e_machine field.
9783 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9784 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9785 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9786 compatible with process.
9787
c9a1864a
YQ
97882012-04-12 Yao Qi <yao@codesourcery.com>
9789
9790 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9791 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9792 (install-only, install-info, clean): Handle sub dir gnulib.
9793 (all-lib, am--refresh): New targets.
9794 (memmem.o): Remove target.
9795 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9796 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9797 (AC_REPLACE_FUNCS): Remove memmem.
9798 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9799 (AC_OUTPUT): Generate Makefile in gnulib/.
9800 * aclocal.m4, config.in, configure: Regenerated.
9801
367ba2c2
MR
98022012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9803
9804 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9805
9d236627
PA
98062012-04-05 Pedro Alves <palves@redhat.com>
9807
9808 -Werror=strict-aliasing
9809
9810 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9811 pointer.
9812
111217b3
PA
98132012-04-04 Pedro Alves <palves@redhat.com>
9814
9815 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9816 (sparc_store_gregset_from_stack, sparc_store_gregset)
9817 (sparc_breakpoint_at): Fix formatting.
9818
8365dcf5
TJB
98192012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9820
9821 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9822 are available.
9823 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9824 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9825 * config.in: Regenerate.
9826 * configure: Likewise.
9827
689cc2ae
PA
98282012-03-29 Pedro Alves <palves@redhat.com>
9829
9830 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9831 Correct ptrace arguments.
9832
c14dfd32
PA
98332012-03-28 Pedro Alves <palves@redhat.com>
9834
9835 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9836 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9837 (IA64_FR1_REGNUM): New defines.
9838 (ia64_fetch_register): New.
9839 (the_low_target): Install it.
9840 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9841 field.
9842 * linux-low.c (linux_fetch_registers): Try the
9843 the_low_target.fetch_register hook first.
9844
9845 * linux-arm-low.c (the_low_target): Adjust.
9846 * linux-bfin-low.c (the_low_target): Adjust.
9847 * linux-cris-low.c (the_low_target): Adjust.
9848 * linux-crisv32-low.c (the_low_target): Adjust.
9849 * linux-m32r-low.c (the_low_target): Adjust.
9850 * linux-m68k-low.c (the_low_target): Adjust.
9851 * linux-mips-low.c (the_low_target): Adjust.
9852 * linux-ppc-low.c (the_low_target): Adjust.
9853 * linux-s390-low.c (the_low_target): Adjust.
9854 * linux-sh-low.c (the_low_target): Adjust.
9855 * linux-sparc-low.c (the_low_target): Adjust.
9856 * linux-tic6x-low.c (the_low_target): Adjust.
9857 * linux-x86-low.c (the_low_target): Adjust.
9858 * linux-xtensa-low.c (the_low_target): Adjust.
9859
63c88e13
PA
98602012-03-26 Pedro Alves <palves@redhat.com>
9861
9862 * server.c (handle_qxfer_libraries): Don't bail early if
9863 the_target->qxfer_libraries_svr4 is not NULL.
9864
fb723180
PA
98652012-03-26 Pedro Alves <palves@redhat.com>
9866
9867 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9868
0afae3cf
PA
98692012-03-23 Pedro Alves <palves@redhat.com>
9870
9871 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9872 "library-list-svr4" element's start tag when the the DSO list is
9873 empty.
9874
485f1ee4
PA
98752012-03-23 Pedro Alves <palves@redhat.com>
9876
9877 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9878 a variable whose type size is the same as the inferior's pointer
9879 size.
9880
a5362b9a
TS
98812012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9882
9883 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9884 struct siginfo.
9885 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9886 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9887 * linux-low.h: Include <signal.h>.
9888 (struct siginfo): Remove forward declaration.
9889 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9890 struct siginfo.
9891
d226c142
MF
98922012-03-21 Mike Frysinger <vapier@gentoo.org>
9893
9894 * .gitignore: Ignore more files.
9895
122f36ef
PA
98962012-03-19 Pedro Alves <palves@redhat.com>
9897 Jan Kratochvil <jan.kratochvil@redhat.com>
9898
9899 * server.c (cont_thread, general_thread): Add describing comments.
9900 (start_inferior): Clear `cont_thread'.
9901 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9902 of a process.
9903
fc3e5175
YQ
99042012-03-15 Yao Qi <yao@codesourcery.com>
9905
9906 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9907 handling to ...
9908 (cmd_qtdp): ... here.
9909
8d0d92cd
YQ
99102012-03-15 Yao Qi <yao@codesourcery.com>
9911
9912 * tracepoint.c (struct tracepoint_action_ops): New.
9913 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9914 (m_tracepoint_action_download): New.
9915 (r_tracepoint_action_download): New.
9916 (x_tracepoint_action_download): New.
9917 (l_tracepoint_action_download): New.
9918 (add_tracepoint_action): Install `action->ops' according type.
9919 (download_tracepoint_1): Move code `download' function pointer
9920 of various tracepoint_action_ops.
9921
87b0bb13
JK
99222012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9923
9924 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9925 linux_ptrace_attach_warnings.
9926
5f572dec
JK
99272012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9928
9929 * Makefile.in (linux-ptrace.o): New.
9930 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9931 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9932 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9933 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9934 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9935 of these targets.
9936 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9937
f4647387
YQ
99382012-03-08 Yao Qi <yao@codesourcery.com>
9939 Pedro Alves <palves@redhat.com>
9940
9941 Fix PR server/13392.
9942 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9943 offset of JMP insn.
9944 * tracepoint.c (remove_tracepoint): New.
9945 (cmd_qtdp): Call remove_tracepoint when failed to install.
9946
9b224c5e
PA
99472012-03-07 Pedro Alves <palves@redhat.com>
9948
9949 * linux-low.c (get_detach_signal): New.
9950 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9951 Pass on pending signals to PTRACE_DETACH. Check the result of the
9952 ptrace call.
9953 * server.c (program_signals, program_signals_p): New.
9954 (handle_general_set): Handle QProgramSignals.
9955 * server.h (program_signals, program_signals_p): Declare.
9956
e237a7e2
JK
99572012-03-05 Pedro Alves <palves@redhat.com>
9958 Jan Kratochvil <jan.kratochvil@redhat.com>
9959
9960 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9961 New comment why.
9962
5808517f
YQ
99632012-03-03 Yao Qi <yao@codesourcery.com>
9964
9965 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9966 agent_look_up_symbols.
9967
58b4daa5
YQ
99682012-03-03 Yao Qi <yao@codesourcery.com>
9969
9970 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9971 (linux-x86-low.o): Likewise.
9972 * server.h: Remove in_process_agent_loaded.
9973 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9974 common/agent.c.
9975 Update callers.
9976
8ffcbaaf
YQ
99772012-03-03 Yao Qi <yao@codesourcery.com>
9978
9979 * tracepoint.c (gdb_agent_capability): New global.
9980 (in_process_agent_loaded_ust): Renamed to
9981 `in_process_agent_supports_ust'.
9982 Update callers.
9983 (in_process_agent_supports_ust): Call agent_capability_check.
9984 (clear_installed_tracepoints): Assert that agent supports
9985 agent.
9986
d1feda86
YQ
99872012-03-03 Yao Qi <yao@codesourcery.com>
9988
9989 * linux-low.c (linux_supports_agent): New.
9990 (linux_target_ops): Initialize field `supports_agent' with
9991 linux_supports_agent.
9992 * target.h (struct target_ops) <supports_agent>: New.
9993 (target_supports_agent): New macro.
9994 * server.c (handle_general_set): Handle packet 'QAgent'.
9995 (handle_query): Send `QAgent+'.
9996 * Makefile.in (server.o): Depends on agent.h.
9997
2fa291ac
YQ
99982012-03-03 Yao Qi <yao@codesourcery.com>
9999
10000 * Makefile.in (OBS): Add agent.o.
10001 Add new rule for agent.o.
10002 Track dependence of tracepoint.c on agent.h.
10003 * tracepoint.c (run_inferior_command_1):
10004 (run_inferior_command): Call agent_run_command.
10005 (gdb_ust_connect_sync_socket): Deleted. Move it to
10006 common/agent.c.
10007 (resume_thread, stop_thread): Likewise.
10008 (gdb_ust_socket_init): Renamed to ...
10009 (gdb_agent_socket_init): ... New.
10010 (gdb_ust_thread): Renamed to ...
10011 (gdb_agent_helper_thread): ... New.
10012 (gdb_ust_init): Move some code to ...
10013 (gdb_agent_init): ... here. New.
10014 [HAVE_UST]: Call gdb_ust_init.
10015 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10016 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10017 * config.in, configure: Regenerated.
10018
05044653
PA
100192012-03-02 Pedro Alves <palves@redhat.com>
10020
10021 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10022 * linux-low.c (struct simple_pid_list): New.
10023 (stopped_pids): New a struct simple_pid_list pointer.
10024 (add_to_pid_list, pull_pid_from_list): New.
10025 (handle_extended_wait): Don't assume the first signal new children
10026 report is SIGSTOP. Adjust call to pull_pid_from_list.
10027 (linux_wait_for_lwp): Adjust.
10028
8d00225b
YQ
100292012-03-02 Yao Qi <yao@codesourcery.com>
10030
10031 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10032 debug log.
10033
19560ba5
YQ
100342012-03-02 Yao Qi <yao@codesourcery.com>
10035
10036 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10037 `stop_pc' and `tpoint'. Update caller.
10038
1faeff08
MR
100392012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10040
10041 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10042 * linux-low.c (use_linux_regsets): New macro.
10043 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10044 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10045 (linux_register_in_regsets): New function.
10046 (usr_fetch_inferior_registers): Skip registers covered by
10047 regsets.
10048 (usr_store_inferior_registers): Likewise.
10049 (usr_fetch_inferior_registers): New macro.
10050 (usr_store_inferior_registers): Likewise.
10051 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10052 (linux_store_registers): Likewise.
10053 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10054 prototype.
10055 (init_registers_mips64_dsp_linux): Likewise.
10056 (init_registers_mips_linux): New macro.
10057 (init_registers_mips_dsp_linux): Likewise.
10058 (mips_dsp_num_regs): Likewise.
10059 (DSP_BASE, DSP_CONTROL): New fallback macros.
10060 (mips_base_regs): New macro.
10061 (mips_regmap): Use it. Fix the size.
10062 (mips_dsp_regmap): New variable.
10063 (mips_dsp_regset_bitmap): Likewise.
10064 (mips_arch_setup): New function.
10065 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10066 than mips_regmap.
10067 (mips_cannot_store_register): Likewise.
10068 (the_low_target): Update .arch_setup, .num_regs and .regmap
10069 initializers. Add .regset_bitmap initializer.
10070 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10071 initializer.
10072 * linux-bfin-low.c (the_low_target): Likewise.
10073 * linux-cris-low.c (the_low_target): Likewise.
10074 * linux-crisv32-low.c (the_low_target): Likewise.
10075 * linux-ia64-low.c (the_low_target): Likewise.
10076 * linux-m32r-low.c (the_low_target): Likewise.
10077 * linux-m68k-low.c (the_low_target): Likewise.
10078 * linux-ppc-low.c (the_low_target): Likewise.
10079 * linux-s390-low.c (the_low_target): Likewise.
10080 * linux-sh-low.c (the_low_target): Likewise.
10081 * linux-sparc-low.c (the_low_target): Likewise.
10082 * linux-tic6x-low.c (the_low_target): Likewise.
10083 * linux-x86-low.c (the_low_target): Likewise.
10084 * linux-xtensa-low.c (the_low_target): Likewise.
10085 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10086 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10087 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10088 srv_xmlfiles.
10089 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10090 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10091
c03e6ccc
YQ
100922012-02-29 Yao Qi <yao@codesourcery.com>
10093 Pedro Alves <palves@redhat.com>
10094
10095 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10096 `step_over_finished' is true.
10097
644cebc9
PA
100982012-02-27 Pedro Alves <palves@redhat.com>
10099
10100 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10101 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10102
c14d7ab2
PA
101032012-02-27 Pedro Alves <palves@redhat.com>
10104
10105 PR server/9684
10106 * linux-low.c (pid_is_stopped): New.
10107 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10108
412c89dd
LM
101092012-02-25 Luis Machado <lgustavo@codesourcery.com>
10110
10111 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10112 of conditions.
10113
b745defe
MR
101142012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10115
10116 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10117
9f3a5c85
LM
101182012-02-24 Luis Machado <lgustavo@codesourcery>
10119
10120 * server.c (handle_query): Advertise support for target-side
10121 breakpoint condition evaluation.
10122 (process_point_options): New function.
10123 (process_serial_event): When inserting a breakpoint, check for
10124 a target-side condition that should be evaluated.
10125
10126 * mem-break.c: Include regcache.h and ax.h.
10127 (point_cond_list_t): New data structure.
10128 (breakpoint) <cond_list>: New field.
10129 (find_gdb_breakpoint_at): Make non-static.
10130 (delete_gdb_breakpoint_at): Clear any target-side
10131 conditions.
10132 (clear_gdb_breakpoint_conditions): New function.
10133 (add_condition_to_breakpoint): Likewise.
10134 (add_breakpoint_condition): Likewise.
10135 (gdb_condition_true_at_breakpoint): Likewise.
10136 (gdb_breakpoint_here): Return result directly instead
10137 of going through a local variable.
10138
10139 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10140 (clear_gdb_breakpoint_conditions): Likewise.
10141 (add_breakpoint_condition): Likewise.
10142 (gdb_condition_true_at_breakpoint): Likewise.
10143
10144 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10145 (need_step_over_p): Take target-side breakpoint condition into
10146 consideration.
10147
5e1dc496
LM
101482012-02-24 Luis Machado <lgustavo@codesourcery>
10149
10150 * server.h: Include tracepoint.h.
10151 (agent_mem_read, agent_get_trace_state_variable_value,
10152 agent_set_trace_state_variable_value,
10153 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10154 get_set_tsv_func_addr): New prototypes.
10155
10156 * ax.h: New include file.
10157 * ax.c: New source file.
10158
10159 * tracepoint.c: Include ax.h.
10160 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10161 agent_expr, eval_result_type): Move to ax.h.
10162 (parse_agent_expr): Rename to ...
10163 (gdb_parse_agent_expr): ... this, make it non-static and move
10164 to ax.h.
10165 (unparse_agent_expr) Rename to ...
10166 (gdb_unparse_agent_expr): ... this, make it non-static and move
10167 to ax.h.
10168 (eval_agent_expr): Rename to ...
10169 (eval_tracepoint_agent_expr): ... this.
10170 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10171 forward declarations.
10172 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10173 (agent_get_trace_state_variable_value): New function.
10174 (agent_set_trace_state_variable_value): New function.
10175 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10176 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10177 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10178 (condition_true_at_tracepoint): Likewise.
10179 (parse_agent_expr): Rename to ...
10180 (gdb_parse_agent_expr): ... this and move to ax.c.
10181 (unparse_agent_expr): Rename to ...
10182 (gdb_unparse_agent_expr): ... this and move to ax.c.
10183 (gdb_agent_op_name): Move to ax.c.
10184 (eval_agent_expr): Rename to ...
10185 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10186 and move to ax.c.
10187 (eval_tracepoint_agent_expr): New function.
10188 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10189 non-static.
5e1dc496
LM
10190 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10191 ax.c.
10192 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10193 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10194 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10195 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10196 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10197 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10198 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10199 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10200 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10201 (compile_bytecodes): Remove forward declaration.
10202 (is_goto_target): Move to ax.c.
10203 (compile_bytecodes): Move to ax.c and call
10204 agent_get_trace_state_variable_value (...) and
10205 agent_set_trace_state_variable_value (...).
10206
10207 * Makefile.in: Update ax.c and IPA dependencies.
10208
277e4e52
PA
102092012-02-24 Pedro Alves <palves@redhat.com>
10210
10211 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10212 (cmd_bigqtbuffer_circular): ... this. Only handle
10213 'QTBuffer:circular:'.
10214 (handle_tracepoint_general_set): Adjust.
10215
bf4c19f7
YQ
102162012-02-16 Yao Qi <yao@codesourcery.com>
10217
10218 * inferiors.c: Move code to ...
10219 * dll.c: .... here. New.
10220 * server.h: Declare clear_dlls.
10221 * Makefile.in (SFILES): Add dll.c.
10222 (OBS): Add dll.o
10223 (dll.o): New rule.
10224
d73f2619
YQ
102252012-02-11 Yao Qi <yao@codesourcery.com>
10226
10227 * server.c: (handle_monitor_command): Add a new parameter
10228 `own_buf'.
10229 (handle_query): Update caller.
10230
f8255c2a
JB
102312012-02-09 Joel Brobecker <brobecker@adacore.com>
10232
10233 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10234 * configure, config.in: Regenerate.
10235 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10236 is not defined.
10237
da84f473
PA
102382012-02-02 Pedro Alves <palves@redhat.com>
10239
10240 Try SIGKILL first, then PTRACE_KILL.
10241 * linux-low.c (linux_kill_one_lwp): New.
10242 (linux_kill_one_lwp): Rename to ...
10243 (kill_one_lwp_callback): ... this. Use the new
10244 linux_kill_one_lwp.
10245
e886a173
PA
102462012-02-02 Pedro Alves <palves@redhat.com>
10247
10248 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10249 inferior.
10250
be07f1a2
PA
102512012-01-27 Pedro Alves <palves@redhat.com>
10252
10253 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10254 (elf_64_file_p): Make static.
10255 (linux_pid_exe_is_elf_64_file): New.
10256 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10257 Delete declarations.
10258 (linux_pid_exe_is_elf_64_file): Declare.
10259 * linux-x86-low.c (x86_arch_setup): Use
10260 linux_pid_exe_is_elf_64_file.
10261
d8301ad1
JK
102622012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10263
10264 * linux-low.c (linux_wait_for_event_1): Rename to ...
10265 (linux_wait_for_event): ... here and merge it with former
10266 linux_wait_for_event - new variable wait_ptid, use it.
10267 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10268
01b17894
PA
102692012-01-23 Pedro Alves <palves@redhat.com>
10270
10271 * server.c (main): Avoid yet another case of infinite loop while
10272 detaching/killing after a longjmp.
10273
e825046f
JK
102742012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10275
10276 Code cleanup.
10277 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10278
b9e7b9c3
UW
102792012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10280
10281 * hostio.c (handle_readlink): New function.
10282 (handle_vFile): Call it to handle "vFile:readlink" packets.
10283
901f9912
UW
102842012-01-20 Pedro Alves <palves@redhat.com>
10285 Ulrich Weigand <ulrich.weigand@linaro.org>
10286
10287 * server.c (handle_v_requests): Only support vAttach and vRun to
10288 start multiple processes when in extended protocol mode.
10289
fc1ab1a0
PA
102902012-01-17 Pedro Alves <palves@redhat.com>
10291
10292 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10293 memalign plus mprotect to allocate the scratch buffer.
10294
7d5d4e98
PA
102952012-01-13 Pedro Alves <palves@redhat.com>
10296
10297 * server.c (attach_inferior): Clear `cont_thread'.
10298
f128d5e9
PA
102992012-01-13 Pedro Alves <palves@redhat.com>
10300
10301 * server.c (main): Avoid infinite loop while detaching/killing
10302 after a longjmp.
10303
06db92f0
DE
103042012-01-09 Doug Evans <dje@google.com>
10305
10306 * server.c (start_inferior): Set last_ptid in --wrapper case.
10307
32d92999
YQ
103082012-01-06 Yao Qi <yao@codesourcery.com>
10309
10310 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10311 defined.
10312 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10313
5e0a92a9
YQ
103142012-01-04 Yao Qi <yao@codesourcery.com>
10315
10316 * tracepoint.c (cmd_qtdp): Print debug message
10317 for static tracepoint.
10318
ae639e8c
YQ
103192012-01-04 Yao Qi <yao@codesourcery.com>
10320
10321 * tracepoint.c (trace_vdebug): Differentiate debug message
10322 between gdbserver and IPA.
10323
f72429c5
YQ
103242012-01-03 Yao Qi <yao@codesourcery.com>
10325
10326 * tracepoint.c (tracepoint_was_hit): Don't collect for
10327 static tracepoint.
10328
12c3e59c
JB
103292012-01-02 Joel Brobecker <brobecker@adacore.com>
10330
10331 * terminal.h: Reformat copyright header.
10332
67827812
JB
103332012-01-02 Joel Brobecker <brobecker@adacore.com>
10334
10335 * server.c (gdbserver_version): Update copyright year.
10336 * gdbreplay.c (gdbreplay_version): Likewise.
10337
3e52c33d
JK
103382011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10339
10340 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10341
10342 Revert:
10343 2011-12-18 Hui Zhu <teawater@gmail.com>
10344 * linux-low.c (linux_create_inferior): Save return value to ret.
10345
66f1260e
HZ
103462011-12-18 Hui Zhu <teawater@gmail.com>
10347
10348 * linux-low.c (linux_create_inferior): Save return value to ret.
10349
e77616d7
DE
103502011-12-16 Doug Evans <dje@google.com>
10351
e7b06c57
DE
10352 * linux-low.c (linux_create_inferior): If stdio connection,
10353 redirect stdin from /dev/null, stdout to stderr.
10354 * remote-utils.c (remote_is_stdio): New static global.
10355 (remote_connection_is_stdio): New function.
10356 (remote_prepare): Handle stdio connection.
10357 (remote_open): Ditto.
10358 (remote_close): Don't close stdin for stdio connections.
10359 (read_prim,write_prim): New functions. Replace all calls to
10360 read/write to these.
10361 * server.c (main): Watch for "-" argument. Move call to
10362 remote_prepare before start_inferior.
10363 * server.h (STDIO_CONNECTION_NAME): New macro.
10364 (remote_connection_is_stdio): Declare.
10365
e77616d7
DE
10366 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10367 in debugging output.
10368
82067193
YQ
103692011-12-15 Yao Qi <yao@codesourcery.com>
10370
10371 * tracepoint.c: Include sys/syscall.h.
10372 (gdb_ust_thread): Remove preprocessor conditional.
10373
82bfbe7e
PA
103742011-12-14 Pedro Alves <pedro@codesourcery.com>
10375
10376 * linux-low.c (linux_detach_one_lwp): Call
10377 the_low_target.prepare_to_resume before detaching.
10378
712c6575
YQ
103792011-12-14 Yao Qi <yao@codesourcery.com>
10380
10381 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10382 of write.
10383
d54d1edf
YQ
103842011-12-14 Yao Qi <yao@codesourcery.com>
10385
10386 * i386-low.c (i386_low_stopped_data_address): Initialize local
10387 variable `control'.
10388
6210a125
PA
103892011-12-13 Pedro Alves <pedro@codesourcery.com>
10390
10391 PR remote/13492
10392
10393 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10394 DR_CONTROL unless necessary. Extend comments.
10395 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10396 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10397
2ece8244
YQ
103982011-12-13 Yao Qi <yao@codesourcery.com>
10399
10400 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10401 macros.
10402 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10403
784867a5
JK
104042011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10405
10406 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10407 Print new debug message for such case.
10408
6bf36717
JK
104092011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10410
10411 Fix overlapping memcpy.
10412 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10413 the read_inferior_memory transfer.
10414 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10415 write_inferior_memory transfer.
10416 (set_fast_tracepoint_jump): New variable buf. Use it for the
10417 read_inferior_memory and write_inferior_memory transfers.
10418 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10419 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10420 Use it for the write_inferior_memory transfer.
10421 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10422 buffers.
10423
50275556
MR
104242011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10425
10426 * linux-low.c (fetch_register, store_register): Make code
10427 consistent, fix formatting.
10428
7325beb4
MR
104292011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10430
10431 * linux-low.c (usr_store_inferior_registers): Factor out code
10432 to handle individual registers into...
10433 (store_register): ... this new function.
10434
c642a434
UW
104352011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10436
10437 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10438 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10439 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10440 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10441 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10442 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10443 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10444 (srv_xmlfiles): Add new XML files.
10445
10446 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10447 and <sys/uio.h>.
10448 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10449 (init_registers_s390_linux32v1): Add prototype.
10450 (init_registers_s390_linux32v2): Likewise.
10451 (init_registers_s390_linux64v1): Likewise.
10452 (init_registers_s390_linux64v2): Likewise.
10453 (init_registers_s390x_linux64v1): Likewise.
10454 (init_registers_s390x_linux64v2): Likewise.
10455 (s390_num_regs): Increment to 52.
10456 (s390_regmap): Add orig_r2 register.
10457 (s390_num_regs_3264): Increment to 68.
10458 (s390_regmap_3264): Add orig_r2 register.
10459 (s390_collect_ptrace_register): Handle orig_r2 register.
10460 (s390_supply_ptrace_register): Likewise.
10461 (s390_fill_last_break): New function.
10462 (s390_store_last_break): Likewise.
10463 (s390_fill_system_call): New function.
10464 (s390_store_system_call): Likewise.
10465 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10466 register sets.
10467 (s390_check_regset): New function.
10468 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10469 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10470 Update target_regsets for available register sets.
10471
2268b414
JK
104722011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10473 Jan Kratochvil <jan.kratochvil@redhat.com>
10474
10475 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10476 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10477 New.
10478 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10479 * linux-low.h (struct process_info_private): New member r_debug.
10480 * server.c (handle_qxfer_libraries): Call
10481 the_target->qxfer_libraries_svr4.
10482 (handle_qxfer_libraries_svr4): New function.
10483 (qxfer_packets): New entry "libraries-svr4".
10484 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10485 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10486 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10487 PACKET_qXfer_libraries_svr4.
10488
d6db1fab
UW
104892011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10490
10491 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10492 PSW address/mask between 8-byte and 16-byte formats.
10493 (s390_supply_ptrace_register): Likewise.
10494 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10495 basic addressing mode bit.
10496
242f5f1c
SS
104972011-11-24 Stan Shebs <stan@codesourcery.com>
10498
10499 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10500
f196051f
SS
105012011-11-17 Stan Shebs <stan@codesourcery.com>
10502
10503 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10504 (tracing_start_time): New global.
10505 (tracing_stop_time): New global.
10506 (tracing_user_name): New global.
10507 (tracing_notes): New global.
10508 (tracing_stop_note): New global.
10509 (cmd_qtstart): Set traceframe_usage, start_time.
10510 (stop_tracing): Set stop_time.
10511 (cmd_qtstatus): Report additional status.
10512 (cmd_qtp): New function.
10513 (handle_tracepoint_query): Call it.
10514 (cmd_qtnotes): New function.
10515 (handle_tracepoint_general_set): Call it.
10516 (get_timestamp): Rename from tsv_get_timestamp.
10517
405f8e94
SS
105182011-11-14 Stan Shebs <stan@codesourcery.com>
10519 Kwok Cheung Yeung <kcy@codesourcery.com>
10520
10521 * linux-x86-low.c (small_jump_insn): New.
10522 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10523 trampoline and error message, build a trampoline and issue a small
10524 jump instruction to it.
10525 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10526 trampoline and error message.
10527 (x86_get_min_fast_tracepoint_insn_len): New.
10528 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10529 * linux-low.h (struct linux_target_ops): Add arguments to
10530 install_fast_tracepoint_jump_pad operation, add new operation.
10531 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10532 arguments.
10533 (linux_get_min_fast_tracepoint_insn_len): New function.
10534 (linux_target_op): Add new operation.
10535 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10536 (gdb_trampoline_buffer_end): Ditto.
10537 (gdb_trampoline_buffer_error): Ditto.
10538 (struct ipa_sym_addresses): Add fields for new IPA variables.
10539 (symbol_list): Add entries for new IPA variables.
10540 (struct tracepoint): Add fields to hold the address range of the
10541 trampoline used by the tracepoint.
10542 (trampoline_buffer_head): New static variable.
10543 (trampoline_buffer_tail): Ditto.
10544 (claim_trampoline_space): New function.
10545 (have_fast_tracepoint_trampoline_buffer): New function.
10546 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10547 structure.
10548 (install_fast_tracepoint): Ditto, also add error buffer argument.
10549 (cmd_qtminftpilen): New function.
10550 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10551 (fast_tracepoint_from_trampoline_address): New function.
10552 (fast_tracepoint_collecting): Handle trampoline as part of jump
10553 pad space.
10554 (set_trampoline_buffer_space): New function.
10555 (initialize_tracepoint): Initialize new IPA variables.
10556 * target.h (struct target_ops): Add arguments to
10557 install_fast_tracepoint_jump_pad operation, add new
10558 get_min_fast_tracepoint_insn_len operation.
10559 (target_get_min_fast_tracepoint_insn_len): New.
10560 (install_fast_tracepoint_jump_pad): Add arguments.
10561 * server.h (IPA_BUFSIZ): Define.
10562 * linux-i386-ipa.c: Include extra header files.
10563 (initialize_fast_tracepoint_trampoline_buffer): New function.
10564 (initialize_low_tracepoint): Call it.
10565 * server.h (set_trampoline_buffer_space): Declare.
10566 (claim_trampoline_space): Ditto.
10567 (have_fast_tracepoint_trampoline_buffer): Ditto.
10568
1e4d1764
YQ
105692011-11-14 Yao Qi <yao@codesourcery.com>
10570
10571 * server.c (handle_query): Handle InstallInTrace for qSupported.
10572 * tracepoint.c (add_tracepoint): Sort list.
10573 (install_tracepoint, download_tracepoint): New.
10574 (cmd_qtdp): Call them to install and download tracepoints.
10575 (sort_tracepoints): Removed.
10576 (cmd_qtstart): Update.
10577
5c73ff4e
YQ
105782011-11-14 Yao Qi <yao@codesourcery.com>
10579
10580 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10581 * mem-break.h: Declare.
10582 * tracepoint.c (cmd_qtstart): Move some code to ...
10583 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10584 New.
10585 (download_tracepoints): Move some code to ...
10586 (download_tracepoint_1): ... here. New.
10587
86a30030
YQ
105882011-11-08 Yao Qi <yao@codesourcery.com>
10589
10590 * remote-utils.c (relocate_instruction): A comment fix.
10591
8d26e50c
JB
105922011-11-07 Joel Brobecker <brobecker@adacore.com>
10593
10594 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10595 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10596 dr_status_mirror and dr_control_mirror from debug_reg_state.
10597 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10598 (i386_initial_stuff): Remove use of deleted globals.
10599 (i386_get_thread_context, i386_set_thread_context,
10600 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10601 from debug_reg_state.
10602
a59306a3
YQ
106032011-11-05 Yao Qi <yao@codesourcery.com>
10604
10605 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10606 address as TPOINT's.
10607
3065dfb6
SS
106082011-11-02 Stan Shebs <stan@codesourcery.com>
10609
10610 * tracepoint.c (agent_mem_read_string): New function.
10611 (eval_agent_expr): Call it for tracenz.
10612 * server.c (handle_query): Report support for tracenz.
10613
fd0d8c7c
YQ
106142011-11-02 Yao Qi <yao@codesourcery.com>
10615
10616 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10617
609086b1
YQ
106182011-11-02 Yao Qi <yao@codesourcery.com>
10619
10620 * target.h: Fix a typo in comment.
10621
b9fd1791
PA
106222011-10-31 Pedro Alves <pedro@codesourcery.com>
10623
10624 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10625 clobber the breakpoints' shadows with fast tracepoint jumps.
10626 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10627 * target.c (write_inferior_memory): Also pass MYADDR down to
10628 check_mem_write.
10629
03583c20
UW
106302011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10631
10632 * configure.ac: Check support for personality routine.
10633 * configure: Regenerate.
10634 * config.in: Likewise.
10635 * linux-low.c: Include <sys/personality.h>.
10636 Define ADDR_NO_RANDOMIZE if necessary.
10637 (linux_create_inferior): Disable address space randomization when
10638 forking inferior, if requested.
10639 (linux_supports_disable_randomization): New function.
10640 (linux_target_ops): Install it.
10641 * server.h (disable_randomization): Declare.
10642 * server.c (disable_randomization): New global variable.
10643 (handle_general_set): Handle QDisableRandomization.
10644 (handle_query): Likewise for qSupported.
10645 (main): Support --disable-randomization and --no-disable-randomization
10646 command line arguments.
10647 * target.h (struct target_ops): Add supports_disable_randomization.
10648 (target_supports_disable_randomization): New macro.
10649
723b724b
MF
106502011-09-29 Mike Frysinger <vapier@gentoo.org>
10651
10652 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10653 ifdef check.
10654 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10655 [!PT_GETDSBT] (target_loadmap): New definition.
10656 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10657 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10658 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10659 and PT_GETDSBT to LINUX_LOADMAP.
10660 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10661 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10662
55329a5c 106632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10664
10665 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10666 (arm_linux_hwbp_cap): New static variable.
10667 (arm_linux_get_hwbp_cap): Replace by ...
10668 (arm_linux_init_hwbp_cap): ... this new function.
10669 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10670 (arm_linux_get_hw_watchpoint_count): Likewise.
10671 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10672 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10673 (arm_prepare_to_resume): Use perror_with_name instead of error.
10674
55329a5c 106752011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10676
10677 * linux-arm-low.c: Include <signal.h>.
10678 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10679 (struct arm_linux_hwbp_cap): New data type.
10680 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10681 (struct arm_linux_hw_breakpoint): New data type.
10682 (MAX_BPTS, MAX_WPTS): Define.
10683 (struct arch_process_info, struct arch_lwp_info): New data types.
10684 (arm_linux_get_hwbp_cap): New function.
10685 (arm_linux_get_hw_breakpoint_count): Likewise.
10686 (arm_linux_get_hw_watchpoint_count): Likewise.
10687 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10688 (arm_hwbp_control_initialize): Likewise.
10689 (arm_hwbp_control_is_enabled): Likewise.
10690 (arm_hwbp_control_is_initialized): Likewise.
10691 (arm_hwbp_control_disable): Likewise.
10692 (arm_linux_hw_breakpoint_equal): Likewise.
10693 (arm_linux_hw_point_initialize): Likewise.
10694 (struct update_registers_data): New data structure.
10695 (update_registers_callback: New function.
10696 (arm_insert_point): Likewise.
10697 (arm_remove_point): Likewise.
10698 (arm_stopped_by_watchpoint): Likewise.
10699 (arm_stopped_data_address): Likewise.
10700 (arm_new_process): Likewise.
10701 (arm_new_thread): Likewise.
10702 (arm_prepare_to_resume): Likewise.
10703 (the_low_target): Register arm_insert_point, arm_remove_point,
10704 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10705 arm_new_thread, and arm_prepare_to_resume.
10706
6b9801d4
SS
107072011-09-15 Stan Shebs <stan@codesourcery.com>
10708
10709 * server.h (struct emit_ops): Add compare-goto fields.
10710 * tracepoint.c (gdb_agent_op_sizes): New table.
10711 (emit_eq_goto): New function.
10712 (emit_ne_goto): New function.
10713 (emit_lt_goto): New function.
10714 (emit_le_goto): New function.
10715 (emit_gt_goto): New function.
10716 (emit_ge_goto): New function.
10717 (is_goto_target): New function.
10718 (compile_bytecodes): Recognize special cases of compare-goto
10719 combinations and call specialized emitters for them.
10720 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10721 (amd64_emit_ne_goto): New function.
10722 (amd64_emit_lt_goto): New function.
10723 (amd64_emit_le_goto): New function.
10724 (amd64_emit_gt_goto): New function.
10725 (amd64_emit_ge_goto): New function.
10726 (amd64_emit_ops): Add the new functions.
10727 (i386_emit_eq_goto): New function.
10728 (i386_emit_ne_goto): New function.
10729 (i386_emit_lt_goto): New function.
10730 (i386_emit_le_goto): New function.
10731 (i386_emit_gt_goto): New function.
10732 (i386_emit_ge_goto): New function.
10733 (i386_emit_ops): Add the new functions.
10734
bf15cbda
SS
107352011-09-08 Stan Shebs <stan@codesourcery.com>
10736
10737 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10738 (i386_emit_epilogue): Restore %ebx.
10739
943ca1dd
JZ
107402011-08-31 Jie Zhang <jzhang918@gmail.com>
10741
10742 * server.c (step_thread): Remove definition.
10743 (process_serial_event): Don't handle Hs.
10744 * server.h (step_thread): Remove declaration.
10745 * target.c (set_desired_inferior): Remove use of step_thread.
10746
e3deef73
LM
107472011-08-24 Luis Machado <lgustavo@codesourcery.com>
10748
10749 * linux-low.c: Include linux-procfs.h.
10750 (linux_attach_lwp_1): Update comments.
10751 (linux_attach): Scan for existing threads when attaching to a
10752 process that is the tgid.
10753 * Makefile.in: Update dependencies.
10754
13da1c97
LM
107552011-08-24 Luis Machado <lgustavo@codesourcery.com>
10756
10757 * configure.srv: Add linux-procfs.o dependencies.
10758
881127c9
YQ
107592011-08-14 Yao Qi <yao@codesourcery.com>
10760
10761 * target.h (struct target_ops): Fix indent.
10762 * win32-low.c (win32_target_ops): Fix comment.
10763
58dbd541
YQ
107642011-08-14 Andrew Jenner <andrew@codesourcery.com>
10765 Yao Qi <yao@codesourcery.com>
10766
10767 * Makefile.in (clean): Remove tic6x-*.c files.
10768 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10769 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10770 (tic6x-c64xp-linux.c): Likewise.
10771 * configure.srv: Add support for tic6x-*-uclinux.
10772 * linux-tic6x-low.c: New.
10773 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10774
78d85199
YQ
107752011-08-14 Andrew Stubbs <ams@codesourcery.com>
10776 Yao Qi <yao@codesourcery.com>
10777
10778 * target.h (struct target_ops): Add read_loadmap.
10779 * linux-low.c (struct target_loadseg): New type.
10780 (struct target_loadmap): New type.
10781 (linux_read_loadmap): New function.
10782 (linux_target_ops): Add linux_read_loadmap.
10783 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10784 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10785 to NULL.
78d85199 10786
a959a88d
EZ
107872011-08-05 Eli Zaretskii <eliz@gnu.org>
10788
10789 * win32-low.c: Include <stdint.h>.
10790
1ced966e
PA
107912011-07-22 Pedro Alves <pedro@codesourcery.com>
10792
10793 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10794 to the inferior here.
10795 (i386_remove_aligned_watchpoint): Ditto.
10796 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10797 fit part of the watchpoint in the debug registers.
10798 (i386_update_inferior_debug_regs): New.
10799 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10800 registers, and only update the inferior on success.
10801 (i386_low_remove_watchpoint): Ditto.
10802
d26e3629
KY
108032011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10804
10805 * linux-low.c (compare_ints, unique, list_threads, show_process,
10806 linux_core_of_thread): Delete.
10807 (linux_target_ops): Change linux_core_of_thread to
10808 linux_common_core_of_thread.
10809 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10810 * utils.c (malloc_failure): Change type of argument.
10811 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10812 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10813 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10814 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10815 (IPA_OBJS): Add common-utils-ipa.o.
10816 (ptid_h, linux_osdata_h): New macros.
10817 (server_h): Add common/common-utils.h, common/xml-utils.h,
10818 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10819 common/ptid.h.
10820 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10821 ptid.o, buffer.o): New rules.
10822 (linux-low.o): Add common/linux-osdata.h as a dependency.
10823 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10824 * configure.ac: Add AC_HEADER_DIRENT check.
10825 * config.in: Regenerate.
10826 * configure: Regenerate.
10827 * remote-utils.c (xml_escape_text): Delete.
10828 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10829 buffer_xml_printf): Move to common/buffer.c.
10830 * server.c (main): Remove call to initialize_inferiors.
10831 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10832 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10833 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10834 internal_error, gdb_assert, gdb_assert_fail): Delete.
10835 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10836 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10837 common/buffer.h.
10838 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10839 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10840 initialize_inferiors): Delete.
10841
2275a1a7
PA
108422011-07-20 Pedro Alves <pedro@codesourcery.com>
10843
10844 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10845 symbol error.
10846
0a5b1e09
PA
108472011-05-31 Pedro Alves <pedro@codesourcery.com>
10848
10849 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10850 assertion.
10851 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10852
6938fd34
YQ
108532011-05-26 Yao Qi <yao@codesourcery.com>
10854
10855 * Makefile.in (thread-db.o): Track dependence to
10856 common/gdb_thread_db.h.
10857 * thread-db.c: include gdb_thread_db.h from right place.
10858
b481f9e0
TT
108592011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10860
10861 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10862 __FILE__ and __LINE__ to internal_error.
10863
98a5dd13
DE
108642011-05-13 Doug Evans <dje@google.com>
10865
10866 * thread-db.c (try_thread_db_load_from_sdir): New function.
10867 (try_thread_db_load_from_dir): New function.
10868 (thread_db_load_search): Handle $sdir, ignore $pdir.
10869 Remove trying of system directories if search of
10870 libthread-db-search-path fails, that is now done via $sdir.
10871
d248b706
KY
108722011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10873
10874 * server.c (handle_query): Add EnableDisableTracepoints to the list
10875 of supported features.
43aaf8b6 10876 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10877 tracepoints.
43aaf8b6
PA
10878 (cmd_qtenable_disable): New.
10879 (cmd_qtstart): Install tracepoints even if disabled.
10880 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10881 receiving a QTEnable or QTDisable packet.
10882 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10883 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10884 tracepoints.
10885 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10886
84e578fb
DE
108872011-05-10 Doug Evans <dje@google.com>
10888
10889 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10890
71f55dd8
DE
108912011-05-04 Doug Evans <dje@google.com>
10892
10893 * linux-low.c (linux_join): Skip process lookup.
10894 * spu-low.c (spu_join): Ditto.
10895 * server.c (join_inferiors_callback): Delete.
10896 (process_serial_event): For 'D' packet (detach) call join_inferior
10897 directly.
10898
4d393d60
JM
108992011-05-04 Joseph Myers <joseph@codesourcery.com>
10900
10901 * README: Don't mention xscale*-*-linux*.
10902 * configure.srv (xscale*-*-linux*): Don't handle target.
10903
b00ad6ff
NF
109042011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10905
10906 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10907 casting pointers.
10908 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10909 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10910 (i386_emit_void_call_2): Likewise.
10911
af96c192
YQ
109122011-04-26 Yao Qi <yao@codesourcery.com>
10913
43aaf8b6
PA
10914 * linux-low.c: Move common macros to linux-ptrace.h.
10915 Include linux-ptrace.h.
af96c192
YQ
10916 * Makefile.in (linux_ptrace_h): New.
10917 (linux-low.o): Depends on linux-ptrace.h.
10918
03f2bd59
JK
109192011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10920
10921 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10922 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10923 (remote_prepare): New function with most of the TCP code from ...
10924 (remote_open): ... here. Detect PORT here unconditionally. Move also
10925 setting transport_is_reliable.
10926 * server.c (run_once): New variable.
10927 (gdbserver_usage): Document it.
10928 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10929 the first run if RUN_ONCE.
10930 * server.h (run_once, remote_prepare): New declarations.
10931
7a9dd1b2
TT
109322011-04-19 Tom Tromey <tromey@redhat.com>
10933
10934 * win32-low.c (handle_load_dll): Remove duplicate "the".
10935
81239425
PM
109362011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10937
10938 Remove support for old Cygwin 1.5 versions.
10939 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10940 function to avoid warning.
10941 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10942 warning.
10943
9e0627f1
PM
109442011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10945
10946 * gdbserver/server.h (Macro _): Define it if not available.
10947
588eebee
MS
109482011-03-14 Michael Snyder <msnyder@vmware.com>
10949
348af9f7 10950 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10951
43f70d4c
JB
109522011-03-10 Joel Brobecker <brobecker@adacore.com>
10953
10954 * Makefile.in (maintainer-clean realclean distclean): Remove
10955 "make ... subdir_do" command.
10956
348af9f7
MS
109572011-03-10 Michael Snyder <msnyder@vmware.com>
10958
10959 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10960
10961 * server.c (handle_v_run): Free alloced buffer on early return.
10962
e637a4f5
YQ
109632011-03-09 Yao Qi <yao@codesourcery.com>
10964
10965 Revert:
10966 2011-03-04 Yao Qi <yao@codesourcery.com>
10967
10968 * Makefile.in: Remove GNU make feature --directory.
10969
10970 2011-03-05 Yao Qi <yao@codesourcery.com>
10971
10972 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10973 (subdir_do): New make target. Copied from gdb/Makefile.
10974 (maintainer-clean, realclean, distclean, clean): Call corresponding
10975 make targets in common/Makefile.
10976
10977 2011-02-11 Yao Qi <yao@codesourcery.com>
10978
10979 * configure.ac: Call AC_PROG_RANLIB.
10980 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10981 * configure: Regenerate.
10982
e6edda56
JK
109832011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10984
10985 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10986
e5141119
JB
109872011-03-06 Yao Qi <yao@codesourcery.com>
10988
10989 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10990
64794aa4
JB
109912011-03-05 Yao Qi <yao@codesourcery.com>
10992
10993 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10994 (subdir_do): New make target. Copied from gdb/Makefile.
10995 (maintainer-clean, realclean, distclean, clean): Call corresponding
10996 make targets in common/Makefile.
10997
7a762829
YQ
109982011-03-04 Yao Qi <yao@codesourcery.com>
10999
11000 * Makefile.in: Remove GNU make feature --directory.
11001
348af9f7
MS
110022011-03-04 Michael Snyder <msnyder@vmware.com>
11003
11004 * server.c (queue_stop_reply): Call xmalloc not malloc.
11005
110062011-03-02 Michael Snyder <msnyder@vmware.com>
11007
11008 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11009
9f72fee2
MS
110102011-02-28 Michael Snyder <msnyder@vmware.com>
11011
588eebee
MS
11012 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11013 (cmd_qtframe): Ditto.
11014 (cmd_qtbuffer): Ditto.
11015 (cmd_bigqtbuffer): Ditto.
11016
9f72fee2
MS
11017 * utils.c (decimal2str): Initialize 'width' to nine, then
11018 don't mess with it.
11019
8040bd49
UW
110202011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11021
11022 * hostio.c (require_data): Free *data, not data.
11023
7e52cbd0
JK
110242011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11025
11026 * hostio.c (require_data): Use free, not xfree.
11027
9130f83e
MS
110282011-02-27 Michael Snyder <msnyder@vmware.com>
11029
4b812f4e
MS
11030 * server.c (handle_query): Discard unused value.
11031
9130f83e
MS
11032 * hostio.c (require_data): Free malloc memory before returning
11033 error.
11034
69d37113
MS
110352011-02-26 Michael Snyder <msnyder@vmware.com>
11036
11037 * linux-low.c (list_threads): Call closedir for dirent.
11038
35f5825a
MS
110392011-02-27 Michael Snyder <msnyder@vmware.com>
11040
2a589cef
MS
11041 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11042 a case statement falls through.
11043
0adea5f7
MS
11044 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11045
35f5825a
MS
11046 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11047 in comparison.
11048
238f1c74
MS
110492011-02-26 Michael Snyder <msnyder@vmware.com>
11050
11051 * utils.c (decimal2str): Eliminate dead code and dead param.
11052 (pulongest): Drop dead param from call to decimal2str.
11053 (plongest): Ditto.
11054
633ff500
JB
110552011-02-24 Joel Brobecker <brobecker@adacore.com>
11056
11057 Revert the following patch (not approved yet):
11058 2011-02-21 Hui Zhu <teawater@gmail.com>
11059 * tracepoint.c (tp_printf): New function.
11060 (eval_agent_expr): Handle gdb_agent_op_printf.
11061
f9c6ff72
HZ
110622011-02-21 Hui Zhu <teawater@gmail.com>
11063
11064 * tracepoint.c (tp_printf): New function.
11065 (eval_agent_expr): Handle gdb_agent_op_printf.
11066
94d5e490
TT
110672011-02-18 Tom Tromey <tromey@redhat.com>
11068
11069 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11070 (tracepoint.o): Likewise.
11071 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11072 (gdb_agent_op_names): Likewise.
11073
c7f96d2b
TT
110742011-02-18 Tom Tromey <tromey@redhat.com>
11075
11076 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11077 gdb_agent_op_rot>: New constants.
11078 (gdb_agent_op_names): Add pick and roll.
11079 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11080 cases.
11081
0feedb2c
JK
110822011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11083
11084 * aclocal.m4: Regenerated with aclocal-1.11.1.
11085
b3b9301e
PA
110862011-02-14 Pedro Alves <pedro@codesourcery.com>
11087
11088 * server.c (handle_qxfer_traceframe_info): New.
11089 (qxfer_packets): Register "traceframe-info".
11090 (handle_query): Report support for qXfer:traceframe-info:read+.
11091 * tracepoint.c (match_blocktype): New.
11092 (traceframe_find_block_type): Rename to ...
11093 (traceframe_walk_blocks): ... this. Add callback filter argument,
11094 and use it.
11095 (traceframe_find_block_type): New, reimplemented on top of
11096 traceframe_walk_blocks.
11097 (build_traceframe_info_xml): New.
11098 (traceframe_read_info): New.
11099 * server.h (traceframe_read_info): Declare.
11100
4f3e6fb7
YQ
111012011-02-11 Yao Qi <yao@codesourcery.com>
11102
11103 * configure.ac: Call AC_PROG_RANLIB.
11104 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11105 * configure: Regenerate.
11106
764880b7
PA
111072011-02-07 Pedro Alves <pedro@codesourcery.com>
11108
11109 * server.c (gdb_read_memory): Change return semantics to allow
11110 partial transfers.
11111 (handle_search_memory_1): Adjust.
11112 (process_serial_event) <'m' packet>: Handle partial transfers.
11113 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11114
1c79eb8a
PA
111152011-01-28 Pedro Alves <pedro@codesourcery.com>
11116
11117 * regcache.c (init_register_cache): Initialize
11118 regcache->register_status.
11119 (free_register_cache): Release regcache->register_status.
11120 (regcache_cpy): Copy register_status.
11121 (registers_to_string): Print 'x's for unavailable registers.
11122 (supply_register): Mark the register's status valid or
11123 unavailable, depending on whether a buffer was passed in or not.
11124 (supply_register_zeroed): New.
11125 (supply_regblock): Mark the registers' status valid or
11126 unavailable, depending on whether a buffer was passed in or not.
11127 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11128 (struct regcache): New `register_status' field.
11129 (supply_register_zeroed): Declare.
11130 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11131 supply_register_zeroed, rather than passing a NULL buffer to
11132 supply_register.
11133 * tracepoint.c (fetch_traceframe_registers): Update comment.
11134
85724a0e
PA
111352011-01-28 Pedro Alves <pedro@codesourcery.com>
11136
11137 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11138 buffer explicit.
11139
d08aafef
PA
111402011-01-25 Pedro Alves <pedro@codesourcery.com>
11141
11142 * server.h (decode_xfer_write): Change prototype.
11143 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11144 and don't extract the annex here.
11145 * server.c (decode_xfer_read): Remove `annex' parameter,
11146 and don't extract the annex here.
11147 (decode_xfer): New.
11148 (struct qxfer): New.
11149 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11150 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11151 (handle_qxfer_statictrace): New functions, abstracted out from
11152 handle_query, and made to use the struct qxfer interface.
11153 (handle_threads_qxfer_proper): Rename to ...
11154 (handle_qxfer_threads_proper): ... this.
11155 (handle_threads_qxfer): Rename to ...
11156 (handle_qxfer_threads): ... this. Adjust.
11157 (qxfer_packets): New array.
11158 (handle_qxfer): New function.
11159 (handle_query): Use handle_qxfer.
11160
493e2a69
MS
111612011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11162
11163 * gdbreplay.c: Shorten lines of >= 80 columns.
11164 * linux-low.c: Ditto.
11165 * linux-ppc-low.c: Ditto.
11166 * linux-s390-low.c: Ditto.
11167 * linux-sparc-low.c: Ditto.
11168 * linux-x86-low.c: Ditto.
11169 * linux-xtensa-low.c: Ditto.
11170 * mem-break.c: Ditto.
11171 * nto-low.c: Ditto.
11172 * regcache.h: Ditto.
11173 * remote-utils.c: Ditto.
11174 * server.c: Ditto.
11175 * server.h: Ditto.
11176 * thread-db.c: Ditto.
11177 * tracepoint.c: Ditto.
11178 * utils.c: Ditto.
11179 * win32-low.h: Ditto.
11180
44944448
JB
111812011-01-05 Joel Brobecker <brobecker@adacore.com>
11182
11183 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11184 update.
11185
71ce852c
JB
111862011-01-01 Joel Brobecker <brobecker@adacore.com>
11187
11188 * server.c (gdbserver_version): Update copyright year in version
11189 output.
11190 * gdbreplay.c (gdbreplay_version): Ditto.
11191
eb826dc6
MF
111922010-12-29 Jie Zhang <jie.zhang@analog.com>
11193
11194 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11195 * linux-bfin-low.c: New file.
11196 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11197 PT_DATA_ADDR for BFIN targets.
11198 * Makefile.in (SFILES): Add linux-bfin-low.c.
11199 (clean): Remove reg-bfin.c.
11200 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11201 * README: Mention supported Blackfin targets.
11202
39ab222a
MF
112032010-12-23 Mike Frysinger <vapier@gentoo.org>
11204
11205 * .gitignore: New file.
11206
a1f2ce7d
MF
112072010-11-16 Mike Frysinger <vapier@gentoo.org>
11208
11209 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11210
f474844c
JZ
112112010-10-22 Jie Zhang <jie@codesourcery.com>
11212
11213 * Makefile.in: Add FLAGS_TO_PASS variable.
11214 (install): Remove dependency of install-only and recursively
11215 invoke make for install-only.
11216
f1048712
DE
112172010-10-04 Doug Evans <dje@google.com>
11218
11219 * Makefile.in (uninstall): Use $(DESTDIR).
11220
b53a1623
PA
112212010-09-24 Pedro Alves <pedro@codesourcery.com>
11222
e6ee044d
PA
11223 PR gdb/11842
11224
b53a1623
PA
11225 * linux-x86-low.c (compat_siginfo_from_siginfo)
11226 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11227 si_code is < 0. Check for si_code == SI_TIMER before checking for
11228 si_code < 0.
11229
fa1bd1e4
JB
112302010-09-13 Joel Brobecker <brobecker@adacore.com>
11231
11232 * lynx-i386-low.c: New file.
11233 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11234
47fac8f8
JB
112352010-09-13 Joel Brobecker <brobecker@adacore.com>
11236
11237 * lynx-low.c (ptrace_request_to_str): Remove handling for
11238 request values that have been removed in LynxOS 5.x.
11239
1adfc54d
JB
112402010-09-13 Joel Brobecker <brobecker@adacore.com>
11241
11242 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11243 <ptrace.h>
11244
c2a66c29
NS
112452010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11246
11247 * configure.ac: Add --enable-inprocess-agent option.
11248 * configure: Rebuilt.
11249
32fcada3
YQ
112502010-09-06 Yao Qi <yao@codesourcery.com>
11251
11252 * linux-low.c (linux_kill): Remove unused variable.
11253 (linux_stabilize_threads): Likewise.
11254 * server.c (start_inferior): Likewise.
11255 (queue_stop_reply_callback): Likewise.
11256 * tracepoint.c (do_action_at_tracepoint): Likewise.
11257
0cccb683
YQ
112582010-09-06 Yao Qi <yao@codesourcery.com>
11259
11260 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11261 on return.
11262
423ec54c
JK
112632010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11264
11265 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11266
12ac6819
PA
112672010-09-06 Pedro Alves <pedro@codesourcery.com>
11268
11269 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11270 "$(IPA_DEPFILES)".
11271
8ed54b31
JB
112722010-09-01 Joel Brobecker <brobecker@adacore.com>
11273
11274 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11275 gdbserver/lynx-ppc-low.c: New files.
11276 * Makefile.in (lynx_low_h): New variable.
11277 (lynx-low.o, lynx-ppc-low.o): New rules.
11278 * configure.ac: On LynxOS, link with -lnetinet.
11279 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11280 * configure: regenerate.
11281
bb0116a4
JB
112822010-09-01 Joel Brobecker <brobecker@adacore.com>
11283
11284 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11285 * configure.ac: Add check for vasprintf and vsnprintf.
11286 * configure, config.in: Regenerate.
11287 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11288
a778ab81 112892010-09-01 Joel Brobecker <brobecker@adacore.com>
11290
11291 * gdbreplay.c: Move include of alloca.h up, next to include of
11292 malloc.h.
11293 * server.h: Add include of malloc.h.
11294 * mem-break.c: Remove include of malloc.h.
11295 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11296
8b034a19 112972010-09-01 Joel Brobecker <brobecker@adacore.com>
11298
11299 * Makefile.in (memmem.o): Build with -Wno-error.
11300
113012010-09-01 Joel Brobecker <brobecker@adacore.com>
11302
11303 * utils.c (xsnprintf): Make non-static.
11304 * server.h: Add xsnprintf declaration.
11305 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11306 replace calls to snprintf by calls to xsnprintf throughout.
11307
113082010-09-01 Joel Brobecker <brobecker@adacore.com>
11309
11310 * configure.ac: Add configure check for alloca.
11311 * configure, config.in: Regenerate.
11312 * server.h: Include alloca.h if it exists.
11313 * gdbreplay.c: Include alloca.h if it exists.
11314
1a981360
PA
113152010-08-28 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (__SIGRTMIN): Define if not already defined.
11318 (linux_create_inferior): Check for __ANDROID__ rather than
11319 __SIGRTMIN.
11320 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11321 are already deferred.
11322 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11323 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11324 stopped and already has a pending signal to report.
11325 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11326 a pending signal to report or is moving out of a jump pad.
11327 (linux_init_signals): Check for __ANDROID__ rather than
11328 __SIGRTMIN.
11329
b4d51a55
PA
113302010-08-28 Pedro Alves <pedro@codesourcery.com>
11331
11332 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11333 debug_threads check. Avoid a linear search when not doing debug
11334 output.
11335
ec48365d
PA
113362010-08-27 Pedro Alves <pedro@codesourcery.com>
11337
11338 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11339 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11340 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11341 (process_event): Change local fd's type to gdb_fildes_t.
11342 (create_file_handler): Adjust prototype.
11343 (delete_file_handler): Adjust prototype.
11344 (handle_file_event): Adjust prototype. Use pfildes.
11345 (create_file_event): Adjsut prototype.
11346 * remote-utils.c (remote_desc, listen_desc): Change type to
11347 gdb_fildes_t.
11348 * server.h: New gdb_fildes_t typedef.
11349 [USE_WIN32API]: Include winsock2.h.
11350 (delete_file_handler, add_file_handler): Adjust prototypes.
11351 (pfildes): Declare.
11352 * utils.c (pfildes): New.
11353
854d88f0
PA
113542010-08-27 Pedro Alves <pedro@codesourcery.com>
11355
11356 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11357 * configure: Regenerate.
11358
0146f85b
PA
113592010-08-27 Pedro Alves <pedro@codesourcery.com>
11360
11361 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11362 (linux_done_accessing_memory): ... this.
11363 (linux_target_ops): Adjust.
11364 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11365 * nto-low.c (nto_target_ops): Adjust comment.
11366 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11367 * spu-low.c (spu_target_ops): Adjust comment.
11368 * target.h (target_ops): Rename unprepare_to_access_memory field
11369 to done_accessing_memory.
11370 (unprepare_to_access_memory): Rename to ...
11371 (done_accessing_memory): ... this.
11372
90d74c30
PA
113732010-08-26 Pedro Alves <pedro@codesourcery.com>
11374
11375 * linux-low.c (linux_prepare_to_access_memory): New.
11376 (linux_unprepare_to_access_memory): New.
11377 (linux_target_ops): Install them.
11378 * server.c (read_memory): Rename to ...
11379 (gdb_read_memory): ... this. Use
11380 prepare_to_access_memory/prepare_to_access_memory.
11381 (write_memory): Rename to ...
11382 (gdb_write_memory): ... this. Use
11383 prepare_to_access_memory/prepare_to_access_memory.
11384 (handle_search_memory_1): Adjust.
11385 (process_serial_event): Adjust.
11386 * target.h (struct target_ops): New fields
11387 prepare_to_access_memory and unprepare_to_access_memory.
11388 (prepare_to_access_memory, unprepare_to_access_memory): New.
11389 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11390 prepare_to_access_memory/prepare_to_access_memory.
11391 * nto-low.c (nto_target_ops): Adjust.
11392 * spu-low.c (spu_target_ops): Adjust.
11393 * win32-low.c (win32_target_ops): Adjust.
11394
fd467969
PA
113952010-08-26 Pedro Alves <pedro@codesourcery.com>
11396
11397 * Makefile.in (WARN_CFLAGS): Get it from configure.
11398 (WERROR_CFLAGS): New.
11399 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11400 * configure.ac: Introduce --enable-werror, which adds -Werror to
11401 the compiler command line. Enabled by default. Disable with
11402 --disable-werror. Add -Wdeclaration-after-statement
11403 Wpointer-arith and -Wformat-nonliteral to warning flags.
11404 * configure: Regenerate.
11405
331e2f5f
PA
114062010-08-26 Pedro Alves <pedro@codesourcery.com>
11407
11408 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11409
e581f2b4
PA
114102010-08-26 Pedro Alves <pedro@codesourcery.com>
11411
11412 * gdbreplay.c (remote_error): New.
11413 (gdbchar): New.
11414 (expect): Use gdbchar. Check for error reading from GDB.
11415 Clarify sync error output.
11416 (play): Check for errors writing to GDB.
11417 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11418 * remote-utils.c (getpkt): Check for errors writing to the remote
11419 descriptor.
11420
3c11dd79
PA
114212010-08-25 Pedro Alves <pedro@codesourcery.com>
11422
11423 * linux-low.c (linux_wait_1): Move non-debugging code out of
11424 `debug_threads' control.
11425
d20a8ad9
PA
114262010-08-25 Pedro Alves <pedro@codesourcery.com>
11427
11428 * linux-low.c (linux_wait_1): Don't set last_status here.
11429 * server.c (push_event, queue_stop_reply_callback): Assert we're
11430 not pushing a TARGET_WAITKIND_IGNORE event.
11431 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11432 (myresume, handle_target_event): Set the thread's last_resume_kind
11433 and last_status from the target returned status.
11434
964e4306
PA
114352010-08-25 Pedro Alves <pedro@codesourcery.com>
11436
11437 PR threads/10729
11438
11439 * linux-x86-low.c (update_debug_registers_callback): New.
11440 (i386_dr_low_set_addr): Use it.
11441 (i386_dr_low_get_addr): New.
11442 (i386_dr_low_set_control): Use update_debug_registers_callback.
11443 (i386_dr_low_get_control): New.
11444 (i386_dr_low_get_status): Adjust.
11445 * linux-low.c (linux_stop_lwp): New.
11446 * linux-low.h (linux_stop_lwp): Declare.
11447
11448 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11449 argument instead of a i386_debug_reg_state.
11450 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11451 a i386_debug_reg_state.
11452 (i386_insert_aligned_watchpoint): Adjust.
11453 (i386_remove_aligned_watchpoint): Adjust.
11454 (i386_low_stopped_data_address): Read the debug registers from the
11455 inferior instead of from the mirrors.
11456 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11457 (i386_dr_low_get_addr): Declare.
11458 (i386_dr_low_get_control): Declare.
11459 (i386_dr_low_get_status): Change prototype.
11460
11461 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11462 (i386_dr_low_get_addr): New.
11463 (i386_dr_low_get_control): New.
11464 (i386_dr_low_get_status): Adjust prototype. Return
11465 dr_status_mirror.
11466 (i386_initial_stuff): Clear dr_status_mirror and
11467 dr_control_mirror.
11468 (i386_get_thread_context): Adjust.
11469 (i386_set_thread_context): Adjust.
11470 (i386_thread_added): Adjust.
11471
5f21a75b
PA
114722010-08-24 Pedro Alves <pedro@codesourcery.com>
11473
11474 * linux-low.h (linux_thread_area): Delete declaration.
11475
3e4c1235
TS
114762010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11477
11478 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11479 after its termination.
11480
1971b033
PA
114812010-08-09 Pedro Alves <pedro@codesourcery.com>
11482
11483 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11484 (gdb_wants_all_stopped): Delete.
11485 (linux_wait_1): Don't call them.
11486 * server.c (handle_v_cont): Tag all threads as want-stopped.
11487 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11488 stopped as "client-wants-stopped".
11489
310444ac
PA
114902010-07-31 Pedro Alves <pedro@codesourcery.com>
11491
11492 * Makefile.in (signals_h): New.
11493 (server_h): Depend on it.
11494 (server.o): Don't depend on $(signals_def).
11495 (signals.o): Depend on $(signals_def).
11496
a19cae16
JK
114972010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11498
11499 * Makefile.in (signals_def): New.
11500 (server_h): Append include/gdb/signals.h and signals_def.
11501 (server.o): Append signals_def.
11502
30d50328
JK
115032010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11504
11505 * server.c (handle_target_event): Use target_signal_to_host for
11506 resume_info.sig initialization.
11507 * target.h (struct thread_resume) <sig>: New comment.
11508
5c3216e2
OS
115092010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11510
c6f46ca0
OS
11511 * server.c (handle_query): strcpy() the returned string from paddress()
11512 instead of sprintf().
5c3216e2
OS
11513 * utils.c (paddress): Return phex_nz().
11514
6bd31874
JB
115152010-07-07 Joel Brobecker <brobecker@adacore.com>
11516
11517 * server.c (handle_v_cont): Call mourn_inferior if process
11518 just exited.
11519 (myresume): Likewise.
11520
0fb4aa4b
PA
115212010-07-01 Pedro Alves <pedro@codesourcery.com>
11522
11523 Static tracepoints, and integration with UST.
11524
11525 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11526 * mem-break.c (uninsert_all_breakpoints)
11527 (reinsert_all_breakpoints): New.
11528 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11529 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11530 (gdb_agent_ust_loaded, helper_thread_id)
11531 (gdb_agent_helper_thread_id): New macros.
11532 (struct ipa_sym_addresses): Add addr_ust_loaded,
11533 addr_helper_thread_id, addr_cmd_buf.
11534 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11535 (in_process_agent_loaded_ust): New.
11536 (write_e_ust_not_loaded): New.
11537 (maybe_write_ipa_ust_not_loaded): New.
11538 (struct collect_static_trace_data_action): New.
11539 (enum tracepoint_type) <static_tracepoint>: New.
11540 (struct tracepoint) <handle>: Mention static tracepoints.
11541 (struct static_tracepoint_ctx): New.
11542 (CMD_BUF_SIZE): New.
11543 (add_tracepoint_action): Handle static tracepoint actions.
11544 (unprobe_marker_at): New.
11545 (clear_installed_tracepoints): Handle static tracepoints.
11546 (cmd_qtdp): Handle static tracepoints.
11547 (probe_marker_at): New.
11548 (cmd_qtstart): Handle static tracepoints.
11549 (response_tracepoint): Handle static tracepoints.
11550 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11551 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11552 (get_context_regcache): Handle static tracepoints.
11553 (do_action_at_tracepoint): Handle static tracepoint actions.
11554 (traceframe_find_block_type): Handle static trace data blocks.
11555 (traceframe_read_sdata): New.
11556 (download_tracepoints): Download static tracepoint actions.
11557 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11558 (GDB_PROBE_NAME): New.
11559 (ust_ops): New.
11560 (GET_UST_SYM): New.
11561 (USTF): New.
11562 (dlsym_ust): New.
11563 (ust_marker_to_static_tracepoint): New.
11564 (gdb_probe): New.
11565 (collect_ust_data_at_tracepoint): New.
11566 (gdb_ust_probe): New.
11567 (UNIX_PATH_MAX, SOCK_DIR): New.
11568 (gdb_ust_connect_sync_socket): New.
11569 (resume_thread, stop_thread): New.
11570 (run_inferior_command): New.
11571 (init_named_socket): New.
11572 (gdb_ust_socket_init): New.
11573 (cstr_to_hexstr): New.
11574 (next_st): New.
11575 (first_marker, next_marker): New.
11576 (response_ust_marker): New.
11577 (cmd_qtfstm, cmd_qtsstm): New.
11578 (unprobe_marker_at, probe_marker_at): New.
11579 (cmd_qtstmat, gdb_ust_thread): New.
11580 (gdb_ust_init): New.
11581 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11582 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11583 (ST_REGENTRY): New.
11584 (x86_64_st_collect_regmap): New.
11585 (X86_64_NUM_ST_COLLECT_GREGS): New.
11586 (AMD64_RIP_REGNUM): New.
11587 (supply_static_tracepoint_registers): New.
11588 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11589 (ST_REGENTRY): New.
11590 (i386_st_collect_regmap): New.
11591 (i386_NUM_ST_COLLECT_GREGS): New.
11592 (supply_static_tracepoint_registers): New.
11593 * server.c (handle_query): Handle qXfer:statictrace:read.
11594 <qSupported>: Report support for StaticTracepoints, and
11595 qXfer:statictrace:read features.
11596 * server.h (traceframe_read_sdata)
11597 (supply_static_tracepoint_registers): Declare.
11598 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11599 (unpack_varlen_hex): Include in IPA build.
11600 * Makefile.in (ustlibs, ustinc): New.
11601 (IPA_OBJS): Add remote-utils-ipa.o.
11602 ($(IPA_LIB)): Link -ldl and -lpthread.
11603 (UST_CFLAGS): New.
11604 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11605 * config.in, configure: Regenerate.
11606
9e4344e5
PA
116072010-06-20 Ian Lance Taylor <iant@google.com>
11608 Pedro Alves <pedro@codesourcery.com>
11609
11610 * linux-x86-low.c (always_true): Delete.
11611 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11612 trying to fool the compiler with always_true.
11613
c6beb2cb
PA
116142010-06-20 Pedro Alves <pedro@codesourcery.com>
11615
11616 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11617 conditions in gdbserver.
11618
d2ed6730
UW
116192010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11620
11621 * spu-low.c (spu_read_memory): Wrap around local store limit.
11622 (spu_write_memory): Likewise.
11623
4e29fb54
PA
116242010-06-15 Pedro Alves <pedro@codesourcery.com>
11625
11626 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11627 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11628 LONGEST uses.
11629 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11630 uses.
11631 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11632 uses with LONGEST uses.
11633
6a271cae
PA
116342010-06-14 Stan Shebs <stan@codesourcery.com>
11635 Pedro Alves <pedro@codesourcery.com>
11636
11637 Bytecode compiler.
11638
11639 * linux-x86-low.c: Include limits.h.
11640 (add_insns): New.
11641 (always_true): New.
11642 (EMIT_ASM): New.
11643 (EMIT_ASM32): New.
11644 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11645 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11646 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11647 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11648 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11649 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11650 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11651 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11652 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11653 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11654 (amd64_emit_void_call_2): New.
11655 (amd64_emit_ops): New.
11656 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11657 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11658 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11659 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11660 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11661 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11662 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11663 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11664 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11665 (i386_emit_stack_adjust, i386_emit_int_call_1)
11666 (i386_emit_void_call_2): New.
11667 (i386_emit_ops): New.
11668 (x86_emit_ops): New.
11669 (the_low_target): Install x86_emit_ops.
11670 * server.h (struct emit_ops): New.
11671 (get_raw_reg_func_addr): Declare.
11672 (current_insn_ptr, emit_error): Declare.
11673 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11674 (set_trace_state_variable_value): New defines.
11675 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11676 addr_get_trace_state_variable_value and
11677 addr_set_trace_state_variable_value.
11678 (symbol_list): New fields for get_raw_reg,
11679 get_trace_state_variable_value and set_trace_state_variable_value.
11680 (condfn): New typedef.
11681 (struct tracepoint): New field `compiled_cond'.
11682 (do_action_at_tracepoint): Clear compiled_cond.
11683 (get_trace_state_variable_value, set_trace_state_variable_value):
11684 Export in the IPA.
11685 (condition_true_at_tracepoint): If there's a compiled condition,
11686 run that.
11687 (current_insn_ptr, emit_error): New globals.
11688 (struct bytecode_address): New.
11689 (get_raw_reg_func_addr): New.
11690 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11691 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11692 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11693 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11694 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11695 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11696 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11697 (compile_tracepoint_condition, compile_bytecodes): New.
11698 * target.h (emit_ops): Forward declare.
11699 (struct target_ops): New field emit_ops.
11700 (target_emit_ops): New.
11701 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11702 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11703 * linux-low.c (linux_emit_ops): New.
11704 (linux_target_ops): Install it.
11705 * linux-low.h (struct linux_target_ops): New field emit_ops.
11706
92b72907
UW
117072010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11708
11709 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11710 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11711
fa593d66
PA
117122010-06-01 Pedro Alves <pedro@codesourcery.com>
11713 Stan Shebs <stan@codesourcery.com>
11714
11715 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11716 (all): Depend on $(extra_libraries).
11717 (install-only): Install the IPA.
11718 (IPA_OBJS, IPA_LIB): New.
11719 (clean): Remove the IPA lib.
11720 (IPAGENT_CFLAGS): New.
11721 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11722 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11723 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11724 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11725 * configure.ac: Check for atomic builtins support in the compiler.
11726 (IPA_DEPFILES, extra_libraries): Define.
11727 * configure.srv (ipa_obj): Add description.
11728 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11729 (i[34567]86-*-linux*): Set ipa_obj.
11730 (x86_64-*-linux*): Set ipa_obj.
11731 * linux-low.c (stabilizing_threads): New.
11732 (supports_fast_tracepoints): New.
11733 (linux_detach): Stabilize threads before detaching.
11734 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11735 the lwp is either not stabilizing, or is moving out of a jump pad.
11736 (linux_fast_tracepoint_collecting): New.
11737 (maybe_move_out_of_jump_pad): New.
11738 (enqueue_one_deferred_signal): New.
11739 (dequeue_one_deferred_signal): New.
11740 (linux_wait_for_event_1): If moving out of a jump pad, defer
11741 pending signals to later.
11742 (linux_stabilize_threads): New.
11743 (linux_wait_1): Check if threads need moving out of jump pads, and
11744 do it if so.
11745 (stuck_in_jump_pad_callback): New.
11746 (move_out_of_jump_pad_callback): New.
11747 (lwp_running): New.
11748 (linux_resume_one_lwp): Handle moving out of jump pads.
11749 (linux_set_resume_request): Dequeue deferred signals.
11750 (need_step_over_p): Also step over fast tracepoint jumps.
11751 (start_step_over): Also uninsert fast tracepoint jumps.
11752 (finish_step_over): Also reinsert fast tracepoint jumps.
11753 (linux_install_fast_tracepoint_jump): New.
11754 (linux_target_ops): Install linux_stabilize_threads and
11755 linux_install_fast_tracepoint_jump_pad.
11756 * linux-low.h (linux_target_ops) <get_thread_area,
11757 install_fast_tracepoint_jump_pad>: New fields.
11758 (struct lwp_info) <collecting_fast_tracepoint,
11759 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11760 (linux_get_thread_area): Declare.
11761 * linux-x86-low.c (jump_insn): New.
11762 (x86_get_thread_area): New.
11763 (append_insns): New.
11764 (push_opcode): New.
11765 (amd64_install_fast_tracepoint_jump_pad): New.
11766 (i386_install_fast_tracepoint_jump_pad): New.
11767 (x86_install_fast_tracepoint_jump_pad): New.
11768 (the_low_target): Install x86_get_thread_area and
11769 x86_install_fast_tracepoint_jump_pad.
11770 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11771 (struct fast_tracepoint_jump): New.
11772 (fast_tracepoint_jump_insn): New.
11773 (fast_tracepoint_jump_shadow): New.
11774 (find_fast_tracepoint_jump_at): New.
11775 (fast_tracepoint_jump_here): New.
11776 (delete_fast_tracepoint_jump): New.
11777 (set_fast_tracepoint_jump): New.
11778 (uninsert_fast_tracepoint_jumps_at): New.
11779 (reinsert_fast_tracepoint_jumps_at): New.
11780 (set_breakpoint_at): Use write_inferior_memory.
11781 (uninsert_raw_breakpoint): Use write_inferior_memory.
11782 (check_mem_read): Mask out fast tracepoint jumps.
11783 (check_mem_write): Mask out fast tracepoint jumps.
11784 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11785 (set_fast_tracepoint_jump): Declare.
11786 (delete_fast_tracepoint_jump)
11787 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11788 (reinsert_fast_tracepoint_jumps_at): Declare.
11789 * regcache.c: Don't compile many functions when building the
11790 in-process agent library.
11791 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11792 the register buffer in the heap.
11793 (free_register_cache): If the register buffer isn't owned by the
11794 regcache, don't free it.
11795 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11796 pre-existing register caches.
11797 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11798 type.
11799 (convert_ascii_to_int): : Constify `from' parameter type.
11800 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11801 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11802 the needed buffer in-place.
11803 (relocate_instruction): New.
11804 * server.c (handle_query) <qSymbols>: If the target supports
11805 tracepoints, give it a chance of looking up symbols. Report
11806 support for fast tracepoints.
11807 (handle_status): Stabilize threads.
11808 (process_serial_event): Adjust.
11809 * server.h (struct fast_tracepoint_jump): Forward declare.
11810 (struct process_info) <fast_tracepoint_jumps>: New field.
11811 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11812 (decode_X_packet, decode_M_packet): Adjust.
11813 (relocate_instruction): Declare.
11814 (in_process_agent_loaded): Declare.
11815 (tracepoint_look_up_symbols): Declare.
11816 (struct fast_tpoint_collect_status): Declare.
11817 (fast_tracepoint_collecting): Declare.
11818 (force_unlock_trace_buffer): Declare.
11819 (handle_tracepoint_bkpts): Declare.
11820 (initialize_low_tracepoint)
11821 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11822 * target.h (struct target_ops) <stabilize_threads,
11823 install_fast_tracepoint_jump_pad>: New fields.
11824 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11825 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11826 [HAVE_STDINT_H]: Include stdint.h.
11827 (trace_debug_1): Rename to ...
11828 (trace_vdebug): ... this.
11829 (trace_debug): Rename to ...
11830 (trace_debug_1): ... this. Add `level' parameter.
11831 (trace_debug): New.
11832 (ATTR_USED, ATTR_NOINLINE): New.
11833 (IP_AGENT_EXPORT): New.
11834 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11835 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11836 (about_to_request_buffer_space, trace_buffer_is_full)
11837 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11838 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11839 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11840 (traceframe_write_count, traceframes_created)
11841 (trace_state_variables)
11842 New renaming defines.
11843 (struct ipa_sym_addresses): New.
11844 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11845 (symbol_list): New.
11846 (ipa_sym_addrs): New.
11847 (all_tracepoint_symbols_looked_up): New.
11848 (in_process_agent_loaded): New.
11849 (write_e_ipa_not_loaded): New.
11850 (maybe_write_ipa_not_loaded): New.
11851 (tracepoint_look_up_symbols): New.
11852 (debug_threads) [IN_PROCESS_AGENT]: New.
11853 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11854 (UNKNOWN_SIDE_EFFECTS): New.
11855 (stop_tracing): New.
11856 (flush_trace_buffer): New.
11857 (stop_tracing_bkpt): New.
11858 (flush_trace_buffer_bkpt): New.
11859 (read_inferior_integer): New.
11860 (read_inferior_uinteger): New.
11861 (read_inferior_data_pointer): New.
11862 (write_inferior_data_pointer): New.
11863 (write_inferior_integer): New.
11864 (write_inferior_uinteger): New.
11865 (struct collect_static_trace_data_action): Delete.
11866 (enum tracepoint_type): New.
11867 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11868 <actions_str, step_actions, step_actions_str>: Only include in
11869 GDBserver.
fa593d66
PA
11870 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11871 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11872 (tracepoints): Use IP_AGENT_EXPORT.
11873 (last_tracepoint): Don't include in the IPA.
11874 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11875 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11876 (alloced_trace_state_variables): New.
11877 (trace_state_variables): Use IP_AGENT_EXPORT.
11878 (traceframe_t): Delete unused variable.
11879 (circular_trace_buffer): Don't include in the IPA.
11880 (trace_buffer_start): Delete.
11881 (struct trace_buffer_control): New.
11882 (trace_buffer_free): Delete.
11883 (struct ipa_trace_buffer_control): New.
11884 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11885 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11886 New.
11887 (trace_buffer_ctrl): New.
11888 (TRACE_BUFFER_CTRL_CURR): New.
11889 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11890 Reimplement as macros.
11891 (trace_buffer_wrap): Delete.
11892 (traceframe_write_count, traceframe_read_count)
11893 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11894 (struct tracepoint_hit_ctx) <type>: New field.
11895 (struct fast_tracepoint_ctx): New.
11896 (memory_barrier): New.
11897 (cmpxchg): New.
11898 (record_tracepoint_error): Update atomically in the IPA.
11899 (clear_inferior_trace_buffer): New.
11900 (about_to_request_buffer_space): New.
11901 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11902 updating the same buffer.
11903 (add_tracepoint): Default the tracepoint's type to trap
11904 tracepoint, and orig_size to -1.
11905 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11906 internal variables.
11907 (create_trace_state_variable): New parameter `gdb'. Handle it.
11908 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11909 (cmd_qtdp): Handle fast tracepoints.
11910 (cmd_qtdv): Adjust.
11911 (max_jump_pad_size): New.
11912 (gdb_jump_pad_head): New.
11913 (get_jump_space_head): New.
11914 (claim_jump_space): New.
11915 (sort_tracepoints): New.
11916 (MAX_JUMP_SIZE): New.
11917 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11918 IPA.
11919 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11920 support. Upload fast traceframes, and delete internal IPA
11921 breakpoints.
11922 (stop_tracing_handler): New.
11923 (flush_trace_buffer_handler): New.
11924 (cmd_qtstop): Upload fast tracepoints.
11925 (response_tracepoint): Handle fast tracepoints.
11926 (tracepoint_finished_step): Upload fast traceframes. Set the
11927 tracepoint hit context's tracepoint type.
11928 (handle_tracepoint_bkpts): New.
11929 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11930 type. Add comment about fast tracepoints.
11931 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11932 non-existing action_str field.
11933 (get_context_regcache): Handle fast tracepoints.
11934 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11935 to the regcache.
11936 (fast_tracepoint_from_jump_pad_address): New.
11937 (fast_tracepoint_from_ipa_tpoint_address): New.
11938 (collecting_t): New.
11939 (force_unlock_trace_buffer): New.
11940 (fast_tracepoint_collecting): New.
11941 (collecting): New.
11942 (gdb_collect): New.
11943 (write_inferior_data_ptr): New.
11944 (target_tp_heap): New.
11945 (target_malloc): New.
11946 (download_agent_expr): New.
11947 (UALIGN): New.
11948 (download_tracepoints): New.
11949 (download_trace_state_variables): New.
11950 (upload_fast_traceframes): New.
11951 (IPA_FIRST_TRACEFRAME): New.
11952 (IPA_NEXT_TRACEFRAME_1): New.
11953 (IPA_NEXT_TRACEFRAME): New.
11954 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11955 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11956 (gdb_jump_pad_buffer_end): New.
11957 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11958 (initialize_tracepoint): Adjust.
11959 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11960 buffer. Initialize the low module.
11961 * utils.c (PREFIX, TOOLNAME): New.
11962 (malloc_failure): Use PREFIX.
11963 (error): In the IPA, an error causes an exit.
11964 (fatal, warning): Use PREFIX.
11965 (internal_error): Use TOOLNAME.
11966 (NUMCELLS): Increase to 10.
11967 * configure, config.in: Regenerate.
11968
d149dd1d
PA
119692010-06-01 Pedro Alves <pedro@codesourcery.com>
11970
11971 * server.c (handle_query) <qSupported>: Do two passes over the
11972 qSupported string to avoid nesting strtok.
11973
f6528abd
JK
119742010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11975
11976 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11977 (CDEPS): New.
11978 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11979 -Wl,--dynamic-list.
11980 * configure: Regenerate.
11981 * proc-service.list: New.
11982
ca2a87a0
JK
119832010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11984
11985 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11986 New comment.
11987
363a6e9f
OS
119882010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11989
11990 * gdbreplay.c (remote_open): Check error return from socket() call by
11991 its equality to -1 not by it being negative.
11992 * remote-utils.c (remote_open): Likewise.
11993
d23b6cb1
PA
119942010-05-23 Pedro Alves <pedro@codesourcery.com>
11995
11996 * config.h: Regenerate.
11997
28d3cf85
MK
119982010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11999
12000 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12001 doesn't provide PTRACE_GET_THREAD_AREA.
12002
fea36a59
MK
120032010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12004
12005 * linux-m68k-low.c: Include <asm/ptrace.h>
12006 (ps_get_thread_area): Implement.
12007
24b066ba
DE
120082010-05-03 Doug Evans <dje@google.com>
12009
12010 * event-loop.c (struct callback_event): New struct.
12011 (callback_list): New global.
12012 (append_callback_event, delete_callback_event): New functions.
12013 (process_callback): New function.
12014 (start_event_loop): Call it.
12015 * remote-utils.c (NOT_SCHEDULED): Define.
12016 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12017 moved out of readchar.
12018 (readchar): Rewrite. Call reschedule before returning.
12019 (reset_readchar): New function.
12020 (remote_close): Call it.
12021 (process_remaining, reschedule): New functions.
12022 * server.h (callback_handler_func): New typedef.
12023 (append_callback_event, delete_callback_event): Declare.
12024
9836d6ea
PA
120252010-05-03 Pedro Alves <pedro@codesourcery.com>
12026
12027 * proc-service.c (ps_pglobal_lookup): Use
12028 thread_db_look_up_one_symbol.
12029 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12030 parameter. Use it instead of all_symbols_looked_up.
12031 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12032 field.
12033 (all_symbols_looked_up): Don't declare.
12034 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12035 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12036 field.
12037 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12038 Set all_symbols_looked_up here.
12039 (thread_db_look_up_one_symbol): New.
12040 (thread_db_get_tls_address): Adjust.
12041 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12042 thread_db object on the heap, and tentatively set it in the
12043 process structure.
12044 (thread_db_init): Don't set all_symbols_looked_up here.
12045 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12046
7984d532
PA
120472010-05-03 Pedro Alves <pedro@codesourcery.com>
12048
12049 * linux-low.c (linux_kill, linux_detach): Adjust.
12050 (status_pending_p_callback): Remove redundant statement. Check
12051 for !TARGET_WAITIKIND_IGNORE, instead of
12052 TARGET_WAITKIND_STOPPED.
12053 (handle_tracepoints): Make sure LWP is locked. Adjust.
12054 (linux_wait_for_event_1): Adjust.
12055 (linux_cancel_breakpoints): New.
12056 (unsuspend_one_lwp): New.
12057 (unsuspend_all_lwps): New.
12058 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12059 (send_sigstop_callback): Change return type to int, add new
12060 `except' parameter and handle it.
12061 (suspend_and_send_sigstop_callback): New.
12062 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12063 pass them down. If SUSPEND, also increment the lwp's suspend
12064 count.
12065 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12066 (need_step_over_p): Don't consider suspended LWPs.
12067 (start_step_over): Adjust.
12068 (proceed_one_lwp): Change return type to int, add new `except'
12069 parameter and handle it.
12070 (unsuspend_and_proceed_one_lwp): New.
12071 (proceed_all_lwps): Use find_inferior instead of
12072 for_each_inferior.
12073 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12074 also decrement the suspend count of LWPs. Pass `except' down,
12075 instead of hacking its suspend count.
12076 (linux_pause_all): Add `freeze' parameter. Adjust.
12077 (linux_unpause_all): New.
12078 (linux_target_ops): Install linux_unpause_all.
12079 * server.c (handle_status): Adjust.
12080 * target.h (struct target_ops): New fields `unpause_all' and
12081 `cancel_breakpoints'. Add new parameter to `pause_all'.
12082 (pause_all): Add new `freeze' parameter.
12083 (unpause_all): New.
12084 (cancel_breakpoints): New.
12085 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12086 cancel breakpoints.
12087 (cmd_qtstart): Pause threads.
12088 (stop_tracing): Pause threads, and cancel breakpoints.
12089 * win32-low.c (win32_target_ops): Adjust.
12090
e471f25b
PA
120912010-05-03 Pedro Alves <pedro@codesourcery.com>
12092
12093 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12094 the inferior right away from here...
12095 (linux_wait_1): ... to here, and adjust to check the thread's
12096 last_resume_kind instead of the lwp's step or stop_expected flags.
12097
1915ef4f
PA
120982010-05-02 Pedro Alves <pedro@codesourcery.com>
12099
12100 * README: Use consistent `GDB' and `GDBserver' spellings.
12101
f9e39928
PA
121022010-05-02 Pedro Alves <pedro@codesourcery.com>
12103
12104 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12105 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12106 (linux_detach_one_lwp): Assume the lwp is stopped.
12107 (any_thread_of): Delete.
12108 (linux_detach): Stop all lwps here. Don't blindly delete all
12109 breakpoints.
12110 (delete_lwp_callback): New.
12111 (linux_mourn): Delete all lwps of the process that is gone.
12112 (linux_wait_1): Don't delete the last lwp of the process here.
12113 * mem-break.h (mark_breakpoints_out): Declare.
12114 * mem-break.c (mark_breakpoints_out): New.
12115 (free_all_breakpoints): Use it.
12116 * server.c (handle_target_event): If the process is gone, mark
12117 breakpoints out.
12118 * thread-db.c (struct thread_db) <create_bp>: New field.
12119 (thread_db_enable_reporting): Fix prototype. Store a thread event
12120 breakpoint reference in the thread_db struct.
12121 (thread_db_load_search): Clear the thread_db object.
12122 (try_thread_db_load_1): Ditto.
12123 (switch_to_process): New.
12124 (disable_thread_event_reporting): Use it.
12125 (remove_thread_event_breakpoints): New.
12126 (thread_db_detach, thread_db_mourn): Use it.
12127
1e7fc18c
PA
121282010-05-01 Pedro Alves <pedro@codesourcery.com>
12129
12130 * linux-low.c (linux_enable_event_reporting): New.
12131 (linux_wait_for_event_1, handle_extended_wait): Use it.
12132
02fc4de7
PA
121332010-04-30 Pedro Alves <pedro@codesourcery.com>
12134
12135 * linux-low.c (linux_kill_one_lwp, linux_kill)
12136 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12137 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12138 SIGSTOP even if the LWP is stopped.
12139 (send_sigstop_callback): New.
12140 (stop_all_lwps): Use send_sigstop_callback instead.
12141 (linux_resume_one_thread): Adjust.
12142 (proceed_one_lwp): Still proceed an LWP that the client has
12143 requested to stop, if we haven't reported it as stopped yet. Make
12144 sure that LWPs the client want stopped, have a pending SIGSTOP.
12145
bc3b5632
DE
121462010-04-26 Doug Evans <dje@google.com>
12147
ae1ada35
DE
12148 * server.c (handle_general_set): Make static.
12149
bc3b5632
DE
12150 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12151 Print received char after testing for error/eof instead of before.
12152 (input_interrupt): Tweak comment.
12153
65730243
DE
121542010-04-23 Doug Evans <dje@google.com>
12155
12156 * server.c (start_inferior): Print inferior argv if --debug.
12157
a8ae7dc0
AR
121582010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12159
12160 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12161 * nto-x86-low.c: Include server.h
12162
1c07cc19
PM
121632010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12164
12165 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12166 be consistent with other sources of this directory.
12167 (init_registers_amd64): Correct name of source file of this function
12168 in the comment.
12169
e0a61e09
PM
121702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12171
12172 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12173 64-bit executables.
12174
54709339
PM
121752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12176
12177 * win32-i386-low.c: Add 64-bit support.
12178 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12179 (init_registers_amd64): Declare.
12180 (mappings): Add 64-bit version of array.
12181 (init_windows_x86): New function.
12182 (the_low_target): Change init_arch field to init_windows_x86.
12183
e8f0053d
PM
121842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12185
12186 * win32-low.c: Adapt to support also 64-bit architecture.
12187 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12188 (get_image_name): Use SIZE_T type for local variable `done'.
12189 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12190 (toolhelp_get_dll_name): Idem.
12191 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12192 Use uintptr_t typecast to avoid warning.
12193 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12194 (handle_exception): Use phex_nz to avoid warning.
12195 (win32_wait): Remove unused local variable `process'.
12196
c481e77e
PM
121972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12198
12199 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12200 `amd64-avx.o'.
12201
12ea4b69
PM
122022010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12203
12204 * configure.ac: Use `ws2_32' library for srv_mingw.
12205 * configure: Regenerate.
12206 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12207 * remote-utils.c: Likewise.
12208
f6d1620c
L
122092010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12210
12211 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12212 if __x86_64__ is defined.
12213
8e642873
PM
122142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12215
12216 * configure: Regenerate.
12217
711e434b
PM
122182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12219
12220 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12221 * target.h (target_ops): New get_tib_address field.
12222 * win32-low.h (win32_thread_info): Add thread_local_base field.
12223 * win32-low.c (child_add_thread): Add tlb argument.
12224 Set thread_local_base field to TLB.
12225 (get_child_debug_event): Adapt to child_add_thread change.
12226 (win32_get_tib_address): New function.
12227 (win32_target_ops): Set get_tib_address field to
12228 win32_get_tib_address.
12229 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12230
505106cd
PA
122312010-04-12 Pedro Alves <pedro@codesourcery.com>
12232
505106cd
PA
12233 * linux-low.c (linux_mourn): Also remove the process.
12234 * server.c (handle_target_event): Don't remove the process here.
12235 * nto-low.c (nto_mourn): New.
12236 (nto_target_ops): Install it.
12237 * spu-low.c (spu_mourn): New.
12238 (spu_target_ops): Install it.
12239 * win32-low.c (win32_mourn): New.
12240 (win32_target_ops): Install it.
12241
e8470a06
PA
122422010-04-12 Pedro Alves <pedro@codesourcery.com>
12243
12244 * server.h (buffer_xml_printf): Remove redundant `;'.
12245
45ba0d02
PA
122462010-04-12 Pedro Alves <pedro@codesourcery.com>
12247
12248 * regcache.c (set_register_cache): Invalidate regcaches before
12249 changing the register cache layout.
12250 (regcache_invalidate_one): Allow a NULL regcache.
12251 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12252 regcaches before changing the register cache layout or the target
12253 regsets.
12254
59e04013
L
122552010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12256
12257 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12258 variable warning on Linux/x86-64.
12259
8336d594
PA
122602010-04-11 Pedro Alves <pedro@codesourcery.com>
12261
12262 GDBserver disconnected tracing support.
12263
12264 * linux-low.c (linux_remove_process): Delete.
12265 (add_lwp): Don't set last_resume_kind here.
12266 (linux_kill): Use `mourn'.
12267 (linux_detach): Use `thread_db_detach', and `mourn'.
12268 (linux_mourn): New.
12269 (linux_attach_lwp_1): Adjust comment.
12270 (linux_attach): last_resume_kind moved the thread_info; adjust.
12271 (status_pending_p_callback): Adjust.
12272 (linux_wait_for_event_1): Adjust.
12273 (count_events_callback, select_singlestep_lwp_callback)
12274 (select_event_lwp_callback, cancel_breakpoints_callback)
12275 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12276 (proceed_one_lwp): Adjust.
12277 (linux_async): Add debug output.
12278 (linux_thread_stopped): New.
12279 (linux_pause_all): New.
12280 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12281 linux_pause_all.
12282 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12283 (thread_db_free): Delete declaration.
12284 (thread_db_detach, thread_db_mourn): Declare.
12285 * thread-db.c (thread_db_init): Use thread_db_mourn.
12286 (thread_db_free): Delete, split in two.
12287 (disable_thread_event_reporting): New.
12288 (thread_db_detach): New.
12289 (thread_db_mourn): New.
12290
12291 * server.h (struct thread_info) <last_resume_kind>: New field.
12292 <attached>: Add comment.
12293 <gdb_detached>: New field.
12294 (handler_func): Change return type to int.
12295 (handle_serial_event, handle_target_event): Ditto.
12296 (gdb_connected): Declare.
12297 (tracing): Delete.
12298 (disconnected_tracing): Declare.
12299 (stop_tracing): Declare.
12300
12301 * server.c (handle_query) <qSupported>: Report support for
12302 disconnected tracing.
12303 (queue_stop_reply_callback): Account for running threads.
12304 (gdb_wants_thread_stopped): New.
12305 (gdb_wants_all_threads_stopped): New.
12306 (gdb_reattached_process): New.
12307 (handle_status): Clear the `gdb_detached' flag of all processes.
12308 In all-stop, stop all threads.
12309 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12310 (process_serial_event): If the remote connection breaks, or if an
12311 exit was forced with "monitor exit", force an event loop exit.
12312 Handle disconnected tracing on detach.
12313 (handle_serial_event): Adjust.
12314 (handle_target_event): If GDB isn't connected, forward events back
12315 to the inferior, unless the last process exited, in which case,
12316 exit gdbserver. Adjust interface.
12317
12318 * remote-utils.c (remote_open): Don't block in accept. Instead
12319 register an event loop source on the listen socket file
12320 descriptor. Refactor bits into ...
12321 (listen_desc): ... this new global.
12322 (gdb_connected): ... this new function.
12323 (enable_async_notification): ... this new function.
12324 (handle_accept_event): ... this new function.
12325 (remote_close): Clear remote_desc.
12326
12327 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12328
12329 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12330 New fields.
12331 (mourn_inferior): Define.
12332 (target_process_qsupported): Avoid the dangling else problem.
12333 (thread_stopped): Define.
12334 (pause_all): Define.
12335 (target_waitstatus_to_string): Declare.
12336 * target.c (target_waitstatus_to_string): New.
12337
12338 * tracepoint.c (tracing): Make extern.
12339 (disconnected_tracing): New.
12340 (stop_tracing): Make extern. Handle tracing stops due to GDB
12341 disconnecting.
12342 (cmd_qtdisconnected): New.
12343 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12344 (handle_tracepoint_general_set): Handle QTDisconnected.
12345
12346 * event-loop.c (event_handler_func): Change return type to int.
12347 (process_event): Bail out if the event handler wants the event
12348 loop to stop.
12349 (handle_file_event): Ditto.
12350 (start_event_loop): Bail out if the event handler wants the event
12351 loop to stop.
12352
12353 * nto-low.c (nto_target_ops): Adjust.
12354 * spu-low.c (spu_wait): Don't remove the process here.
12355 (spu_target_ops): Adjust.
12356 * win32-low.c (win32_wait): Don't remove the process here.
12357 (win32_target_ops): Adjust.
12358
5d267c4c
PA
123592010-04-11 Pedro Alves <pedro@codesourcery.com>
12360
12361 * regcache.c (realloc_register_cache): Invalidate inferior's
12362 regcache before recreating it.
12363
623ccd72
PA
123642010-04-09 Pedro Alves <pedro@codesourcery.com>
12365
12366 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12367
219f2f23
PA
123682010-04-09 Stan Shebs <stan@codesourcery.com>
12369 Pedro Alves <pedro@codesourcery.com>
12370
12371 * server.h (LONGEST): New.
12372 (struct thread_info) <while_stepping>: New field.
12373 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12374 Declare.
12375 (initialize_tracepoint, handle_tracepoint_general_set)
12376 (handle_tracepoint_query, tracepoint_finished_step)
12377 (tracepoint_was_hit, release_while_stepping_state_list):
12378 (current_traceframe): Declare.
12379 * server.c (handle_general_set): Handle tracepoint packets.
12380 (read_memory): New.
12381 (write_memory): New.
12382 (handle_search_memory_1): Use read_memory.
12383 (handle_query): Report support for conditional tracepoints, trace
12384 state variables, and tracepoint sources. Handle tracepoint
12385 queries.
12386 (main): Initialize the tracepoints module.
12387 (process_serial_event): Handle traceframe reads/writes.
12388
12389 * linux-low.c (handle_tracepoints): New.
12390 (linux_wait_1): Call it.
12391 (linux_resume_one_lwp): Handle while-stepping.
12392 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12393 (linux_target_ops): Install them.
12394 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12395 New field.
12396 * linux-x86-low.c (x86_supports_tracepoints): New.
12397 (the_low_target). Install it.
12398
12399 * mem-break.h (delete_breakpoint): Declare.
12400 * mem-break.c (delete_breakpoint): Make external.
12401
12402 * target.h (struct target_ops): Add `supports_tracepoints',
12403 `read_pc', and `write_pc' fields.
12404 (target_supports_tracepoints): Define.
12405 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12406 (phex_nz): New.
12407
12408 * regcache.h (struct regcache) <registers_owned>: New field.
12409 (init_register_cache, regcache_cpy): Declare.
12410 (regcache_read_pc, regcache_write_pc): Declare.
12411 (register_cache_size): Declare.
12412 (supply_regblock): Declare.
12413 * regcache.c (init_register_cache): New.
12414 (new_register_cache): Use it.
12415 (regcache_cpy): New.
12416 (register_cache_size): New.
12417 (supply_regblock): New.
12418 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12419
219f2f23
PA
12420 * tracepoint.c: New.
12421
12422 * Makefile.in (OBS): Add tracepoint.o.
12423 (tracepoint.o): New rule.
12424
3a13a53b
L
124252010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12426
12427 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12428 (i386-mmx.o): New.
12429 (i386-mmx.c): Likewise.
12430 (i386-mmx-linux.o): Likewise.
12431 (i386-mmx-linux.c): Likewise.
12432
12433 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12434 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12435 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12436 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12437
12438 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12439 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12440 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12441
1570b33e
L
124422010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12443
12444 * Makefile.in (clean): Updated.
12445 (i386-avx.o): New.
12446 (i386-avx.c): Likewise.
12447 (i386-avx-linux.o): Likewise.
12448 (i386-avx-linux.c): Likewise.
12449 (amd64-avx.o): Likewise.
12450 (amd64-avx.c): Likewise.
12451 (amd64-avx-linux.o): Likewise.
12452 (amd64-avx-linux.c): Likewise.
12453
12454 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12455 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12456 (srv_amd64_regobj): Add amd64-avx.o.
12457 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12458 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12459 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12460 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12461 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12462 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12463 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12464
12465 * i387-fp.c: Include "i386-xstate.h".
12466 (i387_xsave): New.
12467 (i387_cache_to_xsave): Likewise.
12468 (i387_xsave_to_cache): Likewise.
12469 (x86_xcr0): Likewise.
12470
12471 * i387-fp.h (i387_cache_to_xsave): Likewise.
12472 (i387_xsave_to_cache): Likewise.
12473 (x86_xcr0): Likewise.
12474
12475 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12476 * linux-crisv32-low.c (target_regsets): Likewise.
12477 * linux-m68k-low.c (target_regsets): Likewise.
12478 * linux-mips-low.c (target_regsets): Likewise.
12479 * linux-ppc-low.c (target_regsets): Likewise.
12480 * linux-s390-low.c (target_regsets): Likewise.
12481 * linux-sh-low.c (target_regsets): Likewise.
12482 * linux-sparc-low.c (target_regsets): Likewise.
12483 * linux-xtensa-low.c (target_regsets): Likewise.
12484
12485 * linux-low.c: Include <sys/uio.h>.
12486 (regsets_fetch_inferior_registers): Support nt_type.
12487 (regsets_store_inferior_registers): Likewise.
12488 (linux_process_qsupported): New.
12489 (linux_target_ops): Add linux_process_qsupported.
12490
12491 * linux-low.h (regset_info): Add nt_type.
12492 (linux_target_ops): Add process_qsupported.
12493
12494 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12495 and <sys/uio.h>.
12496 (init_registers_i386_avx_linux): New.
12497 (init_registers_amd64_avx_linux): Likewise.
12498 (xmltarget_i386_linux_no_xml): Likewise.
12499 (xmltarget_amd64_linux_no_xml): Likewise.
12500 (PTRACE_GETREGSET): Likewise.
12501 (PTRACE_SETREGSET): Likewise.
12502 (x86_fill_xstateregset): Likewise.
12503 (x86_store_xstateregset): Likewise.
12504 (use_xml): Likewise.
12505 (x86_linux_update_xmltarget): Likewise.
12506 (x86_linux_process_qsupported): Likewise.
12507 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12508 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12509 init_registers_i386_linux here. Call
12510 x86_linux_update_xmltarget.
12511 (the_low_target): Add x86_linux_process_qsupported.
12512
12513 * server.c (handle_query): Call target_process_qsupported.
12514
12515 * target.h (target_ops): Add process_qsupported.
12516 (target_process_qsupported): New.
12517
fc7238bb
PA
125182010-04-03 Pedro Alves <pedro@codesourcery.com>
12519
12520 * inferiors.c (add_thread): Set last_status kind to
12521 TARGET_WAITKIND_IGNORE.
12522 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12523 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12524 (linux_wait_1): Move `thread' local definition to block that uses
12525 it. Don't NULL initialize `event_child'.
12526 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12527 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12528 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12529
bdabb078
PA
125302010-04-01 Pedro Alves <pedro@codesourcery.com>
12531
12532 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12533 an extended waitstatus, or by a watchpoint.
12534 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12535 thread was stepping or has been stopped by a watchpoint.
12536
d3bbe7a0
PA
125372010-04-01 Pedro Alves <pedro@codesourcery.com>
12538
12539 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12540 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12541 of another, then delete the previous, and validate all
12542 breakpoints.
12543 (validate_inserted_breakpoint): New.
12544 (delete_disabled_breakpoints): New.
12545 (validate_breakpoints): New.
12546 (check_mem_read): Validate breakpoints before trusting their
12547 shadow. Delete disabled breakpoints.
12548 (check_mem_write): Validate breakpoints before trusting they
12549 should be inserted. Delete disabled breakpoints.
12550 * mem-break.h (validate_breakpoints):
12551 * server.c (handle_query): Validate breakpoints when we see a
12552 qSymbol query.
12553
8b07ae33
PA
125542010-04-01 Pedro Alves <pedro@codesourcery.com>
12555
12556 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12557 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12558 if we could tell there's a GDB breakpoint at stop_pc.
12559 (need_step_over_p): Don't do a step over if we find a GDB
12560 breakpoint at the resume PC.
12561
12562 * mem-break.c (struct raw_breakpoint): New.
12563 (enum bkpt_type): New type `gdb_breakpoint'.
12564 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12565 fields. New field `raw'.
12566 (find_raw_breakpoint_at): New.
12567 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12568 breakpoint instead.
12569 (set_breakpoint_at): Adjust.
12570 (delete_raw_breakpoint): New.
12571 (release_breakpoint): New.
12572 (delete_breakpoint): Rename to...
12573 (delete_breakpoint_1): ... this. Add proc parameter. Use
12574 release_breakpoint. Return ENOENT.
12575 (delete_breakpoint): Reimplement.
12576 (find_breakpoint_at): Delete.
12577 (find_gdb_breakpoint_at): New.
12578 (delete_breakpoint_at): Delete.
12579 (set_gdb_breakpoint_at): New.
12580 (delete_gdb_breakpoint_at): New.
12581 (gdb_breakpoint_here): New.
12582 (set_reinsert_breakpoint): Use release_breakpoint.
12583 (uninsert_breakpoint): Rename to ...
12584 (uninsert_raw_breakpoint): ... this.
12585 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12586 (reinsert_raw_breakpoint): Change parameter type to
12587 raw_breakpoint.
12588 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12589 instead.
12590 (check_breakpoints): Adjust. Use release_breakpoint.
12591 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12592 (breakpoint_inserted_here): Ditto.
12593 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12594 Don't trust the breakpoint's shadow if it is not inserted.
12595 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12596 (delete_all_breakpoints): Adjust.
12597 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12598 use delete_breakpoint_1.
12599
12600 * mem-break.h (breakpoints_supported): Delete declaration.
12601 (set_gdb_breakpoint_at): Declare.
12602 (gdb_breakpoint_here): Declare.
12603 (delete_breakpoint_at): Delete.
12604 (delete_gdb_breakpoint_at): Declare.
12605
12606 * server.h (struct raw_breakpoint): Forward declare.
12607 (struct process_info): New field `raw_breakpoints'.
12608
12609 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12610 breakpoints.
12611
6bf5e0ba
PA
126122010-03-24 Pedro Alves <pedro@codesourcery.com>
12613
12614 * linux-low.c (status_pending_p_callback): Fix comment.
12615 (linux_wait_for_event_1): Move most of the internal breakpoint
12616 handling from here...
12617 (linux_wait_1): ... to here.
12618 (count_events_callback): New.
12619 (select_singlestep_lwp_callback): New.
12620 (select_event_lwp_callback): New.
12621 (cancel_breakpoints_callback): New.
12622 (select_event_lwp): New.
12623 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12624 priority to all LWPs that have had events that should be reported
12625 to the client. Cancel breakpoints when about to reporting the
12626 event to the client, not while stopping lwps. No longer cancel
12627 finished single-steps here.
12628 (cancel_finished_single_step): Delete.
12629 (cancel_finished_single_steps): Delete.
12630
414a389f
PA
126312010-03-24 Pedro Alves <pedro@codesourcery.com>
12632
12633 * mem-break.c (enum bkpt_type): New.
12634 (struct breakpoint): New field `type'.
12635 (set_breakpoint_at): Change return type to struct breakpoint
12636 pointer. Set type to `other_breakpoint' by default.
12637 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12638 in the breakpoint list.
12639 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12640 (reinsert_breakpoint): Rename to ...
12641 (reinsert_raw_breakpoint): ... this.
12642 (reinsert_breakpoints_at): Adjust.
12643 * mem-break.h (struct breakpoint): Declare.
12644 (set_breakpoint_at): Change return type to struct breakpoint
12645 pointer.
12646
2280c721
PA
126472010-03-24 Pedro Alves <pedro@codesourcery.com>
12648
12649 * server.c (handle_query): Assign, not compare.
12650
d50171e4
PA
126512010-03-24 Pedro Alves <pedro@codesourcery.com>
12652
12653 Teach linux gdbserver to step-over-breakpoints.
12654
12655 * linux-low.c (can_hardware_single_step): New.
12656 (supports_breakpoints): New.
12657 (handle_extended_wait): If stopping threads, read the stop pc of
12658 the new cloned LWP.
12659 (get_pc): New.
12660 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12661 low target doesn't support retrieving the PC.
12662 (add_lwp): Set last_resume_kind to resume_continue.
12663 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12664 (linux_attach): Don't clear stop_expected. Set the lwp's
12665 last_resume_kind to resume_stop.
12666 (linux_detach_one_lwp): Don't check for removed breakpoints.
12667 (check_removed_breakpoint): Delete.
12668 (status_pending_p): Rename to ...
12669 (status_pending_p_callback): ... this. Don't check for removed
12670 breakpoints. Don't consider threads that are stopped from GDB's
12671 perspective.
12672 (linux_wait_for_lwp): Always read the stop_pc here.
12673 (cancel_breakpoint): New.
12674 (step_over_bkpt): New global.
12675 (linux_wait_for_event_1): Implement stepping over breakpoints.
12676 (gdb_wants_lwp_stopped): New.
12677 (gdb_wants_all_stopped): New.
12678 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12679 single-step traps here. Store the thread's last reported target
12680 wait status.
12681 (send_sigstop): Don't clear stop_expected. Always set it,
12682 instead.
12683 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12684 (cancel_finished_single_step): New.
12685 (cancel_finished_single_steps): New.
12686 (wait_for_sigstop): Don't cancel finished single-step traps here.
12687 (linux_resume_one_lwp): Don't check for removed breakpoints.
12688 Don't set `step' on non-hardware step archs.
12689 (linux_set_resume_request): Ignore resume_stop requests if already
12690 stopping or stopped. Set the lwp's last_resume_kind.
12691 (resume_status_pending_p): Don't check for removed breakpoints.
12692 (need_step_over_p): New.
12693 (start_step_over): New.
12694 (finish_step_over): New.
12695 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12696 requests. Clear the thread's last reported target waitstatus.
12697 Don't use the `suspended' flag. Don't consider pending breakpoints.
12698 (linux_resume): Start a step-over if necessary.
12699 (proceed_one_lwp): New.
12700 (proceed_all_lwps): New.
12701 (unstop_all_lwps): New.
12702 * linux-low.h (struct lwp_info): Rewrite comment for the
12703 `suspended' flag. Add the `stop_pc' field. Delete the
12704 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12705 Add `'last_resume_kind' and `need_step_over' fields.
12706 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12707 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12708 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12709 (set_raw_breakpoint_at): New.
12710 (set_breakpoint_at): Rewrite to use it.
12711 (reinsert_breakpoint_handler): Delete.
12712 (set_reinsert_breakpoint): New.
12713 (reinsert_breakpoint_by_bp): Delete.
12714 (delete_reinsert_breakpoints): New.
12715 (uninsert_breakpoint): Rewrite.
12716 (uninsert_breakpoints_at): New.
12717 (reinsert_breakpoint): Rewrite.
12718 (reinsert_breakpoints_at): New.
12719 (check_breakpoints): Rewrite.
12720 (breakpoint_here): New.
12721 (breakpoint_inserted_here): New.
12722 (check_mem_read): Adjust.
12723 * mem-break.h (breakpoints_supported, breakpoint_here)
12724 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12725 (reinsert_breakpoint_by_bp): Delete declaration.
12726 (delete_reinsert_breakpoints): Declare.
12727 (reinsert_breakpoint): Delete declaration.
12728 (reinsert_breakpoints_at): Declare.
12729 (uninsert_breakpoint): Delete declaration.
12730 (uninsert_breakpoints_at): Declare.
12731 (check_breakpoints): Adjust prototype.
12732 * server.h: Adjust include order.
12733 (struct thread_info): Declare here. Add a `last_status' field.
12734
30ba68cb
MS
127352010-03-23 Michael Snyder <msnyder@vmware.com>
12736
12737 * server.c (crc32): New function.
12738 (handle_query): Add handling for 'qCRC:' request.
12739
b9a881c2
PA
127402010-03-23 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12743 lwp had been stopped by a watchpoint.
12744
e92d13d5
PA
127452010-03-16 Pedro Alves <pedro@codesourcery.com>
12746
12747 * server.h (internal_error): Declare.
12748 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12749 * utils.c (internal_error): New function.
12750
64daa791
AS
127512010-03-15 Andreas Schwab <schwab@redhat.com>
12752
12753 * configure.srv: Fix typo setting srv_regobj.
12754
f52cd8cd
PA
127552010-03-15 Pedro Alves <pedro@codesourcery.com>
12756
12757 * linux-low.c (fetch_register): Avoid passing a non string literal
12758 format to `error'.
12759 (usr_store_inferior_registers): Ditto.
12760
93ae6fdc
PA
127612010-03-14 Pedro Alves <pedro@codesourcery.com>
12762
12763 * linux-low.c (linux_write_memory): Bail out early if peeking
12764 memory failed.
12765
c3adc08c
PA
127662010-03-14 Pedro Alves <pedro@codesourcery.com>
12767
12768 * linux-low.h (struct lwp_info): New fields
12769 `stopped_by_watchpoint' and `stopped_data_address'.
12770 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12771 here, and cache them in the lwp object.
12772 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12773 directly.
12774 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12775 field.
12776 (linux_stopped_by_watchpoint): Rewrite.
12777 (linux_stopped_data_address): Rewrite.
12778
bce522a2
PA
127792010-03-06 Simo Melenius <simo.melenius@iki.fi>
12780
12781 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12782 switching the current inferior, not before.
12783
90884b2b
L
127842010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12785
12786 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12787 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12788 i386-linux.c and amd64-linux.c.
12789 (reg-i386.o): Removed.
12790 (reg-i386.c): Likewise.
12791 (reg-i386-linux.o): Likewise.
12792 (reg-i386-linux.c): Likewise.
12793 (reg-x86-64.o): Likewise.
12794 (reg-x86-64.c): Likewise.
12795 (reg-x86-64-linux.o): Likewise.
12796 (reg-x86-64-linux.c): Likewise.
12797 (i386.o): New.
12798 (i386.c): Likewise.
12799 (i386-linux.o): Likewise.
12800 (i386-linux.c): Likewise.
12801 (amd64.o): Likewise.
12802 (amd64.c): Likewise.
12803 (amd64-linux.o): Likewise.
12804 (amd64-linux.c): Likewise.
12805
12806 * configure.srv (srv_i386_regobj): New.
12807 (srv_i386_linux_regobj): Likewise.
12808 (srv_amd64_regobj): Likewise.
12809 (srv_amd64_linux_regobj): Likewise.
12810 (srv_i386_32bit_xmlfiles): Likewise.
12811 (srv_i386_64bit_xmlfiles): Likewise.
12812 (srv_i386_xmlfiles): Likewise.
12813 (srv_amd64_xmlfiles): Likewise.
12814 (srv_i386_linux_xmlfiles): Likewise.
12815 (srv_amd64_linux_xmlfiles): Likewise.
12816 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12817 srv_xmlfiles to $srv_i386_xmlfiles.
12818 (i[34567]86-*-mingw32ce*): Likewise.
12819 (i[34567]86-*-mingw*): Likewise.
12820 (i[34567]86-*-nto*): Likewise.
12821 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12822 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12823 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12824 (x86_64-*-linux*): Likewise.
12825
12826 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12827 (init_registers_amd64_linux): New.
12828 (x86_arch_setup): Replace init_registers_x86_64_linux with
12829 init_registers_amd64_linux.
12830
193f13e6
MK
128312010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12832
12833 * configure.ac: Check for libdl. If it is not available link against
12834 static libthread_db.
12835 * configure: Regenerate.
12836
85d721b8
PA
128372010-02-22 Pedro Alves <pedro@codesourcery.com>
12838
12839 PR9605
12840
12841 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12842 handing a read watchpoint.
12843 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12844
6076632b
DE
128452010-02-12 Doug Evans <dje@google.com>
12846
12847 * linux-low.c (linux_supports_tracefork_flag): Document.
12848 (linux_look_up_symbols): Add comment.
12849
3327ccf7
L
128502010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12851
12852 * regcache.c (supply_register): Clear regcache if buf is NULL.
12853
0718675c 128542010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12855 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12856
12857 * inferiors.c (find_inferior): Add function documentation.
12858 (unloaded_dll): Handle the case where the unloaded dll has not
12859 been previously registered in the dll list.
12860
177321bd
DJ
128612010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12864 (thumb2_breakpoint): New.
12865 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12866
2b009048
DJ
128672010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12870 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12871 breakpoints.
12872
3be029c7
PA
128732010-01-21 Pedro Alves <pedro@codesourcery.com>
12874
12875 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12876
18f5de3b
JK
128772010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12878
12879 * linux-s390-low.c (s390_collect_ptrace_register)
12880 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12881
3743bb4f
DE
128822010-01-21 Doug Evans <dje@google.com>
12883
14ce3065
DE
12884 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12885 (PTRACE_ARG4_TYPE): New macro.
12886 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12887 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12888 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12889 (usr_store_inferior_registers): Ditto.
12890 (linux_read_memory, linux_write_memory): Ditto.
12891 (linux_test_for_tracefork): Ditto.
12892
3743bb4f
DE
12893 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12894 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12895
8b315be5
PA
128962010-01-21 Pedro Alves <pedro@codesourcery.com>
12897
12898 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12899 target.
12900
85492558
PA
129012010-01-21 Pedro Alves <pedro@codesourcery.com>
12902
12903 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12904 prototype to take a regcache. Adjust.
12905
442ea881
PA
129062010-01-20 Pedro Alves <pedro@codesourcery.com>
12907
12908 * regcache.h (struct thread_info): Forward declare.
12909 (struct regcache): New.
12910 (new_register_cache): Adjust prototype.
12911 (get_thread_regcache): Declare.
12912 (free_register_cache): Adjust prototype.
12913 (registers_to_string, registers_from_string): Ditto.
12914 (supply_register, supply_register_by_name, collect_register)
12915 (collect_register_as_string, collect_register_by_name): Ditto.
12916 * regcache.c (struct inferior_regcache_data): Delete.
12917 (get_regcache): Rename to ...
12918 (get_thread_regcache): ... this. Adjust. Switch inferior before
12919 fetching registers.
12920 (regcache_invalidate_one): Adjust.
12921 (regcache_invalidate): Fix prototype.
12922 (new_register_cache): Return the new register cache.
12923 (free_register_cache): Change prototype.
12924 (realloc_register_cache): Adjust.
12925 (registers_to_string): Change prototype to take a regcache. Adjust.
12926 (registers_from_string): Ditto.
12927 (register_data): Ditto.
12928 (supply_register): Ditto.
12929 (supply_register_by_name): Ditto.
12930 (collect_register): Ditto.
12931 (collect_register_as_string): Ditto.
12932 (collect_register_by_name): Ditto.
12933 * server.c (process_serial_event): Adjust.
12934 * linux-low.h (regset_fill_func, regset_store_func): Change
12935 prototype.
12936 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12937 Change prototype.
12938 * linux-low.c (get_stop_pc): Adjust.
12939 (check_removed_breakpoint): Adjust.
12940 (linux_wait_for_event): Adjust.
12941 (linux_resume_one_lwp): Adjust.
12942 (fetch_register): Add regcache parameter. Adjust.
12943 (usr_store_inferior_registers): Ditto.
12944 (regsets_fetch_inferior_registers): Ditto.
12945 (regsets_store_inferior_registers): Ditto.
12946 (linux_fetch_registers, linux_store_registers): Ditto.
12947 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12948 regcache. Adjust.
43aaf8b6
PA
12949 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12950 Ditto.
442ea881
PA
12951 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12952 prototype to take a regcache.
12953 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12954 * remote-utils.c (convert_ascii_to_int, outreg)
12955 (prepare_resume_reply): Change prototype to take a regcache.
12956 Adjust.
12957 * target.h (struct target_ops) <fetch_registers, store_registers>:
12958 Change prototype to take a regcache.
12959 (fetch_inferior_registers, store_inferior_registers): Change
12960 prototype to take a regcache. Adjust.
12961 * proc-service.c (ps_lgetregs): Adjust.
12962 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12963 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12964 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12965 take a regcache. Adjust.
12966 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12967 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12968 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12969 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12970 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12971 (cris_cannot_fetch_register):
12972 (cris_breakpoint_at): Change prototype to take a regcache.
12973 Adjust.
12974 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12975 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12976 to take a regcache. Adjust.
12977 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12978 Adjust.
12979 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12980 take a regcache. Adjust.
12981 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12982 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12983 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12984 * linux-mips-low.c (mips_get_pc):
12985 (mips_set_pc): Change prototype to take a regcache. Adjust.
12986 (mips_reinsert_addr): Adjust.
12987 (mips_collect_register): Change prototype to take a regcache.
12988 Adjust.
12989 (mips_supply_register):
12990 (mips_collect_register_32bit, mips_supply_register_32bit)
12991 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12992 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12993 * linux-ppc-low.c (ppc_supply_ptrace_register)
12994 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12995 (parse_spufs_run): Adjust.
12996 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12997 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12998 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12999 take a regcache. Adjust.
13000 * linux-s390-low.c (s390_collect_ptrace_register)
13001 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13002 (s390_set_pc): Change prototype to take a regcache. Adjust.
13003 (s390_arch_setup): Adjust.
13004 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13005 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13006 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13007 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13008 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13009 regcache. Adjust.
13010 (sparc_breakpoint_at): Adjust.
13011 * linux-xtensa-low.c (xtensa_fill_gregset):
13012 (xtensa_store_gregset):
13013 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13014 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13015 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13016 prototype to take a regcache. Adjust.
13017 * win32-arm-low.c (arm_fetch_inferior_register)
13018 (arm_store_inferior_register): Change prototype to take a
13019 regcache. Adjust.
13020 * win32-i386-low.c (i386_fetch_inferior_register)
13021 (i386_store_inferior_register): Change prototype to take a
13022 regcache. Adjust.
13023 * win32-low.c (child_fetch_inferior_registers)
13024 (child_store_inferior_registers): Change prototype to take a
13025 regcache. Adjust.
13026 (win32_wait): Adjust.
13027 (win32_fetch_inferior_registers): Change prototype to take a
13028 regcache. Adjust.
13029 (win32_store_inferior_registers): Adjust.
13030 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13031 store_inferior_register>: Change prototype to take a regcache.
13032
60c3d7b0
DE
130332010-01-20 Doug Evans <dje@google.com>
13034
13035 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13036 #ifdef.
13037 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13038 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13039
dc146f7c
VP
130402010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13041
13042 * linux-low.c (linux_core_of_thread): New.
13043 (compare_ints, show_process, list_threads): New.
13044 (linux_qxfer_osdata): Report threads and cores.
13045 (linux_target_op): Register linux_core_of_thread.
13046 * remote-utils.c (prepare_resume_reply): Report the core.
13047 (buffer_xml_printf): Support %d specifier.
13048 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13049 New.
13050 (handle_query): Handle qXfer:threads. Announce availability
13051 thereof.
13052 * target.h (struct target_ops): New field core_of_thread.
13053
7803799a
UW
130542010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13055
13056 * Makefile.in (clean): Remove new generated files.
13057 (reg-s390.o, reg-s390.c): Remove rules.
13058 (reg-s390x.o, reg-s390x.c): Likewise.
13059 (s390-linux32.o, s390-linux32.c): Add rules.
13060 (s390-linux64.o, s390-linux64.c): Likewise.
13061 (s390x-linux64.o, s390x-linux64.c): Likewise.
13062 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13063 * linux-s390-low.c: Include <elf.h>.
13064 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13065 (init_registers_s390): Remove prototype.
13066 (init_registers_s390x): Likewise.
13067 (init_registers_s390_linux32): Add prototype.
13068 (init_registers_s390_linux64): Likewise.
13069 (init_registers_s390x_linux64): Likewise.
13070 (s390_num_regs_3264): New define.
13071 (s390_regmap_3264): New global variable.
13072 (s390_cannot_fetch_register): Remove obsolete check.
13073 (s390_cannot_store_register): Likewise.
13074 (s390_collect_ptrace_register): Handle upper/lower register halves.
13075 (s390_supply_ptrace_register): Likewise.
13076 (s390_fill_gregset): Update to register number changes.
13077 (s390_get_hwcap): New routine.
13078 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13079 Install appropriate regmap and register set.
13080
6e7ffa39
JB
130812010-01-01 Joel Brobecker <brobecker@adacore.com>
13082
13083 * server.c (gdbserver_version): Update copyright year to 2010.
13084 * gdbreplay.c (gdbreplay_version): Likewise.
13085
957f3f49
DE
130862009-12-28 Doug Evans <dje@google.com>
13087
13088 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13089 elf/external.h. Include <elf.h> instead but only if necessary.
13090
ca5c370d
PA
130912009-12-28 Pedro Alves <pedro@codesourcery.com>
13092
13093 * linux-low.c (linux_remove_process): Remove `detaching'
13094 parameter. Don't release/detach from thread_db here.
13095 (linux_kill): Release/detach from thread_db here, ...
13096 (linux_detach): ... and here, before actually detaching.
13097 (linux_wait_1): ... and here, when a process exits.
13098 * thread-db.c (any_thread_of): New.
13099 (thread_db_free): Switch the current inferior to a thread of the
13100 passed in process.
13101
4ee62156
DE
131022009-12-21 Doug Evans <dje@google.com>
13103
d90e6a88
DE
13104 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13105
c5f62d5f
DE
13106 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13107 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13108 warning ifndef __NR_tkill. Move setting of errno there too.
13109 Delete unnecessary resetting of errno after syscall.
13110 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13111
10e86dd7
DE
13112 * configure.ac: Check for dladdr.
13113 * config.in: Regenerate.
13114 * configure: Regenerate.
13115 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13116 (try_thread_db_load): Update.
13117
4ee62156
DE
13118 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13119
00f515da
DE
131202009-12-18 Doug Evans <dje@google.com>
13121
e9464885
DE
13122 * event-loop.c: Include unistd.h if it exists.
13123
07d4f67e
DE
13124 * linux-low.c (my_waitpid): Move definition away from being in
13125 between linux_tracefork_child/linux_test_for_tracefork.
13126
00f515da
DE
13127 * gdb_proc_service.h (psaddr_t): Fix type.
13128 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13129 signature to match glibc.
13130
1de1badb
DE
131312009-12-16 Doug Evans <dje@google.com>
13132
13133 * linux-low.c (linux_read_memory): Fix argument to read.
13134
aeeb81d1
PA
131352009-11-26 Pedro Alves <pedro@codesourcery.com>
13136
13137 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13138 events, don't leave current_inferior pointing at null.
13139
10357975
PA
131402009-11-26 Pedro Alves <pedro@codesourcery.com>
13141
13142 * win32-low.c (LOG): Delete.
13143 (OUTMSG): Output to stderr.
13144 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13145 on compile time LOG macro.
13146 (win32_wait): Fix debug output.
13147
cf6e3471
PA
131482009-11-26 Pedro Alves <pedro@codesourcery.com>
13149
13150 * win32-low.c (win32_add_one_solib): If the dll name is
13151 "ntdll.dll", prepend the system directory to the dll path.
13152
0c85e18e
MK
131532009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13154
13155 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13156
9ac544ce 131572009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13158 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13159
13160 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13161 * configure.ac: Check for __mcoldfire__ and set
13162 gdb_cv_m68k_is_coldfire.
13163 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13164 reg-cf.o and reg-m68k.o.
13165 * configure: Regenerated.
13166
fd7dd3e6
PA
131672009-11-16 Pedro Alves <pedro@codesourcery.com>
13168
13169 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13170 Pass it to thread_db_free.
13171 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13172 proper `detaching' argument to linux_remove_process.
13173 * linux-low.h (thread_db_free): Add `detaching' parameter.
13174 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13175 to thread_db_free.
13176 (thread_db_free): Add `detaching' parameter. Only
13177 call td_ta_clear_event if detaching from process.
13178
75aa492e
MK
131792009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13180
13181 * thread-db.c (thread_db_free): Fix typo.
13182
21e1bee4
PP
131832009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13184
13185 PR gdb/10838
13186 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13187
8838b45e
NS
131882009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13189
13190 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13191 with an i686 compiler.
13192 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13193 needed.
13194 * configure: Rebuilt.
13195
8a35fb51
SL
131962009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13197
13198 PR gdb/10783
13199
13200 * server.c (handle_search_memory_1): Correct read_addr initialization
13201 in loop for searching subsequent chunks.
13202
96f15937
PP
132032009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13204
13205 * configure.ac: New --with-libthread-db option.
13206 * thread-db.c: Allow direct dependence on libthread_db.
13207 (thread_db_free): Adjust.
13208 * config.in: Regenerate.
13209 * configure: Likewise.
889bf7c5 13210
5f7d1694
PP
132112009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13212
13213 PR gdb/10757
13214 * thread-db.c (attach_thread): New function.
13215 (maybe_attach_thread): Return success/failure.
13216 (find_new_threads_callback): Adjust.
889bf7c5
PA
13217 (thread_db_find_new_threads): Loop until no new threads.
13218
88e3b899
PA
132192009-10-13 Pedro Alves <pedro@codesourcery.com>
13220
13221 * proc-service.c (ps_lgetregs): Formatting.
13222
cdbfd419
PP
132232009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13224
13225 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13226 * configure.ac: Adjust.
13227 * linux-low.h (struct process_info_private): Move members to struct
13228 thread_db.
13229 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13230 * linux-low.c (linux_remove_process): Adjust.
13231 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13232 * server.c (handle_query): Move code ...
13233 (handle_monitor_command): ... here. New function.
13234 * target.h (struct target_ops): New member.
13235 * thread-db.c (struct thread_db): New.
13236 (libthread_db_search_path): New variable.
13237 (thread_db_create_event, thread_db_enable_reporting)
13238 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13239 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13240 (try_thread_db_load_1, dladdr_to_soname): New functions.
13241 (try_thread_db_load, thread_db_load_search): New functions.
13242 (thread_db_init): Search for libthread_db.
13243 (thread_db_free): New function.
13244 (thread_db_handle_monitor_command): Likewise.
13245 * config.in: Regenerate.
13246 * configure: Regenerate.
889bf7c5 13247
4168d2d6
UW
132482009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13249
13250 * spu-low.c (spu_kill): Wait for inferior to terminate.
13251 Call clear_inferiors.
13252 (spu_detach): Call clear_inferiors.
13253
81ecdfbb
RW
132542009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13255
13256 * aclocal.m4: Regenerate.
13257 * config.in: Likewise.
13258 * configure: Likewise.
13259
0b9ff2c0
UW
132602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13261
13262 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13263 (parse_spufs_run): New function.
13264 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13265 (ppc_breakpoint_at): Handle SPU breakpoints.
13266
efcbbd14
UW
132672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13268
13269 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13270 (SPUFS_MAGIC): Define.
13271 (spu_enumerate_spu_ids): New function.
13272 (linux_qxfer_spu): New function.
13273 (linux_target_ops): Install linux_qxfer_spu.
13274
f4d9bade
UW
132752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13276
13277 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13278 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13279 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13280 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13281 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13282 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13283 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13284 (init_registers_powerpc_cell32l): Add prototype.
13285 (init_registers_powerpc_cell64l): Likewise.
13286 (ppc_arch_setup): Detect Cell/B.E. architecture.
13287
96e946ca
RW
132882009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13289
13290 * Makefile.in (datarootdir): New variable.
13291
58d6951d
DJ
132922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * linux-low.c (linux_write_memory): Update debugging output.
13295 * Makefile.in (clean): Add new descriptions.
13296 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13297 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13298 * configure.srv: Add new files for arm*-*-linux*.
13299 * linux-arm-low.c: Add new declarations.
13300 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13301 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13302 (HWCAP_VFPv3D16): New.
13303 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13304 instead of __IWMMXT__.
13305 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13306 (arm_arch_setup): New.
13307 (target_regsets): Remove #ifdef. Add VFP regset.
13308 (the_low_target): Use arm_arch_setup.
13309
12b42a12
DJ
133102009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13311
13312 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13313 the main thread again.
13314
ac8c974e
AR
133152009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13316
13317 Adding Neutrino gdbserver.
13318 * configure: Regenerated.
13319 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13320 * configure.srv (i[34567]86-*-nto*): New target.
13321 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13322 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13323 (nto_comctrl) [__QNX__]: New function.
13324 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13325
4424e0c3 133262009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13327
13328 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13329 srv_tgtobj.
13330
912cf4ba
PA
133312009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13332 Pedro Alves <pedro@codesourcery.com>
13333
13334 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13335 don't support CONTEXT_EXTENDED_REGISTERS.
13336 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13337 (the_low_target): Install them.
13338 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13339 failing with ERROR_PIPE_NOT_CONNECTED.
13340
aa5ca48f
DE
133412009-06-30 Doug Evans <dje@google.com>
13342 Pierre Muller <muller@ics.u-strasbg.fr>
13343
13344 Add h/w watchpoint support to x86-linux, win32-i386.
13345 * Makefile.in (SFILES): Add i386-low.c
13346 (i386_low_h): Define.
13347 (i386-low.o): Add dependencies.
13348 (linux-x86-low.o): Add i386-low.h dependency.
13349 (win32-i386-low.o): Ditto.
13350 * i386-low.c: New file.
13351 * i386-low.h: New file.
13352 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13353 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13354 * linux-low.c (linux_add_process): Initialize arch_private.
13355 (linux_remove_process): Free arch_private.
13356 (add_lwp): Initialize arch_private.
13357 (delete_lwp): Free arch_private.
13358 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13359 provided.
13360 * linux-low.h (process_info_private): New member arch_private.
13361 (lwp_info): New member arch_private.
13362 (linux_target_ops): New members new_process, new_thread,
13363 prepare_to_resume.
13364 (ptid_of): New macro.
13365 * linux-x86-low.c: Include stddef.h, i386-low.h.
13366 (arch_process_info): New struct.
13367 (arch_lwp_info): New struct.
13368 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13369 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13370 (i386_dr_low_get_status): New function.
13371 (x86_insert_point, x86_remove_point): New functions.
13372 (x86_stopped_by_watchpoint): New function.
13373 (x86_stopped_data_address): New function.
13374 (x86_linux_new_process, x86_linux_new_thread): New functions.
13375 (x86_linux_prepare_to_resume): New function.
13376 (the_low_target): Add entries for insert_point, remove_point,
13377 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13378 prepare_to_resume.
13379 * server.c (debug_hw_points): New global.
13380 (monitor_show_help): Document set debug-hw-points.
13381 (handle_query): Process "set debug-hw-points".
13382 * server.h (debug_hw_points): Declare.
13383 (paddress): Declare.
13384 * utils.c (NUMCELLS, CELLSIZE): New macros.
13385 (get_sell, xsnprintf, paddress): New functions.
13386 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13387 remove_point, stopped_by_watchpoint, stopped_data_address.
13388 * win32-i386-low.c: Include i386-low.h.
13389 (debug_reg_state): Replaces dr.
13390 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13391 (i386_dr_low_get_status): New function.
13392 (i386_insert_point, i386_remove_point): New functions.
13393 (i386_stopped_by_watchpoint): New function.
13394 (i386_stopped_data_address): New function.
13395 (i386_initial_stuff): Update.
13396 (get_thread_context,set_thread_context,i386_thread_added): Update.
13397 (the_low_target): Add entries for insert_point,
13398 remove_point, stopped_by_watchpoint, stopped_data_address.
13399 * win32-low.c (win32_insert_watchpoint): New function.
13400 (win32_remove_watchpoint): New function.
13401 (win32_stopped_by_watchpoint): New function.
13402 (win32_stopped_data_address): New function.
13403 (win32_target_ops): Add entries for insert_watchpoint,
13404 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13405 * win32-low.h (win32_target_ops): New members insert_point,
13406 remove_point, stopped_by_watchpoint, stopped_data_address.
13407
d993e290
PA
134082009-06-25 Pedro Alves <pedro@codesourcery.com>
13409
13410 * server.c (process_serial_event): Re-return unsupported, not
13411 error, if the type isn't recognized. Re-allow supporting only
13412 insert or remove packets. Also call require_running for
13413 breakpoints. Add missing break statement to default case. Tidy.
13414 * target.h (struct target_ops): Rename insert_watchpoint to
13415 insert_point, and remove_watchpoint to remove_point.
13416
13417 * linux-low.h (struct linux_target_ops): Likewise.
13418 * linux-low.c (linux_insert_watchpoint): Rename to ...
13419 (linux_insert_point): ... this. Adjust.
13420 (linux_remove_watchpoint): Rename to ...
13421 (linux_remove_point): ... this. Adjust.
13422 (linux_target_ops): Adjust.
13423 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13424 (cris_insert_point): ... this.
13425 (cris_remove_watchpoint): Rename to ...
13426 (cris_remove_point): ... this.
13427 (the_low_target): Adjust.
13428
0f54c268
PM
134292009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13430
13431 * server.c (handle_v_kill): Pass signal_pid to
13432 kill_inferior if multi_process is zero.
13433
c6314022
AR
134342009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13435
13436 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13437 * target.h (target_ops): Comment for *_watchpoint to make it clear
13438 the functions can get types '0' and '1'.
13439
4463ce24
AR
134402009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13441
13442 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13443 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13444 * regcache.c (get_regcache): Likewise.
13445 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13446 * win32-low.c (child_fetch_inferior_registers): Remove check for
13447 regno 0.
13448
cf8fd78b
PA
134492009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13450 Pedro Alves <pedro@codesourcery.com>
13451
13452 * target.h (struct target_ops) <supports_multi_process>: New
13453 callback.
13454 (target_supports_multi_process): New.
13455 * server.c (handle_query): Even if GDB reports support, only
13456 enable multi-process if the target also supports it. Report
13457 multi-process support only if the target backend supports it.
13458 * linux-low.c (linux_supports_multi_process): New function.
13459 (linux_target_ops): Install it as target_supports_multi_process
13460 callback.
13461
47c0c975
DE
134622009-05-24 Doug Evans <dje@google.com>
13463
e09875d4
DE
13464 Global renaming of find_thread_pid to find_thread_ptid.
13465 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13466 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13467 All callers updated.
13468
e27d73f6
DE
13469 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13470 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13471 directly.
13472
47c0c975
DE
13473 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13474 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13475 (linux_resume_one_lwp): Ditto.
13476
2acc282a
DE
134772009-05-23 Doug Evans <dje@google.com>
13478
13479 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13480 from struct inferior_list_entry * to struct lwp_info *.
13481 All callers updated.
13482
9f1036c1
DE
134832009-05-13 Doug Evans <dje@google.com>
13484
13485 * linux-x86-low.c: Don't include assert.h.
13486 (x86_siginfo_fixup): Use fatal, not assert.
13487 (x86_arch_setup): Fix comment.
13488
d0722149
DE
134892009-05-12 Doug Evans <dje@google.com>
13490
13491 Biarch support for i386/amd64 gdbserver.
13492 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13493 Add linux-x86-low.c.
13494 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13495 (linux-x86-low.o): Add.
13496 * linux-x86-64-low.c: Delete.
13497 * linux-i386-low.c: Delete.
13498 * linux-x86-low.c: New file.
13499 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13500 linux-x86-low.o.
13501 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13502 linux-x86-low.o.
13503 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13504 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13505 (linux_child_pid_to_exec_file): New function.
13506 (elf_64_header_p, elf_64_file_p): New functions.
13507 (siginfo_fixup): New function.
13508 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13509 give target a chance to convert layout.
13510 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13511 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13512
fdeb2a12
DE
135132009-05-07 Doug Evans <dje@google.com>
13514
13515 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13516 (regsets_store_inferior_registers): Ditto.
13517
a6dbe5df
PA
135182009-05-06 Pedro Alves <pedro@codesourcery.com>
13519
13520 PR server/10048
13521
13522 * linux-low.c (must_set_ptrace_flags): Delete.
13523 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13524 of the global.
13525 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13526 `lwp->must_set_ptrace_flags' instead.
ba42693b 13527 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13528 (linux_wait_1): ... not here.
13529
5091eb23
DE
135302009-04-30 Doug Evans <dje@google.com>
13531
9f767825
DE
13532 * inferiors.c (started_inferior_callback): New function.
13533 (attached_inferior_callback): New function.
13534 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13535 * server.c (print_started_pid, print_attached_pid): New functions.
13536 (detach_or_kill_for_exit): New function.
13537 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13538 * server.h (have_started_inferiors_p): Declare.
13539 (have_attached_inferiors_p): Declare.
13540
5091eb23
DE
13541 * inferiors.c (remove_process): Fix memory leak, free process.
13542 * linux-low.c (linux_remove_process): New function.
13543 (linux_kill): Call it instead of remove_process.
13544 (linux_detach, linux_wait_1): Ditto.
13545
155c8968
PA
135462009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13547
13548 * configure.srv: Add x86 Windows CE target.
13549
7fe519cb
UW
135502009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13551
13552 * inferiors.c (get_thread_process): Make global.
13553 * server.h (get_thread_process): Add prototype.
13554 * thread-db.c (find_one_thread): Use get_thread_process
13555 instead of current_process.
13556 (thread_db_get_tls_address): Do not crash if called when
13557 thread layer is not yet initialized.
13558
5472f405
UW
135592009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13560
13561 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13562 * spu-low.c (current_tid): Rename to ...
13563 (current_ptid): ... this.
13564 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13565 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13566 ptid_get_lwp (current_ptid) instead of current_tid.
13567 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13568 instead of current_tid. Use find_process_pid to verify pid
13569 argument is valid. Pass proper argument to remove_process.
13570 (spu_thread_alive): Compare current_ptid instead of current_tid.
13571 (spu_resume): Likewise.
13572
55ac2b99
PA
135732009-04-02 Pedro Alves <pedro@codesourcery.com>
13574
13575 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13576 variable.
13577
95954743
PA
135782009-04-01 Pedro Alves <pedro@codesourcery.com>
13579
13580 Implement the multiprocess extensions, and add linux multiprocess
13581 support.
13582
13583 * server.h (ULONGEST): Declare.
13584 (struct ptid, ptid_t): New.
13585 (minus_one_ptid, null_ptid): Declare.
13586 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13587 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13588 (struct inferior_list_entry): Change `id' type from unsigned from
13589 to ptid_t.
13590 (struct sym_cache, struct breakpoint, struct
13591 process_info_private): Forward declare.
13592 (struct process_info): Declare.
13593 (current_process): Declare.
13594 (all_processes): Declare.
13595 (initialize_inferiors): Declare.
13596 (add_thread): Adjust to use ptid_t.
13597 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13598 (add_process, remove_process, find_thread_pid): Declare.
13599 (find_inferior_id): Adjust to use ptid_t.
13600 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13601 (multi_process): Declare.
13602 (push_event): Adjust to use ptid_t.
13603 (read_ptid, write_ptid): Declare.
13604 (prepare_resume_reply): Adjust to use ptid_t.
13605 (clear_symbol_cache): Declare.
13606 * inferiors.c (all_processes): New.
13607 (null_ptid, minus_one_ptid): New.
13608 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13609 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13610 (add_thread): Change unsigned long to ptid. Remove gdb_id
13611 parameter. Adjust.
13612 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13613 (gdb_id_to_thread): Rename to ...
13614 (find_thread_pid): ... this. Change unsigned long to ptid.
13615 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13616 (loaded_dll, pull_pid_from_list): Adjust.
13617 (add_process, remove_process, find_process_pid)
13618 (get_thread_process, current_process, initialize_inferiors): New.
13619 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13620 (struct target_waitstatus) <related_pid>: Ditto.
13621 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13622 return type to int.
13623 (struct target_ops) <join>: Add `pid' argument.
13624 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13625 (struct target_ops) <wait>: Add `ptid' field. Change return type
13626 to ptid.
13627 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13628 (mywait): Add `ptid' argument. Change return type to ptid_t.
13629 (target_pid_to_str): Declare.
13630 * target.c (set_desired_inferior): Adjust to use ptids.
13631 (mywait): Add new `ptid' argument. Adjust.
13632 (target_pid_to_str): New.
13633 * mem-break.h (free_all_breakpoints): Declare.
13634 * mem-break.c (breakpoints): Delelete.
13635 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13636 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13637 to use per-process breakpoint list.
13638 (free_all_breakpoints): New.
13639 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13640 (symbol_cache, all_symbols_looked_up): Delete.
13641 (hexchars): New.
13642 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13643 read_ptid): New.
13644 (prepare_resume_reply): Change ptid argument's type from unsigned
13645 long to ptid_t. Adjust. Implement W;process and X;process.
13646 (free_sym_cache, clear_symbol_cache): New.
13647 (look_up_one_symbol): Adjust to per-process symbol cache. *
13648 * server.c (cont_thread, general_thread, step_thread): Change type
13649 to ptid_t.
13650 (attached): Delete.
13651 (multi_process): New.
13652 (last_ptid): Change type to ptid_t.
13653 (struct vstop_notif) <ptid>: Change type to ptid_t.
13654 (queue_stop_reply, push_event): Change `ptid' argument's type to
13655 ptid_t.
13656 (discard_queued_stop_replies): Add `pid' argument.
13657 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13658 changes. Don't reference the `attached' global.
13659 (attach_inferior): Adjust to mywait interface changes.
13660 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13661 features. Handle and report "multiprocess+". Handle
13662 "qAttached:PID".
13663 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13664 changes.
13665 (handle_v_kill): New.
13666 (handle_v_stopped): Adjust to use target_pid_to_str.
13667 (handle_v_requests): Allow multiple attaches and runs when
13668 multiprocess extensions are in effect. Handle "vKill".
13669 (myresume): Adjust to use ptids.
13670 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13671 (handle_status): Adjust to discard_queued_stop_replies interface
13672 change.
13673 (first_thread_of, kill_inferior_callback)
13674 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13675 (main): Call initialize_inferiors. Adjust to use ptids, killing
13676 and detaching from all inferiors. Handle multiprocess packet
13677 variants.
13678 * linux-low.h: Include gdb_proc_service.h.
13679 (struct process_info_private): New.
13680 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13681 <lwpid_of>: Use ptid_get_lwp.
13682 (get_lwp_thread): Adjust.
13683 (struct lwp_info): Add `dead' member.
13684 (find_lwp_pid): Declare.
13685 * linux-low.c (thread_db_active): Delete.
13686 (new_inferior): Adjust comment.
13687 (inferior_pid): Delete.
13688 (linux_add_process): New.
13689 (handle_extended_wait): Adjust.
13690 (add_lwp): Change unsigned long to ptid.
13691 (linux_create_inferior): Add process to processes table. Adjust
13692 to use ptids. Don't set new_inferior here.
13693 (linux_attach_lwp): Rename to ...
13694 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13695 it. Adjust to use ptids.
13696 (linux_attach_lwp): New.
13697 (linux_attach): Add process to processes table. Don't set
13698 new_inferior here.
13699 (struct counter): New.
13700 (second_thread_of_pid_p, last_thread_of_process_p): New.
13701 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13702 multiple processes.
13703 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13704 processes. Remove process from process table.
13705 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13706 to multiple processes.
13707 (any_thread_of): New.
13708 (linux_detach): Add `pid' argument, and handle it. Remove process
13709 from processes table.
13710 (linux_join): Add `pid' argument. Handle it.
13711 (linux_thread_alive): Change unsighed long argument to ptid_t.
13712 Consider dead lwps as not being alive.
13713 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13714 threads we're not interested in.
13715 (same_lwp, find_lwp_pid): New.
13716 (linux_wait_for_lwp): Change `pid' argument's type from int to
13717 ptid_t. Adjust.
13718 (linux_wait_for_event): Rename to ...
13719 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13720 from int to ptid_t. Adjust.
13721 (linux_wait_for_event): New.
13722 (linux_wait_1): Add `ptid' argument. Change return type to
13723 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13724 that exit from the process table.
13725 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13726 Adjust.
13727 (mark_lwp_dead): New.
13728 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13729 stopping all threads, mark its main lwp as dead.
13730 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13731 ptids.
13732 (fetch_register, usr_store_inferior_registers)
13733 (regsets_fetch_inferior_registers)
13734 (regsets_store_inferior_registers, linux_read_memory)
13735 (linux_write_memory): Inline `inferior_pid'.
13736 (linux_look_up_symbols): Adjust to use per-process
13737 `thread_db_active'.
13738 (linux_request_interrupt): Adjust to use ptids.
13739 (linux_read_auxv): Inline `inferior_pid'.
13740 (initialize_low): Don't reference thread_db_active.
13741 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13742 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13743 (ps_getpid): Return the pid of the current inferior.
13744 * thread-db.c (proc_handle, thread_agent): Delete.
13745 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13746 per-process data.
13747 (find_one_thread): Change argument type to ptid_t. Adjust to
13748 per-process data.
13749 (maybe_attach_thread): Adjust to per-process data and ptids.
13750 (thread_db_find_new_threads): Ditto.
13751 (thread_db_init): Ditto.
13752 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13753 processes table. Adjust to use ptids.
13754 (spu_kill, spu_detach): Adjust interface. Remove process from
13755 processes table.
13756 (spu_join, spu_thread_alive): Adjust interface.
13757 (spu_wait): Adjust interface. Remove process from processes
13758 table. Adjust to use ptids.
13759 * win32-low.c (current_inferior_tid): Delete.
13760 (current_inferior_ptid): New.
13761 (debug_event_ptid): New.
13762 (thread_rec): Take a ptid. Adjust.
13763 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13764 (child_delete_thread): Ditto.
13765 (do_initial_child_stuff): Add `attached' argument. Add process to
13766 processes table.
13767 (child_fetch_inferior_registers, child_store_inferior_registers):
13768 Adjust.
13769 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13770 (win32_attach): Pass 1 to do_initial_child_stuff.
13771 (win32_kill): Adjust interface. Remove process from processes
13772 table.
13773 (win32_detach): Ditto.
13774 (win32_join): Adjust interface.
13775 (win32_thread_alive): Take a ptid.
13776 (win32_resume): Adjust to use ptids.
13777 (get_child_debug_event): Ditto.
13778 (win32_wait): Adjust interface. Remove exiting process from
13779 processes table.
13780
bd99dc85
PA
137812009-04-01 Pedro Alves <pedro@codesourcery.com>
13782
13783 Non-stop mode support.
13784
13785 * server.h (non_stop): Declare.
13786 (gdb_client_data, handler_func): Declare.
13787 (delete_file_handler, add_file_handler, start_event_loop):
13788 Declare.
13789 (handle_serial_event, handle_target_event, push_event)
13790 (putpkt_notif): Declare.
13791 * target.h (enum resume_kind): New.
13792 (struct thread_resume): Replace `step' field by `kind' field.
13793 (TARGET_WNOHANG): Define.
13794 (struct target_ops) <wait>: Add `options' argument.
13795 <supports_non_stop, async, start_non_stop>: New fields.
13796 (target_supports_non_stop, target_async): New.
13797 (start_non_stop): Declare.
13798 (mywait): Add `options' argument.
13799 * target.c (mywait): Add `options' argument. Print child exit
13800 notifications here.
13801 (start_non_stop): New.
13802 * server.c (non_stop, own_buf, mem_buf): New globals.
13803 (struct vstop_notif): New.
13804 (notif_queue): New global.
13805 (queue_stop_reply, push_event, discard_queued_stop_replies)
13806 (send_next_stop_reply): New.
13807 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13808 interface changes.
13809 (attach_inferior): In non-stop mode, don't wait for the target
13810 here.
13811 (handle_general_set): Handle QNonStop.
13812 (handle_query): When handling qC, return the current general
13813 thread, instead of the first thread of the list.
13814 (handle_query): If the backend supports non-stop mode, include
13815 QNonStop+ in the qSupported query response.
13816 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13817 and non-stop mode.
13818 (handle_v_attach, handle_v_run): Handle non-stop mode.
13819 (handle_v_stopped): New.
13820 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13821 (myresume): Adjust to use resume_kind. Handle non-stop.
13822 (queue_stop_reply_callback): New.
13823 (handle_status): Handle non-stop mode.
13824 (main): Clear non_stop flag on reconnection. Use the event-loop.
13825 Refactor serial protocol handling from here ...
13826 (process_serial_event): ... to this new function. When GDB
13827 selects any thread, select one here. In non-stop mode, wait until
13828 GDB acks all pending events before exiting.
13829 (handle_serial_event, handle_target_event): New.
13830 * remote-utils.c (remote_open): Install remote_desc in the event
13831 loop.
13832 (remote_close): Remove remote_desc from the event loop.
13833 (putpkt_binary): Rename to...
13834 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13835 (putpkt_binary): New as wrapper around putpkt_binary_1.
13836 (putpkt_notif): New.
13837 (prepare_resume_reply): In non-stop mode, don't change the
13838 general_thread.
13839 * event-loop.c: New.
13840 * Makefile.in (OBJ): Add event-loop.o.
13841 (event-loop.o): New rule.
13842
13843 * linux-low.h (pid_of): Moved here.
13844 (lwpid_of): New.
13845 (get_lwp_thread): Use lwpid_of.
13846 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13847 * linux-low.c (pid_of): Delete.
13848 (inferior_pid): Use lwpid_of.
13849 (linux_event_pipe): New.
13850 (target_is_async_p): New.
13851 (delete_lwp): New.
13852 (handle_extended_wait): Use lwpid_of.
13853 (add_lwp): Don't set lwpid field.
13854 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13855 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13856 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13857 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13858 first. Adjust to linux_wait_for_event interface changes. Use
13859 lwpid_of.
13860 (linux_detach): Don't delete the main lwp here.
13861 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13862 (status_pending_p): Don't consider explicitly suspended lwps.
13863 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13864 pointer. Add OPTIONS argument. Change return type to int. Use
13865 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13866 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13867 pointer. Add status pointer argument. Return a pid instead of a
13868 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13869 changes. In non-stop mode, don't switch to a random thread.
13870 (linux_wait): Rename to...
13871 (linux_wait_1): ... this. Add target_options argument, and handle
13872 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13873 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13874 clean exit and signal exit code. Don't stop all threads in
13875 non-stop mode. In all-stop mode, only stop all threads when
13876 reporting a stop to GDB. Handle explicit thread stop requests.
13877 (async_file_flush, async_file_mark): New.
13878 (linux_wait): New.
13879 (send_sigstop): Use lwpid_of.
13880 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13881 interface changes. In non-stop mode, don't switch to a random
13882 thread.
13883 (linux_resume_one_lwp): Use lwpid_of.
13884 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13885 (linux_resume_one_thread): ... this. Handle resume_stop. In
13886 non-stop mode, don't look for pending flag in all threads.
13887 (resume_status_pending_p): Don't consider explicitly suspended
13888 threads.
13889 (my_waitpid): Reimplement. Emulate __WALL.
13890 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13891 Use lwpid_of.
13892 (sigchld_handler, linux_supports_non_stop, linux_async)
13893 (linux_start_non_stop): New.
13894 (linux_target_ops): Register linux_supports_non_stop, linux_async
13895 and linux_start_non_stop.
13896 (initialize_low): Install SIGCHLD handler.
13897 * thread-db.c (thread_db_create_event, find_one_thread)
13898 (thread_db_get_tls_address): Use lwpid_of.
13899 * win32-low.c (win32_detach): Adjust to use resume_kind.
13900 (win32_wait): Add `options' argument.
13901 * spu-low.c (spu_resume): Adjust to use resume_kind.
13902 (spu_wait): Add `options' argument.
13903
5b1c542e
PA
139042009-04-01 Pedro Alves <pedro@codesourcery.com>
13905
13906 Decouple target code from remote protocol.
13907
13908 * target.h (enum target_waitkind): New.
13909 (struct target_waitstatus): New.
13910 (struct target_ops) <wait>: Return an unsigned long. Take a
13911 target_waitstatus pointer instead of a char pointer.
13912 (mywait): Likewise.
13913 * target.c (mywait): Change prototype to return an unsigned long.
13914 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13915 * server.h (thread_from_wait, old_thread_from_wait): Delete
13916 declarations.
13917 (prepare_resume_reply): Change prototype to take a
13918 target_waitstatus.
13919 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13920 (last_status, last_ptid): New.
13921 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13922 pid instead of a signal.
13923 (attach_inferior): Remove "status" and "signal" parameters.
13924 Adjust.
13925 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13926 not as an address.
13927 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13928 (handle_v_requests, myresume): Remove "status" and "signal"
13929 parameters. Adjust.
13930 (handle_status): New.
13931 (main): Delete local `status'. Adjust.
13932 * remote-utils.c: Include target.h.
13933 (prepare_resume_reply): Change prototype to take a
13934 target_waitstatus. Adjust.
13935
13936 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13937 interface.
13938 * spu-low.c (spu_wait): Adjust.
13939 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13940 Delete.
13941 (win32_wait): Adjust.
13942
2bd7c093
PA
139432009-04-01 Pedro Alves <pedro@codesourcery.com>
13944
13945 * target.h (struct thread_resume): Delete leave_stopped member.
13946 (struct target_ops): Add a `n' argument to the `resume' callback.
13947 * server.c (start_inferior): Adjust.
13948 (handle_v_cont, myresume): Adjust.
13949 * linux-low.c (check_removed_breakpoint): Adjust to resume
13950 interface change, and to removed leave_stopped field.
13951 (resume_ptr): Delete.
13952 (struct thread_resume_array): New.
13953 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13954 resume interface change.
13955 (linux_continue_one_thread, linux_queue_one_thread)
13956 (resume_status_pending_p): Check if the resume field is NULL
13957 instead of checking the leave_stopped member.
13958 (linux_resume): Adjust to the target resume interface change.
13959 * spu-low.c (spu_resume): Adjust to the target resume interface
13960 change.
13961 * win32-low.c (win32_detach, win32_resume): Ditto.
13962
c35fafde
PA
139632009-04-01 Pedro Alves <pedro@codesourcery.com>
13964
13965 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13966 flag.
13967 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13968 pending.
13969 (linux_continue_one_thread): Only preserve the stepping flag if
13970 there's a pending breakpoint.
13971
0a59d50b
PA
139722009-03-31 Pedro Alves <pedro@codesourcery.com>
13973
13974 * server.c (main): After the inferior having exited, call
13975 remote_close before exiting gdbserver.
13976
f04c6d38
TJB
139772009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13978
13979 Fix size of FPSCR in Power 7 processors.
13980 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13981 (PPC_FEATURE_HAS_DFP): New #define.
13982 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13983 size of the FPSCR.
13984
78e5cee6
PA
139852009-03-23 Pedro Alves <pedro@codesourcery.com>
13986
13987 * server.c (handle_query) Whitespace and formatting.
13988
1b3f6016
PA
139892009-03-22 Pedro Alves <pedro@codesourcery.com>
13990
13991 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13992 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13993 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13994 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13995 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13996 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13997 Makefile.in, configure.ac: Fix whitespace throughout.
13998 * configure: Regenerate.
13999
a07b2135
PA
140002009-03-22 Pedro Alves <pedro@codesourcery.com>
14001
14002 * inferiors.c (find_inferior): Make it safe for the callback
14003 function to delete the currently iterated inferior.
14004
67cc2626
PA
140052009-03-22 Pedro Alves <pedro@codesourcery.com>
14006
14007 * Makefile.in (linuw_low_h): Move higher.
14008 (thread-db.o): Depend on $(linux_low_h).
14009
54a0b537
PA
140102009-03-17 Pedro Alves <pedro@codesourcery.com>
14011
14012 Rename "process" to "lwp" throughout.
14013
14014 * linux-low.c (all_processes): Rename to...
14015 (all_lwps): ... this.
14016 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14017 (add_process): Rename to ...
14018 (add_lwp): ... this. Adjust.
14019 (linux_create_inferior): Adjust.
14020 (linux_attach_lwp): Adjust.
14021 (linux_attach): Adjust.
14022 (linux_kill_one_process): Rename to ...
14023 (linux_kill_one_lwp): ... this. Adjust.
14024 (linux_kill): Adjust.
14025 (linux_detach_one_process): Rename to ...
14026 (linux_detach_one_lwp): ... this. Adjust.
14027 (linux_detach): Adjust.
14028 (check_removed_breakpoint): Adjust.
14029 (status_pending_p): Adjust.
14030 (linux_wait_for_process): Rename to ...
14031 (linux_wait_for_lwp): ... this. Adjust.
14032 (linux_wait_for_event): Adjust.
14033 (send_sigstop): Adjust.
14034 (wait_for_sigstop): Adjust.
14035 (stop_all_processes): Rename to ...
14036 (stop_all_lwps): ... this.
14037 (linux_resume_one_process): Rename to ...
14038 (linux_resume_one_lwp): ... this. Adjust.
14039 (linux_set_resume_request, linux_continue_one_thread)
14040 (linux_queue_one_thread, resume_status_pending_p)
14041 (usr_store_inferior_registers, regsets_store_inferior_registers)
14042 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14043 Adjust.
14044 * linux-low.h (get_process): Rename to ...
14045 (get_lwp): ... this. Adjust.
14046 (get_thread_process): Rename to ...
14047 (get_thread_lwp): ... this. Adjust.
14048 (get_process_thread): Rename to ...
14049 (get_lwp_thread): ... this. Adjust.
14050 (struct process_info): Rename to ...
14051 (struct lwp_info): ... this.
14052 (all_processes): Rename to ...
14053 (all_lwps): ... this.
14054 * proc-service.c (ps_lgetregs): Adjust.
14055 * thread-db.c (thread_db_create_event, find_one_thread)
14056 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14057
0b16c5cf
PA
140582009-03-14 Pedro Alves <pedro@codesourcery.com>
14059
14060 * server.c (handle_query): Handle "qAttached".
14061
32de4b9d
NS
140622009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14063
14064 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14065 GPLv3, update license URL.
14066
2aecd87f
DE
140672009-03-01 Doug Evans <dje@google.com>
14068
93efd302 14069 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14070 (server_h): Add gdb_signals.h.
14071 (signals.o): Update.
14072 * server.h (target_signal_from_host,target_signal_to_host_p)
14073 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14074
86b1f9c5
PM
140752009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14076
14077 * remote-utils.c (getpkt): Also generate remote-debug
14078 information if noack_mode is set.
14079
4aa995e1
PA
140802009-02-06 Pedro Alves <pedro@codesourcery.com>
14081
14082 * server.c (handle_query): Report qXfer:siginfo:read and
14083 qXfer:siginfo:write as supported and handle them.
14084 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14085 * linux-low.c (linux_xfer_siginfo): New.
14086 (linux_target_ops): Set it.
14087
62709adf
PA
140882009-01-26 Pedro Alves <pedro@codesourcery.com>
14089
14090 * server.c (gdbserver_usage): Mention --remote-debug.
14091 (main): Accept '--remote-debug' switch.
14092
aef93bd7
DE
140932009-01-18 Doug Evans <dje@google.com>
14094
14095 * regcache.c (new_register_cache): No need to check result of xcalloc.
14096 * server.c (handle_search_memory): Back out calls to xmalloc,
14097 result is checked and error is returned to user upon failure.
14098 (handle_query): Ditto. Add more checks for result of malloc.
14099 (handle_v_cont): Check result of malloc, report error back to
14100 user upon failure.
14101 (handle_v_run): Ditto. Call freeargv.
14102 * server.h (freeargv): Declare.
14103 * utils.c (freeargv): New fn.
14104
54363045
DE
141052009-01-15 Doug Evans <dje@google.com>
14106
f626972c
DE
14107 * gdbreplay.c (perror_with_name): Make arg const char *.
14108 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14109 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14110 * utils.c (perror_with_name): Make arg const char *.
54363045 14111
18aae699
PA
141122009-01-14 Pedro Alves <pedro@codesourcery.com>
14113
14114 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14115 when handling a EXIT_PROCESS_DEBUG_EVENT.
14116
ff703abe
JB
141172009-01-06 Joel Brobecker <brobecker@adacore.com>
14118
14119 * gdbreplay.c (gdbreplay_version): Update copyright year.
14120 * server.c (gdbserver_version): Likewise.
14121
f21cc1a2 141222009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14123
14124 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14125 (handle_extended_wait): Improve comment.
0e21c1ec 14126
bca929d3
DE
141272008-12-13 Doug Evans <dje@google.com>
14128
14129 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14130 * server.h (ATTR_MALLOC): New macro.
14131 (xmalloc,xcalloc,xstrdup): Declare.
14132 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14133 * inferiors.c: Ditto.
14134 * linux-low.c: Ditto.
14135 * mem-break.c: Ditto.
14136 * regcache.c: Ditto.
14137 * remote-utils.c: Ditto.
14138 * server.c: Ditto.
14139 * target.c: Ditto.
14140 * win32-low.c: Ditto.
14141
97438e3f
DE
141422008-12-12 Doug Evans <dje@google.com>
14143
896c7fbb
DE
14144 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14145 in debugging printf.
14146
97438e3f
DE
14147 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14148
e3b886f8
DE
141492008-12-09 Doug Evans <dje@google.com>
14150
14151 * linux-low.h (struct process_info): Delete member tid, unused.
14152 * thread-db.c (find_one_thread): Update.
14153 (maybe_attach_thread): Update.
14154
07e059b5
VP
141552008-12-02 Pedro Alves <pedro@codesourcery.com>
14156
889bf7c5
PA
14157 * target.h (struct target_ops): Add qxfer_osdata member.
14158 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14159 and dirent.h.
14160 (linux_qxfer_osdata): New functions.
14161 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14162 callback.
14163 * server.c (handle_query): Handle "qXfer:osdata:read:".
14164 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14165 (buffer_xml_printf): New functions.
14166 * server.h (struct buffer): New.
14167 (buffer_grow_str, buffer_grow_str0): New macros.
14168 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14169 (buffer_xml_printf): Declare.
07e059b5 14170
4cab47ab
DE
141712008-11-24 Doug Evans <dje@google.com>
14172
14173 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14174
f142445f
DJ
141752008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * server.c (handle_v_run): Always use the supplied argument list.
14178
d0107bb6 141792008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14180
d0107bb6
BW
14181 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14182 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14183
2c4ad781
TJB
141842008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14185
14186 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14187 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14188 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14189 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14190 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14191 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14192 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14193 XML target descriptions.
14194 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14195 when inferior is running on an ISA 2.05 or later processor. Add
14196 special case to return offset for full 64-bit slot of FPSCR when
14197 in 32-bits.
14198
dfb64f85
DJ
141992008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14200
14201 * Makefile.in (SFILES, clean): Added sparc64 files.
14202 (reg-sparc64.o, reg-sparc64.c): New.
14203 * configure.srv (sparc*-*-linux*): New configuration.
14204 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14205 syscall arguments for SPARC.
14206 (regsets_store_inferior_registers): Likewise.
14207 * linux-sparc-low.c: New file.
14208
66b6e1dd
DE
142092008-10-21 Doug Evans <dje@google.com>
14210
14211 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14212 (READLINE_DIR,READLINE_DEP): Delete.
14213 (INTERNAL_CFLAGS): Update.
14214 (LINTFLAGS): Update.
14215
9b710a42
PA
142162008-10-10 Pedro Alves <pedro@codesourcery.com>
14217
14218 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14219 whole argv from the last run, not just argv[0].
14220
5822d809
PA
142212008-09-08 Pedro Alves <pedro@codesourcery.com>
14222
14223 * regcache.c (new_register_cache): Return NULL if the register
14224 cache size isn't known yet.
14225 (free_register_cache): Avoid dereferencing a NULL regcache.
14226
74aac56f
DJ
142272008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * configure.srv: Merge MIPS and MIPS64.
14230
400b20f5
MR
142312008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14232
14233 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14234
677c5bb1
LM
142352008-08-18 Luis Machado <luisgpm@br.ibm.com>
14236
14237 * Makefile.in: Add required vsx dependencies.
14238
14239 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14240 Declare init_registers_powerpc_vsx32l.
14241 Declare init_registers_powerpc_vsx64l.
14242 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14243 (ppc_arch_setup): Check for VSX in hwcap.
14244 (ppc_fill_vsxregset): New function.
14245 (ppc_store_vsxregset): New function.
14246 Add new VSX entry in regset_info target_regsets.
14247
14248 * configure.srv: Add new VSX dependencies.
14249
a6f3e723
SL
142502008-08-12 Pedro Alves <pedro@codesourcery.com>
14251
14252 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14253 (remote_open): Set or clear transport_is_reliable.
14254 (putpkt_binary): Don't expect acks in noack mode.
14255 (getpkt): Don't send ack/nac in noack mode.
14256 * server.c (handle_general_set): Handle QStartNoAckMode.
14257 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14258 qSupported.
14259 (main): Reset noack_mode on every connection.
14260 * server.h (noack_mode): Declare.
14261
a417dc56
RW
142622008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14263
14264 * Makefile.in (GDBREPLAY_OBS): New variable.
14265 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14266
3221518c
UW
142672008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14268 Daniel Jacobowitz <dan@codesourcery.com>
14269
14270 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14271 (usr_store_inferior_registers): Likewise.
14272 (regsets_store_inferior_registers): Likewise.
14273
ec56be1b
PA
142742008-07-31 Rolf Jansen <rj@surtec.com>
14275 Pedro Alves <pedro@codesourcery.com>
14276
14277 * configure.ac: Check for memmem declaration.
14278 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14279 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14280 (disable_packet_qfThreadInfo): Unconditionally compile.
14281 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14282 * configure, config.in: Regenerate.
14283
2fe5e3ff
DE
142842008-07-28 Doug Kwan <dougkwan@google.com>
14285
14286 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14287 (linux_write_memory): Remove declaration of errno.
14288
836acd6d
UW
142892008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * linux-low.c (handle_extended_wait): Do not use "status"
14292 variable uninitialized.
14293
aeba519e
PA
142942008-07-07 Pedro Alves <pedro@codesourcery.com>
14295
14296 * server.c (handle_v_attach): Inhibit reporting dll changes.
14297
db42f210
PA
142982008-06-27 Pedro Alves <pedro@codesourcery.com>
14299
14300 * remote-utils.c (prepare_resume_reply): If requested, don't
14301 output "thread:TID" in the T stop reply.
14302
14303 * server.c (disable_packet_vCont, disable_packet_Tthread)
14304 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14305 (handle_query): If requested, disable support for qC, qfThreadInfo
14306 and qsThreadInfo.
14307 (handle_v_requests): If requested, disable support for vCont.
14308 (gdbserver_show_disableable): New.
14309 (main): Handle --disable-packet and --disable-packet=LIST.
14310
14311 * server.h (disable_packet_vCont, disable_packet_Tthread)
14312 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14313
8e4c5421
CD
143142008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14315
14316 * server.c (gdbserver_usage): Mention --version.
14317
6e23a804
DJ
143182008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * Makefile.in (gdbreplay.o): New rule.
14321
90aa6a40
JM
143222008-06-06 Joseph Myers <joseph@codesourcery.com>
14323
14324 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14325 message, not gdbserver.
14326
c16158bc 143272008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14328 Nathan Sidwell <nathan@codesourcery.com>
14329 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14330
14331 * acinclude.m4: Include ../../config/acx.m4.
14332 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14333 * configure, config.in: Regenerate.
14334 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14335 * server.c (gdbserver_version): Print PKGVERSION.
14336 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14337 (main): Adjust gdbserver_usage calls.
14338 * gdbreplay.c (version, host_name): Add declarations.
14339 (gdbreplay_version, gdbreplay_usage): New.
14340 (main): Accept --version and --help options.
14341
aeb75bf5
DJ
143422008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14343
14344 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14345 (arm_breakpoint_at): Handle Thumb.
14346 (the_low_target): Add comment.
14347
76b233dd
UW
143482008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14349
14350 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14351
08388c79
DE
143522008-05-09 Doug Evans <dje@google.com>
14353
a3c83fae
DE
14354 * server.h (decode_search_memory_packet): Declare.
14355 * remote-utils.c (decode_search_memory_packet): New fn.
14356 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14357 (handle_search_memory): New fn.
14358 (handle_query): Process qSearch:memory packets.
14359
bb9c3d36
UW
143602008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14361
14362 * regcache.c (registers_length): Remove.
14363 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14364 full register packet.
14365 * regcache.h (registers_length): Remove prototype.
14366 * server.h (PBUFSIZ): Define to 16384.
14367
7284e1be
UW
143682008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14369
14370 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14371 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14372 powerpc-64l.o, and powerpc-altivec64l.o.
14373 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14374 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14375 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14376 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14377 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14378 to srv_xmlfiles.
14379
14380 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14381 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14382 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14383 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14384 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14385 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14386 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14387 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14388 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14389 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14390 (clean): Update.
14391
14392 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14393 (init_registers_powerpc_32l): ... this new prototype.
14394 (init_registers_powerpc_32): Remove, replace by ...
14395 (init_registers_powerpc_altivec32l): ... this new prototype.
14396 (init_registers_powerpc_e500): Remove, replace by ...
14397 (init_registers_powerpc_e500l): ... this new prototype.
14398 (init_registers_ppc64): Remove, replace by ...
14399 (init_registers_powerpc_64l): ... this new prototype.
14400 (init_registers_powerpc_64): Remove, replace by ...
14401 (init_registers_powerpc_altivec64l): ... this new prototype.
14402 (ppc_num_regs): Set to 73.
14403 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14404 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14405 (ppc_cannot_store_register): Handle orig_r3 and trap.
14406 (ppc_arch_setup): Update init_registers_... calls.
14407 (ppc_fill_gregset): Handle orig_r3 and trap.
14408
14409 * inferiors.c (clear_inferiors): Reset current_inferior.
14410
fdc59709
PB
144112008-04-23 Paolo Bonzini <bonzini@gnu.org>
14412
889bf7c5
PA
14413 * acinclude.m4: Add override.m4.
14414 * configure: Regenerate.
fdc59709 14415
c9b2f845
UW
144162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14417
14418 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14419 initial call to init_register_ppc64.
14420
550512b8
UW
144212008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14422
43aaf8b6
PA
14423 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14424 single powerpc*-*-linux* case.
550512b8
UW
14425 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14426
b6430ec3
UW
144272008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14428
14429 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14430 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14431 from reg_xmlfiles.
14432 * linux-ppc-low.c: Include <elf.h>.
14433 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14434 (ppc_hwcap): New global variable.
14435 (ppc_regmap): Remove __SPE__ #ifdef sections.
14436 (ppc_regmap_e500): New global variable.
14437 (ppc_cannot_store_register): Update __SPE__ special case.
14438 (ppc_get_hwcap): New function.
14439 (ppc_arch_setup): Use it to determine whether inferior supports
14440 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14441 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14442 Do not access registers if target does not support AltiVec.
14443 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14444 Do not access registers if target does not support SPE.
14445 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14446
52fa2412
UW
144472008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * linux-low.c (disabled_regsets, num_regsets): New.
14450 (use_regsets_p): Delete.
14451 (linux_wait_for_process): Clear disabled_regsets.
14452 (regsets_fetch_inferior_registers): Check and set it.
14453 (regsets_store_inferior_registers): Likewise.
14454 (linux_fetch_registers, linux_store_registers): Do not use
14455 use_regsets_p.
14456 (initialize_low): Allocate disabled_regsets.
14457
e28b3332
DJ
144582008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * Makefile.in (LIBOBJS): New.
14461 (OBS): Use LIBOBJS.
14462 (memmem.o): New rule.
14463 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14464 * configure: Regenerated.
14465
4536995d
UW
144662008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14467
14468 * server.c (handle_query): Never return "unsupported" for
14469 qXfer:features:read queries.
14470
221c031f
UW
144712008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14472
14473 * server.c (get_features_xml): Fix inverted condition.
14474 (handle_query): Always support qXfer:feature:read.
14475
ccd213ac
DJ
144762008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * server.c (wrapper_argv): New.
14479 (start_inferior): Handle wrapper_argv. If set, expect an extra
14480 trap.
14481 (gdbserver_usage): Document --wrapper.
14482 (main): Parse --wrapper.
14483
6fe305f7
UW
144842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14485
14486 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14487 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14488 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14489 (ppc_set_pc): Likewise.
14490 (ppc_arch_setup): New function.
14491 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14492 of collect_register.
889bf7c5 14493 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14494
5b0a002e
UW
144952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14496
14497 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14498 instead of linux-ppc64-low.o.
14499 * linux-ppc64-low.c: Remove file.
14500 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14501 (linux-ppc64-low.o): Remove rule.
14502
14503 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14504 (init_registers_powerpc_64): Likewise.
14505 (ppc_regmap): Conditionally define depending on __powerpc64__.
14506 (ppc_cannot_store_register): Do not special-case "fpscr" when
14507 compiled on __powerpc64__.
14508 (ppc_collect_ptrace_register): New function.
14509 (ppc_supply_ptrace_register): New function.
14510 (ppc_breakpoint): Change type to "unsigned int".
14511 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14512 (the_low_target): Conditionally provide initializers for the
889bf7c5 14513 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14514 collect_ptrace_register and supply_ptrace_register members.
14515
9b4b61c8
UW
145162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14517
14518 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14519 * server.c (gdbserver_xmltarget): Define.
14520 (get_features_xml): Use it to replace "target.xml" and arch_string.
14521
14522 * configure.srv: Remove srv_xmltarget. Add XML files that were
14523 mentioned there to srv_xmlfiles instead. Remove conditional tests
14524 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14525 srv_xmlfiles and srv_regobj to include all possible choices.
14526 * configure.ac (srv_xmltarget): Remove.
14527 (srv_xmlfiles): Do not add "target.xml".
14528 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14529 checks for supplementary target information.
14530 * configure: Regenerate.
14531 * Makefile.in (XML_TARGET): Remove.
14532 (target.xml): Remove rule.
14533 (clean): Do not clean up target.xml.
14534 (.PRECIOUS): Do not mention target.xml.
14535
14536 * target.h (struct target_ops): Remove arch_string member.
14537 * linux-low.c (linux_arch_string): Remove.
14538 (linux_target_ops): Remove arch_string initializer.
14539 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14540 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14541 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14542 * spu-low.c (spu_arch_string): Remove.
14543 (spu_target_ops): Remove arch_string initializer.
14544 * win32-low.c (win32_arch_string): Remove.
14545 (win32_target_ops): Remove arch_string initializer.
14546 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14547 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14548 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14549
ee1a7ae4
UW
145502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14551
14552 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14553 by collect_ptrace_register and supply_ptrace_register hooks.
14554 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14555 instead of checking for the_low_target.left_pad_xfer.
14556 (usr_store_inferior_registers): Use collect_ptrace_register callback
14557 instead of checking for the_low_target.left_pad_xfer.
14558
14559 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14560 (s390_supply_ptrace_register): Likewise.
14561 (s390_fill_gregset): Call s390_collect_ptrace_register.
14562 (the_low_target): Update.
14563
14564 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14565 (ppc_supply_ptrace_register): Likewise.
14566 (the_low_target): Update.
14567
14568 * linux-i386-low.c (the_low_target): Update.
14569 * linux-x86-64-low.c (the_low_target): Update.
14570
d61ddec4
UW
145712008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14572
14573 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14574 reg-s390.o and reg-s390x.o.
14575
14576 * linux-low.c (new_inferior): New global variable.
14577 (linux_create_inferior, linux_attach): Set it.
14578 (linux_wait_for_process): Call the_low_target.arch_setup after the
14579 target has stopped for the first time.
14580 (initialize_low): Do not call the_low_target.arch_setup.
14581
14582 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14583 (s390_set_pc): Likewise.
14584 (s390_arch_setup): New function.
14585 (the_low_target): Use s390_arch_setup as arch_setup routine.
14586
14587 * regcache.c (realloc_register_cache): New function.
14588 (set_register_cache): Call it for each existing regcache.
14589
d05b4ac3
UW
145902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14591
14592 * server.h (init_registers): Remove prototype.
14593
14594 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14595 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14596 instead of init_registers ().
14597 * linux-arm-low.c (init_registers_arm): Add prototype.
14598 (init_registers_arm_with_iwmmxt): Likewise.
14599 (the_low_target): Add initializer for arch_setup field.
14600 * linux-cris-low.c (init_registers_cris): Add prototype.
14601 (the_low_target): Add initializer for arch_setup field.
14602 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14603 (the_low_target): Add initializer for arch_setup field.
14604 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14605 (the_low_target): Add initializer for arch_setup field.
14606 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14607 (the_low_target): Add initializer for arch_setup field.
14608 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14609 (the_low_target): Add initializer for arch_setup field.
14610 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14611 (the_low_target): Add initializer for arch_setup field.
14612 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14613 (init_registers_mips64_linux): Likewise.
14614 (the_low_target): Add initializer for arch_setup field.
14615 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14616 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14617 (the_low_target): Add initializer for arch_setup field.
14618 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14619 (init_registers_powerpc_64): Likewise.
14620 (the_low_target): Add initializer for arch_setup field.
14621 * linux-s390-low.c (init_registers_s390): Add prototype.
14622 (init_registers_s390x): Likewise.
14623 (the_low_target): Add initializer for arch_setup field.
14624 * linux-sh-low.c (init_registers_sh): Add prototype.
14625 (the_low_target): Add initializer for arch_setup field.
14626 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14627 (the_low_target): Add initializer for arch_setup field.
14628 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14629 (the_low_target): Add initializer for arch_setup field.
14630
14631 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14632 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14633 instead of init_registers ().
14634 * win32-arm-low.c (init_registers_arm): Add prototype.
14635 (the_low_target): Add initializer for arch_setup field.
14636 * win32-i386-low.c (init_registers_i386): Add prototype.
14637 (the_low_target): Add initializer for arch_setup field.
14638
14639 * spu-low.c (init_registers_spu): Add prototype.
14640 (initialize_low): Call initialie_registers_spu () instead of
14641 initialize_registers ().
14642
fd96d250
PA
146432008-02-19 Pedro Alves <pedro@codesourcery.com>
14644
14645 * server.c (handle_v_requests): When handling the vRun and vAttach
14646 packets, if already debugging a process, don't kill it. Return an
14647 error instead.
14648
d41b6bb4
DJ
146492008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14650
14651 * server.c (handle_query): Correct length check.
14652
5ac588cf
PA
146532008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14654
14655 * win32-low.c (do_initial_child_stuff): Add process handle
14656 parameter. Set current_process_handle and current_process_id from the
14657 parameters. Clear globals.
14658 (win32_create_inferior): Don't set current_process_handle and
14659 current_process_id here. Instead pass them on the call to
14660 do_initial_child_stuff.
14661 (win32_attach): Likewise.
14662 (win32_clear_inferiors): New.
14663 (win32_kill): Don't close the current process handle or the
14664 current thread handle here. Instead call win32_clear_inferiors.
14665 (win32_detach): Don't open a new handle to the process. Call
14666 win32_clear_inferiors.
14667 (win32_join): Don't rely on current_process_handle; open a new
14668 handle using the process id.
14669 (win32_wait): Call win32_clear_inferiors when the inferior process
14670 has exited.
14671
ecd7ecbc
DJ
146722008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * server.c (monitor_show_help): Add "exit".
14675
1525d545
MG
146762008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14677
ecd7ecbc 14678 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14679 (clean): Add reg-xtensa.c.
14680 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14681 * configure.srv (xtensa*-*-linux*) New target.
14682 * linux-xtensa-low.c: New.
14683 * xtensa-xtregs.c: New.
1525d545 14684
59a016f0
PA
146852008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14686
14687 * hostio.c: Don't include errno.h.
14688 (errno_to_fileio_errno): Move to hostio-errno.
14689 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14690 error number outputting to the target->hostio_last_error callback.
14691 (hostio_packet_error): Use FILEIO_EINVAL directly.
14692 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14693 calls to hostio_error.
14694 * hostio-errno.c: New.
14695 * server.h (hostio_last_error_from_errno): Declare.
14696 * target.h (target_ops): Add hostio_last_error member.
14697 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14698 as hostio_last_error handler.
889bf7c5 14699 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14700 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14701 (wince_hostio_last_error): New functions.
14702 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14703 as hostio_last_error handler.
14704 (win32_target_ops) [!_WIN32_WCE]: Register
14705 hostio_last_error_from_errno as hostio_last_error handler.
14706 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14707 (hostio-errno.o): New rule.
14708 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14709 * configure.srv (srv_hostio_err_objs): New variable. Default to
14710 hostio-errno.o.
14711 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14712 * configure: Regenerate.
14713
2d717e4f
DJ
147142008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14717 (linux_kill, linux_detach): Clean up the process list.
14718 * remote-utils.c (remote_open): Improve port number parsing.
14719 (putpkt_binary, input_interrupt): Only send interrupts if the target
14720 is running.
14721 * server.c (extended_protocol): Make static.
14722 (attached): Define earlier.
14723 (exit_requested, response_needed, program_argv): New variables.
14724 (target_running): New.
14725 (start_inferior): Clear attached here.
14726 (attach_inferior): Set attached here.
14727 (require_running): Define.
14728 (handle_query): Use require_running and target_running. Implement
14729 "monitor exit".
14730 (handle_v_attach, handle_v_run): New.
14731 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14732 (gdbserver_usage): Update.
14733 (main): Redo argument parsing. Handle --debug and --multi. Handle
14734 --attach along with other options or after the port. Save
14735 program_argv. Support no initial program. Resynchronize
14736 communication with GDB after an error. Handle "monitor exit".
14737 Use require_running and target_running. Always allow the extended
14738 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14739 restart in extended mode.
14740 * README: Refer to the GDB manual. Update --attach usage.
14741
7407e2de
AS
147422007-12-20 Andreas Schwab <schwab@suse.de>
14743
14744 * linux-low.c (STACK_SIZE): Define.
14745 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14746 (linux_test_for_tracefork): Likewise.
14747
b65d95c5
DJ
147482007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * linux-low.c (linux_wait_for_event): Update messages. Do not
14751 reinsert auto-delete breakpoints.
14752 * mem-break.c (struct breakpoint): Change return type of handler to
14753 int.
14754 (set_breakpoint_at): Update handler type.
14755 (reinsert_breakpoint_handler): Return 1 instead of calling
14756 delete_breakpoint.
14757 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14758 setting a new one.
14759 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14760 * mem-break.h (set_breakpoint_at): Update handler type.
14761 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14762 * win32-low.c (auto_delete_breakpoint): New.
14763 (get_child_debug_event): Use it.
14764
4e799345
DJ
147652007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14766
14767 * configure.ac: Check for pread and pwrite.
14768 * hostio.c (handle_pread): Fall back to lseek and read.
14769 (handle_pwrite): Fall back to lseek and write.
14770 * config.in, configure: Regenerated.
14771
27524b67
DJ
147722007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * server.c (myresume): Add own_buf argument.
14775 (main): Update calls.
14776
a20d5e98
DJ
147772007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14780 * remote-utils.c (remote_open): Do not call disable_async_io.
14781 (block_async_io): Delete.
14782 (unblock_async_io): Make static.
14783 (initialize_async_io): New.
14784 * server.c (handle_v_cont): Handle async I/O here.
14785 (myresume): Likewise. Move other common resume tasks here...
14786 (main): ... from here. Call initialize_async_io. Disable async
14787 I/O before the main loop.
14788 * server.h (initialize_async_io): Declare.
14789 (block_async_io, unblock_async_io): Delete prototypes.
14790 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14791
b79d787e
DJ
147922007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14793
14794 * remote-utils.c (readchar): Allow binary data in received messages.
14795
d97903b2
PA
147962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14797
14798 * win32-low.c (attaching): New global.
14799 (win32_create_inferior): Clear the `attaching' global.
14800 (win32_attach): Set the `attaching' global.
14801 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14802 attaching. Only set a breakpoint at the entry point if not
14803 attaching.
14804
311de423
PA
148052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14806
14807 * server.c (main): Don't report dll events on the initial
14808 connection on attaches.
14809
6c2d16d2
PA
148102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14811
14812 * server.c (main): Relax numerical bases supported for the pid of
14813 the --attach command line argument.
14814
5ca906e6
PA
148152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14816
14817 * win32-low.c (win32_attach): Call OpenProcess before
14818 DebugActiveProcess, not after. Add last error output to error
14819 call.
14820
9c6c8194
PA
148212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14822
14823 * win32-low.c (win32_get_thread_context)
14824 (win32_set_thread_context): New functions.
14825 (thread_rec): Use win32_get_thread_context.
14826 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14827 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14828 field.
14829
4d5d1aaa
PA
148302007-12-03 Leo Zayas
14831 Pedro Alves <pedro_alves@portugalmail.pt>
14832
14833 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14834 global variables.
14835 (child_add_thread): Minor cleanup.
14836 (child_continue): Resume artificially suspended threads before
14837 calling ContinueDebugEvent.
14838 (suspend_one_thread): New.
14839 (fake_breakpoint_event): New.
14840 (get_child_debug_event): Change return type to int. Check here if
14841 gdb sent an interrupt request. If a soft interrupt was requested,
14842 fake a breakpoint event. Return 0 if there is no event to handle,
14843 and 1 otherwise.
14844 (win32_wait): Don't check here if gdb sent an interrupt request.
14845 Ensure there is a valid event to handle.
14846 (win32_request_interrupt): Add soft interruption method as last
14847 resort.
14848
c436e841
PA
148492007-12-03 Leo Zayas
14850 Pedro Alves <pedro_alves@portugalmail.pt>
14851
14852 * win32-low.h (win32_thread_info): Add descriptions to the
14853 structure members. Replace `suspend_count' counter by a
14854 `suspended' flag.
14855 * win32-low.c (thread_rec): Update condition of when to get the
14856 context from the inferior. Rely on ContextFlags being set if it
14857 has already been retrieved. Only suspend the inferior thread if
14858 we haven't already. Warn if that fails.
14859 (continue_one_thread): s/suspend_count/suspended/. Only call
14860 ResumeThread once. Warn if that fails.
14861
e7b5fa67
PA
148622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14863
14864 * win32-low.c (win32_wait): Don't read from the inferior when it
14865 has already exited.
14866
a385171d
PA
148672007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14868
14869 * Makefile.in (win32_low_h): New variable.
14870 (win32-low.o): Add dependency on $(win32_low_h).
14871 (win32-arm-low.o, win32-i386-low.o): New rules.
14872
f80c84b3
DJ
148732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * hostio.c: Correct copyright year.
14876
a6b151f1
DJ
148772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * Makefile.in (OBS): Add hostio.o.
14880 (hostio.o): New rule.
14881 * server.h (handle_vFile): Declare.
14882 * hostio.c: New file.
14883 * server.c (handle_v_requests): Take packet_len and new_packet_len
14884 for binary packets. Call handle_vFile.
14885 (main): Update call to handle_v_requests.
14886
f9387fc3
DJ
148872007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * linux-low.c: Include <sched.h>.
14890
51c2684e
DJ
148912007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14892
14893 * linux-low.c (linux_tracefork_grandchild): New.
14894 (linux_tracefork_child): Use clone.
14895 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14896
75f83163
JB
148972007-10-31 Joel Brobecker <brobecker@adacore.com>
14898
14899 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14900
da5898ce
DJ
149012007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14904
24a09b5f
DJ
149052007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * inferiors.c (change_inferior_id): Delete.
14908 (add_pid_to_list, pull_pid_from_list): New.
14909 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14910 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14911 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14912 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14913 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14914 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14915 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14916 (using_threads): Always set to 1.
14917 (handle_extended_wait): New.
14918 (add_process): Do not set TID.
14919 (linux_create_inferior): Set must_set_ptrace_flags.
14920 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14921 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14922 (linux_thread_alive): Rename TID argument to LWPID.
14923 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14924 (linux_wait_for_event): Do not use TID or check using_threads. Update
14925 call to dead_thread_notify. Call handle_extended_wait.
14926 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14927 (send_sigstop): Delete sigstop_sent.
14928 (wait_for_sigstop): Avoid TID.
14929 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14930 (linux_test_for_tracefork): New.
14931 (linux_lookup_signals): Use thread_db_active and
14932 linux_supports_tracefork_flag.
14933 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14934 * linux-low.h (get_process_thread): Avoid TID.
14935 (struct process_ifo): Move thread_known and tid to the end. Remove
14936 sigstop_sent.
14937 (linux_attach_lwp, thread_db_init): Update prototypes.
14938 * server.h (change_inferior_id): Delete prototype.
14939 (add_pid_to_list, pull_pid_from_list): New prototypes.
14940 * thread-db.c (thread_db_use_events): New.
14941 (find_first_thread): Rename to...
14942 (find_one_thread): ...this. Update callers and messages. Do not
14943 call fatal. Check thread_db_use_events. Do not call
14944 change_inferior_id or new_thread_notify.
14945 (maybe_attach_thread): Update. Do not call new_thread_notify.
14946 (thread_db_init): Set thread_db_use_events. Check use_events.
14947 * utils.c (fatal, warning): Correct message prefix.
14948
30ed0a8f
DJ
149492007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14950
14951 * Makefile.in (clean): Remove new files.
14952 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14953 (powerpc-64.o, powerpc-64.c): New rules.
14954 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14955 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14956 with SPE.
14957 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14958 SPE targets.
14959 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14960 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14961 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14962 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14963 (target_regsets): Add AltiVec and SPE register sets.
14964 * configure.ac: Check for AltiVec and SPE.
14965 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14966 (ppc_fill_vrregset, ppc_store_vrregset): New.
14967 (target_regsets): Add AltiVec register set.
14968 * configure: Regenerated.
14969
fd462a61
DJ
149702007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14971
14972 * linux-low.c (O_LARGEFILE): Define.
14973 (linux_read_memory): Use /proc/PID/mem.
14974 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14975 * configure, config.in: Regenerated.
14976
69f223ed
DJ
149772007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * linux-low.c (linux_wait_for_event): Do not pass signals while
14980 single-stepping.
14981
aec18585
PA
149822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14983
14984 * win32-low.c (create_process): New.
14985 (win32_create_inferior): Use create_process instead of
14986 CreateProcess. If create_process failed retry appending an ".exe"
14987 suffix. Store the GetLastError result immediatelly after
14988 create_process calls and use it on the call to error.
14989
34d86ddd
PA
149902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14991
14992 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14993
5a0e3bd0
JB
149942007-08-23 Joel Brobecker <brobecker@adacore.com>
14995
14996 * configure.ac: Switch license to GPLv3.
14997
f88c79e6
MS
149982007-08-01 Michael Snyder <msnyder@access-company.com>
14999
15000 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15001
6b3d9b83
PA
150022007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15003
15004 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15005 typedef.
15006 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15007 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15008 CloseToolhelp32Snapshot.
15009 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15010 CloseToolhelp32Snapshot.
15011
c588c53c
MS
150122007-07-27 Michael Snyder <michael.snyder@access-company.com>
15013
15014 * server.c (main): Check for inferior exit before main loop.
15015
aa0403d9
PA
150162007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15017
15018 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15019 instead of on tmp_desc.
15020
255e7678
DJ
150212007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15022 Daniel Jacobowitz <dan@codesourcery.com>
15023
15024 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15025 (add_thread): Minor cleanups.
15026 (clear_inferiors): Move lower in the file. Clear the DLL
15027 list.
15028 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15029 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15030 (xml_escape_text): New.
15031 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15032 for qSupported.
15033 (handle_v_cont): Report errors.
15034 (gdbserver_version): Update.
15035 (main): Correct size of own_buf. Do not report initial DLL events.
15036 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15037 (unloaded_dll, xml_escape_text): New.
15038 * win32-low.c (enum target_waitkind): Update comments.
15039 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15040 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15041 (win32_EnumProcessModules, win32_GetModuleInformation)
15042 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15043 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15044 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15045 (win32_Module32First, win32_Module32Next, load_toolhelp)
15046 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15047 (get_child_debug_event): Handle DLL events.
15048 (win32_wait): Likewise.
15049
0d37add9
DJ
150502007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15051
15052 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15053 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15054
45e2715e
PA
150552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15056
15057 * win32-low.c (handle_output_debug_string): Ignore event if not
15058 waiting.
15059
c5674cf1
PA
150602007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15061
15062 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15063
2bbe3cc1
DJ
150642007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15067
ae13219e
DJ
150682007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * inferiors.c (change_inferior_id): Add comment.
15071 * linux-low.c (check_removed_breakpoint): Add an early
15072 prototype. Improve debug output.
15073 (linux_attach): Doc update.
15074 (linux_detach_one_process, linux_detach): Clean up before releasing
15075 each process.
15076 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15077 * linux-low.h (struct process_info): Doc improvement.
15078 * mem-break.c (delete_all_breakpoints): New.
15079 * mem-break.h (delete_all_breakpoints): New prototype.
15080 * thread-db.c (find_first_thread): New.
15081 (thread_db_create_event): Call it instead of
15082 thread_db_find_new_threads. Clean up unused variables.
15083 (maybe_attach_thread): Remove first thread handling.
15084 (thread_db_find_new_threads): Use find_first_thread.
15085 (thread_db_get_tls_address): Likewise.
15086
4105de34
DJ
150872007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * thread-db.c (thread_db_find_new_threads): Add prototype.
15090 (thread_db_create_event): Check for the main thread before adding
15091 a new thread.
15092 (maybe_attach_thread): Only enable event reporting if TID == 0.
15093 (thread_db_get_tls_address): Check for new threads.
15094
2b876972
DJ
150952007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15096
15097 * linux-low.c (linux_create_inferior): Try execv before execvp.
15098 * spu-low.c (spu_create_inferior): Likewise.
15099
7a245884
DJ
151002007-06-13 Mike Frysinger <vapier@gentoo.org>
15101
15102 * linux-low.c (linux_create_inferior): Change execv to execvp.
15103 * spu-low.c (spu_create_inferior): Likewies.
15104
117ce543
DJ
151052007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * Makefile.in (clean): Clean new files instead of deleted ones.
15108 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15109 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15110 rules.
15111 * configure.srv: Specify XML files and new regformats for MIPS and
15112 MIPS64 GNU/Linux.
15113 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15114 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15115 an entry for the restart register.
15116 (mips_cannot_fetch_register, mips_cannot_store_register)
15117 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15118 register names to match the XML descriptions.
15119 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15120 restart register instead of $0.
15121
0e7f50da
UW
151222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15123 Markus Deuling <deuling@de.ibm.com>
15124
15125 * remote-utils.c (decode_xfer_write): New function.
15126 * server.h (decode_xfer_write): Add prototype.
15127 * server.c (handle_query): Add PACKET_LEN argument. Support
15128 qXfer:spu:read and qXfer:spu:write packets.
15129 (main): Pass packet_len to handle_query.
15130 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15131 * target.h (target_ops): Add qxfer_spu.
15132
374c1d38
UW
151332007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15134
15135 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15136 accessing non-seekable spufs files.
15137
bb63802a
UW
151382007-05-16 Markus Deuling <deuling@de.ibm.com>
15139
889bf7c5 15140 * server.c (handle_query): Add reply for qC packet.
bb63802a 15141
7390519e
PA
151422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15143 Leo Zayas <lerele@champenstudios@com>
15144
15145 * server.h (check_remote_input_interrupt_request): New function.
15146 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15147 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15148 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15149 (check_remote_input_interrupt_request): New function.
15150 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15151 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15152 winapi_GenerateConsoleCtrlEvent): New typedefs.
15153 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15154 to 250 ms.
15155 (win32_wait): Check for remote interrupt request
15156 with check_remote_input_interrupt_request.
15157 (win32_request_interrupt): New function.
15158 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15159
34b34921
PA
151602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15161
15162 * win32-low.c (debug_registers_changed,
15163 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15164 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15165 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15166 (thread_rec): Get context using the low target.
15167 (child_add_thread): Call thread_added on the low target,
15168 which does the same thing.
15169 (regptr): Delete.
15170 (do_initial_child_stuff): Remove debug registers references.
15171 Set context using the low target. Resume threads after
15172 setting the contexts.
15173 (child_continue): Remove dead variable. Remove debug
15174 registers references.
15175 (child_fetch_inferior_registers): Go through the low target.
15176 (do_child_store_inferior_registers): Remove.
15177 (child_store_inferior_registers): Go through the low target.
15178 (win32_resume): Remove debug registers references.
15179 Set context using the low target.
15180 (handle_exception): Change return type to void. Don't record
15181 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15182 first chance exception.
889bf7c5 15183 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15184 goto loop. Always return after waiting for debug event.
15185 (win32_wait): Convert to switch statement. Handle spurious
15186 events.
15187
15188 * win32-i386-low.c (debug_registers_changed,
15189 debug_registers_used): New.
15190 (initial_stuff): Rename to ...
15191 (i386_initial_stuff): ... this. Clear debug registers
15192 state variables.
15193 (store_debug_registers): Delete.
15194 (i386_get_thread_context): New.
15195 (load_debug_registers): Delete.
15196 (i386_set_thread_context): New.
15197 (i386_thread_added): New.
15198 (single_step): Rename to ...
15199 (i386_single_step): ... this.
15200 (do_fetch_inferior_registers): Rename to ...
15201 (i386_fetch_inferior_register): ... this.
15202 (i386_store_inferior_register): New.
15203 (the_low_target): Adapt to new interface.
15204
15205 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15206 (arm_get_thread_context): New.
15207 (arm_set_thread_context): New.
15208 (regptr): New.
15209 (do_fetch_inferior_registers): Rename to ...
15210 (arm_fetch_inferior_register): ... this.
15211 (arm_store_inferior_register): New.
15212 (arm_wince_breakpoint): Reimplement as unsigned long.
15213 (arm_wince_breakpoint_len): Define.
15214 (the_low_target): Adapt to new interface.
15215
15216 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15217 load_debug_registers. Add get_thread_context, set_thread_context,
15218 thread_added and store_inferior_register. Rename
15219 fetch_inferior_registers to fetch_inferior_register.
15220 (regptr): Remove declaration.
15221
dd6953e1
PA
152222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15223
15224 * linux-low.c (linux_detach): Change return type to int. Return 0.
15225 * spu-low.c (spu_detach): Likewise.
15226
444d6139
PA
152272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15228
15229 * target.h (target_ops): Change return type of detach to int.
15230 Add join.
15231 (join_inferior): New.
15232 * server.c (main): Don't skip detach support on mingw32.
15233 If the inferior doesn't support detaching return error.
15234 Call join_inferior instead of using waitpid.
15235 * linux-low.c (linux_join): New.
15236 (linux_target_op): Add linux_join.
15237 * spu-low.c (spu_join): New.
15238 (spu_target_ops): Add spu_join.
15239 * win32-low.c (win32_detach): Adapt to new interface.
15240 Reopen current_process_handle before detaching. Issue a child
15241 resume before detaching.
15242 (win32_join): New.
15243 (win32_target_op): Add win32_join.
15244
1d5315fe
PA
152452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15246
15247 * win32-low.c (win32-attach): Fix return value.
15248 * target.h (target_ops): Describe ATTACH return values.
15249
bf914831
PA
152502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15251
15252 * win32-low.c (GETPROCADDRESS): Define.
15253 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15254 (winapi_DebugSetProcessKillOnExit): Likewise.
15255 (win32_create_inferior): Force usage of ansi CreateProcessA.
15256 (win32_attach): Use GETPROCADDRESS.
15257 (win32_detach): Likewise.
15258
f72f3e60
PA
152592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15260
15261 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15262
ed50f18f
PA
152632007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15264
15265 * win32-low.c: Commit leftover changes from 2007-03-29.
15266
0c2ead7e
DJ
152672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15268
15269 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15270 fields short instead of int. Add explicit padding.
15271 (i387_cache_to_fsave): Remove unnecessary casts.
15272 (i387_fsave_to_cache): Doc fix.
15273 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15274
73725ff3
DJ
152752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15276
15277 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15278 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15279
d99f33d8
PA
152802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15281
15282 * configure.srv (arm*-*-mingw32ce*): Move near the other
15283 arm targets.
15284
68070c10
PA
152852007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15286
2482afc6 15287 * configure.ac: Add errno checking.
68070c10
PA
15288 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15289 sys/file.h and malloc.h.
15290 (AC_CHECK_DECLS): Add perror.
15291 (srv_mingwce): Handle.
2482afc6 15292 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15293 win32-i386-low.o to srv_tgtobj.
15294 (i[34567]86-*-mingw*): Likewise.
15295 (arm*-*-mingw32ce*): Add case.
15296 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15297 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15298 [__MINGW32CE__] (strerror): New function.
15299 [__MINGW32CE__] (errno): Define to GetLastError.
15300 [__MINGW32CE__] (COUNTOF): New macro.
15301 (remote_open): Remove extra close call.
15302 * mem-break.c (delete_breakpoint_at): New function.
15303 * mem-break.h (delete_breakpoint_at): Declare.
15304 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15305 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15306 [USE_WIN32API] (read, write): Add char* casts.
15307 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15308 * server.h: Include wincecompat.h on Windows CE.
15309 [HAVE_ERRNO_H]: Check.
15310 (perror): Declare if not declared.
15311 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15312 (perror_with_name): Remove errno declaration.
15313 * wincecompat.h: New.
15314 * wincecompat.c: New.
15315 * win32-low.h: New.
15316 * win32-arm-low.c: New.
15317 * win32-i386-low.c: New.
15318 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15319 (OUTMSG2): Make it safe.
15320 (_T): New macro.
15321 (COUNTOF): New macro.
15322 (NUM_REGS): Get it from the low target.
15323 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15324 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15325 (thread_rec): Let low target handle debug registers.
15326 (child_add_thread): Likewise.
15327 (child_init_thread_list): Likewise.
15328 (continue_one_thread): Likewise.
15329 (regptr): New.
15330 (do_child_fetch_inferior_registers): Move to ...
15331 * win32-i386-low.c: ... here, and rename to ...
15332 (do_fetch_inferior_registers): ... this.
889bf7c5 15333 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15334 Go through the low target.
15335 (do_child_store_inferior_registers): Use regptr.
15336 (strwinerror): New function.
15337 (win32_create_inferior): Handle Windows CE.
15338 Use strwinerror instead of strerror on Windows error
15339 codes. Add program to the error output.
15340 Don't close the main thread handle on Windows CE.
15341 (win32_attach): Use coredll.dll on Windows CE.
15342 (win32_kill): Close current process and current
15343 thread handles.
15344 (win32_detach): Use coredll.dll on Windows CE.
15345 (win32_resume): Let low target handle debug registers, and
15346 step request.
15347 (handle_exception): Add/Remove initial breakpoint. Avoid
15348 non-existant WSTOPSIG on Windows CE.
15349 (win32_read_inferior_memory): Cast to remove warning.
15350 (win32_arch_string): Go through the low target.
15351 (initialize_low): Call set_breakpoint_data with the low
15352 target's breakpoint.
15353 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15354 FOP_REGNUM, mappings): Move to ...
15355 * win32-i386-low.c: ... here.
15356 * win32-low.c (win32_thread_info): Move to ...
15357 * win32-low.h: ... here.
15358 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15359 win32-arm-low.c and wincecompat.c.
15360 (all:): Add $EXEEXT.
15361 (install-only:): Likewise.
15362 (gdbserver:): Likewise.
15363 (gdbreplay:): Likewise.
15364 * config.in: Regenerate.
15365 * configure: Regenerate.
15366
41093d81
PA
153672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15368
15369 * win32-low.c: Rename typedef thread_info to
15370 win32_thread_info throughout.
15371
544afa54
PA
153722007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15373
15374 * win32-i386-low.c: Rename to ...
15375 * win32-low.c: ... this.
15376 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15377 * Makefile.in: Likewise.
15378
bce7165d
PA
153792007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15380
15381 * remote-utils.c (monitor_output): Constify msg parameter.
15382 * server.h (monitor_output): Likewise.
15383 * win32-i386-low.c (handle_output_debug_string): New.
15384 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15385 handle_output_debug_string.
15386 (get_child_debug_event): Likewise.
15387
506c7aa0
DJ
153882007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15389
15390 * server.c (main): Correct strtoul check.
15391
42c81e2a
DJ
153922007-03-27 Jon Ringle <jon@ringle.org>
15393
15394 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15395
9453113a
DJ
153962007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15397
15398 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15399
64a69107
DJ
154002007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * terminal.h: Check HAVE_SGTTY_H.
15403
154042007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15405
15406 * remote-utils.c (remote_open): Print out the assigned port number.
15407
c74d0ad8
DJ
154082007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * remote-utils.c (monitor_output): New function.
15411 * server.c (debug_threads): Define here.
15412 (monitor_show_help): New function.
15413 (handle_query): Handle qRcmd.
15414 (main): Do not handle 'd' packet.
15415 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15416 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15417 of debug_threads.
15418
de7c3b4a
PA
154192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15420
15421 * Makefile.in (EXEEXT): New.
15422 (clean): Use $(EXEEXT).
15423
ef57601b
PA
154242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15425
15426 * target.h (target_ops): Rename send_signal to request_interrupt,
15427 and remove enum target_signal parameter.
15428 * linux-low.c (linux_request_interrupt): Rename from
15429 linux_send_signal, and always send SIGINT.
15430 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15431 and always send SIGINT.
15432 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15433 of send_signal.
15434 (input_interrupt): Likewise.
15435
820f2bda
PA
154362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15437
15438 * server.c (get_features_xml): Check if target implemented
15439 arch_string.
15440 * win32-i386-low.c (win32_arch_string): New.
15441 (win32_target_ops): Add win32_arch_string as arch_string member.
15442
ab39bf24
UW
154432007-02-22 Markus Deuling <deuling@de.ibm.com>
15444
15445 * spu-low.c (spu_arch_string): New.
15446 (spu_target_ops): Add spu_arch_string.
15447
61ff6e04
DJ
154482007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15449
15450 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15451 * configure.ac: Do not check for terminal.h.
15452 * configure, config.in: Regenerated.
15453
fb1e4ffc
DJ
154542007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * Makefile.in (OBS): Add $(XML_BUILTIN).
15457 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15458 (clean): Update.
15459 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15460 (arm-with-iwmmxt.c): New.
15461 * config.in, configure: Regenerate.
15462 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15463 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15464 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15465 (arm*-*-linux*): Add iWMMXt and regset support.
15466 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15467 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15468 (arm_store_wmmxregset, target_regsets): New.
15469 * server.c (get_features_xml): Take annex argument. Check builtin
15470 XML documents.
15471 (handle_query): Handle multiple annexes.
15472
0f48aa01
DJ
154732007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15474
15475 * remote-utils.c [USE_WIN32API] (read, write): Define.
15476 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15477 write.
15478
23181151
DJ
154792007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15480
15481 * linux-i386-low.c (the_low_target): Set arch_string.
15482 * linux-x86-64-low.c (the_low_target): Likewise.
15483 * linux-low.c (linux_arch_string): New.
15484 (linux_target_ops): Add it.
15485 * linux-low.h (struct linux_target_ops): Add arch_string.
15486 * server.c (write_qxfer_response): Use const void * for DATA.
15487 (get_features_xml): New.
15488 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15489 * target.h (struct target_ops): Add arch_string method.
15490
9d606399
DJ
154912007-01-03 Denis Pilat <denis.pilat@st.com>
15492 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * linux-low.c (linux_kill): Handle being called with no threads.
15495 * win32-i386-low.c (win32_kill): Likewise.
15496 (get_child_debug_event): Clear current_process_handle.
15497
154982006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15499 Daniel Jacobowitz <dan@codesourcery.com>
15500
15501 * remote-utils.c (remote_open): Check the type of specified
15502 serial port devices before opening them.
15503 * server.c (main): Kill the inferior if an error occurs during
15504 the first remote_open.
15505
a5e13d24
DJ
155062006-12-05 Markus Deuling <deuling@de.ibm.com>
15507
15508 * README: Update supported targets.
15509
186947f7
DJ
155102006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15511
15512 * Makefile.in (clean): Remove reg-mips64.c.
15513 (reg-mips64.c, reg-mips64.o): New rules.
15514 * configure.srv: Handle mips64. Include regset support for mips.
15515 * linux-mips-low.c (union mips_register): New.
15516 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15517 (mips_breakpoint, mips_breakpoint_at): Use int.
15518 (mips_collect_register, mips_supply_register)
15519 (mips_collect_register_32bit, mips_supply_register_32bit)
15520 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15521 (mips_store_fpregset, target_regsets): New.
15522 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15523
a13e2c95
UW
155242006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15525
15526 * configure.srv: Add target "spu*-*-*".
15527 * Makefile.in (clean): Remove reg-spu.c.
15528 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15529 * spu-low.c: New file.
15530
cb7283db
DJ
155312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * configure.ac: Correct td_thr_tls_get_addr test.
15534 * configure: Regenerated.
15535
89be2091
DJ
155362006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15537
15538 * linux-low.c (linux_wait_for_event): Reformat. Use the
15539 pass_signals array.
15540 * remote-utils.c (decode_address_to_semicolon): New.
15541 * server.c (pass_signals, handle_general_set): New.
15542 (handle_query): Mention QPassSignals for qSupported.
15543 (main): Call handle_general_set.
15544 * server.h (pass_signals, decode_address_to_semicolon): New.
15545
000ef4f0
DJ
155462006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * server.c (handle_query): Correct error handling for read_auxv.
15549
b7149293
UW
155502005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15551
15552 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15553 and srv_linux_thread_db to yes.
15554 * linux-s390-low.c (s390_fill_gregset): New function.
15555 (target_regsets): Define data structure.
15556
dae5f5cf
DJ
155572006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15558
15559 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15560 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15561 * config.in, configure: Regenerated.
15562 * inferiors.c (gdb_id_to_thread): New function.
15563 (gdb_id_to_thread_id): Use it.
15564 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15565 * linux-low.h (struct process_info): Add th member.
15566 (thread_db_get_tls_address): New prototype.
15567 * remote-utils.c (decode_address): Make non-static.
15568 * server.c (handle_query): Handle qGetTLSAddr.
15569 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15570 * target.h (struct target_ops): Add get_tls_address.
15571 * thread-db.c (maybe_attach_thread): Save the thread handle.
15572 (thread_db_get_tls_address): New.
15573
32ca6d61
DJ
155742006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15577 (linux_resume_one_process): Take a siginfo_t *. Update all
15578 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15579 (struct pending_signals): Add a siginfo_t.
15580 (linux_wait_for_process): Always set last_status.
15581 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15582 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15583 * linux-low.h (struct process_info): Add last_status.
15584
5ffff7c1
DJ
155852006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * remote-utils.c (try_rle): New function.
15588 (putpkt_binary): Use it.
15589
8695c747
DJ
155902006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15591
15592 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15593 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15594 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15595 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15596 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15597 point registers.
15598
290fadea
RS
155992006-08-08 Richard Sandiford <richard@codesourcery.com>
15600
15601 * server.c (terminal_fd): New variable.
15602 (old_foreground_pgrp): Likewise.
15603 (restore_old_foreground_pgrp): New function.
15604 (start_inferior): Record the terminal file descriptor in terminal_fd
15605 and its original foreground group in old_foreground_pgrp. Register
15606 restore_old_foreground_pgrp with atexit().
15607
9f2e1e63
DJ
156082006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * server.c (handle_query): Correct qPart to qXfer.
15611
b80864fb
DJ
156122006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * configure.ac: Check for more headers which are missing on
15615 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15616 * configure.srv: Add Cygwin and mingw32.
15617 * remote-utils.c: Don't include headers unconditionally which
15618 are missing on mingw32. Include <winsock.h> for mingw32.
15619 (remote_open): Adjust for mingw32 support. Flush
15620 standard error after writing to it.
15621 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15622 (unblock_async_io, enable_async_io, disable_async_io)
15623 (readchar, getpkt): Update for Winsock support.
15624 (prepare_resume_reply): Expect a protocol signal number.
15625 * server.c: Disable <sys/wait.h> on mingw32.
15626 (start_inferior): Adjust for mingw32 support. Flush
15627 standard error after writing to it.
15628 (attach_inferior): Likewise. Use protocol signal
15629 numbers.
15630 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15631 and names.
15632 * win32-i386-low.c: New file.
15633 * Makefile.in (XM_CLIBS): Set.
15634 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15635 (win32-i386-low.o): New dependency rule.
15636 * linux-low.c (linux_wait): Use target signal numbers.
15637 * target.h (struct target_ops): Doc fix.
15638 * server.h (target_signal_to_name): New prototype.
15639 * gdbreplay.c: Don't include headers unconditionally which
15640 are missing on mingw32. Include <winsock.h> for mingw32.
15641 (remote_close, remote_open): Adjust for Winsock support.
15642 * configure, config.in: Regenerated.
15643
0876f84a
DJ
156442006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15645
15646 * server.c (decode_xfer_read, write_qxfer_response): New.
15647 (handle_query): Take a packet length argument. Handle
15648 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15649 the qSupported response.
15650 (main): Update call to handle_query.
15651
01f9e8fa
DJ
156522006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15653
15654 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15655 (putpkt_binary): Renamed from putpkt and adjusted for binary
15656 data.
15657 (putpkt): New wrapper for putpkt_binary.
15658 (readchar): Don't mask off the high bit.
15659 (decode_X_packet): New function.
15660 * server.c (main): Call putpkt_binary if a handler sets the packet
15661 length. Save the length of the incoming packet. Handle 'X'.
15662 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15663
be2a5f71
DJ
156642006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15665
15666 * server.c (handle_query): Handle qSupported.
15667
ea025f5f
DJ
156682006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * remote-utils.c (all_symbols_looked_up): New variable.
15671 (look_up_one_symbol): Check it.
15672 * server.h (look_up_one_symbol): New declaration.
15673 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15674
9308fc88
DJ
156752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15678 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15679 (PTRACE_GET_THREAD_AREA): Define.
15680 (ps_get_thread_area): New function.
15681
52fb6437
NS
156822006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15683
15684 * configure.srv (m68k*-*-uclinux*): New target.
15685 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15686 (linux_resume_one_process): Remove extraneous cast.
15687 (linux_read_offsets): New.
15688 (linux_target_op): Add linux_read_offsets on mmuless systems.
15689 * server.c (handle_query): Add qOffsets logic.
15690 * target.h (struct target_ops): Add read_offsets.
15691
21b0f40c
DJ
156922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15693
15694 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15695 (PTRACE_GET_THREAD_AREA): Define.
15696 (ps_get_thread_area): New function.
15697 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15698 (linux-x86-64-low.o): Update.
15699
0050a760
DJ
157002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15701
15702 * configure.ac: Remove checks for prfpregset_t.
15703 * gdb_proc_service.h: New file.
15704 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15705 new "gdb_proc_service.h".
15706 * proc-service.c: Likewise.
15707 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15708 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15709 * Makefile.in (gdb_proc_service_h): Updated.
15710 * configure, config.in: Regenerated.
15711
b92a518e
DJ
157122006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15713
15714 * remote-utils.c (prepare_resume_reply): Move declaration
15715 of gdb_id_from_wait to the top of the block.
15716
545587ee
DJ
157172006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15718
15719 * linux-low.c (regsets_store_inferior_registers): Read the regset
15720 from the target before filling it.
15721
9db87ebd
DJ
157222006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15723
15724 * server.c (attach_inferior): Return SIGTRAP for a successful
15725 attach.
15726
dd24457d
DJ
157272006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15728
15729 * Makefile.in (OBS): Add version.o.
15730 (STAGESTUFF): Delete.
15731 (version.o): Add dependencies.
15732 (version.c): Replace rule.
15733 (clean): Remove version.c.
15734 * server.c (gdbserver_version): New.
15735 (gdbserver_usage): Use printf.
15736 (main): Handle --version and --help.
15737 * server.h (version, host_name): Add declarations.
15738
6f0f660e
EZ
157392005-12-23 Eli Zaretskii <eliz@gnu.org>
15740
889bf7c5
PA
15741 * linux-arm-low.c:
15742 * linux-arm-low.c:
15743 * inferiors.c:
15744 * i387-fp.h:
15745 * i387-fp.c:
15746 * gdbreplay.c:
15747 * regcache.c:
15748 * proc-service.c:
15749 * mem-break.h:
15750 * mem-break.c:
15751 * linux-x86-64-low.c:
15752 * linux-sh-low.c:
15753 * linux-s390-low.c:
15754 * linux-ppc64-low.c:
15755 * linux-ppc-low.c:
15756 * linux-mips-low.c:
15757 * linux-m68k-low.c:
15758 * linux-m32r-low.c:
15759 * linux-low.h:
15760 * linux-low.c:
15761 * linux-ia64-low.c:
15762 * linux-i386-low.c:
15763 * linux-crisv32-low.c:
15764 * thread-db.c:
15765 * terminal.h:
15766 * target.h:
15767 * target.c:
15768 * server.h:
15769 * server.c:
15770 * remote-utils.c:
15771 * regcache.h:
15772 * utils.c:
15773 * Makefile.in:
15774 * configure.ac:
6f0f660e
EZ
15775 * gdbserver.1: Add (C) after Copyright. Update the FSF
15776 address.
15777
9d1fb177
DJ
157782005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15781 (arm_breakpoint_at): Recognize both breakpoints.
15782 (the_low_target): Use the correct breakpoint instruction.
15783
011a70c2
DJ
157842005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15785
15786 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15787 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15788 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15789 (the_low_target): Update.
15790
7fb85e41
AS
157912005-10-25 Andreas Schwab <schwab@suse.de>
15792
15793 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15794
15795 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15796 (ia64_num_regs): Reduce to 462.
15797
3db0444b
DJ
157982005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15799
15800 * acinclude.m4: Correct quoting.
15801 * aclocal.m4: Regenerated.
15802
15803 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15804 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15805 (thread_db_init): Call thread_db_err_str.
15806 * configure.ac: Check for TD_VERSION.
15807 * config.in, configure: Regenerated.
15808
bee0189a
DJ
158092005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15810
15811 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15812
e9d25b98
DJ
158132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15814
15815 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15816 is not available. Define HAVE_PTRACE_GETREGS if it is.
15817 * config.in, configure: Regenerated.
15818 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15819 * linux-i386-low.c, linux-m68k-low.c: Update to use
15820 HAVE_PTRACE_GETREGS.
15821 * linux-low.c (regsets_fetch_inferior_registers)
15822 (regsets_store_inferior_registers): Only return 0 if we processed
15823 GENERAL_REGS.
15824 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15825 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15826
a06660f7
DJ
158272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * inferiors.c (struct thread_info): Add gdb_id.
15830 (add_thread): Add gdb_id argument.
15831 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15832 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15833 calls to add_thread.
15834 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15835 * server.c (handle_query): Use thread_to_gdb_id.
15836 (handle_v_cont, main): Use gdb_id_to_thread_id.
15837 * server.h (add_thread): Update prototype.
15838 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15839 prototypes.
15840
5a1f5858
DJ
158412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15844 left-padded registers.
15845 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15846 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15847
e122f1f5
SE
158482005-07-01 Steve Ellcey <sje@cup.hp.com>
15849
15850 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15851 * configure: Regenerate.
15852 * config.in: Regenerate.
15853 * server.h (NEED_DECLARATION_STRERROR):
15854 Replace with !HAVE_DECL_STRERROR.
15855
d592fa2f
DJ
158562005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15857
15858 * linux-low.c (linux_wait, linux_send_signal): Don't test
15859 an unsigned long variable for > 0 if it could be MAX_ULONG.
15860 * server.c (myresume): Likewise.
15861 * target.c (set_desired_inferior): Likewise.
15862
ccbd4912
MK
158632005-06-13 Mark Kettenis <kettenis@gnu.org>
15864
15865 * configure.ac: Simplify and improve check for socklen_t.
15866 * configure, config.in: Regenerate.
15867
f450004a
DJ
158682005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15869
15870 * acconfig.h: Remove.
15871 * configure.ac: Add a test for socklen_t. Use three-argument
15872 AC_DEFINE throughout.
15873 * config.in: Regenerated using autoheader 2.59.
15874 * configure: Regenerated.
15875
15876 * gdbreplay.c (socklen_t): Provide a default.
15877 (remote_open): Use socklen_t.
15878 * remote-utils.c (socklen_t): Provide a default.
15879 (remote_open): Use socklen_t.
15880 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15881 unsigned char.
15882
15883 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15884 char for buffers.
15885 * linux-low.c (linux_read_memory, linux_write_memory)
15886 (linux_read_auxv): Likewise.
15887 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15888 (check_mem_write): Likewise.
15889 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15890 Likewise.
15891 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15892 (registers_from_string, register_data): Likewise.
15893 * server.c (handle_query, main): Likewise.
15894 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15895 (decode_M_packet): Likewise.
15896 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15897 * target.h (struct target_ops): Update read_memory, write_memory,
15898 and read_auxv.
15899 (read_inferior_memory, write_inferior_memory): Update.
15900 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15901 to unsigned char *.
15902 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15903 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15904 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15905 linux-s390-low.c, linux-sh-low.c: Update for changes in
15906 read_inferior_memory and the_low_target->breakpoint.
15907
eee84df1
DJ
159082005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15909
15910 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15911 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15912 * configure.srv: Add powerpc64-*-linux*.
15913 * linux-ppc64-low.c: New file.
15914
45b134e5
OF
159152005-05-23 Orjan Friberg <orjanf@axis.com>
15916
15917 * linux-cris-low.c: New file with support for CRIS.
15918 * linux-crisv32-low.c: Ditto for CRISv32.
15919 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15920 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15921 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15922 reg-crisv32.o, and reg-crisv32.c to make rules.
15923 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15924 recognized targets.
15925
48d93c75
UW
159262005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15927
15928 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15929 of sizeof (PTRACE_XFER_TYPE).
15930 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15931
e013ee27
OF
159322005-05-12 Orjan Friberg <orjanf@axis.com>
15933
889bf7c5 15934 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15935 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15936 pointers for hardware watchpoint support.
15937 * linux-low.h (struct linux_target_ops): Ditto.
15938 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15939 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15940 to linux_target_ops.
15941 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15942 reply packet.
15943 * server.c (main): Recognize 'Z' and 'z' packets.
15944
b0ded00b
UW
159452005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15946
15947 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15948 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15949 (the_low_target): Add new members.
15950
8643e2ad
DJ
159512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15952
15953 * proc-service.c (ps_lgetregs): Search all_processes instead of
15954 all_threads.
15955
fc620387
DJ
159562005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15957
15958 * server.c (start_inferior): Change return type to int.
15959 (attach_inferior): Change sigptr to int *.
15960 (handle_v_cont, handle_v_requests): Change signal to int *.
15961 (main): Change signal to int.
15962
159632005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15964
15965 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15966 * configure.srv: Add m32r*-*-linux*.
15967 * linux-m32r-low.c: New file.
15968
e0e76420
DJ
159692005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15970
15971 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15972
a1928bad
DJ
159732005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15974
15975 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15976 Take unsigned long arguments for PIDs.
15977 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15978 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15979 (wait_for_sigstop, linux_resume_one_process)
15980 (regsets_fetch_inferior_registers, linux_send_signal)
15981 (linux_read_auxv): Likewise. Update the types of variables holding
15982 PIDs. Update format string specifiers.
15983 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15984 * remote-utils.c (prepare_resume_reply): Likewise.
15985 * server.c (cont_thread, general_thread, step_thread)
15986 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15987 unsigned long.
15988 (handle_query): Update format specifiers.
15989 (handle_v_cont, main): Use strtoul for thread IDs.
15990 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15991 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15992 (general_thread, step_thread, thread_from_wait)
15993 (old_thread_from_wait): Update.
15994 * target.h (struct thread_resume): Use unsigned long for THREAD.
15995 (struct target_ops): Use unsigned long for arguments to attach and
15996 thread_alive.
15997
dcdb98d2
DJ
159982005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15999
16000 * acinclude.m4: Include bfd/bfd.m4 directly.
16001 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16002 <agriffis@toolchain.org>.
16003 * aclocal.m4, configure: Regenerated.
16004
bec39cab
AC
160052005-01-07 Andrew Cagney <cagney@gnu.org>
16006
16007 * configure.ac: Rename configure.in, require autoconf 2.59.
16008 * configure: Re-generate.
16009
434c4c77
DJ
160102004-12-08 Daniel Jacobowitz <dan@debian.org>
16011
16012 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16013 LIBS when finished.
16014 * aclocal.m4: Regenerated.
16015 * configure: Regenerated.
16016
db1d3e1b
AS
160172004-11-21 Andreas Schwab <schwab@suse.de>
16018
16019 * linux-m68k-low.c (m68k_num_gregs): Define.
16020 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16021 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16022 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16023 (m68k_breakpoint_at): New. Add to the_low_target.
16024
16025 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16026 srv_linux_thread_db to yes.
16027
43360365
JB
160282004-10-20 Joel Brobecker <brobecker@gnat.com>
16029
16030 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16031 (ARCH_SET_FS): Likewise.
16032 (ARCH_GET_FS): Likewise.
16033 (ARCH_GET_GS): Likewise.
16034
fd500816
DJ
160352004-10-16 Daniel Jacobowitz <dan@debian.org>
16036
16037 * linux-i386-low.c (ps_get_thread_area): New.
16038 * linux-x86-64-low.c (ps_get_thread_area): New.
16039 * linux-low.c: Include <sys/syscall.h>.
16040 (linux_kill_one_process): Don't kill the first thread here.
16041 (linux_kill): Kill the first thread here.
16042 (kill_lwp): New function.
16043 (send_sigstop, linux_send_signal): Use it.
16044 * proc-service.c: Clean up #ifdefs.
16045 (fpregset_info): Delete.
16046 (ps_lgetregs): Update and enable implementation.
16047 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16048 implementations.
16049 * remote-utils.c (struct sym_cache, symbol_cache): New.
16050 (input_interrupt): Print a clearer message.
16051 (async_io_enabled): New variable.
16052 (enable_async_io, disable_async_io): Use it. Update comments.
16053 (look_up_one_symbol): Use the symbol cache.
16054 * thread-db.c (thread_db_look_up_symbols): New function.
16055 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16056
f6de3c42
DJ
160572004-10-16 Daniel Jacobowitz <dan@debian.org>
16058
16059 * configure.in: Test for -rdynamic.
16060 * configure: Regenerated.
16061 * Makefile (INTERNAL_LDFLAGS): New.
16062 (gdbserver, gdbreplay): Use it.
16063
2c0fc042
AC
160642004-09-02 Andrew Cagney <cagney@gnu.org>
16065
16066 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16067
075b3282
DJ
160682004-03-23 Daniel Jacobowitz <drow@mvista.com>
16069
16070 * linux-low.c (linux_wait): Clear all_processes list also.
16071
fa6a77dc
DJ
160722004-03-12 Daniel Jacobowitz <drow@mvista.com>
16073
16074 * linux-low.c: Include <errno.h>. Remove extern declaration of
16075 errno.
16076
6d782a97
DJ
160772004-03-12 Daniel Jacobowitz <drow@mvista.com>
16078
16079 * gdbreplay.c, server.h, utils.c: Update copyright years.
16080
3a7fb99b
DJ
160812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16082
16083 * server.c (main): Print child status or termination signal from
16084 variable 'signal', not 'sig'.
16085
c3e735a6
DJ
160862004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16087
16088 * linux-low.c (linux_read_memory): Change return type to
16089 int. Check for and return error from ptrace().
16090 * target.c (read_inferior_memory): Change return type to int. Pass
16091 back return status from the_target->read_memory().
16092 * target.h (struct target_ops): Adapt *read_memory() prototype.
16093 Update comment.
16094 (read_inferior_memory): Adapt prototype.
16095 * server.c (main): Return an error packet if
16096 read_inferior_memory() returns an error.
16097
a59d1c82
DJ
160982004-03-04 Daniel Jacobowitz <drow@mvista.com>
16099
16100 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16101 Unify with other clean targets.
16102
dc3f8883
DJ
161032004-02-29 Daniel Jacobowitz <drow@mvista.com>
16104
16105 * server.c (handle_v_cont): Call set_desired_inferior.
16106
89a208da
DJ
161072004-02-29 Daniel Jacobowitz <drow@mvista.com>
16108
16109 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16110
62ea82f5
DJ
161112004-02-29 Daniel Jacobowitz <drow@mvista.com>
16112
16113 * linux-low.c (linux_wait): Unblock async I/O.
16114 (linux_resume): Block and enable async I/O.
16115 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16116 * server.h (block_async_io, unblock_async_io): Add prototypes.
16117
6910d122
DJ
161182004-02-29 Daniel Jacobowitz <drow@mvista.com>
16119
16120 * remote-utils.c (remote_open): Print a status notice after
16121 opening a TCP port.
16122 * server.c (attach_inferior): Print a status notice after
16123 attaching.
16124
161252004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16126
16127 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16128
c89dc5d4
DJ
161292004-02-26 Daniel Jacobowitz <drow@mvista.com>
16130
16131 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16132 error packet.
16133 * server.c, target.h: Update copyright years.
16134
4b8dad4a
RM
161352004-02-25 Roland McGrath <roland@redhat.com>
16136
16137 * target.h (struct target_ops): New member `read_auxv'.
16138 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16139 * linux-low.c (linux_read_auxv): New function.
16140 (linux_target_ops): Initialize `read_auxv' member to that.
16141
d7446758
JB
161422004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16143
16144 Committed by Jim Blandy <jimb@redhat.com>.
16145
16146 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16147 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16148 instead of GPR_SIZE to distiguish s390 and s390x targets.
16149
5544ad89
DJ
161502004-01-31 Daniel Jacobowitz <drow@mvista.com>
16151
16152 * linux-low.c: Update copyright year.
16153 (check_removed_breakpoint): Clear pending_is_breakpoint.
16154 (linux_set_resume_request, linux_queue_one_thread)
16155 (resume_status_pending_p): New functions.
16156 (linux_continue_one_thread): Use process->resume.
16157 (linux_resume): Only resume threads if there are no pending events.
16158 * linux-low.h (struct process_info): Add resume request
16159 pointer.
16160
2a68b70e
DJ
161612004-01-30 Daniel Jacobowitz <drow@mvista.com>
16162
16163 * regcache.c (new_register_cache): Clear the allocated register
16164 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16165
64386c31
DJ
161662003-10-13 Daniel Jacobowitz <drow@mvista.com>
16167
16168 * linux-low.c (linux_resume): Take a struct thread_resume *
16169 argument.
16170 (linux_wait): Update call.
16171 (resume_ptr): New static variable.
16172 (linux_continue_one_thread): Renamed from
16173 linux_continue_one_process. Use resume_ptr.
16174 (linux_resume): Use linux_continue_one_thread.
16175 * server.c (handle_v_cont, handle_v_requests): New functions.
16176 (myresume): New function.
16177 (main): Handle 'v' case.
16178 * target.h (struct thread_resume): New type.
16179 (struct target_ops): Change argument of "resume" to struct
16180 thread_resume *.
16181 (myresume): Delete macro.
16182
c938e9b0
L
161832003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16184
16185 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16186 (uninstall): Support DESTDIR.
16187
7f313d07
BC
16188Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16189
16190 * configure.srv: Add xscale*linux copy of arm*linux entry.
16191
3b2fc2ea
DJ
161922003-07-24 Daniel Jacobowitz <drow@mvista.com>
16193
16194 * linux-arm-low.c (arm_reinsert_addr): New function.
16195 (the_low_target): Add arm_reinsert_addr.
16196
1c0a559e
MK
161972003-07-08 Mark Kettenis <kettenis@gnu.org>
16198
16199 * mem-break.c: Remove whitespace at end of file.
16200
43d5792c
DJ
162012003-06-28 Daniel Jacobowitz <drow@mvista.com>
16202
16203 * configure.in: Check whether we need to prototype strerror.
16204 * server.h: Optionally prototype strerror.
16205 * gdbreplay.c (perror_with_name): Use strerror.
16206 * linux-low.c (linux_attach_lwp): Use strerror.
16207 * utils.c (perror_with_name): Use strerror.
16208 * config.in, configure: Regenerated.
16209
c8a86edf
DJ
162102003-06-28 Daniel Jacobowitz <drow@mvista.com>
16211
16212 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16213 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16214
73d37363
DJ
162152003-06-20 Daniel Jacobowitz <drow@mvista.com>
16216
16217 * Makefile.in (SFILES): Update.
16218 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16219 low-sun3.c: Remove files.
16220
6ad8ae5c
DJ
162212003-06-17 Daniel Jacobowitz <drow@mvista.com>
16222
16223 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16224 (linux_detach_one_process, linux_detach): New functions.
16225 (linux_target_ops): Add linux_detach.
16226 * server.c (main): Handle 'D' packet.
16227 * target.h (struct target_ops): Add "detach" member.
16228 (detach_inferior): Define.
16229
1581182a
MK
162302003-06-13 Mark Kettenis <kettenis@gnu.org>
16231
16232 From Kelley Cook <kelleycook@wideopenwest.com>:
16233 * configure.srv: Accept i[34567]86 variants.
16234
e5379b03
DJ
162352003-06-05 Daniel Jacobowitz <drow@mvista.com>
16236
16237 * linux-low.c (linux_wait_for_event): Correct comment typos.
16238 (linux_resume_one_process): Call check_removed_breakpoint.
16239 (linux_send_signal): New function.
16240 (linux_target_ops): Add linux_send_signal.
16241 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16242 of kill.
16243 * target.h (struct target_ops): Add send_signal.
16244
2ff29de4
JB
162452003-05-29 Jim Blandy <jimb@redhat.com>
16246
16247 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16248 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16249 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16250 away part of the register's value.
16251
254787d4
DJ
162522003-03-26 Daniel Jacobowitz <drow@mvista.com>
16253
16254 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16255 (linux_wait_for_event, linux_init_signals): Likewise.
16256
94e10508
DJ
162572003-03-17 Daniel Jacobowitz <drow@mvista.com>
16258
16259 * configure.in: Check for stdlib.h.
16260 * configure: Regenerated.
16261 * config.in: Regenerated.
16262
4c0711e0
DJ
162632003-01-04 Andreas Schwab <schwab@suse.de>
16264
16265 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16266
ef66e766
AC
162672003-01-02 Andrew Cagney <ac131313@redhat.com>
16268
16269 * Makefile.in: Remove obsolete code.
16270
a1358604
DJ
162712002-11-20 Daniel Jacobowitz <drow@mvista.com>
16272
16273 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16274 defined(PT_FPR0_HI).
16275
23ce3b1c
DJ
162762002-11-17 Stuart Hughes <seh@zee2.com>
16277
16278 * linux-arm-low.c (arm_num_regs): Increase.
16279 (arm_regmap): Include status register.
16280
162812002-11-17 Daniel Jacobowitz <drow@mvista.com>
16282
16283 * linux-low.c (register_addr): Remove incorrect -1 check.
16284
a9fa9f7d
DJ
162852002-08-29 Daniel Jacobowitz <drow@mvista.com>
16286
16287 * linux-low.c (linux_create_inferior): Call setpgid. Return
16288 the new PID.
16289 (unstopped_p, linux_signal_pid): Remove.
16290 (linux_target_ops): Remove linux_signal_pid.
16291 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16292 global instead of target method.
16293 * target.h (struct target_ops): Remove signal_pid. Update comment
16294 for create_inferior.
16295 * server.c (signal_pid): New variable.
16296 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16297 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16298 (attach_inferior): Set signal_pid.
16299
17574093
DJ
163002002-08-23 Daniel Jacobowitz <drow@mvista.com>
16301
16302 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16303
163042002-08-20 Jim Blandy <jimb@redhat.com>
16305
16306 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16307 default for this.
16308
163092002-08-01 Andrew Cagney <cagney@redhat.com>
16310
16311 * Makefile.in: Make chill references obsolete.
16312
163132002-07-24 Kevin Buettner <kevinb@redhat.com>
16314
16315 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16316 * configure: Regenerate.
16317 * config.in: Regenerate.
16318
163192002-07-09 David O'Brien <obrien@FreeBSD.org>
16320
16321 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16322 (perror_with_name, remote_close, remote_open, expect, play): Static.
16323
163242002-07-04 Michal Ludvig <mludvig@suse.cz>
16325
4b8dad4a 16326 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16327 byte offsets instead of an array of indexes.
16328 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16329
163302002-06-13 Daniel Jacobowitz <drow@mvista.com>
16331
16332 * regcache.c: Add comment.
16333
163342002-06-11 Daniel Jacobowitz <drow@mvista.com>
16335
16336 * thread-db.c: New file.
16337 * proc-service.c: New file.
16338 * acinclude.m4: New file.
16339 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16340 proc-service.o, and thread-db.o.
16341 (linux-low.o): Add USE_THREAD_DB.
16342 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16343 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16344 * aclocal.m4: Regenerated.
16345 * config.in: Regenerated.
16346 * configure: Regenerated.
16347 * configure.in: Check for proc_service.h, sys/procfs.h,
16348 thread_db.h, and linux/elf.h headrs.
16349 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16350 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16351 Check for -lthread_db and thread support.
16352 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16353 PowerPC, and SuperH.
16354 * i387-fp.c: Constify arguments.
16355 * i387-fp.h: Likewise.
16356 * inferiors.c: (struct thread_info): Renamed from
16357 `struct inferior_info'. Remove PID member. Use generic inferior
16358 list header. All uses updated.
16359 (inferiors, signal_pid): Removed.
16360 (all_threads): New variable.
16361 (get_thread): Define.
16362 (add_inferior_to_list): New function.
16363 (for_each_inferior): New function.
16364 (change_inferior_id): New function.
16365 (add_inferior): Removed.
16366 (remove_inferior): New function.
16367 (add_thread): New function.
16368 (free_one_thread): New function.
16369 (remove_thread): New function.
16370 (clear_inferiors): Use for_each_inferior and free_one_thread.
16371 (find_inferior): New function.
16372 (find_inferior_id): New function.
16373 (inferior_target_data): Update argument type.
16374 (set_inferior_target_data): Likewise.
16375 (inferior_regcache_data): Likewise.
16376 (set_inferior_regcache_data): Likewise.
16377 * linux-low.c (linux_bp_reinsert): Remove.
16378 (all_processes, stopping_threads, using_thrads)
16379 (struct pending_signals, debug_threads, pid_of): New.
16380 (inferior_pid): Replace with macro.
16381 (struct inferior_linux_data): Remove.
16382 (get_stop_pc, add_process): New functions.
16383 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16384 Use add_process and add_thread.
16385 (linux_attach_lwp): New function, based on old linux_attach. Use
16386 add_process and add_thread. Set stop_expected for new threads.
16387 (linux_attach): New function.
16388 (linux_kill_one_process): New function.
16389 (linux_kill): Kill all LWPs.
16390 (linux_thread_alive): Use find_inferior_id.
16391 (check_removed_breakpoints, status_pending_p): New functions.
16392 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16393 Update. Use WNOHANG. Wait for cloned processes also. Update process
16394 struct for the found process.
16395 (linux_wait_for_event): New function.
16396 (linux_wait): Use it. Support LWPs.
16397 (send_sigstop, wait_for_sigstop, stop_all_processes)
16398 (linux_resume_one_process, linux_continue_one_process): New functions.
16399 (linux_resume): Support LWPs.
16400 (REGISTER_RAW_SIZE): Remove.
16401 (fetch_register): Use register_size instead. Call supply_register.
16402 (usr_store_inferior_registers): Likewise. Call collect_register.
16403 Fix recursive case.
16404 (regsets_fetch_inferior_registers): Improve error message.
16405 (regsets_store_inferior_registers): Add debugging.
16406 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16407 (unstopped_p, linux_signal_pid): New functions.
16408 (linux_target_ops): Add linux_signal_pid.
16409 (linux_init_signals): New function.
16410 (initialize_low): Call it. Initialize using_threads.
16411 * regcache.c (inferior_regcache_data): Add valid
16412 flag.
16413 (get_regcache): Fetch registers lazily. Add fetch argument
16414 and update all callers.
16415 (regcache_invalidate_one, regcache_invalidate): New
16416 functions.
16417 (new_register_cache): Renamed from create_register_cache.
16418 Return the new regcache.
16419 (free_register_cache): Change argument to a void *.
16420 (registers_to_string, registers_from_string): Call get_regcache
16421 with fetch flag set.
16422 (register_data): Make static. Pass fetch flag to get_regcache.
16423 (supply_register): Call get_regcache with fetch flag clear.
16424 (collect_register): Call get_regcache with fetch flag set.
16425 (collect_register_as_string): New function.
16426 * regcache.h: Update.
16427 * remote-utils.c (putpkt): Flush after debug output and use
16428 stderr.
16429 Handle input interrupts while waiting for an ACK.
16430 (input_interrupt): Use signal_pid method.
16431 (getpkt): Flush after debug output and use stderr.
16432 (outreg): Use collect_register_as_string.
16433 (new_thread_notify, dead_thread_notify): New functions.
16434 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16435 and general_thread.
16436 (look_up_one_symbol): Flush after debug output.
16437 * server.c (step_thread, server_waiting): New variables.
16438 (start_inferior): Don't use signal_pid. Update call to mywait.
16439 (attach_inferior): Update call to mywait.
16440 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16441 (main): Don't fetch/store registers explicitly. Use
16442 set_desired_inferior. Support proposed ``Hs'' packet. Update
16443 calls to mywait.
16444 * server.h: Update.
16445 (struct inferior_list, struct_inferior_list_entry): New.
16446 * target.c (set_desired_inferior): New.
16447 (write_inferior_memory): Constify.
16448 (mywait): New function.
16449 * target.h: Update.
16450 (struct target_ops): New signal_pid method.
16451 (mywait): Removed macro, added prototype.
16452
16453 * linux-low.h (regset_func): Removed.
16454 (regset_fill_func, regset_store_func): New.
16455 (enum regset_type): New.
16456 (struct regset_info): Add type field. Use new operation types.
16457 (struct linux_target_ops): stop_pc renamed to get_pc.
16458 Add decr_pc_after_break and breakpoint_at.
16459 (get_process, get_thread_proess, get_process_thread)
16460 (strut process_info, all_processes, linux_attach_lwp)
16461 (thread_db_init): New.
16462
16463 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16464 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16465 (the_low_target): Add new members.
16466 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16467 (i386_store_fpxregset): Constify.
16468 (target_regsets): Add new kind identifier.
16469 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16470 (i386_set_pc): Add debugging.
16471 (i386_breakpoint_at): New function.
16472 (the_low_target): Add new members.
16473 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16474 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16475 (mips_breakpoint_at): New.
16476 (the_low_target): Add new members.
16477 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16478 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16479 (the_low_target): Add new members.
16480 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16481 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16482 (the_low_target): Add new members.
16483 * linux-x86-64-low.c (target_regsets): Add new kind
16484 identifier.
16485
164862002-05-15 Daniel Jacobowitz <drow@mvista.com>
16487
16488 From Martin Pool <mbp@samba.org>:
16489 * server.c (gdbserver_usage): New function.
16490 (main): Call it.
16491
164922002-05-14 Daniel Jacobowitz <drow@mvista.com>
16493
16494 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16495 stop_at -> stop_pc.
16496
164972002-05-04 Andrew Cagney <ac131313@redhat.com>
16498
16499 * Makefile.in: Remove obsolete code.
16500
165012002-04-24 Michal Ludvig <mludvig@suse.cz>
16502
16503 * linux-low.c (regsets_fetch_inferior_registers),
16504 (regsets_store_inferior_registers): Removed cast to int from
16505 ptrace() calls.
16506 * regcache.h: Added declaration of struct inferior_info.
16507
165082002-04-20 Daniel Jacobowitz <drow@mvista.com>
16509
16510 * inferiors.c (struct inferior_info): Add regcache_data.
16511 (add_inferior): Call create_register_cache.
16512 (clear_inferiors): Call free_register_cache.
16513 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16514 * regcache.c (struct inferior_regcache_data): New.
16515 (registers): Remove.
16516 (get_regcache): New function.
16517 (create_register_cache, free_register_cache): New functions.
16518 (set_register_cache): Don't initialize the register cache here.
16519 (registers_to_string, registers_from_string, register_data): Call
16520 get_regcache.
16521 * regcache.h: Add prototypes.
16522 * server.h: Likewise.
16523
165242002-04-20 Daniel Jacobowitz <drow@mvista.com>
16525
16526 * mem-break.c: New file.
16527 * mem-break.h: New file.
16528 * Makefile.in: Add mem-break.o rule; update server.h
16529 dependencies.
16530 * inferiors.c (struct inferior_info): Add target_data
16531 member.
16532 (clear_inferiors): Free target_data member if set.
16533 (inferior_target_data, set_inferior_target_data): New functions.
16534 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16535 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16536 * linux-low.c (linux_bp_reinsert): New variable.
16537 (struct inferior_linux_data): New.
16538 (linux_create_inferior): Use set_inferior_target_data.
16539 (linux_attach): Likewise. Call add_inferior.
16540 (linux_wait_for_one_inferior): New function.
16541 (linux_wait): Call it.
16542 (linux_write_memory): Add const.
16543 (initialize_low): Call set_breakpoint_data.
16544 * linux-low.h (struct linux_target_ops): Add breakpoint
16545 handling members.
16546 * server.c (attach_inferior): Remove extra add_inferior
16547 call.
16548 * server.h: Include mem-break.h. Update inferior.c
16549 prototypes.
16550 * target.c (read_inferior_memory)
16551 (write_inferior_memory): New functions.
16552 * target.h (read_inferior_memory)
16553 (write_inferior_memory): Change macros to prototypes.
16554 (struct target_ops): Update comments. Add const to write_memory
16555 definition.
16556
165572002-04-11 Daniel Jacobowitz <drow@mvista.com>
16558
16559 * linux-low.c (usr_store_inferior_registers): Support
16560 registers which are allowed to fail to store.
16561 * linux-low.h (linux_target_ops): Likewise.
16562 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16563 (ppc_cannot_store_register): FPSCR may not be storable.
16564
165652002-04-09 Daniel Jacobowitz <drow@mvista.com>
16566
16567 * server.h: Include <string.h> if HAVE_STRING_H.
16568 * ChangeLog: Correct paths in last ChangeLog entry.
16569
165702002-04-09 Daniel Jacobowitz <drow@mvista.com>
16571
16572 * linux-low.h: Remove obsolete prototypes.
16573 (struct linux_target_ops): New.
16574 (extern the_low_target): New.
16575 * linux-low.c (num_regs, regmap): Remove declarations.
16576 (register_addr): Use the_low_target explicitly.
16577 (fetch_register): Likewise.
16578 (usr_fetch_inferior_registers): Likewise.
16579 (usr_store_inferior_registers): Likewise.
16580 * linux-arm-low.c (num_regs): Remove.
16581 (arm_num_regs): Define.
16582 (arm_regmap): Renamed from regmap, made static.
16583 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16584 made static.
16585 (arm_cannot_store_register): Renamed from cannot_store_register,
16586 made static.
16587 (the_low_target): New.
16588 * linux-i386-low.c (num_regs): Remove.
16589 (i386_num_regs): Define.
16590 (i386_regmap): Renamed from regmap, made static.
16591 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16592 made static.
16593 (i386_cannot_store_register): Renamed from cannot_store_register,
16594 made static.
16595 (the_low_target): New.
16596 * linux-ia64-low.c (num_regs): Remove.
16597 (ia64_num_regs): Define.
16598 (ia64_regmap): Renamed from regmap, made static.
16599 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16600 made static.
16601 (ia64_cannot_store_register): Renamed from cannot_store_register,
16602 made static.
16603 (the_low_target): New.
16604 * linux-m68k-low.c (num_regs): Remove.
16605 (m68k_num_regs): Define.
16606 (m68k_regmap): Renamed from regmap, made static.
16607 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16608 made static.
16609 (m68k_cannot_store_register): Renamed from cannot_store_register,
16610 made static.
16611 (the_low_target): New.
16612 * linux-mips-low.c (num_regs): Remove.
16613 (mips_num_regs): Define.
16614 (mips_regmap): Renamed from regmap, made static.
16615 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16616 made static.
16617 (mips_cannot_store_register): Renamed from cannot_store_register,
16618 made static.
16619 (the_low_target): New.
16620 * linux-ppc-low.c (num_regs): Remove.
16621 (ppc_num_regs): Define.
16622 (ppc_regmap): Renamed from regmap, made static.
16623 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16624 made static.
16625 (ppc_cannot_store_register): Renamed from cannot_store_register,
16626 made static.
16627 (the_low_target): New.
16628 * linux-s390-low.c (num_regs): Remove.
16629 (s390_num_regs): Define.
16630 (s390_regmap): Renamed from regmap, made static.
16631 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16632 made static.
16633 (s390_cannot_store_register): Renamed from cannot_store_register,
16634 made static.
16635 (the_low_target): New.
16636 * linux-sh-low.c (num_regs): Remove.
16637 (sh_num_regs): Define.
16638 (sh_regmap): Renamed from regmap, made static.
16639 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16640 made static.
16641 (sh_cannot_store_register): Renamed from cannot_store_register,
16642 made static.
16643 (the_low_target): New.
16644 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16645 (the_low_target): New.
16646
166472002-04-09 Daniel Jacobowitz <drow@mvista.com>
16648
16649 * Makefile.in: Add stamp-h target.
16650 * configure.in: Create stamp-h.
16651 * configure: Regenerated.
16652
166532002-04-09 Daniel Jacobowitz <drow@mvista.com>
16654
16655 * inferiors.c: New file.
16656 * target.c: New file.
16657 * target.h: New file.
16658 * Makefile.in: Add target.o and inferiors.o. Update
16659 dependencies.
16660 * linux-low.c (inferior_pid): New static variable,
16661 moved from server.c.
16662 (linux_create_inferior): Renamed from create_inferior.
16663 Call add_inferior. Return 0 on success instead of a PID.
16664 (linux_attach): Renamed from myattach.
16665 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16666 (linux_thread_alive): Renamed from mythread_alive.
16667 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16668 child dies.
16669 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16670 (regsets_store_inferior_registers): Correct error message.
16671 Add missing ``return 0''.
16672 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16673 (linux_store_registers): Renamed from store_inferior_registers.
16674 (linux_read_memory): Renamed from read_inferior_memory.
16675 (linux_write_memory): Renamed from write_inferior_memory.
16676 (linux_target_ops): New structure.
16677 (initialize_low): Call set_target_ops ().
16678 * remote-utils.c (unhexify): New function.
16679 (hexify): New function.
16680 (input_interrupt): Send signals to ``signal_pid''.
16681 * server.c (inferior_pid): Remove.
16682 (start_inferior): Update create_inferior call.
16683 (attach_inferior): Call add_inferior.
16684 (handle_query): New function.
16685 (main): Call handle_query for `q' packets.
16686 * server.h: Include "target.h". Remove obsolete prototypes.
16687 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16688
166892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16690
16691 * Makefile.in: Add WARN_CFLAGS. Update configury
16692 dependencies.
16693 * configure.in: Check for <string.h>
16694 * configure: Regenerate.
16695 * config.in: Regenerate.
16696 * gdbreplay.c: Include needed system headers.
16697 (remote_open): Remove strchr prototype.
16698 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16699 * regcache.c (supply_register): Change buf argument to const void *.
16700 (supply_register_by_name): Likewise.
16701 (collect_register): Change buf argument to void *.
16702 (collect_register_by_name): Likewise.
16703 * regcache.h: Add missing prototypes.
16704 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16705 * server.c (handle_query): New function.
16706 (attached): New static variable, moved out of main.
16707 (main): Quiet longjmp clobber warnings.
16708 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16709 * utils.c (error): Remove NORETURN.
16710 (fatal): Likewise.