MIPS/gdbserver: Fix issues with $zero register reads
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e4439e43
MR
12018-05-21 Maciej W. Rozycki <macro@mips.com>
2
3 * linux-mips-low.c (mips_fetch_register): New function. Update
4 preceding comment.
5 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6 (the_low_target): Wire `mips_fetch_register'.
7
55271bf9
JB
82018-05-10 Joel Brobecker <brobecker@adacore.com>
9
10 * lynx-i386-low.c (LYNXOS_178): New macro.
11 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
12 the layout on LynxOS-178.
13 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
14 handle floating point registers that are not supported by
15 LynxOS-178.
16
1a34f210
TT
172018-05-10 Tom Tromey <tom@tromey.com>
18
19 * configure: Rebuild.
20
190852c8
JB
212018-05-10 Joel Brobecker <brobecker@adacore.com>
22
23 PR server/23158:
24 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
25 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
26 Use it to set the expedite_regs field in the given tdesc.
27 * x86-tdesc.h: New file.
28 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
29 Adjust following the addition of the new expedite_regs parameter
30 to init_target_desc.
31 * linux-tic6x-low.c (tic6x_read_description): Likewise.
32 * linux-x86-tdesc.c: #include "x86-tdesc.h".
33 (i386_linux_read_description, amd64_linux_read_description):
34 Adjust following the addition of the new expedite_regs parameter
35 to init_target_desc.
36 * lynx-i386-low.c: #include "x86-tdesc.h".
37 (lynx_i386_arch_setup): Adjust following the addition of the new
38 expedite_regs parameter to init_target_desc.
39 * nto-x86-low.c: #include "x86-tdesc.h".
40 (nto_x86_arch_setup): Adjust following the addition of the new
41 expedite_regs parameter to init_target_desc.
42 * win32-i386-low.c: #include "x86-tdesc.h".
43 (i386_arch_setup): Adjust following the addition of the new
44 expedite_regs parameter to init_target_desc.
45
7dbac825
JB
462018-05-10 Joel Brobecker <brobecker@adacore.com>
47
48 PR server/23158:
49 * win32-low.c (win32_create_inferior): Add call to my_wait
50 setting last_status global.
51
906994d9
JB
522018-05-10 Joel Brobecker <brobecker@adacore.com>
53
54 PR server/23158:
55 * win32-low.c (create_process): Only call gdb_tilde_expand if
56 inferior_cwd is not NULL.
57
8ee22052
AB
582018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
59
60 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
61 registers to the cache if their values have changed.
62 (i387_xsave_to_cache): Provide default values for x87 control
63 registers when these features are available, but disabled.
64 * regcache.c (supply_register_by_name_zeroed): New function.
65 * regcache.h (supply_register_by_name_zeroed): Declare new
66 function.
67
aff689d3
TT
682018-05-07 Tom Tromey <tom@tromey.com>
69
70 * configure: Rebuild.
71
85e26832
TT
722018-05-04 Tom Tromey <tom@tromey.com>
73
74 * configure: Rebuild.
75
a3b60e45
JK
762018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
77 Pedro Alves <palves@redhat.com>
78
79 * linux-aarch64-low.c (aarch64_stopped_data_address):
80 Likewise.
81
632e107b
TT
822018-04-27 Tom Tromey <tom@tromey.com>
83
84 * configure: Rebuild.
85
458412c3
TT
862018-04-23 Tom Tromey <tom@tromey.com>
87
88 * configure: Rebuild.
89
f31c089e
SM
902018-04-19 Simon Marchi <simon.marchi@ericsson.com>
91
92 * Makefile.in (depcomp): Add "..".
93 (all_deps_files): New and use it.
94
b319b098
AH
952018-04-18 Alan Hayward <alan.hayward@arm.com>
96
97 * configure.srv (aarch64*-*-linux*): Don't include xml.
98 (i[34567]86-*-cygwin*): Likewise.
99 (i[34567]86-*-linux*): Likewise.
100 (i[34567]86-*-lynxos*): Likewise.
101 (i[34567]86-*-mingw32ce*): Likewise.
102 (i[34567]86-*-mingw*): Likewise.
103 (i[34567]86-*-nto*): Likewise.
104 (tic6x-*-uclinux): Likewise.
105 (x86_64-*-linux*): Likewise.
106 (x86_64-*-mingw*): Likewise.
107 (x86_64-*-cygwin*): Likewise.
108
3b74854b
AH
1092018-04-18 Alan Hayward <alan.hayward@arm.com>
110
111 * tdesc.c: Remove xml parameter.
112
e98577a9
AH
1132018-04-18 Alan Hayward <alan.hayward@arm.com>
114
115 * server.c (get_features_xml): Remove cast.
116 * tdesc.c (void target_desc::accept): Fill in function.
117 (tdesc_get_features_xml): Remove old xml creation.
118 (print_xml_feature::visit_pre): Add xml vistor.
119 * tdesc.h (struct target_desc): Make xmltarget mutable.
120 (tdesc_get_features_xml): Remove declaration.
121
d278f585
AH
1222018-04-18 Alan Hayward <alan.hayward@arm.com>
123
124 * tdesc.c (tdesc_architecture_name): Add new function.
125 (tdesc_osabi_name): Likewise.
126 (tdesc_get_features_xml): Use new functions.
127
eee8a18d
AH
1282018-04-18 Alan Hayward <alan.hayward@arm.com>
129
130 * tdesc.c (tdesc_create_flags): Remove.
131 (tdesc_add_flag): Likewise.
132 (tdesc_named_type): Likewise.
133 (tdesc_create_union): Likewise.
134 (tdesc_create_struct): Likewise.
135 (tdesc_create_vector): Likewise.
136 (tdesc_add_bitfield): Likewise.
137 (tdesc_add_field): Likewise.
138 (tdesc_set_struct_size): Likewise.
139
82ec9bc7
AH
1402018-04-18 Alan Hayward <alan.hayward@arm.com>
141
142 * tdesc.c (~target_desc): Remove implictly deleted items.
143 (init_target_desc): Iterate all features.
144 (tdesc_get_features_xml): Use vector.
145 (tdesc_create_feature): Create feature.
146 * tdesc.h (tdesc_feature) Remove
147 (target_desc): Add features.
148
ea3e7d71
AH
1492018-04-18 Alan Hayward <alan.hayward@arm.com>
150
151 * Makefile.in: Add common/tdesc.c
152 * tdesc.c (init_target_desc): init all reg_defs from register
153 vector.
154 (tdesc_create_reg): Create tdesc_reg.
155 * tdesc.h (tdesc_feature): Add register vector.
156
17d08cd4
SM
1572018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
158
159 * tdesc.h (struct target_desc) <features>: Change type to
160 std::vector<std::string>.
161 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
162 changes.
163 (tdesc_get_features_xml): Likewise.
164 (tdesc_create_feature): Likewise.
165
5cd3e386
AH
1662018-03-26 Alan Hayward <alan.hayward@arm.com>
167
168 * regcache.c (find_register_by_number): Return a ref.
169 (find_regno): Use references.
170 (register_size): Likewise.
171 (register_data): Likewise.
172 * tdesc.c (target_desc::~target_desc): Remove free calls.
173 (target_desc::operator==): Use std::vector compare.
174 (init_target_desc): Use reference.
175 (tdesc_create_reg): Use reg constructors.
176 * tdesc.h (struct target_desc): Replace pointer with object.
177
dff7492c
AH
1782018-03-23 Alan Hayward <alan.hayward@arm.com>
179
180 * regcache.c (find_register_by_number): Make static.
181 (find_regno): Use find_register_by_number
182 * regcache.h (struct reg): Remove declaration.
183
d80e5242
AH
1842018-03-23 Alan Hayward <alan.hayward@arm.com>
185
186 * tdesc.c (target_desc::~target_desc): Move to here.
187 (target_desc::operator==): Likewise.
188 * tdesc.h (target_desc::~target_desc): Move from here.
189 (target_desc::operator==): Likewise.
190
f69c5afb
AA
1912018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
192
193 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
194
ce29f843
AA
1952018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
196
197 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
198 S390_TDESC_GS.
199 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
200 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
201 and init_registers_s390_gs_linux64.
202
c49bd90b
AA
2032018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
204
205 * linux-s390-low.c (s390_fill_gs): Remove function.
206 (s390_fill_gsbc): Remove function.
207 (s390_regsets): Set fill functions for the guarded storage regsets
208 to NULL.
209
7edb9bd3
AA
2102018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
211
212 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
213 the word size. Add comment.
214 (s390_get_wordsize): New function.
215 (s390_arch_setup): No longer select a temporary tdesc to fetch the
216 pswm with it. Instead, use s390_get_wordsize to determine the
217 word size first and derive the correct tdesc from that directly.
218
39be3c7e
SM
2192018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
220
221 * Makefile.in: Include silent-rules.mk.
222 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
223 (COMPILE): Add ECHO_CXX.
224 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
225 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
226 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
227 (version-generated.c): Add ECHO_GEN.
228 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
229 (IPAGENT_COMPILE): Add ECHO_CXX.
230 (%-generated.c): Add ECHO_REGDAT.
231
3ae9ce5d
TT
2322018-03-14 Tom Tromey <tom@tromey.com>
233
234 PR cli/14977:
235 * ax.c (ax_printf): Special case for NULL.
236
e6a58aa8
SM
2372018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
238
239 * linux-low.c (linux_qxfer_libraries_svr4): Use
240 xml_escape_text_append.
241
f6e8a41e
SM
2422018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
243
244 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
245
b9671caf
SM
2462018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
247
248 * server.c (handle_general_set): Remove unnecessary xstrdup.
249
e80aaf61
SM
2502018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * server.c (parse_debug_format_options): Adjust to
253 delim_string_to_char_ptr_vec changes.
254 * thread-db.c (thread_db_load_search): Adjust to
255 dirnames_to_char_ptr_vec changes.
256
b1223e78
MM
2572018-03-01 Markus Metzger <markus.t.metzger@intel.com>
258
259 * target.h (target_enable_btrace, target_disable_btrace)
260 (target_read_btrace, target_read_btrace_conf): Turn macro into
261 inline function. Throw error if target method is not defined.
262 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
263 check for btrace target method. Be prepared to handle exceptions
264 from btrace target methods.
265
81561546
SDJ
2662018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
267
268 * server.c (captured_main): Change order of error message printed
269 when the current working directory cannot be found.
270
25e3c82c
SDJ
2712018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
272
273 * server.c: Include "filenames.h" and "pathstuff.h".
274 (program_name): Delete variable.
275 (program_path): New anonymous class.
276 (get_exec_wrapper): Use "program_path" instead of
277 "program_name".
278 (handle_v_run): Likewise.
279 (captured_main): Likewise.
280 (process_serial_event): Likewise.
281
b4987c95
SDJ
2822018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
283
284 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
285 (OBJS): Add "pathstuff.o".
286 * server.c (current_directory): New global variable.
287 (captured_main): Initialize "current_directory".
288
f46cd62a
AH
2892018-02-26 Alan Hayward <alan.hayward@arm.com>
290
291 * tdesc.c: Use common/tdesc.h.
292 * tdesc.h: Likewise.
293
a543c5ca
AH
2942018-02-20 Alan Hayward <alan.hayward@arm.com>
295 Simon Marchi <simon.marchi@ericsson.com>
296
297 * Makefile.in: Switch order of make rules.
298
b5884fa7
AH
2992018-02-19 Alan Hayward <alan.hayward@arm.com>
300
301 * Makefile.in: Add common directory in build.
302 * configure.ac: Add common reference.
303 * configure: Regenerate.
304
de6242d3
MM
3052018-02-09 Markus Metzger <markus.t.metzger@intel.com>
306
307 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
308 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
309 * spu-low.c (spu_target_ops): Likewise.
310 * win32-low.c (win32_target_ops): Likewise.
311 * server.c (supported_btrace_packets): Report packets unconditionally.
312 * target.h (target_ops) <supports_btrace>: Remove.
313 (target_supports_btrace): Remove.
314
9ee23a85
MM
3152018-02-09 Markus Metzger <markus.t.metzger@intel.com>
316
317 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
318 (handle_btrace_disable): Change return type to void. Use exceptions
319 to report errors.
320 (handle_btrace_general_set): Catch exception and copy message to
321 return message.
322
8ce47547
TT
3232018-02-08 Tom Tromey <tom@tromey.com>
324
325 * linux-low.c (install_software_single_step_breakpoints): Use
326 make_scoped_restore.
327 * inferiors.c (make_cleanup_restore_current_thread): Remove.
328 (do_restore_current_thread_cleanup): Remove.
329 * gdbthread.h (make_cleanup_restore_current_thread): Don't
330 declare.
331
45dd3607
TT
3322018-02-08 Tom Tromey <tom@tromey.com>
333
334 * mem-break.c (set_raw_breakpoint_at): Use
335 gdb::unique_xmalloc_ptr.
336
e671cd59
PA
3372018-01-30 Pedro Alves <palves@redhat.com>
338
339 PR gdb/13211
340 * target.c (target_terminal::terminal_state): Rename to ...
341 (target_terminal::m_terminal_state): ... this.
342
a0aad537
JC
3432018-01-19 James Clarke <jrtc27@jrtc27.com>
344
345 * linux-low.c (handle_extended_wait): Surround call to
346 thread_db_notice_clone with #ifdef USE_THREAD_DB.
347
4d9b86e1
SM
3482018-01-17 Simon Marchi <simon.marchi@ericsson.com>
349
350 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
351 linux_ptrace_attach_fail_reason_string now returning an
352 std::string.
353 (linux_attach): Likewise.
354 * thread-db.c (attach_thread): Likewise.
355
f517c180
EA
3562018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
357
358 PR gdb/21559
359 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
360 checking for fs_base/gs_base fields in struct user_regs_struct.
361 * configure: Regenerate.
362
9a70f35c
YQ
3632018-01-16 Yao Qi <yao.qi@linaro.org>
364
365 PR gdb/18749
366 * linux-low.c (fetch_register): Call supply_register instead of
367 error.
368
605fd3c6
YQ
3692018-01-08 Yao Qi <yao.qi@linaro.org>
370 Simon Marchi <simon.marchi@ericsson.com>
371
372 * Makefile.in (OBS): Remove selftest.o.
373 * configure.ac: Set srv_selftest_objs if $development is true.
374 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
375 * configure: Re-generated.
376 * server.c (captured_main): Wrap variable selftest_filter with
377 GDB_SELF_TEST.
378
2cc05030
SM
3792018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
380
381 * server.c (parse_debug_format_options): Return std::string.
382 (handle_monitor_command, captured_main): Adjust.
383
e379cee6
PA
3842018-01-05 Pedro Alves <palves@redhat.com>
385
386 PR gdb/18653
387 * server.c (captured_main): Pass quiet=false to
388 save_original_signals_state.
389
82e1e79a
JB
3902018-01-01 Joel Brobecker <brobecker@adacore.com>
391
392 * gdbreplay.c (gdbreplay_version): Update copyright year in
393 version message.
394 * server.c (gdbserver_version): Likewise.
395
8e481c3b
TT
3962017-12-08 Tom Tromey <tom@tromey.com>
397
398 * ax.c (ax_printf): Update.
399
a8806230
YQ
4002017-12-07 Yao Qi <yao.qi@linaro.org>
401
402 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
403 aarch64_linux_read_description.
404 * linux-amd64-ipa.c (idx2mask): New array.
405 (get_ipa_tdesc): Move idx2mask out.
406 (initialize_low_tracepoint): Initialize target descriptions.
407 * linux-i386-ipa.c (idx2mask): New array.
408 (get_ipa_tdesc): Move idx2mask out.
409 (initialize_low_tracepoint): Initialize target descriptions.
410
d4a0e8b5
SM
4112017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
412
413 * tdesc.c (struct tdesc_type): Change return type.
414 (tdesc_add_flag): Change parameter type.
415 (tdesc_add_bitfield): Likewise.
416 (tdesc_add_field): Likewise.
417 (tdesc_set_struct_size): Likewise.
418
798a7429
SM
4192017-12-05 Simon Marchi <simon.marchi@ericsson.com>
420
421 * regcache.c (registers_to_string): Remove unused variable.
422
c0e15c9b
SM
4232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
424
425 * inferiors.c (for_each_inferior_with_data): Remove.
426 * inferiors.h (for_each_inferior_with_data): Remove.
427 * server.c (handle_qxfer_threads_worker): Change parameter type.
428 (handle_qxfer_threads_proper): Use for_each_thread.
429
f0045347
SM
4302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * inferiors.c (for_each_inferior): Remove.
433 (clear_inferiors): Use for_each_thread.
434 * inferiors.h (for_each_inferior): Remove.
435 * linux-low.c (linux_wait_for_event_filtered): Use
436 for_each_thread.
437 (linux_stabilize_threads): Likewise.
438 * regcache.c (regcache_release): Likewise.
439 * server.c (gdb_wants_all_threads_stopped): Likewise.
440 (clear_pending_status_callback): Remove.
441 (handle_status): Use for_each_thread.
442 (captured_main): Likewise.
443 * win32-low.c (child_init_thread_list): Likewise.
444 (win32_clear_inferiors): Likewise.
445 (fake_breakpoint_event): Likewise.
446
9521758b
SM
4472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
448
449 * inferiors.h (find_inferior): Remove.
450 * inferiors.c (find_inferior): Remove.
451
8f86d7aa
SM
4522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * linux-low.c (resume_status_pending_p): Update comment.
455 (need_step_over_p): Update comment.
456
e2b44075
SM
4572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * linux-low.c (proceed_one_lwp): Return void, change parameter
460 type.
461 (unsuspend_and_proceed_one_lwp): Likewise.
462 (proceed_all_lwps): Use for_each_thread.
463 (unstop_all_lwps): Likewise.
464
c80825ff
SM
4652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
466
467 * linux-low.c (linux_resume_one_thread): Return void, take
468 parameter directly.
469 (linux_resume): Use for_each_thread.
470
df3e4dbe
SM
4712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
472
473 * linux-low.c (send_sigstop_callback): Return void, change
474 parameter type. Rename to...
475 (send_sigstop): ... this.
476 (suspend_and_send_sigstop_callback): Return void, change parameter
477 type. Rename to...
478 (suspend_and_send_sigstop): ... this.
479 (stop_all_lwps): Use for_each_thread.
480
5a6b0a41
SM
4812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * linux-low.c (lwp_running): Return bool, remove unused
484 argument.
485 (linux_stabilize_threads): Use find_thread.
486
39a64da5
SM
4872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * linux-low.c (select_singlestep_lwp_callback): Remove.
490 (count_events_callback): Remove.
491 (select_event_lwp_callback): Remove.
492 (select_event_lwp): Use find_thread/for_each_thread.
493
a1385b7b
SM
4942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * linux-low.c (not_stopped_callback): Return bool, take filter
497 argument directly.
498 (linux_wait_for_event_filtered): Use find_thread.
499 (linux_wait_1): Likewise.
500
454296a2
SM
5012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
502
503 * linux-low.c (same_lwp): Remove.
504 (find_lwp_pid): Use find_thread.
505
6b2a85da
SM
5062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * linux-low.c (delete_lwp_callback): Remove.
509 (linux_mourn): Use for_each_thread.
510
798a38e8
SM
5112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
512
513 * linux-low.c (linux_detach_lwp_callback): Return void, remove
514 args parameter, don't check for pid.
515 (linux_detach): Use for_each_thread.
516
e4eb0dec
SM
5172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
518
519 * linux-low.c (struct counter): Remove.
520 (second_thread_of_pid_p): Remove.
521 (last_thread_of_process_p): Use find_thread.
522
83e1b6c1
SM
5232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
524
525 * inferiors.c (find_inferior_in_random): Remove.
526 * inferiors.h (find_inferior_in_random): Remove.
527 * linux-low.c (status_pending_p_callback): Return bool, accept
528 parameter ptid directly.
529 (linux_wait_for_event_filtered): Use find_thread_in_random.
530 (linux_wait_1): Likewise.
531
8dc7b443
SM
5322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
533
534 * inferiors.c (find_inferior_id): Remove.
535 (find_thread_ptid): Move implemention from find_inferior_id to
536 here.
537 * inferiors.h (find_inferior_id): Remove.
538 * server.c (handle_status): Use find_thread_ptid.
539 (process_serial_event): Likewise.
540 * thread-db.c (find_one_thread): Likewise.
541 (thread_db_thread_handle): Likewise.
542 * win32-low.c (thread_rec): Likewise.
543 (child_delete_thread): Likewise.
544 (win32_thread_alive): Likewise.
545 (get_child_debug_event): Likewise.
546
da25033c
SM
5472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
548
549 * linux-mips-low.c (update_watch_registers_callback): Return
550 void, remove pid_p parameter, don't check for pid.
551 (mips_insert_point, mips_remove_point): Use for_each_thread.
552
c91bb56b
SM
5532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
554
555 * lynx.low (lynx_delete_thread_callback): Remove.
556 (lynx_mourn): Use for_each_thread.
557
634a3254
SM
5582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * regcache.c (regcache_invalidate_one): Remove.
561 (regcache_invalidate_pid): use for_each_thread.
562
41272101
TT
5632017-11-26 Tom Tromey <tom@tromey.com>
564
565 * linux-low.c (linux_create_inferior): Update.
566
f5291a6f
UW
5672017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
568
569 * spu-low.c (spu_create_inferior): Fix typo in argument name.
570
6654d750
AH
5712017-11-24 Alan Hayward <alan.hayward@arm.com>
572
573 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
574 * linux-aarch64-low.c (initialize_low_arch): Call init func.
575 * linux-aarch64-tdesc-selftest.c: New file.
576 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
577
5782017-11-24 Alan Hayward <alan.hayward@arm.com>
579
580 * configure.srv: Add new file.
581 * linux-aarch64-low.c (initialize_low_arch): Call init func.
582 * linux-aarch64-tdesc-selftest.c: New file.
583 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
584
49bdb7ee
AH
5852017-11-24 Alan Hayward <alan.hayward@arm.com>
586
587 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
588 * linux-aarch64-low.c (initialize_low_arch): Remove init.
589 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
590
d6d7ce56
AH
5912017-11-24 Alan Hayward <alan.hayward@arm.com>
592
593 * configure.srv: Add new files.
594 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
595 aarch64_linux_read_description.
596 * linux-aarch64-low.c (aarch64_linux_read_description):
597 Merge with aarch64_arch_setup.
598 (aarch64_arch_setup): Call aarch64_linux_read_description.
599 * linux-aarch64-tdesc.c: New file.
600 * linux-aarch64-tdesc.h: New file.
601
506fe5f4
YQ
6022017-11-24 Yao Qi <yao.qi@linaro.org>
603
604 * configure.srv: Set $srv_regobj for tic6x-linux.
605 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
606 (tic6x_read_description): Move some code to tic6x_arch_setup.
607 (tic6x_tdesc_test): New function.
608 (initialize_low_arch): Call selftests::register_test.
609
29f9a567
YQ
6102017-11-22 Yao Qi <yao.qi@linaro.org>
611
612 * remote-utils.c (prepare_resume_reply): Use memcpy.
613
578290ec
SM
6142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
615
616 * linux-low.c (kill_one_lwp_callback): Return void, take
617 argument directly, don't filter on pid.
618 (linux_kill): Use for_each_thread.
619
eca55aec
SM
6202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
621
622 * linux-low.c (need_step_over_p): Return bool, remove dummy
623 argument.
624 (linux_resume, proceed_all_lwps): Use find_thread.
625
25c28b4d
SM
6262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
627
628 * linux-low.c (resume_status_pending_p): Return bool, remove
629 flag_p argument.
630 (linux_resume): Use find_thread.
631
5fdda392
SM
6322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
633
634 * linux-low.c (struct thread_resume_array): Remove.
635 (linux_set_resume_request): Return void, take arguments
636 directly.
637 (linux_resume): Use for_each_thread.
638
fcb056a5
SM
6392017-11-19 Simon Marchi <simon.marchi@ericsson.com>
640
641 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
642 return bool, remove data argument.
643 (linux_stabilize_threads): Use find_thread.
644
139720c5
SM
6452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
646
647 * linux-low.c (unsuspend_one_lwp): Remove.
648 (unsuspend_all_lwps): Use for_each_thread, inline code from
649 unsuspend_one_lwp.
650
6d1e5673
SM
6512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
652
653 * gdbthread.h (find_thread): Add overload with ptid_t filter.
654 * linux-low.c (struct iterate_over_lwps_args): Remove.
655 (iterate_over_lwps_filter): Remove.
656 (iterate_over_lwps): Use find_thread.
657
bbf550d5
SM
6582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
659
660 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
661 (linux_handle_new_gdb_connection): Use for_each_thread, inline
662 code from reset_lwp_ptrace_options_callback.
663
00192f77
SM
6642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
665
666 * linux-arm-low.c (struct update_registers_data): Remove.
667 (update_registers_callback): Return void, take arguments
668 directly, don't check thread's pid.
669 (arm_insert_point, arm_remove_point): Use for_each_thread.
670
2bee2b6c
SM
6712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
672
673 * win32-low.c (continue_one_thread): Return void, take argument
674 directly.
675 (child_continue): Use for_each_thread.
676
0b360f19
SM
6772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
678
679 * win32-i386-low.c (update_debug_registers_callback): Rename
680 to ...
681 (update_debug_registers): ... this, return void, remove pid_p arg.
682 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
683
f27866ba
SM
6842017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * inferiors.h (struct process_info): Add constructor, initialize
687 fields..
688 <syscalls_to_catch>: Change type to std::vector<int>.
689 * inferiors.c (add_process): Allocate process_info with new.
690 (remove_process): Free process_info with delete.
691 * linux-low.c (handle_extended_wait): Adjust.
692 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
693 * server.c (handle_general_set): Adjust.
694
e849ea89
PA
6952017-11-16 Pedro Alves <palves@redhat.com>
696
697 * remote-utils.c (remote_close): Block SIGIO signals instead of
698 uninstalling the SIGIO handler.
699
1d0aa65c
AH
7002017-11-16 Alan Hayward <alan.hayward@arm.com>
701
702 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
703
3491a34c
YQ
7042017-11-16 Yao Qi <yao.qi@linaro.org>
705
706 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
707 (tic6x_store_gregset): Likewise.
708 (tic6x_usrregs_info): Move it up.
709
a602f924
AH
7102017-11-15 Alan Hayward <alan.hayward@arm.com>
711
712 * Makefile.in: Update arch rules.
713 * configure.srv: Explicitly mark arch/ files.
714
5616b6c3
AS
7152017-11-13 Andreas Schwab <schwab@suse.de>
716
717 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
718 function.
719 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
720
d1928160
PA
7212017-11-06 Pedro Alves <palves@redhat.com>
722
723 * config.in, configure: Regenerate.
724
bac608e7
SM
7252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
726
727 * target.c (struct thread_search): Remove.
728 (thread_search_callback): Remove.
729 (prepare_to_access_memory): Use for_each_thread instead of
730 find_inferior. Inline code from thread_search_callback.
731
eaddb425
SM
7322017-10-27 Simon Marchi <simon.marchi@ericsson.com>
733
734 * server.c (struct visit_actioned_threads_data): Remove.
735 (visit_actioned_threads): Change prototype to take arguments
736 directly.
737 (resume): Use find_thread instead of find_inferior.
738
99078d34
SM
7392017-10-27 Simon Marchi <simon.marchi@ericsson.com>
740
741 * server.c (queue_stop_reply_callback): Change prototype, return
742 void.
743 (find_status_pending_thread_callback): Remove.
744 (handle_status): Replace find_inferior with find_thread and
745 for_each_thread.
746
cc628f3d
AH
7472017-10-25 Alan Hayward <alan.hayward@arm.com>
748
749 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
750 with REGNO.
751 (aarch64_store_gregset): Likewise.
752 (aarch64_fill_fpregset): Likewise.
753 (aarch64_store_fpregset): Likewise.
754
4d3bb80e
SM
7552017-10-21 Simon Marchi <simon.marchi@ericsson.com>
756
757 * gdbthread.h (find_thread, for_each_thread): New functions.
758 * inferiors.c (thread_of_pid): Remove.
759 (find_any_thread_of_pid): Use find_thread.
760 * linux-low.c (num_lwps): Use for_each_thread.
761
7a7cdfa0
YQ
7622017-10-17 Yao Qi <yao.qi@linaro.org>
763
764 * Makefile.in: Remove one rule.
765 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
766
e675d170
YQ
7672017-10-17 Yao Qi <yao.qi@linaro.org>
768
769 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
770 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
771
7eb4e0f9
YQ
7722017-10-17 Yao Qi <yao.qi@linaro.org>
773
774 * configure.srv: Rename arm.o with arch/arm.o.
775
60d6cfc9
YQ
7762017-10-17 Yao Qi <yao.qi@linaro.org>
777
778 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
779 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
780 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
781 (arch-i386.o, arch-amd64.o): Remove rules.
782 (arch/%.o): New rule.
783 Update POSTCOMPILE and COMPILE.pre.
784 * configure.ac: Invoke AC_CONFIG_COMMANDS.
785 * configure: Re-generated.
786 * configure.srv: Replace arch-i386.o with arch/i386.o.
787 Replace arch-amd64.o with arch/amd64.o.
788
5bfda255
YQ
7892017-10-16 Yao Qi <yao.qi@linaro.org>
790
791 * configure: Regenerated.
792
9c80ecd6
SM
7932017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
794
795 * inferiors.h: (struct inferior_list): Remove.
796 (struct inferior_list_entry); Remove.
797 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
798 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
799 get_first_inferior): Remove.
800 (for_each_inferior, for_each_inferior_with_data, find_inferior,
801 find_inferior_id, find_inferior_in_random): Change signature.
802 * inferiors.c (all_threads): Change type to
803 std::list<thread_info *>.
804 (get_thread): Remove macro.
805 (find_inferior, find_inferior_id): Change signature, implement
806 using find_thread.
807 (find_inferior_in_random): Change signature, implement using
808 find_thread_in_random.
809 (for_each_inferior, for_each_inferior_with_data): Change
810 signature, implement using for_each_thread.
811 (add_inferior_to_list, remove_inferior): Remove.
812 (add_thread, get_first_thread, thread_of_pid,
813 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
814 (get_first_inferior, one_inferior_p, clear_inferior_list):
815 Remove.
816 (clear_inferiors, get_thread_process): Update.
817 * gdbthread.h: Include <list>.
818 (struct thread_info) <entry>: Remove field.
819 <id>: New field.
820 (all_threads): Change type to std::list<thread_info *>.
821 (get_first_inferior): Add doc.
822 (find_thread, for_each_thread, find_thread_in_random): New
823 functions.
824 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
825 * linux-arm-low.c (update_registers_callback): Update.
826 * linux-low.c (second_thread_of_pid_p): Update.
827 (kill_one_lwp_callback, linux_detach_lwp_callback,
828 delete_lwp_callback, status_pending_p_callback, same_lwp,
829 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
830 iterate_over_lwps, not_stopped_callback,
831 resume_stopped_resumed_lwps, count_events_callback,
832 select_singlestep_lwp_callback, select_event_lwp_callback,
833 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
834 suspend_and_send_sigstop_callback, wait_for_sigstop,
835 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
836 lwp_running, linux_set_resume_request, resume_status_pending_p,
837 need_step_over_p, start_step_over, linux_resume_one_thread,
838 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
839 reset_lwp_ptrace_options_callback): Update.
840 * linux-mips-low.c (update_watch_registers_callback): Update.
841 * regcache.c (regcache_invalidate_one, regcache_invalidate):
842 Update.
843 (free_register_cache_thread_one): Remove.
844 (regcache_release): Update.
845 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
846 handle_qxfer_threads_worker): Update.
847 (handle_query): Update, use list iterator.
848 (visit_actioned_threads, handle_pending_status,
849 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
850 clear_pending_status_callback, set_pending_status_callback,
851 find_status_pending_thread_callback, handle_status,
852 process_serial_event): Update.
853 * target.c (thread_search_callback): Update.
854 * thread-db.c (thread_db_get_tls_address): Update.
855 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
856 Update.
857 * win32-i386-low.c (update_debug_registers_callback): Update.
858 * win32-low.c (delete_thread_info, child_delete_thread,
859 continue_one_thread, suspend_one_thread,
860 get_child_debug_event): Adjust.
861
9179355e
SM
8622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
863
864 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
865 * inferiors.h: Include <list>.
866 (struct process_info) <entry>: Remove field.
867 <pid>: New field.
868 (pid_of): Change macro to function.
869 (ptid_of, lwpid_of): Remove macro.
870 (all_processes): Change type to std::list<process_info *>.
871 (ALL_PROCESSES): Remove macro.
872 (for_each_process, find_process): New function.
873 * inferiors.c (all_processes): Change type to
874 std::list<process_info *>.
875 (find_thread_process): Adjust.
876 (add_process): Likewise.
877 (remove_process): Likewise.
878 (find_process_pid): Likewise.
879 (get_first_process): Likewise.
880 (started_inferior_callback): Remove.
881 (have_started_inferiors_p): Adjust.
882 (attached_inferior_callback): Remove.
883 (have_attached_inferiors_p): Adjust.
884 * linux-low.c (check_zombie_leaders): Likewise.
885 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
886 (x86_linux_update_xmltarget): Adjust.
887 * server.c (handle_query): Likewise.
888 (gdb_reattached_process): Remove.
889 (handle_status): Adjust.
890 (kill_inferior_callback): Likewise.
891 (detach_or_kill_inferior): Remove.
892 (print_started_pid): Likewise.
893 (print_attached_pid): Likewise.
894 (detach_or_kill_for_exit): Update.
895 (process_serial_event): Likewise.
896 * linux-arm-low.c (arm_new_fork): Likewise.
897
c9cb8905
SM
8982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
899
900 * dll.h: Include <list>.
901 (struct dll_info): Add constructor.
902 <entry>: Remove field.
903 (all_dlls): Change type to std::list<dll_info>.
904 * dll.c: Include <algorithm>.
905 (get_dll): Remove macro.
906 (all_dlls): Change type to std::list<dll_info *>.
907 (free_one_dll): Remove.
908 (match_dll): Likewise.
909 (loaded_dll): Adjust.
910 (unloaded_dll): Adjust to all_dlls type change, use
911 std::find_if. Inline code from match_dll.
912 (clear_dlls): Adjust to all_dlls type change.
913 * server.c (emit_dll_description): Remove.
914 (handle_qxfer_libraries): Adjust to all_dlls type change,
915 integrate emit_dll_description's functionality.
916
04ec7890
SM
9172017-10-12 Simon Marchi <simon.marchi@ericsson.com>
918
919 * linux-low.h (struct linux_target_ops) <delete_process>: New
920 field.
921 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
922 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
923 (struct linux_target_ops): Add delete_process callback.
924 * linux-arm-low.c (arm_delete_process): New.
925 (struct linux_target_ops): Add delete_process callback.
926 * linux-bfin-low.c (struct linux_target_ops): Likewise.
927 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
928 * linux-m32r-low.c (struct linux_target_ops): Likewise.
929 * linux-mips-low.c (mips_linux_delete_process): New.
930 (struct linux_target_ops): Add delete_process callback.
931 * linux-ppc-low.c (struct linux_target_ops): Likewise.
932 * linux-s390-low.c (struct linux_target_ops): Likewise.
933 * linux-sh-low.c (struct linux_target_ops): Likewise.
934 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
935 * linux-tile-low.c (struct linux_target_ops): Likewise.
936 * linux-x86-low.c (x86_linux_delete_process): New.
937 (struct linux_target_ops): Add delete_process callback.
938 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
939
466eecee
SM
9402017-10-12 Simon Marchi <simon.marchi@ericsson.com>
941
942 * linux-aarch64-low.c (the_low_target): Add thread delete
943 callback.
944 * linux-arm-low.c (arm_delete_thread): New function.
945 (the_low_target): Add thread delete callback.
946 * linux-bfin-low.c (the_low_target): Likewise.
947 * linux-crisv32-low.c (the_low_target): Likewise.
948 * linux-low.c (delete_lwp): Invoke delete_thread callback if
949 set.
950 * linux-low.h (struct linux_target_ops) <delete_thread>: New
951 field.
952 * linux-m32r-low.c (the_low_target): Add thread delete callback.
953 * linux-mips-low.c (mips_linux_delete_thread): New function.
954 (the_low_target): Add thread delete callback.
955 * linux-ppc-low.c (the_low_target): Likewise.
956 * linux-s390-low.c (the_low_target): Likewise.
957 * linux-sh-low.c (the_low_target): Likewise.
958 * linux-tic6x-low.c (the_low_target): Likewise.
959 * linux-tile-low.c (the_low_target): Likewise.
960 * linux-x86-low.c (the_low_target): Likewise.
961 * linux-xtensa-low.c (the_low_target): Likewise.
962
b79f7801
YZ
9632017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
964
965 * win32-low.c: Include "common-inferior.h".
966
bc3b087d
SDJ
9672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
968
969 * inferiors.c (set_inferior_cwd): New function.
970 * server.c (handle_general_set): Handle QSetWorkingDir packet.
971 (handle_query): Inform that QSetWorkingDir is supported.
972 * win32-low.c (create_process): Pass the inferior's cwd to
973 CreateProcess.
974
d092c5a2
SDJ
9752017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
976
977 * inferiors.c (current_inferior_cwd): New global variable.
978 (get_inferior_cwd): New function.
979 * inferiors.h (struct process_info) <cwd>: New field.
980
7da0a886
SDJ
9812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
982
983 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
984 (OBS): Add gdb_tilde_expand.o.
985
289a6840
SM
9862017-10-02 Simon Marchi <simon.marchi@ericsson.com>
987
988 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
989 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
990
256642e8
PA
9912017-09-29 Pedro Alves <palves@redhat.com>
992
993 * ax.c (gdb_parse_agent_expr): Constify.
994 * ax.h (gdb_parse_agent_expr): Constify.
995 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
996 Constify.
997 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
998 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
999 * remote-utils.h (read_ptid): Constify.
1000 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1001 (process_point_options, process_serial_event): Constify.
1002 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1003 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1004 (cmd_qtbuffer): Constify.
1005
5b9ca4d4
PA
10062017-09-29 Pedro Alves <palves@redhat.com>
1007
1008 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1009 fails.
1010
94c207e0
PA
10112017-09-29 Pedro Alves <palves@redhat.com>
1012
1013 * linux-low.c (handle_extended_wait): Pass parent thread instead
1014 of process to thread_db_notice_clone.
1015 * linux-low.h (thread_db_notice_clone): Replace parent process
1016 parameter with parent thread parameter.
1017 * thread-db.c (find_one_thread): Add comment.
1018 (thread_db_notice_clone): Replace parent process parameter with
1019 parent thread parameter. Temporarily switch to the parent thread.
1020
75352e28
SDJ
10212017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1022
1023 * gdbthread.h: Include "common-gdbthread.h".
1024 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1025 "if" when validating the ptid.
1026 * remote-utils.c: Include "gdbthread.h".
1027 (prepare_resume_reply): Use "switch_to_thread".
1028 * target.c (done_accessing_memory): Likewise.
1029
ad339634
AA
10302017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1031
1032 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1033 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1034 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1035 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1036 s390x-gs-linux64-ipa.o to ipa_obj.
1037 * linux-s390-low.c (HWCAP_S390_GS): New define.
1038 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1039 New functions.
1040 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1041 (s390_arch_setup): Check for guarded-storage support and choose
1042 appropriate tdesc.
1043 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1044 init_registers_s390x_gs_linux64.
1045 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1046 enum value.
1047 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1048 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1049
cc4d742f
SM
10502017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1051
1052 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1053
f6327dcb
KB
10542017-09-21 Kevin Buettner <kevinb@redhat.com>
1055
1056 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1057 (thread_db_thread_handle): Declare.
1058 * linux-low.c (linux_target_ops): Initialize thread_handle.
1059 * server.c (handle_qxfer_threads_worker): Add support for
1060 "handle" attribute.
1061 * target.h (struct target_ops): Add new function pointer,
1062 thread_handle.
1063 (target_thread_handle): Define.
1064 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1065 field in lwp.
1066 (thread_db_thread_handle): New function.
1067
86299109
KB
10682017-09-21 Kevin Buettner <kevinb@redhat.com>
1069
1070 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1071 * linux-low.h (thread_db_notice_clone): Declare.
1072 * thread-db.c (thread_db_notice_clone): New function.
1073
f557a88a
PA
10742017-09-21 Pedro Alves <palves@redhat.com>
1075
1076 * server.c (gdb_read_memory, handle_status, process_serial_event)
1077 (handle_serial_event, handle_target_event): Adjust to
1078 set_desired_thread prototype change.
1079 * target.c (set_desired_thread): Remove 'use_general' parameter
1080 and adjust.
1081 * target.h (set_desired_thread): Remove 'use_general' parameter.
1082
223ffa71
TT
10832017-09-20 Tom Tromey <tom@tromey.com>
1084
1085 * target.c (target_terminal::terminal_state): Define.
1086 (target_terminal::init): Rename from target_terminal_init.
1087 (target_terminal::inferior): Rename from
1088 target_terminal_inferior.
1089 (target_terminal::ours): Rename from target_terminal_ours.
1090 (target_terminal::ours_for_output, target_terminal::info): New.
1091
04fd3ba9
SM
10922017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1093
1094 * server.c (accumulate_file_name_length): Remove.
1095 (emit_dll_description): Adjust to std::string change.
1096 (handle_qxfer_libraries): Use std::string to hold document.
1097
5e187554
SM
10982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1099
1100 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1101 return type of xml_escape_text.
1102 * server.c (emit_dll_description): Likewise.
1103
1526853e
SM
11042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1105
1106 * server.c (captured_main): Accept argument for --selftest.
1107 Update run_tests call.
1108 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1109 when registering selftests.
1110
c4dfafab
SDJ
11112017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1112
1113 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1114 instead of "VEC" for "target_desc.reg_defs".
1115 (regcache_cpy): Likewise.
1116 (registers_to_string): Likewise.
1117 (registers_from_string): Likewise.
1118 (find_regno): Likewise.
1119 (supply_regblock): Likewise.
1120 (regcache_raw_read_unsigned): Likewise.
1121 * tdesc.c (init_target_desc): Likewise.
1122 (tdesc_create_reg): Likewise.
1123 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1124 (struct target_desc) <reg_defs>: Convert to "std::vector".
1125 (target_desc): Do not initialize "reg_defs".
1126 (~target_desc): Update code to use "std::vector" instead of "VEC"
1127 for "target_desc.reg_defs".
1128 (operator==): Likewise.
1129
124aceb4
SM
11302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1131
1132 * inferiors.h (thread_to_gdb_id): Remove.
1133 * inferiors.c (thread_to_gdb_id): Remove.
1134 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1135 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1136 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1137 Likewise.
1138 * nto-low.c (nto_fetch_registers, nto_store_registers,
1139 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1140
96cde54f
SM
11412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * inferiors.h (gdb_id_to_thread_id): Remove.
1144 * inferiors.c (gdb_id_to_thread_id): Remove.
1145 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1146 removal. Move pid declaration closer to where it's used.
1147
e8ca139e
SM
11482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 * server.c (handle_detach): New function.
1151 (process_serial_event): Move code out, call handle_detach.
1152
f8a4e119
SM
11532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * server.c (require_running): Rename to ...
1156 (require_running_or_return): ... this ...
1157 (require_running_or_break): ... and this.
1158 (handle_query, process_serial_event): Adjust.
1159
0eb0a407
SM
11602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1161
1162 * linux-low.c (linux_set_resume_request): Remove unused
1163 variables.
1164
785922a5
SM
11652017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1166
1167 * server.c (first_thread_of): Remove.
1168 (process_serial_event): Replace usage of first_thread_of with
1169 find_any_thread_of_pid.
1170 * tracepoint.c (same_process_p): Remove.
1171 (gdb_agent_about_to_close): Replace usage of same_process_p with
1172 find_any_thread_of_pid.
1173 * linux-x86-low.c (same_process_callback): Remove.
1174 (x86_arch_setup_process_callback): Replace usage of
1175 same_process_callback with find_any_thread_of_pid.
1176 * thread-db.c (any_thread_of): Remove.
1177 (switch_to_process): Replace usage of any_thread_of with
1178 find_any_thread_of_pid.
1179 * inferiors.c (thread_pid_matches_callback): Remove.
1180 (find_thread_process): Adjust to use find_any_thread_of_pid.
1181
a059f00c
SDJ
11822017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1183
1184 * regcache.c (get_thread_regcache): Guard calls to "memset"
1185 with "!VEC_empty".
1186
cc397f3a
SDJ
11872017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * linux-low.c (handle_extended_wait): Use
1190 "allocate_target_description" instead of "XNEW".
1191 * linux-x86-low.c (initialize_low_arch): Likewise.
1192
22916b07
YQ
11932017-09-05 Yao Qi <yao.qi@linaro.org>
1194
1195 * configure.srv (srv_i386_regobj): Remove.
1196 (srv_amd64_regobj): Remove.
1197 (srv_regobj): Set it to "" for x86 non-linux targets.
1198 * linux-x86-tdesc.c (i386_linux_read_description):
1199 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1200 (init_registers_i386): Remove the declaration.
1201 (tdesc_i386): Remove the declaration.
1202 (lynx_i386_arch_setup): Call i386_create_target_description.
1203 * nto-x86-low.c: Likewise.
1204 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1205 [!__x86_64__]: include arch/i386.h.
1206 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1207
38602d55
YQ
12082017-09-05 Yao Qi <yao.qi@linaro.org>
1209
1210 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1211 i386/amd64-XXX-linux from it.
1212
44b886ff
YQ
12132017-09-05 Yao Qi <yao.qi@linaro.org>
1214
1215 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1216 false.
1217 (ipa_amd64_linux_regobj): Remove.
1218 (ipa_x32_linux_regobj): Remove.
1219
b4570e4b
YQ
12202017-09-05 Yao Qi <yao.qi@linaro.org>
1221
1222 * Makefile.in (arch-amd64.o): New rule.
1223 * configure.srv: Append arch-amd64.o.
1224 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1225 (get_ipa_tdesc): Call amd64_linux_read_description.
1226 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1227 and init_registers_amd64_XXX.
1228 * linux-x86-low.c (x86_linux_read_description): Call
1229 amd64_linux_read_description.
1230 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1231 (initialize_low_arch): Don't call init_registers_x32_XXX and
1232 init_registers_amd64_XXX.
1233 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1234 and tdesc_amd64_XXX.
1235 [__x86_64__] (amd64_tdesc_test): New function.
1236 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1237 and init_registers_amd64_XXX.
1238 * linux-x86-tdesc.c: Include arch/amd64.h.
1239 (xcr0_to_tdesc_idx): New function.
1240 (i386_linux_read_description): New function.
1241 (amd64_get_ipa_tdesc_idx): New function.
1242 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1243 (amd64_get_ipa_tdesc): Declare.
1244
d1f28ea2
YQ
12452017-09-05 Yao Qi <yao.qi@linaro.org>
1246
1247 * configure.srv (srv_i386_linux_xmlfiles): Remove
1248 i386/i386-XXX-linux.xml from it.
1249
25a93583
YQ
12502017-09-05 Yao Qi <yao.qi@linaro.org>
1251
1252 * configure.srv: Set srv_i386_linux_regobj empty if $development
1253 is false.
1254 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1255 initialize_low_tdesc.
1256 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1257 with #if initialize_low_tdesc.
1258 * linux-x86-tdesc-selftest.c: New file.
1259 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1260
5f035c07
YQ
12612017-09-05 Yao Qi <yao.qi@linaro.org>
1262
1263 * Makefile.in (arch-i386.o): New rule.
1264 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1265 (x86_64-*-linux*): Likewise.
1266 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1267 include arch/i386.h.
1268 (i386_linux_read_description): Remove code and call
1269 i386_create_target_description.
1270 * tdesc.c (allocate_target_description): New function.
1271 * tdesc.h (set_tdesc_architecture): Remove declaration.
1272 (set_tdesc_osabi): Likewise.
1273
0abe8a89
YQ
12742017-09-05 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1277 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1278 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1279 .xmltarget.
1280 * server.c (get_features_xml): Call tdesc_get_features_xml.
1281 * tdesc.c (set_tdesc_architecture): New function.
1282 (set_tdesc_osabi): New function.
1283 (tdesc_get_features_xml): New function.
1284 (tdesc_create_feature): Add an argument.
1285 * tdesc.h (struct target_desc) <features>: New field.
1286 <arch, osabi>: New field.
1287 (~target_desc): xfree features, arch, and osabi.
1288 (target_desc::oerator==): Don't compare .xmltarget.
1289 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1290 (set_tdesc_osabi): Likewise.
1291 (tdesc_get_features_xml): Likewise.
1292
0a188386
YQ
12932017-09-05 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-x86-tdesc.c: Include selftest.h.
1296 (i386_tdesc_test): New function.
1297 (initialize_low_tdesc): Call selftests::register_test.
1298 * tdesc.h: Include regdef.h.
1299 (target_desc): Override operator == and !=.
1300
f49ff000
YQ
13012017-09-05 Yao Qi <yao.qi@linaro.org>
1302
1303 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1304 (ipa_obj): Likewise.
1305 * linux-i386-ipa.c: Include common/x86-xstate.h
1306 (get_ipa_tdesc): Call i386_linux_read_description.
1307 (initialize_low_tracepoint): Don't call init_registers_XXX
1308 functions, call initialize_low_tdesc instead.
1309 * linux-x86-low.c (x86_linux_read_description): Call
1310 i386_linux_read_description.
1311 (initialize_low_arch): Don't call init_registers_i386_XXX
1312 functions, call initialize_low_tdesc.
1313 * linux-x86-tdesc.c: New file.
1314 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1315 (i386_get_ipa_tdesc_idx): Declare.
1316 (i386_get_ipa_tdesc): Declare.
1317 (initialize_low_tdesc): Declare.
1318
2b68ef2f
YQ
13192017-09-05 Yao Qi <yao.qi@linaro.org>
1320
1321 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1322 instead of 0.
1323
f7000548
YQ
13242017-09-05 Yao Qi <yao.qi@linaro.org>
1325
1326 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1327 * regcache.c (get_thread_regcache): Use VEC_length.
1328 (init_register_cache): Likewise.
1329 (regcache_cpy): Likewise.
1330 (registers_to_string): Iterate reg_defs via VEC_iterate.
1331 (find_regno): Likewise.
1332 (find_register_by_number): Use VEC_index.
1333 (register_size): Call find_register_by_number.
1334 (register_data): Call find_register_by_number.
1335 (supply_regblock): Use VEC_length.
1336 (regcache_raw_read_unsigned): Likewise.
1337 * tdesc.c (init_target_desc): Iterate reg_defs via
1338 VEC_iterate.
1339 (default_description): Update initializer.
1340 (copy_target_description): Don't update field num_registers.
1341 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1342 <num_registers>: Remove.
1343
50a421ac
SM
13442017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1345
1346 * Makefile.in (.SECONDARY): Define target.
1347
23fdd69e
SM
13482017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * linux-low.c (linux_wait_1): Adjust.
1351 * server.c (queue_stop_reply_callback): Adjust.
1352
0a2dde4a
SDJ
13532017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1354
1355 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1356 QEnvironmentUnset and QEnvironmentReset packets.
1357 (handle_query): Inform remote that QEnvironmentHexEncoded,
1358 QEnvironmentUnset and QEnvironmentReset are supported.
1359
6afd337d
SM
13602017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1361
1362 * inferiors.h (inferior_target_data): Rename to ...
1363 (thread_target_data): ... this.
1364 (inferior_regcache_data): Rename to ...
1365 (thread_regcache_data): ... this.
1366 (set_inferior_regcache_data): Rename to ...
1367 (set_thread_regcache_data): ... this.
1368 * inferiors.c (inferior_target_data): Rename to ...
1369 (thread_target_data): ... this.
1370 (inferior_regcache_data): Rename to ...
1371 (thread_regcache_data): ... this.
1372 (set_inferior_regcache_data): Rename to ...
1373 (set_thread_regcache_data): ... this.
1374 (free_one_thread): Update.
1375 * linux-low.h (get_thread_lwp): Update.
1376 * regcache.c (get_thread_regcache): Update.
1377 (regcache_invalidate_thread): Update.
1378 (free_register_cache_thread): Update.
1379 * win32-i386-low.c (update_debug_registers_callback): Update.
1380 (win32_get_current_dr): Update.
1381 * win32-low.c (thread_rec): Update.
1382 (delete_thread_info): Update.
1383 (continue_one_thread): Update.
1384 (suspend_one_thread): Update.
1385
a160cc46
SM
13862017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1387
1388 * inferiors.c (set_inferior_target_data): Remove.
1389 * inferiors.h (set_inferior_target_data): Remove.
1390
6d580b63
YQ
13912017-08-18 Yao Qi <yao.qi@linaro.org>
1392
1393 * Makefile.in (OBS): Add selftest.o.
1394 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1395 * configure, config.in: Re-generated.
1396 * server.c: Include common/sefltest.h.
1397 (captured_main): Handle option --selftest.
1398
f5a29eb0
YQ
13992017-08-09 Yao Qi <yao.qi@linaro.org>
1400
1401 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1402 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1403 i386-avx-mpx.o and i386-mmx.o.
1404 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1405 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1406 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1407 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1408 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1409 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1410 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1411 i386/amd64-avx-mpx.xml.
1412
57757c2f
YQ
14132017-08-09 Yao Qi <yao.qi@linaro.org>
1414
1415 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1416 and x32-avx-avx512.o.
1417 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1418 i386/x32-avx-avx512.xml.
1419
229d26fc
SM
14202017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * tracepoint.h (enum class fast_tpoint_collect_result): New
1423 enumeration.
1424 (fast_tracepoint_collecting): Change return type to
1425 fast_tpoint_collect_result.
1426 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1427 * linux-low.h: Include tracepoint.h.
1428 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1429 fast_tpoint_collect_result.
1430 * linux-low.c (handle_tracepoints): Adjust.
1431 (linux_fast_tracepoint_collecting): Change return type to
1432 fast_tpoint_collect_result.
1433 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1434 linux_wait_1, stuck_in_jump_pad_callback,
1435 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1436 proceed_one_lwp): Adjust to type change.
1437
2e1e43e1
YQ
14382017-07-10 Yao Qi <yao.qi@linaro.org>
1439
1440 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1441
adc764e7
YQ
14422017-06-29 Yao Qi <yao.qi@linaro.org>
1443
1444 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1445 Remove.
1446 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1447
a206891a
SM
14482017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1449
1450 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1451
9a6c7d9c
SDJ
14522017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1453
1454 * linux-low.c (linux_create_inferior): Adjust code to access the
1455 environment information via 'gdb_environ' class.
1456 * lynx-low.c (lynx_create_inferior): Likewise.
1457 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1458 (get_environ): Return a pointer to 'our_environ'.
1459 (captured_main): Initialize 'our_environ'.
1460 * server.h (get_environ): Adjust prototype.
1461 * spu-low.c (spu_create_inferior): Adjust code to access the
1462 environment information via 'gdb_environ' class.
1463
ae3e2ccf
SM
14642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1467 usage of "register" keyword.
1468
3e019bdc
SM
14692017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1470
1471 * configure: Re-generate.
1472
8465943a
SM
14732017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * configure: Re-generate.
1476
cf0dd6f0
SM
14772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * Makefile.in (COMPILE.pre): Add "-x c++".
1480
9845682b
SDJ
14812017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1482
1483 * fork-child.c: Conditionally include <signal.h>.
1484
aefd8b33
SDJ
14852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1486
1487 * server.c (handle_general_set): Handle new packet
1488 "QStartupWithShell".
1489 (handle_query): Add "QStartupWithShell" to the list of supported
1490 packets.
1491 (gdbserver_usage): Add help text explaining the
1492 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1493 options.
1494 (captured_main): Recognize and act upon the presence of the new
1495 CLI options.
1496
2090129c
SDJ
14972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1498 Pedro Alves <palves@redhat.com>
1499
1500 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1501 * configure: Regenerate.
1502 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1503 "fork-inferior.o".
1504 (i[34567]86-*-lynxos*): Likewise.
1505 (spu*-*-*): Likewise.
1506 * fork-child.c: New file.
1507 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1508 and "environ.h".
1509 (linux_ptrace_fun): New function.
1510 (linux_create_inferior): Adjust function prototype to reflect
1511 change on "target.h". Adjust function code to use
1512 "fork_inferior".
1513 (linux_request_interrupt): Delete "signal_pid".
1514 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1515 (lynx_ptrace_fun): New function.
1516 (lynx_create_inferior): Adjust function prototype to reflect
1517 change on "target.h". Adjust function code to use
1518 "fork_inferior".
1519 * nto-low.c (nto_create_inferior): Adjust function prototype and
1520 code to reflect change on "target.h". Update comments.
1521 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1522 "common-terminal.h" and "environ.h".
1523 (terminal_fd): Moved to fork-child.c.
1524 (old_foreground_pgrp): Likewise.
1525 (restore_old_foreground_pgrp): Likewise.
1526 (last_status): Make it global.
1527 (last_ptid): Likewise.
1528 (our_environ): New variable.
1529 (startup_with_shell): Likewise.
1530 (program_name): Likewise.
1531 (program_argv): Rename to...
1532 (program_args): ...this.
1533 (wrapper_argv): New variable.
1534 (start_inferior): Delete function.
1535 (get_exec_wrapper): New function.
1536 (get_exec_file): Likewise.
1537 (get_environ): Likewise.
1538 (prefork_hook): Likewise.
1539 (post_fork_inferior): Likewise.
1540 (postfork_hook): Likewise.
1541 (postfork_child_hook): Likewise.
1542 (handle_v_run): Update code to deal with arguments coming from the
1543 remote host. Update calls from "start_inferior" to
1544 "create_inferior".
1545 (captured_main): Likewise. Initialize environment variable. Call
1546 "have_job_control".
1547 * server.h (post_fork_inferior): New prototype.
1548 (get_environ): Likewise.
1549 (last_status): Declare.
1550 (last_ptid): Likewise.
1551 (signal_pid): Likewise.
1552 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1553 (spu_ptrace_fun): New function.
1554 (spu_create_inferior): Adjust function prototype to reflect change
1555 on "target.h". Adjust function code to use "fork_inferior".
1556 * target.c (target_terminal_init): New function.
1557 (target_terminal_inferior): Likewise.
1558 (target_terminal_ours): Likewise.
1559 * target.h: Include <vector>.
1560 (struct target_ops) <create_inferior>: Update prototype.
1561 (create_inferior): Update macro.
1562 * utils.c (gdb_flush_out_err): New function.
1563 * win32-low.c (win32_create_inferior): Adjust function prototype
1564 and code to reflect change on "target.h".
1565
043a4934
SDJ
15662017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1567
1568 * inferiors.c (switch_to_thread): New function.
1569
15652511
SDJ
15702017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1571
1572 * Makefile.in (SFILE): Add "common/job-control.c".
1573 (OBS): Add "job-control.o".
1574
21ea5acd
SDJ
15752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1576
1577 * Makefile: Remove "@host_makefile_frag@".
1578
e13cb306
PA
15792017-05-05 Pedro Alves <palves@redhat.com>
1580
1581 * configure: Regenerate.
1582
c94fee56
SDJ
15832017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1584
1585 * configure: Regenerate.
1586
a0ff9e1a
SM
15872017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1590 software_single_step change of return type to
1591 std::vector<CORE_ADDR>.
1592 * linux-low.c (install_software_single_step_breakpoints):
1593 Likewise.
1594 * linux-low.h (install_software_single_step_breakpoints):
1595 Likewise.
1596
be628ab8
SDJ
15972017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1598
1599 * remote-utils.c: Include "gdb_termios.h" instead of
1600 "terminal.h".
1601 * terminal.h: Delete file.
1602
7c5ded6a
SDJ
16032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1604
1605 * server.c: Include <vector>.
1606 <program_argv, wrapper_argv>: Convert to std::vector.
1607 (start_inferior): Rewrite function to use C++.
1608 (handle_v_run): Likewise. Update code that calculates the argv
1609 based on the vRun packet; use C++.
1610 (captured_main): Likewise.
1611
436252de
SM
16122017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1613
1614 * server.c (handle_v_cont): Initialize thread_resume::thread
1615 with null_ptid.
1616
9bf2a700
PA
16172017-04-05 Pedro Alves <palves@redhat.com>
1618
1619 * configure: Regenerate.
1620
a121b7c1
PA
16212017-04-05 Pedro Alves <palves@redhat.com>
1622
1623 * gdbreplay.c (sync_error): Constify.
1624 * linux-x86-low.c (push_opcode): Constify.
1625
21c8a587
PA
16262017-04-05 Pedro Alves <palves@redhat.com>
1627
1628 * win32-low.c (get_child_debug_event)
1629 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1630 Report TARGET_WAITKIND_SPURIOUS instead.
1631
fb32b4f7
PA
16322017-04-05 Pedro Alves <palves@redhat.com>
1633
1634 * remote-utils.c (remote_prepare, remote_open): Constify.
1635 * remote-utils.h (remote_prepare, remote_open): Constify.
1636 * server.c (captured_main): Constify 'port' handling.
1637
65dd1e59
SM
16382017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * Makefile.in (clean): Clear .deps.
1641
8fa5b777
SM
16422017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1643
1644 * .gitignore: Remove generated files, replace with wildcard.
1645 * (clean): Replace removal of generated files with wildcard.
1646 (version.c): Replace with...
1647 (version-generated.c): ...this.
1648 (xml-builtin.c): Replace with...
1649 (xml-builtin-generated.c): ...this.
1650 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1651 (%.c: *regformats*): Replace with...
1652 (%-generated.c: *regformats*): ...this.
1653
a12e714b
MF
16542017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1655
1656 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1657 (xtensa_fill_gregset): Call collect_register_by_name for
1658 threadptr register.
1659 (xtensa_store_gregset): Call supply_register_by_name for
1660 threadptr register.
1661
1a09b50a
MF
16622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1663
1664 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1665 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1666 (xtensa_store_gregset): Call supply_register for all registers in
1667 a0_regnum..a0_regnum + C0_NREGS range.
1668
1a01e7c6
SM
16692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1670
1671 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1672 (ax-ipa.o: ax.c): Remove.
1673 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1674 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1675 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1676 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1677 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1678
36bc18a8
SM
16792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1682 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1683 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1684 (errors-ipa.o: ../common/errors.c): Remove.
1685 (format-ipa.o: ../common/format.c): Remove.
1686 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1687
a8ebe3d5
SM
16882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1689
1690 * Makefile.in (%-ipa.o: %.c): New rule.
1691 (tracepoint-ipa.o: tracepoint.c): Remove.
1692 (utils-ipa.o: utils.c): Remove.
1693 (remote-utils-ipa.o: remote-utils.c): Remove.
1694 (regcache-ipa.o: regcache.c): Remove.
1695 (i386-linux-ipa.o: i386-linux.c): Remove.
1696 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1697 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1698 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1699 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1700 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1701 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1702 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1703 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1704 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1705 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1706 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1707 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1708 (aarch64-ipa.o: aarch64.c): Remove.
1709 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1710 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1711 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1712 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1713 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1714 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1715 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1716 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1717 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1718 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1719 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1720 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1721 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1722 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1723 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1724 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1725 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1726 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1727 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1728 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1729 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1730 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1731 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1732 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1733 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1734 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1735 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1736 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1737 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1738 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1739 (tdesc-ipa.o: tdesc.c): Remove.
1740 (x32-linux-ipa.o: x32-linux.c): Remove.
1741 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1742 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1743
50cfacb7
SM
17442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1745
1746 * Makefile.in (%.o: ../arch/%.c): New rule.
1747 (arm.o: ../arch/arm.c): Remove.
1748 (arm-linux.o: ../arch/arm-linux.c): Remove.
1749 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1750 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1751
c5a22423
SM
17522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1753
1754 * Makefile.in (%.o: ../nat/%.c): New rule.
1755 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1756 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1757 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1758 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1759 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1760 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1761 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1762 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1763 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1764 (linux-personality.o: ../nat/linux-personality.c): Remove.
1765 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1766 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1767 (x86-linux.o: ../nat/x86-linux.c): Remove.
1768 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1769 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1770
6bda016b
SM
17712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * Makefile.in (%.o: ../common/%.c): New rule.
1774 (signals.o: ../common/signals.c): Remove.
1775 (print-utils.o: ../common/print-utils.c): Remove.
1776 (rsp-low.o: ../common/rsp-low.c): Remove.
1777 (common-utils.o: ../common/common-utils.c): Remove.
1778 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1779 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1780 (vec.o: ../common/vec.c): Remove.
1781 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1782 (xml-utils.o: ../common/xml-utils.c): Remove.
1783 (ptid.o: ../common/ptid.c): Remove.
1784 (buffer.o: ../common/buffer.c): Remove.
1785 (format.o: ../common/format.c): Remove.
1786 (filestuff.o: ../common/filestuff.c): Remove.
1787 (agent.o: ../common/agent.c): Remove.
1788 (errors.o: ../common/errors.c): Remove.
1789 (environ.o: ../common/environ.c): Remove.
1790 (common-debug.o: ../common/common-debug.c): Remove.
1791 (cleanups.o: ../common/cleanups.c): Remove.
1792 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1793 (fileio.o: ../common/fileio.c): Remove.
1794 (common-regcache.o: ../common/common-regcache.c): Remove.
1795 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1796 (new-op.o: ../common/new-op.c): Remove.
1797 (btrace-common.o: ../common/btrace-common.c): Remove.
1798
21122961
SM
17992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1800
1801 * Makefile.in (%.o: ../target/%.c): New rule.
1802 (waitstatus.o: ../target/waitstatus.c): Remove.
1803
c362e621
SM
18042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * Makefile.in
1807 (%.c: ../regformats/%.dat,
1808 (%.c: ../regformats/arm/%.dat,
1809 (%.c: ../regformats/i386/%.dat,
1810 (%.c: ../regformats/rs6000/%.dat): New rules.
1811 (aarch64.c): Remove.
1812 (reg-arm.c): Remove.
1813 (arm-with-iwmmxt.c): Remove.
1814 (arm-with-vfpv2.c): Remove.
1815 (arm-with-vfpv3.c): Remove.
1816 (arm-with-neon.c): Remove.
1817 (reg-bfin.c): Remove.
1818 (reg-cris.c): Remove.
1819 (reg-crisv32.c): Remove.
1820 (i386.c): Remove.
1821 (i386-linux.c): Remove.
1822 (i386-avx.c): Remove.
1823 (i386-avx-linux.c): Remove.
1824 (i386-avx-avx512.c): Remove.
1825 (i386-avx-avx512-linux.c): Remove.
1826 (i386-mpx.c): Remove.
1827 (i386-mpx-linux.c): Remove.
1828 (i386-avx-mpx-avx512-pku.c): Remove.
1829 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1830 (i386-avx-mpx.c): Remove.
1831 (i386-avx-mpx-linux.c): Remove.
1832 (i386-mmx.c): Remove.
1833 (i386-mmx-linux.c): Remove.
1834 (reg-ia64.c): Remove.
1835 (reg-m32r.c): Remove.
1836 (reg-m68k.c): Remove.
1837 (reg-cf.c): Remove.
1838 (mips-linux.c): Remove.
1839 (mips-dsp-linux.c): Remove.
1840 (mips64-linux.c): Remove.
1841 (mips64-dsp-linux.c): Remove.
1842 (nios2-linux.c): Remove.
1843 (powerpc-32.c): Remove.
1844 (powerpc-32l.c): Remove.
1845 (powerpc-altivec32l.c): Remove.
1846 (powerpc-cell32l.c): Remove.
1847 (powerpc-vsx32l.c): Remove.
1848 (powerpc-isa205-32l.c): Remove.
1849 (powerpc-isa205-altivec32l.c): Remove.
1850 (powerpc-isa205-vsx32l.c): Remove.
1851 (powerpc-e500l.c): Remove.
1852 (powerpc-64l.c): Remove.
1853 (powerpc-altivec64l.c): Remove.
1854 (powerpc-cell64l.c): Remove.
1855 (powerpc-vsx64l.c): Remove.
1856 (powerpc-isa205-64l.c): Remove.
1857 (powerpc-isa205-altivec64l.c): Remove.
1858 (powerpc-isa205-vsx64l.c): Remove.
1859 (s390-linux32.c): Remove.
1860 (s390-linux32v1.c): Remove.
1861 (s390-linux32v2.c): Remove.
1862 (s390-linux64.c): Remove.
1863 (s390-linux64v1.c): Remove.
1864 (s390-linux64v2.c): Remove.
1865 (s390-te-linux64.c): Remove.
1866 (s390-vx-linux64.c): Remove.
1867 (s390-tevx-linux64.c): Remove.
1868 (s390x-linux64.c): Remove.
1869 (s390x-linux64v1.c): Remove.
1870 (s390x-linux64v2.c): Remove.
1871 (s390x-te-linux64.c): Remove.
1872 (s390x-vx-linux64.c): Remove.
1873 (s390x-tevx-linux64.c): Remove.
1874 (tic6x-c64xp-linux.c): Remove.
1875 (tic6x-c64x-linux.c): Remove.
1876 (tic6x-c62x-linux.c): Remove.
1877 (reg-sh.c): Remove.
1878 (reg-sparc64.c): Remove.
1879 (reg-spu.c): Remove.
1880 (amd64.c): Remove.
1881 (amd64-linux.c): Remove.
1882 (amd64-avx.c): Remove.
1883 (amd64-avx-linux.c): Remove.
1884 (amd64-avx-avx512.c): Remove.
1885 (amd64-avx-avx512-linux.c): Remove.
1886 (amd64-mpx.c): Remove.
1887 (amd64-mpx-linux.c): Remove.
1888 (amd64-avx-mpx-avx512-pku.c): Remove.
1889 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1890 (amd64-avx-mpx.c): Remove.
1891 (amd64-avx-mpx-linux.c): Remove.
1892 (x32.c): Remove.
1893 (x32-linux.c): Remove.
1894 (x32-avx.c): Remove.
1895 (x32-avx-linux.c): Remove.
1896 (x32-avx-avx512.c): Remove.
1897 (x32-avx-avx512-linux.c): Remove.
1898 (reg-xtensa.c): Remove.
1899 (reg-tilegx.c): Remove.
1900 (reg-tilegx32.c): Remove.
1901
1672e0d9
SDJ
19022017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1903
1904 * Makefile.in (SFILES): Add "common/environ.c".
1905 (OBJS): Add "common/environ.h".
1906
239b6d10
WT
19072017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1908
1909 * configure.ac: Check if the fs_base and gs_base members of
1910 `struct user_regs_struct' exist.
1911 * config.in: Regenerated.
1912 * configure: Likewise.
1913
694b382c
AT
19142017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1915
1916 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1917 target_read_memory.
1918 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1919 (get_next_pcs_syscall_next_pc): Likewise.
1920
7dc53023
LM
19212016-12-23 Luis Machado <lgustavo@codesourcery.com>
1922
1923 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1924 * nto-x86-low.c: Likewise.
1925
ad02e4fe
SM
19262016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1927
1928 * Makefile.in: Include disable-implicit-rules.mk.
1929
dcb07cfa
PA
19302016-11-23 Pedro Alves <palves@redhat.com>
1931
1932 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1933 (debug_vprintf): Use std::chrono::steady_clock instead of
1934 gettimeofday. Use '.' instead of ':'.
1935 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1936 (get_timestamp): Use std::chrono::steady_clock instead of
1937 gettimeofday.
1938
8629c02c
SM
19392016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1940
1941 * Makefile.in: Fix whitespace formatting.
1942
b593ecca
SM
19432016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1944
1945 * Makefile.in (SFILES, OBS): Flatten list and order
1946 alphabetically.
1947
9986ba08
PA
19482016-11-23 Pedro Alves <palves@redhat.com>
1949
1950 * event-loop.c (handle_file_event): Use warning.
1951 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1952 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1953 Use warning.
1954
4eefa7bc
PA
19552016-11-23 Pedro Alves <palves@redhat.com>
1956
1957 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1958 output.
1959 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1960 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1961 debug_printf and debug_flush for debug output.
1962 * server.c (handle_general_set): Likewise.
1963 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1964 output.
1965
5443506e
SM
19662016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1967
1968 * Makefile.in (.c.o): Replace rule with ...
1969 (%.o: %.c): ... this one.
1970
3b165252
SM
19712016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1974 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1975 make.
1976 * configure.ac: Remove checks for the make program.
1977 * configure: Re-generate.
1978
0bcda685
PA
19792016-10-28 Pedro Alves <palves@redhat.com>
1980
1981 * Makefile.in (CXX_DIALECT): Get from configure.
1982 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1983 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1984 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1985 * config.in: Regenerate.
1986 * configure: Regenerate.
1987
c3805894
YQ
19882016-10-27 Yao Qi <yao.qi@linaro.org>
1989
1990 * linux-low.c (linux_supports_range_stepping): Return true if
1991 can_software_single_step return true.
1992
89342618
YQ
19932016-10-27 Yao Qi <yao.qi@linaro.org>
1994
1995 * inferiors.c (find_inferior_in_random): New function.
1996 * inferiors.h (find_inferior_in_random): Declare.
1997 * linux-low.c (linux_wait_for_event_filtered): Call
1998 find_inferior_in_random instead of find_inferior.
1999
e3652c84
YQ
20002016-10-27 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-low.c (linux_wait_1): If single-step breakpoints are
2003 inserted, remove them.
2004
5a04c4cf
PA
20052016-10-26 Pedro Alves <palves@redhat.com>
2006
2007 * linux-low.c (handle_extended_wait): Link parent/child fork
2008 threads.
2009 (linux_wait_1): Unlink them.
2010 (linux_set_resume_request): Ignore resume requests for
2011 already-resumed and unhandled fork child threads.
2012 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2013 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2014 New functions.
2015 (handle_v_requests) <vCont>: Don't call require_running.
2016 * server.h (in_queued_stop_replies): New declaration.
2017
cb93dc7f
YQ
20182016-10-24 Yao Qi <yao.qi@linaro.org>
2019
2020 PR server/20733
2021 * linux-aarch64-low.c (append_insns): Cast the return value to
2022 'uint32_t *'.
2023
a1078bea
YQ
20242016-10-10 Yao Qi <yao.qi@linaro.org>
2025
2026 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2027
1fb77080
SDJ
20282016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2029
2030 * target.c (target_supports_multi_process): New function, moved
2031 from...
2032 * target.h (target_supports_multi_process): ... here. Remove
2033 macro.
2034
39b5a3b9
TT
20352016-10-05 Tom Tromey <tom@tromey.com>
2036
2037 PR remote/20655:
2038 * tracepoint.c (handle_tracepoint_bkpts): Check
2039 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2040
c1d0b70a
YQ
20412016-10-05 Yao Qi <yao.qi@linaro.org>
2042
2043 * configure.srv: Update the path of arm-*.xml files.
2044
0a69eedb
YQ
20452016-10-05 Terry Guo <terry.guo@arm.com>
2046 Yao Qi <yao.qi@linaro.org>
2047
2048 * Makefile.in: Adjust the path of rules.
2049 * configure.srv: Update the path of xml files.
2050 * regformats/arm-with-iwmmxt.dat: Regenerated.
2051 * regformats/arm-with-neon.dat: Likewise.
2052 * regformats/arm-with-vfpv2.dat: Likewise.
2053 * regformats/arm-with-vfpv3.dat Likewise.
2054
17e16485
YQ
20552016-09-30 Yao Qi <yao.qi@linaro.org>
2056
2057 PR gdbserver/20627
2058 * target.c (target_stop_and_wait): Don't call
2059 target_continue_no_signal, use resume_stop instead.
2060
edeeb602
YQ
20612016-09-26 Yao Qi <yao.qi@linaro.org>
2062
2063 * linux-low.c (linux_wait_1): Call debug_exit.
2064
503b1c39
PA
20652016-09-23 Pedro Alves <palves@redhat.com>
2066
2067 * Makefile.in (SFILES): Add common/new-op.c.
2068 (OBS): Add common/new-op.o.
2069 (new-op.o): New rule.
2070
74172ecf
SM
20712016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2072
2073 * .gitinore: Ignore more files.
2074
fc6cda2e
YQ
20752016-09-21 Yao Qi <yao.qi@linaro.org>
2076
2077 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2078 23.
2079
bc1e6c81
SDJ
20802016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2081
2082 * server.c (start_inferior): Call target_mourn_inferior instead of
2083 mourn_inferior; pass ptid_t argument to it.
2084 (resume): Likewise.
2085 (handle_target_event): Likewise.
2086 * target.c (target_mourn_inferior): New function.
2087 * target.h (mourn_inferior): Delete macro.
2088
0e00e962
AA
20892016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2090
2091 * linux-low.c (lwp_is_stepping): New function.
2092
1d8cb77d
CL
20932016-09-06 Carl Love <cel@us.ibm.com>
2094
2095 * server.c (start_inferior): Fixed comment, requested comment change
2096 didn't get updated correctly. Removed reference to ptrace () call as
2097 it is only true on Linux systems.
2098
7313bced
CL
20992016-09-06 Carl Love <cel@us.ibm.com>
2100
2101 * server.c (start_inferior): Do not call
2102 function target_post_create_inferior () if the
2103 inferior process has already exited.
2104
cf6de44d
PA
21052016-09-05 Pedro Alves <palves@redhat.com>
2106
2107 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2108 (COMPILE.pre, CC_LD): Use CXX directly.
2109 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2110 * acinclude.m4: Don't include build-with-cxx.m4.
2111 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2112 * configure: Regenerate.
2113
c1da6748
AT
21142016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2115
2116 PR gdb/19495
2117 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2118 call writing data to own_buf.
2119
f2b9e3df
SDJ
21202016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2121
2122 * target.c (mywait): Call target_wait instead of
2123 the_target->wait.
2124 (target_wait): New function.
2125
049a8570
SDJ
21262016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2127
2128 * server.c (start_inferior): New variable 'ptid'. Replace calls
2129 to the_target->resume by target_continue{,_no_signal}, depending
2130 on the case.
2131 * target.c (target_stop_and_wait): Call target_continue_no_signal
2132 instead of the_target->resume.
2133 (target_continue): New function.
2134
3aa5cfa0
AT
21352016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2136
2137 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2138
754653a7
AZ
21392016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2140
2141 PR server/20491
2142 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2143 ps_prochandle.
2144 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2145 * linux-arm-low.c (ps_get_thread_area): Likewise.
2146 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2147 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2148 * linux-mips-low.c (ps_get_thread_area): Likewise.
2149 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2150 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2151 * linux-x86-low.c (ps_get_thread_area): Likewise.
2152 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2153
ed036b40
PA
21542016-08-19 Pedro Alves <palves@redhat.com>
2155
2156 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2157
c8ef42ee
PA
21582016-08-19 Pedro Alves <palves@redhat.com>
2159
2160 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2161 comment. Use memcpy instead of casting through unsigned long.
2162
9c235a72
PA
21632016-08-19 Pedro Alves <palves@redhat.com>
2164
2165 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2166 allocating around 0x80000000.
2167
201506da
PA
21682016-08-19 Pedro Alves <palves@redhat.com>
2169
2170 PR gdb/20415
2171 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2172 (x32-avx512-linux-ipa.o): New rules.
2173 * configure.ac (x86_64-*-linux*): New x32 check.
2174 * configure.srv (ipa_x32_linux_regobj): New.
2175 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2176 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2177 descriptions.
2178 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2179 descriptions.
2180 * configure: Regenerate.
2181
f348d89a
PA
21822016-08-09 Pedro Alves <palves@redhat.com>
2183
2184 PR gdb/18653
2185 * Makefile.in (OBS): Add signals-state-save-restore.o.
2186 (signals-state-save-restore.o): New rule.
2187 * config.in: Regenerate.
2188 * configure: Regenerate.
2189 * linux-low.c: Include "signals-state-save-restore.h".
2190 (linux_create_inferior): Call
2191 restore_original_signals_state.
2192 * server.c: Include "dispositions-save-restore.h".
2193 (captured_main): Call save_original_signals_state.
2194
1baf5149
PA
21952016-08-05 Pedro Alves <palves@redhat.com>
2196
2197 * configure: Regenerate.
2198
fcd4a73d
YQ
21992016-08-04 Yao Qi <yao.qi@linaro.org>
2200
2201 * linux-low.c (regsets_fetch_inferior_registers): Check
2202 errno is ESRCH or not.
2203
979659d0
YQ
22042016-08-02 Yao Qi <yao.qi@linaro.org>
2205
2206 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2207 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2208 (thread_db_load_search): Update.
2209 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2210 td_ta_set_event and td_ta_event_getmsg.
2211
6598661d
PA
22122016-07-26 Pedro Alves <palves@redhat.com>
2213
2214 PR server/20414
2215 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2216 of unsigned long for 64-bit registers and use uint32_t instead of
2217 unsigned int for 32-bit registers.
2218
9cf12d57
PA
22192016-07-26 Pedro Alves <palves@redhat.com>
2220
2221 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2222 to 'ptrace'.
2223
305450ed
TT
22242016-07-21 Tom Tromey <tom@tromey.com>
2225
2226 * configure: Rebuild.
2227
2583da7c
YQ
22282016-07-21 Yao Qi <yao.qi@linaro.org>
2229
2230 * mem-break.c (find_gdb_breakpoint): Cast bp to
2231 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2232
21536b36
YQ
22332016-07-21 Yao Qi <yao.qi@linaro.org>
2234
2235 * server.c (handle_v_requests): Support s and S actions
2236 if target_supports_software_single_step return true.
2237
8901d193
YQ
22382016-07-21 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2241 is resume_step, call maybe_hw_step.
2242 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2243 and unstop them.
2244 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2245 breakpoints or not.
2246 (proceed_one_lwp): If resume request is resume_step, install
2247 reinsert breakpoints and call maybe_hw_step.
2248
0e9a339e
YQ
22492016-07-21 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-low.c (proceed_one_lwp): Declare.
2252 (linux_resume_one_thread): Remove local variable 'step'.
2253 Lift code enqueue signal. Call proceed_one_lwp instead of
2254 linux_resume_one_lwp.
2255
4281b351
YQ
22562016-07-21 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-low.c (linux_resume_one_thread): Call
2259 enqueue_pending_signal.
2260
984a2c04
YQ
22612016-07-21 Yao Qi <yao.qi@linaro.org>
2262
2263 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2264 * inferiors.c (do_restore_current_thread_cleanup): New function.
2265 (make_cleanup_restore_current_thread): Likewise.
2266 * linux-low.c (install_software_single_step_breakpoints): Call
2267 make_cleanup_restore_current_thread. Switch current_thread to
2268 thread.
2269
bec903c9
YQ
22702016-07-21 Yao Qi <yao.qi@linaro.org>
2271
2272 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2273 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2274 (clone_one_breakpoint): Likewise.
2275 (delete_reinsert_breakpoints): Change parameter to thread.
2276 Callers updated.
2277 (has_reinsert_breakpoints): Likewise.
2278 (uninsert_reinsert_breakpoints): Likewise.
2279 (reinsert_reinsert_breakpoints): Likewise.
2280 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2281 (delete_reinsert_breakpoints): Likewise.
2282 (reinsert_reinsert_breakpoints): Likewise.
2283 (uninsert_reinsert_breakpoints): Likewise.
2284 (has_reinsert_breakpoints): Likewise.
2285
63c40ec7
YQ
22862016-07-21 Yao Qi <yao.qi@linaro.org>
2287
2288 * inferiors.c (get_thread_process): Make parameter const.
2289 * inferiors.h (get_thread_process): Update declaration.
2290 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2291 Add new parameters child_thread and parent_thread. Callers
2292 updated.
2293 * mem-break.h (clone_all_breakpoints): Update declaration.
2294
9aa76cd0
YQ
22952016-07-21 Yao Qi <yao.qi@linaro.org>
2296
2297 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2298 <command_list, handler>: Remove.
2299 (struct gdb_breakpoint): New.
2300 (struct other_breakpoint): New.
2301 (struct reinsert_breakpoint): New.
2302 (is_gdb_breakpoint): New function.
2303 (any_persistent_commands): Update command_list if
2304 is_gdb_breakpoint returns true.
2305 (set_breakpoint): Create breakpoints according to their types.
2306 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2307 (set_gdb_breakpoint_1): Likewise.
2308 (set_gdb_breakpoint): Likewise.
2309 (clear_breakpoint_conditions): Change parameter type to
2310 'struct gdb_breakpoint *'.
2311 (clear_breakpoint_commands): Likewise.
2312 (clear_breakpoint_conditions_and_commands): Likewise.
2313 (add_condition_to_breakpoint): Likewise.
2314 (add_breakpoint_condition): Likewise.
2315 (add_commands_to_breakpoint): Likewise.
2316 (check_breakpoints): Check other_breakpoint.
2317 (clone_one_breakpoint): Clone breakpopint according to its type.
2318 * mem-break.h (struct gdb_breakpoint): Declare.
2319 (set_gdb_breakpoint): Update declaration.
2320 (clear_breakpoint_conditions_and_commands): Likewise.
2321 (add_breakpoint_condition): Likewise.
2322 (add_breakpoint_commands): Likewise.
2323 * server.c (process_point_options): Change parameter type to
2324 'struct gdb_breakpoint *'.
2325
811f8301
YQ
23262016-07-21 Yao Qi <yao.qi@linaro.org>
2327
2328 * mem-break.c (set_breakpoint_at): Rename it to ...
2329 (set_breakpoint_type_at): ... it.
2330 (set_breakpoint_at): Call set_breakpoint_type_at.
2331 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2332 * mem-break.h (set_breakpoint_at): Update comments.
2333
b1c51e36
CLT
23342016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2335
2336 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2337 to buf parameter.
2338 (nios2_store_gregset): Likewise.
2339
ced2dffb
PA
23402016-07-01 Pedro Alves <palves@redhat.com>
2341 Antoine Tremblay <antoine.tremblay@ericsson.com>
2342
2343 * linux-low.c: Change interface to take the target lwp_info
2344 pointer directly and return void. Handle detaching from a zombie
2345 thread.
2346 (linux_detach_lwp_callback): New function.
2347 (linux_detach): Detach from the leader thread after detaching from
2348 the clone threads.
2349
2ac09a5b
YQ
23502016-06-28 Yao Qi <yao.qi@linaro.org>
2351
2352 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2353 for variable new_offset.
2354 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2355 (aarch64_ftrace_insn_reloc_cb): Likewise.
2356 (aarch64_ftrace_insn_reloc_tb): Likewise.
2357 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2358 PRIx64 instead of PRIx32.
2359
79e7fd4f
YQ
23602016-06-28 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2363 (the_low_target): Install arm_get_syscall_trapinfo.
2364
061fc021
YQ
23652016-06-28 Yao Qi <yao.qi@linaro.org>
2366
2367 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2368 function.
2369 (the_low_target): Install aarch64_get_syscall_trapinfo.
2370
4cc32bec
YQ
23712016-06-28 Yao Qi <yao.qi@linaro.org>
2372
2373 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2374 Callers updated.
2375 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2376 Remove parameter sysno.
2377 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2378 sysret.
2379
782c1122
AA
23802016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2381
2382 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2383 (s390_emit_ne_goto): Likewise.
2384 (s390_emit_lt_goto): Likewise.
2385 (s390_emit_le_goto): Likewise.
2386 (s390_emit_gt_goto): Likewise.
2387 (s390_emit_ge_goto): Likewise.
2388 (s390x_emit_eq_goto): Likewise.
2389 (s390x_emit_ne_goto): Likewise.
2390 (s390x_emit_lt_goto): Likewise.
2391 (s390x_emit_le_goto): Likewise.
2392 (s390x_emit_gt_goto): Likewise.
2393 (s390x_emit_ge_goto): Likewise.
2394 (s390_emit_ops_impl): Mark variable static.
2395 (s390x_emit_ops): Likewise.
2396
2e7b624b
YQ
23972016-06-17 Yao Qi <yao.qi@linaro.org>
2398
2399 * linux-low.c (handle_extended_wait): Call
2400 uninsert_reinsert_breakpoints for the parent process. Remove
2401 reinsert breakpoints from the child process. Reinsert them to
2402 the parent process when vfork is done.
2403 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2404 (reinsert_reinsert_breakpoints): New function.
2405 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2406 (reinsert_reinsert_breakpoints): Declare.
2407
8a81c5d7
YQ
24082016-06-17 Yao Qi <yao.qi@linaro.org>
2409
2410 * linux-low.c (handle_extended_wait): If the parent is doing
2411 step-over, remove the reinsert breakpoints from the forked child.
2412
f50bf8e5
YQ
24132016-06-17 Yao Qi <yao.qi@linaro.org>
2414
2415 * linux-low.c (unsuspend_all_lwps): Declare.
2416 (linux_low_filter_event): If thread exited, call finish_step_over.
2417 If step-over is finished, unsuspend other threads.
2418
8376a3cb
YQ
24192016-06-17 Yao Qi <yao.qi@linaro.org>
2420
2421 * linux-low.c (linux_resume_one_lwp_throw): Assert
2422 has_reinsert_breakpoints returns false.
2423 * mem-break.c (delete_disabled_breakpoints): Assert
2424 bp type isn't reinsert_breakpoint.
2425
f79b145d
YQ
24262016-06-17 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-low.c (maybe_hw_step): New function.
2429 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2430 (finish_step_over): Switch current_thread to lwp temporarily,
2431 and assert has_reinsert_breakpoints returns true.
2432 (proceed_one_lwp): Call maybe_hw_step.
2433 * mem-break.c (has_reinsert_breakpoints): New function.
2434 * mem-break.h (has_reinsert_breakpoints): Declare.
2435
0ae534d2
JT
24362016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2437
2438 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2439
fcdad592
YQ
24402016-05-17 Yao Qi <yao.qi@linaro.org>
2441
2442 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2443 instead of find_inferior.
2444
9e784964
YQ
24452016-05-05 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2448 Initialize res to zero.
2449
cf2ebb6e
YQ
24502016-05-05 Yao Qi <yao.qi@linaro.org>
2451
2452 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2453 to uint32_t.
2454
c1aebf87
UW
24552016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2456
2457 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2458 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2459 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2460
35fd2deb 24612016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2462 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2463
2464 * tracepoint.c (write_inferior_int8): New function.
2465 (cmd_qtenable_disable): Write enable flag using
2466 write_inferior_int8.
2467
484b3c32
YQ
24682016-04-25 Yao Qi <yao.qi@linaro.org>
2469
2470 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2471 (need_step_over_p): Return zero if the LWP has pending signals
2472 can be delivered on software single step target.
2473
85ba7d86
YQ
24742016-04-25 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2477 return instead of error.
2478
3539aa13
YQ
24792016-04-22 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2482 to 23.
2483
5b061e98
YQ
24842016-04-22 Yao Qi <yao.qi@linaro.org>
2485
2486 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2487 signal when stepping over breakpoint with software single
2488 step.
2489
3451269c
PA
24902016-04-21 Pedro Alves <palves@redhat.com>
2491
2492 * linux-s390-low.c (s390_collect_ptrace_register)
2493 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2494 add casts.
2495 (s390_check_regset): Use void * instead of gdb_byte *.
2496
a2358508
PA
24972016-04-20 Pedro Alves <palves@redhat.com>
2498
2499 * configure: Renegerate.
2500
6885166d
YQ
25012016-04-20 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2504 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2505 number 16.
2506 (arm_store_gregset): Likewise.
2507
2b863f51
WT
25082016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2509
2510 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2511 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2512 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2513 (amd64-avx-mpx-linux.c): New rules.
2514 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2515 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2516 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2517 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2518 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2519 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2520 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2521 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2522 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2523 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2524 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2525 * linux-x86-low.c (x86_linux_read_description): Add case for
2526 X86_XSTATE_AVX_MPX_MASK.
2527 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2528 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2529 init_registers_i386_avx_mpx_linux.
2530 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2531 (initialize_low_tracepoint): Call
2532 init_registers_i386_avx_mpx_linux.
2533 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2534 (initialize_low_tracepoint): Call
2535 init_registers_amd64_avx_mpx_linux.
2536 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2537 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2538 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2539 declarations.
2540
9b30624b
PA
25412016-04-18 Pedro Alves <palves@redhat.com>
2542
2543 * configure: Regenerate.
2544
45e3745e
AT
25452016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2546
2547 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2548 (aarch64_emit_sub): Likewise.
2549
2afc13ff
PA
25502016-04-12 Pedro Alves <palves@redhat.com>
2551
2552 * utils.c (prepare_to_throw_exception): Delete.
2553
6e774b13
SM
25542016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2557
4dca19f8
MK
25582016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2559
2560 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2561
d0a9981f
MK
25622016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2563
2564 * linux-aarch64-ipa.c: Add <elf.h> include.
2565 * linux-ppc-ipa.c: Add <elf.h> include.
2566 * linux-s390-ipa.c: Add <elf.h> include.
2567
252db07e
MK
25682016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2569
2570 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2571 (get_raw_reg_ptr): Likewise.
2572 (get_trace_state_variable_value_ptr): Likewise.
2573 (set_trace_state_variable_value_ptr): Likewise.
2574 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2575 char *.
2576
14e2b6d9
MK
25772016-03-31 Wei-cheng Wang <cole945@gmail.com>
2578 Marcin Kościelnicki <koriakin@0x04.net>
2579
2580 PR/17221
2581 * linux-ppc-low.c (emit_insns): New function.
2582 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2583 (ppc_emit_prologue): New function.
2584 (ppc_emit_epilogue): New function.
2585 (ppc_emit_add): New function.
2586 (ppc_emit_sub): New function.
2587 (ppc_emit_mul): New function.
2588 (ppc_emit_lsh): New function.
2589 (ppc_emit_rsh_signed): New function.
2590 (ppc_emit_rsh_unsigned): New function.
2591 (ppc_emit_ext): New function.
2592 (ppc_emit_zero_ext): New function.
2593 (ppc_emit_log_not): New function.
2594 (ppc_emit_bit_and): New function.
2595 (ppc_emit_bit_or): New function.
2596 (ppc_emit_bit_xor): New function.
2597 (ppc_emit_bit_not): New function.
2598 (ppc_emit_equal): New function.
2599 (ppc_emit_less_signed): New function.
2600 (ppc_emit_less_unsigned): New function.
2601 (ppc_emit_ref): New function.
2602 (ppc_emit_const): New function.
2603 (ppc_emit_reg): New function.
2604 (ppc_emit_pop): New function.
2605 (ppc_emit_stack_flush): New function.
2606 (ppc_emit_swap): New function.
2607 (ppc_emit_stack_adjust): New function.
2608 (ppc_emit_call): New function.
2609 (ppc_emit_int_call_1): New function.
2610 (ppc_emit_void_call_2): New function.
2611 (ppc_emit_if_goto): New function.
2612 (ppc_emit_goto): New function.
2613 (ppc_emit_eq_goto): New function.
2614 (ppc_emit_ne_goto): New function.
2615 (ppc_emit_lt_goto): New function.
2616 (ppc_emit_le_goto): New function.
2617 (ppc_emit_gt_goto): New function.
2618 (ppc_emit_ge_goto): New function.
2619 (ppc_write_goto_address): New function.
2620 (ppc_emit_ops_impl): New static variable.
2621 (ppc64v1_emit_prologue): New function.
2622 (ppc64v2_emit_prologue): New function.
2623 (ppc64_emit_epilogue): New function.
2624 (ppc64_emit_add): New function.
2625 (ppc64_emit_sub): New function.
2626 (ppc64_emit_mul): New function.
2627 (ppc64_emit_lsh): New function.
2628 (ppc64_emit_rsh_signed): New function.
2629 (ppc64_emit_rsh_unsigned): New function.
2630 (ppc64_emit_ext): New function.
2631 (ppc64_emit_zero_ext): New function.
2632 (ppc64_emit_log_not): New function.
2633 (ppc64_emit_bit_and): New function.
2634 (ppc64_emit_bit_or): New function.
2635 (ppc64_emit_bit_xor): New function.
2636 (ppc64_emit_bit_not): New function.
2637 (ppc64_emit_equal): New function.
2638 (ppc64_emit_less_signed): New function.
2639 (ppc64_emit_less_unsigned): New function.
2640 (ppc64_emit_ref): New function.
2641 (ppc64_emit_const): New function.
2642 (ppc64v1_emit_reg): New function.
2643 (ppc64v2_emit_reg): New function.
2644 (ppc64_emit_pop): New function.
2645 (ppc64_emit_stack_flush): New function.
2646 (ppc64_emit_swap): New function.
2647 (ppc64v1_emit_call): New function.
2648 (ppc64v2_emit_call): New function.
2649 (ppc64v1_emit_int_call_1): New function.
2650 (ppc64v2_emit_int_call_1): New function.
2651 (ppc64v1_emit_void_call_2): New function.
2652 (ppc64v2_emit_void_call_2): New function.
2653 (ppc64_emit_if_goto): New function.
2654 (ppc64_emit_eq_goto): New function.
2655 (ppc64_emit_ne_goto): New function.
2656 (ppc64_emit_lt_goto): New function.
2657 (ppc64_emit_le_goto): New function.
2658 (ppc64_emit_gt_goto): New function.
2659 (ppc64_emit_ge_goto): New function.
2660 (ppc64v1_emit_ops_impl): New static variable.
2661 (ppc64v2_emit_ops_impl): New static variable.
2662 (ppc_emit_ops): New function.
2663 (linux_low_target): Wire in ppc_emit_ops.
2664
a2174ba4
MK
26652016-03-31 Wei-cheng Wang <cole945@gmail.com>
2666 Marcin Kościelnicki <koriakin@0x04.net>
2667
2668 PR/17221
2669 * Makefile.in: Add powerpc-*-ipa.o
2670 * configure.srv: Add ipa_obj for powerpc*-linux.
2671 * linux-ppc-ipa.c: New file.
2672 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2673 includes.
2674 (PPC_FIELD): New macro.
2675 (PPC_SEXT): New macro.
2676 (PPC_OP6): New macro.
2677 (PPC_BO): New macro.
2678 (PPC_LI): New macro.
2679 (PPC_BD): New macro.
2680 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2681 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2682 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2683 (ppc_get_thread_area): New function.
2684 (is_elfv2_inferior): New function.
2685 (gen_ds_form): New function.
2686 (GEN_STD): New macro.
2687 (GEN_STDU): New macro.
2688 (GEN_LD): New macro.
2689 (GEN_LDU): New macro.
2690 (gen_d_form): New function.
2691 (GEN_ADDI): New macro.
2692 (GEN_ADDIS): New macro.
2693 (GEN_LI): New macro.
2694 (GEN_LIS): New macro.
2695 (GEN_ORI): New macro.
2696 (GEN_ORIS): New macro.
2697 (GEN_LWZ): New macro.
2698 (GEN_STW): New macro.
2699 (GEN_STWU): New macro.
2700 (gen_xfx_form): New function.
2701 (GEN_MFSPR): New macro.
2702 (GEN_MTSPR): New macro.
2703 (GEN_MFCR): New macro.
2704 (GEN_MTCR): New macro.
2705 (GEN_SYNC): New macro.
2706 (GEN_LWSYNC): New macro.
2707 (gen_x_form): New function.
2708 (GEN_OR): New macro.
2709 (GEN_MR): New macro.
2710 (GEN_LWARX): New macro.
2711 (GEN_STWCX): New macro.
2712 (GEN_CMPW): New macro.
2713 (gen_md_form): New function.
2714 (GEN_RLDICL): New macro.
2715 (GEN_RLDICR): New macro.
2716 (gen_i_form): New function.
2717 (GEN_B): New macro.
2718 (GEN_BL): New macro.
2719 (gen_b_form): New function.
2720 (GEN_BNE): New macro.
2721 (GEN_LOAD): New macro.
2722 (GEN_STORE): New macro.
2723 (gen_limm): New function.
2724 (gen_atomic_xchg): New function.
2725 (gen_call): New function.
2726 (ppc_relocate_instruction): New function.
2727 (ppc_install_fast_tracepoint_jump_pad): New function.
2728 (ppc_get_min_fast_tracepoint_insn_len): New function.
2729 (ppc_get_ipa_tdesc_idx): New function.
2730 (the_low_target): Wire in the new functions.
2731 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2732 tdescs.
2733 * linux-ppc-tdesc.h: New file.
2734
a13c4696
MK
27352016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2736
2737 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2738 (alloc_jump_pad_buffer): New function.
2739 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2740 (alloc_jump_pad_buffer): New function.
2741 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2742 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2743 (alloc_jump_pad_buffer): New function.
2744 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2745 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2746 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2747 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2748
1cda1512
MK
27492016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2750
2751 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2752 * linux-amd64-ipa.c: Likewise.
2753 * linux-i386-ipa.c: Likewise.
2754 * linux-s390-ipa.c: Likewise.
2755 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2756 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2757 set_trace_state_variable_value_ptr.
2758 (struct ipa_sym_addresses): Likewise.
2759 (symbol_list): Likewise.
2760 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2761 accessing gdb_collect directly.
2762 (gdb_collect_ptr_type): New typedef.
2763 (get_raw_reg_ptr_type): New typedef.
2764 (get_trace_state_variable_value_ptr_type): New typedef.
2765 (set_trace_state_variable_value_ptr_type): New typedef.
2766 (gdb_collect_ptr): New global.
2767 (get_raw_reg_ptr): New global.
2768 (get_trace_state_variable_value_ptr): New global.
2769 (set_trace_state_variable_value_ptr): New global.
2770 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2771 accessing get_raw_reg directly.
2772 (get_get_tsv_func_addr): Likewise for
2773 get_trace_state_variable_value_ptr.
2774 (get_set_tsv_func_addr): Likewise for
2775 set_trace_state_variable_value_ptr.
2776 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2777
72fb5488
SM
27782016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2779
2780 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2781
28170b88
MK
27822016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2783
2784 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2785 packets.
2786 (relocate_instruction): Remove own_buf.
2787 * server.c (own_buf): Make global.
2788 (handle_v_requests): Make global.
2789 * server.h (own_buf): New declaration.
2790 (handle_v_requests): New prototype.
2791
f39e8743
MK
27922016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2793
2794 PR 18377
2795 * linux-s390-low.c (add_insns): New function.
2796 (s390_emit_prologue): New function.
2797 (s390_emit_epilogue): New function.
2798 (s390_emit_add): New function.
2799 (s390_emit_sub): New function.
2800 (s390_emit_mul): New function.
2801 (s390_emit_lsh): New function.
2802 (s390_emit_rsh_signed): New function.
2803 (s390_emit_rsh_unsigned): New function.
2804 (s390_emit_ext): New function.
2805 (s390_emit_log_not): New function.
2806 (s390_emit_bit_and): New function.
2807 (s390_emit_bit_or): New function.
2808 (s390_emit_bit_xor): New function.
2809 (s390_emit_bit_not): New function.
2810 (s390_emit_equal): New function.
2811 (s390_emit_less_signed): New function.
2812 (s390_emit_less_unsigned): New function.
2813 (s390_emit_ref): New function.
2814 (s390_emit_if_goto): New function.
2815 (s390_emit_goto): New function.
2816 (s390_write_goto_address): New function.
2817 (s390_emit_litpool): New function.
2818 (s390_emit_const): New function.
2819 (s390_emit_call): New function.
2820 (s390_emit_reg): New function.
2821 (s390_emit_pop): New function.
2822 (s390_emit_stack_flush): New function.
2823 (s390_emit_zero_ext): New function.
2824 (s390_emit_swap): New function.
2825 (s390_emit_stack_adjust): New function.
2826 (s390_emit_set_r2): New function.
2827 (s390_emit_int_call_1): New function.
2828 (s390_emit_void_call_2): New function.
2829 (s390_emit_eq_goto): New function.
2830 (s390_emit_ne_goto): New function.
2831 (s390_emit_lt_goto): New function.
2832 (s390_emit_le_goto): New function.
2833 (s390_emit_gt_goto): New function.
2834 (s390_emit_ge_goto): New function.
2835 (s390x_emit_prologue): New function.
2836 (s390x_emit_epilogue): New function.
2837 (s390x_emit_add): New function.
2838 (s390x_emit_sub): New function.
2839 (s390x_emit_mul): New function.
2840 (s390x_emit_lsh): New function.
2841 (s390x_emit_rsh_signed): New function.
2842 (s390x_emit_rsh_unsigned): New function.
2843 (s390x_emit_ext): New function.
2844 (s390x_emit_log_not): New function.
2845 (s390x_emit_bit_and): New function.
2846 (s390x_emit_bit_or): New function.
2847 (s390x_emit_bit_xor): New function.
2848 (s390x_emit_bit_not): New function.
2849 (s390x_emit_equal): New function.
2850 (s390x_emit_less_signed): New function.
2851 (s390x_emit_less_unsigned): New function.
2852 (s390x_emit_ref): New function.
2853 (s390x_emit_if_goto): New function.
2854 (s390x_emit_const): New function.
2855 (s390x_emit_call): New function.
2856 (s390x_emit_reg): New function.
2857 (s390x_emit_pop): New function.
2858 (s390x_emit_stack_flush): New function.
2859 (s390x_emit_zero_ext): New function.
2860 (s390x_emit_swap): New function.
2861 (s390x_emit_stack_adjust): New function.
2862 (s390x_emit_int_call_1): New function.
2863 (s390x_emit_void_call_2): New function.
2864 (s390x_emit_eq_goto): New function.
2865 (s390x_emit_ne_goto): New function.
2866 (s390x_emit_lt_goto): New function.
2867 (s390x_emit_le_goto): New function.
2868 (s390x_emit_gt_goto): New function.
2869 (s390x_emit_ge_goto): New function.
2870 (s390_emit_ops): New function.
2871 (struct linux_target_ops): Fill in emit_ops hook.
2872
abd9baf9
MK
28732016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2874
2875 PR 18377
2876 * Makefile.in: Add s390 IPA files.
2877 * configure.srv: Build IPA for s390.
2878 * linux-s390-ipa.c: New file.
2879 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2880 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2881 (tdesc_s390_linux32): Likewise.
2882 (init_registers_s390_linux32v1): Likewise.
2883 (tdesc_s390_linux32v1): Likewise.
2884 (init_registers_s390_linux32v2): Likewise.
2885 (tdesc_s390_linux32v2): Likewise.
2886 (init_registers_s390_linux64): Likewise.
2887 (tdesc_s390_linux64): Likewise.
2888 (init_registers_s390_linux64v1): Likewise.
2889 (tdesc_s390_linux64v1): Likewise.
2890 (init_registers_s390_linux64v2): Likewise.
2891 (tdesc_s390_linux64v2): Likewise.
2892 (init_registers_s390_te_linux64): Likewise.
2893 (tdesc_s390_te_linux64): Likewise.
2894 (init_registers_s390_vx_linux64): Likewise.
2895 (tdesc_s390_vx_linux64): Likewise.
2896 (init_registers_s390_tevx_linux64): Likewise.
2897 (tdesc_s390_tevx_linux64): Likewise.
2898 (init_registers_s390x_linux64): Likewise.
2899 (tdesc_s390x_linux64): Likewise.
2900 (init_registers_s390x_linux64v1): Likewise.
2901 (tdesc_s390x_linux64v1): Likewise.
2902 (init_registers_s390x_linux64v2): Likewise.
2903 (tdesc_s390x_linux64v2): Likewise.
2904 (init_registers_s390x_te_linux64): Likewise.
2905 (tdesc_s390x_te_linux64): Likewise.
2906 (init_registers_s390x_vx_linux64): Likewise.
2907 (tdesc_s390x_vx_linux64): Likewise.
2908 (init_registers_s390x_tevx_linux64): Likewise.
2909 (tdesc_s390x_tevx_linux64): Likewise.
2910 (have_hwcap_s390_vx): New static variable.
2911 (s390_arch_setup): Fill have_hwcap_s390_vx.
2912 (s390_get_thread_area): New function.
2913 (s390_ft_entry_gpr_esa): New const.
2914 (s390_ft_entry_gpr_zarch): New const.
2915 (s390_ft_entry_misc): New const.
2916 (s390_ft_entry_fr): New const.
2917 (s390_ft_entry_vr): New const.
2918 (s390_ft_main_31): New const.
2919 (s390_ft_main_64): New const.
2920 (s390_ft_exit_fr): New const.
2921 (s390_ft_exit_vr): New const.
2922 (s390_ft_exit_misc): New const.
2923 (s390_ft_exit_gpr_esa): New const.
2924 (s390_ft_exit_gpr_zarch): New const.
2925 (append_insns): New function.
2926 (s390_relocate_instruction): New function.
2927 (s390_install_fast_tracepoint_jump_pad): New function.
2928 (s390_get_min_fast_tracepoint_insn_len): New function.
2929 (s390_get_ipa_tdesc_idx): New function.
2930 (struct linux_target_ops): Wire in the above functions.
2931 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2932 * linux-s390-tdesc.h: New file.
2933
a4105d04
MK
29342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2935
2936 * linux-s390-low.c (s390_supports_tracepoints): New function.
2937 (struct linux_target_ops): Fill supports_tracepoints hook.
2938
35ac8b3e
YQ
29392016-03-18 Yao Qi <yao.qi@linaro.org>
2940
2941 * linux-low.c (lwp_signal_can_be_delivered): New function.
2942 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2943
94610ec4
YQ
29442016-03-18 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2947 0 if signal is enqueued. Remove 'signal' from one debugging
2948 message. Move one debugging message to some lines below.
2949 Remove code setting 'signal' to 0.
2950
80aea927
YQ
29512016-03-18 Yao Qi <yao.qi@linaro.org>
2952
2953 * linux-low.c (linux_low_filter_event): Remove redundant
2954 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2955
b04fd3be
MK
29562016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2957
2958 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2959 (struct linux_target_ops): Wire in the above.
2960
c40c8d4b
YQ
29612016-03-03 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-low.c: Update comments to start_step_over.
2964
0f8288ae
YQ
29652016-03-03 Yao Qi <yao.qi@linaro.org>
2966
2967 PR server/19736
2968 * linux-low.c (handle_extended_wait): Set child suspended
2969 if event_lwp->bp_reinsert isn't zero.
2970
fdbd04a8
YQ
29712016-03-02 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2974 enqueue_pending_signal.
2975
6896a8fa
MK
29762016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2977
2978 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2979 is actually loaded.
2980
ab503087
MK
29812016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2982
2983 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2984 (s390_regmap_3264) [!__s390x__]: New global.
2985 (s390_collect_ptrace_register): Skip map entries containing -1.
2986 (s390_supply_ptrace_register): Ditto.
2987 (s390_fill_gprs_high): New function.
2988 (s390_store_gprs_high): New function.
2989 (s390_regsets): Add NT_S390_HIGH_GPRS.
2990 (s390_get_hwcap): Enable on 31-bit.
2991 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2992 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2993 Detect NT_S390_HIGH_GPRS.
2994 (s390_usrregs_info_3264): Enable on 31-bit.
2995 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2996 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2997
ae91f625
MK
29982016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2999
3000 PR gdb/13808
3001 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3002 * configure.srv: Ditto.
3003 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3004 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3005 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3006 (init_registers_amd64_linux): Remove prototype.
3007 (tdesc_amd64_linux): Remove declaration.
3008 (get_ipa_tdesc): New function.
3009 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3010 initialize remaining tdescs.
3011 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3012 (init_registers_i386_linux): Remove prototype.
3013 (tdesc_i386_linux): Remove declaration.
3014 (get_ipa_tdesc): New function.
3015 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3016 initialize remaining tdescs.
3017 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3018 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3019 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3020 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3021 (x86_get_ipa_tdesc_idx): New function.
3022 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3023 * linux-x86-tdesc.h: New file.
3024 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3025 (target_get_ipa_tdesc_idx): New macro.
3026 * tracepoint.c (ipa_tdesc_idx): New macro.
3027 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3028 (symbol_list): Add ipa_tdesc_idx.
3029 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3030 (ipa_tdesc): Remove.
3031 (ipa_tdesc_idx): New variable.
3032 (get_context_regcache): Use get_ipa_tdesc.
3033 (gdb_collect): Ditto.
3034 (gdb_probe): Ditto.
3035 * tracepoint.h (get_ipa_tdesc): New prototype.
3036 (ipa_tdesc): Remove.
3037
e7ad2f14
PA
30382016-02-24 Pedro Alves <palves@redhat.com>
3039
3040 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3041 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3042 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3043 Factor out common code between the USE_SIGTRAP_SIGINFO and
3044 !USE_SIGTRAP_SIGINFO blocks.
3045 (linux_low_filter_event): Call save_stop_reason instead of
3046 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3047 Update comments.
3048 (linux_wait_1): Update comments.
3049
657f9cde
WW
30502016-02-24 Wei-cheng Wang <cole945@gmail.com>
3051
3052 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3053 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3054 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3055 ppc_insert_point, ppc_remove_point.
3056
b00b61e1
MK
30572016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3058
3059 * linux-s390-low.c (s390_supports_z_point_type): New function.
3060 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3061
553cb527
YQ
30622016-02-16 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3065 PC. Get pc from regcache_read_pc.
3066
a5652c21
YQ
30672016-02-12 Yao Qi <yao.qi@linaro.org>
3068
3069 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3070 or linux_get_pc_32bit.
3071 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3072
ed443b61
YQ
30732016-02-12 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3076 arm_linux_get_next_pcs_fixup.
3077
020ecd38
MK
30782016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3079
3080 * tracepoint.c (x_tracepoint_action_download): Change
3081 write_inferior_data_ptr to write_inferior_data_pointer.
3082 (cmd_qtstart): Likewise.
3083 (write_inferior_data_ptr): Remove.
3084 (download_agent_expr): Change write_inferior_data_ptr to
3085 write_inferior_data_pointer.
3086 (download_tracepoint_1): Likewise.
3087 (download_tracepoint): Likewise.
3088 (download_trace_state_variables): Likewise.
3089
7cae9051
WW
30902016-02-11 Wei-cheng Wang <cole945@gmail.com>
3091 Marcin Kościelnicki <koriakin@0x04.net>
3092
3093 * tracepoint.c (struct tracepoint_action_ops): Remove.
3094 (struct tracepoint_action): Remove ops.
3095 (m_tracepoint_action_download, r_tracepoint_action_download)
3096 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3097 size and offset accordingly.
3098 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3099 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3100 (tracepoint_action_send, tracepoint_action_download): New functions.
3101 Helpers for trace action handlers.
3102 (add_tracepoint_action): Remove setup actions ops.
3103 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3104
9f6a71b4
YQ
31052016-02-10 Yao Qi <yao.qi@linaro.org>
3106
3107 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3108
1e94266c
SM
31092016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3112 to AC_OUTPUT.
3113 * configure: Regenerate.
3114
8adce034
SM
31152016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3116
3117 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3118 void * to gdb_byte *.
3119 * linux-low.c (siginfo_fixup): Likewise.
3120 (linux_xfer_siginfo): Likewise.
3121 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3122 Likewise.
3123 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3124
93813b37
WT
31252016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3126
3127 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3128 to srv_tgtobj.
3129 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3130 to srv_tgtobj.
3131 * linux-x86-low.c [__x86_64__]: Include
3132 "nat/amd64-linux-siginfo.h".
3133 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3134 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3135 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3136 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3137 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3138 (cpt_si_fd, si_timerid, si_overrun): Move from
3139 nat/amd64-linux-siginfo.c.
3140 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3141
8424cc97
SM
31422016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3143
3144 * server.c (skip_to_semicolon): Remove.
3145 (process_point_options): Use strchrnul instead of
3146 skip_to_semicolon.
3147
4d18591b
YQ
31482016-01-26 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3151 * linux-low.c (install_software_single_step_breakpoints): Don't
3152 call regcache_read_pc.
3153 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3154 argument pc.
3155
d8020970
YQ
31562016-01-26 Yao Qi <yao.qi@linaro.org>
3157
3158 * linux-low.c (install_software_single_step_breakpoints): Call
3159 regcache_read_pc instead of get_pc.
3160
8b207339
YQ
31612016-01-26 Yao Qi <yao.qi@linaro.org>
3162
3163 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3164 (unblock_async_io): Rename to ...
3165 (block_unblock_async_io): ... it. New function.
3166 (enable_async_io): Don't install SIGIO handler. Unblock it
3167 instead.
3168 (disable_async_io): Don't ignore SIGIO. Block it instead.
3169 (initialize_async_io): Install SIGIO handler. Don't call
3170 unblock_async_io.
3171
18879fef
YQ
31722016-01-26 Yao Qi <yao.qi@linaro.org>
3173
3174 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3175 first character is '\003', call *the_target->request_interrupt.
3176
a0f8e08a
YQ
31772016-01-25 Yao Qi <yao.qi@linaro.org>
3178
3179 * remote-utils.c (new_thread_notify): Remove.
3180 (dead_thread_notify): Likewise.
3181 * remote-utils.h (new_thread_notify): Remove declaration.
3182 (dead_thread_notify): Likewise.
3183
cc5fd9ab
MK
31842016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3185
3186 * gdb.trace/pending.exp: Fix expected message on continue.
3187
99e8eb11
MK
31882016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3189
3190 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3191 it works properly on big-endian machines where sizeof (CORE_ADDR)
3192 != sizeof (void *).
3193
a994041d
PA
31942016-01-21 Pedro Alves <palves@redhat.com>
3195
3196 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3197 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3198 * configure: Regenerate.
3199
f7a6a40d
YQ
32002016-01-21 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3203 is_thumb and set it according to CPSR saved on the stack.
3204 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3205 arm_sigreturn_next_pc.
3206
6f69e520
YQ
32072016-01-18 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-low.c (linux_set_pc_64bit): New function.
3210 (linux_get_pc_64bit): New function.
3211 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3212 Declare.
3213 * linux-sparc-low.c (debug_threads): Remove declaration.
3214 (sparc_get_pc): Remove.
3215 (the_low_target): Use linux_get_pc_64bit instead of
3216 sparc_get_pc.
3217 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3218 (the_low_target): Use linux_get_pc_64bit and
3219 linux_set_pc_64bit.
3220
276d4552
YQ
32212016-01-18 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-arm-low.c (debug_threads): Remove declaration.
3224 (arm_get_pc, arm_set_pc): Remove.
3225 (the_low_target): Use linux_get_pc_32bit and
3226 linux_set_pc_32bit.
3227 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3228 (the_low_target): Use linux_get_pc_32bit and
3229 linux_set_pc_32bit.
3230 * linux-cris-low.c (debug_threads): Remove declaration.
3231 (cris_get_pc, cris_set_pc,): Remove.
3232 (the_low_target): Use linux_get_pc_32bit and
3233 linux_set_pc_32bit.
3234 * linux-crisv32-low.c (debug_threads): Remove declaration.
3235 (cris_get_pc, cris_set_pc): Remove.
3236 (the_low_target): Use linux_get_pc_32bit and
3237 linux_set_pc_32bit.
3238 * linux-low.c: Include inttypes.h.
3239 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3240 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3241 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3242 (the_low_target): Use linux_get_pc_32bit and
3243 linux_set_pc_32bit.
3244 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3245 (the_low_target): Use linux_get_pc_32bit and
3246 linux_set_pc_32bit.
3247 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3248 (the_low_target): Use linux_get_pc_32bit and
3249 linux_set_pc_32bit.
3250 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3251 (the_low_target): Use linux_get_pc_32bit and
3252 linux_set_pc_32bit.
3253 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3254 (the_low_target): Use linux_get_pc_32bit and
3255 linux_set_pc_32bit.
3256
eb0edac8
GB
32572016-01-18 Gary Benson <gbenson@redhat.com>
3258
3259 * configure.ac (AC_FUNC_FORK): New check.
3260 * config.in: Regenerate.
3261 * configure: Likewise.
3262
1b451dda
YQ
32632016-01-14 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3266 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3267 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3268 arm_get_next_pcs_ctor.
3269
82075af2
JS
32702016-01-12 Josh Stone <jistone@redhat.com>
3271 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3272
3273 * inferiors.h: Include "gdb_vecs.h".
3274 (struct process_info): Add syscalls_to_catch.
3275 * inferiors.c (remove_process): Free syscalls_to_catch.
3276 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3277 syscall_return stops.
3278 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3279 * server.c (handle_general_set): Handle QCatchSyscalls.
3280 (handle_query): Report support for QCatchSyscalls.
3281 * target.h (struct target_ops): Add supports_catch_syscall.
3282 (target_supports_catch_syscall): New macro.
3283 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3284 (struct lwp_info): Add syscall_state.
3285 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3286 Maintain syscall_state and syscalls_to_catch across exec.
3287 (get_syscall_trapinfo): New function, proxy to the_low_target.
3288 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3289 (linux_low_filter_event): Toggle syscall_state entry/return for
3290 syscall traps, and set it ignored for all others.
3291 (gdb_catching_syscalls_p): New function.
3292 (gdb_catch_this_syscall_p): New function.
3293 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3294 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3295 (linux_supports_catch_syscall): New function.
3296 (linux_target_ops): Install it.
3297 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3298 (the_low_target): Install it.
3299
8f13a3ce
MF
33002016-01-12 Mike Frysinger <vapier@gentoo.org>
3301
3302 * acinclude.m4: Include new ../warning.m4 file.
3303 * configure: Regenerated.
3304 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3305
5b3da067
MF
33062016-01-12 Mike Frysinger <vapier@gentoo.org>
3307
3308 * ax.c (is_goto_target): Mark static.
3309 * linux-low.c (register_addr): Likewise.
3310 (linux_fetch_registers, linux_store_registers): Likewise.
3311 * mem-break.c (any_persistent_commands): Fix old prototype.
3312 (add_commands_to_breakpoint): Mark static.
3313 * regcache.c (find_register_by_name): Delete unused func.
3314 * remote-utils.c (hex_or_minus_one): Mark static.
3315 * server.c (monitor_show_help): Mark static.
3316 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3317 handle_v_requests): Likewise.
3318
bc504a31
PA
33192016-01-12 Pedro Alves <palves@redhat.com>
3320
3321 Remove use of the registered trademark symbol throughout.
3322
5a0dd67a
YQ
33232016-01-08 Yao Qi <yao.qi@linaro.org>
3324
3325 * remote-utils.c (getpkt): If c is '\003', call target hook
3326 request_interrupt.
3327
b2ca446f
YQ
33282016-01-06 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3331 linux-aarch32-low.c.
3332 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3333 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3334 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3335 (thumb2_breakpoint): Declare.
3336 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3337 linux-aarch32-low.h.
3338 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3339 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3340 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3341
edd88788
JB
33422016-01-01 Joel Brobecker <brobecker@adacore.com>
3343
3344 * gdbreplay.c (gdbreplay_version): Change copyright year in
3345 version message.
3346 * server.c (gdbserver_version): Likewise.
3347
65da7f14
PP
33482015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3349
3350 * server.c (crc32_table): Delete.
3351 (crc32): Use libiberty's xcrc32 function.
3352
4abd5ed2
JB
33532015-12-22 Joel Brobecker <brobecker@adacore.com>
3354
3355 * lynx-low.c (lynx_delete_thread_callback): New function.
3356 (lynx_mourn): Properly delete our process and all of its
3357 threads. Remove call to clear_inferiors.
3358
0e50fe5c
JB
33592015-12-22 Joel Brobecker <brobecker@adacore.com>
3360
3361 * target.c (thread_search_callback): Add check that
3362 the thread_stopped target callback is not NULL before
3363 calling it.
3364
35adc03f
YQ
33652015-12-21 Yao Qi <yao.qi@linaro.org>
3366
3367 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3368 arm breakpoint.
3369
bd2b2909
AT
33702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3371
3372 * server.c (handle_query): Call target_supports_software_single_step.
3373
7fe5e27e
AT
33742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3375
3376 * linux-low.c (single_step): New function.
3377 (linux_resume_one_lwp_throw): Call single_step.
3378 (start_step_over): Likewise.
3379
d9311bfa
AT
33802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3381
3382 * Makefile.in (SFILES): Append arch/arm-linux.c,
3383 arch/arm-get-next-pcs.c.
3384 (arm-linux.o): New rule.
3385 (arm-get-next-pcs.o): New rule.
3386 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3387 arm-linux.o.
3388 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3389 to linux-aarch32-low.c.
3390 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3391 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3392 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3393 (thumb2_breakpoint_len): Likewise.
3394 (arm_is_thumb_mode): Make non-static.
3395 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3396 from linux-aarch32-low.c.
3397 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3398 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3399 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3400 (thumb2_breakpoint_len): Likewise.
3401 (arm_is_thumb_mode): New declaration.
3402 * linux-arm-low.c: Include arch/arm-linux.h
3403 aarch/arm-get-next-pcs.h, sys/syscall.h.
3404 (get_next_pcs_ops): New struct.
3405 (get_next_pcs_addr_bits_remove): New function.
3406 (get_next_pcs_is_thumb): New function.
3407 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3408 (arm_sigreturn_next_pc): Likewise.
3409 (get_next_pcs_syscall_next_pc): Likewise.
3410 (arm_gdbserver_get_next_pcs): Likewise.
3411 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3412 Initialize.
3413 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3414 * server.h: Include gdb_vecs.h.
3415
68ce2059
AT
34162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3417
3418 * Makefile.in (SFILES): Append common/common-regcache.c.
3419 (OBS): Append common-regcache.o.
3420 (common-regcache.o): New rule.
3421 * regcache.c (init_register_cache): Initialize cache to
3422 REG_UNAVAILABLE.
3423 (regcache_raw_read_unsigned): New function.
3424 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3425 register_status enum.
3426
fa5308bd
AT
34272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3428
3429 * linux-aarch64-low.c (the_low_targets): Rename
3430 breakpoint_reinsert_addr to get_next_pcs.
3431 * linux-arm-low.c (the_low_targets): Likewise.
3432 * linux-bfin-low.c (the_low_targets): Likewise.
3433 * linux-cris-low.c (the_low_targets): Likewise.
3434 * linux-crisv32-low.c (the_low_targets): Likewise.
3435 * linux-low.c (can_software_single_step): Likewise.
3436 (install_software_single_step_breakpoints): New function.
3437 (start_step_over): Use install_software_single_step_breakpoints.
3438 * linux-low.h: New CORE_ADDR vector.
3439 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3440 get_next_pcs.
3441 * linux-mips-low.c (the_low_targets): Likewise.
3442 * linux-nios2-low.c (the_low_targets): Likewise.
3443 * linux-sparc-low.c (the_low_targets): Likewise.
3444
4a6ed09b
PA
34452015-12-17 Pedro Alves <palves@redhat.com>
3446
3447 * linux-low.c (linux_kill_one_lwp): Remove references to
3448 LinuxThreads.
3449 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3450 to 'kill'.
3451 (linux_init_signals): Delete.
3452 (initialize_low): Adjust.
3453 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3454
7544db95
PA
34552015-12-16 Pedro Alves <palves@redhat.com>
3456
3457 * configure.ac (compiler warning flags): When testing a
3458 -Wno-foo option, check whether -Wfoo works instead.
3459 * configure: Regenerate.
3460
8020350c
DB
34612015-12-11 Don Breazeal <donb@codesourcery.com>
3462
3463 * server.c (process_serial_event): Don't exit from gdbserver
3464 in remote mode if there are still active inferiors.
3465
db91f502
YQ
34662015-12-11 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3469 arm_breakpoint_at if the process is 32-bit.
3470
b37a6290
YQ
34712015-12-11 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3474 arm breakpoint.
3475
17b1509a
YQ
34762015-12-07 Yao Qi <yao.qi@linaro.org>
3477
3478 * configure.srv: Append arm.o to srv_tgtobj for
3479 aarch64*-*-linux* target.
3480 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3481 from linux-arm-low.c.
3482 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3483 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3484 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3485 (thumb2_breakpoint_len): Likewise.
3486 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3487 (arm_breakpoint_kinds): Likewise.
3488 (arm_breakpoint_kind_from_pc): Likewise.
3489 (arm_sw_breakpoint_from_kind): Likewise.
3490 (arm_breakpoint_kind_from_current_state): Likewise.
3491 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3492 (arm_sw_breakpoint_from_kind): Declare.
3493 (arm_breakpoint_kind_from_current_state): Declare.
3494 (arm_breakpoint_at): Declare.
3495 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3496 arm_sw_breakpoint_from_kind if process is 32-bit.
3497 (aarch64_breakpoint_kind_from_pc): New function.
3498 (aarch64_breakpoint_kind_from_current_state): New function.
3499 (the_low_target): Initialize fields breakpoint_kind_from_pc
3500 and breakpoint_kind_from_current_state.
3501 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3502 linux-aarch32-low.c.
3503 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3504 (arm_breakpoint, arm_breakpoint_len): Likewise.
3505 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3506 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3507 (arm_is_thumb_mode): Likewise.
3508 (arm_breakpoint_at): Likewise.
3509 (arm_breakpoint_kind_from_pc): Likewise.
3510 (arm_sw_breakpoint_from_kind): Likewise.
3511 (arm_breakpoint_kind_from_current_state): Likewise.
3512
3513 Revert:
3514 2015-08-04 Yao Qi <yao.qi@linaro.org>
3515
3516 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3517 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3518 * server.c (extended_protocol): Remove "static".
3519 * server.h (extended_protocol): Declare it.
3520
ece66d65
JS
35212015-12-04 Josh Stone <jistone@redhat.com>
3522
3523 * target.h (struct target_ops) <arch_setup>: Rename to ...
3524 (struct target_ops) <post_create_inferior>: ... this.
3525 (target_arch_setup): Rename to ...
3526 (target_post_create_inferior): ... this, calling post_create_inferior.
3527 * server.c (start_inferior): Update target_arch_setup calls to
3528 target_post_create_inferior.
3529 * linux-low.c (linux_low_ptrace_options): Forward declare.
3530 (linux_arch_setup): Update its comment for general use.
3531 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3532 (struct linux_target_ops): Use linux_post_create_inferior.
3533 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3534 to post_create_inferior.
3535 * nto-low.c (struct nto_target_ops): Likewise.
3536 * spu-low.c (struct spu_target_ops): Likewise.
3537 * win32-low.c (struct win32_target_ops): Likewise.
3538
e58c48b4
AT
35392015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3540
3541 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3542
fbec8956
AT
35432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3544
3545 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3546 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3547 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3548 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3549 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3550 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3551 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3552 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3553 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3554 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3555 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3556 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3557
9b4c5f87
AT
35582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3559
3560 * linux-low.c (linux_look_up_symbols): Don't call
3561 linux_supports_traceclone.
3562 * linux-low.h (thread_db_init): Remove use_events argument.
3563 * thread-db.c (thread_db_use_event): Remove global variable.
3564 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3565 (struct thread_db) <td_create_bp>: Remove field.
3566 (thread_db_create_event): Remove function.
3567 (thread_db_enable_reporting): Likewise.
3568 (find_one_thread): Don't check for thread_db_use_events.
3569 (attach_thread): Likewise.
3570 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3571 (try_thread_db_load_1): Don't check for thread_db_use_events.
3572 (thread_db_init): Remove use_events argument and thread events
3573 handling.
3574 (remove_thread_event_breakpoints): Remove function.
3575 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3576
7d00775e
AT
35772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3578
3579 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3580 New function.
3581 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3582 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3583 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3584 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3585 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3586 Initialize.
3587 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3588 New function.
3589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3590 * linux-low.c (can_hardware_single_step): Use
3591 supports_hardware_single_step.
3592 (can_software_single_step): New function.
3593 (start_step_over): Call can_software_single_step.
3594 (linux_supports_hardware_single_step): New function.
3595 (struct target_ops) <supports_software_single_step>: Initialize.
3596 * linux-low.h (struct linux_target_ops)
3597 <supports_hardware_single_step>: Initialize.
3598 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3599 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3600 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3601 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3602 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3604 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3605 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3606 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3607 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3608 Initialize.
3609 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3610 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3611 Initialize.
3612 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3613 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3614 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3615 New function.
3616 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3617 * target.h (struct target_ops): <supports_software_single_step>:
3618 New field.
3619 (target_supports_software_single_step): New macro.
3620
2d97cd35
AT
36212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3622
3623 * linux-low.c (linux_wait_1): Fix pc advance condition.
3624 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3625 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3626
769ef81f
AT
36272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3628
3629 * linux-arm-low.c (arm_is_thumb_mode): New function.
3630 (arm_breakpoint_at): Use arm_is_thumb_mode.
3631 (arm_breakpoint_kind_from_current_state): New function.
3632 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3633 Initialize.
3634 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3635 (linux_breakpoint_kind_from_current_state): New function.
3636 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3637 * linux-low.h (struct linux_target_ops)
3638 <breakpoint_kind_from_current_state>: New field.
3639 * target.h (struct target_ops): Likewise.
3640 (target_breakpoint_kind_from_current_state): New macro.
3641
1bebeeca
PA
36422015-11-30 Pedro Alves <palves@redhat.com>
3643
3644 * linux-low.c (linux_resume): Wake up the event loop before
3645 returning.
3646
a67a9fae
PA
36472015-11-30 Pedro Alves <palves@redhat.com>
3648
3649 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3650 check.
3651 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3652 to -1.
3653 * target.c (struct thread_search): New structure.
3654 (thread_search_callback): New function.
3655 (prev_general_thread): New global.
3656 (prepare_to_access_memory, done_accessing_memory): New functions.
3657 * target.h (prepare_to_access_memory, done_accessing_memory):
3658 Replace macros with function declarations.
3659
f2faf941
PA
36602015-11-30 Pedro Alves <palves@redhat.com>
3661
3662 PR 14618
3663 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3664 report TARGET_WAITKIND_NO_RESUMED.
3665 * remote-utils.c (prepare_resume_reply): Handle
3666 TARGET_WAITKIND_NO_RESUMED.
3667 * server.c (report_no_resumed): New global.
3668 (handle_query) <qSupported>: Handle "no-resumed+". Report
3669 "no-resumed+" support.
3670 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3671 return error if the client doesn't support no-resumed events.
3672 (push_stop_notification): New function.
3673 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3674 events if the client supports them.
3675
a681f9c9
PA
36762015-11-30 Pedro Alves <palves@redhat.com>
3677
3678 * linux-low.c (thread_still_has_status_pending_p): Don't check
3679 vCont;t here.
3680 (lwp_resumed): New function.
3681 (status_pending_p_callback): Return early if the LWP is not
3682 supposed to be resumed.
3683
65706a29
PA
36842015-11-30 Pedro Alves <palves@redhat.com>
3685
3686 * linux-low.c (handle_extended_wait): Assert that the LWP's
3687 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3688 thread create events, leave the new child's status pending.
3689 (linux_low_filter_event): If GDB wants to hear about thread exit
3690 events, leave the LWP marked dead and don't delete it.
3691 (linux_wait_for_event_filtered): Don't check for thread exit.
3692 (filter_exit_event): New function.
3693 (linux_wait_1): Use it, when returning an exit event.
3694 (linux_resume_one_lwp_throw): Assert that the LWP's
3695 waitstatus is TARGET_WAITKIND_IGNORE.
3696 * remote-utils.c (prepare_resume_reply): Handle
3697 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3698 * server.c (report_thread_events): New global.
3699 (handle_general_set): Handle QThreadEvents.
3700 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3701 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3702 TARGET_WAITKIND_THREAD_EXITED.
3703 * server.h (report_thread_events): Declare.
3704
56cf4bed
PA
37052015-11-30 Pedro Alves <palves@redhat.com>
3706
3707 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3708 the thread's last_resume_kind was resume_stop.
3709
500c1d85
PA
37102015-11-30 Pedro Alves <palves@redhat.com>
3711
3712 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3713 before returning.
3714
de979965
PA
37152015-11-30 Pedro Alves <palves@redhat.com>
3716
3717 * server.c (handle_v_requests): Handle vCtrlC.
3718
34c65914
PA
37192015-11-30 Pedro Alves <palves@redhat.com>
3720
3721 * gdbthread.h (find_any_thread_of_pid): Declare.
3722 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3723 functions.
3724 * server.c (handle_query): If current_thread is NULL, look for
3725 another thread of the selected process.
3726
79efa585 37272015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3728 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3729
3730 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3731 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3732 name in reply.
3733 * target.h (struct target_ops) <thread_name>: New field.
3734 (target_thread_name): New macro.
3735
80d82c19
JB
37362015-11-23 Joel Brobecker <brobecker@adacore.com>
3737
3738 * regcache.h (regcache_invalidate_pid): Add declaration.
3739 * regcache.c (regcache_invalidate_pid): New function, extracted
3740 from regcache_invalidate.
3741 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3742 Add trivial documentation comment.
3743 * lynx-low.c: Use regcache_invalidate_pid instead of
3744 regcache_invalidate.
3745
64da5dd5
JB
37462015-11-23 Joel Brobecker <brobecker@adacore.com>
3747
3748 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3749 and Elf64_auxv_t if the target is Android.
3750
37ce4055
DE
37512015-11-22 Doug Evans <xdje42@gmail.com>
3752
3753 * target.h: #include <sys/types.h>.
3754
06e03fff
PA
37552015-11-19 Pedro Alves <palves@redhat.com>
3756
3757 * linux-low.c (linux_process_qsupported): Change prototype.
3758 Adjust.
3759 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3760 Change prototype.
3761 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3762 and adjust to loop over all features.
3763 * server.c (handle_query) <qSupported>: Adjust to call
3764 target_process_qsupported once, passing it a vector of unprocessed
3765 features.
3766 * target.h (struct target_ops) <process_qsupported>: Change
3767 prototype.
3768 (target_process_qsupported): Adjust.
3769
9a084706
PA
37702015-11-19 Pedro Alves <palves@redhat.com>
3771
3772 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3773 mode.
3774 * configure: Regenerate.
3775
dad44a1f
PA
37762015-11-19 Pedro Alves <palves@redhat.com>
3777
3778 * configure: Regenerate.
3779
231c0592
YQ
37802015-11-19 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3783 type to uint32_t.
3784
6c1c9a8b
YQ
37852015-11-19 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3788 (struct aarch64_operand): Move enum out.
3789
9caa3311
YQ
37902015-11-19 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3793 struct user_fpsimd_state *.
3794 (aarch64_store_fpregset): Likewise.
3795
6a69a054
YQ
37962015-11-19 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3799 struct user_pt_regs *.
3800 (aarch64_store_gregset): Likewise.
3801
1798301e
PA
38022015-11-18 Pedro Alves <palves@redhat.com>
3803
3804 * Makefile.in (all_object_files): Add $IPA_OBJS.
3805
ce7715e2
PA
38062015-11-17 Pedro Alves <palves@redhat.com>
3807
3808 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3809 GDB_SIGNAL_0 and gdb_signal_to_string.
3810
c0879059
PA
38112015-11-17 Pedro Alves <palves@redhat.com>
3812
3813 * win32-low.c (handle_output_debug_string): Remove parameter.
3814 (win32_kill): Remove our_status local and adjust call to
3815 handle_output_debug_string.
3816 (get_child_debug_event): Adjust call to
3817 handle_output_debug_string.
3818
1996e237
SM
38192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * linux-mips-low.c (mips_fill_gregset): Add cast.
3822 (mips_store_gregset): Likewise.
3823 (mips_fill_fpregset): Likewise.
3824 (mips_store_fpregset): Likewise.
3825
cbec665b
SM
38262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3827
3828 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3829 priv.
3830
eb3e3c67
SM
38312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3832
3833 * linux-mips-low.c (mips_linux_new_thread): Change type of
3834 watch_type to enum target_hw_bp_type.
3835
171de4b8
SM
38362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3837
3838 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3839 Change return type to arm_hwbp_type.
3840
04248ead
SM
38412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3842
3843 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3844 (arm_store_gregset): Likewise.
3845 * linux-arm-low.c (arm_get_hwcap): Likewise.
3846 (arm_read_description): Likewise.
3847
04b3479c
SM
38482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3849
3850 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3851
2bc84e8a
SM
38522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3853
3854 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3855 (ppc_fill_vsxregset): Likewise.
3856 (ppc_store_vsxregset): Likewise.
3857 (ppc_fill_vrregset): Likewise.
3858 (ppc_store_vrregset): Likewise.
3859 (ppc_fill_evrregset): Likewise.
3860 (ppc_store_evrregset): Likewise.
3861
e6c5bb05
SM
38622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3863
3864 * linux-ppc-low.c (ppc_usrregs_info): Remove
3865 forward-declaration.
3866 (ppc_arch_setup): Move lower in file.
3867
7ea45d72
SM
38682015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3869
3870 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3871 (ps_pdwrite): Likewise.
3872
69291610
HW
38732015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3874
3875 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3876 to after assert checks.
3877
b42945fd
SM
38782015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3879
3880 * proc-service.c (ps_pdread): Add/adjust casts.
3881 (ps_pdwrite): Add/adjust casts.
3882
d6f85c84
SM
38832015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3884
3885 * server.c (handle_search_memory_1): Cast return value of
3886 memmem.
3887
f98cd059
SM
38882015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3889
3890 * server.c (write_qxfer_response): Change type of data to
3891 gdb_byte *.
3892
d2412fa5
PA
38932015-10-29 Pedro Alves <palves@redhat.com>
3894
3895 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3896
c17414a2
PA
38972015-10-29 Pedro Alves <palves@redhat.com>
3898
3899 * tracepoint.c (clear_installed_tracepoints): Add casts.
3900
e053fbc4
PA
39012015-10-29 Pedro Alves <palves@redhat.com>
3902
3903 * server.c (handle_v_cont, process_serial_event): Add enum
3904 gdb_signal casts to signal parsing code.
3905
add67df8
PA
39062015-10-29 Pedro Alves <palves@redhat.com>
3907
3908 * linux-low.h (NULL_REGSET): Define.
3909 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3910 * linux-arm-low.c (arm_regsets): Likewise.
3911 * linux-crisv32-low.c (cris_regsets): Likewise.
3912 * linux-m68k-low.c (m68k_regsets): Likewise.
3913 * linux-mips-low.c (mips_regsets): Likewise.
3914 * linux-nios2-low.c (nios2_regsets): Likewise.
3915 * linux-ppc-low.c (ppc_regsets): Likewise.
3916 * linux-s390-low.c (s390_regsets): Likewise.
3917 * linux-sh-low.c (sh_regsets): Likewise.
3918 * linux-sparc-low.c (sparc_regsets): Likewise.
3919 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3920 * linux-tile-low.c (tile_regsets): Likewise.
3921 * linux-x86-low.c (x86_regsets): Likewise.
3922 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3923
50bc912a
PA
39242015-10-29 Pedro Alves <palves@redhat.com>
3925
3926 * linux-low.h (NULL_REGSET): Define.
3927 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3928 * linux-arm-low.c (arm_regsets): Likewise.
3929 * linux-crisv32-low.c (cris_regsets): Likewise.
3930 * linux-m68k-low.c (m68k_regsets): Likewise.
3931 * linux-mips-low.c (mips_regsets): Likewise.
3932 * linux-nios2-low.c (nios2_regsets): Likewise.
3933 * linux-ppc-low.c (ppc_regsets): Likewise.
3934 * linux-s390-low.c (s390_regsets): Likewise.
3935 * linux-sh-low.c (sh_regsets): Likewise.
3936 * linux-sparc-low.c (sparc_regsets): Likewise.
3937 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3938 * linux-tile-low.c (tile_regsets): Likewise.
3939 * linux-x86-low.c (x86_regsets): Likewise.
3940 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3941
682b2546
DE
39422015-10-26 Doug Evans <dje@google.com>
3943
3944 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3945
963843d4
DE
39462015-10-26 Doug Evans <dje@google.com>
3947
3948 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3949
d41401ac
DE
39502015-10-26 Doug Evans <dje@google.com>
3951
3952 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3953 for debug_printf.
3954 (attach_thread, find_new_threads_callback): Ditto.
3955
3db28855
AT
39562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3957
3958 * mem-break.h (set_breakpoint_data): Remove.
3959
fb78e89c
AT
39602015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3961
3962 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3963 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3964 (initialize_low): Remove set_breakpoint_data call.
3965 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3966 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3967 (initialize_low): Remove set_breakpoint_data call.
3968 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3969 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3970 (initialize_low): Remove set_breakpoint_data call.
3971
2e6ee069
AT
39722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3973
3974 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3975 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3976 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3977 * target.h (target_breakpoint_kind_from_pc): New macro.
3978
1652a986
AT
39792015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3980
3981 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3982 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3983 the default breakpoint kind.
3984
abeead09
AT
39852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3986
3987 * linux-arm-low.c (arm_supports_z_point_type): Add software
3988 breakpoint support.
3989
b0b4b501
AT
39902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991
3992 * linux-arm-low.c: Refactor breakpoint definitions.
3993 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3994 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3995
8689682c
AT
39962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3997
3998 * Makefile.in: Add arm.c/o.
3999 * configure.srv: Likewise.
4000 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4001 (arm_breakpoint_kind_from_pc): New function.
4002 (arm_sw_breakpoint_from_kind): Return proper kind.
4003 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4004
27165294
AT
40052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4006
4007 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4008 removal.
4009 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4010 (struct raw_breakpoint) <size>: Remove.
4011 (struct raw_breakpoint) <kind>: Add.
4012 (bp_size): New function.
4013 (bp_opcode): Likewise.
4014 (find_raw_breakpoint_at): Adjust for kind.
4015 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4016 (remove_memory_breakpoint): Adjust for kind call bp_size.
4017 (set_raw_breakpoint_at): Adjust for kind.
4018 (set_breakpoint): Likewise.
4019 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4020 (delete_raw_breakpoint): Adjust for kind.
4021 (delete_breakpoint): Likewise.
4022 (find_gdb_breakpoint): Likewise.
4023 (set_gdb_breakpoint_1): Likewise.
4024 (set_gdb_breakpoint): Likewise.
4025 (delete_gdb_breakpoint_1): Likewise.
4026 (delete_gdb_breakpoint): Likewise.
4027 (uninsert_raw_breakpoint): Likewise.
4028 (reinsert_raw_breakpoint): Likewise.
4029 (set_breakpoint_data): Remove.
4030 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4031 (check_mem_read): Adjust for kind call bp_size.
4032 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4033 (clone_one_breakpoint): Adjust for kind.
4034 * mem-break.h (set_gdb_breakpoint): Likewise.
4035 (delete_gdb_breakpoint): Likewise.
4036 * server.c (process_serial_event): Likewise.
4037
dd373349
AT
40382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4039
4040 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4041 (struct linux_target_ops) <breakpoint>: Remove.
4042 (struct linux_target_ops) <breakpoint_len>: Remove.
4043 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4044 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4045 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4046 (arm_sw_breakpoint_from_kind): New function.
4047 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4048 (struct linux_target_ops) <breakpoint>: Remove.
4049 (struct linux_target_ops) <breakpoint_len>: Remove.
4050 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4051 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4052 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4053 (struct linux_target_ops) <breakpoint>: Remove.
4054 (struct linux_target_ops) <breakpoint_len>: Remove.
4055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4056 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4057 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4058 (struct linux_target_ops) <breakpoint>: Remove.
4059 (struct linux_target_ops) <breakpoint_len>: Remove.
4060 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4062 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4063 and sw_breakpoint_from_kind to increment the pc.
4064 (linux_breakpoint_kind_from_pc): New function.
4065 (linux_sw_breakpoint_from_kind): New function.
4066 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4067 (initialize_low): Call breakpoint_kind_from_pc and
4068 sw_breakpoint_from_kind to replace breakpoint_data/len.
4069 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4070 New field.
4071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4072 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4073 (struct linux_target_ops) <breakpoint>: Remove.
4074 (struct linux_target_ops) <breakpoint_len>: Remove.
4075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4077 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4078 (struct linux_target_ops) <breakpoint>: Remove.
4079 (struct linux_target_ops) <breakpoint_len>: Remove.
4080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4082 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4083 (struct linux_target_ops) <breakpoint>: Remove.
4084 (struct linux_target_ops) <breakpoint_len>: Remove.
4085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4087 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4088 (struct linux_target_ops) <breakpoint>: Remove.
4089 (struct linux_target_ops) <breakpoint_len>: Remove.
4090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4092 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4093 (struct linux_target_ops) <breakpoint>: Remove.
4094 (struct linux_target_ops) <breakpoint_len>: Remove.
4095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4097 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4098 (struct linux_target_ops) <breakpoint>: Remove.
4099 (struct linux_target_ops) <breakpoint_len>: Remove.
4100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4102 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4103 (struct linux_target_ops) <breakpoint>: Remove.
4104 (struct linux_target_ops) <breakpoint_len>: Remove.
4105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4107 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4108 (struct linux_target_ops) <breakpoint>: Remove.
4109 (struct linux_target_ops) <breakpoint_len>: Remove.
4110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4112 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4113 (struct linux_target_ops) <breakpoint>: Remove.
4114 (struct linux_target_ops) <breakpoint_len>: Remove.
4115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4117 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4118 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4119 (struct linux_target_ops) <breakpoint>: Remove.
4120 (struct linux_target_ops) <breakpoint_len>: Remove.
4121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4123 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4124 (struct linux_target_ops) <breakpoint>: Remove.
4125 (struct linux_target_ops) <breakpoint_len>: Remove.
4126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4128
4cd98a19
AT
41292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4130
4131 * linux-cris-low.c (cris_get_pc): Remove void arg.
4132
774ee6d2
AR
41332015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4134
4135 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4136 variable name.
4137
833dcd29
AR
41382015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4139
4140 * inferiors.c (thread_pid_matches_callback): New function.
4141 (find_thread_process): New function.
4142 (remove_thread): Reset current_thread.
4143 (remove_process): Assert threads have been removed first.
4144
8d689ee5
YQ
41452015-10-15 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4148 if it is 3.
4149 (aarch64_remove_point): Likewise.
4150 * regcache.c (regcache_register_size): New function.
4151
1c2e1515
YQ
41522015-10-12 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-aarch64-low.c: Update all callers as emit_load_store
4155 is renamed to aarch64_emit_load_store.
4156
e1c587c3
YQ
41572015-10-12 Yao Qi <yao.qi@linaro.org>
4158
4159 * linux-aarch64-low.c: Update all callers of function renaming
4160 from emit_insn to aarch64_emit_insn.
4161
b6542f81
YQ
41622015-10-12 Yao Qi <yao.qi@linaro.org>
4163
4164 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4165 arch/aarch64-insn.h.
4166 (struct aarch64_memory_operand): Likewise.
4167 (ENCODE): Likewise.
4168 (emit_insn): Move to arch/aarch64-insn.c.
4169 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4170 (emit_load_store): Move to arch/aarch64-insn.c.
4171 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4172 (can_encode_int32): Remove.
4173
246994ce
YQ
41742015-10-12 Yao Qi <yao.qi@linaro.org>
4175
4176 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4177 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4178 (aarch64_relocate_instruction): Likewise.
4179 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4180 (struct aarch64_insn_visitor): Likewise.
4181
0badd99f
YQ
41822015-10-12 Yao Qi <yao.qi@linaro.org>
4183
4184 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4185 (struct aarch64_insn_visitor): New.
4186 (struct aarch64_insn_relocation_data): New.
4187 (aarch64_ftrace_insn_reloc_b): New function.
4188 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4189 (aarch64_ftrace_insn_reloc_cb): Likewise.
4190 (aarch64_ftrace_insn_reloc_tb): Likewise.
4191 (aarch64_ftrace_insn_reloc_adr): Likewise.
4192 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4193 (aarch64_ftrace_insn_reloc_others): Likewise.
4194 (visitor): New.
4195 (aarch64_relocate_instruction): Use visitor.
4196
dfaffe9d
YQ
41972015-10-12 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4200 int. Add argument buf.
4201 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4202 aarch64_relocate_instruction.
4203
70b439f0
YQ
42042015-10-12 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4207 argument insn. Remove local variable insn. Don't call
4208 target_read_uint32.
4209 (aarch64_install_fast_tracepoint_jump_pad): Call
4210 target_read_uint32.
4211
7781c06f
YQ
42122015-09-30 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4215 (emit_load_store_pair): Likewise.
4216
9a3c8263
SM
42172015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4218
4219 * dll.c (match_dll): Add cast(s).
4220 (unloaded_dll): Likewise.
4221 * linux-low.c (second_thread_of_pid_p): Likewise.
4222 (delete_lwp_callback): Likewise.
4223 (count_events_callback): Likewise.
4224 (select_event_lwp_callback): Likewise.
4225 (linux_set_resume_request): Likewise.
4226 * server.c (accumulate_file_name_length): Likewise.
4227 (emit_dll_description): Likewise.
4228 (handle_qxfer_threads_worker): Likewise.
4229 (visit_actioned_threads): Likewise.
4230 * thread-db.c (any_thread_of): Likewise.
4231 * tracepoint.c (same_process_p): Likewise.
4232 (match_blocktype): Likewise.
4233 (build_traceframe_info_xml): Likewise.
4234
224c3ddb
SM
42352015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4236
4237 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4238 assignment.
4239 (gdb_unparse_agent_expr): Likewise.
4240 * hostio.c (require_data): Likewise.
4241 (handle_pread): Likewise.
4242 * linux-low.c (disable_regset): Likewise.
4243 (fetch_register): Likewise.
4244 (store_register): Likewise.
4245 (get_dynamic): Likewise.
4246 (linux_qxfer_libraries_svr4): Likewise.
4247 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4248 (set_fast_tracepoint_jump): Likewise.
4249 (uninsert_fast_tracepoint_jumps_at): Likewise.
4250 (reinsert_fast_tracepoint_jumps_at): Likewise.
4251 (validate_inserted_breakpoint): Likewise.
4252 (clone_agent_expr): Likewise.
4253 * regcache.c (init_register_cache): Likewise.
4254 * remote-utils.c (putpkt_binary_1): Likewise.
4255 (decode_M_packet): Likewise.
4256 (decode_X_packet): Likewise.
4257 (look_up_one_symbol): Likewise.
4258 (relocate_instruction): Likewise.
4259 (monitor_output): Likewise.
4260 * server.c (handle_search_memory): Likewise.
4261 (handle_qxfer_exec_file): Likewise.
4262 (handle_qxfer_libraries): Likewise.
4263 (handle_qxfer): Likewise.
4264 (handle_query): Likewise.
4265 (handle_v_cont): Likewise.
4266 (handle_v_run): Likewise.
4267 (captured_main): Likewise.
4268 * target.c (write_inferior_memory): Likewise.
4269 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4270 * tracepoint.c (init_trace_buffer): Likewise.
4271 (add_tracepoint_action): Likewise.
4272 (add_traceframe): Likewise.
4273 (add_traceframe_block): Likewise.
4274 (cmd_qtdpsrc): Likewise.
4275 (cmd_qtdv): Likewise.
4276 (cmd_qtstatus): Likewise.
4277 (response_source): Likewise.
4278 (response_tsv): Likewise.
4279 (cmd_qtnotes): Likewise.
4280 (gdb_collect): Likewise.
4281 (initialize_tracepoint): Likewise.
4282
afbe19f8
PL
42832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4284
4285 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4286 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4287 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4288 <NOP>: New.
4289 (enum aarch64_condition_codes): New enum.
4290 (w0): New static global.
4291 (fp): Likewise.
4292 (lr): Likewise.
4293 (struct aarch64_memory_operand) <type>: New
4294 MEMORY_OPERAND_POSTINDEX type.
4295 (postindex_memory_operand): New helper function.
4296 (emit_ret): New function.
4297 (emit_load_store_pair): New function, factored out of emit_stp
4298 with support for MEMORY_OPERAND_POSTINDEX.
4299 (emit_stp): Rewrite using emit_load_store_pair.
4300 (emit_ldp): New function.
4301 (emit_load_store): Likewise.
4302 (emit_ldr): Mention post-index instruction in comment.
4303 (emit_ldrh): New function.
4304 (emit_ldrb): New function.
4305 (emit_ldrsw): Mention post-index instruction in comment.
4306 (emit_str): Likewise.
4307 (emit_subs): New function.
4308 (emit_cmp): Likewise.
4309 (emit_and): Likewise.
4310 (emit_orr): Likewise.
4311 (emit_orn): Likewise.
4312 (emit_eor): Likewise.
4313 (emit_mvn): Likewise.
4314 (emit_lslv): Likewise.
4315 (emit_lsrv): Likewise.
4316 (emit_asrv): Likewise.
4317 (emit_mul): Likewise.
4318 (emit_sbfm): Likewise.
4319 (emit_sbfx): Likewise.
4320 (emit_ubfm): Likewise.
4321 (emit_ubfx): Likewise.
4322 (emit_csinc): Likewise.
4323 (emit_cset): Likewise.
4324 (emit_nop): Likewise.
4325 (emit_ops_insns): New helper function.
4326 (emit_pop): Likewise.
4327 (emit_push): Likewise.
4328 (aarch64_emit_prologue): New function.
4329 (aarch64_emit_epilogue): Likewise.
4330 (aarch64_emit_add): Likewise.
4331 (aarch64_emit_sub): Likewise.
4332 (aarch64_emit_mul): Likewise.
4333 (aarch64_emit_lsh): Likewise.
4334 (aarch64_emit_rsh_signed): Likewise.
4335 (aarch64_emit_rsh_unsigned): Likewise.
4336 (aarch64_emit_ext): Likewise.
4337 (aarch64_emit_log_not): Likewise.
4338 (aarch64_emit_bit_and): Likewise.
4339 (aarch64_emit_bit_or): Likewise.
4340 (aarch64_emit_bit_xor): Likewise.
4341 (aarch64_emit_bit_not): Likewise.
4342 (aarch64_emit_equal): Likewise.
4343 (aarch64_emit_less_signed): Likewise.
4344 (aarch64_emit_less_unsigned): Likewise.
4345 (aarch64_emit_ref): Likewise.
4346 (aarch64_emit_if_goto): Likewise.
4347 (aarch64_emit_goto): Likewise.
4348 (aarch64_write_goto_address): Likewise.
4349 (aarch64_emit_const): Likewise.
4350 (aarch64_emit_call): Likewise.
4351 (aarch64_emit_reg): Likewise.
4352 (aarch64_emit_pop): Likewise.
4353 (aarch64_emit_stack_flush): Likewise.
4354 (aarch64_emit_zero_ext): Likewise.
4355 (aarch64_emit_swap): Likewise.
4356 (aarch64_emit_stack_adjust): Likewise.
4357 (aarch64_emit_int_call_1): Likewise.
4358 (aarch64_emit_void_call_2): Likewise.
4359 (aarch64_emit_eq_goto): Likewise.
4360 (aarch64_emit_ne_goto): Likewise.
4361 (aarch64_emit_lt_goto): Likewise.
4362 (aarch64_emit_le_goto): Likewise.
4363 (aarch64_emit_gt_goto): Likewise.
4364 (aarch64_emit_ge_got): Likewise.
4365 (aarch64_emit_ops_impl): New static global variable.
4366 (aarch64_emit_ops): New target function, return
4367 &aarch64_emit_ops_impl.
4368 (struct linux_target_ops): Install it.
4369
bb903df0
PL
43702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4371
4372 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4373 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4374 aarch64-ipa.o.
4375 * linux-aarch64-ipa.c: New file.
4376 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4377 and endian.h.
4378 (aarch64_get_thread_area): New target method.
4379 (extract_signed_bitfield): New helper function.
4380 (aarch64_decode_ldr_literal): New function.
4381 (enum aarch64_opcodes): New enum.
4382 (struct aarch64_register): New struct.
4383 (struct aarch64_operand): New struct.
4384 (x0): New static global.
4385 (x1): Likewise.
4386 (x2): Likewise.
4387 (x3): Likewise.
4388 (x4): Likewise.
4389 (w2): Likewise.
4390 (ip0): Likewise.
4391 (sp): Likewise.
4392 (xzr): Likewise.
4393 (aarch64_register): New helper function.
4394 (register_operand): Likewise.
4395 (immediate_operand): Likewise.
4396 (struct aarch64_memory_operand): New struct.
4397 (offset_memory_operand): New helper function.
4398 (preindex_memory_operand): Likewise.
4399 (enum aarch64_system_control_registers): New enum.
4400 (ENCODE): New macro.
4401 (emit_insn): New helper function.
4402 (emit_b): New function.
4403 (emit_bcond): Likewise.
4404 (emit_cb): Likewise.
4405 (emit_tb): Likewise.
4406 (emit_blr): Likewise.
4407 (emit_stp): Likewise.
4408 (emit_ldp_q_offset): Likewise.
4409 (emit_stp_q_offset): Likewise.
4410 (emit_load_store): Likewise.
4411 (emit_ldr): Likewise.
4412 (emit_ldrsw): Likewise.
4413 (emit_str): Likewise.
4414 (emit_ldaxr): Likewise.
4415 (emit_stxr): Likewise.
4416 (emit_stlr): Likewise.
4417 (emit_data_processing_reg): Likewise.
4418 (emit_data_processing): Likewise.
4419 (emit_add): Likewise.
4420 (emit_sub): Likewise.
4421 (emit_mov): Likewise.
4422 (emit_movk): Likewise.
4423 (emit_mov_addr): Likewise.
4424 (emit_mrs): Likewise.
4425 (emit_msr): Likewise.
4426 (emit_sevl): Likewise.
4427 (emit_wfe): Likewise.
4428 (append_insns): Likewise.
4429 (can_encode_int32_in): New helper function.
4430 (aarch64_relocate_instruction): New function.
4431 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4432 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4433 (struct linux_target_ops): Install aarch64_get_thread_area,
4434 aarch64_install_fast_tracepoint_jump_pad and
4435 aarch64_get_min_fast_tracepoint_insn_len.
4436
787749ea
PL
44372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4438
4439 * Makefile.in (aarch64-insn.o): New rule.
4440 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4441
9812b2e6
YQ
44422015-09-21 Yao Qi <yao.qi@linaro.org>
4443
4444 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4445
18fe412b
YQ
44462015-09-21 Yao Qi <yao.qi@linaro.org>
4447
4448 * tracepoint.c (max_jump_pad_size): Remove.
4449
a0cc84cd
YQ
44502015-09-18 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-aarch64-low.c: Don't include sys/uio.h.
4453 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4454
d78908cf
WW
44552015-09-16 Wei-cheng Wang <cole945@gmail.com>
4456
4457 * tracepoint.c (eval_result_type): Change prototype.
4458 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4459
d57e0d50
PA
44602015-09-15 Pedro Alves <palves@redhat.com>
4461
4462 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4463 Check whether to report exec events instead of checking whether
4464 multiprocess is enabled.
4465
5a676acc
PA
44662015-09-15 Pedro Alves <palves@redhat.com>
4467
4468 PR remote/18965
4469 * remote-utils.c (prepare_resume_reply): Merge
4470 TARGET_WAITKIND_VFORK_DONE switch case with the
4471 TARGET_WAITKIND_FORKED case.
4472
7c5d0fad
YQ
44732015-09-15 Yao Qi <yao.qi@linaro.org>
4474
4475 * server.c (handle_query): Check string comparison using
4476 "else if" instead of "if".
4477
750ce8d1
YQ
44782015-09-15 Yao Qi <yao.qi@linaro.org>
4479
4480 * server.c (vCont_supported): New global variable.
4481 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4482 matches. Append ";vContSupported+" to own_buf.
4483 (handle_v_requests): Append ";s;S" to own_buf if target supports
4484 hardware single step or vCont_supported is false.
4485 (capture_main): Set vCont_supported to zero.
4486
70b90b91
YQ
44872015-09-15 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4490 it to ...
4491 (linux_supports_hardware_single_step): ... New function.
4492 (linux_target_ops): Update.
4493 * lynx-low.c (lynx_target_ops): Set field
4494 supports_hardware_single_step to target_can_do_hardware_single_step.
4495 * nto-low.c (nto_target_ops): Likewise.
4496 * spu-low.c (spu_target_ops): Likewise.
4497 * win32-low.c (win32_target_ops): Likewise.
4498 * target.c (target_can_do_hardware_single_step): New function.
4499 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4500 Remove. <supports_hardware_single_step>: New field.
4501 (target_supports_conditional_breakpoints): Remove.
4502 (target_supports_hardware_single_step): New macro.
4503 (target_can_do_hardware_single_step): Declare.
4504 * server.c (handle_query): Use target_supports_hardware_single_step
4505 instead of target_supports_conditional_breakpoints.
4506
ade90bde
YQ
45072015-09-15 Yao Qi <yao.qi@linaro.org>
4508
4509 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4510 function.
4511 (struct linux_target_ops the_low_target): Install
4512 aarch64_linux_siginfo_fixup.
4513
94585166
DB
45142015-09-11 Don Breazeal <donb@codesourcery.com>
4515 Luis Machado <lgustavo@codesourcery.com>
4516
4517 * linux-low.c (linux_mourn): Static declaration.
4518 (linux_arch_setup): Move in front of
4519 handle_extended_wait.
4520 (linux_arch_setup_thread): New function.
4521 (handle_extended_wait): Handle exec events. Call
4522 linux_arch_setup_thread. Make event_lwp argument a
4523 pointer-to-a-pointer.
4524 (check_zombie_leaders): Do not check stopped threads.
4525 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4526 (linux_low_filter_event): Add lwp and thread for exec'ing
4527 non-leader thread if leader thread has been deleted.
4528 Refactor code into linux_arch_setup_thread and call it.
4529 Pass child lwp pointer by reference to handle_extended_wait.
4530 (linux_wait_for_event_filtered): Update comment.
4531 (linux_wait_1): Prevent clobbering exec event status.
4532 (linux_supports_exec_events): New function.
4533 (linux_target_ops) <supports_exec_events>: Initialize new member.
4534 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4535 new member.
4536 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4537 * server.c (report_exec_events): New global variable.
4538 (handle_query): Handle qSupported query for exec-events feature.
4539 (captured_main): Initialize report_exec_events.
4540 * server.h (report_exec_events): Declare new global variable.
4541 * target.h (struct target_ops) <supports_exec_events>: New
4542 member.
4543 (target_supports_exec_events): New macro.
4544 * win32-low.c (win32_target_ops) <supports_exec_events>:
4545 Initialize new member.
4546
0568462b
MM
45472015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4548
4549 * linux-low.c (linux_low_enable_btrace): Remove.
4550 (linux_target_ops): Replace linux_low_enable_btrace with
4551 linux_enable_btrace.
4552
39edd165
YQ
45532015-09-03 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch64-low.c (aarch64_insert_point): Call
4556 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4557 returns true.
4558
1db33b5a
UW
45592015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4560
4561 * linux-low.c (check_stopped_by_breakpoint): Use
4562 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4563
ab290430
PA
45642015-08-27 Pedro Alves <palves@redhat.com>
4565
4566 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4567
8d749320
SM
45682015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4569
6711b7f8
SM
4570 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4571 the XNEW-family equivalent.
8d749320
SM
4572 (compile_bytecodes): Likewise.
4573 * dll.c (loaded_dll): Likewise.
4574 * event-loop.c (append_callback_event): Likewise.
4575 (create_file_handler): Likewise.
4576 (create_file_event): Likewise.
4577 * hostio.c (handle_open): Likewise.
4578 * inferiors.c (add_thread): Likewise.
4579 (add_process): Likewise.
4580 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4581 * linux-arm-low.c (arm_new_process): Likewise.
4582 (arm_new_thread): Likewise.
4583 * linux-low.c (add_to_pid_list): Likewise.
4584 (linux_add_process): Likewise.
4585 (handle_extended_wait): Likewise.
4586 (add_lwp): Likewise.
4587 (enqueue_one_deferred_signal): Likewise.
4588 (enqueue_pending_signal): Likewise.
4589 (linux_resume_one_lwp_throw): Likewise.
4590 (linux_resume_one_thread): Likewise.
4591 (linux_read_memory): Likewise.
4592 (linux_write_memory): Likewise.
4593 * linux-mips-low.c (mips_linux_new_process): Likewise.
4594 (mips_linux_new_thread): Likewise.
4595 (mips_add_watchpoint): Likewise.
4596 * linux-x86-low.c (initialize_low_arch): Likewise.
4597 * lynx-low.c (lynx_add_process): Likewise.
4598 * mem-break.c (set_raw_breakpoint_at): Likewise.
4599 (set_breakpoint): Likewise.
4600 (add_condition_to_breakpoint): Likewise.
4601 (add_commands_to_breakpoint): Likewise.
4602 (clone_agent_expr): Likewise.
4603 (clone_one_breakpoint): Likewise.
4604 * regcache.c (new_register_cache): Likewise.
4605 * remote-utils.c (look_up_one_symbol): Likewise.
4606 * server.c (queue_stop_reply): Likewise.
4607 (start_inferior): Likewise.
4608 (queue_stop_reply_callback): Likewise.
4609 (handle_target_event): Likewise.
4610 * spu-low.c (fetch_ppc_memory): Likewise.
4611 (store_ppc_memory): Likewise.
4612 * target.c (set_target_ops): Likewise.
4613 * thread-db.c (thread_db_load_search): Likewise.
4614 (try_thread_db_load_1): Likewise.
4615 * tracepoint.c (add_tracepoint): Likewise.
4616 (add_tracepoint_action): Likewise.
4617 (create_trace_state_variable): Likewise.
4618 (cmd_qtdpsrc): Likewise.
4619 (cmd_qtro): Likewise.
4620 (add_while_stepping_state): Likewise.
4621 * win32-low.c (child_add_thread): Likewise.
4622 (get_image_name): Likewise.
4623
ed8b7b42
YQ
46242015-08-25 Yao Qi <yao.qi@linaro.org>
4625
4626 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4627
db3cb7cb
YQ
46282015-08-25 Yao Qi <yao.qi@linaro.org>
4629
4630 * Makefile.in (aarch64-linux.o): New rule.
4631 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4632 srv_tgtobj.
4633 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4634 (aarch64_init_debug_reg_state): Make it extern.
4635 (aarch64_linux_prepare_to_resume): Remove.
4636
f6011a1c
YQ
46372015-08-25 Yao Qi <yao.qi@linaro.org>
4638
4639 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4640 lwp_arch_private_info and ptid_of_lwp.
4641
88e2cf7e
YQ
46422015-08-25 Yao Qi <yao.qi@linaro.org>
4643
4644 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4645 Find proc_info by find_process_pid. All callers updated.
4646
5e35436e
YQ
46472015-08-25 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4650 Remove.
4651 (debug_reg_change_callback): Remove.
4652 (aarch64_notify_debug_reg_change): Remove.
4653
4a8a7965
YQ
46542015-08-25 Yao Qi <yao.qi@linaro.org>
4655
4656 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4657 Call current_lwp_ptid.
4658
32a271ee
YQ
46592015-08-25 Yao Qi <yao.qi@linaro.org>
4660
4661 * linux-aarch64-low.c (debug_reg_change_callback): Use
4662 debug_printf.
4663
0d51c8d7
YQ
46642015-08-25 Yao Qi <yao.qi@linaro.org>
4665
4666 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4667
31a43dd5
YQ
46682015-08-25 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4671
8ee52567
YQ
46722015-08-25 Yao Qi <yao.qi@linaro.org>
4673
4674 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4675 the code.
4676
ff3f0f45
YQ
46772015-08-25 Yao Qi <yao.qi@linaro.org>
4678
4679 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4680 Remove.
4681 (debug_reg_change_callback): Remove argument entry and add argument
4682 lwp. Remove local variable thread. Don't print thread id in the
4683 debugging output. Don't check whether pid of thread equals to pid.
4684 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4685 iterate_over_lwps instead find_inferior.
4686
3d40fbb5
PA
46872015-08-24 Pedro Alves <palves@redhat.com>
4688
4689 * inferiors.c (get_first_process): New function.
4690 * inferiors.h (get_first_process): New declaration.
4691 * remote-utils.c (read_ptid): Default to the first process in the
4692 list, instead of to the current thread's process.
4693
438e1e42
PA
46942015-08-24 Pedro Alves <palves@redhat.com>
4695
4696 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4697 * event-loop.c: Likewise.
4698 * remote-utils.c: Likewise.
4699 * tracepoint.c: Likewise.
4700
a8c6d4fc
PA
47012015-08-24 Pedro Alves <palves@redhat.com>
4702
4703 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4704 ptid_get_lwp.
4705
99b0bb12
PA
47062015-08-21 Pedro Alves <palves@redhat.com>
4707
4708 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4709 instead of literal 1.
4710
f8904751
PA
47112015-08-21 Pedro Alves <palves@redhat.com>
4712
4713 * tdesc.c (default_description): Explicitly zero-initialize.
4714
465a859e
PA
47152015-08-21 Pedro Alves <palves@redhat.com>
4716
4717 PR gdb/18749
4718 * inferiors.c (remove_thread): Discard any pending stop reply for
4719 this thread.
4720 * server.c (remove_all_on_match_pid): Rename to ...
4721 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4722 instead of a pid.
4723 (discard_queued_stop_replies): Change parameter to a ptid. Now
4724 extern.
4725 (handle_v_kill, kill_inferior_callback, captured_main)
4726 (process_serial_event): Adjust.
4727 * server.h (discard_queued_stop_replies): Declare.
4728
f0db101d
PA
47292015-08-21 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (wait_for_sigstop): Always switch to no thread
4732 selected if the previously current thread dies.
4733 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4734 process instead of the current thread's.
4735 * remote-utils.c (input_interrupt): Don't check if there's no
4736 current thread.
4737 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4738 current thread to the general thread fails, error out.
4739 (handle_qxfer_auxv, handle_qxfer_libraries)
4740 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4741 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4742 (handle_query): Check if there's a thread selected instead of
4743 checking whether there's any thread in the thread list.
4744 (handle_qxfer_threads, handle_qxfer_btrace)
4745 (handle_qxfer_btrace_conf): Don't error out early if there's no
4746 thread in the thread list.
4747 (handle_v_cont, myresume): Don't set the current thread to the
4748 continue thread.
4749 (process_serial_event) <Hg handling>: Also set thread_id if the
4750 previous general thread is still alive.
4751 (process_serial_event) <g/G handling>: If setting the current
4752 thread to the general thread fails, error out.
4753 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4754 thread's lwp instead of the current thread's.
4755 * target.c (set_desired_thread): If the desired thread was not
4756 found, leave the current thread pointing to NULL. Return an int
4757 (boolean) indicating success.
4758 * target.h (set_desired_thread): Change return type to int.
4759
40045d91
MF
47602015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4761
4762 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4763 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4764 #includes.
4765 (ps_get_thread_area): New function.
4766
45face3b
GB
47672015-08-19 Gary Benson <gbenson@redhat.com>
4768
4769 * hostio.c (handle_pread): Do not attempt to read more data
4770 than hostio_reply_with_data can fit in a packet.
4771
16d5f642
JB
47722015-08-18 Joel Brobecker <brobecker@adacore.com>
4773
4774 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4775
a738da3a
MF
47762015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4777
4778 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4779
33ebda9d
PA
47802015-08-06 Pedro Alves <palves@redhat.com>
4781
4782 * tracepoint.c (expr_eval_result): Now an int.
4783
a44892be
PA
47842015-08-06 Pedro Alves <palves@redhat.com>
4785
4786 * gdbthread.h (struct regcache): Forward declare.
4787 (struct thread_info) <regcache_data>: Now a struct regcache
4788 pointer.
4789 * inferiors.c (inferior_regcache_data)
4790 (set_inferior_regcache_data): Now work with struct regcache
4791 pointers.
4792 * inferiors.h (struct regcache): Forward declare.
4793 (inferior_regcache_data, set_inferior_regcache_data): Now work
4794 with struct regcache pointers.
4795 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4796 (free_register_cache_thread): Remove struct regcache pointer
4797 casts.
4798
608a1e46
PA
47992015-08-06 Pedro Alves <palves@redhat.com>
4800
4801 * server.c (captured_main): On error, print the exception message
4802 to stderr, and if run_once is set, throw a quit.
4803
f0ce0d3a
PA
48042015-08-06 Pedro Alves <palves@redhat.com>
4805
4806 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4807 the current thread.
4808
bf47e248
PA
48092015-08-06 Pedro Alves <palves@redhat.com>
4810
4811 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4812 reading beyond the passed in buffer length.
4813
b6b9ffcc
PL
48142015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4815
4816 * tracepoint.c (symbol_list) <required>: Remove.
4817
863d01bd
PA
48182015-08-06 Pedro Alves <palves@redhat.com>
4819
4820 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4821 count if stopping and suspending threads.
4822 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4823 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4824 (linux_detach): Complete an ongoing step-over.
4825 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4826 throughout.
4827 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4828 (linux_wait_1): If passing a signal to the inferior after
4829 finishing a step-over, unsuspend and re-resume all lwps. If we
4830 see a single-step event but the thread should be continuing, don't
4831 pass the trap to gdb.
4832 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4833 internal_error instead of gdb_assert.
4834 (enqueue_pending_signal): New function.
4835 (check_ptrace_stopped_lwp_gone): Add debug output.
4836 (start_step_over): Use internal_error instead of gdb_assert.
4837 (complete_ongoing_step_over): New function.
4838 (linux_resume_one_thread): Don't resume a suspended thread.
4839 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4840 it stepping.
4841
00db26fa
PA
48422015-08-06 Pedro Alves <palves@redhat.com>
4843
4844 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4845 (linux_thread_alive): Use lwp_is_marked_dead.
4846 (extended_event_reported): Delete.
4847 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4848 instead of extended_event_reported.
4849 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4850 as well.
4851 (lwp_is_marked_dead): New function.
4852 (lwp_running): Use lwp_is_marked_dead.
4853 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4854 comment.
4855
ad071a30
PA
48562015-08-06 Pedro Alves <palves@redhat.com>
4857
4858 * linux-low.c (linux_wait_1): Move fork event output out of the
4859 !report_to_gdb check. Pass event_child->waitstatus to
4860 target_waitstatus_to_string instead of ourstatus.
4861
524b57e6
YQ
48622015-08-04 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4865 if current_thread is 32 bit.
4866
6085d6f6
YQ
48672015-08-04 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4870 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4871 * server.c (extended_protocol): Remove "static".
4872 * server.h (extended_protocol): Declare it.
4873
8a7e4587
YQ
48742015-08-04 Yao Qi <yao.qi@linaro.org>
4875
4876 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4877 both aarch64 and aarch32.
4878 (aarch64_set_pc): Likewise.
4879
3b53ae99
YQ
48802015-08-04 Yao Qi <yao.qi@linaro.org>
4881
4882 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4883 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4884 arm-with-neon.xml to srv_xmlfiles.
4885 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4886 (is_64bit_tdesc): New function.
4887 (aarch64_linux_read_description): New function.
4888 (aarch64_arch_setup): Call aarch64_linux_read_description.
4889 (regs_info): Rename to regs_info_aarch64.
4890 (aarch64_regs_info): Return right regs_info.
4891 (initialize_low_arch): Call initialize_low_arch_aarch32.
4892
bd9e6534
YQ
48932015-08-04 Yao Qi <yao.qi@linaro.org>
4894
4895 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4896 * linux-aarch32-low.c: New file.
4897 * linux-aarch32-low.h: New file.
4898 * linux-arm-low.c (arm_fill_gregset): Move it to
4899 linux-aarch32-low.c.
4900 (arm_store_gregset): Likewise.
4901 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4902 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4903 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4904 (regs_info): Rename to regs_info_arm.
4905 (arm_regs_info): Return regs_info_aarch32 if
4906 have_ptrace_getregset is 1 and target description is
4907 arm_with_neon or arm_with_vfpv3.
4908 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4909 Call initialize_low_arch_aarch32 instead.
4910
ded48a5e
YQ
49112015-08-04 Yao Qi <yao.qi@linaro.org>
4912
4913 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4914 * linux-low.c: ... here.
4915 * linux-low.h (have_ptrace_getregset): Declare it.
4916
96e9210f
PA
49172015-08-04 Pedro Alves <palves@redhat.com>
4918
4919 * thread-db.c (struct thread_db): Use new typedefs.
4920 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4921 CHK calls.
4922 (disable_thread_event_reporting): Cast result of dlsym to
4923 destination function pointer type.
4924 (thread_db_mourn): Use td_ta_delete_ftype.
4925
af60a1ef
SL
49262015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4927
4928 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4929 arch variant.
4930 (CDX_BREAKPOINT): Define for R2.
4931 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4932 (the_low_target): Add comments.
4933
e8b41681
YQ
49342015-07-30 Yao Qi <yao.qi@linaro.org>
4935
4936 * linux-arm-low.c (arm_hwcap): Remove it.
4937 (arm_read_description): New local variable arm_hwcap. Don't
4938 set arm_hwcap to zero.
4939
89abb039
YQ
49402015-07-30 Yao Qi <yao.qi@linaro.org>
4941
4942 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4943 Use regcache->tdesc instead.
4944 (arm_store_wmmxregset): Likewise.
4945 (arm_fill_vfpregset): Likewise.
4946 (arm_store_vfpregset): Likewise.
4947
deca266c
YQ
49482015-07-30 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-arm-low.c: Include arch/arm.h.
4951 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4952 (arm_store_gregset): Likewise.
4953
aa58a496
SM
49542015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4955
4956 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4957 ptrace's 4th parameter.
4958
50904b25
YQ
49592015-07-27 Yao Qi <yao.qi@linaro.org>
4960
4961 * configure.srv (case aarch64*-*-linux*): Don't set
4962 srv_linux_usrregs.
4963
5826e159
PA
49642015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4965
4966 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4967 sys/ptrace.h.
4968 * linux-arm-low.c: Likewise.
4969 * linux-cris-low.c: Likewise.
4970 * linux-crisv32-low.c: Likewise.
4971 * linux-low.c: Likewise.
4972 * linux-m68k-low.c: Likewise.
4973 * linux-mips-low.c: Likewise.
4974 * linux-nios2-low.c: Likewise.
4975 * linux-s390-low.c: Likewise.
4976 * linux-sparc-low.c: Likewise.
4977 * linux-tic6x-low.c: Likewise.
4978 * linux-tile-low.c: Likewise.
4979 * linux-x86-low.c: Likewise.
4980
54019719
PA
49812015-07-24 Pedro Alves <palves@redhat.com>
4982
4983 * config.in: Regenerate.
4984 * configure: Regenerate.
4985
eb7aa561
PA
49862015-07-24 Pedro Alves <palves@redhat.com>
4987
4988 * acinclude.m4: Include ../ptrace.m4.
4989 * configure.ac: Call GDB_AC_PTRACE.
4990 * config.in, configure: Regenerate.
4991
55d7b841
YQ
49922015-07-24 Yao Qi <yao.qi@linaro.org>
4993
4994 * linux-low.c (linux_create_inferior): Remove setting to
4995 proc->priv->new_inferior.
4996 (linux_attach): Likewise.
4997 (linux_low_filter_event): Likewise.
4998 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4999
c06cbd92
YQ
50002015-07-24 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-low.c (linux_arch_setup): New function.
5003 (linux_low_filter_event): If proc->tdesc is NULL and
5004 proc->attached is true, call the_low_target.arch_setup.
5005 Otherwise, keep status pending, and return.
5006 (linux_resume_one_lwp_throw): Don't call get_pc if
5007 thread->while_stepping isn't NULL. Don't call
5008 get_thread_regcache if proc->tdesc is NULL.
5009 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5010 (linux_target_ops): Install arch_setup.
5011 * server.c (start_inferior): Call the_target->arch_setup.
5012 * target.h (struct target_ops) <arch_setup>: New field.
5013 (target_arch_setup): New marco.
5014 * lynx-low.c (lynx_target_ops): Update.
5015 * nto-low.c (nto_target_ops): Update.
5016 * spu-low.c (spu_target_ops): Update.
5017 * win32-low.c (win32_target_ops): Update.
5018
5ae3ebba
YQ
50192015-07-24 Yao Qi <yao.qi@linaro.org>
5020
5021 * linux-low.c (linux_add_process): Don't set
5022 proc->priv->new_inferior.
5023 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5024 (linux_attach): Likewise.
5025
eb97750b
YQ
50262015-07-24 Yao Qi <yao.qi@linaro.org>
5027
5028 * server.c (start_inferior): Code refactor.
5029
51aee833
YQ
50302015-07-24 Yao Qi <yao.qi@linaro.org>
5031
5032 * server.c (process_serial_event): Set general_thread.
5033
af1b22f3
YQ
50342015-07-21 Yao Qi <yao.qi@linaro.org>
5035
5036 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5037 aarch64_linux_get_debug_reg_capacity.
5038
554717a3
YQ
50392015-07-17 Yao Qi <yao.qi@linaro.org>
5040
5041 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5042 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5043 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5044 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5045 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5046 (AARCH64_HWP_ALIGNMENT): Likewise.
5047 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5048 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5049 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5050 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5051 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5052 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5053 (struct aarch64_debug_reg_state): Likewise.
5054 (struct arch_lwp_info): Likewise.
5055 (aarch64_align_watchpoint): Likewise.
5056 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5057 (aarch64_watchpoint_length): Likewise.
5058 (aarch64_point_encode_ctrl_reg): Likewise
5059 (aarch64_point_is_aligned): Likewise.
5060 (aarch64_align_watchpoint): Likewise.
5061 (aarch64_linux_set_debug_regs):
5062 (aarch64_dr_state_insert_one_point): Likewise.
5063 (aarch64_dr_state_remove_one_point): Likewise.
5064 (aarch64_handle_breakpoint): Likewise.
5065 (aarch64_handle_aligned_watchpoint): Likewise.
5066 (aarch64_handle_unaligned_watchpoint): Likewise.
5067 (aarch64_handle_watchpoint): Likewise.
5068
c67ca4de
YQ
50692015-07-17 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5072 and don't aarch64_get_debug_reg_state. All callers update.
5073 (aarch64_handle_aligned_watchpoint): Likewise.
5074 (aarch64_handle_unaligned_watchpoint): Likewise.
5075 (aarch64_handle_watchpoint): Likewise.
5076 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5077 (aarch64_remove_point): Likewise.
5078
25abf979
YQ
50792015-07-17 Yao Qi <yao.qi@linaro.org>
5080
5081 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5082 debug_printf.
5083 (aarch64_handle_unaligned_watchpoint): Likewise.
5084
db1ff28b
JK
50852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5086
5087 Revert the previous 3 commits:
5088 Move gdb_regex* to common/
5089 Move linux_find_memory_regions_full & co.
5090 gdbserver build-id attribute generator
5091
700ca40f
JK
50922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5093 Jan Kratochvil <jan.kratochvil@redhat.com>
5094
5095 gdbserver build-id attribute generator.
5096 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5097 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5098 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5099 (find_phdr): New.
5100 (get_dynamic): Use find_pdhr to traverse program headers.
5101 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5102 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5103 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5104 (get_hex_build_id): New.
5105 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5106 to reply XML document.
5107
9904185c
JK
51082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5109 Jan Kratochvil <jan.kratochvil@redhat.com>
5110
5111 * target.c: Include target/target-utils.h and fcntl.h.
5112 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5113 (target_fileio_read_stralloc): New functions.
5114
6e5b4429
JK
51152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5116
5117 * Makefile.in (OBS): Add gdb_regex.o.
5118 (gdb_regex.o): New.
5119 * config.in: Rebuilt.
5120 * configure: Rebuilt.
5121
ddc98fbf
JK
51222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5123 Jan Kratochvil <jan.kratochvil@redhat.com>
5124
5125 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5126 * Makefile.in (OBS): Add target-utils.o.
5127 (linux-maps.o, target-utils.o): New.
5128 * configure.srv (srv_linux_obj): Add linux-maps.o.
5129
e57bb7a0
PL
51302015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5131
5132 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5133 function, return 1.
5134 (the_low_target): Install it.
5135
586b02a9
PA
51362015-07-14 Pedro Alves <palves@redhat.com>
5137
5138 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5139 Instead, ignore ECHILD, and throw an error for other errnos.
5140
58c1b36c
PA
51412015-07-10 Pedro Alves <palves@redhat.com>
5142
5143 * event-loop.c (struct callback_event) <data>: Change type to
5144 gdb_client_data instance instead of gdb_client_data pointer.
5145 (append_callback_event): Adjust.
5146
421530db
PL
51472015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5148
5149 * linux-aarch64-low.c: Add comments for each linux_target_ops
5150 method. Remove comments already covered in target_ops and
5151 linux_target_ops definitions.
5152 (the_low_target): Add comments for each unimplemented method.
5153
c2d65f38
YQ
51542015-07-09 Yao Qi <yao.qi@linaro.org>
5155
5156 * linux-aarch64-low.c (aarch64_regmap): Remove.
5157 (aarch64_usrregs_info): Remove.
5158 (regs_info): Set field usrregs to NULL.
5159
b20a6524
MM
51602015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5161
5162 * linux-low.c: Include "rsp-low.h"
5163 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5164 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5165 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5166 (handle_btrace_enable_pt): New.
5167 (handle_btrace_general_set): Support "pt".
5168 (handle_btrace_conf_general_set): Support "pt:size".
5169
96c97461
PL
51702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5171
5172 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5173 Z_PACKET_SW_BP.
5174
37d66942
PL
51752015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5176
5177 * linux-aarch64-low.c: Remove comment about endianness.
5178 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5179 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5180 memcmp.
5181
dc06243f
GB
51822015-06-24 Gary Benson <gbenson@redhat.com>
5183
5184 * linux-i386-ipa.c (stdint.h): Do not include.
5185 * lynx-i386-low.c (stdint.h): Likewise.
5186 * lynx-ppc-low.c (stdint.h): Likewise.
5187 * mem-break.c (stdint.h): Likewise.
5188 * thread-db.c (stdint.h): Likewise.
5189 * tracepoint.c (stdint.h): Likewise.
5190 * win32-low.c (stdint.h): Likewise.
5191
124e13d9
SM
51922015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5193
5194 * server.c (write_qxfer_response): Update call to
5195 remote_escape_output.
5196
909c2cda
JK
51972015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5198 Jan Kratochvil <jan.kratochvil@redhat.com>
5199
5200 Merge multiple hex conversions.
5201 * gdbreplay.c (tohex): Rename to 'fromhex'.
5202 (logchar): Use fromhex.
5203
24c05f46
JK
52042015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5205
5206 * server.c (handle_qxfer_libraries): Set `version' attribute for
5207 <library-list>.
5208
14d2069a
GB
52092015-06-10 Gary Benson <gbenson@redhat.com>
5210
5211 * target.h (struct target_ops) <multifs_open>: New field.
5212 <multifs_unlink>: Likewise.
5213 <multifs_readlink>: Likewise.
5214 * linux-low.c (nat/linux-namespaces.h): New include.
5215 (linux_target_ops): Initialize the_target->multifs_open,
5216 the_target->multifs_unlink and the_target->multifs_readlink.
5217 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5218 * hostio.c (hostio_fs_pid): New static variable.
5219 (hostio_handle_new_gdb_connection): New function.
5220 (handle_setfs): Likewise.
5221 (handle_open): Use the_target->multifs_open as appropriate.
5222 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5223 (handle_readlink): Use the_target->multifs_readlink as
5224 appropriate.
5225 (handle_vFile): Handle vFile:setfs packets.
5226 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5227 after target_handle_new_gdb_connection.
5228
4b8b5e72
GB
52292015-06-10 Gary Benson <gbenson@redhat.com>
5230
5231 * configure.ac (AC_CHECK_FUNCS): Add setns.
5232 * config.in: Regenerate.
5233 * configure: Likewise.
5234 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5235 (linux-namespaces.o): New rule.
5236 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5237
3ac2e371
GB
52382015-06-09 Gary Benson <gbenson@redhat.com>
5239
5240 * hostio.c (handle_open): Process mode argument with
5241 fileio_to_host_mode.
5242
ca9b78ce
YQ
52432015-06-01 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5246 * linux-x86-low.c: Likewise.
5247
bfacd19d
DB
52482015-05-28 Don Breazeal <donb@codesourcery.com>
5249
5250 * linux-low.c (handle_extended_wait): Initialize
5251 thread_info.last_resume_kind for new fork children.
5252
452003ef
PA
52532015-05-15 Pedro Alves <palves@redhat.com>
5254
5255 * target.h (target_handle_new_gdb_connection): Rewrite using if
5256 wrapped in do/while.
5257
1041a03c
JB
52582015-05-14 Joel Brobecker <brobecker@adacore.com>
5259
5260 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5261 * configure, config.in: Regenerate.
5262 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5263 Declare typedef.
5264
c269dbdb
DB
52652015-05-12 Don Breazeal <donb@codesourcery.com>
5266
5267 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5268 PTRACE_EVENT_VFORK_DONE.
5269 (linux_low_ptrace_options, extended_event_reported): Add vfork
5270 events.
5271 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5272 and "vforkdone" for RSP 'T' Stop Reply Packet.
5273 * server.h (report_vfork_events): Declare
5274 global variable.
5275
3a8a0396
DB
52762015-05-12 Don Breazeal <donb@codesourcery.com>
5277
5278 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5279 (the_low_target) <new_fork>: Initialize new member.
5280 * linux-arm-low.c (arm_new_fork): New function.
5281 (the_low_target) <new_fork>: Initialize new member.
5282 * linux-low.c (handle_extended_wait): Call new target function
5283 new_fork.
5284 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5285 * linux-mips-low.c (mips_add_watchpoint): New function
5286 extracted from mips_insert_point.
5287 (the_low_target) <new_fork>: Initialize new member.
5288 (mips_linux_new_fork): New function.
5289 (mips_insert_point): Call mips_add_watchpoint.
5290 * linux-x86-low.c (x86_linux_new_fork): New function.
5291 (the_low_target) <new_fork>: Initialize new member.
5292
de0d863e
DB
52932015-05-12 Don Breazeal <donb@codesourcery.com>
5294
5295 * linux-low.c (handle_extended_wait): Implement return value,
5296 rename argument 'event_child' to 'event_lwp', handle
5297 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5298 (linux_low_ptrace_options): New function.
5299 (linux_low_filter_event): Call linux_low_ptrace_options,
5300 use different argument fo linux_enable_event_reporting,
5301 use return value from handle_extended_wait.
5302 (extended_event_reported): New function.
5303 (linux_wait_1): Call extended_event_reported and set
5304 status to report fork events.
5305 (linux_write_memory): Add pid to debug message.
5306 (reset_lwp_ptrace_options_callback): New function.
5307 (linux_handle_new_gdb_connection): New function.
5308 (linux_target_ops): Initialize new structure member.
5309 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5310 * lynx-low.c: Initialize new structure member.
5311 * remote-utils.c (prepare_resume_reply): Implement stop reason
5312 "fork" for "T" stop message.
5313 * server.c (handle_query): Call handle_new_gdb_connection.
5314 * server.h (report_fork_events): Declare global flag.
5315 * target.h (struct target_ops) <handle_new_gdb_connection>:
5316 New member.
5317 (target_handle_new_gdb_connection): New macro.
5318 * win32-low.c: Initialize new structure member.
5319
ddcbc397
DB
53202015-05-12 Don Breazeal <donb@codesourcery.com>
5321
5322 * mem-break.c (APPEND_TO_LIST): Define macro.
5323 (clone_agent_expr): New function.
5324 (clone_one_breakpoint): New function.
5325 (clone_all_breakpoints): New function.
5326 * mem-break.h: Declare new functions.
5327
89245bc0
DB
53282015-05-12 Don Breazeal <donb@codesourcery.com>
5329
5330 * linux-low.c (linux_supports_fork_events): New function.
5331 (linux_supports_vfork_events): New function.
5332 (linux_target_ops): Initialize new structure members.
5333 (initialize_low): Call linux_check_ptrace_features.
5334 * lynx-low.c (lynx_target_ops): Initialize new structure
5335 members.
5336 * server.c (report_fork_events, report_vfork_events):
5337 New global flags.
5338 (handle_query): Add new features to qSupported packet and
5339 response.
5340 (captured_main): Initialize new global variables.
5341 * target.h (struct target_ops) <supports_fork_events>:
5342 New member.
5343 <supports_vfork_events>: New member.
5344 (target_supports_fork_events): New macro.
5345 (target_supports_vfork_events): New macro.
5346 * win32-low.c (win32_target_ops): Initialize new structure
5347 members.
5348
835205d0
GB
53492015-05-12 Gary Benson <gbenson@redhat.com>
5350
5351 * server.c (handle_qxfer_exec_file): Use current process
5352 if annex is empty.
5353
21e94bd9
SL
53542015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5355
5356 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5357 Remove HAVE_PTRACE_GETREGS conditionals.
5358 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5359 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5360
45614f15
YQ
53612015-05-08 Yao Qi <yao.qi@linaro.org>
5362
5363 * linux-low.c (linux_supports_conditional_breakpoints): New
5364 function.
5365 (linux_target_ops): Install new target method.
5366 * lynx-low.c (lynx_target_ops): Install NULL hook for
5367 supports_conditional_breakpoints.
5368 * nto-low.c (nto_target_ops): Likewise.
5369 * spu-low.c (spu_target_ops): Likewise.
5370 * win32-low.c (win32_target_ops): Likewise.
5371 * server.c (handle_query): Check
5372 target_supports_conditional_breakpoints.
5373 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5374 New field.
5375 (target_supports_conditional_breakpoints): New macro.
5376
80ad801e
PA
53772015-05-06 Pedro Alves <palves@redhat.com>
5378
5379 PR server/18081
5380 * server.c (start_inferior): If the process exits, mourn it.
5381
819843c7
GB
53822015-04-21 Gary Benson <gbenson@redhat.com>
5383
5384 * hostio.c (fileio_open_flags_to_host): Factored out to
5385 fileio_to_host_openflags in common/fileio.c. Single use
5386 updated.
5387
a2d5a9d7
MF
53882015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5389
5390 * linux-xtensa-low.c (xtensa_fill_gregset)
5391 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5392 XCHAL_HAVE_LOOP.
5393
deb44829
MF
53942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5395
5396 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5397 (regs_info): Replace usrregs pointer with NULL.
5398
e57f1de3
GB
53992015-04-17 Gary Benson <gbenson@redhat.com>
5400
5401 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5402 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5403 * server.c (handle_qxfer_exec_file): New function.
5404 (qxfer_packets): Add exec-file entry.
5405 (handle_query): Report qXfer:exec-file:read as supported packet.
5406
62828379
RN
54072015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5408
5409 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5410
b88bb450
GB
54112015-04-09 Gary Benson <gbenson@redhat.com>
5412
5413 * hostio-errno.c (errno_to_fileio_error): Remove function.
5414 Update caller to use remote_fileio_to_fio_error.
5415
c8f4bfdd
YQ
54162015-04-09 Yao Qi <yao.qi@linaro.org>
5417
5418 * linux-low.c (linux_insert_point): Call
5419 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5420 (linux_remove_point): Call remove_memory_breakpoint if type is
5421 raw_bkpt_type_sw.
5422 * linux-x86-low.c (x86_insert_point): Don't call
5423 insert_memory_breakpoint.
5424 (x86_remove_point): Don't call remove_memory_breakpoint.
5425
41f98f02
PA
54262015-04-01 Pedro Alves <palves@redhat.com>
5427 Cleber Rosa <crosa@redhat.com>
5428
5429 * server.c (gdbserver_usage): Reorganize and extend the usage
5430 message.
5431
2bf6fb9d
PA
54322015-03-24 Pedro Alves <palves@redhat.com>
5433
5434 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5435 output. Also dump TRAP_TRACE.
5436 (linux_low_filter_event): In debug output, distinguish a
5437 resume_stop SIGSTOP from a delayed SIGSTOP.
5438
369f6daa
GB
54392015-03-24 Gary Benson <gbenson@redhat.com>
5440
5441 * linux-x86-low.c (x86_linux_new_thread): Moved to
5442 nat/x86-linux.c.
5443 (x86_linux_prepare_to_resume): Likewise.
5444
8e5d4070
GB
54452015-03-24 Gary Benson <gbenson@redhat.com>
5446
5447 * Makefile.in (x86-linux-dregs.o): New rule.
5448 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5449 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5450 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5451 (x86_linux_dr_get): Likewise.
5452 (x86_linux_dr_set): Likewise.
5453 (update_debug_registers_callback): Likewise.
5454 (x86_linux_dr_set_addr): Likewise.
5455 (x86_linux_dr_get_addr): Likewise.
5456 (x86_linux_dr_set_control): Likewise.
5457 (x86_linux_dr_get_control): Likewise.
5458 (x86_linux_dr_get_status): Likewise.
5459 (x86_linux_update_debug_registers): Likewise.
5460
2b95d440
GB
54612015-03-24 Gary Benson <gbenson@redhat.com>
5462
5463 * linux-x86-low.c (x86_linux_update_debug_registers):
5464 New function, factored out from...
5465 (x86_linux_prepare_to_resume): ...this.
5466
14b0bc68
GB
54672015-03-24 Gary Benson <gbenson@redhat.com>
5468
5469 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5470 (x86_linux_dr_set): Likewise.
5471 (update_debug_registers_callback): Likewise.
5472 (x86_linux_dr_set_addr): Likewise.
5473 (x86_linux_dr_get_addr): Likewise.
5474 (x86_linux_dr_set_control): Likewise.
5475 (x86_linux_dr_get_control): Likewise.
5476 (x86_linux_dr_get_status): Likewise.
5477 (x86_linux_prepare_to_resume): Likewise.
5478
5dfe6ca8
GB
54792015-03-24 Gary Benson <gbenson@redhat.com>
5480
5481 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5482 Use perror_with_name. Pass string through gettext.
5483 (x86_linux_dr_set): Likewise.
5484
d33472ad
GB
54852015-03-24 Gary Benson <gbenson@redhat.com>
5486
5487 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5488 (x86_linux_dr_set_addr): ...this.
5489 (x86_dr_low_get_addr): Rename to...
5490 (x86_linux_dr_get_addr): ...this.
5491 (x86_dr_low_set_control): Rename to...
5492 (x86_linux_dr_set_control): ...this.
5493 (x86_dr_low_get_control): Rename to...
5494 (x86_linux_dr_get_control): ...this.
5495 (x86_dr_low_get_status): Rename to...
5496 (x86_linux_dr_get_status): ...this.
5497 (x86_dr_low): Update with new function names.
5498
4b134ca1
GB
54992015-03-24 Gary Benson <gbenson@redhat.com>
5500
5501 * Makefile.in (x86-linux.o): New rule.
5502 * configure.srv: Add x86-linux.o to relevant targets.
5503 * linux-low.c (lwp_set_arch_private_info): New function.
5504 (lwp_arch_private_info): Likewise.
5505 * linux-x86-low.c: Include nat/x86-linux.h.
5506 (arch_lwp_info): Removed structure.
5507 (update_debug_registers_callback):
5508 Use lwp_set_debug_registers_changed.
5509 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5510 and lwp_set_debug_registers_changed.
5511 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5512
34c703da
GB
55132015-03-24 Gary Benson <gbenson@redhat.com>
5514
5515 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5516 * linux-arm-low.c (arm_new_thread): Likewise.
5517 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5518 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5519 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5520 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5521
cff068da
GB
55222015-03-24 Gary Benson <gbenson@redhat.com>
5523
5524 * linux-low.c (ptid_of_lwp): New function.
5525 (lwp_is_stopped): Likewise.
5526 (lwp_stop_reason): Likewise.
5527 * linux-x86-low.c (update_debug_registers_callback):
5528 Use lwp_is_stopped.
5529 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5530 lwp_stop_reason.
5531
b2f7c7e8
GB
55322015-03-24 Gary Benson <gbenson@redhat.com>
5533
5534 * linux-low.h (linux_stop_lwp): Remove declaration.
5535
6d4ee8c6
GB
55362015-03-24 Gary Benson <gbenson@redhat.com>
5537
5538 * linux-low.h: Include nat/linux-nat.h.
5539 * linux-low.c (iterate_over_lwps_args): New structure.
5540 (iterate_over_lwps_filter): New function.
5541 (iterate_over_lwps): Likewise.
5542 * linux-x86-low.c (update_debug_registers_callback):
5543 Update signature to what iterate_over_lwps expects.
5544 Remove PID check that iterate_over_lwps now performs.
5545 (x86_dr_low_set_addr): Use iterate_over_lwps.
5546 (x86_dr_low_set_control): Likewise.
5547
70a0bb6b
GB
55482015-03-24 Gary Benson <gbenson@redhat.com>
5549
5550 * linux-x86-low.c (x86_debug_reg_state): New function.
5551 (x86_linux_prepare_to_resume): Use the above.
5552
7b669087
GB
55532015-03-24 Gary Benson <gbenson@redhat.com>
5554
5555 * linux-low.c (current_lwp_ptid): New function.
5556 * linux-x86-low.c: Include nat/linux-nat.h.
5557 (x86_dr_low_get_addr): Use current_lwp_ptid.
5558 (x86_dr_low_get_control): Likewise.
5559 (x86_dr_low_get_status): Likewise.
5560
eef49a3d
PA
55612015-03-20 Pedro Alves <palves@redhat.com>
5562
5563 * tracepoint.c (cmd_qtstatus): Make "str" const.
5564
b2333d22
PA
55652015-03-20 Pedro Alves <palves@redhat.com>
5566
5567 * server.c (handle_general_set): Make "req_str" const.
5568
23f238d3
PA
55692015-03-19 Pedro Alves <palves@redhat.com>
5570
5571 * linux-low.c (linux_resume_one_lwp): Rename to ...
5572 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5573 instead call perror_with_name.
5574 (check_ptrace_stopped_lwp_gone): New function.
5575 (linux_resume_one_lwp): Reimplement as wrapper around
5576 linux_resume_one_lwp_throw that swallows errors if the LWP is
5577 gone.
5578
91baf43f
PA
55792015-03-19 Pedro Alves <palves@redhat.com>
5580
5581 * linux-low.c (count_events_callback, select_event_lwp_callback):
5582 No longer check whether the thread has resume_stop as last resume
5583 kind.
5584
8bf3b159
PA
55852015-03-19 Pedro Alves <palves@redhat.com>
5586
5587 * linux-low.c (count_events_callback, select_event_lwp_callback):
5588 Use the lwp's status_pending_p field, not the thread's.
5589
b90fc188
PA
55902015-03-19 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (select_event_lwp_callback): Update comments to
5593 no longer mention SIGTRAP.
5594
464b0089
GB
55952015-03-18 Gary Benson <gbenson@redhat.com>
5596
5597 * server.c (handle_query): Do not report vFile:fstat as supported.
5598
aa9e327f
GB
55992015-03-11 Gary Benson <gbenson@redhat.com>
5600
5601 * hostio.c (sys/types.h): New include.
5602 (sys/stat.h): Likewise.
5603 (common-remote-fileio.h): Likewise.
5604 (handle_fstat): New function.
5605 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5606
791c0056
GB
56072015-03-11 Gary Benson <gbenson@redhat.com>
5608
5609 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5610 struct stat.st_blocks and struct stat.st_blksize.
5611 * configure: Regenerate.
5612 * config.in: Likewise.
5613 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5614 (OBS): Add common-remote-fileio.o.
5615 (common-remote-fileio.o): New rule.
5616
9a9df970
PA
56172015-03-09 Pedro Alves <palves@redhat.com>
5618
5619 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5620 'struct sockaddr' pointer in 'accept' call.
5621
9eb1356e
PA
56222015-03-09 Pedro Alves <palves@redhat.com>
5623
5624 Revert:
5625 2015-03-07 Pedro Alves <palves@redhat.com>
5626 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5627 or <winsock2.h> here. Instead include "gdb_socket.h".
5628 (remote_open): Use union gdb_sockaddr_u.
5629 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5630 or <winsock2.h> here. Instead include "gdb_socket.h".
5631 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5632 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5633 or <sys/un.h>.
5634 (init_named_socket, gdb_agent_helper_thread): Use union
5635 gdb_sockaddr_u.
5636
aac331e4
PA
56372015-03-07 Pedro Alves <palves@redhat.com>
5638
5639 * configure.ac (build_warnings): Move
5640 -Wdeclaration-after-statement to the C-specific set.
5641 * configure: Regenerate.
5642
366c75fc
PA
56432015-03-07 Pedro Alves <palves@redhat.com>
5644
5645 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5646 or <winsock2.h> here. Instead include "gdb_socket.h".
5647 (remote_open): Use union gdb_sockaddr_u.
5648 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5649 or <winsock2.h> here. Instead include "gdb_socket.h".
5650 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5651 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5652 or <sys/un.h>.
5653 (init_named_socket, gdb_agent_helper_thread): Use union
5654 gdb_sockaddr_u.
5655
492d29ea
PA
56562015-03-07 Pedro Alves <palves@redhat.com>
5657
5658 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5659 instead.
5660
60a191ed
YQ
56612015-03-06 Yao Qi <yao.qi@linaro.org>
5662
5663 * linux-aarch64-low.c (aarch64_insert_point): Use
5664 show_debug_regs as a boolean.
5665 (aarch64_remove_point): Likewise.
5666
f5771b1d
PA
56672015-03-05 Pedro Alves <palves@redhat.com>
5668
5669 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5670 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5671 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5672 * nto-low.c (nto_target_ops): Likewise.
5673 * spu-low.c (spu_target_ops): Likewise.
5674 * win32-low.c (win32_target_ops): Likewise.
5675
3e572f71
PA
56762015-03-04 Pedro Alves <palves@redhat.com>
5677
72f4393d 5678 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5679 Decide whether a breakpoint triggered based on the SIGTRAP's
5680 siginfo.si_code.
72f4393d
L
5681 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5682 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5683 (linux_low_filter_event): Check for breakpoints before checking
5684 watchpoints.
5685 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5686 siginfo.si_code.
72f4393d
L
5687 (linux_stopped_by_sw_breakpoint)
5688 (linux_supports_stopped_by_sw_breakpoint)
5689 (linux_stopped_by_hw_breakpoint)
5690 (linux_supports_stopped_by_hw_breakpoint): New functions.
5691 (linux_target_ops): Install new target methods.
3e572f71 5692
1ec68e26
PA
56932015-03-04 Pedro Alves <palves@redhat.com>
5694
5695 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5696 * server.c (swbreak_feature, hwbreak_feature): New globals.
5697 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5698 (captured_main): Clear swbreak_feature and hwbreak_feature.
5699 * server.h (swbreak_feature, hwbreak_feature): Declare.
5700 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5701 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5702 supports_stopped_by_hw_breakpoint>: New fields.
5703 (target_supports_stopped_by_sw_breakpoint)
5704 (target_stopped_by_sw_breakpoint)
5705 (target_supports_stopped_by_hw_breakpoint)
5706 (target_stopped_by_hw_breakpoint): Declare.
5707
15c66dd6
PA
57082015-03-04 Pedro Alves <palves@redhat.com>
5709
5710 enum lwp_stop_reason -> enum target_stop_reason
5711 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5712 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5713 (linux_wait_1, stuck_in_jump_pad_callback)
5714 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5715 (linux_stopped_by_watchpoint):
5716 * linux-low.h (enum lwp_stop_reason): Delete.
5717 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5718 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5719
98fc70d6
YQ
57202015-03-04 Yao Qi <yao.qi@linaro.org>
5721
5722 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5723
dd2ac174
GB
57242015-03-03 Gary Benson <gbenson@redhat.com>
5725
5726 * hostio.c (handle_vFile): Fix prefix lengths.
5727
d68e53f4
MM
57282015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5729
5730 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5731 ptr_bits.
5732
bf2d68ab
AA
57332015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5734
5735 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5736 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5737 (clean): Add "rm -f" for above C files.
5738 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5739 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5740 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5741 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5742 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5743 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5744 (init_registers_s390x_vx_linux64)
5745 (init_registers_s390x_tevx_linux64)
5746 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5747 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5748 declarations.
5749 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5750 (s390_store_vxrs_high): New functions.
5751 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5752 NT_S390_VXRS_HIGH.
5753 (s390_arch_setup): Add logic for selecting one of the new target
5754 descriptions. Activate the new vector regsets if applicable.
5755 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5756 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5757 and init_registers_s390x_tevx_linux64.
5758
c966a859
PA
57592015-03-01 Pedro Alves <palves@redhat.com>
5760
5761 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5762 parameter.
5763
4180215b
PA
57642015-02-27 Pedro Alves <palves@redhat.com>
5765
5766 * linux-x86-low.c (u_debugreg_offset): New function.
5767 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5768
749bab01
PA
57692015-02-27 Pedro Alves <palves@redhat.com>
5770
5771 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5772 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5773 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5774 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5775 (ps_lsetfpregs, ps_getpid)
5776 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5777 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5778 (ps_lsetxregs, ps_plog): Declare.
5779
3c14e5a3
PA
57802015-02-27 Pedro Alves <palves@redhat.com>
5781
5782 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5783 IP_AGENT_EXPORT_FUNC.
5784 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5785 IP_AGENT_EXPORT_FUNC.
5786 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5787 (IP_AGENT_EXPORT): Delete.
5788 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5789 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5790 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5791 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5792 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5793 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5794 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5795 (traceframe_read_count, traceframe_write_count)
5796 (traceframes_created, trace_state_variables, get_raw_reg)
5797 (get_trace_state_variable_value, set_trace_state_variable_value)
5798 (ust_loaded, helper_thread_id, cmd_buf): Use
5799 IPA_SYM_EXPORTED_NAME.
5800 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5801 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5802 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5803 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5804 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5805 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5806 EXTERN_C_PUSH/EXTERN_C_POP.
5807 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5808 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5809 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5810 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5811 (traceframe_write_count, traceframe_read_count)
5812 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5813 (about_to_request_buffer_space, get_trace_state_variable_value)
5814 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5815 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5816 EXTERN_C_PUSH/EXTERN_C_POP.
5817 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5818 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5819 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5820 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5821 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5822 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5823 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5824 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5825 Define.
5826 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5827 (IP_AGENT_EXPORT_VAR_DECL): Define.
5828 (tracing): Declare.
5829 (gdb_agent_get_raw_reg): Declare.
5830
fe978cb0
PA
58312015-02-27 Tom Tromey <tromey@redhat.com>
5832 Pedro Alves <palves@redhat.com>
5833
5834 Rename symbols whose names are reserved C++ keywords throughout.
5835
3bc3d82a
PA
58362015-02-27 Pedro Alves <palves@redhat.com>
5837
5838 * Makefile.in (COMPILER): New, get it from autoconf.
5839 (CXX): Get from autoconf instead.
5840 (COMPILE.pre): Use COMPILER.
5841 (CC-LD): Rename to ...
5842 (CC_LD): ... this. Use COMPILER.
5843 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5844 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5845 * acinclude.m4: Include build-with-cxx.m4.
5846 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5847 Disable -Werror by default if building in C++ mode.
5848 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5849 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5850 the C++ compiler. Save/restore CXXFLAGS too.
5851 * configure: Regenerate.
5852
07697489
PA
58532015-02-27 Pedro Alves <palves@redhat.com>
5854
5855 * acinclude.m4: Include libiberty.m4.
5856 * configure.ac: Call libiberty_INIT.
5857 * config.in, configure: Regenerate.
5858
9beb7c4e
PA
58592015-02-26 Pedro Alves <palves@redhat.com>
5860
5861 * linux-low.c (linux_wait_1): When incrementing the PC past a
5862 program breakpoint always use the_low_target.breakpoint_len as
5863 increment, rather than the maximum between that and
5864 the_low_target.decr_pc_after_break.
5865
8090aef2
PA
58662015-02-23 Pedro Alves <palves@redhat.com>
5867
5868 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5869 thread was doing a step-over; always adjust the PC if
5870 we stepped over a permanent breakpoint.
5871 (linux_wait_1): If we stepped over breakpoint that was on top of a
5872 permanent breakpoint, manually advance the PC past it.
5873
bc9540e8
PA
58742015-02-23 Pedro Alves <palves@redhat.com>
5875
5876 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5877 modes.
5878 (x86_fill_gregset, x86_store_gregset): Use it when handling
5879 $orig_eax.
5880
2db9a427
PA
58812015-02-20 Pedro Alves <palves@redhat.com>
5882
5883 * thread-db.c: Include "nat/linux-procfs.h".
5884 (thread_db_init): Skip listing new threads if the kernel supports
5885 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5886
afa8d396
PA
58872015-02-20 Pedro Alves <palves@redhat.com>
5888
5889 * linux-low.c (status_pending_p_callback): Use ptid_match.
5890
c9587f88
AT
58912015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5892
5893 PR breakpoints/16812
5894 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5895 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5896 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5897
b05ec7a5
AT
58982015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5899
5900 PR breakpoints/15956
5901 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5902
d33501a5
MM
59032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5904
5905 * linux-low.c (linux_low_btrace_conf): Print size.
5906 * server.c (handle_btrace_conf_general_set): New.
5907 (hanle_general_set): Call handle_btrace_conf_general_set.
5908 (handle_query): Report Qbtrace-conf:bts:size as supported.
5909
f4abbc16
MM
59102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5911
5912 * linux-low.c (linux_low_enable_btrace): Update parameters.
5913 (linux_low_btrace_conf): New.
5914 (linux_target_ops)<to_btrace_conf>: Initialize.
5915 * server.c (current_btrace_conf): New.
5916 (handle_btrace_enable): Rename to ...
5917 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5918 to target_enable_btrace. Update comment. Update users.
5919 (handle_qxfer_btrace_conf): New.
5920 (qxfer_packets): Add btrace-conf entry.
5921 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5922 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5923 (target_ops)<read_btrace_conf>: New.
5924 (target_enable_btrace): Update parameters.
5925 (target_read_btrace_conf): New.
5926
043c3577
MM
59272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5928
5929 * server.c (handle_btrace_general_set): Remove call to
5930 target_supports_btrace.
5931 (supported_btrace_packets): New.
5932 (handle_query): Call supported_btrace_packets.
5933 * target.h: include btrace-common.h.
5934 (btrace_target_info): Removed.
5935 (supports_btrace, target_supports_btrace): Update parameters.
5936
734b0e4b
MM
59372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5938
5939 * Makefile.in (SFILES): Add common/btrace-common.c.
5940 (OBS): Add common/btrace-common.o.
5941 (btrace-common.o): Add build rules.
5942 * linux-low: Include btrace-common.h.
5943 (linux_low_read_btrace): Use struct btrace_data. Call
5944 btrace_data_init and btrace_data_fini.
5945
d6c146e9
PA
59462015-02-06 Pedro Alves <palves@redhat.com>
5947
5948 * thread-db.c (find_new_threads_callback): Add debug output.
5949
20ba1ce6
PA
59502015-02-04 Pedro Alves <palves@redhat.com>
5951
5952 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5953 (resume_stopped_resumed_lwps): New function.
5954 (linux_wait_for_event_filtered): Use it.
5955
8cc73a39
SDJ
59562015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5957
5958 * Makefile.in (SFILES): Add linux-personality.c.
5959 (linux-personality.o): New rule.
5960 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5961 list of objects to be built.
5962 * linux-low.c: Include nat/linux-personality.h.
5963 (linux_create_inferior): Remove code to disable address space
5964 randomization (moved to ../nat/linux-personality.c). Create
5965 cleanup to disable address space randomization.
5966
fb23d554
SDJ
59672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5968
5969 * Makefile.in (posix-strerror.o): New rule.
5970 (mingw-strerror.o): Likewise.
5971 * configure: Regenerated.
5972 * configure.ac: Source file ../common/common.host. Initialize new
5973 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5974
cdf43629
YQ
59752015-01-14 Yao Qi <yao@codesourcery.com>
5976
5977 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5978 (ppc-linux.o): New rule.
5979 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5980 * configure.ac: AC_CHECK_FUNCS(getauxval).
5981 * config.in: Re-generated.
5982 * configure: Re-generated.
5983 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5984 ppc64_64bit_inferior_p
5985
514c5338
YQ
59862015-01-14 Yao Qi <yao@codesourcery.com>
5987
5988 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5989 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5990 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5991 (PT_ORIG_R3, PT_TRAP): Likewise.
5992 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5993 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5994 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5995
3368c1e5
JB
59962015-01-10 Joel Brobecker <brobecker@adacore.com>
5997
5998 * i387-fp.c (i387_cache_to_xsave): In look over
5999 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6000 zmmh_low_space field by use of zmmh_high_space.
6001
582511be
PA
60022015-01-09 Pedro Alves <palves@redhat.com>
6003
6004 * linux-low.c (step_over_bkpt): Move higher up in the file.
6005 (handle_extended_wait): Don't store the stop_pc here.
6006 (get_stop_pc): Adjust comments and rename to ...
6007 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6008 stopped for a software breakpoint or hardware breakpoint.
6009 (thread_still_has_status_pending_p): New function.
6010 (status_pending_p_callback): Use
6011 thread_still_has_status_pending_p. If the event is no longer
6012 interesting, resume the LWP.
6013 (handle_tracepoints): Add assert.
6014 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6015 (wstatus_maybe_breakpoint): New function.
6016 (cancel_breakpoint): Delete function.
6017 (check_stopped_by_watchpoint): New function, factored out from
6018 linux_low_filter_event.
6019 (lp_status_maybe_breakpoint): Delete function.
6020 (linux_low_filter_event): Remove filter_ptid argument.
6021 Leave thread group exits pending here. Store the LWP's stop PC.
6022 Always leave events pending.
6023 (linux_wait_for_event_filtered): Pull all events out of the
6024 kernel, and leave them all pending.
6025 (count_events_callback, select_event_lwp_callback): Consider all
6026 events.
6027 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6028 (select_event_lwp): Only give preference to the stepping LWP in
6029 all-stop mode. Adjust comments.
6030 (ignore_event): New function.
6031 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6032 references to cancel_breakpoints. Adjust to renames. Also give
6033 equal priority to all LWPs that have had events in non-stop mode.
6034 If reporting a software breakpoint event, unadjust the LWP's PC.
6035 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6036 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6037 Adjust.
6038 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6039 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6040 (linux_stopped_by_watchpoint): Adjust.
6041 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6042 * linux-low.h (enum lwp_stop_reason): New.
6043 (struct lwp_info) <stop_pc>: Adjust comment.
6044 <stopped_by_watchpoint>: Delete field.
6045 <stop_reason>: New field.
6046 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6047 * mem-break.c (software_breakpoint_inserted_here)
6048 (hardware_breakpoint_inserted_here): New function.
6049 * mem-break.h (software_breakpoint_inserted_here)
6050 (hardware_breakpoint_inserted_here): Declare.
6051 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6052 (cancel_breakpoints): Delete.
6053 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6054 (upload_fast_traceframes): Remove references to
6055 cancel_breakpoints.
6056
a33e3959
PA
60572015-01-09 Pedro Alves <palves@redhat.com>
6058
6059 * thread-db.c (find_new_threads_callback): Ignore thread if the
6060 kernel thread ID is -1.
6061
8784d563
PA
60622015-01-09 Pedro Alves <palves@redhat.com>
6063
6064 * linux-low.c (linux_attach_fail_reason_string): Move to
6065 nat/linux-ptrace.c, and rename.
6066 (linux_attach_lwp): Update comment.
6067 (attach_proc_task_lwp_callback): New function.
6068 (linux_attach): Adjust to rename and use
6069 linux_proc_attach_tgid_threads.
6070 (linux_attach_fail_reason_string): Delete declaration.
6071
76f2b779
JB
60722015-01-01 Joel Brobecker <brobecker@adacore.com>
6073
6074 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6075 * server.c (gdbserver_version): Likewise.
6076
fafcc06a
SDJ
60772014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6078
6079 * remote-utils.c: Include ctype.h.
6080 (input_interrupt): Explicitly handle the case when the char
6081 received is the NUL byte. Improve the printing of non-ASCII
6082 characters.
6083
beed38b8
JB
60842014-12-16 Joel Brobecker <brobecker@adacore.com>
6085
6086 * linux-low.c (linux_low_filter_event): Update call to
6087 linux_enable_event_reporting following the addition of
6088 a new parameter to that function.
6089
bf330350
CU
60902014-12-16 Catalin Udma <catalin.udma@freescale.com>
6091
6092 PR server/17457
6093 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6094 (AARCH64_FPCR_REGNO): Likewise.
6095 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6096 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6097 (aarch64_store_fpregset): Likewise.
6098
5227d625
JB
60992014-12-15 Joel Brobecker <brobecker@adacore.com>
6100
6101 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6102 Remove FIXME comment about assumption about N.
6103
f93b65a0
JB
61042014-12-13 Joel Brobecker <brobecker@adacore.com>
6105
6106 * configure.ac: If large-file support is disabled in GDBserver,
6107 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6108 * configure: Regenerate.
6109
e5a9158d
AA
61102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6111
6112 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6113 warning upon ENODATA from ptrace.
6114 * linux-s390-low.c (s390_store_tdb): New.
6115 (s390_regsets): Add regset for NT_S390_TDB.
6116
feea5f36
AA
61172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6118
6119 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6120 without a fill_function.
6121 * linux-s390-low.c (s390_fill_last_break): Remove.
6122 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6123 (s390_arch_setup): Use regset's size instead of fill_function for
6124 loop end condition.
6125
098dbe61
AA
61262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6127
6128 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6129 the regset's store function when ptrace returned an error.
6130 * regcache.c (get_thread_regcache): Invalidate register cache
6131 before fetching inferior's registers.
6132
28eef672
AA
61332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6134
6135 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6136 while-loop as for-loop.
6137 (regsets_store_inferior_registers): Likewise.
6138
bdca27a2
YQ
61392014-11-28 Yao Qi <yao@codesourcery.com>
6140
6141 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6142 * config.in, configure: Re-generate.
6143 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6144 is defined.
6145
9c232dda
YQ
61462014-11-21 Yao Qi <yao@codesourcery.com>
6147
6148 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6149 (AC_CHECK_HEADERS): Remove malloc.h.
6150 * configure: Re-generated.
6151 * config.in: Re-generated.
6152 * server.h: Don't include alloca.h and malloc.h.
6153 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6154 Don't include malloc.h.
6155
43968415
JB
61562014-11-17 Joel Brobecker <brobecker@adacore.com>
6157
6158 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6159 corresponding ERRNO check in same block.
6160
40e91bc7
PA
61612014-11-12 Pedro Alves <palves@redhat.com>
6162
6163 * server.c (cont_thread): Update comment.
6164 (start_inferior, attach_inferior): No longer clear cont_thread.
6165 (handle_v_cont): No longer set cont_thread.
6166 (captured_main): Clear cont_thread each time a GDB connects.
6167
c2c118cf
PA
61682014-11-12 Pedro Alves <palves@redhat.com>
6169
6170 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6171 thread, and don't resume all threads if the Hc thread has exited.
6172
78708b7c
PA
61732014-11-12 Pedro Alves <palves@redhat.com>
6174
6175 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6176 the process group instead of to a specific LWP.
6177
a2abc7de
PA
61782014-10-15 Pedro Alves <palves@redhat.com>
6179
6180 PR server/17487
6181 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6182 parameter.
6183 (arm_set_thread_context): Delete.
6184 (the_low_target): Adjust.
6185 * win32-i386-low.c (debug_registers_changed)
6186 (debug_registers_used): Delete.
6187 (update_debug_registers_callback): New function.
6188 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6189 needing to update their debug registers.
6190 (win32_get_current_dr): New function.
6191 (x86_dr_low_get_addr, x86_dr_low_get_control)
6192 (x86_dr_low_get_status): Fetch the debug register from the thread
6193 record's context.
6194 (i386_initial_stuff): Adjust.
6195 (i386_get_thread_context): Remove current_event parameter. Don't
6196 clear debug_registers_changed nor copy DR values to
6197 debug_reg_state.
6198 (i386_set_thread_context): Delete.
6199 (i386_prepare_to_resume): New function.
6200 (i386_thread_added): Mark the thread as needing to update irs
6201 debug registers.
6202 (the_low_target): Remove i386_set_thread_context and install
6203 i386_prepare_to_resume.
6204 * win32-low.c (win32_get_thread_context): Adjust.
6205 (win32_set_thread_context): Use SetThreadContext
6206 directly.
6207 (win32_prepare_to_resume): New function.
6208 (win32_require_context): New function, factored out from ...
6209 (thread_rec): ... this.
6210 (continue_one_thread): Call win32_prepare_to_resume on each thread
6211 we're about to continue.
6212 (win32_resume): Call win32_prepare_to_resume on the event thread.
6213 * win32-low.h (struct win32_thread_info)
6214 <debug_registers_changed>: New field.
6215 (struct win32_target_ops): Change prototype of set_thread_context,
6216 delete set_thread_context and add prepare_to_resume.
6217 (win32_require_context): New declaration.
6218
a442d071
GB
62192014-10-08 Gary Benson <gbenson@redhat.com>
6220
6221 * server.h: Do not include common-exceptions.h.
6222
6f1947e8
GB
62232014-10-08 Gary Benson <gbenson@redhat.com>
6224
6225 * server.h: Do not include cleanups.h.
6226
63b434a4
JH
62272014-09-30 James Hogan <james.hogan@imgtec.com>
6228
6229 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6230 mips64-dsp-linux.c.
6231
c4d9ceb6
YQ
62322014-09-23 Yao Qi <yao@codesourcery.com>
6233
6234 * linux-low.c (lp_status_maybe_breakpoint): New function.
6235 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6236 (count_events_callback): Likewise.
6237 (select_event_lwp_callback): Likewise.
6238 (cancel_breakpoints_callback): Likewise.
6239
89a5711c
DB
62402014-09-19 Don Breazeal <donb@codesourcery.com>
6241
6242 * linux-low.c (handle_extended_wait): Call
6243 linux_ptrace_get_extended_event.
6244 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6245 linux_is_extended_waitstatus.
6246
bffc0964
JB
62472014-09-16 Joel Brobecker <brobecker@adacore.com>
6248
6249 * Makefile.in (CPPFLAGS): Define.
6250 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6251 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6252
0bfdf32f
GB
62532014-09-16 Gary Benson <gbenson@redhat.com>
6254
6255 * inferiors.h (current_inferior): Renamed as...
6256 (current_thread): New variable. All uses updated.
6257 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6258 (maybe_move_out_of_jump_pad): Likewise.
6259 (cancel_breakpoint): Likewise.
6260 (linux_low_filter_event): Likewise.
6261 (wait_for_sigstop): Likewise.
6262 (linux_resume_one_lwp): Likewise.
6263 (need_step_over_p): Likewise.
6264 (start_step_over): Likewise.
6265 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6266 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6267 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6268 and save_inferior as saved_thread.
6269 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6270 saved_thread.
6271 (regcache_invalidate_thread): Likewise.
6272 * remote-utils.c (prepare_resume_reply): Likewise.
6273 * thread-db.c (thread_db_get_tls_address): Likewise.
6274 (disable_thread_event_reporting): Likewise.
6275 (remove_thread_event_breakpoints): Likewise.
6276 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6277 as saved_thread.
6278 * target.h (set_desired_inferior): Renamed as...
6279 (set_desired_thread): New declaration. All uses updated.
6280 * server.c (myresume): Updated comment to reference thread instead
6281 of inferior.
6282 (handle_serial_event): Likewise.
6283 (handle_target_event): Likewise.
6284
361c8ade
GB
62852014-09-12 Tom Tromey <tromey@redhat.com>
6286 Gary Benson <gbenson@redhat.com>
6287
6288 * regcache.h: Include common-regcache.h.
6289 (regcache_read_pc): Don't declare.
6290 * regcache.c (get_thread_regcache_for_ptid): New function.
6291
bd9269f7
GB
62922014-09-11 Tom Tromey <tromey@redhat.com>
6293 Gary Benson <gbenson@redhat.com>
6294
6295 * symbol.c: New file.
6296 * Makefile.in (SFILES): Add symbol.c.
6297 (OBS): Add symbol.o.
6298
f8c1d06b
GB
62992014-09-11 Gary Benson <gbenson@redhat.com>
6300
6301 * target.c (target_stop_ptid, target_continue_ptid): New
6302 functions.
6303
721ec300
GB
63042014-09-11 Tom Tromey <tromey@redhat.com>
6305 Gary Benson <gbenson@redhat.com>
6306
6307 * target.h: Include target/target.h.
6308 * target.c (target_read_memory, target_read_uint32)
6309 (target_write_memory): New functions.
6310
c5e92cca
GB
63112014-09-11 Gary Benson <gbenson@redhat.com>
6312
6313 * server.h (debug_hw_points): Don't declare.
6314 * server.c (debug_hw_points): Don't define. Replace all uses
6315 with show_debug_regs.
6316 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6317 all uses with show_debug_regs.
6318
2e4bb98a
EBM
63192014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6320
6321 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6322 endianness into account.
6323 (ppc_supply_ptrace_register): Likewise.
6324
ac740bc7
JH
63252014-09-03 James Hogan <james.hogan@imgtec.com>
6326
6327 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6328 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6329
97ea6506
GB
63302014-09-03 Gary Benson <gbenson@redhat.com>
6331
6332 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6333 ALL_DEBUG_ADDRESS_REGISTERS.
6334
df7e5265
GB
63352014-09-02 Gary Benson <gbenson@redhat.com>
6336
6337 * i386-low.h: Renamed as...
6338 * x86-low.h: New file. All type, function and variable name
6339 prefixes changed from "i386_" to "x86_". All references updated.
6340 * i386-low.c: Renamed as...
6341 * x86-low.c: New file. All type, function and variable name
6342 prefixes changed from "i386_" to "x86_". All references updated.
6343
ed859da7
GB
63442014-09-02 Gary Benson <gbenson@redhat.com>
6345
6346 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6347 (x86_linux_new_thread): Likewise.
6348
860789c7
GB
63492014-08-29 Gary Benson <gbenson@redhat.com>
6350
6351 * server.h (setjmp.h): Do not include.
6352 (toplevel): Do not declare.
6353 (common-exceptions.h): Include.
6354 (cleanups.h): Likewise.
6355 * server.c (toplevel): Do not define.
6356 (exit_code): New static global.
6357 (detach_or_kill_for_exit_cleanup): New function.
6358 (main): New function. Original main renamed to...
6359 (captured_main): New function.
6360 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6361
ff55e1b5
GB
63622014-08-29 Gary Benson <gbenson@redhat.com>
6363
6364 * Makefile.in (SFILES): Add common/common-exceptions.c.
6365 (OBS): Add common-exceptions.o.
6366 (common-exceptions.o): New rule.
6367 * utils.c (prepare_to_throw_exception): New function.
6368
e9bcb658
GB
63692014-08-29 Gary Benson <gbenson@redhat.com>
6370
6371 * config.in: Regenerate.
6372 * configure: Likewise.
6373
e3180625
GB
63742014-08-29 Gary Benson <gbenson@redhat.com>
6375
6376 * Makefile.in (SFILES): Add common/cleanups.c.
6377 (OBS): cleanups.o.
6378 (cleanups.o): New rule.
6379
e3d6ba5d
GB
63802014-08-29 Gary Benson <gbenson@redhat.com>
6381
6382 * utils.c (internal_vwarning): New function.
6383
7096e886
GB
63842014-08-28 Gary Benson <gbenson@redhat.com>
6385
6386 * utils.h (fatal): Remove declaration.
6387 * utils.c (fatal): Remove function.
6388
14ce3192
GB
63892014-08-28 Gary Benson <gbenson@redhat.com>
6390
6391 * tracepoint.c (gdb_agent_init): Replace fatal with
6392 perror_with_name.
6393 (initialize_tracepoint): Likewise.
6394
50278d59
GB
63952014-08-28 Gary Benson <gbenson@redhat.com>
6396
6397 * remote-utils.c (remote_prepare): Replace fatal with error.
6398
aa96c426
GB
63992014-08-28 Gary Benson <gbenson@redhat.com>
6400
6401 * linux-low.c (linux_async): Replace fatal with warning.
6402 Tidy up and return.
6403 (linux_start_non_stop): Return -1 if linux_async failed.
6404
f7160e97
GB
64052014-08-28 Gary Benson <gbenson@redhat.com>
6406
6407 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6408 gdb_assert.
6409 (i386_dr_low_get_addr): Remove vague comment.
6410 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6411 gdb_assert.
6412
38e08fca
GB
64132014-08-28 Gary Benson <gbenson@redhat.com>
6414
6415 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6416 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6417 internal_error.
6418 (linux_resume_one_lwp): Likewise.
6419 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6420 gdb_assert.
6421 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6422 with internal_error.
6423 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6424 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6425 (find_register_by_name): Replace fatal with internal_error.
6426 (find_regno): Likewise.
6427 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6428 * thread-db.c (thread_db_create_event): Likewise.
6429 (thread_db_load_search): Likewise.
6430 (try_thread_db_load_1): Likewise.
6431 * tracepoint.c (get_jump_space_head): Replace fatal with
6432 internal_error.
6433 (claim_trampoline_space): Likewise.
6434 (have_fast_tracepoint_trampoline_buffer): Likewise.
6435 (cmd_qtstart): Likewise.
6436 (stop_tracing): Likewise.
6437 (fast_tracepoint_collecting): Likewise.
6438 (target_malloc): Likewise.
6439 (download_tracepoint): Likewise.
6440 (download_trace_state_variables): Replace check with gdb_assert.
6441 (upload_fast_traceframes): Replace fatal with internal_error.
6442
34abf635
GB
64432014-08-19 Tom Tromey <tromey@redhat.com>
6444 Gary Benson <gbenson@redhat.com>
6445
6446 * Makefile.in (SFILES): Add common/common-debug.c.
6447 (OBS): Add common-debug.o.
6448 (common-debug.o): New rule.
6449 * debug.h (debug_printf): Don't declare.
6450 * debug.c (debug_printf): Renamed and rewritten as...
6451 (debug_vprintf): New function.
6452
f6e94d78
GB
64532014-08-19 Gary Benson <gbenson@redhat.com>
6454
6455 * utils.h: Do not include print-utils.h.
6456
9239eeab
GB
64572014-08-19 Tom Tromey <tromey@redhat.com>
6458 Gary Benson <gbenson@redhat.com>
6459
6460 * server.h: Add static assertion.
6461 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6462
ef87c8bb
GB
64632014-08-19 Tom Tromey <tromey@redhat.com>
6464 Gary Benson <gbenson@redhat.com>
6465
6466 * Makefile.in (SFILES): Add common/errors.c.
6467 (OBS): Add errors.o.
6468 (IPA_OBS): Add errors-ipa.o.
6469 (errors.o): New rule.
6470 (errors-ipa.o): Likewise.
6471 * utils.h (perror_with_name, error, warning): Don't declare.
6472 * utils.c (warning): Renamed and rewritten as...
6473 (vwarning): New function.
6474 (error): Renamed and rewritten as...
6475 (verror): New function.
6476 (internal_error): Renamed and rewritten as...
6477 (internal_verror): New function.
6478
bb974a24
GB
64792014-08-07 Gary Benson <gbenson@redhat.com>
6480
6481 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6482 * configure: Regenerate.
6483 * config.in: Likewise.
6484 * server.h: Do not include errno.h.
6485 * event-loop.c: Likewise.
6486 * hostio-errno.c: Likewise.
6487 * linux-low.c: Likewise.
6488 * remote-utils.c: Likewise.
6489 * spu-low.c: Likewise.
6490 * utils.c: Likewise.
6491 * gdbreplay.c: Unconditionally include errno.h.
6492
6d3d12eb
GB
64932014-08-07 Gary Benson <gbenson@redhat.com>
6494
6495 * server.h: Do not include string.h.
6496 * event-loop.c: Likewise.
6497 * linux-low.c: Likewise.
6498 * regcache.c: Likewise.
6499 * remote-utils.c: Likewise.
6500 * spu-low.c: Likewise.
6501 * utils.c: Likewise.
6502
dccbb609
GB
65032014-08-07 Gary Benson <gbenson@redhat.com>
6504
6505 * server.h: Do not include gdb_assert.h.
6506
e76df0d0
GB
65072014-08-07 Gary Benson <gbenson@redhat.com>
6508
6509 * server.h: Do not include common-utils.h.
6510
4cb9c816
GB
65112014-08-07 Gary Benson <gbenson@redhat.com>
6512
6513 * server.h: Do not include ptid.h.
6514 * notif.h: Likewise.
6515
3995eeee
GB
65162014-08-07 Gary Benson <gbenson@redhat.com>
6517
6518 * server.h: Do not include gdb_locale.h.
6519
cb9f1a9b
GB
65202014-08-07 Gary Benson <gbenson@redhat.com>
6521
6522 * server.h: Do not include gdb/signals.h.
6523 * win32-low.c: Likewise.
6524
a5fceff8
GB
65252014-08-07 Gary Benson <gbenson@redhat.com>
6526
6527 * server.h: Do not include pathmax.h.
6528
b9391142
GB
65292014-08-07 Gary Benson <gbenson@redhat.com>
6530
6531 * server.h: Do not include libiberty.h.
6532 * linux-bfin-low.c: Likewise.
6533
0e443c87
GB
65342014-08-07 Gary Benson <gbenson@redhat.com>
6535
6536 * server.h: Do not include ansidecl.h.
6537
8ebb3f56
GB
65382014-08-07 Gary Benson <gbenson@redhat.com>
6539
6540 * linux-x86-low.c: Do not include stddef.h.
6541 * lynx-ppc-low.c: Likewise.
6542 * tracepoint.c: Likewise.
6543
8980bdf6
GB
65442014-08-07 Gary Benson <gbenson@redhat.com>
6545
6546 * server.h: Do not include stdarg.h.
6547 * nto-low.c: Likewise.
6548
d7096f71
GB
65492014-08-07 Gary Benson <gbenson@redhat.com>
6550
6551 * server.h: Do not include stdlib.h.
6552 * inferiors.c: Likewise.
6553 * linux-low.c: Likewise.
6554 * regcache.c: Likewise.
6555 * spu-low.c: Likewise.
6556 * tracepoint.c: Likewise.
6557 * utils.c: Likewise.
6558
d02f550d
GB
65592014-08-07 Gary Benson <gbenson@redhat.com>
6560
6561 * server.h: Do not include stdio.h.
6562 * linux-low.c: Likewise.
6563 * remote-utils.c: Likewise.
6564 * spu-low.c: Likewise.
6565 * utils.c: Likewise.
6566 * wincecompat.c: Likewise.
6567
87f6c4e3
GB
65682014-08-06 Gary Benson <gbenson@redhat.com>
6569
6570 * regcache.c (init_register_cache): Move conditionals inside if.
6571
7089dca4
GB
65722014-08-06 Gary Benson <gbenson@redhat.com>
6573
6574 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6575
462f517e
GB
65762014-07-31 Gary Benson <gbenson@redhat.com>
6577
6578 * ax.h: Do not include server.h.
6579 * gdbthread.h: Likewise.
6580 * lynx-low.h: Likewise.
6581 * notif.h: Likewise.
6582
976411d6
GB
65832014-07-30 Gary Benson <gbenson@redhat.com>
6584
6585 * server.h: Include common-defs.h.
6586 Do not include config.h or build-gnulib-gdbserver/config.h.
6587
d41f6d8e
GB
65882014-07-30 Gary Benson <gbenson@redhat.com>
6589
6590 * hostio-errno.c: Move server.h to top of includes list.
6591 * inferiors.c: Likewise.
6592 * linux-x86-low.c: Likewise.
6593 * notif.c: Include server.h.
6594
314c6a35
TT
65952014-07-24 Tom Tromey <tromey@redhat.com>
6596 Gary Benson <gbenson@redhat.com>
6597
6598 * server.h (CORE_ADDR): Now unsigned.
6599
69ff6be5
PA
66002014-07-16 Pedro Alves <palves@redhat.com>
6601
6602 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6603
ce9e3fe7
PA
66042014-07-15 Pedro Alves <palves@redhat.com>
6605
6606 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6607 copy.
6608
e76126e8
PA
66092014-07-11 Pedro Alves <palves@redhat.com>
6610
6611 * linux-low.c (kill_wait_lwp): New function, based on
6612 kill_one_lwp_callback, but use my_waitpid directly.
6613 (kill_one_lwp_callback, linux_kill): Use it.
6614
8e9db26e
PA
66152014-06-23 Pedro Alves <palves@redhat.com>
6616
6617 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6618 before setting DR0..DR3.
6619
698b3e08
GB
66202014-06-20 Gary Benson <gbenson@redhat.com>
6621
6622 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6623 * configure: Regenerated.
6624 * config.in: Likewise.
6625
125f8a3d
GB
66262014-06-20 Gary Benson <gbenson@redhat.com>
6627
6628 * Makefile.in (SFILES): Update locations for files moved
6629 from common to nat.
6630 (object file files): Reordered.
6631
42995dbd
GB
66322014-06-20 Gary Benson <gbenson@redhat.com>
6633
6634 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6635 (i386_dr_low_set_addr): Likewise.
6636 (i386_dr_low_get_addr): Likewise.
6637 (i386_dr_low_can_set_control): Likewise.
6638 (i386_dr_low_set_control): Likewise.
6639 (i386_dr_low_get_control): Likewise.
6640 (i386_dr_low_get_status): Likewise.
6641 (i386_get_debug_register_length): Likewise.
6642 * linux-x86-low.c (i386_dr_low_set_addr):
6643 Changed signature. Made static.
6644 (i386_dr_low_get_addr): Likewise.
6645 (i386_dr_low_set_control): Likewise.
6646 (i386_dr_low_get_control): Likewise.
6647 (i386_dr_low_get_status): Likewise.
6648 (i386_dr_low): New global variable.
6649 * win32-i386-low.c (i386_dr_low_set_addr):
6650 Changed signature. Made static.
6651 (i386_dr_low_get_addr): Likewise.
6652 (i386_dr_low_set_control): Likewise.
6653 (i386_dr_low_get_control): Likewise.
6654 (i386_dr_low_get_status): Likewise.
6655 (i386_dr_low): New global variable.
6656
e1d2394b
MS
66572014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6658
6659 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6660 * Makefile.in (AR, AR_FLAGS): Define.
6661 * configure: Regenerate.
6662
3a8ee006
GB
66632014-06-19 Gary Benson <gbenson@redhat.com>
6664
6665 * Makefile.in (i386-dregs.o): New rule.
6666 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6667 * i386-low.c (target.h): Remove include.
6668 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6669 (DR_CONTROL_SHIFT): Likewise.
6670 (DR_CONTROL_SIZE): Likewise.
6671 (DR_RW_EXECUTE): Likewise.
6672 (DR_RW_WRITE): Likewise.
6673 (DR_RW_READ): Likewise.
6674 (DR_RW_IORW): Likewise.
6675 (DR_LEN_1): Likewise.
6676 (DR_LEN_2): Likewise.
6677 (DR_LEN_4): Likewise.
6678 (DR_LEN_8): Likewise.
6679 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6680 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6681 (DR_ENABLE_SIZE): Likewise.
6682 (DR_LOCAL_SLOWDOWN): Likewise.
6683 (DR_GLOBAL_SLOWDOWN): Likewise.
6684 (DR_CONTROL_RESERVED): Likewise.
6685 (I386_DR_CONTROL_MASK): Likewise.
6686 (I386_DR_VACANT): Likewise.
6687 (I386_DR_LOCAL_ENABLE): Likewise.
6688 (I386_DR_GLOBAL_ENABLE): Likewise.
6689 (I386_DR_DISABLE): Likewise.
6690 (I386_DR_SET_RW_LEN): Likewise.
6691 (I386_DR_GET_RW_LEN): Likewise.
6692 (I386_DR_WATCH_HIT): Likewise.
6693 (i386_wp_op_t): Likewise.
6694 (i386_show_dr): Likewise.
6695 (i386_length_and_rw_bits): Likewise.
6696 (i386_insert_aligned_watchpoint): Likewise.
6697 (i386_remove_aligned_watchpoint): Likewise.
6698 (i386_handle_nonaligned_watchpoint): Likewise.
6699 i386_update_inferior_debug_regs(): Likewise.
6700 (i386_dr_insert_watchpoint): Likewise.
6701 (i386_dr_remove_watchpoint): Likewise.
6702 (i386_dr_region_ok_for_watchpoint): Likewise.
6703 (i386_dr_stopped_data_address): Likewise.
6704 (i386_dr_stopped_by_watchpoint): Likewise.
6705
8f26655c
GB
67062014-06-19 Gary Benson <gbenson@redhat.com>
6707
6708 * i386-low.c (i386_dr_show): Renamed to
6709 i386_show_dr and made static. All uses updated.
6710 (i386_dr_length_and_rw_bits): Renamed to
6711 i386_length_and_rw_bits and made static.
6712 All uses updated.
6713 (i386_dr_insert_aligned_watchpoint): Renamed to
6714 i386_insert_aligned_watchpoint and made static.
6715 All uses updated.
6716 (i386_dr_remove_aligned_watchpoint): Renamed to
6717 i386_remove_aligned_watchpoint and made static.
6718 All uses updated.
6719 (i386_dr_update_inferior_debug_regs): Renamed to
6720 i386_update_inferior_debug_regs and made static.
6721 All uses updated.
6722
b9228891
GB
67232014-06-18 Gary Benson <gbenson@redhat.com>
6724
5171def3
GB
6725 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6726 (i386_dr_low_can_set_control): Likewise.
6727 (i386_get_debug_register_length): Likewise.
6728 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6729 (i386_dr_low_can_set_control): Likewise.
6730 (i386_get_debug_register_length): Likewise.
6731
67322014-06-17 Gary Benson <gbenson@redhat.com>
6733
b9228891
GB
6734 * i386-low.h (i386-dregs.h): New include.
6735 (DR_FIRSTADDR): Now in i386-dregs.h.
6736 (DR_LASTADDR): Likewise.
6737 (DR_NADDR): Likewise.
6738 (DR_STATUS): Likewise.
6739 (DR_CONTROL): Likewise.
6740 (i386_debug_reg_state): Likewise.
6741 (i386_dr_insert_watchpoint): Likewise.
6742 (i386_dr_remove_watchpoint): Likewise.
6743 (i386_dr_region_ok_for_watchpoint): Likewise.
6744 (i386_dr_stopped_data_address): Likewise.
6745 (i386_dr_stopped_by_watchpoint): Likewise.
6746 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6747
4be83cc2
GB
67482014-06-18 Gary Benson <gbenson@redhat.com>
6749
6750 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6751 i386_dr_insert_watchpoint.
6752 (i386_low_remove_watchpoint): Renamed to
6753 i386_dr_remove_watchpoint.
6754 (i386_low_region_ok_for_watchpoint): Renamed to
6755 i386_dr_region_ok_for_watchpoint.
6756 (i386_low_stopped_data_address): Renamed to
6757 i386_dr_stopped_data_address.
6758 (i386_low_stopped_by_watchpoint): Renamed to
6759 i386_dr_stopped_by_watchpoint.
6760 * i386-low.c (i386_show_dr): Renamed to
6761 i386_dr_show and made nonstatic. All uses updated.
6762 (i386_length_and_rw_bits): Renamed to
6763 i386_dr_length_and_rw_bits and made nonstatic.
6764 All uses updated.
6765 (i386_insert_aligned_watchpoint): Renamed to
6766 i386_dr_insert_aligned_watchpoint and made nonstatic.
6767 All uses updated.
6768 (i386_remove_aligned_watchpoint): Renamed to
6769 i386_dr_remove_aligned_watchpoint and made nonstatic.
6770 All uses updated.
6771 (i386_update_inferior_debug_regs): Renamed to
6772 i386_dr_update_inferior_debug_regs and made nonstatic.
6773 All uses updated.
6774 (i386_low_insert_watchpoint): Renamed to
6775 i386_dr_insert_watchpoint. All uses updated.
6776 (i386_low_remove_watchpoint): Renamed to
6777 i386_dr_remove_watchpoint. All uses updated.
6778 (i386_low_region_ok_for_watchpoint): Renamed to
6779 i386_dr_region_ok_for_watchpoint. All uses updated.
6780 (i386_low_stopped_data_address): Renamed to
6781 i386_dr_stopped_data_address. All uses updated.
6782 (i386_low_stopped_by_watchpoint): Renamed to
6783 i386_dr_stopped_by_watchpoint. All uses updated.
6784
131aa0d4
GB
67852014-06-18 Gary Benson <gbenson@redhat.com>
6786
6787 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6788 (i386_dr_low_can_set_control): Likewise.
6789 (i386_insert_aligned_watchpoint): New check.
6790
d9305f7f
GB
67912014-06-18 Gary Benson <gbenson@redhat.com>
6792
6793 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6794 Renamed to state.
6795
e927c9fc
GB
67962014-06-18 Gary Benson <gbenson@redhat.com>
6797
6798 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6799 instead of fatal and error.
6800 (i386_handle_nonaligned_watchpoint): Likewise.
6801
1b6d4134
GB
68022014-06-18 Gary Benson <gbenson@redhat.com>
6803
6804 * i386-low.c (i386_get_debug_register_length): New macro.
6805 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6806 (i386_show_dr): Use debug_printf instead of fprintf. Use
6807 phex to format values.
6808
6e62758f
GB
68092014-06-18 Gary Benson <gbenson@redhat.com>
6810
6811 * i386-low.h: Comment changes.
6812 * i386-low.c: Likewise.
6813
fc6e2f03
GB
68142014-06-18 Gary Benson <gbenson@redhat.com>
6815
6816 * i386-low.c: Whitespace changes.
6817
f9d1eeed
TT
68182014-06-12 Tom Tromey <tromey@redhat.com>
6819
6820 * utils.c (freeargv): Remove.
6821
0b04e523
TT
68222014-06-12 Tom Tromey <tromey@redhat.com>
6823
6824 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6825 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6826 (parse_debug_format_options): Likewise.
6827 (gdbserver_usage): Likewise.
6828 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6829 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6830 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6831 against libiberty.
6832 ($(LIBGNU)): Depend on libiberty.
6833 (all-lib): Recurse into all subdirs.
6834 (install-only): Invoke "install" target in subdirs.
6835 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6836 targets.
6837 * configure: Rebuild.
6838 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6839 for vasprintf, vsnprintf, or gettimeofday.
6840 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6841 srv_tgtobj.
6842
270c9937
JB
68432014-06-05 Joel Brobecker <brobecker@adacore.com>
6844
6845 * development.sh: Delete.
6846 * Makefile.in (config.status): Adjust dependency on development.sh.
6847 * configure.ac: Adjust development.sh source call.
6848 * configure: Regenerate.
6849
0a261ed8
PA
68502014-06-02 Pedro Alves <palves@redhat.com>
6851
6852 * ax.c (gdb_free_agent_expr): New function.
6853 * ax.h (gdb_free_agent_expr): New declaration.
6854 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6855 list.
6856 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6857 static.
6858 (clear_breakpoint_conditions_and_commands): New function.
6859 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6860 (clear_breakpoint_conditions_and_commands): New declaration.
6861
e9dae05e
RR
68622014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6863
6864 * linux-aarch64-low.c (asm/ptrace.h): Include.
6865
5876f503
JK
68662014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6867
6868 Fix TLS access for -static -pthread.
6869 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6870 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6871 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6872
802e8e6d
PA
68732014-05-20 Pedro Alves <palves@redhat.com>
6874
6875 * linux-aarch64-low.c (aarch64_insert_point)
6876 (aarch64_remove_point): No longer check whether the type is
6877 supported here. Adjust to new interface.
6878 (the_low_target): Install aarch64_supports_z_point_type as
6879 supports_z_point_type method.
6880 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6881 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6882 instead of a Z packet char. Adjust.
6883 (arm_supports_z_point_type): New function.
6884 (arm_insert_point, arm_remove_point): Adjust to new interface.
6885 (the_low_target): Install arm_supports_z_point_type.
6886 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6887 (cris_insert_point, cris_remove_point): Adjust to new interface.
6888 Don't check whether the type is supported here.
6889 (the_low_target): Install cris_supports_z_point_type.
6890 * linux-low.c (linux_supports_z_point_type): New function.
6891 (linux_insert_point, linux_remove_point): Adjust to new interface.
6892 * linux-low.h (struct linux_target_ops) <insert_point,
6893 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6894 raw_breakpoint pointer parameter.
6895 <supports_z_point_type>: New method.
6896 * linux-mips-low.c (mips_supports_z_point_type): New function.
6897 (mips_insert_point, mips_remove_point): Adjust to new interface.
6898 Use mips_supports_z_point_type.
6899 (the_low_target): Install mips_supports_z_point_type.
6900 * linux-ppc-low.c (the_low_target): Install NULL as
6901 supports_z_point_type method.
6902 * linux-s390-low.c (the_low_target): Install NULL as
6903 supports_z_point_type method.
6904 * linux-sparc-low.c (the_low_target): Install NULL as
6905 supports_z_point_type method.
6906 * linux-x86-low.c (x86_supports_z_point_type): New function.
6907 (x86_insert_point): Adjust to new insert_point interface. Use
6908 insert_memory_breakpoint. Adjust to new
6909 i386_low_insert_watchpoint interface.
6910 (x86_remove_point): Adjust to remove_point interface. Use
6911 remove_memory_breakpoint. Adjust to new
6912 i386_low_remove_watchpoint interface.
6913 (the_low_target): Install x86_supports_z_point_type.
6914 * lynx-low.c (lynx_target_ops): Install NULL as
6915 supports_z_point_type callback.
6916 * nto-low.c (nto_supports_z_point_type): New.
6917 (nto_insert_point, nto_remove_point): Adjust to new interface.
6918 (nto_target_ops): Install nto_supports_z_point_type.
6919 * mem-break.c: Adjust intro comment.
6920 (struct raw_breakpoint) <raw_type, size>: New fields.
6921 <inserted>: Update comment.
6922 <shlib_disabled>: Delete field.
6923 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6924 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6925 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6926 (raw_bkpt_type_to_target_hw_bp_type): New function.
6927 (find_enabled_raw_code_breakpoint_at): New function.
6928 (find_raw_breakpoint_at): New type and size parameters. Use them.
6929 (insert_memory_breakpoint): New function, based off
6930 set_raw_breakpoint_at.
6931 (remove_memory_breakpoint): New function.
6932 (set_raw_breakpoint_at): Reimplement.
6933 (set_breakpoint): New, based on set_breakpoint_at.
6934 (set_breakpoint_at): Reimplement.
6935 (delete_raw_breakpoint): Go through the_target->remove_point
6936 instead of assuming memory breakpoints.
6937 (find_gdb_breakpoint_at): Delete.
6938 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6939 (find_gdb_breakpoint): New function.
6940 (set_gdb_breakpoint_at): Delete.
6941 (z_type_supported): New function.
6942 (set_gdb_breakpoint_1): New function, loosely based off
6943 set_gdb_breakpoint_at.
6944 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6945 (delete_gdb_breakpoint_at): Delete.
6946 (delete_gdb_breakpoint_1): New function, loosely based off
6947 delete_gdb_breakpoint_at.
6948 (delete_gdb_breakpoint): New function.
6949 (clear_gdb_breakpoint_conditions): Rename to ...
6950 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6951 breakpoint.
6952 (add_condition_to_breakpoint): Make static.
6953 (add_breakpoint_condition): Take a struct breakpoint pointer
6954 instead of an address. Adjust.
6955 (gdb_condition_true_at_breakpoint): Rename to ...
6956 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6957 z_type parameter.
6958 (gdb_condition_true_at_breakpoint): Reimplement.
6959 (add_breakpoint_commands): Take a struct breakpoint pointer
6960 instead of an address. Adjust.
6961 (gdb_no_commands_at_breakpoint): Rename to ...
6962 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6963 parameter. Return true if no breakpoint was found. Change debug
6964 output.
6965 (gdb_no_commands_at_breakpoint): Reimplement.
6966 (run_breakpoint_commands): Rename to ...
6967 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6968 and change return type to boolean.
6969 (run_breakpoint_commands): New function.
6970 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6971 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6972 breakpoint. Go through the_target->remove_point instead of
6973 assuming memory breakpoint.
6974 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6975 software and hardware breakpoints.
6976 (reinsert_raw_breakpoint): Go through the_target->insert_point
6977 instead of assuming memory breakpoint.
6978 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6979 software and hardware breakpoints.
6980 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6981 Check both software and hardware breakpoints.
6982 (validate_inserted_breakpoint): Assert the breakpoint is a
6983 software breakpoint. Set the inserted flag to -1 instead of
6984 setting shlib_disabled.
6985 (delete_disabled_breakpoints): Adjust.
6986 (validate_breakpoints): Only validate software breakpoints.
6987 Adjust to inserted flag change.
6988 (check_mem_read, check_mem_write): Skip breakpoint types other
6989 than software breakpoints. Adjust to inserted flag change.
6990 * mem-break.h (enum raw_bkpt_type): New enum.
6991 (raw_breakpoint, struct process_info): Forward declare.
6992 (Z_packet_to_target_hw_bp_type): Delete declaration.
6993 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6994 (set_gdb_breakpoint, delete_gdb_breakpoint)
6995 (clear_breakpoint_conditions): New declarations.
6996 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6997 (breakpoint_inserted_here): Update comment.
6998 (add_breakpoint_condition, add_breakpoint_commands): Replace
6999 address parameter with a breakpoint pointer parameter.
7000 (gdb_breakpoint_here): Update comment.
7001 (delete_gdb_breakpoint_at): Delete.
7002 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7003 * server.c (process_point_options): Take a struct breakpoint
7004 pointer instead of an address. Adjust.
7005 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7006 delete_gdb_breakpoint.
7007 * spu-low.c (spu_target_ops): Install NULL as
7008 supports_z_point_type method.
7009 * target.h: Include mem-break.h.
7010 (struct target_ops) <prepare_to_access_memory>: Update comment.
7011 <supports_z_point_type>: New field.
7012 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7013 instead of a char. Also take a raw breakpoint pointer.
7014 * win32-arm-low.c (the_low_target): Install NULL as
7015 supports_z_point_type.
7016 * win32-i386-low.c (i386_supports_z_point_type): New function.
7017 (i386_insert_point, i386_remove_point): Adjust to new interface.
7018 (the_low_target): Install i386_supports_z_point_type.
7019 * win32-low.c (win32_supports_z_point_type): New function.
7020 (win32_insert_point, win32_remove_point): Adjust to new interface.
7021 (win32_target_ops): Install win32_supports_z_point_type.
7022 * win32-low.h (struct win32_target_ops):
7023 <supports_z_point_type>: New method.
7024 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7025 instead of a char. Also take a raw breakpoint pointer.
7026
932539e3
PA
70272014-05-20 Pedro Alves <palves@redhat.com>
7028
7029 * mem-break.h: Include break-common.h.
7030 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7031 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7032 (Z_packet_to_target_hw_bp_type): New declaration.
7033 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7034 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7035 (Z_PACKET_ACCESS_WP): Delete macros.
7036 (Z_packet_to_hw_type): Delete function.
7037 * i386-low.h: Don't include break-common.h here.
7038 (Z_packet_to_hw_type): Delete declaration.
7039 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7040 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7041 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7042 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7043 * linux-aarch64-low.c: Don't include break-common.h here.
7044 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7045 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7046 (Z_packet_to_target_hw_bp_type): Delete function.
7047 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7048 function.
7049 (mips_insert_point, mips_remove_point): Use
7050 Z_packet_to_target_hw_bp_type.
7051
4ff0d3d8
PA
70522014-05-20 Pedro Alves <palves@redhat.com>
7053
7054 * linux-aarch64-low.c: Include break-common.h.
7055 (enum target_point_type): Delete.
7056 (Z_packet_to_point_type): Rename to ...
7057 (Z_packet_to_target_hw_bp_type): ... this, and return a
7058 target_hw_bp_type instead.
7059 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7060 instead of an enum target_point_type.
7061 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7062 breakpoint type.
7063 (aarch64_dr_state_insert_one_point)
7064 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7065 (aarch64_handle_aligned_watchpoint)
7066 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7067 Take an enum target_hw_bp_type instead of an enum
7068 target_point_type.
7069 (aarch64_supports_z_point_type): New function.
7070 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7071 use Z_packet_to_target_hw_bp_type.
7072
786dc519
JB
70732014-05-20 Joel Brobecker <brobecker@adacore.com>
7074
7075 * configure.ac: Only use -Werror by default when DEVELOPMENT
7076 is true.
7077 * configure: Regenerate.
7078
9e0aa64f
JK
70792014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7080
7081 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7082 * linux-x86-low.c (X86_64_USER_REGS): New.
7083 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7084
2b577b92
YQ
70852014-04-28 Yao Qi <yao@codesourcery.com>
7086
7087 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7088 name.
7089
94611da2
PA
70902014-04-25 Pedro Alves <palves@redhat.com>
7091
7092 PR server/16255
7093 * linux-low.c (linux_attach_fail_reason_string): New function.
7094 (linux_attach_lwp): Delete.
7095 (linux_attach_lwp_1): Rename to ...
7096 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7097 argument. Remove "initial" parameter. Return int instead of
7098 void. Don't error or warn here.
7099 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7100 failure to attach to the tgid. Call warning when failing to
7101 attach to an lwp.
7102 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7103 argument. Remove "initial" parameter. Return int instead of
7104 void. Don't error or warn here.
7105 (linux_attach_fail_reason_string): New declaration.
7106 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7107 interface change. Use linux_attach_fail_reason_string.
7108
01f9f808
MS
71092014-04-24 Michael Sturm <michael.sturm@mintel.com>
7110 Walfred Tedeschi <walfred.tedeschi@intel.com>
7111
7112 * Makefile.in: Added rules to handle new files
7113 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7114 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7115 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7116 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7117 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7118 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7119 x32-avx512-linux.o.
7120 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7121 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7122 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7123 i386/x32-avx512.xml.
7124 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7125 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7126 i386/x32-avx512-linux.xml.
7127 * i387-fp.c (num_avx512_k_registers): New constant for number
7128 of K registers.
7129 (num_avx512_zmmh_low_registers): New constant for number of
7130 lower ZMM registers (0-15).
7131 (num_avx512_zmmh_high_registers): New constant for number of
7132 higher ZMM registers (16-31).
7133 (num_avx512_ymmh_registers): New contant for number of higher
7134 YMM registers (ymm16-31 added by avx521 on x86_64).
7135 (num_avx512_xmm_registers): New constant for number of higher
7136 XMM registers (xmm16-31 added by AVX512 on x86_64).
7137 (struct i387_xsave): Add space for AVX512 registers.
7138 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7139 Add code to handle AVX512 registers.
7140 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7141 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7142 prototypei from generated file.
7143 (tdesc_amd64_avx512_linux): Likewise.
7144 (init_registers_x32_avx512_linux): Likewise.
7145 (tdesc_x32_avx512_linux): Likewise.
7146 (init_registers_i386_avx512_linux): Likewise.
7147 (tdesc_i386_avx512_linux): Likewise.
7148 (x86_64_regmap): Add AVX512 registers.
7149 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7150 mask.
7151 (initialize_low_arch): Add code to initialize AVX512 registers.
7152
51aa91f9
PA
71532014-04-23 Pedro Alves <palves@redhat.com>
7154
7155 * mem-break.c (find_gdb_breakpoint_at): Make static.
7156 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7157
a4165e94
PA
71582014-04-23 Pedro Alves <palves@redhat.com>
7159
7160 * i386-low.c: Don't include break-common.h here.
7161 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7162 prototype to take target_hw_bp_type as argument instead of a Z
7163 packet char.
7164 * i386-low.h: Include break-common.h here.
7165 (Z_packet_to_hw_type): Declare.
7166 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7167 prototypes.
7168 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7169 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7170 (x86_remove_point): Convert the packet number to a
7171 target_hw_bp_type before calling i386_low_remove_watchpoint.
7172 * win32-i386-low.c (i386_insert_point): Convert the packet number
7173 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7174 (i386_remove_point): Convert the packet number to a
7175 target_hw_bp_type before calling i386_low_remove_watchpoint.
7176
b8acf843
PA
71772014-04-23 Pedro Alves <palves@redhat.com>
7178
7179 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7180
d708bcd1
PA
71812014-04-10 Pedro Alves <palves@redhat.com>
7182
7183 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7184 Check if the condition or command is NULL before checking if the
7185 breakpoint is known. On success, return true.
7186 * mem-break.h (add_breakpoint_condition): Document return.
7187 (add_breakpoint_commands): Add describing comment.
7188 * server.c (skip_to_semicolon): New function.
7189 (process_point_options): Use it.
7190
2eec7d5b
PA
71912014-04-09 Pedro Alves <palves@redhat.com>
7192
7193 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7194 to lwpid_of.
7195
fa96cb38
PA
71962014-02-27 Pedro Alves <palves@redhat.com>
7197
7198 PR 12702
7199 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7200 macros.
7201 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7202 output.
7203 (last_thread_of_process_p): Take a PID argument instead of a
7204 thread pointer.
7205 (linux_wait_for_lwp): Delete.
7206 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7207 functions.
7208 (linux_low_filter_event): New function, party factored out from
7209 linux_wait_for_event.
7210 (linux_wait_for_event): Rename to ...
7211 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7212 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7213 sigsuspend. Check for zombie leaders.
7214 (linux_wait_for_event): Reimplement as wrapper around
7215 linux_wait_for_event_filtered.
7216 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7217 a normal or signal exit is seen, it's the whole process exiting.
7218 (wait_for_sigstop): No longer a for_each_inferior callback.
7219 Rewrite on top of linux_wait_for_event_filtered.
7220 (stop_all_lwps): Call wait_for_sigstop directly.
7221 * server.c (resume, handle_target_event): Handle
7222 TARGET_WAITKIND_NO_RESUMED.
7223
d763de10
JB
72242014-02-26 Joel Brobecker <brobecker@adacore.com>
7225
7226 * win32-low.c (psapi_get_dll_name,
7227 * win32_CreateToolhelp32Snapshot): Delete.
7228 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7229 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7230 Delete.
7231 (handle_load_dll): Add function description.
7232 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7233
850a0f76
JB
72342014-02-26 Joel Brobecker <brobecker@adacore.com>
7235
7236 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7237 Add comment.
7238 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7239 base address when calling win32_add_one_solib.
7240 (handle_load_dll): Delete local variable load_addr.
7241 Remove 0x1000 offset applied to DLL base address when calling
7242 win32_add_one_solib.
7243 (handle_unload_dll): Add comment.
7244
f25b3fc3
JB
72452014-02-26 Joel Brobecker <brobecker@adacore.com>
7246
7247 * win32-low.c (win32_add_all_dlls): Renames
7248 win32_ensure_ntdll_loaded. Rewrite function documentation.
7249 Adjust implementation to always load all DLLs.
7250 Add 0x1000 offset to DLL base address when calling
7251 win32_add_one_solib.
7252 (child_initialization_done): New static global.
7253 (do_initial_child_stuff): Set child_initialization_done to
7254 zero during child initialization, and 1 after. Replace call
7255 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7256 Add comment.
7257 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7258 (handle_unload_dll): Add function documentation.
7259 (get_child_debug_event): Ignore load and unload DLL events
7260 during child initialization.
7261
d86d4aaf
DE
72622014-02-20 Doug Evans <dje@google.com>
7263
3bc32da3 7264 Remove global all_lwps.
d86d4aaf
DE
7265 * inferiors.h (ptid_of): Move here from linux-low.h.
7266 (pid_of, lwpid_of): Ditto.
7267 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7268 parameter is a struct thread_info * now.
7269 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7270 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7271 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7272 directly.
7273 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7274 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7275 * linux-arm-low.c (update_registers_callback): Update, "entry"
7276 parameter is a struct thread_info * now.
7277 Fetch lwpid from current_inferior directly.
7278 (arm_insert_point): Pass &all_threads to find_inferior instead of
7279 &all_lwps.
7280 (arm_remove_point): Ditto.
7281 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7282 (arm_prepare_to_resume): Fetch pid from thread.
7283 (arm_read_description): Fetch lwpid from current_inferior directly.
7284 * linux-low.c (all_lwps): Delete.
7285 (delete_lwp): Delete call to remove_inferior.
7286 (handle_extended_wait): Fetch lwpid from thread.
7287 (add_lwp): Don't set lwp->entry.id. Remove call to
7288 add_inferior_to_list.
7289 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7290 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7291 (kill_one_lwp_callback): Ditto.
7292 (linux_kill): Don't dereference NULL pointer.
7293 Fetch ptid,lwpid from thread.
7294 (get_detach_signal): Fetch ptid from thread.
7295 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7296 Simplify call to regcache_invalidate_thread.
7297 (delete_lwp_callback): Update, "entry" parameter is a
7298 struct thread_info * now. Fetch pid from thread.
7299 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7300 (status_pending_p_callback): Update, "entry" parameter is a
7301 struct thread_info * now. Fetch ptid from thread.
7302 (find_lwp_pid): Update, "entry" parameter is a
7303 struct thread_info * now.
7304 (linux_wait_for_lwp): Fetch pid from thread.
7305 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7306 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7307 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7308 (dequeue_one_deferred_signal): Ditto.
7309 (cancel_breakpoint): Fetch ptid from current_inferior.
7310 (linux_wait_for_event): Pass &all_threads to find_inferior,
7311 not &all_lwps. Fetch ptid, lwpid from thread.
7312 (count_events_callback): Update, "entry" parameter is a
7313 struct thread_info * now.
7314 (select_singlestep_lwp_callback): Ditto.
7315 (select_event_lwp_callback): Ditto.
7316 (cancel_breakpoints_callback): Ditto.
7317 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7318 not &all_lwps.
7319 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7320 (unsuspend_one_lwp): Update, "entry" parameter is a
7321 struct thread_info * now.
7322 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7323 not &all_lwps.
7324 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7325 Fetch lwpid from thread, not lwp.
7326 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7327 Pass &all_threads to find_inferior, not &all_lwps.
7328 (send_sigstop): Fetch lwpid from thread, not lwp.
7329 (send_sigstop_callback): Update, "entry" parameter is a
7330 struct thread_info * now.
7331 (suspend_and_send_sigstop_callback): Ditto.
7332 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7333 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7334 struct thread_info * now.
7335 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7336 from thread, lwp.
7337 (lwp_running): Update, "entry" parameter is a
7338 struct thread_info * now.
7339 (stop_all_lwps): Fetch ptid from thread.
7340 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7341 (linux_resume_one_lwp): Fetch lwpid from thread.
7342 (linux_set_resume_request): Update, "entry" parameter is a
7343 struct thread_info * now. Fetch pid, lwpid from thread.
7344 (resume_status_pending_p): Update, "entry" parameter is a
7345 struct thread_info * now.
7346 (need_step_over_p): Ditto. Fetch lwpid from thread.
7347 (start_step_over): Fetch lwpid from thread.
7348 (linux_resume_one_thread): Update, "entry" parameter is a
7349 struct thread_info * now. Fetch lwpid from thread.
7350 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7351 (proceed_one_lwp): Update, "entry" parameter is a
7352 struct thread_info * now. Fetch lwpid from thread.
7353 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7354 struct thread_info * now.
7355 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7356 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7357 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7358 directly.
7359 (regsets_store_inferior_registers): Ditto.
7360 (fetch_register, store_register): Ditto.
7361 (linux_read_memory, linux_write_memory): Ditto.
7362 (linux_request_interrupt): Ditto.
7363 (linux_read_auxv): Ditto.
7364 (linux_xfer_siginfo): Ditto.
7365 (linux_qxfer_spu): Ditto.
7366 (linux_qxfer_libraries_svr4): Ditto.
7367 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7368 moved to inferiors.h.
7369 (get_lwp): Delete.
7370 (get_thread_lwp): Update.
7371 (struct lwp_info): Delete member "entry". Simplify comment for
7372 member "thread".
7373 (all_lwps): Delete.
7374 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7375 current_inferior directly.
7376 (update_watch_registers_callback): Update, "entry" parameter is a
7377 struct thread_info * now. Fetch pid from thread.
7378 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7379 (mips_insert_point): Fetch lwpid from current_inferior.
7380 Pass &all_threads to find_inferior, not &all_lwps.
7381 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7382 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7383 directly.
7384 (mips_stopped_data_address): Ditto.
7385 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7386 directly.
7387 * linux-tile-low.c (tile_arch_setup): Ditto.
7388 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7389 (update_debug_registers_callback): Update, "entry" parameter is a
7390 struct thread_info * now. Fetch pid from thread.
7391 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7392 Pass &all_threads to find_inferior, not &all_lwps.
7393 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7394 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7395 Pass &all_threads to find_inferior, not &all_lwps.
7396 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7397 (i386_dr_low_get_status): Ditto.
7398 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7399 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7400 (x86_linux_read_description): Ditto.
7401 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7402
3b8361aa
DE
74032014-02-20 Doug Evans <dje@google.com>
7404
7405 * inferiors.c (get_first_inferior): Fix buglet.
7406
f7667f0d
DE
74072014-02-19 Doug Evans <dje@google.com>
7408
7409 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7410 * inferiors.c (add_thread): Change result type to struct thread_info *.
7411 All callers updated.
7412 (add_lwp): Call add_thread here instead of in callers.
7413 All callers updated.
7414 * linux-low.h (get_lwp_thread): Rewrite.
7415 (struct lwp_info): New member "thread".
7416
b3312d80
DE
74172014-02-19 Doug Evans <dje@google.com>
7418
7419 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7420 All callers updated.
7421
ecc6f45c
DE
74222014-02-19 Doug Evans <dje@google.com>
7423
7424 * inferiors.c (add_thread): Fix whitespace.
7425
649ebbca
DE
74262014-02-19 Doug Evans <dje@google.com>
7427
7428 * dll.c (clear_dlls): Replace accessing list implemention details
7429 with API function.
7430 * gdbthread.h (get_first_thread): Declare.
7431 * inferiors.c (for_each_inferior_with_data): New function.
7432 (get_first_thread): New function.
7433 (find_thread_ptid): Simplify.
7434 (get_first_inferior): New function.
7435 (clear_list): Delete.
7436 (one_inferior_p): New function.
7437 (clear_inferior_list): New function.
7438 (clear_inferiors): Update.
7439 * inferiors.h (for_each_inferior_with_data): Declare.
7440 (clear_inferior_list): Declare.
7441 (one_inferior_p): Declare.
7442 (get_first_inferior): Declare.
7443 * linux-low.c (linux_wait_for_event): Replace accessing list
7444 implemention details with API function.
7445 * server.c (target_running): Ditto.
7446 (accumulate_file_name_length): New function.
7447 (emit_dll_description): New function.
7448 (handle_qxfer_libraries): Replace accessing list implemention
7449 details with API function.
7450 (handle_qxfer_threads_worker): New function.
7451 (handle_qxfer_threads_proper): Replace accessing list implemention
7452 details with API function.
7453 (handle_query): Ditto.
7454 (visit_actioned_threads_callback_ftype): New typedef.
7455 (visit_actioned_threads_data): New struct.
7456 (visit_actioned_threads): Rewrite to be find_inferior callback.
7457 (resume): Call find_inferior.
7458 (handle_status): Replace accessing list implemention
7459 details with API function.
7460 (process_serial_event): Replace accessing list implemention details
7461 with API function.
7462 * target.c (set_desired_inferior): Replace accessing list implemention
7463 details with API function.
7464 * tracepoint.c (same_process_p): New function.
7465 (gdb_agent_about_to_close): Replace accessing list implemention
7466 details with API function.
7467 * win32-low.c (child_delete_thread): Replace accessing list
7468 implemention details with API function.
7469 (match_dll_by_basename): New function.
7470 (dll_is_loaded_by_basename): New function.
7471 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7472 details call to dll_is_loaded_by_basename.
7473
80894984
DE
74742014-02-19 Doug Evans <dje@google.com>
7475
7476 * dll.h (struct dll_info): Add comment.
7477 * gdbthread.h (struct thread_info): Add comment.
7478 (current_ptid): Simplify.
7479 * inferiors.c (add_process): Update.
7480 (remove_process): Update.
7481 * inferiors.h (struct process_info): Rename member "head" to "entry".
7482 * linux-low.c (delete_lwp): Update.
7483 (add_lwp): Update.
7484 (last_thread_of_process_p): Update.
7485 (kill_one_lwp_callback, linux_kill): Update.
7486 (status_pending_p_callback): Update.
7487 (wait_for_sigstop): Update. Simplify read of ptid.
7488 (start_step_over): Update.
7489 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7490 (get_lwp_thread): Update.
7491 (struct lwp_info): Rename member "head" to "entry".
7492 * regcache.h (inferior_list_entry): Delete.
7493 * server.c (kill_inferior_callback): Update.
7494 (detach_or_kill_inferior_callback): Update.
7495 (print_started_pid): Update.
7496 (print_attached_pid): Update.
7497 (process_serial_event): Simplify read of ptid.
7498 * thread-db.c (thread_db_create_event): Update.
7499 (thread_db_get_tls_address): Update.
7500 * win32-low.c (current_inferior_ptid): Simplify.
7501
46917d26
TT
75022014-02-19 Tom Tromey <tromey@redhat.com>
7503
7504 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7505 argument.
7506 (target_supports_btrace): Update.
7507
0759a81e
YQ
75082014-02-14 Yao Qi <yao@codesourcery.com>
7509
7510 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7511 (rsp-low-ipa.o): New target.
7512
a7191e8b
TT
75132014-02-12 Tom Tromey <tromey@redhat.com>
7514
7515 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7516 convert_ascii_to_int.
7517 * regcache.c (registers_to_string): Likewise.
7518 * remote-utils.c (decode_M_packet): Likewise.
7519 * server.c (process_serial_event): Likewise.
7520
ff0e980e
TT
75212014-02-12 Tom Tromey <tromey@redhat.com>
7522
7523 * server.c (handle_query, handle_v_run): Use hex2bin, not
7524 unhexify.
7525 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7526
e9371aff
TT
75272014-02-12 Tom Tromey <tromey@redhat.com>
7528
7529 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7530 convert_int_to_ascii.
7531 * regcache.c (registers_to_string, collect_register_as_string):
7532 Likewise.
7533 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7534 Likewise.
7535 * server.c (process_serial_event): Likewise.
7536 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7537 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7538
971dc0b8
TT
75392014-02-12 Tom Tromey <tromey@redhat.com>
7540
7541 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7542 bin2hex, not hexify.
7543 * tracepoint.c (cmd_qtstatus): Likewise.
7544
0a822afb
TT
75452014-02-12 Tom Tromey <tromey@redhat.com>
7546
7547 * remote-utils.c (monitor_output): Pass explicit length to
7548 hexify.
7549
9c3d6531
TT
75502014-02-12 Tom Tromey <tromey@redhat.com>
7551
7552 * tracepoint.c: Include rsp-low.h.
7553 * server.c: Include rsp-low.h.
7554 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7555 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7556 declare.
7557 * remote-utils.c: Include rsp-low.h.
7558 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7559 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7560 (convert_int_to_ascii, convert_ascii_to_int): Move to
7561 common/rsp-low.c.
7562 * regcache.c: Include rsp-low.h.
7563 * ax.c: Include rsp-low.h.
7564 * Makefile.in (SFILES): Add common/rsp-low.c.
7565 (OBS): Add rsp-low.o.
7566 (rsp-low.o): New target.
7567
01fd3ea5
TT
75682014-02-12 Tom Tromey <tromey@redhat.com>
7569
7570 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7571 Include print-utils.h.
7572 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7573 (plongest, thirty_two, phex_nz): Remove.
7574 * Makefile.in (SFILES): Add common/print-utils.c.
7575 (OBS): Add print-utils.o.
7576 (print-utils-ipa.o): New target.
7577 (print-utils.o): New target.
7578 (IPA_OBJS): Add print-utils-ipa.o.
7579
e99dc820
TT
75802014-02-06 Tom Tromey <tromey@redhat.com>
7581
7582 * Makefile.in (SFILES): Fix indentation.
7583
ee1e2d4f
DE
75842014-02-05 Doug Evans <dje@google.com>
7585
7586 * linux-low.c (linux_wait_for_event): Improve comment.
7587 (linux_wait_1): Keep current_inferior in sync with event_child.
7588
f5a02773
DE
75892014-01-22 Doug Evans <dje@google.com>
7590
7591 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7592
87ce2a04
DE
75932014-01-22 Doug Evans <dje@google.com>
7594
7595 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7596 * configure: Regenerate.
7597 * config.in: Regenerate.
7598 * Makefile.in (SFILES): Add debug.c.
7599 (OBS): Add debug.o.
7600 * debug.c: New file.
7601 * debug.h: New file.
7602 * linux-aarch64-low.c (*): Update all debugging printfs to use
7603 debug_printf instead of fprintf.
7604 * linux-arm-low.c (*): Ditto.
7605 * linux-cris-low.c (*): Ditto.
7606 * linux-crisv32-low.c (*): Ditto.
7607 * linux-m32r-low.c (*): Ditto.
7608 * linux-sparc-low.c (*): Ditto.
7609 * linux-x86.c (*): Ditto.
7610 * linux-low.c (*): Ditto.
7611 (linux_wait_1): Add calls to debug_enter, debug_exit.
7612 (linux_wait): Remove redundant debugging printf.
7613 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7614 (linux_resume, unstop_all_lwps): Ditto.
7615 * mem-break.c (*): Update all debugging printfs to use
7616 debug_printf instead of fprintf.
7617 * remote-utils.c (*): Ditto.
7618 * thread-db.c (*): Ditto.
7619 * server.c #include <ctype.h>, "gdb_vecs.h".
7620 (debug_threads): Moved to debug.c.
7621 (*): Update all debugging printfs to use debug_printf instead of
7622 fprintf.
7623 (start_inferior): Replace call to fflush with call to debug_flush.
7624 (monitor_show_help): Mention set debug-format.
7625 (parse_debug_format_options): New function.
7626 (handle_monitor_command): Handle "monitor set debug-format".
7627 (gdbserver_usage): Mention --debug-format.
7628 (main): Parse --debug-format.
7629 * server.h (debug_threads): Declaration moved to debug.h.
7630 #include "debug.h".
7631 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7632 trace_debug_1 that uses debug_printf.
7633 (tracepoint_look_up_symbols): Update all debugging printfs to use
7634 debug_printf instead of fprintf.
7635
e671835b
BS
76362014-01-20 Baruch Siach <baruch@tkos.co.il>
7637
7638 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7639 sys/ptrace.h.
7640
b5737fa9
PA
76412014-01-17 Pedro Alves <palves@redhat.com>
7642
ea38d2a9 7643 PR build/16445
c7faa97a
PA
7644 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7645 defined after including gdb_proc_service.h.
b5737fa9 7646
40ed484e
DE
76472014-01-16 Doug Evans <dje@google.com>
7648
7649 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7650 (match_dll): Use it.
7651
969c39fb
MM
76522014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7653
7654 * target.h (target_ops) <read_btrace>: Change parameters and
7655 return type to allow error reporting.
7656 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7657 trace reading errors on.
7658 * linux-low.c (linux_low_read_btrace): Pass trace reading
7659 errors on.
7660 (linux_low_disable_btrace): New.
7661
ab7f45ba
DE
76622014-01-15 Doug Evans <dje@google.com>
7663
7664 * inferiors.c (thread_id_to_gdb_id): Delete.
7665 * inferiors.h (thread_id_to_gdb_id): Delete.
7666
66af0f44
EZ
76672014-01-13 Eli Zaretskii <eliz@gnu.org>
7668
7669 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7670 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7671 versions.
7672
9939e131
PA
76732014-01-08 Pedro Alves <palves@redhat.com>
7674
7675 * server.c (handle_status): Don't discard previous queued stop
7676 replies or thread's pending status here.
7677 (main) <disconnection>: Do it here instead.
7678
b7ea362b
PA
76792014-01-08 Pedro Alves <palves@redhat.com>
7680
7681 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7682 * server.c (visit_actioned_threads, handle_pending_status): New
7683 function.
7684 (handle_v_cont): Factor out parts to ...
7685 (resume): ... this new function. If in all-stop, and a thread
7686 being resumed has a pending status, report it without actually
7687 resuming.
7688 (myresume): Adjust to use the new 'resume' function.
7689 (clear_pending_status_callback, set_pending_status_callback)
7690 (find_status_pending_thread_callback): New functions.
7691 (handle_status): Handle the case of multiple threads having
7692 interesting statuses to report. Report threads' real last signal
7693 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7694 with an interesting thread to report the status for, instead of
7695 always reporting the status of the first thread.
7696
28498c42
JB
76972014-01-01 Joel Brobecker <brobecker@adacore.com>
7698
7699 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7700 * gdbreplay.c (gdbreplay_version): Likewise.
7701
f45c82da
YZ
77022013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7703
7704 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7705 iov.iov_len with the real length in use.
7706
379a5e2d
JB
77072013-12-13 Joel Brobecker <brobecker@adacore.com>
7708
7709 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7710 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7711 for all targets that use win32-low.c.
7712 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7713 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7714
4210d83e
PA
77152013-12-13 Pedro Alves <palves@redhat.com>
7716
7717 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7718 if equal to TARGET_WAITKIND_LOADED.
7719 * win32-low.c (cached_status): New static global.
7720 (win32_wait): Add declaration.
7721 (do_initial_child_stuff): Flush all initial pending debug events
7722 up to the initial breakpoint.
7723 (win32_wait): If CACHED_STATUS was set, return that instead
7724 of doing a real wait. Remove the code resuming the execution
7725 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7726 during the initial phase. Also remove the code changing
7727 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7728 TARGET_WAITKIND_STOPPED.
7729
e7f0d979
YQ
77302013-12-11 Yao Qi <yao@codesourcery.com>
7731
7732 * notif.c (handle_notif_ack): Return 0 if no notification
7733 matches.
7734
ebcf782c
DE
77352013-11-20 Doug Evans <dje@google.com>
7736
7737 * linux-low.c (linux_set_resume_request): Fix comment.
7738
20ad9378
DE
77392013-11-20 Doug Evans <dje@google.com>
7740
7741 * linux-low.c (resume_status_pending_p): Tweak comment.
7742
a196ebeb
WT
77432013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7744
7745 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7746 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7747 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7748 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7749 (srv_amd64_regobj): Add amd64-mpx.o.
7750 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7751 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7752 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7753 * i387-fp.c (num_pl_bnd_register) Added constant.
7754 (num_pl_bnd_cfg_registers) Added constant.
7755 (struct i387_xsave) Added reserved area and MPX fields.
7756 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7757 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7758 function.
7759 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7760 (init_registers_amd64_mpx_linux): Declare new function.
7761 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7762 (x86_64_regmap): Add MPX registers.
7763 (x86_linux_read_description): Add MPX case.
7764 (initialize_low_arch): Initialize MPX targets.
7765
0080a2f6
TT
77662013-11-18 Tom Tromey <tromey@redhat.com>
7767
7768 * configure: Rebuild.
7769 * configure.ac: Don't check for stdlib.h.
7770 * gdbreplay.c: Unconditionally include stdlib.h.
7771
2978b111
TT
77722013-11-18 Tom Tromey <tromey@redhat.com>
7773
7774 * config.in: Rebuild.
7775 * configure: Rebuild.
7776 * configure.ac: Don't use AC_HEADER_DIRENT.
7777
a3d08894
TT
77782013-11-18 Tom Tromey <tromey@redhat.com>
7779
7780 * server.h: Don't check HAVE_STRING_H.
7781 * gdbreplay.c: Don't check HAVE_STRING_H.
7782 * configure: Rebuild.
7783
0a5dd17d
TT
77842013-11-18 Tom Tromey <tromey@redhat.com>
7785
7786 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7787 LIBGNU.
7788
1bd2f0ba
TT
77892013-11-08 Tom Tromey <tromey@redhat.com>
7790
7791 * configure, config.in: Rebuild.
7792 * configure.ac: Remove unused configury.
7793
3266f10b
TT
77942013-11-08 Tom Tromey <tromey@redhat.com>
7795
7796 * acinclude.m4: Include common.m4, codeset.m4.
7797 * configure, config.in: Rebuild.
7798 * configure.ac: Use GDB_AC_COMMON.
7799
6682d959
AA
78002013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7801
7802 * linux-s390-low.c (HWCAP_S390_TE): New define.
7803 (s390_arch_setup): Consider the TE field in the HWCAP for
7804 determining 'have_regset_tdb'.
7805
fd0a4d76
SDJ
78062013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7807
7808 PR gdb/16014
7809 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7810 call to sizeof.
7811
1a3d890b
PA
78122013-10-02 Pedro Alves <palves@redhat.com>
7813
7814 * server.c (process_serial_event): Don't output "GDBserver
7815 exiting" if GDB is connected through stdio.
7816 * target.c (mywait): Likewise, be silent if GDB is connected
7817 through stdio.
7818
97ad4581
JB
78192013-10-01 Joel Brobecker <brobecker@adacore.com>
7820
7821 * lynx-low.c (lynx_add_threads_after_attach): New function.
7822 (lynx_attach): Remove call to add_thread. Add call to
7823 lynx_add_threads_after_attach instead.
7824
5b4e221c
MF
78252013-09-28 Mike Frysinger <vapier@gentoo.org>
7826
7827 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7828 * config.in, configure: Regenerated.
7829
ee47b2f8
YQ
78302013-09-18 Yao Qi <yao@codesourcery.com>
7831
7832 PR server/15959
7833 * server.c (start_inferior): Clear 'resume_info'.
7834
d6707650 78352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7836
d6707650
JW
7837 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7838 for each register.
7839
9243dd0e 78402013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7841
9243dd0e
JW
7842 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7843 linux-tile-low.o to srv_tgtobj.
7844
c623a6ef
WN
78452013-09-16 Will Newton <will.newton@linaro.org>
7846
7847 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7848 out regs.
7849
fb71d39e
PA
78502013-09-06 Pedro Alves <palves@redhat.com>
7851
7852 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7853 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7854 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7855 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7856 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7857 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7858
8e7e9910
PA
78592013-09-06 Pedro Alves <palves@redhat.com>
7860
7861 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7862 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7863
7c3a12ca
PA
78642013-09-06 Pedro Alves <palves@redhat.com>
7865
7866 * linux-amd64-ipa.c: Include tracepoint.h.
7867 * linux-i386-ipa.c: Include tracepoint.h.
7868
8eb3d7b6
RW
78692013-09-06 Ricard Wanderlof <ricardw@axis.com>
7870
7871 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7872 (ps_get_thread_area): New function.
7873
eddddb9d
RW
78742013-09-06 Ricard Wanderlof <ricardw@axis.com>
7875
7876 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7877 (initialize_low_arch): Call init_registers_crisv32 rather than
7878 init_register_crisv32.
7879
533b0600
PA
78802013-09-05 Pedro Alves <palves@redhat.com>
7881
7882 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7883 to ...
7884 * hostio.h: ... this new file.
7885 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7886 win32-low.c: Include hostio.h.
7887
0ce3d3b5
PA
78882013-09-05 Pedro Alves <palves@redhat.com>
7889
7890 * server.h (gdb_client_data, handler_func, callback_handler_func)
7891 (delete_file_handler, add_file_handler, append_callback_event)
7892 (delete_callback_event, start_event_loop, initialize_event_loop):
7893 Move to event-loop.h and include it.
7894 * event-loop.h: New file.
7895
799cdc37
PA
78962013-09-05 Pedro Alves <palves@redhat.com>
7897
7898 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7899 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7900 (loaded_dll, unloaded_dll): Move to ...
7901 * dll.h: ... this new file.
7902 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7903
6a6bbd9d
PA
79042013-09-05 Pedro Alves <palves@redhat.com>
7905
7906 * server.h (current_process, get_thread_process, all_processes)
7907 (add_inferior_to_list, for_each_inferior, current_inferior)
7908 (remove_inferior, add_process, remove_process, find_process_pid)
7909 (have_started_inferiors_p, have_attached_inferiors_p)
7910 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7911 (clear_inferiors, find_inferior, find_inferior_id)
7912 (inferior_target_data, set_inferior_target_data)
7913 (inferior_regcache_data, set_inferior_regcache_data): Move to
7914 inferiors.h, and include it.
7915 * inferiors.h: New file.
7916
f699aaba
PA
79172013-09-05 Pedro Alves <palves@redhat.com>
7918
7919 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7920 Move ...
72f4393d 7921 * ax.h: ... here.
f699aaba 7922
c144c7a0
PA
79232013-09-05 Pedro Alves <palves@redhat.com>
7924
7925 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7926 tracepoint.h.
7927 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7928 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7929 (handle_tracepoint_general_set, handle_tracepoint_query)
7930 (tracepoint_finished_step, tracepoint_was_hit)
7931 (release_while_stepping_state_list, current_traceframe)
7932 (in_readonly_region, traceframe_read_mem)
7933 (fetch_traceframe_registers, traceframe_read_sdata)
7934 (traceframe_read_info, struct fast_tpoint_collect_status)
7935 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7936 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7937 (supply_fast_tracepoint_registers)
7938 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7939 (ipa_tdesc, claim_trampoline_space)
7940 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7941 (agent_mem_read, agent_get_trace_state_variable_value)
7942 (agent_set_trace_state_variable_value, agent_tsv_read)
7943 (agent_mem_read_string, get_raw_reg_func_addr)
7944 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7945 * tracepoint.h: ... this new file.
7946
ff42e6ab
PA
79472013-09-05 Pedro Alves <palves@redhat.com>
7948
7949 * server.h (perror_with_name, error, fatal, warning, paddress)
7950 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7951 include it.
7952 * utils.h: New file.
7953
541af0f4
PA
79542013-09-05 Pedro Alves <palves@redhat.com>
7955
7956 * server.h (remote_debug, noack_mode, transport_is_reliable)
7957 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7958 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7959 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7960 (write_enn, initialize_async_io, enable_async_io)
7961 (disable_async_io, check_remote_input_interrupt_request)
7962 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7963 (dead_thread_notify, prepare_resume_reply)
7964 (decode_address_to_semicolon, decode_address, decode_m_packet)
7965 (decode_M_packet, decode_X_packet, decode_xfer_write)
7966 (decode_search_memory_packet, unhexify, hexify)
7967 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7968 (look_up_one_symbol, relocate_instruction)
7969 (monitor_output): Move to remote-utils.h, and include it.
7970 * remote-utils.h: New file.
7971
eebdf26b
PA
79722013-09-05 Pedro Alves <palves@redhat.com>
7973
7974 * server.h (_): Delete.
7975
3aafd2ff
PA
79762013-09-02 Pedro Alves <palves@redhat.com>
7977
7978 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7979 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7980 allocated.
7981 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7982
cee83bcb
PM
79832013-09-02 Pierre Muller <muller@sourceware.org>
7984
7985 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7986 or WriteProcessMemory complete successfully and handle
7987 ERROR_PARTIAL_COPY error.
7988
9a13b2fa
PA
79892013-09-02 Pedro Alves <palves@redhat.com>
7990
7991 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7992 error instead of EIO.
7993
602e3198
JK
79942013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7995
7996 PR server/15604
7997 * linux-low.c: Include filestuff.h.
7998 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7999 * lynx-low.c: Include filestuff.h.
8000 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8001 * server.c: Include filestuff.h.
8002 (main): Call notice_open_fds.
8003 * spu-low.c: Include filestuff.h.
8004 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8005
96d7229d
LM
80062013-08-22 Luis Machado <lgustavo@codesourcery.com>
8007
8008 * Makefile.in: Explain why ../target and ../nat are not
8009 listed as include file search paths.
8010 (linux-waitpid.o): New object file rule.
8011 * configure.srv (srv_native_linux_obj): New variable.
8012 Replace all occurrences of linux native object files with
8013 $srv_native_linux_obj.
8014 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8015 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8016 (linux_enable_event_reporting): Remove declaration.
8017 (my_waitpid): Moved to common/linux-waitpid.c.
8018 (linux_wait_for_event): Pass ptid when calling
8019 linux_enable_event_reporting.
8020 (linux_supports_tracefork_flag): Remove.
8021 (linux_enable_event_reporting): Likewise.
8022 (linux_tracefork_grandchild): Remove.
8023 (STACK_SIZE): Moved to common/linux-ptrace.c.
8024 (linux_tracefork_child): Remove.
8025 (linux_test_for_tracefork): Remove.
8026 (linux_look_up_symbols): Call linux_supports_traceclone.
8027 (initialize_low): Remove call to linux_test_for_tracefork.
8028 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8029 common/linux-ptrace.h.
8030 (PTRACE_TYPE_ARG4): Likewise.
8031 Include linux-ptrace.h.
8032
32940073
PA
80332013-08-21 Pedro Alves <palves@redhat.com>
8034
8035 * config.in: Renegerate.
8036
33b60d58 80372013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8038
33b60d58
LM
8039 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8040 (SFILES): Remove $(srcdir)/common/target-common.c and
8041 add $(srcdir)/target/waitstatus.c.
8042 (OBS): Remove target-common.o and add waitstatus.o.
8043 (server_h): Remove $(srcdir)/../common/target-common.h and
8044 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8045 and $(srcdir)/../target/waitstatus.h.
8046 (target-common.o): Remove.
8047 (waitstatus.o): New target object file.
8048 * target.h: Do not include target-common.h and
8049 include target/resume.h, target/wait.h and
8050 target/waitstatus.h.
8051
b8e1b30e
LM
80522013-08-13 Luis Machado <lgustavo@codesourcery.com>
8053
8054 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8055 to PTRACE_TYPE_ARG3.
8056 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8057 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8058 PTRACE_TYPE_ARG4.
8059 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8060 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8061
7a60ad40
YQ
80622013-07-27 Jie Zhang <jie@codesourcery.com>
8063 Daniel Jacobowitz <dan@codesourcery.com>
8064 Yao Qi <yao@codesourcery.com>
8065
8066 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8067 (mips-linux-watch.o): New rule.
8068 (mips_linux_watch_h): New variable.
8069 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8070 srv_tgtobj.
8071 * linux-mips-low.c: Include mips-linux-watch.h.
8072 (struct arch_process_info, struct arch_lwp_info): New.
8073 (update_watch_registers_callback): New function.
8074 (mips_linux_new_process, mips_linux_new_thread) New functions.
8075 (mips_linux_prepare_to_resume, mips_insert_point): New
8076 functions.
8077 (mips_remove_point, mips_stopped_by_watchpoint): New
8078 functions.
8079 (rsp_bp_type_to_target_hw_bp_type): New function.
8080 (mips_stopped_data_address): New function.
8081 (the_low_target): Add watchpoint support functions.
8082
de6f69ad
YQ
80832013-07-27 Yao Qi <yao@codesourcery.com>
8084
8085 * i386-low.c: Include break-common.h.
8086 (enum target_hw_bp_type): Remove.
8087
3360c0bf
LM
80882013-07-24 Luis Machado <lgustavo@codesourcery.com>
8089
8090 * Makefile.in (SFILES): /common/target-common.c.
8091 (OBS): Add target-common.o.
8092 (server_h): Add $(srcdir)/../common/target-common.h.
8093 (target-common.o): New target.
8094 * server.c (queue_stop_reply_callback): Free
8095 status string after use.
8096 * target.c (target_waitstatus_to_string): Remove.
8097 * target.h: Include target-common.h.
8098 (resume_kind): Likewise.
8099 (target_waitkind): Likewise.
8100 (target_waitstatus): Likewise.
8101 (TARGET_WNOHANG): Likewise.
8102
bd885420
YQ
81032013-07-04 Yao Qi <yao@codesourcery.com>
8104
8105 * Makefile.in (host_alias): Use @host_noncanonical@.
8106 (target_alias): Use @target_noncanonical@.
8107 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8108 ACX_NONCANONICAL_HOST.
8109 * configure: Regenerated.
8110
8111 Revert:
8112 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8113
8114 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8115 * configure: Rebuild.
8116 * Makefile.in (version_host, version_target): Get from configure.
8117 (version.c): Use $(version_host) and $(version_target).
8118
17ef446e
PA
81192013-07-03 Pedro Alves <palves@redhat.com>
8120
8121 * Makefile.in (config.status): Depend on development.sh.
8122 * acinclude.m4: Include libmcheck.m4.
8123 * configure: Regenerate.
8124
7a9a7487
MG
81252013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8126
8127 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8128 attribute inside the parentheses.
8129 (winapi_DebugSetProcessKillOnExit): Ditto.
8130 (winapi_DebugBreakProcess): Ditto.
8131 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8132
49b64de6
MG
81332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8134
8135 * notif.h (notif_event): Add a dummy member to avoid compiler
8136 errors.
8137
d5749ee7
PA
81382013-07-01 Pedro Alves <palves@redhat.com>
8139
8140 * hostio.c (HOSTIO_PATH_MAX): Define.
8141 (require_filename, handle_open, handle_unlink, handle_readlink):
8142 Use it.
8143
d8d2a3ee
PA
81442013-07-01 Pedro Alves <palves@redhat.com>
8145
8146 * server.h: Include "pathmax.h".
8147 * linux-low.c: Don't include sys/param.h.
8148 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8149 MAXPATHLEN.
8150 * win32-low.c: Don't include sys/param.h.
8151 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8152
bc7dea8d
PA
81532013-07-01 Pedro Alves <palves@redhat.com>
8154
8155 * event-loop.c: Don't check HAVE_UNISTD_H before including
8156 <unistd.h>.
8157 * gdbreplay.c: Likewise.
8158 * remote-utils.c: Likewise.
8159 * server.c: Likewise.
8160 * configure.ac: Don't check for unistd.h.
8161 * configure: Regenerate.
8162
d6c2da54
TT
81632013-06-28 Tom Tromey <tromey@redhat.com>
8164
8165 * Makefile.in (version.c): Use version.in, not
8166 common/version.in.
8167
257b6bec
MG
81682013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8169
8170 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8171 * configure: Rebuild.
8172 * Makefile.in (version_host, version_target): Get from configure.
8173 (version.c): Use $(version_host) and $(version_target).
8174
86ebe149
DK
81752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8176
8177 Fix trace-status to output user name without trailing colon.
8178 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8179
f30aa5af
DK
81802013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8181
8182 Fix trace-status to output proper start-time and stop-time.
8183 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8184 output start time and stop time in hex as gdb expects.
8185
28a93511
YQ
81862013-06-26 Pedro Alves <pedro@codesourcery.com>
8187
8188 * tracepoint.c (build_traceframe_info_xml): Output trace state
8189 variables present in the trace buffer.
8190
01208463
TT
81912013-06-24 Tom Tromey <tromey@redhat.com>
8192
8193 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8194 create-version.sh.
8195 (version.o): Remove.
8196 * gdbreplay.c: Include version.h.
8197 (version, host_name): Don't declare.
8198 * server.h: Include version.h.
8199 (version, host_name): Don't declare.
8200
760256f9
PA
82012013-06-12 Pedro Alves <palves@redhat.com>
8202
8203 * linux-x86-low.c (linux_is_elf64): Delete global.
8204 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8205 with local linux_pid_exe_is_elf_64_file use.
8206
030031ee
PA
82072013-06-11 Pedro Alves <palves@redhat.com>
8208
8209 * linux-low.c (regset_disabled, disable_regset): New functions.
8210 (regsets_fetch_inferior_registers)
8211 (regsets_store_inferior_registers): Use them.
8212 (initialize_regsets_info); Don't allocate the disabled_regsets
8213 array here.
8214 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8215 comment.
8216
5da6eb0a
PA
82172013-06-11 Pedro Alves <palves@redhat.com>
8218
8219 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8220 xmalloc.
8221
7e5aaa09
PA
82222013-06-11 Pedro Alves <palves@redhat.com>
8223
8224 * linux-x86-low.c (initialize_low_arch): Call
8225 init_registers_x32_avx_linux.
8226
d878444c
JK
82272013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8228
8229 Fix compatibility with Android Bionic.
8230 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8231 it is not empty.
8232
3aee8918
PA
82332013-06-07 Pedro Alves <palves@redhat.com>
8234
5f2b57b5 8235 PR server/14823
3aee8918
PA
8236 * Makefile.in (OBS): Add tdesc.o.
8237 (IPA_OBJS): Add tdesc-ipa.o.
8238 (tdesc-ipa.o): New rule.
8239 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8240 interface.
8241 * linux-low.c (new_inferior): Delete.
8242 (disabled_regsets, num_regsets): Delete.
8243 (linux_add_process): Adjust to set the new per-process
8244 new_inferior flag.
8245 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8246 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8247 was a stop. When calling arch_setup, switch the current inferior
8248 to the thread that got an event.
8249 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8250 (regsets_fetch_inferior_registers)
8251 (regsets_store_inferior_registers): New regsets_info parameter.
8252 Adjust to use it.
8253 (linux_register_in_regsets): New regs_info parameter. Adjust to
8254 use it.
8255 (register_addr, fetch_register, store_register): New usrregs_info
8256 parameter. Adjust to use it.
8257 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8258 parameter regs_info. Adjust to use it.
8259 (linux_fetch_registers): Get the current inferior's regs_info, and
8260 adjust to use it.
8261 (linux_store_registers): Ditto.
8262 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8263 (initialize_low): Don't initialize the target_regsets here. Call
8264 initialize_low_arch.
8265 * linux-low.h (target_regsets): Delete declaration.
8266 (struct regsets_info): New.
8267 (struct usrregs_info): New.
8268 (struct regs_info): New.
8269 (struct process_info_private) <new_inferior>: New field.
8270 (struct linux_target_ops): Delete the num_regs, regmap, and
8271 regset_bitmap fields. New field regs_info.
8272 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8273 * i387-fp.c (num_xmm_registers): Delete.
8274 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8275 calls to new interface.
8276 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8277 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8278 Infer the number of xmm registers from the regcache's target
8279 description.
8280 * i387-fp.h (num_xmm_registers): Delete.
8281 * inferiors.c (add_thread): Don't install the thread's regcache
8282 here.
8283 * proc-service.c (gregset_info): Fetch the current inferior's
8284 regs_info. Adjust to use it.
8285 * regcache.c: Include tdesc.h.
8286 (register_bytes, reg_defs, num_registers)
8287 (gdbserver_expedite_regs): Delete.
8288 (get_thread_regcache): If the thread doesn't have a regcache yet,
8289 create one, instead of aborting gdbserver.
8290 (regcache_invalidate_one): Rename to ...
8291 (regcache_invalidate_thread): ... this.
8292 (regcache_invalidate_one): New.
8293 (regcache_invalidate): Only invalidate registers of the current
8294 process.
8295 (init_register_cache): Add target_desc parameter, and use it.
8296 (new_register_cache): Ditto. Assert the target description has a
8297 non zero registers_size.
8298 (regcache_cpy): Add assertions. Adjust.
8299 (realloc_register_cache, set_register_cache): Delete.
8300 (registers_to_string, registers_from_string): Adjust.
8301 (find_register_by_name, find_regno, find_register_by_number)
8302 (register_cache_size): Add target_desc parameter, and use it.
8303 (free_register_cache_thread, free_register_cache_thread_one)
8304 (regcache_release, register_cache_size): New.
8305 (register_size): Add target_desc parameter, and use it.
8306 (register_data, supply_register, supply_register_zeroed)
8307 (supply_regblock, supply_register_by_name, collect_register)
8308 (collect_register_as_string, collect_register_by_name): Adjust.
8309 * regcache.h (struct target_desc): Forward declare.
8310 (struct regcache) <tdesc>: New field.
8311 (init_register_cache, new_register_cache): Add target_desc
8312 parameter.
8313 (regcache_invalidate_thread): Declare.
8314 (regcache_invalidate_one): Delete declaration.
8315 (regcache_release): Declare.
8316 (find_register_by_number, register_cache_size, register_size)
8317 (find_regno): Add target_desc parameter.
8318 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8319 declarations.
8320 * remote-utils.c: Include tdesc.h.
8321 (outreg, prepare_resume_reply): Adjust.
8322 * server.c: Include tdesc.h.
8323 (gdbserver_xmltarget): Delete declaration.
8324 (get_features_xml, process_serial_event): Adjust.
8325 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8326 declare.
8327 (struct process_info) <tdesc>: New field.
8328 (ipa_tdesc): Declare.
8329 * tdesc.c: New file.
8330 * tdesc.h: New file.
8331 * tracepoint.c: Include tdesc.h.
8332 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8333 (get_context_regcache): Adjust to pass ipa_tdesc down.
8334 (do_action_at_tracepoint): Adjust to get the register cache size
8335 from the context regcache's description.
8336 (traceframe_walk_blocks): Adjust to get the register cache size
8337 from the current trace frame's description.
8338 (traceframe_get_pc): Adjust to get current trace frame's
8339 description and pass it down.
8340 (gdb_collect): Adjust to get the register cache size from the
8341 IPA's description.
8342 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8343 (gdbserver_xmltarget): Delete.
8344 (initialize_low_tracepoint): Set the ipa's target description.
8345 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8346 (initialize_low_tracepoint): Set the ipa's target description.
8347 * linux-x86-low.c: Include tdesc.h.
8348 [__x86_64__] (is_64bit_tdesc): New.
8349 (ps_get_thread_area, x86_get_thread_area): Use it.
8350 (i386_cannot_store_register): Rename to ...
8351 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8352 (i386_cannot_fetch_register): Rename to ...
8353 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8354 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8355 to new interface.
8356 (target_regsets): Rename to ...
8357 (x86_regsets): ... this.
8358 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8359 interface.
8360 (x86_siginfo_fixup): Use is_64bit_tdesc.
8361 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8362 (tdesc_x32_avx_linux, tdesc_x32_linux)
8363 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8364 Declare.
8365 (x86_linux_update_xmltarget): Delete.
8366 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8367 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8368 (AMD64_LINUX_USER64_CS): New.
8369 (x86_linux_read_description): New, based on
8370 x86_linux_update_xmltarget.
8371 (same_process_callback): New.
8372 (x86_arch_setup_process_callback): New.
8373 (x86_linux_update_xmltarget): New.
8374 (x86_regsets_info): New.
8375 (amd64_linux_regs_info): New.
8376 (i386_linux_usrregs_info): New.
8377 (i386_linux_regs_info): New.
8378 (x86_linux_regs_info): New.
8379 (x86_arch_setup): Reimplement.
8380 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8381 (x86_emit_ops): Ditto.
8382 (the_low_target): Adjust. Install x86_linux_regs_info,
8383 x86_cannot_fetch_register, and x86_cannot_store_register.
8384 (initialize_low_arch): New.
8385 * linux-ia64-low.c (tdesc_ia64): Declare.
8386 (ia64_fetch_register): Adjust.
8387 (ia64_usrregs_info, regs_info): New globals.
8388 (ia64_regs_info): New function.
8389 (the_low_target): Adjust.
8390 (initialize_low_arch): New function.
8391 * linux-sparc-low.c (tdesc_sparc64): Declare.
8392 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8393 Adjust.
8394 (sparc_arch_setup): New function.
8395 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8396 (the_low_target): Adjust.
8397 (initialize_low_arch): New function.
8398 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8399 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8400 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8401 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8402 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8403 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8404 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8405 (tdesc_powerpc_isa205_vsx64l): Declare.
8406 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8407 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8408 (ppc_set_pc, ppc_get_hwcap): Adjust.
8409 (ppc_usrregs_info): Forward declare.
8410 (!__powerpc64__) ppc_regmap_adjusted: New global.
8411 (ppc_arch_setup): Adjust to the current process'es target
8412 description.
8413 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8414 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8415 (ppc_store_evrregset): Adjust.
8416 (target_regsets): Rename to ...
8417 (ppc_regsets): ... this, and make static.
8418 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8419 (ppc_regs_info): New function.
8420 (the_low_target): Adjust.
8421 (initialize_low_arch): New function.
8422 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8423 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8424 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8425 (tdesc_s390x_linux64v2): Declare.
8426 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8427 (s390_fill_gregset, s390_store_last_break): Adjust.
8428 (target_regsets): Rename to ...
8429 (s390_regsets): ... this, and make static.
8430 (s390_get_pc, s390_set_pc): Adjust.
8431 (s390_get_hwcap): New target_desc parameter, and use it.
8432 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8433 (s390_arch_setup): Adjust to set the current process'es target
8434 description. Don't adjust the regmap.
8435 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8436 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8437 (regs_info_3264): New globals.
8438 (s390_regs_info): New function.
8439 (the_low_target): Adjust.
8440 (initialize_low_arch): New function.
8441 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8442 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8443 [__mips64] (init_registers_mips_linux)
8444 (init_registers_mips_dsp_linux): Delete defines.
8445 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8446 (have_dsp): New global.
8447 (mips_read_description): New, based on mips_arch_setup.
8448 (mips_arch_setup): Reimplement.
8449 (get_usrregs_info): New function.
8450 (mips_cannot_fetch_register, mips_cannot_store_register)
8451 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8452 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8453 (target_regsets): Rename to ...
8454 (mips_regsets): ... this, and make static.
8455 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8456 (dsp_regs_info, regs_info): New globals.
8457 (mips_regs_info): New function.
8458 (the_low_target): Adjust.
8459 (initialize_low_arch): New function.
8460 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8461 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8462 Declare.
8463 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8464 (arm_read_description): New, with bits factored from
8465 arm_arch_setup.
8466 (arm_arch_setup): Reimplement.
8467 (target_regsets): Rename to ...
8468 (arm_regsets): ... this, and make static.
8469 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8470 (arm_regs_info): New function.
8471 (the_low_target): Adjust.
8472 (initialize_low_arch): New function.
8473 * linux-m68k-low.c (tdesc_m68k): Declare.
8474 (target_regsets): Rename to ...
8475 (m68k_regsets): ... this, and make static.
8476 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8477 (m68k_regs_info): New function.
8478 (m68k_arch_setup): New function.
8479 (the_low_target): Adjust.
8480 (initialize_low_arch): New function.
8481 * linux-sh-low.c (tdesc_sharch): Declare.
8482 (target_regsets): Rename to ...
8483 (sh_regsets): ... this, and make static.
8484 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8485 (sh_regs_info, sh_arch_setup): New functions.
8486 (the_low_target): Adjust.
8487 (initialize_low_arch): New function.
8488 * linux-bfin-low.c (tdesc_bfin): Declare.
8489 (bfin_arch_setup): New function.
8490 (bfin_usrregs_info, regs_info): New globals.
8491 (bfin_regs_info): New function.
8492 (the_low_target): Adjust.
8493 (initialize_low_arch): New function.
8494 * linux-cris-low.c (tdesc_cris): Declare.
8495 (cris_arch_setup): New function.
8496 (cris_usrregs_info, regs_info): New globals.
8497 (cris_regs_info): New function.
8498 (the_low_target): Adjust.
8499 (initialize_low_arch): New function.
8500 * linux-cris-low.c (tdesc_crisv32): Declare.
8501 (cris_arch_setup): New function.
8502 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8503 (cris_regs_info): New function.
8504 (the_low_target): Adjust.
8505 (initialize_low_arch): New function.
8506 * linux-m32r-low.c (tdesc_m32r): Declare.
8507 (m32r_arch_setup): New function.
8508 (m32r_usrregs_info, regs_info): New globals.
8509 (m32r_regs_info): Adjust.
8510 (initialize_low_arch): New function.
8511 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8512 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8513 (tic6x_usrregs_info): Forward declare.
8514 (tic6x_read_description): New function, based on ...
8515 (tic6x_arch_setup): ... this. Reimplement.
8516 (target_regsets): Rename to ...
8517 (tic6x_regsets): ... this, and make static.
8518 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8519 (tic6x_regs_info): New function.
8520 (the_low_target): Adjust.
8521 (initialize_low_arch): New function.
8522 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8523 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8524 (target_regsets): Rename to ...
8525 (xtensa_regsets): ... this, and make static.
8526 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8527 globals.
8528 (xtensa_arch_setup, xtensa_regs_info): New functions.
8529 (the_low_target): Adjust.
8530 (initialize_low_arch): New function.
8531 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8532 (nios2_arch_setup): Set the current process'es tdesc.
8533 (target_regsets): Rename to ...
8534 (nios2_regsets): ... this.
8535 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8536 (nios2_regs_info): New function.
8537 (the_low_target): Adjust.
8538 (initialize_low_arch): New function.
a261b8f5
PA
8539 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8540 (aarch64_arch_setup): Set the current process'es tdesc.
8541 (target_regsets): Rename to ...
8542 (aarch64_regsets): ... this.
8543 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8544 (aarch64_regs_info): New function.
8545 (the_low_target): Adjust.
8546 (initialize_low_arch): New function.
3aee8918
PA
8547 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8548 globals.
8549 (target_regsets): Rename to ...
8550 (tile_regsets): ... this.
8551 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8552 (tile_regs_info): New function.
8553 (tile_arch_setup): Set the current process'es tdesc.
8554 (the_low_target): Adjust.
8555 (initialize_low_arch): New function.
8556 * spu-low.c (tdesc_spu): Declare.
8557 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8558 * win32-arm-low.c (tdesc_arm): Declare.
8559 (arm_arch_setup): New function.
8560 (the_low_target): Install arm_arch_setup instead of
8561 init_registers_arm.
8562 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8563 (init_windows_x86): Rename to ...
8564 (i386_arch_setup): ... this. Set `win32_tdesc'.
8565 (the_low_target): Adjust.
8566 * win32-low.c (win32_tdesc): New global.
8567 (child_add_thread): Don't create the thread cache here.
8568 (do_initial_child_stuff): Set the new process'es tdesc.
8569 * win32-low.h (struct target_desc): Forward declare.
8570 (win32_tdesc): Declare.
8571 * lynx-i386-low.c (tdesc_i386): Declare global.
8572 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8573 * lynx-low.c (lynx_tdesc): New global.
8574 (lynx_add_process): Set the new process'es tdesc.
8575 * lynx-low.h (struct target_desc): Forward declare.
8576 (lynx_tdesc): Declare global.
8577 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8578 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8579 * nto-low.c (nto_tdesc): New global.
8580 (do_attach): Set the new process'es tdesc.
8581 * nto-low.h (struct target_desc): Forward declare.
8582 (nto_tdesc): Declare.
8583 * nto-x86-low.c (tdesc_i386): Declare.
8584 (nto_x86_arch_setup): Set `nto_tdesc'.
8585
b1fbec62
GB
85862013-06-04 Gary Benson <gbenson@redhat.com>
8587
8588 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8589 to qSupported response when appropriate.
8590 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8591 with nonzero-length annex.
8592 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8593 arguments supplied in annex.
8594
d1ec4ce7
DE
85952013-05-31 Doug Evans <dje@google.com>
8596
ac44adcb 8597 PR server/15594
d1ec4ce7
DE
8598 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8599 64 bits in 64-cross-32 environment.
8600
9b25f2d3
PA
86012013-05-28 Pedro Alves <palves@redhat.com>
8602
8603 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8604 (aarch64-without-fpu.c): Delete rule.
8605 * configure.srv (aarch64*-*-linux*): Remove references to
8606 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8607 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8608 declaration.
8609
6740dc9c
PA
86102013-05-24 Pedro Alves <palves@redhat.com>
8611
8612 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8613 instead of strchr/decode_address. Error if the range isn't split
8614 with a ','. Don't assume there's be a ':' in the action.
8615
c2d6af84
PA
86162013-05-23 Yao Qi <yao@codesourcery.com>
8617 Pedro Alves <palves@redhat.com>
8618
8619 * linux-low.c (lwp_in_step_range): New function.
8620 (linux_wait_1): If the thread was range stepping and stopped
8621 outside the stepping range, report the stop to GDB. Otherwise,
8622 continue stepping. Add range stepping debug output.
8623 (linux_set_resume_request): Copy the step range from the resume
8624 request to the lwp.
8625 (linux_supports_range_stepping): New.
8626 (linux_target_ops) <supports_range_stepping>: Set to
8627 linux_supports_range_stepping.
8628 * linux-low.h (struct linux_target_ops)
8629 <supports_range_stepping>: New field.
8630 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8631 * linux-x86-low.c (x86_supports_range_stepping): New.
8632 (the_low_target) <supports_range_stepping>: Set to
8633 x86_supports_range_stepping.
8634 * server.c (handle_v_cont): Handle 'r' action.
8635 (handle_v_requests): Append ";r" if the target supports range
8636 stepping.
8637 * target.h (struct thread_resume) <step_range_start,
8638 step_range_end>: New fields.
8639 (struct target_ops) <supports_range_stepping>:
8640 New field.
8641 (target_supports_range_stepping): New macro.
8642
58794e1a
JB
86432013-05-17 Joel Brobecker <brobecker@adacore.com>
8644
8645 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8646 confusion in comment.
8647
d631c5a7
JB
86482013-05-17 Joel Brobecker <brobecker@adacore.com>
8649
8650 * lynx-low.c (struct process_info_private): New type.
8651 (lynx_add_process): New function.
8652 (lynx_create_inferior, lynx_attach): Replace calls to
8653 add_process by calls to lynx_add_process.
8654 (lynx_resume): If PTID is null, then try using
8655 current_process()->private->last_wait_event_ptid.
8656 Add comments.
8657 (lynx_clear_inferiors): Delete. The contents of that function
8658 has been inlined in lynx_mourn;
8659 (lynx_wait_1): Save the ptid in the process's private data.
8660 (lynx_mourn): Free the process' private data. Replace call
8661 to lynx_clear_inferiors by call to clear_inferiors.
8662
96f7a20f
YQ
86632013-05-17 Yao Qi <yao@codesourcery.com>
8664
8665 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8666 the right place.
8667
db0dfaa0
LM
86682013-05-16 Luis Machado <lgustavo@codesourcery.com>
8669
8670 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8671 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8672 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8673 PT_TEXT_END_ADDR guards. Update comments.
8674 (linux_target_op) <read_offsets>: Conditionally define to
8675 linux_read_offsets if the target is UCLIBC and if it defines
8676 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8677
68f5f838
SL
86782013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8679 Andrew Jenner <andrew@codesourcery.com>
8680
8681 * Makefile.in (SFILES): Add linux-nios2-low.c.
8682 (clean): Add action to delete nios2-linux.c.
8683 (nios2-linux.c): New rule.
8684 * configure.srv: Add nios2*-*-linux*.
8685 * linux-nios2-low.c: New.
8686
1ebff1fd
HAQ
86872013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8688
8689 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8690
f6150862
HZ
86912013-04-25 Hui Zhu <hui@codesourcery.com>
8692
8693 PR gdb/15186
f6150862
HZ
8694 * ax.c (ax_printf): Add fflush.
8695
614c279d
TT
86962013-04-22 Tom Tromey <tromey@redhat.com>
8697
8698 * Makefile.in (SFILES): Add filestuff.c.
8699 (OBS): Add filestuff.o.
8700 (filestuff.o): New target.
8701 * config.in, configure: Rebuild.
8702 * configure.ac: Check for fdwalk, pipe2.
8703
7d4e5717
PA
87042013-04-17 Pedro Alves <palves@redhat.com>
8705
8706 * configure.ac (USE_THREAD_DB): Delete variable.
8707 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8708 Don't AC_SUBST USE_THREAD_DB.
8709 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8710 * config.in, configure: Regenerate.
8711
d5c93e41
PA
87122013-04-16 Pedro Alves <palves@redhat.com>
8713
8714 * linux-low.h (struct lwp_info) <thread_known>: Move under
8715 the USE_THREAD_DB #ifdef.
8716
04f5fe89
PA
87172013-04-16 Pedro Alves <palves@redhat.com>
8718
8719 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8720 (linux-low.o): Delete rule.
8721 * linux-low.h: Always include "gdb_thread_db.h" instead of
8722 conditionally including thread_db.h.
8723 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8724 HAVE_THREAD_DB_H.
8725
480b27bf
JK
87262013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8727
8728 * Makefile.in (install-only): Fix make install regression.
8729
43662968
JK
87302013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8731
8732 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8733 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8734 installation.
8735 * gdbserver.1: Remove.
8736
3e74e146
PA
87372013-03-22 Pedro Alves <palves@redhat.com>
8738
8739 * linux-low.c (handle_extended_wait): Don't call
8740 linux_enable_event_reporting.
8741
a8347a2a
TT
87422013-03-15 Tony Theodore <tonyt@logyst.com>
8743
8744 PR build/9098:
8745 * Makefile.in (SHELL): Use @SHELL@.
8746
eeb56fa7
SDJ
87472013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8748
8749 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8750 compiler warning.
8751
4fa7e2ff
JB
87522013-03-13 Joel Brobecker <brobecker@adacore.com>
8753
8754 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8755 Remove extraneous NULL element.
8756
8ddb1965
YQ
87572013-03-13 Yao Qi <yao@codesourcery.com>
8758
8759 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8760 'V' block in trace frame.
8761
9accd112
MM
87622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8763
8764 * target.h (struct target_ops): Add btrace ops.
8765 (target_supports_btrace): New macro.
8766 (target_enable_btrace): New macro.
8767 (target_disable_btrace): New macro.
8768 (target_read_btrace): New macro.
8769 * gdbthread.h (struct thread_info): Add btrace field.
8770 * server.c: Include btrace-common.h.
8771 (handle_btrace_general_set): New function.
8772 (handle_btrace_enable): New function.
8773 (handle_btrace_disable): New function.
8774 (handle_general_set): Call handle_btrace_general_set.
8775 (handle_qxfer_btrace): New function.
8776 (struct qxfer qxfer_packets[]): Add btrace entry.
8777 * inferiors.c (remove_thread): Disable btrace.
8778 * linux-low: Include linux-btrace.h.
8779 (linux_low_enable_btrace): New function.
8780 (linux_low_read_btrace): New function.
8781 (linux_target_ops): Add btrace ops.
8782 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8783 Add srv_linux_btrace=yes.
8784 (x86_64-*-linux*): Add linux-btrace.o.
8785 Add srv_linux_btrace=yes.
8786 * configure.ac: Define HAVE_LINUX_BTRACE.
8787 * config.in: Regenerated.
8788 * configure: Regenerated.
8789
5cc22e4c
MM
87902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8791
8792 * server.c (handle_qxfer): Preserve error message if -3 is
8793 returned.
8794 (qxfer): Document the -3 return value.
8795
7c97f91e
MM
87962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8797
8798 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8799 (linux_btrace_h): New variable.
8800 (linux-btrace.o): New rule.
8801
be9a119c 88022013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8803 Hafiz Abid Qadeer <abidh@codesourcery.com>
8804
8805 * tracepoint.c (trace_buffer_size): New global.
8806 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8807 (init_trace_buffer): Change to one-argument function. Allocate
8808 trace buffer memory.
8809 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8810 handle QTBuffer:size packet.
8811 (cmd_bigqtbuffer_size): New function.
8812 (initialize_tracepoint): Call init_trace_buffer with
8813 DEFAULT_TRACE_BUFFER_SIZE.
8814 * server.c (handle_query): Add QTBuffer:size in the
8815 supported packets.
8816
e64f7499
YQ
88172013-03-07 Yao Qi <yao@codesourcery.com>
8818
8819 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8820 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8821 of -1.
8822 (cmd_qtsp): Adjust condition. Do post increment.
8823 Set cur_action and cur_step_action back to 0.
8824
f0ae6fc3
PA
88252013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8826
8827 PR server/15236
8828 * linux-low.c (linux_write_memory): Return early success if LEN is
8829 zero.
8830
b5b0b0af
CV
88312013-03-05 Corinna Vinschen <vinschen@redhat.de>
8832
334ad4a8 8833 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8834
589bc927
TT
88352013-02-28 Tom Tromey <tromey@redhat.com>
8836
8837 * configure.ac: Invoke AC_SYS_LARGEFILE.
8838 * configure, config.in: Rebuild.
8839
dfe07582
CV
88402013-02-28 Corinna Vinschen <vinschen@redhat.com>
8841
8842 * win32-low.c: Throughout, fix format strings and casts of
8843 printf-like functions to avoid type related warnings on all
8844 platforms.
8845 (get_child_debug_event): Print dwDebugEventCode as hex since
8846 that's how it's usually documented.
8847
736cd585
YQ
88482013-02-28 Yao Qi <yao@codesourcery.com>
8849
8850 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8851 pulongest.
8852
e1f58301
JW
88532013-02-27 Jiong Wang <jiwang@tilera.com>
8854
8855 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8856 (reg-tilegx32.c): New rule.
8857 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8858 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8859 different register info initializer according to elf class.
8860 (init_registers_tilgx32): New function. The tilegx32 register info
8861 initializer.
8862 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8863 (tile_store_gregset): Likewise.
8864
d171ca78
YQ
88652013-02-27 Yao Qi <yao@codesourcery.com>
8866
8867 * server.c (process_point_options): Print debug message when
8868 debug_threads is true.
8869
282bbdf3
YQ
88702013-02-26 Yao Qi <yao@codesourcery.com>
8871
8872 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8873
aca22551
PA
88742013-02-19 Pedro Alves <palves@redhat.com>
8875 Kai Tietz <ktietz@redhat.com>
8876
8877 PR gdb/15161
8878
8879 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8880 instead of strtoul to extract address from packet.
8881 (process_serial_event) <'z'>: Likewise.
8882
4f3cee1c
YQ
88832013-02-18 Yao Qi <yao@codesourcery.com>
8884
8885 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8886
8e1d55a3
PA
88872013-02-14 Pedro Alves <palves@redhat.com>
8888
8889 Plug memory leak.
8890
8891 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8892 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8893
458820da
PA
88942013-02-14 Pedro Alves <palves@redhat.com>
8895
8896 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8897
baea0dae
PA
88982013-02-14 Pedro Alves <palves@redhat.com>
8899
8900 * tracepoint.c (save_string): Delete.
8901 (add_tracepoint_action): Use savestring instead of save_string.
8902
0b1afbb3
PA
89032013-02-12 Pedro Alves <palves@redhat.com>
8904
8905 * linux-xtensa-low.c: Ditto.
8906 * xtensa-xtregs.c: Ditto.
8907
8a4ac37e
PA
89082013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8909
8910 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8911 thread_db.
8912
148de6bb
MS
89132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8914
8915 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8916 aarch64_num_wp_regs and aarch64_num_bp_regs to
8917 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8918
55fac6e0
MS
89192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8920
8921 * linux-aarch64-low.c (ps_get_thread_area): Replace
8922 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8923
176eb98c
MS
89242013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8925 Marcus Shawcroft <marcus.shawcroft@arm.com>
8926 Nigel Stephens <nigel.stephens@arm.com>
8927 Yufeng Zhang <yufeng.zhang@arm.com>
8928
8929 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8930 (aarch64.c, aarch64-without-fpu.c): New targets.
8931 * configure.srv (aarch64*-*-linux*): New.
8932 * linux-aarch64-low.c: New file.
8933
56f7af9c
MS
89342013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8935
43aaf8b6 8936 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8937 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8938 (dequeue_one_deferred_signal, linux_resume_one_thread)
8939 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8940 (linux_tracefork_grandchild, linux_test_for_tracefork)
8941 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8942 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8943 where the argument is 0.
8944
60f662b0
YQ
89452013-01-25 Yao Qi <yao@codesourcery.com>
8946
8947 * event-loop.c: Include "queue.h".
8948 (gdb_event_p): New typedef.
8949 (struct gdb_event) <next_event>: Remove.
8950 (event_queue): Change to QUEUE(gdb_event_p).
8951 (async_queue_event): Remove.
8952 (gdb_event_xfree): New.
8953 (initialize_event_loop): New.
8954 (process_event): Use API from QUEUE.
8955 (wait_for_event): Likewise.
8956 * server.c (main): Call initialize_event_loop.
8957 * server.h (initialize_event_loop): Declare.
8958
5ae4861a
YQ
89592013-01-18 Yao Qi <yao@codesourcery.com>
8960
8961 * ax.h (struct eval_agent_expr_context): New.
8962 (gdb_eval_agent_expr): Update declaration.
8963 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8964 TFRAME. Add new argument CTX.
8965 * server.h (struct eval_agent_expr_context): Declare.
8966 (agent_mem_read, agent_tsv_read): Update declaration.
8967 (agent_mem_read_string): Likewise.
8968 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8969 (add_traceframe_block): Add new argument TPOINT.
8970 Increase TPOINT->traceframe_usage.
8971 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8972 eval_tracepoint_agent_expr.
8973 (condition_true_at_tracepoint): Likewise.
8974 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8975 (agent_mem_read_string, agent_tsv_read): Likewise.
8976
85e00e85
YQ
89772013-01-16 Yao Qi <yao@codesourcery.com>
8978
8979 * linux-low.c (linux_resume_one_lwp): Don't check
8980 'lwp->bp_reinsert != 0'.
8981
4039cf45
JB
89822013-01-07 Joel Brobecker <brobecker@adacore.com>
8983 Pedro Alves <palves@redhat.com>
8984
8985 * lynx-low.c (ptrace_request_to_str): Define a temporary
8986 macro and use it to simplify this function's implementation.
8987
9044dee2
JB
89882013-01-07 Joel Brobecker <brobecker@adacore.com>
8989
8990 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8991 sets errno.
8992
e6352c8f
JB
89932013-01-07 Joel Brobecker <brobecker@adacore.com>
8994
8995 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8996
50681a27
JB
89972013-01-07 Joel Brobecker <brobecker@adacore.com>
8998
8999 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9000
3f6e77ef
JB
90012013-01-07 Joel Brobecker <brobecker@adacore.com>
9002
9003 * lynx-low.c (lynx_resume): Use the resume_info parameter
9004 to determine the ptid for the lynx_ptrace call, unless
9005 it is equal to minus_one_ptid, in which case we use the
9006 ptid of the current_inferior.
9007 (lynx_wait_1): After having received a thread create/exit
9008 event, resume the inferior's execution using the signaling
9009 thread's ptid, rather than the old ptid.
9010
7fda33ae
JB
90112013-01-07 Joel Brobecker <brobecker@adacore.com>
9012
9013 * lynx-low.c (lynx_resume): Delete variable ret.
9014
b9786c74
JB
90152013-01-01 Joel Brobecker <brobecker@adacore.com>
9016
9017 * gdbreplay.c (gdbreplay_version): Update copyright year.
9018 * server.c (gdbserver_version): Likewise.
9019
8b93d60f
JB
90202012-12-17 Joel Brobecker <brobecker@adacore.com>
9021
9022 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9023 new thread.
9024
037335a7
JB
90252012-12-17 Joel Brobecker <brobecker@adacore.com>
9026
9027 * lynx-low.c (ptrace_request_to_str): Add handling for
9028 PTRACE_GETTRACESIG.
9029
52d4cbd8
JB
90302012-12-17 Joel Brobecker <brobecker@adacore.com>
9031
9032 * lynx-low.c (lynx_attach): Delete variable new_process.
9033
ab8f6ca9
JB
90342012-12-17 Joel Brobecker <brobecker@adacore.com>
9035
9036 * lynx-low.c (lynx_create_inferior): Delete variable
9037 new_process.
9038
78cbc024
JB
90392012-12-17 Joel Brobecker <brobecker@adacore.com>
9040
9041 * lynx-low.c (ptrace_request_to_str): Do not handle
9042 PTRACE_GETTHREADLIST if this macro does not exist.
9043
14a00470
YQ
90442012-12-15 Yao Qi <yao@codesourcery.com>
9045
9046 * Makefile.in (OBS): Add notif.o.
9047 * notif.c, notif.h: New.
9048 * server.c: Include "notif.h".
9049 (struct vstop_notif) <next>: Remove.
9050 <base>: New field.
9051 (queue_stop_reply): Update.
9052 (push_event, send_next_stop_reply): Remove.
9053 (discard_queued_stop_replies): Update.
9054 (notif_stop): New variable.
9055 (handle_v_stopped): Remove.
9056 (handle_v_requests): Don't call handle_v_stopped. Call
9057 handle_ack_notif instead.
9058 (queue_stop_reply_callback): Call notif_event_enque instead
9059 of queue_stop_reply.
9060 (handle_status): Don't call send_next_stop_reply, call
9061 notif_write_event instead.
9062 (kill_inferior_callback): Likewise.
9063 (detach_or_kill_inferior_callback): Likewise.
9064 (main): Call initialize_notif.
9065 (process_serial_event): Call QUEUE_is_empty.
9066 (handle_target_event): Call notif_push instead of push event.
9067 * server.h (push_event): Remove declaration.
9068
61c125b9
TT
90692012-12-10 Tom Tromey <tromey@redhat.com>
9070
9071 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9072 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9073 macros.
9074 (.c.o): Rewrite.
9075 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9076 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9077 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9078 (amd64-linux-ipa.o, ax.o): Rewrite.
9079 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9080 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9081 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9082 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9083 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9084 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9085 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9086 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9087 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9088 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9089 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9090 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9091 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9092 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9093 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9094 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9095 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9096 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9097 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9098 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9099 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9100 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9101 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9102 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9103 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9104 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9105 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9106 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9107 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9108 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9109 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9110 (reg-tilegx.o): Remove.
9111 (all_object_files): New macro.
9112 Include .deps files.
9113 * aclocal.m4, configure: Rebuild.
9114 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9115 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9116 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9117
e90e9ad9
TT
91182012-12-05 Tom Tromey <tromey@redhat.com>
9119
9120 PR gdb/14917:
9121 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9122
02d403bf 91232012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9124
9125 * configure.ac: Check for linux/perf_event.h.
9126 * config.in: Regenerated.
9127 * configure: Regenerated.
9128
0270a750
PA
91292012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9130
9131 * hostio.c (handle_readlink): Decrease buffer size
9132 parameter passed to readlink by one byte.
9133
8c29b58e
YQ
91342012-11-26 Yao Qi <yao@codesourcery.com>
9135
9136 * configure.ac (build_warnings): Append '-Wempty-body'.
9137 * configure: Regenerated.
9138 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9139 body.
9140
8bdce1ff
PM
91412012-11-15 Pierre Muller <muller@sourceware.org>
9142
9143 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9144 * config.in: Regenerate.
9145 * configure: Regenerate.
9146 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9147 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9148 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9149 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9150 header.
9151 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9152 instead of <sys/wait.h> header.
9153 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9154
02d403bf 91552012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9156
9157 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9158 (various make rules): Remove -DGDBSERVER
9159
fbd5db48
YQ
91602012-11-09 Yao Qi <yao@codesourcery.com>
9161
9162 * spu-low.c (current_ptid): Move it to ..
9163 * gdbthread.h: ... here. New.
9164 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9165 * server.c (myresume, process_serial_event): Likewise.
9166 * thread-db.c (thread_db_find_new_threads): Likewise.
9167 * tracepoint.c (run_inferior_command): Likewise.
9168
b3dc46ff
AB
91692012-10-01 Andrew Burgess <aburgess@broadcom.com>
9170
9171 * server.c (handle_search_memory_1): Include access length in
9172 warning message.
9173
07c04788
HPN
91742012-09-05 Michael Brandt <michael.brandt@axis.com>
9175
9176 * linux-crisv32-low.c: Fix compile errors.
9177
918d227b
YQ
91782012-09-04 Yao Qi <yao@codesourcery.com>
9179
9180 * tracepoint.c (cmd_qtsv): Adjust debug message.
9181 Don't check CUR_TPOINT.
9182
18c1b81a
YQ
91832012-08-28 Yao Qi <yao@codesourcery.com>
9184
9185 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9186 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9187 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9188 Remove declarations of xmalloc, xreallloc, xstrdup and
9189 freeargv.
9190 * Makefile.in (libiberty_h): New.
9191 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9192 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9193
dc82f37b
YQ
91942012-08-23 Yao Qi <yao@codesourcery.com>
9195
9196 * server.h: Remove declaration of 'xsnprintf'.
9197
406b1477
KS
91982012-08-22 Keith Seitz <keiths@redhat.com>
9199
9200 * server.h: Include build-gnulib-gbserver/config.h.
9201 * gdbreplay.c: Likewise.
9202
e6712ff1
DE
92032012-08-08 Doug Evans <dje@google.com>
9204
9205 * Makefile.in (SFILES): Add gdb_vecs.c.
9206 (OBS): Add gdb_vecs.o.
9207 (gdb_vecs_h, host_defs_h): New variables.
9208 (thread-db.o): Add $(gdb_vecs_h) dependency.
9209 (gdb_vecs.o): New rule.
9210 * thread-db.c: #include "gdb_vecs.h".
9211 (thread_db_load_search): Use a vector to iterate over path elements.
9212 Handle text appearing after "$pdir".
9213
9214 * configure.ac: Add check for strstr.
9215 * config.in: Regenerate.
9216 * configure: Regenerate.
9217
7c3270ae
UW
92182012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9219
9220 * hostio.c (handle_pread): If pread fails, fall back to attempting
9221 lseek/read.
9222 (handle_pwrite): Likewise for pwrite.
9223
b62e2b27
UW
92242012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9225
9226 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9227 between unsupported TYPE and unimplementable ADDR/LEN combination.
9228 (arm_insert_point): Act on new return value.
9229
78a99e91
PA
92302012-07-31 Pedro Alves <palves@redhat.com>
9231
9232 * server.c (process_point_options): Only skip tokens if we find
9233 one that is unrecognized. Don't treat 'X' specially while
9234 skipping unrecognized tokens.
9235
fcf303ab
UW
92362012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9237
9238 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9239 to 4-byte-align HW breakpoint addresses for Thumb.
9240
7255706c
YQ
92412012-07-27 Yao Qi <yao@codesourcery.com>
9242
9243 PR remote/14161.
9244
9245 * server.h: Declare gdb_agent_about_to_close.
9246 * target.c (kill_inferior): Include "agent.h".
9247 New. Send command 'kill'.
9248 * target.h (kill_inferior): Removed macro.
9249 * tracepoint.c (gdb_agent_about_to_close): New.
9250 (gdb_agent_helper_thread): Handle command 'close'.
9251 Wait endlessly until the inferior stops.
9252 Install gdb_agent_remove_socket to atexit hook.
9253 (agent_socket_name): New static variable.
9254 (gdb_agent_socket_init): Replace local variable 'name' with
9255 'agent_socket_name'.
9256 (gdb_agent_remove_socket): New.
9257
5a3f286f
YQ
92582012-07-27 Yao Qi <yao@codesourcery.com>
9259
9260 * server.c (process_point_options): Stop at 'X' when parsing.
9261
961bd387
ME
92622012-07-19 Michael Eager <eager@eagercon.com>
9263
a261b8f5 9264 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9265 to hw_execute.
9266 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9267 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9268 hardware breakpoint.
9269
aa7c7447
JK
92702012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9271
9272 * gdbserver/linux-low.c (initialize_low): Call
9273 linux_ptrace_init_warnings.
9274
7f216e7c
DE
92752012-07-02 Doug Evans <dje@google.com>
9276
9277 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9278 pointer to int.
9279
d3ce09f5
SS
92802012-07-02 Stan Shebs <stan@codesourcery.com>
9281
9282 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9283 (ax.o): Add it to build rule.
9284 (ax-ipa.o): Ditto.
9285 (OBS): Add format.o.
9286 (IPA_OBS): Add format.o.
9287 * server.c (handle_query): Claim support for breakpoint commands.
9288 (process_point_options): Add command case.
9289 (process_serial_event): Leave running if there are printfs in
9290 effect.
9291 * mem-break.h (any_persistent_commands): Declare.
9292 (add_breakpoint_commands): Declare.
9293 (gdb_no_commands_at_breakpoint): Declare.
9294 (run_breakpoint_commands): Declare.
9295 * mem-break.c (struct point_command_list): New struct.
9296 (struct breakpoint): New field command_list.
9297 (any_persistent_commands): New function.
9298 (add_commands_to_breakpoint): New function.
9299 (add_breakpoint_commands): New function.
9300 (gdb_no_commands_at_breakpoint): New function.
9301 (run_breakpoint_commands): New function.
9302 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9303 locally.
9304 * ax.c: Include format.h.
9305 (ax_printf): New function.
9306 (gdb_eval_agent_expr): Add printf opcode.
9307
2f8f6aed
YQ
93082012-06-13 Yao Qi <yao@codesourcery.com>
9309
9310 * server.c (start_inferior): Remove duplicated writes to fields
9311 'last_resume_kind' and 'last_status' of 'current_inferior'.
9312
0c9070b3
YQ
93132012-06-12 Yao Qi <yao@codesourcery.com>
9314 Pedro Alves <palves@redhat.com>
9315
9316 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9317 comment.
9318 * server.c (handle_v_cont): Extend comment.
9319
c52daf70
YQ
93202012-06-11 Yao Qi <yao@codesourcery.com>
9321
9322 * linux-low.c (linux_attach): Add 'static'.
9323
d38bbb0a
YQ
93242012-06-06 Yao Qi <yao@codesourcery.com>
9325
9326 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9327
89dc0afd
JK
93282012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9329
9330 Fix gcc -flto compilation warning.
9331 * server.c (main): Make variable multi_mode and attach volatile.
9332
75f62ce7
TJB
93332012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9334
9335 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9336 if the platform doesn't know about it.
9337
65f479b6
PA
93382012-05-30 Jeff Kenton <jkenton@tilera.com>
9339
9340 * Makefile.in (SFILES): Add linux-tile-low.c.
9341 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9342 * configure.srv: Handle tilegx-*-linux*.
9343 * linux-tile-low.c: New file.
9344
0c5bf5a9
JK
93452012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9346
9347 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9348
a493e3e2
PA
93492012-05-24 Pedro Alves <palves@redhat.com>
9350
9351 PR gdb/7205
9352
43aaf8b6 9353 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9354
2ea28649
PA
93552012-05-24 Pedro Alves <palves@redhat.com>
9356
9357 PR gdb/7205
9358
9359 Replace target_signal with gdb_signal throughout.
9360
8d409d16
MR
93612012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9362
9363 * linux-low.c (linux_store_registers): Avoid the copying sequence
9364 when no data has been retrieved by ptrace.
9365
23512c01
MGD
93662012-05-22 Will Deacon <will.deacon@arm.com>
9367
9368 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9369 Include asm/ptrace.h.
9370 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9371 already defined.
9372
4934b29e
MR
93732012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9374
9375 * linux-low.c (linux_store_registers): Don't re-retrieve data
9376 with ptrace that has already been obtained from /proc. Always
9377 copy any data retrieved with ptrace to the buffer supplied.
9378
bde24c0a
PA
93792012-05-11 Yao Qi <yao@codesourcery.com>
9380 Pedro Alves <palves@redhat.com>
9381
9382 * linux-low.c (enum stopping_threads_kind): New.
9383 (stopping_threads): Change type to `enum stopping_threads_kind'.
9384 (handle_extended_wait): If stopping and suspending threads, leave
9385 the new_lwp suspended too.
9386 (linux_wait_for_event): Adjust.
9387 (stop_all_lwps): Set `stopping_threads' to
9388 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9389 whether we're suspending threads or just stopping them. Assert no
9390 recursion happens.
9391
623b6bdf
YQ
93922012-04-29 Yao Qi <yao@codesourcery.com>
9393
9394 * server.h: Move some code to ...
9395 * gdbthread.h: ... here. New.
9396 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9397 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9398 (nto-low.o, win32-low.o): Likewise.
9399 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9400 * regcache.c, remote-utils.c, server.c: Likewise.
9401 * target.c, tracepoint.c, win32-low.c: Likewise.
9402
f15f9948
TJB
94032012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9404
9405 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9406 (PTRACE_ARG4_TYPE): Likewise.
9407 (PTRACE_XFER_TYPE): Likewise.
9408 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9409 ptrace to PTRACE_ARG3_TYPE.
9410 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9411 (PTRACE_ARG4_TYPE): Likewise.
9412 (PTRACE_XFER_TYPE): Likewise.
9413 (linux_detach_one_lwp): Cast fourth argument of
9414 ptrace to long then PTRACE_ARG4_TYPE.
9415 (regsets_fetch_inferior_registers): Cast third argument of
9416 ptrace to long then PTRACE_ARG3_TYPE.
9417 (regsets_store_inferior_registers): Likewise.
9418
38ea300a
PA
94192012-04-20 Pedro Alves <palves@redhat.com>
9420
9421 * configure: Regenerate.
9422
c971b7fa
PA
94232012-04-19 Pedro Alves <palves@redhat.com>
9424
43aaf8b6 9425 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9426 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9427 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9428 (all, install-only, uninstall, clean-info, all-lib, clean): No
9429 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9430 (maintainer-clean realclean distclean): Use subdir_do.
9431 (subdir_do): New.
9432 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9433 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9434 * acinclude.m4: Include acx_configure_dir.m4.
9435 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9436 calls. Call AC_PROG_RANLIB. Configure gnulib using
9437 ACX_CONFIGURE_DIR.
9438 (GNULIB): New.
9439 (GNULIB_STDINT_H): Adjust.
9440 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9441 * gdbreplay.c: Include build-gnulib/config.h.
9442 * server.h: Likewise.
9443 * aclocal.m4: Regenerate.
9444 * config.in: Regenerate.
9445 * configure: Regenerate.
c971b7fa 9446
809277f8
PA
94472012-04-19 Pedro Alves <palves@redhat.com>
9448
9449 * Makefile.in (LIBGNU, INCGNU): Adjust.
9450 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9451 (all, install-only, uninstall, clean-info, all-lib, clean)
9452 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9453 * configure.ac: Adjust AC_OUTPUT output.
9454 * aclocal.m4: Regenerate.
9455 * configure: Regenerate.
9456
fd9bb8b8
PA
94572012-04-19 Pedro Alves <palves@redhat.com>
9458
9459 * Makefile.in (generated_files): New.
9460 (server_h): Remove the explicit dependency on config.h, and depend
9461 on $generated_files.
9462
1c298c66
PA
94632012-04-19 Pedro Alves <palves@redhat.com>
9464
9465 * Makefile.in (INCGNU): Add -Ignulib.
9466
57c4b50b
PA
94672012-04-19 Pedro Alves <palves@redhat.com>
9468
9469 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9470 (INCGNU): ... this, and spell out -I here.
9471 (GNULIB_LIB): Rename to ...
9472 (LIBGNU): ... this.
9473 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9474
1030e047
PA
94752012-04-19 Pedro Alves <palves@redhat.com>
9476
9477 * config.in: Regenerate.
9478
447d4319
PA
94792012-04-19 Pedro Alves <palves@redhat.com>
9480
9481 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9482 * server.h (memmem): Remove declaration.
9483 * config.in: Regenerate.
9484 * configure: Regenerate.
9485
aad9eab9
YQ
94862012-04-19 Yao Qi <yao@codesourcery.com>
9487
9488 * Makefile.in (SFILES): Add common/vec.c.
9489 (OBS): Add vec.o.
9490 (vec.o): New rule.
9491
3e10640f
YQ
94922012-04-19 Yao Qi <yao@codesourcery.com>
9493
9494 * remote-utils.c (prepare_resume_reply): Replace with macro
9495 target_core_of_thread.
9496 * server.c (handle_qxfer_threads_proper): Likewise.
9497 * target.h (traget_core_of_thread): New macro.
9498
71622373
PA
94992012-04-18 Pedro Alves <palves@redhat.com>
9500
9501 * aclocal.m4: Regenerate.
9502 * configure: Regenerate.
9503
80d26939
YQ
95042012-04-16 Yao Qi <yao@codesourcery.com>
9505
9506 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9507 duplicated on address.
9508
42476b70
YQ
95092012-04-16 Yao Qi <yao@codesourcery.com>
9510
9511 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9512 (struct tracepoint_action_ops) <send>: New field.
9513 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9514 (agent_expr_send, x_tracepoint_action_send): New.
9515 (l_tracepoint_action_send): New.
9516 (cmd_qtdp): Download and install tracepoint
9517 according to `use_agent'.
9518 (run_inferior_command): Add one more parameter `len'.
9519 Update callers.
9520 (tracepoint_send_agent): New.
9521 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9522
7bc83639
YQ
95232012-04-16 Yao Qi <yao@codesourcery.com>
9524
9525 * tracepoint.c (download_tracepoints): Moved to ...
9526 (cmd_qtstart): ... here.
9527
5f18041e
YQ
95282012-04-14 Yao Qi <yao@codesourcery.com>
9529
9530 * tracepoint.c: Include inttypes.h.
9531 (struct collect_memory_action): Use sized types.
9532 (struct tracepoint): Likewise.
9533 (cmd_qtdp, stop_tracing): Update print specifiers.
9534 (cmd_qtp, response_tracepoint): Likewise.
9535 (collect_data_at_tracepoint): Likewise.
9536 (collect_data_at_step): Likewise.
9537
55a8c076
YQ
95382012-04-14 Yao Qi <yao@codesourcery.com>
9539
9540 Import gnulib module inttypes.
9541 * aclocal.m4, config.in, configure: Regenerated.
9542
dc750257
YQ
95432012-04-14 Yao Qi <yao@codesourcery.com>
9544
9545 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9546 Makefile and config.status at last.
9547
0ab5faf9
YQ
95482012-04-13 Yao Qi <yao@codesourcery.com>
9549
9550 * tracepoint.c: Include stdint.h unconditionally.
9551
18f5fd81
TJB
95522012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9553
9554 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9555 on BFD_HAVE_SYS_PROCFS_TYPE.
9556 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9557 * configure: Regenerate.
9558 * config.in: Likewise.
9559
4d47af5c
L
95602012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9561
9562 * Makefile.in (clean): Also remove x32.c x32-linux.c
9563 x32-avx.c x32-avx-linux.c.
9564 (x32.o): New target.
9565 (x32.c): Likewise.
9566 (x32-linux.o): Likewise.
9567 (x32-linux.c): Likewise.
9568 (x32-avx.o): Likewise.
9569 (x32-avx.c): Likewise.
9570 (x32-avx-linux.o): Likewise.
9571 (x32-avx-linux.c): Likewise.
9572
9573 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9574 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9575 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9576 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9577 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9578 i386/x32-avx-linux.xml.
9579
9580 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9581 (init_registers_x32_avx_linux): Likwise.
9582 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9583 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9584
ecedbe58
PA
95852012-04-13 Pedro Alves <palves@redhat.com>
9586
9587 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9588 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9589 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9590 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9591 the sub-make.
9592
c92b5177
L
95932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9594
9595 * linux-x86-low.c (compat_x32_clock_t): New.
9596 (compat_x32_siginfo_t): Likewise.
9597 (compat_x32_siginfo_from_siginfo): Likewise.
9598 (siginfo_from_compat_x32_siginfo): Likewise.
9599 (linux_is_elf64): Likewise.
9600 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9601 and siginfo_from_compat_x32_siginfo for x32.
9602 (x86_arch_setup): Set linux_is_elf64.
9603
214d508e
L
96042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9605
9606 PR gdb/13969
9607 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9608 e_machine field.
9609 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9610 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9611 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9612 compatible with process.
9613
c9a1864a
YQ
96142012-04-12 Yao Qi <yao@codesourcery.com>
9615
9616 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9617 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9618 (install-only, install-info, clean): Handle sub dir gnulib.
9619 (all-lib, am--refresh): New targets.
9620 (memmem.o): Remove target.
9621 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9622 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9623 (AC_REPLACE_FUNCS): Remove memmem.
9624 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9625 (AC_OUTPUT): Generate Makefile in gnulib/.
9626 * aclocal.m4, config.in, configure: Regenerated.
9627
367ba2c2
MR
96282012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9629
9630 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9631
9d236627
PA
96322012-04-05 Pedro Alves <palves@redhat.com>
9633
9634 -Werror=strict-aliasing
9635
9636 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9637 pointer.
9638
111217b3
PA
96392012-04-04 Pedro Alves <palves@redhat.com>
9640
9641 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9642 (sparc_store_gregset_from_stack, sparc_store_gregset)
9643 (sparc_breakpoint_at): Fix formatting.
9644
8365dcf5
TJB
96452012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9646
9647 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9648 are available.
9649 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9650 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9651 * config.in: Regenerate.
9652 * configure: Likewise.
9653
689cc2ae
PA
96542012-03-29 Pedro Alves <palves@redhat.com>
9655
9656 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9657 Correct ptrace arguments.
9658
c14dfd32
PA
96592012-03-28 Pedro Alves <palves@redhat.com>
9660
9661 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9662 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9663 (IA64_FR1_REGNUM): New defines.
9664 (ia64_fetch_register): New.
9665 (the_low_target): Install it.
9666 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9667 field.
9668 * linux-low.c (linux_fetch_registers): Try the
9669 the_low_target.fetch_register hook first.
9670
9671 * linux-arm-low.c (the_low_target): Adjust.
9672 * linux-bfin-low.c (the_low_target): Adjust.
9673 * linux-cris-low.c (the_low_target): Adjust.
9674 * linux-crisv32-low.c (the_low_target): Adjust.
9675 * linux-m32r-low.c (the_low_target): Adjust.
9676 * linux-m68k-low.c (the_low_target): Adjust.
9677 * linux-mips-low.c (the_low_target): Adjust.
9678 * linux-ppc-low.c (the_low_target): Adjust.
9679 * linux-s390-low.c (the_low_target): Adjust.
9680 * linux-sh-low.c (the_low_target): Adjust.
9681 * linux-sparc-low.c (the_low_target): Adjust.
9682 * linux-tic6x-low.c (the_low_target): Adjust.
9683 * linux-x86-low.c (the_low_target): Adjust.
9684 * linux-xtensa-low.c (the_low_target): Adjust.
9685
63c88e13
PA
96862012-03-26 Pedro Alves <palves@redhat.com>
9687
9688 * server.c (handle_qxfer_libraries): Don't bail early if
9689 the_target->qxfer_libraries_svr4 is not NULL.
9690
fb723180
PA
96912012-03-26 Pedro Alves <palves@redhat.com>
9692
9693 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9694
0afae3cf
PA
96952012-03-23 Pedro Alves <palves@redhat.com>
9696
9697 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9698 "library-list-svr4" element's start tag when the the DSO list is
9699 empty.
9700
485f1ee4
PA
97012012-03-23 Pedro Alves <palves@redhat.com>
9702
9703 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9704 a variable whose type size is the same as the inferior's pointer
9705 size.
9706
a5362b9a
TS
97072012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9708
9709 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9710 struct siginfo.
9711 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9712 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9713 * linux-low.h: Include <signal.h>.
9714 (struct siginfo): Remove forward declaration.
9715 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9716 struct siginfo.
9717
d226c142
MF
97182012-03-21 Mike Frysinger <vapier@gentoo.org>
9719
9720 * .gitignore: Ignore more files.
9721
122f36ef
PA
97222012-03-19 Pedro Alves <palves@redhat.com>
9723 Jan Kratochvil <jan.kratochvil@redhat.com>
9724
9725 * server.c (cont_thread, general_thread): Add describing comments.
9726 (start_inferior): Clear `cont_thread'.
9727 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9728 of a process.
9729
fc3e5175
YQ
97302012-03-15 Yao Qi <yao@codesourcery.com>
9731
9732 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9733 handling to ...
9734 (cmd_qtdp): ... here.
9735
8d0d92cd
YQ
97362012-03-15 Yao Qi <yao@codesourcery.com>
9737
9738 * tracepoint.c (struct tracepoint_action_ops): New.
9739 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9740 (m_tracepoint_action_download): New.
9741 (r_tracepoint_action_download): New.
9742 (x_tracepoint_action_download): New.
9743 (l_tracepoint_action_download): New.
9744 (add_tracepoint_action): Install `action->ops' according type.
9745 (download_tracepoint_1): Move code `download' function pointer
9746 of various tracepoint_action_ops.
9747
87b0bb13
JK
97482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9749
9750 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9751 linux_ptrace_attach_warnings.
9752
5f572dec
JK
97532012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9754
9755 * Makefile.in (linux-ptrace.o): New.
9756 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9757 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9758 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9759 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9760 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9761 of these targets.
9762 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9763
f4647387
YQ
97642012-03-08 Yao Qi <yao@codesourcery.com>
9765 Pedro Alves <palves@redhat.com>
9766
9767 Fix PR server/13392.
9768 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9769 offset of JMP insn.
9770 * tracepoint.c (remove_tracepoint): New.
9771 (cmd_qtdp): Call remove_tracepoint when failed to install.
9772
9b224c5e
PA
97732012-03-07 Pedro Alves <palves@redhat.com>
9774
9775 * linux-low.c (get_detach_signal): New.
9776 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9777 Pass on pending signals to PTRACE_DETACH. Check the result of the
9778 ptrace call.
9779 * server.c (program_signals, program_signals_p): New.
9780 (handle_general_set): Handle QProgramSignals.
9781 * server.h (program_signals, program_signals_p): Declare.
9782
e237a7e2
JK
97832012-03-05 Pedro Alves <palves@redhat.com>
9784 Jan Kratochvil <jan.kratochvil@redhat.com>
9785
9786 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9787 New comment why.
9788
5808517f
YQ
97892012-03-03 Yao Qi <yao@codesourcery.com>
9790
9791 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9792 agent_look_up_symbols.
9793
58b4daa5
YQ
97942012-03-03 Yao Qi <yao@codesourcery.com>
9795
9796 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9797 (linux-x86-low.o): Likewise.
9798 * server.h: Remove in_process_agent_loaded.
9799 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9800 common/agent.c.
9801 Update callers.
9802
8ffcbaaf
YQ
98032012-03-03 Yao Qi <yao@codesourcery.com>
9804
9805 * tracepoint.c (gdb_agent_capability): New global.
9806 (in_process_agent_loaded_ust): Renamed to
9807 `in_process_agent_supports_ust'.
9808 Update callers.
9809 (in_process_agent_supports_ust): Call agent_capability_check.
9810 (clear_installed_tracepoints): Assert that agent supports
9811 agent.
9812
d1feda86
YQ
98132012-03-03 Yao Qi <yao@codesourcery.com>
9814
9815 * linux-low.c (linux_supports_agent): New.
9816 (linux_target_ops): Initialize field `supports_agent' with
9817 linux_supports_agent.
9818 * target.h (struct target_ops) <supports_agent>: New.
9819 (target_supports_agent): New macro.
9820 * server.c (handle_general_set): Handle packet 'QAgent'.
9821 (handle_query): Send `QAgent+'.
9822 * Makefile.in (server.o): Depends on agent.h.
9823
2fa291ac
YQ
98242012-03-03 Yao Qi <yao@codesourcery.com>
9825
9826 * Makefile.in (OBS): Add agent.o.
9827 Add new rule for agent.o.
9828 Track dependence of tracepoint.c on agent.h.
9829 * tracepoint.c (run_inferior_command_1):
9830 (run_inferior_command): Call agent_run_command.
9831 (gdb_ust_connect_sync_socket): Deleted. Move it to
9832 common/agent.c.
9833 (resume_thread, stop_thread): Likewise.
9834 (gdb_ust_socket_init): Renamed to ...
9835 (gdb_agent_socket_init): ... New.
9836 (gdb_ust_thread): Renamed to ...
9837 (gdb_agent_helper_thread): ... New.
9838 (gdb_ust_init): Move some code to ...
9839 (gdb_agent_init): ... here. New.
9840 [HAVE_UST]: Call gdb_ust_init.
9841 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9842 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9843 * config.in, configure: Regenerated.
9844
05044653
PA
98452012-03-02 Pedro Alves <palves@redhat.com>
9846
9847 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9848 * linux-low.c (struct simple_pid_list): New.
9849 (stopped_pids): New a struct simple_pid_list pointer.
9850 (add_to_pid_list, pull_pid_from_list): New.
9851 (handle_extended_wait): Don't assume the first signal new children
9852 report is SIGSTOP. Adjust call to pull_pid_from_list.
9853 (linux_wait_for_lwp): Adjust.
9854
8d00225b
YQ
98552012-03-02 Yao Qi <yao@codesourcery.com>
9856
9857 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9858 debug log.
9859
19560ba5
YQ
98602012-03-02 Yao Qi <yao@codesourcery.com>
9861
9862 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9863 `stop_pc' and `tpoint'. Update caller.
9864
1faeff08
MR
98652012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9866
9867 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9868 * linux-low.c (use_linux_regsets): New macro.
9869 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9870 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9871 (linux_register_in_regsets): New function.
9872 (usr_fetch_inferior_registers): Skip registers covered by
9873 regsets.
9874 (usr_store_inferior_registers): Likewise.
9875 (usr_fetch_inferior_registers): New macro.
9876 (usr_store_inferior_registers): Likewise.
9877 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9878 (linux_store_registers): Likewise.
9879 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9880 prototype.
9881 (init_registers_mips64_dsp_linux): Likewise.
9882 (init_registers_mips_linux): New macro.
9883 (init_registers_mips_dsp_linux): Likewise.
9884 (mips_dsp_num_regs): Likewise.
9885 (DSP_BASE, DSP_CONTROL): New fallback macros.
9886 (mips_base_regs): New macro.
9887 (mips_regmap): Use it. Fix the size.
9888 (mips_dsp_regmap): New variable.
9889 (mips_dsp_regset_bitmap): Likewise.
9890 (mips_arch_setup): New function.
9891 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9892 than mips_regmap.
9893 (mips_cannot_store_register): Likewise.
9894 (the_low_target): Update .arch_setup, .num_regs and .regmap
9895 initializers. Add .regset_bitmap initializer.
9896 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9897 initializer.
9898 * linux-bfin-low.c (the_low_target): Likewise.
9899 * linux-cris-low.c (the_low_target): Likewise.
9900 * linux-crisv32-low.c (the_low_target): Likewise.
9901 * linux-ia64-low.c (the_low_target): Likewise.
9902 * linux-m32r-low.c (the_low_target): Likewise.
9903 * linux-m68k-low.c (the_low_target): Likewise.
9904 * linux-ppc-low.c (the_low_target): Likewise.
9905 * linux-s390-low.c (the_low_target): Likewise.
9906 * linux-sh-low.c (the_low_target): Likewise.
9907 * linux-sparc-low.c (the_low_target): Likewise.
9908 * linux-tic6x-low.c (the_low_target): Likewise.
9909 * linux-x86-low.c (the_low_target): Likewise.
9910 * linux-xtensa-low.c (the_low_target): Likewise.
9911 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9912 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9913 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9914 srv_xmlfiles.
9915 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9916 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9917
c03e6ccc
YQ
99182012-02-29 Yao Qi <yao@codesourcery.com>
9919 Pedro Alves <palves@redhat.com>
9920
9921 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9922 `step_over_finished' is true.
9923
644cebc9
PA
99242012-02-27 Pedro Alves <palves@redhat.com>
9925
9926 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9927 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9928
c14d7ab2
PA
99292012-02-27 Pedro Alves <palves@redhat.com>
9930
9931 PR server/9684
9932 * linux-low.c (pid_is_stopped): New.
9933 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9934
412c89dd
LM
99352012-02-25 Luis Machado <lgustavo@codesourcery.com>
9936
9937 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9938 of conditions.
9939
b745defe
MR
99402012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9941
9942 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9943
9f3a5c85
LM
99442012-02-24 Luis Machado <lgustavo@codesourcery>
9945
9946 * server.c (handle_query): Advertise support for target-side
9947 breakpoint condition evaluation.
9948 (process_point_options): New function.
9949 (process_serial_event): When inserting a breakpoint, check for
9950 a target-side condition that should be evaluated.
9951
9952 * mem-break.c: Include regcache.h and ax.h.
9953 (point_cond_list_t): New data structure.
9954 (breakpoint) <cond_list>: New field.
9955 (find_gdb_breakpoint_at): Make non-static.
9956 (delete_gdb_breakpoint_at): Clear any target-side
9957 conditions.
9958 (clear_gdb_breakpoint_conditions): New function.
9959 (add_condition_to_breakpoint): Likewise.
9960 (add_breakpoint_condition): Likewise.
9961 (gdb_condition_true_at_breakpoint): Likewise.
9962 (gdb_breakpoint_here): Return result directly instead
9963 of going through a local variable.
9964
9965 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9966 (clear_gdb_breakpoint_conditions): Likewise.
9967 (add_breakpoint_condition): Likewise.
9968 (gdb_condition_true_at_breakpoint): Likewise.
9969
9970 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9971 (need_step_over_p): Take target-side breakpoint condition into
9972 consideration.
9973
5e1dc496
LM
99742012-02-24 Luis Machado <lgustavo@codesourcery>
9975
9976 * server.h: Include tracepoint.h.
9977 (agent_mem_read, agent_get_trace_state_variable_value,
9978 agent_set_trace_state_variable_value,
9979 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9980 get_set_tsv_func_addr): New prototypes.
9981
9982 * ax.h: New include file.
9983 * ax.c: New source file.
9984
9985 * tracepoint.c: Include ax.h.
9986 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9987 agent_expr, eval_result_type): Move to ax.h.
9988 (parse_agent_expr): Rename to ...
9989 (gdb_parse_agent_expr): ... this, make it non-static and move
9990 to ax.h.
9991 (unparse_agent_expr) Rename to ...
9992 (gdb_unparse_agent_expr): ... this, make it non-static and move
9993 to ax.h.
9994 (eval_agent_expr): Rename to ...
9995 (eval_tracepoint_agent_expr): ... this.
9996 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9997 forward declarations.
9998 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9999 (agent_get_trace_state_variable_value): New function.
10000 (agent_set_trace_state_variable_value): New function.
10001 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10002 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10003 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10004 (condition_true_at_tracepoint): Likewise.
10005 (parse_agent_expr): Rename to ...
10006 (gdb_parse_agent_expr): ... this and move to ax.c.
10007 (unparse_agent_expr): Rename to ...
10008 (gdb_unparse_agent_expr): ... this and move to ax.c.
10009 (gdb_agent_op_name): Move to ax.c.
10010 (eval_agent_expr): Rename to ...
10011 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10012 and move to ax.c.
10013 (eval_tracepoint_agent_expr): New function.
10014 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10015 non-static.
5e1dc496
LM
10016 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10017 ax.c.
10018 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10019 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10020 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10021 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10022 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10023 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10024 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10025 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10026 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10027 (compile_bytecodes): Remove forward declaration.
10028 (is_goto_target): Move to ax.c.
10029 (compile_bytecodes): Move to ax.c and call
10030 agent_get_trace_state_variable_value (...) and
10031 agent_set_trace_state_variable_value (...).
10032
10033 * Makefile.in: Update ax.c and IPA dependencies.
10034
277e4e52
PA
100352012-02-24 Pedro Alves <palves@redhat.com>
10036
10037 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10038 (cmd_bigqtbuffer_circular): ... this. Only handle
10039 'QTBuffer:circular:'.
10040 (handle_tracepoint_general_set): Adjust.
10041
bf4c19f7
YQ
100422012-02-16 Yao Qi <yao@codesourcery.com>
10043
10044 * inferiors.c: Move code to ...
10045 * dll.c: .... here. New.
10046 * server.h: Declare clear_dlls.
10047 * Makefile.in (SFILES): Add dll.c.
10048 (OBS): Add dll.o
10049 (dll.o): New rule.
10050
d73f2619
YQ
100512012-02-11 Yao Qi <yao@codesourcery.com>
10052
10053 * server.c: (handle_monitor_command): Add a new parameter
10054 `own_buf'.
10055 (handle_query): Update caller.
10056
f8255c2a
JB
100572012-02-09 Joel Brobecker <brobecker@adacore.com>
10058
10059 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10060 * configure, config.in: Regenerate.
10061 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10062 is not defined.
10063
da84f473
PA
100642012-02-02 Pedro Alves <palves@redhat.com>
10065
10066 Try SIGKILL first, then PTRACE_KILL.
10067 * linux-low.c (linux_kill_one_lwp): New.
10068 (linux_kill_one_lwp): Rename to ...
10069 (kill_one_lwp_callback): ... this. Use the new
10070 linux_kill_one_lwp.
10071
e886a173
PA
100722012-02-02 Pedro Alves <palves@redhat.com>
10073
10074 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10075 inferior.
10076
be07f1a2
PA
100772012-01-27 Pedro Alves <palves@redhat.com>
10078
10079 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10080 (elf_64_file_p): Make static.
10081 (linux_pid_exe_is_elf_64_file): New.
10082 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10083 Delete declarations.
10084 (linux_pid_exe_is_elf_64_file): Declare.
10085 * linux-x86-low.c (x86_arch_setup): Use
10086 linux_pid_exe_is_elf_64_file.
10087
d8301ad1
JK
100882012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10089
10090 * linux-low.c (linux_wait_for_event_1): Rename to ...
10091 (linux_wait_for_event): ... here and merge it with former
10092 linux_wait_for_event - new variable wait_ptid, use it.
10093 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10094
01b17894
PA
100952012-01-23 Pedro Alves <palves@redhat.com>
10096
10097 * server.c (main): Avoid yet another case of infinite loop while
10098 detaching/killing after a longjmp.
10099
e825046f
JK
101002012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10101
10102 Code cleanup.
10103 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10104
b9e7b9c3
UW
101052012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10106
10107 * hostio.c (handle_readlink): New function.
10108 (handle_vFile): Call it to handle "vFile:readlink" packets.
10109
901f9912
UW
101102012-01-20 Pedro Alves <palves@redhat.com>
10111 Ulrich Weigand <ulrich.weigand@linaro.org>
10112
10113 * server.c (handle_v_requests): Only support vAttach and vRun to
10114 start multiple processes when in extended protocol mode.
10115
fc1ab1a0
PA
101162012-01-17 Pedro Alves <palves@redhat.com>
10117
10118 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10119 memalign plus mprotect to allocate the scratch buffer.
10120
7d5d4e98
PA
101212012-01-13 Pedro Alves <palves@redhat.com>
10122
10123 * server.c (attach_inferior): Clear `cont_thread'.
10124
f128d5e9
PA
101252012-01-13 Pedro Alves <palves@redhat.com>
10126
10127 * server.c (main): Avoid infinite loop while detaching/killing
10128 after a longjmp.
10129
06db92f0
DE
101302012-01-09 Doug Evans <dje@google.com>
10131
10132 * server.c (start_inferior): Set last_ptid in --wrapper case.
10133
32d92999
YQ
101342012-01-06 Yao Qi <yao@codesourcery.com>
10135
10136 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10137 defined.
10138 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10139
5e0a92a9
YQ
101402012-01-04 Yao Qi <yao@codesourcery.com>
10141
10142 * tracepoint.c (cmd_qtdp): Print debug message
10143 for static tracepoint.
10144
ae639e8c
YQ
101452012-01-04 Yao Qi <yao@codesourcery.com>
10146
10147 * tracepoint.c (trace_vdebug): Differentiate debug message
10148 between gdbserver and IPA.
10149
f72429c5
YQ
101502012-01-03 Yao Qi <yao@codesourcery.com>
10151
10152 * tracepoint.c (tracepoint_was_hit): Don't collect for
10153 static tracepoint.
10154
12c3e59c
JB
101552012-01-02 Joel Brobecker <brobecker@adacore.com>
10156
10157 * terminal.h: Reformat copyright header.
10158
67827812
JB
101592012-01-02 Joel Brobecker <brobecker@adacore.com>
10160
10161 * server.c (gdbserver_version): Update copyright year.
10162 * gdbreplay.c (gdbreplay_version): Likewise.
10163
3e52c33d
JK
101642011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10165
10166 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10167
10168 Revert:
10169 2011-12-18 Hui Zhu <teawater@gmail.com>
10170 * linux-low.c (linux_create_inferior): Save return value to ret.
10171
66f1260e
HZ
101722011-12-18 Hui Zhu <teawater@gmail.com>
10173
10174 * linux-low.c (linux_create_inferior): Save return value to ret.
10175
e77616d7
DE
101762011-12-16 Doug Evans <dje@google.com>
10177
e7b06c57
DE
10178 * linux-low.c (linux_create_inferior): If stdio connection,
10179 redirect stdin from /dev/null, stdout to stderr.
10180 * remote-utils.c (remote_is_stdio): New static global.
10181 (remote_connection_is_stdio): New function.
10182 (remote_prepare): Handle stdio connection.
10183 (remote_open): Ditto.
10184 (remote_close): Don't close stdin for stdio connections.
10185 (read_prim,write_prim): New functions. Replace all calls to
10186 read/write to these.
10187 * server.c (main): Watch for "-" argument. Move call to
10188 remote_prepare before start_inferior.
10189 * server.h (STDIO_CONNECTION_NAME): New macro.
10190 (remote_connection_is_stdio): Declare.
10191
e77616d7
DE
10192 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10193 in debugging output.
10194
82067193
YQ
101952011-12-15 Yao Qi <yao@codesourcery.com>
10196
10197 * tracepoint.c: Include sys/syscall.h.
10198 (gdb_ust_thread): Remove preprocessor conditional.
10199
82bfbe7e
PA
102002011-12-14 Pedro Alves <pedro@codesourcery.com>
10201
10202 * linux-low.c (linux_detach_one_lwp): Call
10203 the_low_target.prepare_to_resume before detaching.
10204
712c6575
YQ
102052011-12-14 Yao Qi <yao@codesourcery.com>
10206
10207 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10208 of write.
10209
d54d1edf
YQ
102102011-12-14 Yao Qi <yao@codesourcery.com>
10211
10212 * i386-low.c (i386_low_stopped_data_address): Initialize local
10213 variable `control'.
10214
6210a125
PA
102152011-12-13 Pedro Alves <pedro@codesourcery.com>
10216
10217 PR remote/13492
10218
10219 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10220 DR_CONTROL unless necessary. Extend comments.
10221 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10222 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10223
2ece8244
YQ
102242011-12-13 Yao Qi <yao@codesourcery.com>
10225
10226 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10227 macros.
10228 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10229
784867a5
JK
102302011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10231
10232 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10233 Print new debug message for such case.
10234
6bf36717
JK
102352011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10236
10237 Fix overlapping memcpy.
10238 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10239 the read_inferior_memory transfer.
10240 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10241 write_inferior_memory transfer.
10242 (set_fast_tracepoint_jump): New variable buf. Use it for the
10243 read_inferior_memory and write_inferior_memory transfers.
10244 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10245 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10246 Use it for the write_inferior_memory transfer.
10247 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10248 buffers.
10249
50275556
MR
102502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10251
10252 * linux-low.c (fetch_register, store_register): Make code
10253 consistent, fix formatting.
10254
7325beb4
MR
102552011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10256
10257 * linux-low.c (usr_store_inferior_registers): Factor out code
10258 to handle individual registers into...
10259 (store_register): ... this new function.
10260
c642a434
UW
102612011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10262
10263 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10264 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10265 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10266 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10267 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10268 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10269 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10270 (srv_xmlfiles): Add new XML files.
10271
10272 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10273 and <sys/uio.h>.
10274 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10275 (init_registers_s390_linux32v1): Add prototype.
10276 (init_registers_s390_linux32v2): Likewise.
10277 (init_registers_s390_linux64v1): Likewise.
10278 (init_registers_s390_linux64v2): Likewise.
10279 (init_registers_s390x_linux64v1): Likewise.
10280 (init_registers_s390x_linux64v2): Likewise.
10281 (s390_num_regs): Increment to 52.
10282 (s390_regmap): Add orig_r2 register.
10283 (s390_num_regs_3264): Increment to 68.
10284 (s390_regmap_3264): Add orig_r2 register.
10285 (s390_collect_ptrace_register): Handle orig_r2 register.
10286 (s390_supply_ptrace_register): Likewise.
10287 (s390_fill_last_break): New function.
10288 (s390_store_last_break): Likewise.
10289 (s390_fill_system_call): New function.
10290 (s390_store_system_call): Likewise.
10291 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10292 register sets.
10293 (s390_check_regset): New function.
10294 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10295 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10296 Update target_regsets for available register sets.
10297
2268b414
JK
102982011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10299 Jan Kratochvil <jan.kratochvil@redhat.com>
10300
10301 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10302 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10303 New.
10304 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10305 * linux-low.h (struct process_info_private): New member r_debug.
10306 * server.c (handle_qxfer_libraries): Call
10307 the_target->qxfer_libraries_svr4.
10308 (handle_qxfer_libraries_svr4): New function.
10309 (qxfer_packets): New entry "libraries-svr4".
10310 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10311 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10312 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10313 PACKET_qXfer_libraries_svr4.
10314
d6db1fab
UW
103152011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10316
10317 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10318 PSW address/mask between 8-byte and 16-byte formats.
10319 (s390_supply_ptrace_register): Likewise.
10320 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10321 basic addressing mode bit.
10322
242f5f1c
SS
103232011-11-24 Stan Shebs <stan@codesourcery.com>
10324
10325 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10326
f196051f
SS
103272011-11-17 Stan Shebs <stan@codesourcery.com>
10328
10329 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10330 (tracing_start_time): New global.
10331 (tracing_stop_time): New global.
10332 (tracing_user_name): New global.
10333 (tracing_notes): New global.
10334 (tracing_stop_note): New global.
10335 (cmd_qtstart): Set traceframe_usage, start_time.
10336 (stop_tracing): Set stop_time.
10337 (cmd_qtstatus): Report additional status.
10338 (cmd_qtp): New function.
10339 (handle_tracepoint_query): Call it.
10340 (cmd_qtnotes): New function.
10341 (handle_tracepoint_general_set): Call it.
10342 (get_timestamp): Rename from tsv_get_timestamp.
10343
405f8e94
SS
103442011-11-14 Stan Shebs <stan@codesourcery.com>
10345 Kwok Cheung Yeung <kcy@codesourcery.com>
10346
10347 * linux-x86-low.c (small_jump_insn): New.
10348 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10349 trampoline and error message, build a trampoline and issue a small
10350 jump instruction to it.
10351 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10352 trampoline and error message.
10353 (x86_get_min_fast_tracepoint_insn_len): New.
10354 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10355 * linux-low.h (struct linux_target_ops): Add arguments to
10356 install_fast_tracepoint_jump_pad operation, add new operation.
10357 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10358 arguments.
10359 (linux_get_min_fast_tracepoint_insn_len): New function.
10360 (linux_target_op): Add new operation.
10361 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10362 (gdb_trampoline_buffer_end): Ditto.
10363 (gdb_trampoline_buffer_error): Ditto.
10364 (struct ipa_sym_addresses): Add fields for new IPA variables.
10365 (symbol_list): Add entries for new IPA variables.
10366 (struct tracepoint): Add fields to hold the address range of the
10367 trampoline used by the tracepoint.
10368 (trampoline_buffer_head): New static variable.
10369 (trampoline_buffer_tail): Ditto.
10370 (claim_trampoline_space): New function.
10371 (have_fast_tracepoint_trampoline_buffer): New function.
10372 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10373 structure.
10374 (install_fast_tracepoint): Ditto, also add error buffer argument.
10375 (cmd_qtminftpilen): New function.
10376 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10377 (fast_tracepoint_from_trampoline_address): New function.
10378 (fast_tracepoint_collecting): Handle trampoline as part of jump
10379 pad space.
10380 (set_trampoline_buffer_space): New function.
10381 (initialize_tracepoint): Initialize new IPA variables.
10382 * target.h (struct target_ops): Add arguments to
10383 install_fast_tracepoint_jump_pad operation, add new
10384 get_min_fast_tracepoint_insn_len operation.
10385 (target_get_min_fast_tracepoint_insn_len): New.
10386 (install_fast_tracepoint_jump_pad): Add arguments.
10387 * server.h (IPA_BUFSIZ): Define.
10388 * linux-i386-ipa.c: Include extra header files.
10389 (initialize_fast_tracepoint_trampoline_buffer): New function.
10390 (initialize_low_tracepoint): Call it.
10391 * server.h (set_trampoline_buffer_space): Declare.
10392 (claim_trampoline_space): Ditto.
10393 (have_fast_tracepoint_trampoline_buffer): Ditto.
10394
1e4d1764
YQ
103952011-11-14 Yao Qi <yao@codesourcery.com>
10396
10397 * server.c (handle_query): Handle InstallInTrace for qSupported.
10398 * tracepoint.c (add_tracepoint): Sort list.
10399 (install_tracepoint, download_tracepoint): New.
10400 (cmd_qtdp): Call them to install and download tracepoints.
10401 (sort_tracepoints): Removed.
10402 (cmd_qtstart): Update.
10403
5c73ff4e
YQ
104042011-11-14 Yao Qi <yao@codesourcery.com>
10405
10406 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10407 * mem-break.h: Declare.
10408 * tracepoint.c (cmd_qtstart): Move some code to ...
10409 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10410 New.
10411 (download_tracepoints): Move some code to ...
10412 (download_tracepoint_1): ... here. New.
10413
86a30030
YQ
104142011-11-08 Yao Qi <yao@codesourcery.com>
10415
10416 * remote-utils.c (relocate_instruction): A comment fix.
10417
8d26e50c
JB
104182011-11-07 Joel Brobecker <brobecker@adacore.com>
10419
10420 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10421 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10422 dr_status_mirror and dr_control_mirror from debug_reg_state.
10423 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10424 (i386_initial_stuff): Remove use of deleted globals.
10425 (i386_get_thread_context, i386_set_thread_context,
10426 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10427 from debug_reg_state.
10428
a59306a3
YQ
104292011-11-05 Yao Qi <yao@codesourcery.com>
10430
10431 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10432 address as TPOINT's.
10433
3065dfb6
SS
104342011-11-02 Stan Shebs <stan@codesourcery.com>
10435
10436 * tracepoint.c (agent_mem_read_string): New function.
10437 (eval_agent_expr): Call it for tracenz.
10438 * server.c (handle_query): Report support for tracenz.
10439
fd0d8c7c
YQ
104402011-11-02 Yao Qi <yao@codesourcery.com>
10441
10442 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10443
609086b1
YQ
104442011-11-02 Yao Qi <yao@codesourcery.com>
10445
10446 * target.h: Fix a typo in comment.
10447
b9fd1791
PA
104482011-10-31 Pedro Alves <pedro@codesourcery.com>
10449
10450 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10451 clobber the breakpoints' shadows with fast tracepoint jumps.
10452 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10453 * target.c (write_inferior_memory): Also pass MYADDR down to
10454 check_mem_write.
10455
03583c20
UW
104562011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10457
10458 * configure.ac: Check support for personality routine.
10459 * configure: Regenerate.
10460 * config.in: Likewise.
10461 * linux-low.c: Include <sys/personality.h>.
10462 Define ADDR_NO_RANDOMIZE if necessary.
10463 (linux_create_inferior): Disable address space randomization when
10464 forking inferior, if requested.
10465 (linux_supports_disable_randomization): New function.
10466 (linux_target_ops): Install it.
10467 * server.h (disable_randomization): Declare.
10468 * server.c (disable_randomization): New global variable.
10469 (handle_general_set): Handle QDisableRandomization.
10470 (handle_query): Likewise for qSupported.
10471 (main): Support --disable-randomization and --no-disable-randomization
10472 command line arguments.
10473 * target.h (struct target_ops): Add supports_disable_randomization.
10474 (target_supports_disable_randomization): New macro.
10475
723b724b
MF
104762011-09-29 Mike Frysinger <vapier@gentoo.org>
10477
10478 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10479 ifdef check.
10480 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10481 [!PT_GETDSBT] (target_loadmap): New definition.
10482 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10483 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10484 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10485 and PT_GETDSBT to LINUX_LOADMAP.
10486 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10487 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10488
55329a5c 104892011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10490
10491 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10492 (arm_linux_hwbp_cap): New static variable.
10493 (arm_linux_get_hwbp_cap): Replace by ...
10494 (arm_linux_init_hwbp_cap): ... this new function.
10495 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10496 (arm_linux_get_hw_watchpoint_count): Likewise.
10497 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10498 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10499 (arm_prepare_to_resume): Use perror_with_name instead of error.
10500
55329a5c 105012011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10502
10503 * linux-arm-low.c: Include <signal.h>.
10504 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10505 (struct arm_linux_hwbp_cap): New data type.
10506 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10507 (struct arm_linux_hw_breakpoint): New data type.
10508 (MAX_BPTS, MAX_WPTS): Define.
10509 (struct arch_process_info, struct arch_lwp_info): New data types.
10510 (arm_linux_get_hwbp_cap): New function.
10511 (arm_linux_get_hw_breakpoint_count): Likewise.
10512 (arm_linux_get_hw_watchpoint_count): Likewise.
10513 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10514 (arm_hwbp_control_initialize): Likewise.
10515 (arm_hwbp_control_is_enabled): Likewise.
10516 (arm_hwbp_control_is_initialized): Likewise.
10517 (arm_hwbp_control_disable): Likewise.
10518 (arm_linux_hw_breakpoint_equal): Likewise.
10519 (arm_linux_hw_point_initialize): Likewise.
10520 (struct update_registers_data): New data structure.
10521 (update_registers_callback: New function.
10522 (arm_insert_point): Likewise.
10523 (arm_remove_point): Likewise.
10524 (arm_stopped_by_watchpoint): Likewise.
10525 (arm_stopped_data_address): Likewise.
10526 (arm_new_process): Likewise.
10527 (arm_new_thread): Likewise.
10528 (arm_prepare_to_resume): Likewise.
10529 (the_low_target): Register arm_insert_point, arm_remove_point,
10530 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10531 arm_new_thread, and arm_prepare_to_resume.
10532
6b9801d4
SS
105332011-09-15 Stan Shebs <stan@codesourcery.com>
10534
10535 * server.h (struct emit_ops): Add compare-goto fields.
10536 * tracepoint.c (gdb_agent_op_sizes): New table.
10537 (emit_eq_goto): New function.
10538 (emit_ne_goto): New function.
10539 (emit_lt_goto): New function.
10540 (emit_le_goto): New function.
10541 (emit_gt_goto): New function.
10542 (emit_ge_goto): New function.
10543 (is_goto_target): New function.
10544 (compile_bytecodes): Recognize special cases of compare-goto
10545 combinations and call specialized emitters for them.
10546 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10547 (amd64_emit_ne_goto): New function.
10548 (amd64_emit_lt_goto): New function.
10549 (amd64_emit_le_goto): New function.
10550 (amd64_emit_gt_goto): New function.
10551 (amd64_emit_ge_goto): New function.
10552 (amd64_emit_ops): Add the new functions.
10553 (i386_emit_eq_goto): New function.
10554 (i386_emit_ne_goto): New function.
10555 (i386_emit_lt_goto): New function.
10556 (i386_emit_le_goto): New function.
10557 (i386_emit_gt_goto): New function.
10558 (i386_emit_ge_goto): New function.
10559 (i386_emit_ops): Add the new functions.
10560
bf15cbda
SS
105612011-09-08 Stan Shebs <stan@codesourcery.com>
10562
10563 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10564 (i386_emit_epilogue): Restore %ebx.
10565
943ca1dd
JZ
105662011-08-31 Jie Zhang <jzhang918@gmail.com>
10567
10568 * server.c (step_thread): Remove definition.
10569 (process_serial_event): Don't handle Hs.
10570 * server.h (step_thread): Remove declaration.
10571 * target.c (set_desired_inferior): Remove use of step_thread.
10572
e3deef73
LM
105732011-08-24 Luis Machado <lgustavo@codesourcery.com>
10574
10575 * linux-low.c: Include linux-procfs.h.
10576 (linux_attach_lwp_1): Update comments.
10577 (linux_attach): Scan for existing threads when attaching to a
10578 process that is the tgid.
10579 * Makefile.in: Update dependencies.
10580
13da1c97
LM
105812011-08-24 Luis Machado <lgustavo@codesourcery.com>
10582
10583 * configure.srv: Add linux-procfs.o dependencies.
10584
881127c9
YQ
105852011-08-14 Yao Qi <yao@codesourcery.com>
10586
10587 * target.h (struct target_ops): Fix indent.
10588 * win32-low.c (win32_target_ops): Fix comment.
10589
58dbd541
YQ
105902011-08-14 Andrew Jenner <andrew@codesourcery.com>
10591 Yao Qi <yao@codesourcery.com>
10592
10593 * Makefile.in (clean): Remove tic6x-*.c files.
10594 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10595 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10596 (tic6x-c64xp-linux.c): Likewise.
10597 * configure.srv: Add support for tic6x-*-uclinux.
10598 * linux-tic6x-low.c: New.
10599 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10600
78d85199
YQ
106012011-08-14 Andrew Stubbs <ams@codesourcery.com>
10602 Yao Qi <yao@codesourcery.com>
10603
10604 * target.h (struct target_ops): Add read_loadmap.
10605 * linux-low.c (struct target_loadseg): New type.
10606 (struct target_loadmap): New type.
10607 (linux_read_loadmap): New function.
10608 (linux_target_ops): Add linux_read_loadmap.
10609 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10610 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10611 to NULL.
78d85199 10612
a959a88d
EZ
106132011-08-05 Eli Zaretskii <eliz@gnu.org>
10614
10615 * win32-low.c: Include <stdint.h>.
10616
1ced966e
PA
106172011-07-22 Pedro Alves <pedro@codesourcery.com>
10618
10619 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10620 to the inferior here.
10621 (i386_remove_aligned_watchpoint): Ditto.
10622 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10623 fit part of the watchpoint in the debug registers.
10624 (i386_update_inferior_debug_regs): New.
10625 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10626 registers, and only update the inferior on success.
10627 (i386_low_remove_watchpoint): Ditto.
10628
d26e3629
KY
106292011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10630
10631 * linux-low.c (compare_ints, unique, list_threads, show_process,
10632 linux_core_of_thread): Delete.
10633 (linux_target_ops): Change linux_core_of_thread to
10634 linux_common_core_of_thread.
10635 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10636 * utils.c (malloc_failure): Change type of argument.
10637 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10638 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10639 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10640 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10641 (IPA_OBJS): Add common-utils-ipa.o.
10642 (ptid_h, linux_osdata_h): New macros.
10643 (server_h): Add common/common-utils.h, common/xml-utils.h,
10644 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10645 common/ptid.h.
10646 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10647 ptid.o, buffer.o): New rules.
10648 (linux-low.o): Add common/linux-osdata.h as a dependency.
10649 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10650 * configure.ac: Add AC_HEADER_DIRENT check.
10651 * config.in: Regenerate.
10652 * configure: Regenerate.
10653 * remote-utils.c (xml_escape_text): Delete.
10654 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10655 buffer_xml_printf): Move to common/buffer.c.
10656 * server.c (main): Remove call to initialize_inferiors.
10657 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10658 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10659 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10660 internal_error, gdb_assert, gdb_assert_fail): Delete.
10661 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10662 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10663 common/buffer.h.
10664 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10665 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10666 initialize_inferiors): Delete.
10667
2275a1a7
PA
106682011-07-20 Pedro Alves <pedro@codesourcery.com>
10669
10670 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10671 symbol error.
10672
0a5b1e09
PA
106732011-05-31 Pedro Alves <pedro@codesourcery.com>
10674
10675 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10676 assertion.
10677 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10678
6938fd34
YQ
106792011-05-26 Yao Qi <yao@codesourcery.com>
10680
10681 * Makefile.in (thread-db.o): Track dependence to
10682 common/gdb_thread_db.h.
10683 * thread-db.c: include gdb_thread_db.h from right place.
10684
b481f9e0
TT
106852011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10686
10687 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10688 __FILE__ and __LINE__ to internal_error.
10689
98a5dd13
DE
106902011-05-13 Doug Evans <dje@google.com>
10691
10692 * thread-db.c (try_thread_db_load_from_sdir): New function.
10693 (try_thread_db_load_from_dir): New function.
10694 (thread_db_load_search): Handle $sdir, ignore $pdir.
10695 Remove trying of system directories if search of
10696 libthread-db-search-path fails, that is now done via $sdir.
10697
d248b706
KY
106982011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10699
10700 * server.c (handle_query): Add EnableDisableTracepoints to the list
10701 of supported features.
43aaf8b6 10702 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10703 tracepoints.
43aaf8b6
PA
10704 (cmd_qtenable_disable): New.
10705 (cmd_qtstart): Install tracepoints even if disabled.
10706 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10707 receiving a QTEnable or QTDisable packet.
10708 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10709 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10710 tracepoints.
10711 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10712
84e578fb
DE
107132011-05-10 Doug Evans <dje@google.com>
10714
10715 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10716
71f55dd8
DE
107172011-05-04 Doug Evans <dje@google.com>
10718
10719 * linux-low.c (linux_join): Skip process lookup.
10720 * spu-low.c (spu_join): Ditto.
10721 * server.c (join_inferiors_callback): Delete.
10722 (process_serial_event): For 'D' packet (detach) call join_inferior
10723 directly.
10724
4d393d60
JM
107252011-05-04 Joseph Myers <joseph@codesourcery.com>
10726
10727 * README: Don't mention xscale*-*-linux*.
10728 * configure.srv (xscale*-*-linux*): Don't handle target.
10729
b00ad6ff
NF
107302011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10731
10732 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10733 casting pointers.
10734 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10735 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10736 (i386_emit_void_call_2): Likewise.
10737
af96c192
YQ
107382011-04-26 Yao Qi <yao@codesourcery.com>
10739
43aaf8b6
PA
10740 * linux-low.c: Move common macros to linux-ptrace.h.
10741 Include linux-ptrace.h.
af96c192
YQ
10742 * Makefile.in (linux_ptrace_h): New.
10743 (linux-low.o): Depends on linux-ptrace.h.
10744
03f2bd59
JK
107452011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10746
10747 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10748 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10749 (remote_prepare): New function with most of the TCP code from ...
10750 (remote_open): ... here. Detect PORT here unconditionally. Move also
10751 setting transport_is_reliable.
10752 * server.c (run_once): New variable.
10753 (gdbserver_usage): Document it.
10754 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10755 the first run if RUN_ONCE.
10756 * server.h (run_once, remote_prepare): New declarations.
10757
7a9dd1b2
TT
107582011-04-19 Tom Tromey <tromey@redhat.com>
10759
10760 * win32-low.c (handle_load_dll): Remove duplicate "the".
10761
81239425
PM
107622011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10763
10764 Remove support for old Cygwin 1.5 versions.
10765 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10766 function to avoid warning.
10767 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10768 warning.
10769
9e0627f1
PM
107702011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10771
10772 * gdbserver/server.h (Macro _): Define it if not available.
10773
588eebee
MS
107742011-03-14 Michael Snyder <msnyder@vmware.com>
10775
348af9f7 10776 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10777
43f70d4c
JB
107782011-03-10 Joel Brobecker <brobecker@adacore.com>
10779
10780 * Makefile.in (maintainer-clean realclean distclean): Remove
10781 "make ... subdir_do" command.
10782
348af9f7
MS
107832011-03-10 Michael Snyder <msnyder@vmware.com>
10784
10785 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10786
10787 * server.c (handle_v_run): Free alloced buffer on early return.
10788
e637a4f5
YQ
107892011-03-09 Yao Qi <yao@codesourcery.com>
10790
10791 Revert:
10792 2011-03-04 Yao Qi <yao@codesourcery.com>
10793
10794 * Makefile.in: Remove GNU make feature --directory.
10795
10796 2011-03-05 Yao Qi <yao@codesourcery.com>
10797
10798 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10799 (subdir_do): New make target. Copied from gdb/Makefile.
10800 (maintainer-clean, realclean, distclean, clean): Call corresponding
10801 make targets in common/Makefile.
10802
10803 2011-02-11 Yao Qi <yao@codesourcery.com>
10804
10805 * configure.ac: Call AC_PROG_RANLIB.
10806 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10807 * configure: Regenerate.
10808
e6edda56
JK
108092011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10810
10811 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10812
e5141119
JB
108132011-03-06 Yao Qi <yao@codesourcery.com>
10814
10815 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10816
64794aa4
JB
108172011-03-05 Yao Qi <yao@codesourcery.com>
10818
10819 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10820 (subdir_do): New make target. Copied from gdb/Makefile.
10821 (maintainer-clean, realclean, distclean, clean): Call corresponding
10822 make targets in common/Makefile.
10823
7a762829
YQ
108242011-03-04 Yao Qi <yao@codesourcery.com>
10825
10826 * Makefile.in: Remove GNU make feature --directory.
10827
348af9f7
MS
108282011-03-04 Michael Snyder <msnyder@vmware.com>
10829
10830 * server.c (queue_stop_reply): Call xmalloc not malloc.
10831
108322011-03-02 Michael Snyder <msnyder@vmware.com>
10833
10834 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10835
9f72fee2
MS
108362011-02-28 Michael Snyder <msnyder@vmware.com>
10837
588eebee
MS
10838 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10839 (cmd_qtframe): Ditto.
10840 (cmd_qtbuffer): Ditto.
10841 (cmd_bigqtbuffer): Ditto.
10842
9f72fee2
MS
10843 * utils.c (decimal2str): Initialize 'width' to nine, then
10844 don't mess with it.
10845
8040bd49
UW
108462011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10847
10848 * hostio.c (require_data): Free *data, not data.
10849
7e52cbd0
JK
108502011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10851
10852 * hostio.c (require_data): Use free, not xfree.
10853
9130f83e
MS
108542011-02-27 Michael Snyder <msnyder@vmware.com>
10855
4b812f4e
MS
10856 * server.c (handle_query): Discard unused value.
10857
9130f83e
MS
10858 * hostio.c (require_data): Free malloc memory before returning
10859 error.
10860
69d37113
MS
108612011-02-26 Michael Snyder <msnyder@vmware.com>
10862
10863 * linux-low.c (list_threads): Call closedir for dirent.
10864
35f5825a
MS
108652011-02-27 Michael Snyder <msnyder@vmware.com>
10866
2a589cef
MS
10867 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10868 a case statement falls through.
10869
0adea5f7
MS
10870 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10871
35f5825a
MS
10872 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10873 in comparison.
10874
238f1c74
MS
108752011-02-26 Michael Snyder <msnyder@vmware.com>
10876
10877 * utils.c (decimal2str): Eliminate dead code and dead param.
10878 (pulongest): Drop dead param from call to decimal2str.
10879 (plongest): Ditto.
10880
633ff500
JB
108812011-02-24 Joel Brobecker <brobecker@adacore.com>
10882
10883 Revert the following patch (not approved yet):
10884 2011-02-21 Hui Zhu <teawater@gmail.com>
10885 * tracepoint.c (tp_printf): New function.
10886 (eval_agent_expr): Handle gdb_agent_op_printf.
10887
f9c6ff72
HZ
108882011-02-21 Hui Zhu <teawater@gmail.com>
10889
10890 * tracepoint.c (tp_printf): New function.
10891 (eval_agent_expr): Handle gdb_agent_op_printf.
10892
94d5e490
TT
108932011-02-18 Tom Tromey <tromey@redhat.com>
10894
10895 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10896 (tracepoint.o): Likewise.
10897 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10898 (gdb_agent_op_names): Likewise.
10899
c7f96d2b
TT
109002011-02-18 Tom Tromey <tromey@redhat.com>
10901
10902 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10903 gdb_agent_op_rot>: New constants.
10904 (gdb_agent_op_names): Add pick and roll.
10905 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10906 cases.
10907
0feedb2c
JK
109082011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10909
10910 * aclocal.m4: Regenerated with aclocal-1.11.1.
10911
b3b9301e
PA
109122011-02-14 Pedro Alves <pedro@codesourcery.com>
10913
10914 * server.c (handle_qxfer_traceframe_info): New.
10915 (qxfer_packets): Register "traceframe-info".
10916 (handle_query): Report support for qXfer:traceframe-info:read+.
10917 * tracepoint.c (match_blocktype): New.
10918 (traceframe_find_block_type): Rename to ...
10919 (traceframe_walk_blocks): ... this. Add callback filter argument,
10920 and use it.
10921 (traceframe_find_block_type): New, reimplemented on top of
10922 traceframe_walk_blocks.
10923 (build_traceframe_info_xml): New.
10924 (traceframe_read_info): New.
10925 * server.h (traceframe_read_info): Declare.
10926
4f3e6fb7
YQ
109272011-02-11 Yao Qi <yao@codesourcery.com>
10928
10929 * configure.ac: Call AC_PROG_RANLIB.
10930 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10931 * configure: Regenerate.
10932
764880b7
PA
109332011-02-07 Pedro Alves <pedro@codesourcery.com>
10934
10935 * server.c (gdb_read_memory): Change return semantics to allow
10936 partial transfers.
10937 (handle_search_memory_1): Adjust.
10938 (process_serial_event) <'m' packet>: Handle partial transfers.
10939 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10940
1c79eb8a
PA
109412011-01-28 Pedro Alves <pedro@codesourcery.com>
10942
10943 * regcache.c (init_register_cache): Initialize
10944 regcache->register_status.
10945 (free_register_cache): Release regcache->register_status.
10946 (regcache_cpy): Copy register_status.
10947 (registers_to_string): Print 'x's for unavailable registers.
10948 (supply_register): Mark the register's status valid or
10949 unavailable, depending on whether a buffer was passed in or not.
10950 (supply_register_zeroed): New.
10951 (supply_regblock): Mark the registers' status valid or
10952 unavailable, depending on whether a buffer was passed in or not.
10953 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10954 (struct regcache): New `register_status' field.
10955 (supply_register_zeroed): Declare.
10956 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10957 supply_register_zeroed, rather than passing a NULL buffer to
10958 supply_register.
10959 * tracepoint.c (fetch_traceframe_registers): Update comment.
10960
85724a0e
PA
109612011-01-28 Pedro Alves <pedro@codesourcery.com>
10962
10963 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10964 buffer explicit.
10965
d08aafef
PA
109662011-01-25 Pedro Alves <pedro@codesourcery.com>
10967
10968 * server.h (decode_xfer_write): Change prototype.
10969 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10970 and don't extract the annex here.
10971 * server.c (decode_xfer_read): Remove `annex' parameter,
10972 and don't extract the annex here.
10973 (decode_xfer): New.
10974 (struct qxfer): New.
10975 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10976 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10977 (handle_qxfer_statictrace): New functions, abstracted out from
10978 handle_query, and made to use the struct qxfer interface.
10979 (handle_threads_qxfer_proper): Rename to ...
10980 (handle_qxfer_threads_proper): ... this.
10981 (handle_threads_qxfer): Rename to ...
10982 (handle_qxfer_threads): ... this. Adjust.
10983 (qxfer_packets): New array.
10984 (handle_qxfer): New function.
10985 (handle_query): Use handle_qxfer.
10986
493e2a69
MS
109872011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10988
10989 * gdbreplay.c: Shorten lines of >= 80 columns.
10990 * linux-low.c: Ditto.
10991 * linux-ppc-low.c: Ditto.
10992 * linux-s390-low.c: Ditto.
10993 * linux-sparc-low.c: Ditto.
10994 * linux-x86-low.c: Ditto.
10995 * linux-xtensa-low.c: Ditto.
10996 * mem-break.c: Ditto.
10997 * nto-low.c: Ditto.
10998 * regcache.h: Ditto.
10999 * remote-utils.c: Ditto.
11000 * server.c: Ditto.
11001 * server.h: Ditto.
11002 * thread-db.c: Ditto.
11003 * tracepoint.c: Ditto.
11004 * utils.c: Ditto.
11005 * win32-low.h: Ditto.
11006
44944448
JB
110072011-01-05 Joel Brobecker <brobecker@adacore.com>
11008
11009 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11010 update.
11011
71ce852c
JB
110122011-01-01 Joel Brobecker <brobecker@adacore.com>
11013
11014 * server.c (gdbserver_version): Update copyright year in version
11015 output.
11016 * gdbreplay.c (gdbreplay_version): Ditto.
11017
eb826dc6
MF
110182010-12-29 Jie Zhang <jie.zhang@analog.com>
11019
11020 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11021 * linux-bfin-low.c: New file.
11022 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11023 PT_DATA_ADDR for BFIN targets.
11024 * Makefile.in (SFILES): Add linux-bfin-low.c.
11025 (clean): Remove reg-bfin.c.
11026 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11027 * README: Mention supported Blackfin targets.
11028
39ab222a
MF
110292010-12-23 Mike Frysinger <vapier@gentoo.org>
11030
11031 * .gitignore: New file.
11032
a1f2ce7d
MF
110332010-11-16 Mike Frysinger <vapier@gentoo.org>
11034
11035 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11036
f474844c
JZ
110372010-10-22 Jie Zhang <jie@codesourcery.com>
11038
11039 * Makefile.in: Add FLAGS_TO_PASS variable.
11040 (install): Remove dependency of install-only and recursively
11041 invoke make for install-only.
11042
f1048712
DE
110432010-10-04 Doug Evans <dje@google.com>
11044
11045 * Makefile.in (uninstall): Use $(DESTDIR).
11046
b53a1623
PA
110472010-09-24 Pedro Alves <pedro@codesourcery.com>
11048
e6ee044d
PA
11049 PR gdb/11842
11050
b53a1623
PA
11051 * linux-x86-low.c (compat_siginfo_from_siginfo)
11052 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11053 si_code is < 0. Check for si_code == SI_TIMER before checking for
11054 si_code < 0.
11055
fa1bd1e4
JB
110562010-09-13 Joel Brobecker <brobecker@adacore.com>
11057
11058 * lynx-i386-low.c: New file.
11059 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11060
47fac8f8
JB
110612010-09-13 Joel Brobecker <brobecker@adacore.com>
11062
11063 * lynx-low.c (ptrace_request_to_str): Remove handling for
11064 request values that have been removed in LynxOS 5.x.
11065
1adfc54d
JB
110662010-09-13 Joel Brobecker <brobecker@adacore.com>
11067
11068 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11069 <ptrace.h>
11070
c2a66c29
NS
110712010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11072
11073 * configure.ac: Add --enable-inprocess-agent option.
11074 * configure: Rebuilt.
11075
32fcada3
YQ
110762010-09-06 Yao Qi <yao@codesourcery.com>
11077
11078 * linux-low.c (linux_kill): Remove unused variable.
11079 (linux_stabilize_threads): Likewise.
11080 * server.c (start_inferior): Likewise.
11081 (queue_stop_reply_callback): Likewise.
11082 * tracepoint.c (do_action_at_tracepoint): Likewise.
11083
0cccb683
YQ
110842010-09-06 Yao Qi <yao@codesourcery.com>
11085
11086 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11087 on return.
11088
423ec54c
JK
110892010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11090
11091 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11092
12ac6819
PA
110932010-09-06 Pedro Alves <pedro@codesourcery.com>
11094
11095 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11096 "$(IPA_DEPFILES)".
11097
8ed54b31
JB
110982010-09-01 Joel Brobecker <brobecker@adacore.com>
11099
11100 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11101 gdbserver/lynx-ppc-low.c: New files.
11102 * Makefile.in (lynx_low_h): New variable.
11103 (lynx-low.o, lynx-ppc-low.o): New rules.
11104 * configure.ac: On LynxOS, link with -lnetinet.
11105 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11106 * configure: regenerate.
11107
bb0116a4
JB
111082010-09-01 Joel Brobecker <brobecker@adacore.com>
11109
11110 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11111 * configure.ac: Add check for vasprintf and vsnprintf.
11112 * configure, config.in: Regenerate.
11113 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11114
a778ab81 111152010-09-01 Joel Brobecker <brobecker@adacore.com>
11116
11117 * gdbreplay.c: Move include of alloca.h up, next to include of
11118 malloc.h.
11119 * server.h: Add include of malloc.h.
11120 * mem-break.c: Remove include of malloc.h.
11121 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11122
8b034a19 111232010-09-01 Joel Brobecker <brobecker@adacore.com>
11124
11125 * Makefile.in (memmem.o): Build with -Wno-error.
11126
111272010-09-01 Joel Brobecker <brobecker@adacore.com>
11128
11129 * utils.c (xsnprintf): Make non-static.
11130 * server.h: Add xsnprintf declaration.
11131 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11132 replace calls to snprintf by calls to xsnprintf throughout.
11133
111342010-09-01 Joel Brobecker <brobecker@adacore.com>
11135
11136 * configure.ac: Add configure check for alloca.
11137 * configure, config.in: Regenerate.
11138 * server.h: Include alloca.h if it exists.
11139 * gdbreplay.c: Include alloca.h if it exists.
11140
1a981360
PA
111412010-08-28 Pedro Alves <pedro@codesourcery.com>
11142
11143 * linux-low.c (__SIGRTMIN): Define if not already defined.
11144 (linux_create_inferior): Check for __ANDROID__ rather than
11145 __SIGRTMIN.
11146 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11147 are already deferred.
11148 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11149 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11150 stopped and already has a pending signal to report.
11151 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11152 a pending signal to report or is moving out of a jump pad.
11153 (linux_init_signals): Check for __ANDROID__ rather than
11154 __SIGRTMIN.
11155
b4d51a55
PA
111562010-08-28 Pedro Alves <pedro@codesourcery.com>
11157
11158 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11159 debug_threads check. Avoid a linear search when not doing debug
11160 output.
11161
ec48365d
PA
111622010-08-27 Pedro Alves <pedro@codesourcery.com>
11163
11164 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11165 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11166 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11167 (process_event): Change local fd's type to gdb_fildes_t.
11168 (create_file_handler): Adjust prototype.
11169 (delete_file_handler): Adjust prototype.
11170 (handle_file_event): Adjust prototype. Use pfildes.
11171 (create_file_event): Adjsut prototype.
11172 * remote-utils.c (remote_desc, listen_desc): Change type to
11173 gdb_fildes_t.
11174 * server.h: New gdb_fildes_t typedef.
11175 [USE_WIN32API]: Include winsock2.h.
11176 (delete_file_handler, add_file_handler): Adjust prototypes.
11177 (pfildes): Declare.
11178 * utils.c (pfildes): New.
11179
854d88f0
PA
111802010-08-27 Pedro Alves <pedro@codesourcery.com>
11181
11182 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11183 * configure: Regenerate.
11184
0146f85b
PA
111852010-08-27 Pedro Alves <pedro@codesourcery.com>
11186
11187 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11188 (linux_done_accessing_memory): ... this.
11189 (linux_target_ops): Adjust.
11190 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11191 * nto-low.c (nto_target_ops): Adjust comment.
11192 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11193 * spu-low.c (spu_target_ops): Adjust comment.
11194 * target.h (target_ops): Rename unprepare_to_access_memory field
11195 to done_accessing_memory.
11196 (unprepare_to_access_memory): Rename to ...
11197 (done_accessing_memory): ... this.
11198
90d74c30
PA
111992010-08-26 Pedro Alves <pedro@codesourcery.com>
11200
11201 * linux-low.c (linux_prepare_to_access_memory): New.
11202 (linux_unprepare_to_access_memory): New.
11203 (linux_target_ops): Install them.
11204 * server.c (read_memory): Rename to ...
11205 (gdb_read_memory): ... this. Use
11206 prepare_to_access_memory/prepare_to_access_memory.
11207 (write_memory): Rename to ...
11208 (gdb_write_memory): ... this. Use
11209 prepare_to_access_memory/prepare_to_access_memory.
11210 (handle_search_memory_1): Adjust.
11211 (process_serial_event): Adjust.
11212 * target.h (struct target_ops): New fields
11213 prepare_to_access_memory and unprepare_to_access_memory.
11214 (prepare_to_access_memory, unprepare_to_access_memory): New.
11215 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11216 prepare_to_access_memory/prepare_to_access_memory.
11217 * nto-low.c (nto_target_ops): Adjust.
11218 * spu-low.c (spu_target_ops): Adjust.
11219 * win32-low.c (win32_target_ops): Adjust.
11220
fd467969
PA
112212010-08-26 Pedro Alves <pedro@codesourcery.com>
11222
11223 * Makefile.in (WARN_CFLAGS): Get it from configure.
11224 (WERROR_CFLAGS): New.
11225 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11226 * configure.ac: Introduce --enable-werror, which adds -Werror to
11227 the compiler command line. Enabled by default. Disable with
11228 --disable-werror. Add -Wdeclaration-after-statement
11229 Wpointer-arith and -Wformat-nonliteral to warning flags.
11230 * configure: Regenerate.
11231
331e2f5f
PA
112322010-08-26 Pedro Alves <pedro@codesourcery.com>
11233
11234 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11235
e581f2b4
PA
112362010-08-26 Pedro Alves <pedro@codesourcery.com>
11237
11238 * gdbreplay.c (remote_error): New.
11239 (gdbchar): New.
11240 (expect): Use gdbchar. Check for error reading from GDB.
11241 Clarify sync error output.
11242 (play): Check for errors writing to GDB.
11243 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11244 * remote-utils.c (getpkt): Check for errors writing to the remote
11245 descriptor.
11246
3c11dd79
PA
112472010-08-25 Pedro Alves <pedro@codesourcery.com>
11248
11249 * linux-low.c (linux_wait_1): Move non-debugging code out of
11250 `debug_threads' control.
11251
d20a8ad9
PA
112522010-08-25 Pedro Alves <pedro@codesourcery.com>
11253
11254 * linux-low.c (linux_wait_1): Don't set last_status here.
11255 * server.c (push_event, queue_stop_reply_callback): Assert we're
11256 not pushing a TARGET_WAITKIND_IGNORE event.
11257 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11258 (myresume, handle_target_event): Set the thread's last_resume_kind
11259 and last_status from the target returned status.
11260
964e4306
PA
112612010-08-25 Pedro Alves <pedro@codesourcery.com>
11262
11263 PR threads/10729
11264
11265 * linux-x86-low.c (update_debug_registers_callback): New.
11266 (i386_dr_low_set_addr): Use it.
11267 (i386_dr_low_get_addr): New.
11268 (i386_dr_low_set_control): Use update_debug_registers_callback.
11269 (i386_dr_low_get_control): New.
11270 (i386_dr_low_get_status): Adjust.
11271 * linux-low.c (linux_stop_lwp): New.
11272 * linux-low.h (linux_stop_lwp): Declare.
11273
11274 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11275 argument instead of a i386_debug_reg_state.
11276 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11277 a i386_debug_reg_state.
11278 (i386_insert_aligned_watchpoint): Adjust.
11279 (i386_remove_aligned_watchpoint): Adjust.
11280 (i386_low_stopped_data_address): Read the debug registers from the
11281 inferior instead of from the mirrors.
11282 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11283 (i386_dr_low_get_addr): Declare.
11284 (i386_dr_low_get_control): Declare.
11285 (i386_dr_low_get_status): Change prototype.
11286
11287 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11288 (i386_dr_low_get_addr): New.
11289 (i386_dr_low_get_control): New.
11290 (i386_dr_low_get_status): Adjust prototype. Return
11291 dr_status_mirror.
11292 (i386_initial_stuff): Clear dr_status_mirror and
11293 dr_control_mirror.
11294 (i386_get_thread_context): Adjust.
11295 (i386_set_thread_context): Adjust.
11296 (i386_thread_added): Adjust.
11297
5f21a75b
PA
112982010-08-24 Pedro Alves <pedro@codesourcery.com>
11299
11300 * linux-low.h (linux_thread_area): Delete declaration.
11301
3e4c1235
TS
113022010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11303
11304 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11305 after its termination.
11306
1971b033
PA
113072010-08-09 Pedro Alves <pedro@codesourcery.com>
11308
11309 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11310 (gdb_wants_all_stopped): Delete.
11311 (linux_wait_1): Don't call them.
11312 * server.c (handle_v_cont): Tag all threads as want-stopped.
11313 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11314 stopped as "client-wants-stopped".
11315
310444ac
PA
113162010-07-31 Pedro Alves <pedro@codesourcery.com>
11317
11318 * Makefile.in (signals_h): New.
11319 (server_h): Depend on it.
11320 (server.o): Don't depend on $(signals_def).
11321 (signals.o): Depend on $(signals_def).
11322
a19cae16
JK
113232010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11324
11325 * Makefile.in (signals_def): New.
11326 (server_h): Append include/gdb/signals.h and signals_def.
11327 (server.o): Append signals_def.
11328
30d50328
JK
113292010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11330
11331 * server.c (handle_target_event): Use target_signal_to_host for
11332 resume_info.sig initialization.
11333 * target.h (struct thread_resume) <sig>: New comment.
11334
5c3216e2
OS
113352010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11336
c6f46ca0
OS
11337 * server.c (handle_query): strcpy() the returned string from paddress()
11338 instead of sprintf().
5c3216e2
OS
11339 * utils.c (paddress): Return phex_nz().
11340
6bd31874
JB
113412010-07-07 Joel Brobecker <brobecker@adacore.com>
11342
11343 * server.c (handle_v_cont): Call mourn_inferior if process
11344 just exited.
11345 (myresume): Likewise.
11346
0fb4aa4b
PA
113472010-07-01 Pedro Alves <pedro@codesourcery.com>
11348
11349 Static tracepoints, and integration with UST.
11350
11351 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11352 * mem-break.c (uninsert_all_breakpoints)
11353 (reinsert_all_breakpoints): New.
11354 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11355 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11356 (gdb_agent_ust_loaded, helper_thread_id)
11357 (gdb_agent_helper_thread_id): New macros.
11358 (struct ipa_sym_addresses): Add addr_ust_loaded,
11359 addr_helper_thread_id, addr_cmd_buf.
11360 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11361 (in_process_agent_loaded_ust): New.
11362 (write_e_ust_not_loaded): New.
11363 (maybe_write_ipa_ust_not_loaded): New.
11364 (struct collect_static_trace_data_action): New.
11365 (enum tracepoint_type) <static_tracepoint>: New.
11366 (struct tracepoint) <handle>: Mention static tracepoints.
11367 (struct static_tracepoint_ctx): New.
11368 (CMD_BUF_SIZE): New.
11369 (add_tracepoint_action): Handle static tracepoint actions.
11370 (unprobe_marker_at): New.
11371 (clear_installed_tracepoints): Handle static tracepoints.
11372 (cmd_qtdp): Handle static tracepoints.
11373 (probe_marker_at): New.
11374 (cmd_qtstart): Handle static tracepoints.
11375 (response_tracepoint): Handle static tracepoints.
11376 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11377 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11378 (get_context_regcache): Handle static tracepoints.
11379 (do_action_at_tracepoint): Handle static tracepoint actions.
11380 (traceframe_find_block_type): Handle static trace data blocks.
11381 (traceframe_read_sdata): New.
11382 (download_tracepoints): Download static tracepoint actions.
11383 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11384 (GDB_PROBE_NAME): New.
11385 (ust_ops): New.
11386 (GET_UST_SYM): New.
11387 (USTF): New.
11388 (dlsym_ust): New.
11389 (ust_marker_to_static_tracepoint): New.
11390 (gdb_probe): New.
11391 (collect_ust_data_at_tracepoint): New.
11392 (gdb_ust_probe): New.
11393 (UNIX_PATH_MAX, SOCK_DIR): New.
11394 (gdb_ust_connect_sync_socket): New.
11395 (resume_thread, stop_thread): New.
11396 (run_inferior_command): New.
11397 (init_named_socket): New.
11398 (gdb_ust_socket_init): New.
11399 (cstr_to_hexstr): New.
11400 (next_st): New.
11401 (first_marker, next_marker): New.
11402 (response_ust_marker): New.
11403 (cmd_qtfstm, cmd_qtsstm): New.
11404 (unprobe_marker_at, probe_marker_at): New.
11405 (cmd_qtstmat, gdb_ust_thread): New.
11406 (gdb_ust_init): New.
11407 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11408 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11409 (ST_REGENTRY): New.
11410 (x86_64_st_collect_regmap): New.
11411 (X86_64_NUM_ST_COLLECT_GREGS): New.
11412 (AMD64_RIP_REGNUM): New.
11413 (supply_static_tracepoint_registers): New.
11414 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11415 (ST_REGENTRY): New.
11416 (i386_st_collect_regmap): New.
11417 (i386_NUM_ST_COLLECT_GREGS): New.
11418 (supply_static_tracepoint_registers): New.
11419 * server.c (handle_query): Handle qXfer:statictrace:read.
11420 <qSupported>: Report support for StaticTracepoints, and
11421 qXfer:statictrace:read features.
11422 * server.h (traceframe_read_sdata)
11423 (supply_static_tracepoint_registers): Declare.
11424 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11425 (unpack_varlen_hex): Include in IPA build.
11426 * Makefile.in (ustlibs, ustinc): New.
11427 (IPA_OBJS): Add remote-utils-ipa.o.
11428 ($(IPA_LIB)): Link -ldl and -lpthread.
11429 (UST_CFLAGS): New.
11430 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11431 * config.in, configure: Regenerate.
11432
9e4344e5
PA
114332010-06-20 Ian Lance Taylor <iant@google.com>
11434 Pedro Alves <pedro@codesourcery.com>
11435
11436 * linux-x86-low.c (always_true): Delete.
11437 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11438 trying to fool the compiler with always_true.
11439
c6beb2cb
PA
114402010-06-20 Pedro Alves <pedro@codesourcery.com>
11441
11442 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11443 conditions in gdbserver.
11444
d2ed6730
UW
114452010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11446
11447 * spu-low.c (spu_read_memory): Wrap around local store limit.
11448 (spu_write_memory): Likewise.
11449
4e29fb54
PA
114502010-06-15 Pedro Alves <pedro@codesourcery.com>
11451
11452 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11453 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11454 LONGEST uses.
11455 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11456 uses.
11457 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11458 uses with LONGEST uses.
11459
6a271cae
PA
114602010-06-14 Stan Shebs <stan@codesourcery.com>
11461 Pedro Alves <pedro@codesourcery.com>
11462
11463 Bytecode compiler.
11464
11465 * linux-x86-low.c: Include limits.h.
11466 (add_insns): New.
11467 (always_true): New.
11468 (EMIT_ASM): New.
11469 (EMIT_ASM32): New.
11470 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11471 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11472 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11473 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11474 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11475 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11476 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11477 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11478 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11479 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11480 (amd64_emit_void_call_2): New.
11481 (amd64_emit_ops): New.
11482 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11483 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11484 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11485 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11486 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11487 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11488 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11489 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11490 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11491 (i386_emit_stack_adjust, i386_emit_int_call_1)
11492 (i386_emit_void_call_2): New.
11493 (i386_emit_ops): New.
11494 (x86_emit_ops): New.
11495 (the_low_target): Install x86_emit_ops.
11496 * server.h (struct emit_ops): New.
11497 (get_raw_reg_func_addr): Declare.
11498 (current_insn_ptr, emit_error): Declare.
11499 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11500 (set_trace_state_variable_value): New defines.
11501 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11502 addr_get_trace_state_variable_value and
11503 addr_set_trace_state_variable_value.
11504 (symbol_list): New fields for get_raw_reg,
11505 get_trace_state_variable_value and set_trace_state_variable_value.
11506 (condfn): New typedef.
11507 (struct tracepoint): New field `compiled_cond'.
11508 (do_action_at_tracepoint): Clear compiled_cond.
11509 (get_trace_state_variable_value, set_trace_state_variable_value):
11510 Export in the IPA.
11511 (condition_true_at_tracepoint): If there's a compiled condition,
11512 run that.
11513 (current_insn_ptr, emit_error): New globals.
11514 (struct bytecode_address): New.
11515 (get_raw_reg_func_addr): New.
11516 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11517 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11518 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11519 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11520 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11521 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11522 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11523 (compile_tracepoint_condition, compile_bytecodes): New.
11524 * target.h (emit_ops): Forward declare.
11525 (struct target_ops): New field emit_ops.
11526 (target_emit_ops): New.
11527 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11528 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11529 * linux-low.c (linux_emit_ops): New.
11530 (linux_target_ops): Install it.
11531 * linux-low.h (struct linux_target_ops): New field emit_ops.
11532
92b72907
UW
115332010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11534
11535 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11536 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11537
fa593d66
PA
115382010-06-01 Pedro Alves <pedro@codesourcery.com>
11539 Stan Shebs <stan@codesourcery.com>
11540
11541 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11542 (all): Depend on $(extra_libraries).
11543 (install-only): Install the IPA.
11544 (IPA_OBJS, IPA_LIB): New.
11545 (clean): Remove the IPA lib.
11546 (IPAGENT_CFLAGS): New.
11547 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11548 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11549 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11550 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11551 * configure.ac: Check for atomic builtins support in the compiler.
11552 (IPA_DEPFILES, extra_libraries): Define.
11553 * configure.srv (ipa_obj): Add description.
11554 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11555 (i[34567]86-*-linux*): Set ipa_obj.
11556 (x86_64-*-linux*): Set ipa_obj.
11557 * linux-low.c (stabilizing_threads): New.
11558 (supports_fast_tracepoints): New.
11559 (linux_detach): Stabilize threads before detaching.
11560 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11561 the lwp is either not stabilizing, or is moving out of a jump pad.
11562 (linux_fast_tracepoint_collecting): New.
11563 (maybe_move_out_of_jump_pad): New.
11564 (enqueue_one_deferred_signal): New.
11565 (dequeue_one_deferred_signal): New.
11566 (linux_wait_for_event_1): If moving out of a jump pad, defer
11567 pending signals to later.
11568 (linux_stabilize_threads): New.
11569 (linux_wait_1): Check if threads need moving out of jump pads, and
11570 do it if so.
11571 (stuck_in_jump_pad_callback): New.
11572 (move_out_of_jump_pad_callback): New.
11573 (lwp_running): New.
11574 (linux_resume_one_lwp): Handle moving out of jump pads.
11575 (linux_set_resume_request): Dequeue deferred signals.
11576 (need_step_over_p): Also step over fast tracepoint jumps.
11577 (start_step_over): Also uninsert fast tracepoint jumps.
11578 (finish_step_over): Also reinsert fast tracepoint jumps.
11579 (linux_install_fast_tracepoint_jump): New.
11580 (linux_target_ops): Install linux_stabilize_threads and
11581 linux_install_fast_tracepoint_jump_pad.
11582 * linux-low.h (linux_target_ops) <get_thread_area,
11583 install_fast_tracepoint_jump_pad>: New fields.
11584 (struct lwp_info) <collecting_fast_tracepoint,
11585 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11586 (linux_get_thread_area): Declare.
11587 * linux-x86-low.c (jump_insn): New.
11588 (x86_get_thread_area): New.
11589 (append_insns): New.
11590 (push_opcode): New.
11591 (amd64_install_fast_tracepoint_jump_pad): New.
11592 (i386_install_fast_tracepoint_jump_pad): New.
11593 (x86_install_fast_tracepoint_jump_pad): New.
11594 (the_low_target): Install x86_get_thread_area and
11595 x86_install_fast_tracepoint_jump_pad.
11596 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11597 (struct fast_tracepoint_jump): New.
11598 (fast_tracepoint_jump_insn): New.
11599 (fast_tracepoint_jump_shadow): New.
11600 (find_fast_tracepoint_jump_at): New.
11601 (fast_tracepoint_jump_here): New.
11602 (delete_fast_tracepoint_jump): New.
11603 (set_fast_tracepoint_jump): New.
11604 (uninsert_fast_tracepoint_jumps_at): New.
11605 (reinsert_fast_tracepoint_jumps_at): New.
11606 (set_breakpoint_at): Use write_inferior_memory.
11607 (uninsert_raw_breakpoint): Use write_inferior_memory.
11608 (check_mem_read): Mask out fast tracepoint jumps.
11609 (check_mem_write): Mask out fast tracepoint jumps.
11610 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11611 (set_fast_tracepoint_jump): Declare.
11612 (delete_fast_tracepoint_jump)
11613 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11614 (reinsert_fast_tracepoint_jumps_at): Declare.
11615 * regcache.c: Don't compile many functions when building the
11616 in-process agent library.
11617 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11618 the register buffer in the heap.
11619 (free_register_cache): If the register buffer isn't owned by the
11620 regcache, don't free it.
11621 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11622 pre-existing register caches.
11623 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11624 type.
11625 (convert_ascii_to_int): : Constify `from' parameter type.
11626 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11627 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11628 the needed buffer in-place.
11629 (relocate_instruction): New.
11630 * server.c (handle_query) <qSymbols>: If the target supports
11631 tracepoints, give it a chance of looking up symbols. Report
11632 support for fast tracepoints.
11633 (handle_status): Stabilize threads.
11634 (process_serial_event): Adjust.
11635 * server.h (struct fast_tracepoint_jump): Forward declare.
11636 (struct process_info) <fast_tracepoint_jumps>: New field.
11637 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11638 (decode_X_packet, decode_M_packet): Adjust.
11639 (relocate_instruction): Declare.
11640 (in_process_agent_loaded): Declare.
11641 (tracepoint_look_up_symbols): Declare.
11642 (struct fast_tpoint_collect_status): Declare.
11643 (fast_tracepoint_collecting): Declare.
11644 (force_unlock_trace_buffer): Declare.
11645 (handle_tracepoint_bkpts): Declare.
11646 (initialize_low_tracepoint)
11647 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11648 * target.h (struct target_ops) <stabilize_threads,
11649 install_fast_tracepoint_jump_pad>: New fields.
11650 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11651 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11652 [HAVE_STDINT_H]: Include stdint.h.
11653 (trace_debug_1): Rename to ...
11654 (trace_vdebug): ... this.
11655 (trace_debug): Rename to ...
11656 (trace_debug_1): ... this. Add `level' parameter.
11657 (trace_debug): New.
11658 (ATTR_USED, ATTR_NOINLINE): New.
11659 (IP_AGENT_EXPORT): New.
11660 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11661 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11662 (about_to_request_buffer_space, trace_buffer_is_full)
11663 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11664 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11665 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11666 (traceframe_write_count, traceframes_created)
11667 (trace_state_variables)
11668 New renaming defines.
11669 (struct ipa_sym_addresses): New.
11670 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11671 (symbol_list): New.
11672 (ipa_sym_addrs): New.
11673 (all_tracepoint_symbols_looked_up): New.
11674 (in_process_agent_loaded): New.
11675 (write_e_ipa_not_loaded): New.
11676 (maybe_write_ipa_not_loaded): New.
11677 (tracepoint_look_up_symbols): New.
11678 (debug_threads) [IN_PROCESS_AGENT]: New.
11679 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11680 (UNKNOWN_SIDE_EFFECTS): New.
11681 (stop_tracing): New.
11682 (flush_trace_buffer): New.
11683 (stop_tracing_bkpt): New.
11684 (flush_trace_buffer_bkpt): New.
11685 (read_inferior_integer): New.
11686 (read_inferior_uinteger): New.
11687 (read_inferior_data_pointer): New.
11688 (write_inferior_data_pointer): New.
11689 (write_inferior_integer): New.
11690 (write_inferior_uinteger): New.
11691 (struct collect_static_trace_data_action): Delete.
11692 (enum tracepoint_type): New.
11693 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11694 <actions_str, step_actions, step_actions_str>: Only include in
11695 GDBserver.
fa593d66
PA
11696 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11697 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11698 (tracepoints): Use IP_AGENT_EXPORT.
11699 (last_tracepoint): Don't include in the IPA.
11700 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11701 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11702 (alloced_trace_state_variables): New.
11703 (trace_state_variables): Use IP_AGENT_EXPORT.
11704 (traceframe_t): Delete unused variable.
11705 (circular_trace_buffer): Don't include in the IPA.
11706 (trace_buffer_start): Delete.
11707 (struct trace_buffer_control): New.
11708 (trace_buffer_free): Delete.
11709 (struct ipa_trace_buffer_control): New.
11710 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11711 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11712 New.
11713 (trace_buffer_ctrl): New.
11714 (TRACE_BUFFER_CTRL_CURR): New.
11715 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11716 Reimplement as macros.
11717 (trace_buffer_wrap): Delete.
11718 (traceframe_write_count, traceframe_read_count)
11719 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11720 (struct tracepoint_hit_ctx) <type>: New field.
11721 (struct fast_tracepoint_ctx): New.
11722 (memory_barrier): New.
11723 (cmpxchg): New.
11724 (record_tracepoint_error): Update atomically in the IPA.
11725 (clear_inferior_trace_buffer): New.
11726 (about_to_request_buffer_space): New.
11727 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11728 updating the same buffer.
11729 (add_tracepoint): Default the tracepoint's type to trap
11730 tracepoint, and orig_size to -1.
11731 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11732 internal variables.
11733 (create_trace_state_variable): New parameter `gdb'. Handle it.
11734 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11735 (cmd_qtdp): Handle fast tracepoints.
11736 (cmd_qtdv): Adjust.
11737 (max_jump_pad_size): New.
11738 (gdb_jump_pad_head): New.
11739 (get_jump_space_head): New.
11740 (claim_jump_space): New.
11741 (sort_tracepoints): New.
11742 (MAX_JUMP_SIZE): New.
11743 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11744 IPA.
11745 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11746 support. Upload fast traceframes, and delete internal IPA
11747 breakpoints.
11748 (stop_tracing_handler): New.
11749 (flush_trace_buffer_handler): New.
11750 (cmd_qtstop): Upload fast tracepoints.
11751 (response_tracepoint): Handle fast tracepoints.
11752 (tracepoint_finished_step): Upload fast traceframes. Set the
11753 tracepoint hit context's tracepoint type.
11754 (handle_tracepoint_bkpts): New.
11755 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11756 type. Add comment about fast tracepoints.
11757 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11758 non-existing action_str field.
11759 (get_context_regcache): Handle fast tracepoints.
11760 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11761 to the regcache.
11762 (fast_tracepoint_from_jump_pad_address): New.
11763 (fast_tracepoint_from_ipa_tpoint_address): New.
11764 (collecting_t): New.
11765 (force_unlock_trace_buffer): New.
11766 (fast_tracepoint_collecting): New.
11767 (collecting): New.
11768 (gdb_collect): New.
11769 (write_inferior_data_ptr): New.
11770 (target_tp_heap): New.
11771 (target_malloc): New.
11772 (download_agent_expr): New.
11773 (UALIGN): New.
11774 (download_tracepoints): New.
11775 (download_trace_state_variables): New.
11776 (upload_fast_traceframes): New.
11777 (IPA_FIRST_TRACEFRAME): New.
11778 (IPA_NEXT_TRACEFRAME_1): New.
11779 (IPA_NEXT_TRACEFRAME): New.
11780 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11781 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11782 (gdb_jump_pad_buffer_end): New.
11783 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11784 (initialize_tracepoint): Adjust.
11785 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11786 buffer. Initialize the low module.
11787 * utils.c (PREFIX, TOOLNAME): New.
11788 (malloc_failure): Use PREFIX.
11789 (error): In the IPA, an error causes an exit.
11790 (fatal, warning): Use PREFIX.
11791 (internal_error): Use TOOLNAME.
11792 (NUMCELLS): Increase to 10.
11793 * configure, config.in: Regenerate.
11794
d149dd1d
PA
117952010-06-01 Pedro Alves <pedro@codesourcery.com>
11796
11797 * server.c (handle_query) <qSupported>: Do two passes over the
11798 qSupported string to avoid nesting strtok.
11799
f6528abd
JK
118002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11801
11802 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11803 (CDEPS): New.
11804 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11805 -Wl,--dynamic-list.
11806 * configure: Regenerate.
11807 * proc-service.list: New.
11808
ca2a87a0
JK
118092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11810
11811 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11812 New comment.
11813
363a6e9f
OS
118142010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11815
11816 * gdbreplay.c (remote_open): Check error return from socket() call by
11817 its equality to -1 not by it being negative.
11818 * remote-utils.c (remote_open): Likewise.
11819
d23b6cb1
PA
118202010-05-23 Pedro Alves <pedro@codesourcery.com>
11821
11822 * config.h: Regenerate.
11823
28d3cf85
MK
118242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11825
11826 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11827 doesn't provide PTRACE_GET_THREAD_AREA.
11828
fea36a59
MK
118292010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11830
11831 * linux-m68k-low.c: Include <asm/ptrace.h>
11832 (ps_get_thread_area): Implement.
11833
24b066ba
DE
118342010-05-03 Doug Evans <dje@google.com>
11835
11836 * event-loop.c (struct callback_event): New struct.
11837 (callback_list): New global.
11838 (append_callback_event, delete_callback_event): New functions.
11839 (process_callback): New function.
11840 (start_event_loop): Call it.
11841 * remote-utils.c (NOT_SCHEDULED): Define.
11842 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11843 moved out of readchar.
11844 (readchar): Rewrite. Call reschedule before returning.
11845 (reset_readchar): New function.
11846 (remote_close): Call it.
11847 (process_remaining, reschedule): New functions.
11848 * server.h (callback_handler_func): New typedef.
11849 (append_callback_event, delete_callback_event): Declare.
11850
9836d6ea
PA
118512010-05-03 Pedro Alves <pedro@codesourcery.com>
11852
11853 * proc-service.c (ps_pglobal_lookup): Use
11854 thread_db_look_up_one_symbol.
11855 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11856 parameter. Use it instead of all_symbols_looked_up.
11857 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11858 field.
11859 (all_symbols_looked_up): Don't declare.
11860 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11861 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11862 field.
11863 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11864 Set all_symbols_looked_up here.
11865 (thread_db_look_up_one_symbol): New.
11866 (thread_db_get_tls_address): Adjust.
11867 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11868 thread_db object on the heap, and tentatively set it in the
11869 process structure.
11870 (thread_db_init): Don't set all_symbols_looked_up here.
11871 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11872
7984d532
PA
118732010-05-03 Pedro Alves <pedro@codesourcery.com>
11874
11875 * linux-low.c (linux_kill, linux_detach): Adjust.
11876 (status_pending_p_callback): Remove redundant statement. Check
11877 for !TARGET_WAITIKIND_IGNORE, instead of
11878 TARGET_WAITKIND_STOPPED.
11879 (handle_tracepoints): Make sure LWP is locked. Adjust.
11880 (linux_wait_for_event_1): Adjust.
11881 (linux_cancel_breakpoints): New.
11882 (unsuspend_one_lwp): New.
11883 (unsuspend_all_lwps): New.
11884 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11885 (send_sigstop_callback): Change return type to int, add new
11886 `except' parameter and handle it.
11887 (suspend_and_send_sigstop_callback): New.
11888 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11889 pass them down. If SUSPEND, also increment the lwp's suspend
11890 count.
11891 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11892 (need_step_over_p): Don't consider suspended LWPs.
11893 (start_step_over): Adjust.
11894 (proceed_one_lwp): Change return type to int, add new `except'
11895 parameter and handle it.
11896 (unsuspend_and_proceed_one_lwp): New.
11897 (proceed_all_lwps): Use find_inferior instead of
11898 for_each_inferior.
11899 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11900 also decrement the suspend count of LWPs. Pass `except' down,
11901 instead of hacking its suspend count.
11902 (linux_pause_all): Add `freeze' parameter. Adjust.
11903 (linux_unpause_all): New.
11904 (linux_target_ops): Install linux_unpause_all.
11905 * server.c (handle_status): Adjust.
11906 * target.h (struct target_ops): New fields `unpause_all' and
11907 `cancel_breakpoints'. Add new parameter to `pause_all'.
11908 (pause_all): Add new `freeze' parameter.
11909 (unpause_all): New.
11910 (cancel_breakpoints): New.
11911 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11912 cancel breakpoints.
11913 (cmd_qtstart): Pause threads.
11914 (stop_tracing): Pause threads, and cancel breakpoints.
11915 * win32-low.c (win32_target_ops): Adjust.
11916
e471f25b
PA
119172010-05-03 Pedro Alves <pedro@codesourcery.com>
11918
11919 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11920 the inferior right away from here...
11921 (linux_wait_1): ... to here, and adjust to check the thread's
11922 last_resume_kind instead of the lwp's step or stop_expected flags.
11923
1915ef4f
PA
119242010-05-02 Pedro Alves <pedro@codesourcery.com>
11925
11926 * README: Use consistent `GDB' and `GDBserver' spellings.
11927
f9e39928
PA
119282010-05-02 Pedro Alves <pedro@codesourcery.com>
11929
11930 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11931 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11932 (linux_detach_one_lwp): Assume the lwp is stopped.
11933 (any_thread_of): Delete.
11934 (linux_detach): Stop all lwps here. Don't blindly delete all
11935 breakpoints.
11936 (delete_lwp_callback): New.
11937 (linux_mourn): Delete all lwps of the process that is gone.
11938 (linux_wait_1): Don't delete the last lwp of the process here.
11939 * mem-break.h (mark_breakpoints_out): Declare.
11940 * mem-break.c (mark_breakpoints_out): New.
11941 (free_all_breakpoints): Use it.
11942 * server.c (handle_target_event): If the process is gone, mark
11943 breakpoints out.
11944 * thread-db.c (struct thread_db) <create_bp>: New field.
11945 (thread_db_enable_reporting): Fix prototype. Store a thread event
11946 breakpoint reference in the thread_db struct.
11947 (thread_db_load_search): Clear the thread_db object.
11948 (try_thread_db_load_1): Ditto.
11949 (switch_to_process): New.
11950 (disable_thread_event_reporting): Use it.
11951 (remove_thread_event_breakpoints): New.
11952 (thread_db_detach, thread_db_mourn): Use it.
11953
1e7fc18c
PA
119542010-05-01 Pedro Alves <pedro@codesourcery.com>
11955
11956 * linux-low.c (linux_enable_event_reporting): New.
11957 (linux_wait_for_event_1, handle_extended_wait): Use it.
11958
02fc4de7
PA
119592010-04-30 Pedro Alves <pedro@codesourcery.com>
11960
11961 * linux-low.c (linux_kill_one_lwp, linux_kill)
11962 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11963 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11964 SIGSTOP even if the LWP is stopped.
11965 (send_sigstop_callback): New.
11966 (stop_all_lwps): Use send_sigstop_callback instead.
11967 (linux_resume_one_thread): Adjust.
11968 (proceed_one_lwp): Still proceed an LWP that the client has
11969 requested to stop, if we haven't reported it as stopped yet. Make
11970 sure that LWPs the client want stopped, have a pending SIGSTOP.
11971
bc3b5632
DE
119722010-04-26 Doug Evans <dje@google.com>
11973
ae1ada35
DE
11974 * server.c (handle_general_set): Make static.
11975
bc3b5632
DE
11976 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11977 Print received char after testing for error/eof instead of before.
11978 (input_interrupt): Tweak comment.
11979
65730243
DE
119802010-04-23 Doug Evans <dje@google.com>
11981
11982 * server.c (start_inferior): Print inferior argv if --debug.
11983
a8ae7dc0
AR
119842010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11985
11986 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11987 * nto-x86-low.c: Include server.h
11988
1c07cc19
PM
119892010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11990
11991 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11992 be consistent with other sources of this directory.
11993 (init_registers_amd64): Correct name of source file of this function
11994 in the comment.
11995
e0a61e09
PM
119962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11997
11998 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11999 64-bit executables.
12000
54709339
PM
120012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12002
12003 * win32-i386-low.c: Add 64-bit support.
12004 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12005 (init_registers_amd64): Declare.
12006 (mappings): Add 64-bit version of array.
12007 (init_windows_x86): New function.
12008 (the_low_target): Change init_arch field to init_windows_x86.
12009
e8f0053d
PM
120102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12011
12012 * win32-low.c: Adapt to support also 64-bit architecture.
12013 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12014 (get_image_name): Use SIZE_T type for local variable `done'.
12015 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12016 (toolhelp_get_dll_name): Idem.
12017 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12018 Use uintptr_t typecast to avoid warning.
12019 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12020 (handle_exception): Use phex_nz to avoid warning.
12021 (win32_wait): Remove unused local variable `process'.
12022
c481e77e
PM
120232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12024
12025 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12026 `amd64-avx.o'.
12027
12ea4b69
PM
120282010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12029
12030 * configure.ac: Use `ws2_32' library for srv_mingw.
12031 * configure: Regenerate.
12032 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12033 * remote-utils.c: Likewise.
12034
f6d1620c
L
120352010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12036
12037 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12038 if __x86_64__ is defined.
12039
8e642873
PM
120402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12041
12042 * configure: Regenerate.
12043
711e434b
PM
120442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12045
12046 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12047 * target.h (target_ops): New get_tib_address field.
12048 * win32-low.h (win32_thread_info): Add thread_local_base field.
12049 * win32-low.c (child_add_thread): Add tlb argument.
12050 Set thread_local_base field to TLB.
12051 (get_child_debug_event): Adapt to child_add_thread change.
12052 (win32_get_tib_address): New function.
12053 (win32_target_ops): Set get_tib_address field to
12054 win32_get_tib_address.
12055 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12056
505106cd
PA
120572010-04-12 Pedro Alves <pedro@codesourcery.com>
12058
505106cd
PA
12059 * linux-low.c (linux_mourn): Also remove the process.
12060 * server.c (handle_target_event): Don't remove the process here.
12061 * nto-low.c (nto_mourn): New.
12062 (nto_target_ops): Install it.
12063 * spu-low.c (spu_mourn): New.
12064 (spu_target_ops): Install it.
12065 * win32-low.c (win32_mourn): New.
12066 (win32_target_ops): Install it.
12067
e8470a06
PA
120682010-04-12 Pedro Alves <pedro@codesourcery.com>
12069
12070 * server.h (buffer_xml_printf): Remove redundant `;'.
12071
45ba0d02
PA
120722010-04-12 Pedro Alves <pedro@codesourcery.com>
12073
12074 * regcache.c (set_register_cache): Invalidate regcaches before
12075 changing the register cache layout.
12076 (regcache_invalidate_one): Allow a NULL regcache.
12077 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12078 regcaches before changing the register cache layout or the target
12079 regsets.
12080
59e04013
L
120812010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12082
12083 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12084 variable warning on Linux/x86-64.
12085
8336d594
PA
120862010-04-11 Pedro Alves <pedro@codesourcery.com>
12087
12088 GDBserver disconnected tracing support.
12089
12090 * linux-low.c (linux_remove_process): Delete.
12091 (add_lwp): Don't set last_resume_kind here.
12092 (linux_kill): Use `mourn'.
12093 (linux_detach): Use `thread_db_detach', and `mourn'.
12094 (linux_mourn): New.
12095 (linux_attach_lwp_1): Adjust comment.
12096 (linux_attach): last_resume_kind moved the thread_info; adjust.
12097 (status_pending_p_callback): Adjust.
12098 (linux_wait_for_event_1): Adjust.
12099 (count_events_callback, select_singlestep_lwp_callback)
12100 (select_event_lwp_callback, cancel_breakpoints_callback)
12101 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12102 (proceed_one_lwp): Adjust.
12103 (linux_async): Add debug output.
12104 (linux_thread_stopped): New.
12105 (linux_pause_all): New.
12106 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12107 linux_pause_all.
12108 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12109 (thread_db_free): Delete declaration.
12110 (thread_db_detach, thread_db_mourn): Declare.
12111 * thread-db.c (thread_db_init): Use thread_db_mourn.
12112 (thread_db_free): Delete, split in two.
12113 (disable_thread_event_reporting): New.
12114 (thread_db_detach): New.
12115 (thread_db_mourn): New.
12116
12117 * server.h (struct thread_info) <last_resume_kind>: New field.
12118 <attached>: Add comment.
12119 <gdb_detached>: New field.
12120 (handler_func): Change return type to int.
12121 (handle_serial_event, handle_target_event): Ditto.
12122 (gdb_connected): Declare.
12123 (tracing): Delete.
12124 (disconnected_tracing): Declare.
12125 (stop_tracing): Declare.
12126
12127 * server.c (handle_query) <qSupported>: Report support for
12128 disconnected tracing.
12129 (queue_stop_reply_callback): Account for running threads.
12130 (gdb_wants_thread_stopped): New.
12131 (gdb_wants_all_threads_stopped): New.
12132 (gdb_reattached_process): New.
12133 (handle_status): Clear the `gdb_detached' flag of all processes.
12134 In all-stop, stop all threads.
12135 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12136 (process_serial_event): If the remote connection breaks, or if an
12137 exit was forced with "monitor exit", force an event loop exit.
12138 Handle disconnected tracing on detach.
12139 (handle_serial_event): Adjust.
12140 (handle_target_event): If GDB isn't connected, forward events back
12141 to the inferior, unless the last process exited, in which case,
12142 exit gdbserver. Adjust interface.
12143
12144 * remote-utils.c (remote_open): Don't block in accept. Instead
12145 register an event loop source on the listen socket file
12146 descriptor. Refactor bits into ...
12147 (listen_desc): ... this new global.
12148 (gdb_connected): ... this new function.
12149 (enable_async_notification): ... this new function.
12150 (handle_accept_event): ... this new function.
12151 (remote_close): Clear remote_desc.
12152
12153 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12154
12155 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12156 New fields.
12157 (mourn_inferior): Define.
12158 (target_process_qsupported): Avoid the dangling else problem.
12159 (thread_stopped): Define.
12160 (pause_all): Define.
12161 (target_waitstatus_to_string): Declare.
12162 * target.c (target_waitstatus_to_string): New.
12163
12164 * tracepoint.c (tracing): Make extern.
12165 (disconnected_tracing): New.
12166 (stop_tracing): Make extern. Handle tracing stops due to GDB
12167 disconnecting.
12168 (cmd_qtdisconnected): New.
12169 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12170 (handle_tracepoint_general_set): Handle QTDisconnected.
12171
12172 * event-loop.c (event_handler_func): Change return type to int.
12173 (process_event): Bail out if the event handler wants the event
12174 loop to stop.
12175 (handle_file_event): Ditto.
12176 (start_event_loop): Bail out if the event handler wants the event
12177 loop to stop.
12178
12179 * nto-low.c (nto_target_ops): Adjust.
12180 * spu-low.c (spu_wait): Don't remove the process here.
12181 (spu_target_ops): Adjust.
12182 * win32-low.c (win32_wait): Don't remove the process here.
12183 (win32_target_ops): Adjust.
12184
5d267c4c
PA
121852010-04-11 Pedro Alves <pedro@codesourcery.com>
12186
12187 * regcache.c (realloc_register_cache): Invalidate inferior's
12188 regcache before recreating it.
12189
623ccd72
PA
121902010-04-09 Pedro Alves <pedro@codesourcery.com>
12191
12192 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12193
219f2f23
PA
121942010-04-09 Stan Shebs <stan@codesourcery.com>
12195 Pedro Alves <pedro@codesourcery.com>
12196
12197 * server.h (LONGEST): New.
12198 (struct thread_info) <while_stepping>: New field.
12199 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12200 Declare.
12201 (initialize_tracepoint, handle_tracepoint_general_set)
12202 (handle_tracepoint_query, tracepoint_finished_step)
12203 (tracepoint_was_hit, release_while_stepping_state_list):
12204 (current_traceframe): Declare.
12205 * server.c (handle_general_set): Handle tracepoint packets.
12206 (read_memory): New.
12207 (write_memory): New.
12208 (handle_search_memory_1): Use read_memory.
12209 (handle_query): Report support for conditional tracepoints, trace
12210 state variables, and tracepoint sources. Handle tracepoint
12211 queries.
12212 (main): Initialize the tracepoints module.
12213 (process_serial_event): Handle traceframe reads/writes.
12214
12215 * linux-low.c (handle_tracepoints): New.
12216 (linux_wait_1): Call it.
12217 (linux_resume_one_lwp): Handle while-stepping.
12218 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12219 (linux_target_ops): Install them.
12220 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12221 New field.
12222 * linux-x86-low.c (x86_supports_tracepoints): New.
12223 (the_low_target). Install it.
12224
12225 * mem-break.h (delete_breakpoint): Declare.
12226 * mem-break.c (delete_breakpoint): Make external.
12227
12228 * target.h (struct target_ops): Add `supports_tracepoints',
12229 `read_pc', and `write_pc' fields.
12230 (target_supports_tracepoints): Define.
12231 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12232 (phex_nz): New.
12233
12234 * regcache.h (struct regcache) <registers_owned>: New field.
12235 (init_register_cache, regcache_cpy): Declare.
12236 (regcache_read_pc, regcache_write_pc): Declare.
12237 (register_cache_size): Declare.
12238 (supply_regblock): Declare.
12239 * regcache.c (init_register_cache): New.
12240 (new_register_cache): Use it.
12241 (regcache_cpy): New.
12242 (register_cache_size): New.
12243 (supply_regblock): New.
12244 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12245
219f2f23
PA
12246 * tracepoint.c: New.
12247
12248 * Makefile.in (OBS): Add tracepoint.o.
12249 (tracepoint.o): New rule.
12250
3a13a53b
L
122512010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12252
12253 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12254 (i386-mmx.o): New.
12255 (i386-mmx.c): Likewise.
12256 (i386-mmx-linux.o): Likewise.
12257 (i386-mmx-linux.c): Likewise.
12258
12259 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12260 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12261 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12262 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12263
12264 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12265 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12266 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12267
1570b33e
L
122682010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12269
12270 * Makefile.in (clean): Updated.
12271 (i386-avx.o): New.
12272 (i386-avx.c): Likewise.
12273 (i386-avx-linux.o): Likewise.
12274 (i386-avx-linux.c): Likewise.
12275 (amd64-avx.o): Likewise.
12276 (amd64-avx.c): Likewise.
12277 (amd64-avx-linux.o): Likewise.
12278 (amd64-avx-linux.c): Likewise.
12279
12280 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12281 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12282 (srv_amd64_regobj): Add amd64-avx.o.
12283 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12284 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12285 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12286 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12287 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12288 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12289 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12290
12291 * i387-fp.c: Include "i386-xstate.h".
12292 (i387_xsave): New.
12293 (i387_cache_to_xsave): Likewise.
12294 (i387_xsave_to_cache): Likewise.
12295 (x86_xcr0): Likewise.
12296
12297 * i387-fp.h (i387_cache_to_xsave): Likewise.
12298 (i387_xsave_to_cache): Likewise.
12299 (x86_xcr0): Likewise.
12300
12301 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12302 * linux-crisv32-low.c (target_regsets): Likewise.
12303 * linux-m68k-low.c (target_regsets): Likewise.
12304 * linux-mips-low.c (target_regsets): Likewise.
12305 * linux-ppc-low.c (target_regsets): Likewise.
12306 * linux-s390-low.c (target_regsets): Likewise.
12307 * linux-sh-low.c (target_regsets): Likewise.
12308 * linux-sparc-low.c (target_regsets): Likewise.
12309 * linux-xtensa-low.c (target_regsets): Likewise.
12310
12311 * linux-low.c: Include <sys/uio.h>.
12312 (regsets_fetch_inferior_registers): Support nt_type.
12313 (regsets_store_inferior_registers): Likewise.
12314 (linux_process_qsupported): New.
12315 (linux_target_ops): Add linux_process_qsupported.
12316
12317 * linux-low.h (regset_info): Add nt_type.
12318 (linux_target_ops): Add process_qsupported.
12319
12320 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12321 and <sys/uio.h>.
12322 (init_registers_i386_avx_linux): New.
12323 (init_registers_amd64_avx_linux): Likewise.
12324 (xmltarget_i386_linux_no_xml): Likewise.
12325 (xmltarget_amd64_linux_no_xml): Likewise.
12326 (PTRACE_GETREGSET): Likewise.
12327 (PTRACE_SETREGSET): Likewise.
12328 (x86_fill_xstateregset): Likewise.
12329 (x86_store_xstateregset): Likewise.
12330 (use_xml): Likewise.
12331 (x86_linux_update_xmltarget): Likewise.
12332 (x86_linux_process_qsupported): Likewise.
12333 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12334 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12335 init_registers_i386_linux here. Call
12336 x86_linux_update_xmltarget.
12337 (the_low_target): Add x86_linux_process_qsupported.
12338
12339 * server.c (handle_query): Call target_process_qsupported.
12340
12341 * target.h (target_ops): Add process_qsupported.
12342 (target_process_qsupported): New.
12343
fc7238bb
PA
123442010-04-03 Pedro Alves <pedro@codesourcery.com>
12345
12346 * inferiors.c (add_thread): Set last_status kind to
12347 TARGET_WAITKIND_IGNORE.
12348 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12349 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12350 (linux_wait_1): Move `thread' local definition to block that uses
12351 it. Don't NULL initialize `event_child'.
12352 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12353 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12354 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12355
bdabb078
PA
123562010-04-01 Pedro Alves <pedro@codesourcery.com>
12357
12358 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12359 an extended waitstatus, or by a watchpoint.
12360 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12361 thread was stepping or has been stopped by a watchpoint.
12362
d3bbe7a0
PA
123632010-04-01 Pedro Alves <pedro@codesourcery.com>
12364
12365 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12366 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12367 of another, then delete the previous, and validate all
12368 breakpoints.
12369 (validate_inserted_breakpoint): New.
12370 (delete_disabled_breakpoints): New.
12371 (validate_breakpoints): New.
12372 (check_mem_read): Validate breakpoints before trusting their
12373 shadow. Delete disabled breakpoints.
12374 (check_mem_write): Validate breakpoints before trusting they
12375 should be inserted. Delete disabled breakpoints.
12376 * mem-break.h (validate_breakpoints):
12377 * server.c (handle_query): Validate breakpoints when we see a
12378 qSymbol query.
12379
8b07ae33
PA
123802010-04-01 Pedro Alves <pedro@codesourcery.com>
12381
12382 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12383 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12384 if we could tell there's a GDB breakpoint at stop_pc.
12385 (need_step_over_p): Don't do a step over if we find a GDB
12386 breakpoint at the resume PC.
12387
12388 * mem-break.c (struct raw_breakpoint): New.
12389 (enum bkpt_type): New type `gdb_breakpoint'.
12390 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12391 fields. New field `raw'.
12392 (find_raw_breakpoint_at): New.
12393 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12394 breakpoint instead.
12395 (set_breakpoint_at): Adjust.
12396 (delete_raw_breakpoint): New.
12397 (release_breakpoint): New.
12398 (delete_breakpoint): Rename to...
12399 (delete_breakpoint_1): ... this. Add proc parameter. Use
12400 release_breakpoint. Return ENOENT.
12401 (delete_breakpoint): Reimplement.
12402 (find_breakpoint_at): Delete.
12403 (find_gdb_breakpoint_at): New.
12404 (delete_breakpoint_at): Delete.
12405 (set_gdb_breakpoint_at): New.
12406 (delete_gdb_breakpoint_at): New.
12407 (gdb_breakpoint_here): New.
12408 (set_reinsert_breakpoint): Use release_breakpoint.
12409 (uninsert_breakpoint): Rename to ...
12410 (uninsert_raw_breakpoint): ... this.
12411 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12412 (reinsert_raw_breakpoint): Change parameter type to
12413 raw_breakpoint.
12414 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12415 instead.
12416 (check_breakpoints): Adjust. Use release_breakpoint.
12417 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12418 (breakpoint_inserted_here): Ditto.
12419 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12420 Don't trust the breakpoint's shadow if it is not inserted.
12421 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12422 (delete_all_breakpoints): Adjust.
12423 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12424 use delete_breakpoint_1.
12425
12426 * mem-break.h (breakpoints_supported): Delete declaration.
12427 (set_gdb_breakpoint_at): Declare.
12428 (gdb_breakpoint_here): Declare.
12429 (delete_breakpoint_at): Delete.
12430 (delete_gdb_breakpoint_at): Declare.
12431
12432 * server.h (struct raw_breakpoint): Forward declare.
12433 (struct process_info): New field `raw_breakpoints'.
12434
12435 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12436 breakpoints.
12437
6bf5e0ba
PA
124382010-03-24 Pedro Alves <pedro@codesourcery.com>
12439
12440 * linux-low.c (status_pending_p_callback): Fix comment.
12441 (linux_wait_for_event_1): Move most of the internal breakpoint
12442 handling from here...
12443 (linux_wait_1): ... to here.
12444 (count_events_callback): New.
12445 (select_singlestep_lwp_callback): New.
12446 (select_event_lwp_callback): New.
12447 (cancel_breakpoints_callback): New.
12448 (select_event_lwp): New.
12449 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12450 priority to all LWPs that have had events that should be reported
12451 to the client. Cancel breakpoints when about to reporting the
12452 event to the client, not while stopping lwps. No longer cancel
12453 finished single-steps here.
12454 (cancel_finished_single_step): Delete.
12455 (cancel_finished_single_steps): Delete.
12456
414a389f
PA
124572010-03-24 Pedro Alves <pedro@codesourcery.com>
12458
12459 * mem-break.c (enum bkpt_type): New.
12460 (struct breakpoint): New field `type'.
12461 (set_breakpoint_at): Change return type to struct breakpoint
12462 pointer. Set type to `other_breakpoint' by default.
12463 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12464 in the breakpoint list.
12465 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12466 (reinsert_breakpoint): Rename to ...
12467 (reinsert_raw_breakpoint): ... this.
12468 (reinsert_breakpoints_at): Adjust.
12469 * mem-break.h (struct breakpoint): Declare.
12470 (set_breakpoint_at): Change return type to struct breakpoint
12471 pointer.
12472
2280c721
PA
124732010-03-24 Pedro Alves <pedro@codesourcery.com>
12474
12475 * server.c (handle_query): Assign, not compare.
12476
d50171e4
PA
124772010-03-24 Pedro Alves <pedro@codesourcery.com>
12478
12479 Teach linux gdbserver to step-over-breakpoints.
12480
12481 * linux-low.c (can_hardware_single_step): New.
12482 (supports_breakpoints): New.
12483 (handle_extended_wait): If stopping threads, read the stop pc of
12484 the new cloned LWP.
12485 (get_pc): New.
12486 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12487 low target doesn't support retrieving the PC.
12488 (add_lwp): Set last_resume_kind to resume_continue.
12489 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12490 (linux_attach): Don't clear stop_expected. Set the lwp's
12491 last_resume_kind to resume_stop.
12492 (linux_detach_one_lwp): Don't check for removed breakpoints.
12493 (check_removed_breakpoint): Delete.
12494 (status_pending_p): Rename to ...
12495 (status_pending_p_callback): ... this. Don't check for removed
12496 breakpoints. Don't consider threads that are stopped from GDB's
12497 perspective.
12498 (linux_wait_for_lwp): Always read the stop_pc here.
12499 (cancel_breakpoint): New.
12500 (step_over_bkpt): New global.
12501 (linux_wait_for_event_1): Implement stepping over breakpoints.
12502 (gdb_wants_lwp_stopped): New.
12503 (gdb_wants_all_stopped): New.
12504 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12505 single-step traps here. Store the thread's last reported target
12506 wait status.
12507 (send_sigstop): Don't clear stop_expected. Always set it,
12508 instead.
12509 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12510 (cancel_finished_single_step): New.
12511 (cancel_finished_single_steps): New.
12512 (wait_for_sigstop): Don't cancel finished single-step traps here.
12513 (linux_resume_one_lwp): Don't check for removed breakpoints.
12514 Don't set `step' on non-hardware step archs.
12515 (linux_set_resume_request): Ignore resume_stop requests if already
12516 stopping or stopped. Set the lwp's last_resume_kind.
12517 (resume_status_pending_p): Don't check for removed breakpoints.
12518 (need_step_over_p): New.
12519 (start_step_over): New.
12520 (finish_step_over): New.
12521 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12522 requests. Clear the thread's last reported target waitstatus.
12523 Don't use the `suspended' flag. Don't consider pending breakpoints.
12524 (linux_resume): Start a step-over if necessary.
12525 (proceed_one_lwp): New.
12526 (proceed_all_lwps): New.
12527 (unstop_all_lwps): New.
12528 * linux-low.h (struct lwp_info): Rewrite comment for the
12529 `suspended' flag. Add the `stop_pc' field. Delete the
12530 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12531 Add `'last_resume_kind' and `need_step_over' fields.
12532 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12533 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12534 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12535 (set_raw_breakpoint_at): New.
12536 (set_breakpoint_at): Rewrite to use it.
12537 (reinsert_breakpoint_handler): Delete.
12538 (set_reinsert_breakpoint): New.
12539 (reinsert_breakpoint_by_bp): Delete.
12540 (delete_reinsert_breakpoints): New.
12541 (uninsert_breakpoint): Rewrite.
12542 (uninsert_breakpoints_at): New.
12543 (reinsert_breakpoint): Rewrite.
12544 (reinsert_breakpoints_at): New.
12545 (check_breakpoints): Rewrite.
12546 (breakpoint_here): New.
12547 (breakpoint_inserted_here): New.
12548 (check_mem_read): Adjust.
12549 * mem-break.h (breakpoints_supported, breakpoint_here)
12550 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12551 (reinsert_breakpoint_by_bp): Delete declaration.
12552 (delete_reinsert_breakpoints): Declare.
12553 (reinsert_breakpoint): Delete declaration.
12554 (reinsert_breakpoints_at): Declare.
12555 (uninsert_breakpoint): Delete declaration.
12556 (uninsert_breakpoints_at): Declare.
12557 (check_breakpoints): Adjust prototype.
12558 * server.h: Adjust include order.
12559 (struct thread_info): Declare here. Add a `last_status' field.
12560
30ba68cb
MS
125612010-03-23 Michael Snyder <msnyder@vmware.com>
12562
12563 * server.c (crc32): New function.
12564 (handle_query): Add handling for 'qCRC:' request.
12565
b9a881c2
PA
125662010-03-23 Pedro Alves <pedro@codesourcery.com>
12567
12568 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12569 lwp had been stopped by a watchpoint.
12570
e92d13d5
PA
125712010-03-16 Pedro Alves <pedro@codesourcery.com>
12572
12573 * server.h (internal_error): Declare.
12574 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12575 * utils.c (internal_error): New function.
12576
64daa791
AS
125772010-03-15 Andreas Schwab <schwab@redhat.com>
12578
12579 * configure.srv: Fix typo setting srv_regobj.
12580
f52cd8cd
PA
125812010-03-15 Pedro Alves <pedro@codesourcery.com>
12582
12583 * linux-low.c (fetch_register): Avoid passing a non string literal
12584 format to `error'.
12585 (usr_store_inferior_registers): Ditto.
12586
93ae6fdc
PA
125872010-03-14 Pedro Alves <pedro@codesourcery.com>
12588
12589 * linux-low.c (linux_write_memory): Bail out early if peeking
12590 memory failed.
12591
c3adc08c
PA
125922010-03-14 Pedro Alves <pedro@codesourcery.com>
12593
12594 * linux-low.h (struct lwp_info): New fields
12595 `stopped_by_watchpoint' and `stopped_data_address'.
12596 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12597 here, and cache them in the lwp object.
12598 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12599 directly.
12600 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12601 field.
12602 (linux_stopped_by_watchpoint): Rewrite.
12603 (linux_stopped_data_address): Rewrite.
12604
bce522a2
PA
126052010-03-06 Simo Melenius <simo.melenius@iki.fi>
12606
12607 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12608 switching the current inferior, not before.
12609
90884b2b
L
126102010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12611
12612 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12613 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12614 i386-linux.c and amd64-linux.c.
12615 (reg-i386.o): Removed.
12616 (reg-i386.c): Likewise.
12617 (reg-i386-linux.o): Likewise.
12618 (reg-i386-linux.c): Likewise.
12619 (reg-x86-64.o): Likewise.
12620 (reg-x86-64.c): Likewise.
12621 (reg-x86-64-linux.o): Likewise.
12622 (reg-x86-64-linux.c): Likewise.
12623 (i386.o): New.
12624 (i386.c): Likewise.
12625 (i386-linux.o): Likewise.
12626 (i386-linux.c): Likewise.
12627 (amd64.o): Likewise.
12628 (amd64.c): Likewise.
12629 (amd64-linux.o): Likewise.
12630 (amd64-linux.c): Likewise.
12631
12632 * configure.srv (srv_i386_regobj): New.
12633 (srv_i386_linux_regobj): Likewise.
12634 (srv_amd64_regobj): Likewise.
12635 (srv_amd64_linux_regobj): Likewise.
12636 (srv_i386_32bit_xmlfiles): Likewise.
12637 (srv_i386_64bit_xmlfiles): Likewise.
12638 (srv_i386_xmlfiles): Likewise.
12639 (srv_amd64_xmlfiles): Likewise.
12640 (srv_i386_linux_xmlfiles): Likewise.
12641 (srv_amd64_linux_xmlfiles): Likewise.
12642 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12643 srv_xmlfiles to $srv_i386_xmlfiles.
12644 (i[34567]86-*-mingw32ce*): Likewise.
12645 (i[34567]86-*-mingw*): Likewise.
12646 (i[34567]86-*-nto*): Likewise.
12647 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12648 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12649 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12650 (x86_64-*-linux*): Likewise.
12651
12652 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12653 (init_registers_amd64_linux): New.
12654 (x86_arch_setup): Replace init_registers_x86_64_linux with
12655 init_registers_amd64_linux.
12656
193f13e6
MK
126572010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12658
12659 * configure.ac: Check for libdl. If it is not available link against
12660 static libthread_db.
12661 * configure: Regenerate.
12662
85d721b8
PA
126632010-02-22 Pedro Alves <pedro@codesourcery.com>
12664
12665 PR9605
12666
12667 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12668 handing a read watchpoint.
12669 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12670
6076632b
DE
126712010-02-12 Doug Evans <dje@google.com>
12672
12673 * linux-low.c (linux_supports_tracefork_flag): Document.
12674 (linux_look_up_symbols): Add comment.
12675
3327ccf7
L
126762010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12677
12678 * regcache.c (supply_register): Clear regcache if buf is NULL.
12679
0718675c 126802010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12681 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12682
12683 * inferiors.c (find_inferior): Add function documentation.
12684 (unloaded_dll): Handle the case where the unloaded dll has not
12685 been previously registered in the dll list.
12686
177321bd
DJ
126872010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12688
12689 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12690 (thumb2_breakpoint): New.
12691 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12692
2b009048
DJ
126932010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12694
12695 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12696 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12697 breakpoints.
12698
3be029c7
PA
126992010-01-21 Pedro Alves <pedro@codesourcery.com>
12700
12701 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12702
18f5de3b
JK
127032010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12704
12705 * linux-s390-low.c (s390_collect_ptrace_register)
12706 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12707
3743bb4f
DE
127082010-01-21 Doug Evans <dje@google.com>
12709
14ce3065
DE
12710 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12711 (PTRACE_ARG4_TYPE): New macro.
12712 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12713 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12714 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12715 (usr_store_inferior_registers): Ditto.
12716 (linux_read_memory, linux_write_memory): Ditto.
12717 (linux_test_for_tracefork): Ditto.
12718
3743bb4f
DE
12719 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12720 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12721
8b315be5
PA
127222010-01-21 Pedro Alves <pedro@codesourcery.com>
12723
12724 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12725 target.
12726
85492558
PA
127272010-01-21 Pedro Alves <pedro@codesourcery.com>
12728
12729 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12730 prototype to take a regcache. Adjust.
12731
442ea881
PA
127322010-01-20 Pedro Alves <pedro@codesourcery.com>
12733
12734 * regcache.h (struct thread_info): Forward declare.
12735 (struct regcache): New.
12736 (new_register_cache): Adjust prototype.
12737 (get_thread_regcache): Declare.
12738 (free_register_cache): Adjust prototype.
12739 (registers_to_string, registers_from_string): Ditto.
12740 (supply_register, supply_register_by_name, collect_register)
12741 (collect_register_as_string, collect_register_by_name): Ditto.
12742 * regcache.c (struct inferior_regcache_data): Delete.
12743 (get_regcache): Rename to ...
12744 (get_thread_regcache): ... this. Adjust. Switch inferior before
12745 fetching registers.
12746 (regcache_invalidate_one): Adjust.
12747 (regcache_invalidate): Fix prototype.
12748 (new_register_cache): Return the new register cache.
12749 (free_register_cache): Change prototype.
12750 (realloc_register_cache): Adjust.
12751 (registers_to_string): Change prototype to take a regcache. Adjust.
12752 (registers_from_string): Ditto.
12753 (register_data): Ditto.
12754 (supply_register): Ditto.
12755 (supply_register_by_name): Ditto.
12756 (collect_register): Ditto.
12757 (collect_register_as_string): Ditto.
12758 (collect_register_by_name): Ditto.
12759 * server.c (process_serial_event): Adjust.
12760 * linux-low.h (regset_fill_func, regset_store_func): Change
12761 prototype.
12762 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12763 Change prototype.
12764 * linux-low.c (get_stop_pc): Adjust.
12765 (check_removed_breakpoint): Adjust.
12766 (linux_wait_for_event): Adjust.
12767 (linux_resume_one_lwp): Adjust.
12768 (fetch_register): Add regcache parameter. Adjust.
12769 (usr_store_inferior_registers): Ditto.
12770 (regsets_fetch_inferior_registers): Ditto.
12771 (regsets_store_inferior_registers): Ditto.
12772 (linux_fetch_registers, linux_store_registers): Ditto.
12773 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12774 regcache. Adjust.
43aaf8b6
PA
12775 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12776 Ditto.
442ea881
PA
12777 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12778 prototype to take a regcache.
12779 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12780 * remote-utils.c (convert_ascii_to_int, outreg)
12781 (prepare_resume_reply): Change prototype to take a regcache.
12782 Adjust.
12783 * target.h (struct target_ops) <fetch_registers, store_registers>:
12784 Change prototype to take a regcache.
12785 (fetch_inferior_registers, store_inferior_registers): Change
12786 prototype to take a regcache. Adjust.
12787 * proc-service.c (ps_lgetregs): Adjust.
12788 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12789 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12790 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12791 take a regcache. Adjust.
12792 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12793 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12794 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12795 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12796 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12797 (cris_cannot_fetch_register):
12798 (cris_breakpoint_at): Change prototype to take a regcache.
12799 Adjust.
12800 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12801 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12802 to take a regcache. Adjust.
12803 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12804 Adjust.
12805 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12806 take a regcache. Adjust.
12807 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12808 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12809 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12810 * linux-mips-low.c (mips_get_pc):
12811 (mips_set_pc): Change prototype to take a regcache. Adjust.
12812 (mips_reinsert_addr): Adjust.
12813 (mips_collect_register): Change prototype to take a regcache.
12814 Adjust.
12815 (mips_supply_register):
12816 (mips_collect_register_32bit, mips_supply_register_32bit)
12817 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12818 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12819 * linux-ppc-low.c (ppc_supply_ptrace_register)
12820 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12821 (parse_spufs_run): Adjust.
12822 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12823 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12824 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12825 take a regcache. Adjust.
12826 * linux-s390-low.c (s390_collect_ptrace_register)
12827 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12828 (s390_set_pc): Change prototype to take a regcache. Adjust.
12829 (s390_arch_setup): Adjust.
12830 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12831 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12832 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12833 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12834 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12835 regcache. Adjust.
12836 (sparc_breakpoint_at): Adjust.
12837 * linux-xtensa-low.c (xtensa_fill_gregset):
12838 (xtensa_store_gregset):
12839 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12840 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12841 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12842 prototype to take a regcache. Adjust.
12843 * win32-arm-low.c (arm_fetch_inferior_register)
12844 (arm_store_inferior_register): Change prototype to take a
12845 regcache. Adjust.
12846 * win32-i386-low.c (i386_fetch_inferior_register)
12847 (i386_store_inferior_register): Change prototype to take a
12848 regcache. Adjust.
12849 * win32-low.c (child_fetch_inferior_registers)
12850 (child_store_inferior_registers): Change prototype to take a
12851 regcache. Adjust.
12852 (win32_wait): Adjust.
12853 (win32_fetch_inferior_registers): Change prototype to take a
12854 regcache. Adjust.
12855 (win32_store_inferior_registers): Adjust.
12856 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12857 store_inferior_register>: Change prototype to take a regcache.
12858
60c3d7b0
DE
128592010-01-20 Doug Evans <dje@google.com>
12860
12861 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12862 #ifdef.
12863 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12864 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12865
dc146f7c
VP
128662010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12867
12868 * linux-low.c (linux_core_of_thread): New.
12869 (compare_ints, show_process, list_threads): New.
12870 (linux_qxfer_osdata): Report threads and cores.
12871 (linux_target_op): Register linux_core_of_thread.
12872 * remote-utils.c (prepare_resume_reply): Report the core.
12873 (buffer_xml_printf): Support %d specifier.
12874 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12875 New.
12876 (handle_query): Handle qXfer:threads. Announce availability
12877 thereof.
12878 * target.h (struct target_ops): New field core_of_thread.
12879
7803799a
UW
128802010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * Makefile.in (clean): Remove new generated files.
12883 (reg-s390.o, reg-s390.c): Remove rules.
12884 (reg-s390x.o, reg-s390x.c): Likewise.
12885 (s390-linux32.o, s390-linux32.c): Add rules.
12886 (s390-linux64.o, s390-linux64.c): Likewise.
12887 (s390x-linux64.o, s390x-linux64.c): Likewise.
12888 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12889 * linux-s390-low.c: Include <elf.h>.
12890 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12891 (init_registers_s390): Remove prototype.
12892 (init_registers_s390x): Likewise.
12893 (init_registers_s390_linux32): Add prototype.
12894 (init_registers_s390_linux64): Likewise.
12895 (init_registers_s390x_linux64): Likewise.
12896 (s390_num_regs_3264): New define.
12897 (s390_regmap_3264): New global variable.
12898 (s390_cannot_fetch_register): Remove obsolete check.
12899 (s390_cannot_store_register): Likewise.
12900 (s390_collect_ptrace_register): Handle upper/lower register halves.
12901 (s390_supply_ptrace_register): Likewise.
12902 (s390_fill_gregset): Update to register number changes.
12903 (s390_get_hwcap): New routine.
12904 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12905 Install appropriate regmap and register set.
12906
6e7ffa39
JB
129072010-01-01 Joel Brobecker <brobecker@adacore.com>
12908
12909 * server.c (gdbserver_version): Update copyright year to 2010.
12910 * gdbreplay.c (gdbreplay_version): Likewise.
12911
957f3f49
DE
129122009-12-28 Doug Evans <dje@google.com>
12913
12914 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12915 elf/external.h. Include <elf.h> instead but only if necessary.
12916
ca5c370d
PA
129172009-12-28 Pedro Alves <pedro@codesourcery.com>
12918
12919 * linux-low.c (linux_remove_process): Remove `detaching'
12920 parameter. Don't release/detach from thread_db here.
12921 (linux_kill): Release/detach from thread_db here, ...
12922 (linux_detach): ... and here, before actually detaching.
12923 (linux_wait_1): ... and here, when a process exits.
12924 * thread-db.c (any_thread_of): New.
12925 (thread_db_free): Switch the current inferior to a thread of the
12926 passed in process.
12927
4ee62156
DE
129282009-12-21 Doug Evans <dje@google.com>
12929
d90e6a88
DE
12930 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12931
c5f62d5f
DE
12932 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12933 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12934 warning ifndef __NR_tkill. Move setting of errno there too.
12935 Delete unnecessary resetting of errno after syscall.
12936 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12937
10e86dd7
DE
12938 * configure.ac: Check for dladdr.
12939 * config.in: Regenerate.
12940 * configure: Regenerate.
12941 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12942 (try_thread_db_load): Update.
12943
4ee62156
DE
12944 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12945
00f515da
DE
129462009-12-18 Doug Evans <dje@google.com>
12947
e9464885
DE
12948 * event-loop.c: Include unistd.h if it exists.
12949
07d4f67e
DE
12950 * linux-low.c (my_waitpid): Move definition away from being in
12951 between linux_tracefork_child/linux_test_for_tracefork.
12952
00f515da
DE
12953 * gdb_proc_service.h (psaddr_t): Fix type.
12954 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12955 signature to match glibc.
12956
1de1badb
DE
129572009-12-16 Doug Evans <dje@google.com>
12958
12959 * linux-low.c (linux_read_memory): Fix argument to read.
12960
aeeb81d1
PA
129612009-11-26 Pedro Alves <pedro@codesourcery.com>
12962
12963 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12964 events, don't leave current_inferior pointing at null.
12965
10357975
PA
129662009-11-26 Pedro Alves <pedro@codesourcery.com>
12967
12968 * win32-low.c (LOG): Delete.
12969 (OUTMSG): Output to stderr.
12970 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12971 on compile time LOG macro.
12972 (win32_wait): Fix debug output.
12973
cf6e3471
PA
129742009-11-26 Pedro Alves <pedro@codesourcery.com>
12975
12976 * win32-low.c (win32_add_one_solib): If the dll name is
12977 "ntdll.dll", prepend the system directory to the dll path.
12978
0c85e18e
MK
129792009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12982
9ac544ce 129832009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12984 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12985
12986 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12987 * configure.ac: Check for __mcoldfire__ and set
12988 gdb_cv_m68k_is_coldfire.
12989 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12990 reg-cf.o and reg-m68k.o.
12991 * configure: Regenerated.
12992
fd7dd3e6
PA
129932009-11-16 Pedro Alves <pedro@codesourcery.com>
12994
12995 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12996 Pass it to thread_db_free.
12997 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12998 proper `detaching' argument to linux_remove_process.
12999 * linux-low.h (thread_db_free): Add `detaching' parameter.
13000 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13001 to thread_db_free.
13002 (thread_db_free): Add `detaching' parameter. Only
13003 call td_ta_clear_event if detaching from process.
13004
75aa492e
MK
130052009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13006
13007 * thread-db.c (thread_db_free): Fix typo.
13008
21e1bee4
PP
130092009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13010
13011 PR gdb/10838
13012 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13013
8838b45e
NS
130142009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13015
13016 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13017 with an i686 compiler.
13018 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13019 needed.
13020 * configure: Rebuilt.
13021
8a35fb51
SL
130222009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13023
13024 PR gdb/10783
13025
13026 * server.c (handle_search_memory_1): Correct read_addr initialization
13027 in loop for searching subsequent chunks.
13028
96f15937
PP
130292009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13030
13031 * configure.ac: New --with-libthread-db option.
13032 * thread-db.c: Allow direct dependence on libthread_db.
13033 (thread_db_free): Adjust.
13034 * config.in: Regenerate.
13035 * configure: Likewise.
889bf7c5 13036
5f7d1694
PP
130372009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13038
13039 PR gdb/10757
13040 * thread-db.c (attach_thread): New function.
13041 (maybe_attach_thread): Return success/failure.
13042 (find_new_threads_callback): Adjust.
889bf7c5
PA
13043 (thread_db_find_new_threads): Loop until no new threads.
13044
88e3b899
PA
130452009-10-13 Pedro Alves <pedro@codesourcery.com>
13046
13047 * proc-service.c (ps_lgetregs): Formatting.
13048
cdbfd419
PP
130492009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13050
13051 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13052 * configure.ac: Adjust.
13053 * linux-low.h (struct process_info_private): Move members to struct
13054 thread_db.
13055 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13056 * linux-low.c (linux_remove_process): Adjust.
13057 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13058 * server.c (handle_query): Move code ...
13059 (handle_monitor_command): ... here. New function.
13060 * target.h (struct target_ops): New member.
13061 * thread-db.c (struct thread_db): New.
13062 (libthread_db_search_path): New variable.
13063 (thread_db_create_event, thread_db_enable_reporting)
13064 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13065 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13066 (try_thread_db_load_1, dladdr_to_soname): New functions.
13067 (try_thread_db_load, thread_db_load_search): New functions.
13068 (thread_db_init): Search for libthread_db.
13069 (thread_db_free): New function.
13070 (thread_db_handle_monitor_command): Likewise.
13071 * config.in: Regenerate.
13072 * configure: Regenerate.
889bf7c5 13073
4168d2d6
UW
130742009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13075
13076 * spu-low.c (spu_kill): Wait for inferior to terminate.
13077 Call clear_inferiors.
13078 (spu_detach): Call clear_inferiors.
13079
81ecdfbb
RW
130802009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13081
13082 * aclocal.m4: Regenerate.
13083 * config.in: Likewise.
13084 * configure: Likewise.
13085
0b9ff2c0
UW
130862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13087
13088 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13089 (parse_spufs_run): New function.
13090 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13091 (ppc_breakpoint_at): Handle SPU breakpoints.
13092
efcbbd14
UW
130932009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13094
13095 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13096 (SPUFS_MAGIC): Define.
13097 (spu_enumerate_spu_ids): New function.
13098 (linux_qxfer_spu): New function.
13099 (linux_target_ops): Install linux_qxfer_spu.
13100
f4d9bade
UW
131012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13102
13103 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13104 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13105 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13106 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13107 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13108 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13109 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13110 (init_registers_powerpc_cell32l): Add prototype.
13111 (init_registers_powerpc_cell64l): Likewise.
13112 (ppc_arch_setup): Detect Cell/B.E. architecture.
13113
96e946ca
RW
131142009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13115
13116 * Makefile.in (datarootdir): New variable.
13117
58d6951d
DJ
131182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13119
13120 * linux-low.c (linux_write_memory): Update debugging output.
13121 * Makefile.in (clean): Add new descriptions.
13122 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13123 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13124 * configure.srv: Add new files for arm*-*-linux*.
13125 * linux-arm-low.c: Add new declarations.
13126 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13127 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13128 (HWCAP_VFPv3D16): New.
13129 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13130 instead of __IWMMXT__.
13131 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13132 (arm_arch_setup): New.
13133 (target_regsets): Remove #ifdef. Add VFP regset.
13134 (the_low_target): Use arm_arch_setup.
13135
12b42a12
DJ
131362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13137
13138 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13139 the main thread again.
13140
ac8c974e
AR
131412009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13142
13143 Adding Neutrino gdbserver.
13144 * configure: Regenerated.
13145 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13146 * configure.srv (i[34567]86-*-nto*): New target.
13147 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13148 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13149 (nto_comctrl) [__QNX__]: New function.
13150 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13151
4424e0c3 131522009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13153
13154 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13155 srv_tgtobj.
13156
912cf4ba
PA
131572009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13158 Pedro Alves <pedro@codesourcery.com>
13159
13160 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13161 don't support CONTEXT_EXTENDED_REGISTERS.
13162 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13163 (the_low_target): Install them.
13164 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13165 failing with ERROR_PIPE_NOT_CONNECTED.
13166
aa5ca48f
DE
131672009-06-30 Doug Evans <dje@google.com>
13168 Pierre Muller <muller@ics.u-strasbg.fr>
13169
13170 Add h/w watchpoint support to x86-linux, win32-i386.
13171 * Makefile.in (SFILES): Add i386-low.c
13172 (i386_low_h): Define.
13173 (i386-low.o): Add dependencies.
13174 (linux-x86-low.o): Add i386-low.h dependency.
13175 (win32-i386-low.o): Ditto.
13176 * i386-low.c: New file.
13177 * i386-low.h: New file.
13178 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13179 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13180 * linux-low.c (linux_add_process): Initialize arch_private.
13181 (linux_remove_process): Free arch_private.
13182 (add_lwp): Initialize arch_private.
13183 (delete_lwp): Free arch_private.
13184 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13185 provided.
13186 * linux-low.h (process_info_private): New member arch_private.
13187 (lwp_info): New member arch_private.
13188 (linux_target_ops): New members new_process, new_thread,
13189 prepare_to_resume.
13190 (ptid_of): New macro.
13191 * linux-x86-low.c: Include stddef.h, i386-low.h.
13192 (arch_process_info): New struct.
13193 (arch_lwp_info): New struct.
13194 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13195 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13196 (i386_dr_low_get_status): New function.
13197 (x86_insert_point, x86_remove_point): New functions.
13198 (x86_stopped_by_watchpoint): New function.
13199 (x86_stopped_data_address): New function.
13200 (x86_linux_new_process, x86_linux_new_thread): New functions.
13201 (x86_linux_prepare_to_resume): New function.
13202 (the_low_target): Add entries for insert_point, remove_point,
13203 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13204 prepare_to_resume.
13205 * server.c (debug_hw_points): New global.
13206 (monitor_show_help): Document set debug-hw-points.
13207 (handle_query): Process "set debug-hw-points".
13208 * server.h (debug_hw_points): Declare.
13209 (paddress): Declare.
13210 * utils.c (NUMCELLS, CELLSIZE): New macros.
13211 (get_sell, xsnprintf, paddress): New functions.
13212 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13213 remove_point, stopped_by_watchpoint, stopped_data_address.
13214 * win32-i386-low.c: Include i386-low.h.
13215 (debug_reg_state): Replaces dr.
13216 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13217 (i386_dr_low_get_status): New function.
13218 (i386_insert_point, i386_remove_point): New functions.
13219 (i386_stopped_by_watchpoint): New function.
13220 (i386_stopped_data_address): New function.
13221 (i386_initial_stuff): Update.
13222 (get_thread_context,set_thread_context,i386_thread_added): Update.
13223 (the_low_target): Add entries for insert_point,
13224 remove_point, stopped_by_watchpoint, stopped_data_address.
13225 * win32-low.c (win32_insert_watchpoint): New function.
13226 (win32_remove_watchpoint): New function.
13227 (win32_stopped_by_watchpoint): New function.
13228 (win32_stopped_data_address): New function.
13229 (win32_target_ops): Add entries for insert_watchpoint,
13230 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13231 * win32-low.h (win32_target_ops): New members insert_point,
13232 remove_point, stopped_by_watchpoint, stopped_data_address.
13233
d993e290
PA
132342009-06-25 Pedro Alves <pedro@codesourcery.com>
13235
13236 * server.c (process_serial_event): Re-return unsupported, not
13237 error, if the type isn't recognized. Re-allow supporting only
13238 insert or remove packets. Also call require_running for
13239 breakpoints. Add missing break statement to default case. Tidy.
13240 * target.h (struct target_ops): Rename insert_watchpoint to
13241 insert_point, and remove_watchpoint to remove_point.
13242
13243 * linux-low.h (struct linux_target_ops): Likewise.
13244 * linux-low.c (linux_insert_watchpoint): Rename to ...
13245 (linux_insert_point): ... this. Adjust.
13246 (linux_remove_watchpoint): Rename to ...
13247 (linux_remove_point): ... this. Adjust.
13248 (linux_target_ops): Adjust.
13249 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13250 (cris_insert_point): ... this.
13251 (cris_remove_watchpoint): Rename to ...
13252 (cris_remove_point): ... this.
13253 (the_low_target): Adjust.
13254
0f54c268
PM
132552009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13256
13257 * server.c (handle_v_kill): Pass signal_pid to
13258 kill_inferior if multi_process is zero.
13259
c6314022
AR
132602009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13261
13262 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13263 * target.h (target_ops): Comment for *_watchpoint to make it clear
13264 the functions can get types '0' and '1'.
13265
4463ce24
AR
132662009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13267
13268 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13269 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13270 * regcache.c (get_regcache): Likewise.
13271 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13272 * win32-low.c (child_fetch_inferior_registers): Remove check for
13273 regno 0.
13274
cf8fd78b
PA
132752009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13276 Pedro Alves <pedro@codesourcery.com>
13277
13278 * target.h (struct target_ops) <supports_multi_process>: New
13279 callback.
13280 (target_supports_multi_process): New.
13281 * server.c (handle_query): Even if GDB reports support, only
13282 enable multi-process if the target also supports it. Report
13283 multi-process support only if the target backend supports it.
13284 * linux-low.c (linux_supports_multi_process): New function.
13285 (linux_target_ops): Install it as target_supports_multi_process
13286 callback.
13287
47c0c975
DE
132882009-05-24 Doug Evans <dje@google.com>
13289
e09875d4
DE
13290 Global renaming of find_thread_pid to find_thread_ptid.
13291 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13292 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13293 All callers updated.
13294
e27d73f6
DE
13295 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13296 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13297 directly.
13298
47c0c975
DE
13299 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13300 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13301 (linux_resume_one_lwp): Ditto.
13302
2acc282a
DE
133032009-05-23 Doug Evans <dje@google.com>
13304
13305 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13306 from struct inferior_list_entry * to struct lwp_info *.
13307 All callers updated.
13308
9f1036c1
DE
133092009-05-13 Doug Evans <dje@google.com>
13310
13311 * linux-x86-low.c: Don't include assert.h.
13312 (x86_siginfo_fixup): Use fatal, not assert.
13313 (x86_arch_setup): Fix comment.
13314
d0722149
DE
133152009-05-12 Doug Evans <dje@google.com>
13316
13317 Biarch support for i386/amd64 gdbserver.
13318 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13319 Add linux-x86-low.c.
13320 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13321 (linux-x86-low.o): Add.
13322 * linux-x86-64-low.c: Delete.
13323 * linux-i386-low.c: Delete.
13324 * linux-x86-low.c: New file.
13325 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13326 linux-x86-low.o.
13327 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13328 linux-x86-low.o.
13329 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13330 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13331 (linux_child_pid_to_exec_file): New function.
13332 (elf_64_header_p, elf_64_file_p): New functions.
13333 (siginfo_fixup): New function.
13334 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13335 give target a chance to convert layout.
13336 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13337 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13338
fdeb2a12
DE
133392009-05-07 Doug Evans <dje@google.com>
13340
13341 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13342 (regsets_store_inferior_registers): Ditto.
13343
a6dbe5df
PA
133442009-05-06 Pedro Alves <pedro@codesourcery.com>
13345
13346 PR server/10048
13347
13348 * linux-low.c (must_set_ptrace_flags): Delete.
13349 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13350 of the global.
13351 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13352 `lwp->must_set_ptrace_flags' instead.
ba42693b 13353 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13354 (linux_wait_1): ... not here.
13355
5091eb23
DE
133562009-04-30 Doug Evans <dje@google.com>
13357
9f767825
DE
13358 * inferiors.c (started_inferior_callback): New function.
13359 (attached_inferior_callback): New function.
13360 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13361 * server.c (print_started_pid, print_attached_pid): New functions.
13362 (detach_or_kill_for_exit): New function.
13363 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13364 * server.h (have_started_inferiors_p): Declare.
13365 (have_attached_inferiors_p): Declare.
13366
5091eb23
DE
13367 * inferiors.c (remove_process): Fix memory leak, free process.
13368 * linux-low.c (linux_remove_process): New function.
13369 (linux_kill): Call it instead of remove_process.
13370 (linux_detach, linux_wait_1): Ditto.
13371
155c8968
PA
133722009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13373
13374 * configure.srv: Add x86 Windows CE target.
13375
7fe519cb
UW
133762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13377
13378 * inferiors.c (get_thread_process): Make global.
13379 * server.h (get_thread_process): Add prototype.
13380 * thread-db.c (find_one_thread): Use get_thread_process
13381 instead of current_process.
13382 (thread_db_get_tls_address): Do not crash if called when
13383 thread layer is not yet initialized.
13384
5472f405
UW
133852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13386
13387 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13388 * spu-low.c (current_tid): Rename to ...
13389 (current_ptid): ... this.
13390 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13391 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13392 ptid_get_lwp (current_ptid) instead of current_tid.
13393 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13394 instead of current_tid. Use find_process_pid to verify pid
13395 argument is valid. Pass proper argument to remove_process.
13396 (spu_thread_alive): Compare current_ptid instead of current_tid.
13397 (spu_resume): Likewise.
13398
55ac2b99
PA
133992009-04-02 Pedro Alves <pedro@codesourcery.com>
13400
13401 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13402 variable.
13403
95954743
PA
134042009-04-01 Pedro Alves <pedro@codesourcery.com>
13405
13406 Implement the multiprocess extensions, and add linux multiprocess
13407 support.
13408
13409 * server.h (ULONGEST): Declare.
13410 (struct ptid, ptid_t): New.
13411 (minus_one_ptid, null_ptid): Declare.
13412 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13413 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13414 (struct inferior_list_entry): Change `id' type from unsigned from
13415 to ptid_t.
13416 (struct sym_cache, struct breakpoint, struct
13417 process_info_private): Forward declare.
13418 (struct process_info): Declare.
13419 (current_process): Declare.
13420 (all_processes): Declare.
13421 (initialize_inferiors): Declare.
13422 (add_thread): Adjust to use ptid_t.
13423 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13424 (add_process, remove_process, find_thread_pid): Declare.
13425 (find_inferior_id): Adjust to use ptid_t.
13426 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13427 (multi_process): Declare.
13428 (push_event): Adjust to use ptid_t.
13429 (read_ptid, write_ptid): Declare.
13430 (prepare_resume_reply): Adjust to use ptid_t.
13431 (clear_symbol_cache): Declare.
13432 * inferiors.c (all_processes): New.
13433 (null_ptid, minus_one_ptid): New.
13434 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13435 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13436 (add_thread): Change unsigned long to ptid. Remove gdb_id
13437 parameter. Adjust.
13438 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13439 (gdb_id_to_thread): Rename to ...
13440 (find_thread_pid): ... this. Change unsigned long to ptid.
13441 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13442 (loaded_dll, pull_pid_from_list): Adjust.
13443 (add_process, remove_process, find_process_pid)
13444 (get_thread_process, current_process, initialize_inferiors): New.
13445 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13446 (struct target_waitstatus) <related_pid>: Ditto.
13447 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13448 return type to int.
13449 (struct target_ops) <join>: Add `pid' argument.
13450 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13451 (struct target_ops) <wait>: Add `ptid' field. Change return type
13452 to ptid.
13453 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13454 (mywait): Add `ptid' argument. Change return type to ptid_t.
13455 (target_pid_to_str): Declare.
13456 * target.c (set_desired_inferior): Adjust to use ptids.
13457 (mywait): Add new `ptid' argument. Adjust.
13458 (target_pid_to_str): New.
13459 * mem-break.h (free_all_breakpoints): Declare.
13460 * mem-break.c (breakpoints): Delelete.
13461 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13462 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13463 to use per-process breakpoint list.
13464 (free_all_breakpoints): New.
13465 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13466 (symbol_cache, all_symbols_looked_up): Delete.
13467 (hexchars): New.
13468 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13469 read_ptid): New.
13470 (prepare_resume_reply): Change ptid argument's type from unsigned
13471 long to ptid_t. Adjust. Implement W;process and X;process.
13472 (free_sym_cache, clear_symbol_cache): New.
13473 (look_up_one_symbol): Adjust to per-process symbol cache. *
13474 * server.c (cont_thread, general_thread, step_thread): Change type
13475 to ptid_t.
13476 (attached): Delete.
13477 (multi_process): New.
13478 (last_ptid): Change type to ptid_t.
13479 (struct vstop_notif) <ptid>: Change type to ptid_t.
13480 (queue_stop_reply, push_event): Change `ptid' argument's type to
13481 ptid_t.
13482 (discard_queued_stop_replies): Add `pid' argument.
13483 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13484 changes. Don't reference the `attached' global.
13485 (attach_inferior): Adjust to mywait interface changes.
13486 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13487 features. Handle and report "multiprocess+". Handle
13488 "qAttached:PID".
13489 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13490 changes.
13491 (handle_v_kill): New.
13492 (handle_v_stopped): Adjust to use target_pid_to_str.
13493 (handle_v_requests): Allow multiple attaches and runs when
13494 multiprocess extensions are in effect. Handle "vKill".
13495 (myresume): Adjust to use ptids.
13496 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13497 (handle_status): Adjust to discard_queued_stop_replies interface
13498 change.
13499 (first_thread_of, kill_inferior_callback)
13500 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13501 (main): Call initialize_inferiors. Adjust to use ptids, killing
13502 and detaching from all inferiors. Handle multiprocess packet
13503 variants.
13504 * linux-low.h: Include gdb_proc_service.h.
13505 (struct process_info_private): New.
13506 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13507 <lwpid_of>: Use ptid_get_lwp.
13508 (get_lwp_thread): Adjust.
13509 (struct lwp_info): Add `dead' member.
13510 (find_lwp_pid): Declare.
13511 * linux-low.c (thread_db_active): Delete.
13512 (new_inferior): Adjust comment.
13513 (inferior_pid): Delete.
13514 (linux_add_process): New.
13515 (handle_extended_wait): Adjust.
13516 (add_lwp): Change unsigned long to ptid.
13517 (linux_create_inferior): Add process to processes table. Adjust
13518 to use ptids. Don't set new_inferior here.
13519 (linux_attach_lwp): Rename to ...
13520 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13521 it. Adjust to use ptids.
13522 (linux_attach_lwp): New.
13523 (linux_attach): Add process to processes table. Don't set
13524 new_inferior here.
13525 (struct counter): New.
13526 (second_thread_of_pid_p, last_thread_of_process_p): New.
13527 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13528 multiple processes.
13529 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13530 processes. Remove process from process table.
13531 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13532 to multiple processes.
13533 (any_thread_of): New.
13534 (linux_detach): Add `pid' argument, and handle it. Remove process
13535 from processes table.
13536 (linux_join): Add `pid' argument. Handle it.
13537 (linux_thread_alive): Change unsighed long argument to ptid_t.
13538 Consider dead lwps as not being alive.
13539 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13540 threads we're not interested in.
13541 (same_lwp, find_lwp_pid): New.
13542 (linux_wait_for_lwp): Change `pid' argument's type from int to
13543 ptid_t. Adjust.
13544 (linux_wait_for_event): Rename to ...
13545 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13546 from int to ptid_t. Adjust.
13547 (linux_wait_for_event): New.
13548 (linux_wait_1): Add `ptid' argument. Change return type to
13549 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13550 that exit from the process table.
13551 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13552 Adjust.
13553 (mark_lwp_dead): New.
13554 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13555 stopping all threads, mark its main lwp as dead.
13556 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13557 ptids.
13558 (fetch_register, usr_store_inferior_registers)
13559 (regsets_fetch_inferior_registers)
13560 (regsets_store_inferior_registers, linux_read_memory)
13561 (linux_write_memory): Inline `inferior_pid'.
13562 (linux_look_up_symbols): Adjust to use per-process
13563 `thread_db_active'.
13564 (linux_request_interrupt): Adjust to use ptids.
13565 (linux_read_auxv): Inline `inferior_pid'.
13566 (initialize_low): Don't reference thread_db_active.
13567 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13568 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13569 (ps_getpid): Return the pid of the current inferior.
13570 * thread-db.c (proc_handle, thread_agent): Delete.
13571 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13572 per-process data.
13573 (find_one_thread): Change argument type to ptid_t. Adjust to
13574 per-process data.
13575 (maybe_attach_thread): Adjust to per-process data and ptids.
13576 (thread_db_find_new_threads): Ditto.
13577 (thread_db_init): Ditto.
13578 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13579 processes table. Adjust to use ptids.
13580 (spu_kill, spu_detach): Adjust interface. Remove process from
13581 processes table.
13582 (spu_join, spu_thread_alive): Adjust interface.
13583 (spu_wait): Adjust interface. Remove process from processes
13584 table. Adjust to use ptids.
13585 * win32-low.c (current_inferior_tid): Delete.
13586 (current_inferior_ptid): New.
13587 (debug_event_ptid): New.
13588 (thread_rec): Take a ptid. Adjust.
13589 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13590 (child_delete_thread): Ditto.
13591 (do_initial_child_stuff): Add `attached' argument. Add process to
13592 processes table.
13593 (child_fetch_inferior_registers, child_store_inferior_registers):
13594 Adjust.
13595 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13596 (win32_attach): Pass 1 to do_initial_child_stuff.
13597 (win32_kill): Adjust interface. Remove process from processes
13598 table.
13599 (win32_detach): Ditto.
13600 (win32_join): Adjust interface.
13601 (win32_thread_alive): Take a ptid.
13602 (win32_resume): Adjust to use ptids.
13603 (get_child_debug_event): Ditto.
13604 (win32_wait): Adjust interface. Remove exiting process from
13605 processes table.
13606
bd99dc85
PA
136072009-04-01 Pedro Alves <pedro@codesourcery.com>
13608
13609 Non-stop mode support.
13610
13611 * server.h (non_stop): Declare.
13612 (gdb_client_data, handler_func): Declare.
13613 (delete_file_handler, add_file_handler, start_event_loop):
13614 Declare.
13615 (handle_serial_event, handle_target_event, push_event)
13616 (putpkt_notif): Declare.
13617 * target.h (enum resume_kind): New.
13618 (struct thread_resume): Replace `step' field by `kind' field.
13619 (TARGET_WNOHANG): Define.
13620 (struct target_ops) <wait>: Add `options' argument.
13621 <supports_non_stop, async, start_non_stop>: New fields.
13622 (target_supports_non_stop, target_async): New.
13623 (start_non_stop): Declare.
13624 (mywait): Add `options' argument.
13625 * target.c (mywait): Add `options' argument. Print child exit
13626 notifications here.
13627 (start_non_stop): New.
13628 * server.c (non_stop, own_buf, mem_buf): New globals.
13629 (struct vstop_notif): New.
13630 (notif_queue): New global.
13631 (queue_stop_reply, push_event, discard_queued_stop_replies)
13632 (send_next_stop_reply): New.
13633 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13634 interface changes.
13635 (attach_inferior): In non-stop mode, don't wait for the target
13636 here.
13637 (handle_general_set): Handle QNonStop.
13638 (handle_query): When handling qC, return the current general
13639 thread, instead of the first thread of the list.
13640 (handle_query): If the backend supports non-stop mode, include
13641 QNonStop+ in the qSupported query response.
13642 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13643 and non-stop mode.
13644 (handle_v_attach, handle_v_run): Handle non-stop mode.
13645 (handle_v_stopped): New.
13646 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13647 (myresume): Adjust to use resume_kind. Handle non-stop.
13648 (queue_stop_reply_callback): New.
13649 (handle_status): Handle non-stop mode.
13650 (main): Clear non_stop flag on reconnection. Use the event-loop.
13651 Refactor serial protocol handling from here ...
13652 (process_serial_event): ... to this new function. When GDB
13653 selects any thread, select one here. In non-stop mode, wait until
13654 GDB acks all pending events before exiting.
13655 (handle_serial_event, handle_target_event): New.
13656 * remote-utils.c (remote_open): Install remote_desc in the event
13657 loop.
13658 (remote_close): Remove remote_desc from the event loop.
13659 (putpkt_binary): Rename to...
13660 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13661 (putpkt_binary): New as wrapper around putpkt_binary_1.
13662 (putpkt_notif): New.
13663 (prepare_resume_reply): In non-stop mode, don't change the
13664 general_thread.
13665 * event-loop.c: New.
13666 * Makefile.in (OBJ): Add event-loop.o.
13667 (event-loop.o): New rule.
13668
13669 * linux-low.h (pid_of): Moved here.
13670 (lwpid_of): New.
13671 (get_lwp_thread): Use lwpid_of.
13672 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13673 * linux-low.c (pid_of): Delete.
13674 (inferior_pid): Use lwpid_of.
13675 (linux_event_pipe): New.
13676 (target_is_async_p): New.
13677 (delete_lwp): New.
13678 (handle_extended_wait): Use lwpid_of.
13679 (add_lwp): Don't set lwpid field.
13680 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13681 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13682 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13683 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13684 first. Adjust to linux_wait_for_event interface changes. Use
13685 lwpid_of.
13686 (linux_detach): Don't delete the main lwp here.
13687 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13688 (status_pending_p): Don't consider explicitly suspended lwps.
13689 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13690 pointer. Add OPTIONS argument. Change return type to int. Use
13691 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13692 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13693 pointer. Add status pointer argument. Return a pid instead of a
13694 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13695 changes. In non-stop mode, don't switch to a random thread.
13696 (linux_wait): Rename to...
13697 (linux_wait_1): ... this. Add target_options argument, and handle
13698 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13699 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13700 clean exit and signal exit code. Don't stop all threads in
13701 non-stop mode. In all-stop mode, only stop all threads when
13702 reporting a stop to GDB. Handle explicit thread stop requests.
13703 (async_file_flush, async_file_mark): New.
13704 (linux_wait): New.
13705 (send_sigstop): Use lwpid_of.
13706 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13707 interface changes. In non-stop mode, don't switch to a random
13708 thread.
13709 (linux_resume_one_lwp): Use lwpid_of.
13710 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13711 (linux_resume_one_thread): ... this. Handle resume_stop. In
13712 non-stop mode, don't look for pending flag in all threads.
13713 (resume_status_pending_p): Don't consider explicitly suspended
13714 threads.
13715 (my_waitpid): Reimplement. Emulate __WALL.
13716 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13717 Use lwpid_of.
13718 (sigchld_handler, linux_supports_non_stop, linux_async)
13719 (linux_start_non_stop): New.
13720 (linux_target_ops): Register linux_supports_non_stop, linux_async
13721 and linux_start_non_stop.
13722 (initialize_low): Install SIGCHLD handler.
13723 * thread-db.c (thread_db_create_event, find_one_thread)
13724 (thread_db_get_tls_address): Use lwpid_of.
13725 * win32-low.c (win32_detach): Adjust to use resume_kind.
13726 (win32_wait): Add `options' argument.
13727 * spu-low.c (spu_resume): Adjust to use resume_kind.
13728 (spu_wait): Add `options' argument.
13729
5b1c542e
PA
137302009-04-01 Pedro Alves <pedro@codesourcery.com>
13731
13732 Decouple target code from remote protocol.
13733
13734 * target.h (enum target_waitkind): New.
13735 (struct target_waitstatus): New.
13736 (struct target_ops) <wait>: Return an unsigned long. Take a
13737 target_waitstatus pointer instead of a char pointer.
13738 (mywait): Likewise.
13739 * target.c (mywait): Change prototype to return an unsigned long.
13740 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13741 * server.h (thread_from_wait, old_thread_from_wait): Delete
13742 declarations.
13743 (prepare_resume_reply): Change prototype to take a
13744 target_waitstatus.
13745 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13746 (last_status, last_ptid): New.
13747 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13748 pid instead of a signal.
13749 (attach_inferior): Remove "status" and "signal" parameters.
13750 Adjust.
13751 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13752 not as an address.
13753 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13754 (handle_v_requests, myresume): Remove "status" and "signal"
13755 parameters. Adjust.
13756 (handle_status): New.
13757 (main): Delete local `status'. Adjust.
13758 * remote-utils.c: Include target.h.
13759 (prepare_resume_reply): Change prototype to take a
13760 target_waitstatus. Adjust.
13761
13762 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13763 interface.
13764 * spu-low.c (spu_wait): Adjust.
13765 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13766 Delete.
13767 (win32_wait): Adjust.
13768
2bd7c093
PA
137692009-04-01 Pedro Alves <pedro@codesourcery.com>
13770
13771 * target.h (struct thread_resume): Delete leave_stopped member.
13772 (struct target_ops): Add a `n' argument to the `resume' callback.
13773 * server.c (start_inferior): Adjust.
13774 (handle_v_cont, myresume): Adjust.
13775 * linux-low.c (check_removed_breakpoint): Adjust to resume
13776 interface change, and to removed leave_stopped field.
13777 (resume_ptr): Delete.
13778 (struct thread_resume_array): New.
13779 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13780 resume interface change.
13781 (linux_continue_one_thread, linux_queue_one_thread)
13782 (resume_status_pending_p): Check if the resume field is NULL
13783 instead of checking the leave_stopped member.
13784 (linux_resume): Adjust to the target resume interface change.
13785 * spu-low.c (spu_resume): Adjust to the target resume interface
13786 change.
13787 * win32-low.c (win32_detach, win32_resume): Ditto.
13788
c35fafde
PA
137892009-04-01 Pedro Alves <pedro@codesourcery.com>
13790
13791 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13792 flag.
13793 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13794 pending.
13795 (linux_continue_one_thread): Only preserve the stepping flag if
13796 there's a pending breakpoint.
13797
0a59d50b
PA
137982009-03-31 Pedro Alves <pedro@codesourcery.com>
13799
13800 * server.c (main): After the inferior having exited, call
13801 remote_close before exiting gdbserver.
13802
f04c6d38
TJB
138032009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13804
13805 Fix size of FPSCR in Power 7 processors.
13806 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13807 (PPC_FEATURE_HAS_DFP): New #define.
13808 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13809 size of the FPSCR.
13810
78e5cee6
PA
138112009-03-23 Pedro Alves <pedro@codesourcery.com>
13812
13813 * server.c (handle_query) Whitespace and formatting.
13814
1b3f6016
PA
138152009-03-22 Pedro Alves <pedro@codesourcery.com>
13816
13817 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13818 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13819 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13820 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13821 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13822 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13823 Makefile.in, configure.ac: Fix whitespace throughout.
13824 * configure: Regenerate.
13825
a07b2135
PA
138262009-03-22 Pedro Alves <pedro@codesourcery.com>
13827
13828 * inferiors.c (find_inferior): Make it safe for the callback
13829 function to delete the currently iterated inferior.
13830
67cc2626
PA
138312009-03-22 Pedro Alves <pedro@codesourcery.com>
13832
13833 * Makefile.in (linuw_low_h): Move higher.
13834 (thread-db.o): Depend on $(linux_low_h).
13835
54a0b537
PA
138362009-03-17 Pedro Alves <pedro@codesourcery.com>
13837
13838 Rename "process" to "lwp" throughout.
13839
13840 * linux-low.c (all_processes): Rename to...
13841 (all_lwps): ... this.
13842 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13843 (add_process): Rename to ...
13844 (add_lwp): ... this. Adjust.
13845 (linux_create_inferior): Adjust.
13846 (linux_attach_lwp): Adjust.
13847 (linux_attach): Adjust.
13848 (linux_kill_one_process): Rename to ...
13849 (linux_kill_one_lwp): ... this. Adjust.
13850 (linux_kill): Adjust.
13851 (linux_detach_one_process): Rename to ...
13852 (linux_detach_one_lwp): ... this. Adjust.
13853 (linux_detach): Adjust.
13854 (check_removed_breakpoint): Adjust.
13855 (status_pending_p): Adjust.
13856 (linux_wait_for_process): Rename to ...
13857 (linux_wait_for_lwp): ... this. Adjust.
13858 (linux_wait_for_event): Adjust.
13859 (send_sigstop): Adjust.
13860 (wait_for_sigstop): Adjust.
13861 (stop_all_processes): Rename to ...
13862 (stop_all_lwps): ... this.
13863 (linux_resume_one_process): Rename to ...
13864 (linux_resume_one_lwp): ... this. Adjust.
13865 (linux_set_resume_request, linux_continue_one_thread)
13866 (linux_queue_one_thread, resume_status_pending_p)
13867 (usr_store_inferior_registers, regsets_store_inferior_registers)
13868 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13869 Adjust.
13870 * linux-low.h (get_process): Rename to ...
13871 (get_lwp): ... this. Adjust.
13872 (get_thread_process): Rename to ...
13873 (get_thread_lwp): ... this. Adjust.
13874 (get_process_thread): Rename to ...
13875 (get_lwp_thread): ... this. Adjust.
13876 (struct process_info): Rename to ...
13877 (struct lwp_info): ... this.
13878 (all_processes): Rename to ...
13879 (all_lwps): ... this.
13880 * proc-service.c (ps_lgetregs): Adjust.
13881 * thread-db.c (thread_db_create_event, find_one_thread)
13882 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13883
0b16c5cf
PA
138842009-03-14 Pedro Alves <pedro@codesourcery.com>
13885
13886 * server.c (handle_query): Handle "qAttached".
13887
32de4b9d
NS
138882009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13889
13890 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13891 GPLv3, update license URL.
13892
2aecd87f
DE
138932009-03-01 Doug Evans <dje@google.com>
13894
93efd302 13895 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13896 (server_h): Add gdb_signals.h.
13897 (signals.o): Update.
13898 * server.h (target_signal_from_host,target_signal_to_host_p)
13899 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13900
86b1f9c5
PM
139012009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13902
13903 * remote-utils.c (getpkt): Also generate remote-debug
13904 information if noack_mode is set.
13905
4aa995e1
PA
139062009-02-06 Pedro Alves <pedro@codesourcery.com>
13907
13908 * server.c (handle_query): Report qXfer:siginfo:read and
13909 qXfer:siginfo:write as supported and handle them.
13910 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13911 * linux-low.c (linux_xfer_siginfo): New.
13912 (linux_target_ops): Set it.
13913
62709adf
PA
139142009-01-26 Pedro Alves <pedro@codesourcery.com>
13915
13916 * server.c (gdbserver_usage): Mention --remote-debug.
13917 (main): Accept '--remote-debug' switch.
13918
aef93bd7
DE
139192009-01-18 Doug Evans <dje@google.com>
13920
13921 * regcache.c (new_register_cache): No need to check result of xcalloc.
13922 * server.c (handle_search_memory): Back out calls to xmalloc,
13923 result is checked and error is returned to user upon failure.
13924 (handle_query): Ditto. Add more checks for result of malloc.
13925 (handle_v_cont): Check result of malloc, report error back to
13926 user upon failure.
13927 (handle_v_run): Ditto. Call freeargv.
13928 * server.h (freeargv): Declare.
13929 * utils.c (freeargv): New fn.
13930
54363045
DE
139312009-01-15 Doug Evans <dje@google.com>
13932
f626972c
DE
13933 * gdbreplay.c (perror_with_name): Make arg const char *.
13934 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13935 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13936 * utils.c (perror_with_name): Make arg const char *.
54363045 13937
18aae699
PA
139382009-01-14 Pedro Alves <pedro@codesourcery.com>
13939
13940 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13941 when handling a EXIT_PROCESS_DEBUG_EVENT.
13942
ff703abe
JB
139432009-01-06 Joel Brobecker <brobecker@adacore.com>
13944
13945 * gdbreplay.c (gdbreplay_version): Update copyright year.
13946 * server.c (gdbserver_version): Likewise.
13947
f21cc1a2 139482009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13949
13950 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13951 (handle_extended_wait): Improve comment.
0e21c1ec 13952
bca929d3
DE
139532008-12-13 Doug Evans <dje@google.com>
13954
13955 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13956 * server.h (ATTR_MALLOC): New macro.
13957 (xmalloc,xcalloc,xstrdup): Declare.
13958 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13959 * inferiors.c: Ditto.
13960 * linux-low.c: Ditto.
13961 * mem-break.c: Ditto.
13962 * regcache.c: Ditto.
13963 * remote-utils.c: Ditto.
13964 * server.c: Ditto.
13965 * target.c: Ditto.
13966 * win32-low.c: Ditto.
13967
97438e3f
DE
139682008-12-12 Doug Evans <dje@google.com>
13969
896c7fbb
DE
13970 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13971 in debugging printf.
13972
97438e3f
DE
13973 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13974
e3b886f8
DE
139752008-12-09 Doug Evans <dje@google.com>
13976
13977 * linux-low.h (struct process_info): Delete member tid, unused.
13978 * thread-db.c (find_one_thread): Update.
13979 (maybe_attach_thread): Update.
13980
07e059b5
VP
139812008-12-02 Pedro Alves <pedro@codesourcery.com>
13982
889bf7c5
PA
13983 * target.h (struct target_ops): Add qxfer_osdata member.
13984 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13985 and dirent.h.
13986 (linux_qxfer_osdata): New functions.
13987 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13988 callback.
13989 * server.c (handle_query): Handle "qXfer:osdata:read:".
13990 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13991 (buffer_xml_printf): New functions.
13992 * server.h (struct buffer): New.
13993 (buffer_grow_str, buffer_grow_str0): New macros.
13994 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13995 (buffer_xml_printf): Declare.
07e059b5 13996
4cab47ab
DE
139972008-11-24 Doug Evans <dje@google.com>
13998
13999 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14000
f142445f
DJ
140012008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14002
14003 * server.c (handle_v_run): Always use the supplied argument list.
14004
d0107bb6 140052008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14006
d0107bb6
BW
14007 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14008 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14009
2c4ad781
TJB
140102008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14011
14012 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14013 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14014 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14015 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14016 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14017 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14018 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14019 XML target descriptions.
14020 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14021 when inferior is running on an ISA 2.05 or later processor. Add
14022 special case to return offset for full 64-bit slot of FPSCR when
14023 in 32-bits.
14024
dfb64f85
DJ
140252008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14026
14027 * Makefile.in (SFILES, clean): Added sparc64 files.
14028 (reg-sparc64.o, reg-sparc64.c): New.
14029 * configure.srv (sparc*-*-linux*): New configuration.
14030 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14031 syscall arguments for SPARC.
14032 (regsets_store_inferior_registers): Likewise.
14033 * linux-sparc-low.c: New file.
14034
66b6e1dd
DE
140352008-10-21 Doug Evans <dje@google.com>
14036
14037 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14038 (READLINE_DIR,READLINE_DEP): Delete.
14039 (INTERNAL_CFLAGS): Update.
14040 (LINTFLAGS): Update.
14041
9b710a42
PA
140422008-10-10 Pedro Alves <pedro@codesourcery.com>
14043
14044 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14045 whole argv from the last run, not just argv[0].
14046
5822d809
PA
140472008-09-08 Pedro Alves <pedro@codesourcery.com>
14048
14049 * regcache.c (new_register_cache): Return NULL if the register
14050 cache size isn't known yet.
14051 (free_register_cache): Avoid dereferencing a NULL regcache.
14052
74aac56f
DJ
140532008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * configure.srv: Merge MIPS and MIPS64.
14056
400b20f5
MR
140572008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14058
14059 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14060
677c5bb1
LM
140612008-08-18 Luis Machado <luisgpm@br.ibm.com>
14062
14063 * Makefile.in: Add required vsx dependencies.
14064
14065 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14066 Declare init_registers_powerpc_vsx32l.
14067 Declare init_registers_powerpc_vsx64l.
14068 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14069 (ppc_arch_setup): Check for VSX in hwcap.
14070 (ppc_fill_vsxregset): New function.
14071 (ppc_store_vsxregset): New function.
14072 Add new VSX entry in regset_info target_regsets.
14073
14074 * configure.srv: Add new VSX dependencies.
14075
a6f3e723
SL
140762008-08-12 Pedro Alves <pedro@codesourcery.com>
14077
14078 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14079 (remote_open): Set or clear transport_is_reliable.
14080 (putpkt_binary): Don't expect acks in noack mode.
14081 (getpkt): Don't send ack/nac in noack mode.
14082 * server.c (handle_general_set): Handle QStartNoAckMode.
14083 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14084 qSupported.
14085 (main): Reset noack_mode on every connection.
14086 * server.h (noack_mode): Declare.
14087
a417dc56
RW
140882008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14089
14090 * Makefile.in (GDBREPLAY_OBS): New variable.
14091 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14092
3221518c
UW
140932008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14094 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14097 (usr_store_inferior_registers): Likewise.
14098 (regsets_store_inferior_registers): Likewise.
14099
ec56be1b
PA
141002008-07-31 Rolf Jansen <rj@surtec.com>
14101 Pedro Alves <pedro@codesourcery.com>
14102
14103 * configure.ac: Check for memmem declaration.
14104 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14105 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14106 (disable_packet_qfThreadInfo): Unconditionally compile.
14107 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14108 * configure, config.in: Regenerate.
14109
2fe5e3ff
DE
141102008-07-28 Doug Kwan <dougkwan@google.com>
14111
14112 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14113 (linux_write_memory): Remove declaration of errno.
14114
836acd6d
UW
141152008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14116
14117 * linux-low.c (handle_extended_wait): Do not use "status"
14118 variable uninitialized.
14119
aeba519e
PA
141202008-07-07 Pedro Alves <pedro@codesourcery.com>
14121
14122 * server.c (handle_v_attach): Inhibit reporting dll changes.
14123
db42f210
PA
141242008-06-27 Pedro Alves <pedro@codesourcery.com>
14125
14126 * remote-utils.c (prepare_resume_reply): If requested, don't
14127 output "thread:TID" in the T stop reply.
14128
14129 * server.c (disable_packet_vCont, disable_packet_Tthread)
14130 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14131 (handle_query): If requested, disable support for qC, qfThreadInfo
14132 and qsThreadInfo.
14133 (handle_v_requests): If requested, disable support for vCont.
14134 (gdbserver_show_disableable): New.
14135 (main): Handle --disable-packet and --disable-packet=LIST.
14136
14137 * server.h (disable_packet_vCont, disable_packet_Tthread)
14138 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14139
8e4c5421
CD
141402008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14141
14142 * server.c (gdbserver_usage): Mention --version.
14143
6e23a804
DJ
141442008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14145
14146 * Makefile.in (gdbreplay.o): New rule.
14147
90aa6a40
JM
141482008-06-06 Joseph Myers <joseph@codesourcery.com>
14149
14150 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14151 message, not gdbserver.
14152
c16158bc 141532008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14154 Nathan Sidwell <nathan@codesourcery.com>
14155 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14156
14157 * acinclude.m4: Include ../../config/acx.m4.
14158 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14159 * configure, config.in: Regenerate.
14160 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14161 * server.c (gdbserver_version): Print PKGVERSION.
14162 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14163 (main): Adjust gdbserver_usage calls.
14164 * gdbreplay.c (version, host_name): Add declarations.
14165 (gdbreplay_version, gdbreplay_usage): New.
14166 (main): Accept --version and --help options.
14167
aeb75bf5
DJ
141682008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14169
14170 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14171 (arm_breakpoint_at): Handle Thumb.
14172 (the_low_target): Add comment.
14173
76b233dd
UW
141742008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14175
14176 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14177
08388c79
DE
141782008-05-09 Doug Evans <dje@google.com>
14179
a3c83fae
DE
14180 * server.h (decode_search_memory_packet): Declare.
14181 * remote-utils.c (decode_search_memory_packet): New fn.
14182 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14183 (handle_search_memory): New fn.
14184 (handle_query): Process qSearch:memory packets.
14185
bb9c3d36
UW
141862008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14187
14188 * regcache.c (registers_length): Remove.
14189 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14190 full register packet.
14191 * regcache.h (registers_length): Remove prototype.
14192 * server.h (PBUFSIZ): Define to 16384.
14193
7284e1be
UW
141942008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14195
14196 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14197 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14198 powerpc-64l.o, and powerpc-altivec64l.o.
14199 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14200 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14201 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14202 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14203 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14204 to srv_xmlfiles.
14205
14206 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14207 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14208 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14209 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14210 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14211 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14212 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14213 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14214 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14215 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14216 (clean): Update.
14217
14218 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14219 (init_registers_powerpc_32l): ... this new prototype.
14220 (init_registers_powerpc_32): Remove, replace by ...
14221 (init_registers_powerpc_altivec32l): ... this new prototype.
14222 (init_registers_powerpc_e500): Remove, replace by ...
14223 (init_registers_powerpc_e500l): ... this new prototype.
14224 (init_registers_ppc64): Remove, replace by ...
14225 (init_registers_powerpc_64l): ... this new prototype.
14226 (init_registers_powerpc_64): Remove, replace by ...
14227 (init_registers_powerpc_altivec64l): ... this new prototype.
14228 (ppc_num_regs): Set to 73.
14229 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14230 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14231 (ppc_cannot_store_register): Handle orig_r3 and trap.
14232 (ppc_arch_setup): Update init_registers_... calls.
14233 (ppc_fill_gregset): Handle orig_r3 and trap.
14234
14235 * inferiors.c (clear_inferiors): Reset current_inferior.
14236
fdc59709
PB
142372008-04-23 Paolo Bonzini <bonzini@gnu.org>
14238
889bf7c5
PA
14239 * acinclude.m4: Add override.m4.
14240 * configure: Regenerate.
fdc59709 14241
c9b2f845
UW
142422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14243
14244 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14245 initial call to init_register_ppc64.
14246
550512b8
UW
142472008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14248
43aaf8b6
PA
14249 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14250 single powerpc*-*-linux* case.
550512b8
UW
14251 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14252
b6430ec3
UW
142532008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14254
14255 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14256 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14257 from reg_xmlfiles.
14258 * linux-ppc-low.c: Include <elf.h>.
14259 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14260 (ppc_hwcap): New global variable.
14261 (ppc_regmap): Remove __SPE__ #ifdef sections.
14262 (ppc_regmap_e500): New global variable.
14263 (ppc_cannot_store_register): Update __SPE__ special case.
14264 (ppc_get_hwcap): New function.
14265 (ppc_arch_setup): Use it to determine whether inferior supports
14266 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14267 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14268 Do not access registers if target does not support AltiVec.
14269 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14270 Do not access registers if target does not support SPE.
14271 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14272
52fa2412
UW
142732008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14274
14275 * linux-low.c (disabled_regsets, num_regsets): New.
14276 (use_regsets_p): Delete.
14277 (linux_wait_for_process): Clear disabled_regsets.
14278 (regsets_fetch_inferior_registers): Check and set it.
14279 (regsets_store_inferior_registers): Likewise.
14280 (linux_fetch_registers, linux_store_registers): Do not use
14281 use_regsets_p.
14282 (initialize_low): Allocate disabled_regsets.
14283
e28b3332
DJ
142842008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * Makefile.in (LIBOBJS): New.
14287 (OBS): Use LIBOBJS.
14288 (memmem.o): New rule.
14289 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14290 * configure: Regenerated.
14291
4536995d
UW
142922008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14293
14294 * server.c (handle_query): Never return "unsupported" for
14295 qXfer:features:read queries.
14296
221c031f
UW
142972008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14298
14299 * server.c (get_features_xml): Fix inverted condition.
14300 (handle_query): Always support qXfer:feature:read.
14301
ccd213ac
DJ
143022008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14303
14304 * server.c (wrapper_argv): New.
14305 (start_inferior): Handle wrapper_argv. If set, expect an extra
14306 trap.
14307 (gdbserver_usage): Document --wrapper.
14308 (main): Parse --wrapper.
14309
6fe305f7
UW
143102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14311
14312 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14313 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14314 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14315 (ppc_set_pc): Likewise.
14316 (ppc_arch_setup): New function.
14317 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14318 of collect_register.
889bf7c5 14319 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14320
5b0a002e
UW
143212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14322
14323 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14324 instead of linux-ppc64-low.o.
14325 * linux-ppc64-low.c: Remove file.
14326 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14327 (linux-ppc64-low.o): Remove rule.
14328
14329 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14330 (init_registers_powerpc_64): Likewise.
14331 (ppc_regmap): Conditionally define depending on __powerpc64__.
14332 (ppc_cannot_store_register): Do not special-case "fpscr" when
14333 compiled on __powerpc64__.
14334 (ppc_collect_ptrace_register): New function.
14335 (ppc_supply_ptrace_register): New function.
14336 (ppc_breakpoint): Change type to "unsigned int".
14337 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14338 (the_low_target): Conditionally provide initializers for the
889bf7c5 14339 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14340 collect_ptrace_register and supply_ptrace_register members.
14341
9b4b61c8
UW
143422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14343
14344 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14345 * server.c (gdbserver_xmltarget): Define.
14346 (get_features_xml): Use it to replace "target.xml" and arch_string.
14347
14348 * configure.srv: Remove srv_xmltarget. Add XML files that were
14349 mentioned there to srv_xmlfiles instead. Remove conditional tests
14350 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14351 srv_xmlfiles and srv_regobj to include all possible choices.
14352 * configure.ac (srv_xmltarget): Remove.
14353 (srv_xmlfiles): Do not add "target.xml".
14354 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14355 checks for supplementary target information.
14356 * configure: Regenerate.
14357 * Makefile.in (XML_TARGET): Remove.
14358 (target.xml): Remove rule.
14359 (clean): Do not clean up target.xml.
14360 (.PRECIOUS): Do not mention target.xml.
14361
14362 * target.h (struct target_ops): Remove arch_string member.
14363 * linux-low.c (linux_arch_string): Remove.
14364 (linux_target_ops): Remove arch_string initializer.
14365 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14366 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14367 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14368 * spu-low.c (spu_arch_string): Remove.
14369 (spu_target_ops): Remove arch_string initializer.
14370 * win32-low.c (win32_arch_string): Remove.
14371 (win32_target_ops): Remove arch_string initializer.
14372 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14373 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14374 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14375
ee1a7ae4
UW
143762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14379 by collect_ptrace_register and supply_ptrace_register hooks.
14380 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14381 instead of checking for the_low_target.left_pad_xfer.
14382 (usr_store_inferior_registers): Use collect_ptrace_register callback
14383 instead of checking for the_low_target.left_pad_xfer.
14384
14385 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14386 (s390_supply_ptrace_register): Likewise.
14387 (s390_fill_gregset): Call s390_collect_ptrace_register.
14388 (the_low_target): Update.
14389
14390 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14391 (ppc_supply_ptrace_register): Likewise.
14392 (the_low_target): Update.
14393
14394 * linux-i386-low.c (the_low_target): Update.
14395 * linux-x86-64-low.c (the_low_target): Update.
14396
d61ddec4
UW
143972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14398
14399 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14400 reg-s390.o and reg-s390x.o.
14401
14402 * linux-low.c (new_inferior): New global variable.
14403 (linux_create_inferior, linux_attach): Set it.
14404 (linux_wait_for_process): Call the_low_target.arch_setup after the
14405 target has stopped for the first time.
14406 (initialize_low): Do not call the_low_target.arch_setup.
14407
14408 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14409 (s390_set_pc): Likewise.
14410 (s390_arch_setup): New function.
14411 (the_low_target): Use s390_arch_setup as arch_setup routine.
14412
14413 * regcache.c (realloc_register_cache): New function.
14414 (set_register_cache): Call it for each existing regcache.
14415
d05b4ac3
UW
144162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14417
14418 * server.h (init_registers): Remove prototype.
14419
14420 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14421 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14422 instead of init_registers ().
14423 * linux-arm-low.c (init_registers_arm): Add prototype.
14424 (init_registers_arm_with_iwmmxt): Likewise.
14425 (the_low_target): Add initializer for arch_setup field.
14426 * linux-cris-low.c (init_registers_cris): Add prototype.
14427 (the_low_target): Add initializer for arch_setup field.
14428 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14429 (the_low_target): Add initializer for arch_setup field.
14430 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14431 (the_low_target): Add initializer for arch_setup field.
14432 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14433 (the_low_target): Add initializer for arch_setup field.
14434 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14435 (the_low_target): Add initializer for arch_setup field.
14436 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14437 (the_low_target): Add initializer for arch_setup field.
14438 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14439 (init_registers_mips64_linux): Likewise.
14440 (the_low_target): Add initializer for arch_setup field.
14441 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14442 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14443 (the_low_target): Add initializer for arch_setup field.
14444 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14445 (init_registers_powerpc_64): Likewise.
14446 (the_low_target): Add initializer for arch_setup field.
14447 * linux-s390-low.c (init_registers_s390): Add prototype.
14448 (init_registers_s390x): Likewise.
14449 (the_low_target): Add initializer for arch_setup field.
14450 * linux-sh-low.c (init_registers_sh): Add prototype.
14451 (the_low_target): Add initializer for arch_setup field.
14452 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14453 (the_low_target): Add initializer for arch_setup field.
14454 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14455 (the_low_target): Add initializer for arch_setup field.
14456
14457 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14458 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14459 instead of init_registers ().
14460 * win32-arm-low.c (init_registers_arm): Add prototype.
14461 (the_low_target): Add initializer for arch_setup field.
14462 * win32-i386-low.c (init_registers_i386): Add prototype.
14463 (the_low_target): Add initializer for arch_setup field.
14464
14465 * spu-low.c (init_registers_spu): Add prototype.
14466 (initialize_low): Call initialie_registers_spu () instead of
14467 initialize_registers ().
14468
fd96d250
PA
144692008-02-19 Pedro Alves <pedro@codesourcery.com>
14470
14471 * server.c (handle_v_requests): When handling the vRun and vAttach
14472 packets, if already debugging a process, don't kill it. Return an
14473 error instead.
14474
d41b6bb4
DJ
144752008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * server.c (handle_query): Correct length check.
14478
5ac588cf
PA
144792008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14480
14481 * win32-low.c (do_initial_child_stuff): Add process handle
14482 parameter. Set current_process_handle and current_process_id from the
14483 parameters. Clear globals.
14484 (win32_create_inferior): Don't set current_process_handle and
14485 current_process_id here. Instead pass them on the call to
14486 do_initial_child_stuff.
14487 (win32_attach): Likewise.
14488 (win32_clear_inferiors): New.
14489 (win32_kill): Don't close the current process handle or the
14490 current thread handle here. Instead call win32_clear_inferiors.
14491 (win32_detach): Don't open a new handle to the process. Call
14492 win32_clear_inferiors.
14493 (win32_join): Don't rely on current_process_handle; open a new
14494 handle using the process id.
14495 (win32_wait): Call win32_clear_inferiors when the inferior process
14496 has exited.
14497
ecd7ecbc
DJ
144982008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14499
14500 * server.c (monitor_show_help): Add "exit".
14501
1525d545
MG
145022008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14503
ecd7ecbc 14504 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14505 (clean): Add reg-xtensa.c.
14506 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14507 * configure.srv (xtensa*-*-linux*) New target.
14508 * linux-xtensa-low.c: New.
14509 * xtensa-xtregs.c: New.
1525d545 14510
59a016f0
PA
145112008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14512
14513 * hostio.c: Don't include errno.h.
14514 (errno_to_fileio_errno): Move to hostio-errno.
14515 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14516 error number outputting to the target->hostio_last_error callback.
14517 (hostio_packet_error): Use FILEIO_EINVAL directly.
14518 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14519 calls to hostio_error.
14520 * hostio-errno.c: New.
14521 * server.h (hostio_last_error_from_errno): Declare.
14522 * target.h (target_ops): Add hostio_last_error member.
14523 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14524 as hostio_last_error handler.
889bf7c5 14525 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14526 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14527 (wince_hostio_last_error): New functions.
14528 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14529 as hostio_last_error handler.
14530 (win32_target_ops) [!_WIN32_WCE]: Register
14531 hostio_last_error_from_errno as hostio_last_error handler.
14532 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14533 (hostio-errno.o): New rule.
14534 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14535 * configure.srv (srv_hostio_err_objs): New variable. Default to
14536 hostio-errno.o.
14537 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14538 * configure: Regenerate.
14539
2d717e4f
DJ
145402008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14541
14542 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14543 (linux_kill, linux_detach): Clean up the process list.
14544 * remote-utils.c (remote_open): Improve port number parsing.
14545 (putpkt_binary, input_interrupt): Only send interrupts if the target
14546 is running.
14547 * server.c (extended_protocol): Make static.
14548 (attached): Define earlier.
14549 (exit_requested, response_needed, program_argv): New variables.
14550 (target_running): New.
14551 (start_inferior): Clear attached here.
14552 (attach_inferior): Set attached here.
14553 (require_running): Define.
14554 (handle_query): Use require_running and target_running. Implement
14555 "monitor exit".
14556 (handle_v_attach, handle_v_run): New.
14557 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14558 (gdbserver_usage): Update.
14559 (main): Redo argument parsing. Handle --debug and --multi. Handle
14560 --attach along with other options or after the port. Save
14561 program_argv. Support no initial program. Resynchronize
14562 communication with GDB after an error. Handle "monitor exit".
14563 Use require_running and target_running. Always allow the extended
14564 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14565 restart in extended mode.
14566 * README: Refer to the GDB manual. Update --attach usage.
14567
7407e2de
AS
145682007-12-20 Andreas Schwab <schwab@suse.de>
14569
14570 * linux-low.c (STACK_SIZE): Define.
14571 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14572 (linux_test_for_tracefork): Likewise.
14573
b65d95c5
DJ
145742007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-low.c (linux_wait_for_event): Update messages. Do not
14577 reinsert auto-delete breakpoints.
14578 * mem-break.c (struct breakpoint): Change return type of handler to
14579 int.
14580 (set_breakpoint_at): Update handler type.
14581 (reinsert_breakpoint_handler): Return 1 instead of calling
14582 delete_breakpoint.
14583 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14584 setting a new one.
14585 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14586 * mem-break.h (set_breakpoint_at): Update handler type.
14587 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14588 * win32-low.c (auto_delete_breakpoint): New.
14589 (get_child_debug_event): Use it.
14590
4e799345
DJ
145912007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * configure.ac: Check for pread and pwrite.
14594 * hostio.c (handle_pread): Fall back to lseek and read.
14595 (handle_pwrite): Fall back to lseek and write.
14596 * config.in, configure: Regenerated.
14597
27524b67
DJ
145982007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14599
14600 * server.c (myresume): Add own_buf argument.
14601 (main): Update calls.
14602
a20d5e98
DJ
146032007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14606 * remote-utils.c (remote_open): Do not call disable_async_io.
14607 (block_async_io): Delete.
14608 (unblock_async_io): Make static.
14609 (initialize_async_io): New.
14610 * server.c (handle_v_cont): Handle async I/O here.
14611 (myresume): Likewise. Move other common resume tasks here...
14612 (main): ... from here. Call initialize_async_io. Disable async
14613 I/O before the main loop.
14614 * server.h (initialize_async_io): Declare.
14615 (block_async_io, unblock_async_io): Delete prototypes.
14616 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14617
b79d787e
DJ
146182007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14619
14620 * remote-utils.c (readchar): Allow binary data in received messages.
14621
d97903b2
PA
146222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14623
14624 * win32-low.c (attaching): New global.
14625 (win32_create_inferior): Clear the `attaching' global.
14626 (win32_attach): Set the `attaching' global.
14627 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14628 attaching. Only set a breakpoint at the entry point if not
14629 attaching.
14630
311de423
PA
146312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14632
14633 * server.c (main): Don't report dll events on the initial
14634 connection on attaches.
14635
6c2d16d2
PA
146362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14637
14638 * server.c (main): Relax numerical bases supported for the pid of
14639 the --attach command line argument.
14640
5ca906e6
PA
146412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14642
14643 * win32-low.c (win32_attach): Call OpenProcess before
14644 DebugActiveProcess, not after. Add last error output to error
14645 call.
14646
9c6c8194
PA
146472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14648
14649 * win32-low.c (win32_get_thread_context)
14650 (win32_set_thread_context): New functions.
14651 (thread_rec): Use win32_get_thread_context.
14652 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14653 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14654 field.
14655
4d5d1aaa
PA
146562007-12-03 Leo Zayas
14657 Pedro Alves <pedro_alves@portugalmail.pt>
14658
14659 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14660 global variables.
14661 (child_add_thread): Minor cleanup.
14662 (child_continue): Resume artificially suspended threads before
14663 calling ContinueDebugEvent.
14664 (suspend_one_thread): New.
14665 (fake_breakpoint_event): New.
14666 (get_child_debug_event): Change return type to int. Check here if
14667 gdb sent an interrupt request. If a soft interrupt was requested,
14668 fake a breakpoint event. Return 0 if there is no event to handle,
14669 and 1 otherwise.
14670 (win32_wait): Don't check here if gdb sent an interrupt request.
14671 Ensure there is a valid event to handle.
14672 (win32_request_interrupt): Add soft interruption method as last
14673 resort.
14674
c436e841
PA
146752007-12-03 Leo Zayas
14676 Pedro Alves <pedro_alves@portugalmail.pt>
14677
14678 * win32-low.h (win32_thread_info): Add descriptions to the
14679 structure members. Replace `suspend_count' counter by a
14680 `suspended' flag.
14681 * win32-low.c (thread_rec): Update condition of when to get the
14682 context from the inferior. Rely on ContextFlags being set if it
14683 has already been retrieved. Only suspend the inferior thread if
14684 we haven't already. Warn if that fails.
14685 (continue_one_thread): s/suspend_count/suspended/. Only call
14686 ResumeThread once. Warn if that fails.
14687
e7b5fa67
PA
146882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14689
14690 * win32-low.c (win32_wait): Don't read from the inferior when it
14691 has already exited.
14692
a385171d
PA
146932007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14694
14695 * Makefile.in (win32_low_h): New variable.
14696 (win32-low.o): Add dependency on $(win32_low_h).
14697 (win32-arm-low.o, win32-i386-low.o): New rules.
14698
f80c84b3
DJ
146992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14700
14701 * hostio.c: Correct copyright year.
14702
a6b151f1
DJ
147032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14704
14705 * Makefile.in (OBS): Add hostio.o.
14706 (hostio.o): New rule.
14707 * server.h (handle_vFile): Declare.
14708 * hostio.c: New file.
14709 * server.c (handle_v_requests): Take packet_len and new_packet_len
14710 for binary packets. Call handle_vFile.
14711 (main): Update call to handle_v_requests.
14712
f9387fc3
DJ
147132007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * linux-low.c: Include <sched.h>.
14716
51c2684e
DJ
147172007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14718
14719 * linux-low.c (linux_tracefork_grandchild): New.
14720 (linux_tracefork_child): Use clone.
14721 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14722
75f83163
JB
147232007-10-31 Joel Brobecker <brobecker@adacore.com>
14724
14725 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14726
da5898ce
DJ
147272007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14728
14729 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14730
24a09b5f
DJ
147312007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14732
14733 * inferiors.c (change_inferior_id): Delete.
14734 (add_pid_to_list, pull_pid_from_list): New.
14735 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14736 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14737 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14738 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14739 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14740 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14741 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14742 (using_threads): Always set to 1.
14743 (handle_extended_wait): New.
14744 (add_process): Do not set TID.
14745 (linux_create_inferior): Set must_set_ptrace_flags.
14746 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14747 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14748 (linux_thread_alive): Rename TID argument to LWPID.
14749 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14750 (linux_wait_for_event): Do not use TID or check using_threads. Update
14751 call to dead_thread_notify. Call handle_extended_wait.
14752 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14753 (send_sigstop): Delete sigstop_sent.
14754 (wait_for_sigstop): Avoid TID.
14755 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14756 (linux_test_for_tracefork): New.
14757 (linux_lookup_signals): Use thread_db_active and
14758 linux_supports_tracefork_flag.
14759 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14760 * linux-low.h (get_process_thread): Avoid TID.
14761 (struct process_ifo): Move thread_known and tid to the end. Remove
14762 sigstop_sent.
14763 (linux_attach_lwp, thread_db_init): Update prototypes.
14764 * server.h (change_inferior_id): Delete prototype.
14765 (add_pid_to_list, pull_pid_from_list): New prototypes.
14766 * thread-db.c (thread_db_use_events): New.
14767 (find_first_thread): Rename to...
14768 (find_one_thread): ...this. Update callers and messages. Do not
14769 call fatal. Check thread_db_use_events. Do not call
14770 change_inferior_id or new_thread_notify.
14771 (maybe_attach_thread): Update. Do not call new_thread_notify.
14772 (thread_db_init): Set thread_db_use_events. Check use_events.
14773 * utils.c (fatal, warning): Correct message prefix.
14774
30ed0a8f
DJ
147752007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * Makefile.in (clean): Remove new files.
14778 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14779 (powerpc-64.o, powerpc-64.c): New rules.
14780 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14781 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14782 with SPE.
14783 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14784 SPE targets.
14785 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14786 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14787 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14788 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14789 (target_regsets): Add AltiVec and SPE register sets.
14790 * configure.ac: Check for AltiVec and SPE.
14791 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14792 (ppc_fill_vrregset, ppc_store_vrregset): New.
14793 (target_regsets): Add AltiVec register set.
14794 * configure: Regenerated.
14795
fd462a61
DJ
147962007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * linux-low.c (O_LARGEFILE): Define.
14799 (linux_read_memory): Use /proc/PID/mem.
14800 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14801 * configure, config.in: Regenerated.
14802
69f223ed
DJ
148032007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * linux-low.c (linux_wait_for_event): Do not pass signals while
14806 single-stepping.
14807
aec18585
PA
148082007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14809
14810 * win32-low.c (create_process): New.
14811 (win32_create_inferior): Use create_process instead of
14812 CreateProcess. If create_process failed retry appending an ".exe"
14813 suffix. Store the GetLastError result immediatelly after
14814 create_process calls and use it on the call to error.
14815
34d86ddd
PA
148162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14817
14818 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14819
5a0e3bd0
JB
148202007-08-23 Joel Brobecker <brobecker@adacore.com>
14821
14822 * configure.ac: Switch license to GPLv3.
14823
f88c79e6
MS
148242007-08-01 Michael Snyder <msnyder@access-company.com>
14825
14826 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14827
6b3d9b83
PA
148282007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14829
14830 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14831 typedef.
14832 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14833 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14834 CloseToolhelp32Snapshot.
14835 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14836 CloseToolhelp32Snapshot.
14837
c588c53c
MS
148382007-07-27 Michael Snyder <michael.snyder@access-company.com>
14839
14840 * server.c (main): Check for inferior exit before main loop.
14841
aa0403d9
PA
148422007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14843
14844 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14845 instead of on tmp_desc.
14846
255e7678
DJ
148472007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14848 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14851 (add_thread): Minor cleanups.
14852 (clear_inferiors): Move lower in the file. Clear the DLL
14853 list.
14854 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14855 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14856 (xml_escape_text): New.
14857 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14858 for qSupported.
14859 (handle_v_cont): Report errors.
14860 (gdbserver_version): Update.
14861 (main): Correct size of own_buf. Do not report initial DLL events.
14862 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14863 (unloaded_dll, xml_escape_text): New.
14864 * win32-low.c (enum target_waitkind): Update comments.
14865 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14866 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14867 (win32_EnumProcessModules, win32_GetModuleInformation)
14868 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14869 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14870 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14871 (win32_Module32First, win32_Module32Next, load_toolhelp)
14872 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14873 (get_child_debug_event): Handle DLL events.
14874 (win32_wait): Likewise.
14875
0d37add9
DJ
148762007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14877
14878 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14879 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14880
45e2715e
PA
148812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14882
14883 * win32-low.c (handle_output_debug_string): Ignore event if not
14884 waiting.
14885
c5674cf1
PA
148862007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14887
14888 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14889
2bbe3cc1
DJ
148902007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14893
ae13219e
DJ
148942007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * inferiors.c (change_inferior_id): Add comment.
14897 * linux-low.c (check_removed_breakpoint): Add an early
14898 prototype. Improve debug output.
14899 (linux_attach): Doc update.
14900 (linux_detach_one_process, linux_detach): Clean up before releasing
14901 each process.
14902 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14903 * linux-low.h (struct process_info): Doc improvement.
14904 * mem-break.c (delete_all_breakpoints): New.
14905 * mem-break.h (delete_all_breakpoints): New prototype.
14906 * thread-db.c (find_first_thread): New.
14907 (thread_db_create_event): Call it instead of
14908 thread_db_find_new_threads. Clean up unused variables.
14909 (maybe_attach_thread): Remove first thread handling.
14910 (thread_db_find_new_threads): Use find_first_thread.
14911 (thread_db_get_tls_address): Likewise.
14912
4105de34
DJ
149132007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14914
14915 * thread-db.c (thread_db_find_new_threads): Add prototype.
14916 (thread_db_create_event): Check for the main thread before adding
14917 a new thread.
14918 (maybe_attach_thread): Only enable event reporting if TID == 0.
14919 (thread_db_get_tls_address): Check for new threads.
14920
2b876972
DJ
149212007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14922
14923 * linux-low.c (linux_create_inferior): Try execv before execvp.
14924 * spu-low.c (spu_create_inferior): Likewise.
14925
7a245884
DJ
149262007-06-13 Mike Frysinger <vapier@gentoo.org>
14927
14928 * linux-low.c (linux_create_inferior): Change execv to execvp.
14929 * spu-low.c (spu_create_inferior): Likewies.
14930
117ce543
DJ
149312007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14932
14933 * Makefile.in (clean): Clean new files instead of deleted ones.
14934 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14935 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14936 rules.
14937 * configure.srv: Specify XML files and new regformats for MIPS and
14938 MIPS64 GNU/Linux.
14939 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14940 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14941 an entry for the restart register.
14942 (mips_cannot_fetch_register, mips_cannot_store_register)
14943 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14944 register names to match the XML descriptions.
14945 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14946 restart register instead of $0.
14947
0e7f50da
UW
149482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14949 Markus Deuling <deuling@de.ibm.com>
14950
14951 * remote-utils.c (decode_xfer_write): New function.
14952 * server.h (decode_xfer_write): Add prototype.
14953 * server.c (handle_query): Add PACKET_LEN argument. Support
14954 qXfer:spu:read and qXfer:spu:write packets.
14955 (main): Pass packet_len to handle_query.
14956 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14957 * target.h (target_ops): Add qxfer_spu.
14958
374c1d38
UW
149592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14960
14961 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14962 accessing non-seekable spufs files.
14963
bb63802a
UW
149642007-05-16 Markus Deuling <deuling@de.ibm.com>
14965
889bf7c5 14966 * server.c (handle_query): Add reply for qC packet.
bb63802a 14967
7390519e
PA
149682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14969 Leo Zayas <lerele@champenstudios@com>
14970
14971 * server.h (check_remote_input_interrupt_request): New function.
14972 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14973 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14974 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14975 (check_remote_input_interrupt_request): New function.
14976 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14977 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14978 winapi_GenerateConsoleCtrlEvent): New typedefs.
14979 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14980 to 250 ms.
14981 (win32_wait): Check for remote interrupt request
14982 with check_remote_input_interrupt_request.
14983 (win32_request_interrupt): New function.
14984 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14985
34b34921
PA
149862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14987
14988 * win32-low.c (debug_registers_changed,
14989 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14990 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14991 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14992 (thread_rec): Get context using the low target.
14993 (child_add_thread): Call thread_added on the low target,
14994 which does the same thing.
14995 (regptr): Delete.
14996 (do_initial_child_stuff): Remove debug registers references.
14997 Set context using the low target. Resume threads after
14998 setting the contexts.
14999 (child_continue): Remove dead variable. Remove debug
15000 registers references.
15001 (child_fetch_inferior_registers): Go through the low target.
15002 (do_child_store_inferior_registers): Remove.
15003 (child_store_inferior_registers): Go through the low target.
15004 (win32_resume): Remove debug registers references.
15005 Set context using the low target.
15006 (handle_exception): Change return type to void. Don't record
15007 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15008 first chance exception.
889bf7c5 15009 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15010 goto loop. Always return after waiting for debug event.
15011 (win32_wait): Convert to switch statement. Handle spurious
15012 events.
15013
15014 * win32-i386-low.c (debug_registers_changed,
15015 debug_registers_used): New.
15016 (initial_stuff): Rename to ...
15017 (i386_initial_stuff): ... this. Clear debug registers
15018 state variables.
15019 (store_debug_registers): Delete.
15020 (i386_get_thread_context): New.
15021 (load_debug_registers): Delete.
15022 (i386_set_thread_context): New.
15023 (i386_thread_added): New.
15024 (single_step): Rename to ...
15025 (i386_single_step): ... this.
15026 (do_fetch_inferior_registers): Rename to ...
15027 (i386_fetch_inferior_register): ... this.
15028 (i386_store_inferior_register): New.
15029 (the_low_target): Adapt to new interface.
15030
15031 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15032 (arm_get_thread_context): New.
15033 (arm_set_thread_context): New.
15034 (regptr): New.
15035 (do_fetch_inferior_registers): Rename to ...
15036 (arm_fetch_inferior_register): ... this.
15037 (arm_store_inferior_register): New.
15038 (arm_wince_breakpoint): Reimplement as unsigned long.
15039 (arm_wince_breakpoint_len): Define.
15040 (the_low_target): Adapt to new interface.
15041
15042 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15043 load_debug_registers. Add get_thread_context, set_thread_context,
15044 thread_added and store_inferior_register. Rename
15045 fetch_inferior_registers to fetch_inferior_register.
15046 (regptr): Remove declaration.
15047
dd6953e1
PA
150482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15049
15050 * linux-low.c (linux_detach): Change return type to int. Return 0.
15051 * spu-low.c (spu_detach): Likewise.
15052
444d6139
PA
150532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15054
15055 * target.h (target_ops): Change return type of detach to int.
15056 Add join.
15057 (join_inferior): New.
15058 * server.c (main): Don't skip detach support on mingw32.
15059 If the inferior doesn't support detaching return error.
15060 Call join_inferior instead of using waitpid.
15061 * linux-low.c (linux_join): New.
15062 (linux_target_op): Add linux_join.
15063 * spu-low.c (spu_join): New.
15064 (spu_target_ops): Add spu_join.
15065 * win32-low.c (win32_detach): Adapt to new interface.
15066 Reopen current_process_handle before detaching. Issue a child
15067 resume before detaching.
15068 (win32_join): New.
15069 (win32_target_op): Add win32_join.
15070
1d5315fe
PA
150712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15072
15073 * win32-low.c (win32-attach): Fix return value.
15074 * target.h (target_ops): Describe ATTACH return values.
15075
bf914831
PA
150762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15077
15078 * win32-low.c (GETPROCADDRESS): Define.
15079 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15080 (winapi_DebugSetProcessKillOnExit): Likewise.
15081 (win32_create_inferior): Force usage of ansi CreateProcessA.
15082 (win32_attach): Use GETPROCADDRESS.
15083 (win32_detach): Likewise.
15084
f72f3e60
PA
150852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15086
15087 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15088
ed50f18f
PA
150892007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15090
15091 * win32-low.c: Commit leftover changes from 2007-03-29.
15092
0c2ead7e
DJ
150932007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15094
15095 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15096 fields short instead of int. Add explicit padding.
15097 (i387_cache_to_fsave): Remove unnecessary casts.
15098 (i387_fsave_to_cache): Doc fix.
15099 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15100
73725ff3
DJ
151012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15104 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15105
d99f33d8
PA
151062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15107
15108 * configure.srv (arm*-*-mingw32ce*): Move near the other
15109 arm targets.
15110
68070c10
PA
151112007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15112
2482afc6 15113 * configure.ac: Add errno checking.
68070c10
PA
15114 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15115 sys/file.h and malloc.h.
15116 (AC_CHECK_DECLS): Add perror.
15117 (srv_mingwce): Handle.
2482afc6 15118 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15119 win32-i386-low.o to srv_tgtobj.
15120 (i[34567]86-*-mingw*): Likewise.
15121 (arm*-*-mingw32ce*): Add case.
15122 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15123 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15124 [__MINGW32CE__] (strerror): New function.
15125 [__MINGW32CE__] (errno): Define to GetLastError.
15126 [__MINGW32CE__] (COUNTOF): New macro.
15127 (remote_open): Remove extra close call.
15128 * mem-break.c (delete_breakpoint_at): New function.
15129 * mem-break.h (delete_breakpoint_at): Declare.
15130 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15131 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15132 [USE_WIN32API] (read, write): Add char* casts.
15133 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15134 * server.h: Include wincecompat.h on Windows CE.
15135 [HAVE_ERRNO_H]: Check.
15136 (perror): Declare if not declared.
15137 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15138 (perror_with_name): Remove errno declaration.
15139 * wincecompat.h: New.
15140 * wincecompat.c: New.
15141 * win32-low.h: New.
15142 * win32-arm-low.c: New.
15143 * win32-i386-low.c: New.
15144 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15145 (OUTMSG2): Make it safe.
15146 (_T): New macro.
15147 (COUNTOF): New macro.
15148 (NUM_REGS): Get it from the low target.
15149 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15150 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15151 (thread_rec): Let low target handle debug registers.
15152 (child_add_thread): Likewise.
15153 (child_init_thread_list): Likewise.
15154 (continue_one_thread): Likewise.
15155 (regptr): New.
15156 (do_child_fetch_inferior_registers): Move to ...
15157 * win32-i386-low.c: ... here, and rename to ...
15158 (do_fetch_inferior_registers): ... this.
889bf7c5 15159 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15160 Go through the low target.
15161 (do_child_store_inferior_registers): Use regptr.
15162 (strwinerror): New function.
15163 (win32_create_inferior): Handle Windows CE.
15164 Use strwinerror instead of strerror on Windows error
15165 codes. Add program to the error output.
15166 Don't close the main thread handle on Windows CE.
15167 (win32_attach): Use coredll.dll on Windows CE.
15168 (win32_kill): Close current process and current
15169 thread handles.
15170 (win32_detach): Use coredll.dll on Windows CE.
15171 (win32_resume): Let low target handle debug registers, and
15172 step request.
15173 (handle_exception): Add/Remove initial breakpoint. Avoid
15174 non-existant WSTOPSIG on Windows CE.
15175 (win32_read_inferior_memory): Cast to remove warning.
15176 (win32_arch_string): Go through the low target.
15177 (initialize_low): Call set_breakpoint_data with the low
15178 target's breakpoint.
15179 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15180 FOP_REGNUM, mappings): Move to ...
15181 * win32-i386-low.c: ... here.
15182 * win32-low.c (win32_thread_info): Move to ...
15183 * win32-low.h: ... here.
15184 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15185 win32-arm-low.c and wincecompat.c.
15186 (all:): Add $EXEEXT.
15187 (install-only:): Likewise.
15188 (gdbserver:): Likewise.
15189 (gdbreplay:): Likewise.
15190 * config.in: Regenerate.
15191 * configure: Regenerate.
15192
41093d81
PA
151932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15194
15195 * win32-low.c: Rename typedef thread_info to
15196 win32_thread_info throughout.
15197
544afa54
PA
151982007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * win32-i386-low.c: Rename to ...
15201 * win32-low.c: ... this.
15202 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15203 * Makefile.in: Likewise.
15204
bce7165d
PA
152052007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15206
15207 * remote-utils.c (monitor_output): Constify msg parameter.
15208 * server.h (monitor_output): Likewise.
15209 * win32-i386-low.c (handle_output_debug_string): New.
15210 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15211 handle_output_debug_string.
15212 (get_child_debug_event): Likewise.
15213
506c7aa0
DJ
152142007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15215
15216 * server.c (main): Correct strtoul check.
15217
42c81e2a
DJ
152182007-03-27 Jon Ringle <jon@ringle.org>
15219
15220 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15221
9453113a
DJ
152222007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15223
15224 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15225
64a69107
DJ
152262007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15227
15228 * terminal.h: Check HAVE_SGTTY_H.
15229
152302007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15231
15232 * remote-utils.c (remote_open): Print out the assigned port number.
15233
c74d0ad8
DJ
152342007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * remote-utils.c (monitor_output): New function.
15237 * server.c (debug_threads): Define here.
15238 (monitor_show_help): New function.
15239 (handle_query): Handle qRcmd.
15240 (main): Do not handle 'd' packet.
15241 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15242 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15243 of debug_threads.
15244
de7c3b4a
PA
152452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15246
15247 * Makefile.in (EXEEXT): New.
15248 (clean): Use $(EXEEXT).
15249
ef57601b
PA
152502007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15251
15252 * target.h (target_ops): Rename send_signal to request_interrupt,
15253 and remove enum target_signal parameter.
15254 * linux-low.c (linux_request_interrupt): Rename from
15255 linux_send_signal, and always send SIGINT.
15256 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15257 and always send SIGINT.
15258 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15259 of send_signal.
15260 (input_interrupt): Likewise.
15261
820f2bda
PA
152622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15263
15264 * server.c (get_features_xml): Check if target implemented
15265 arch_string.
15266 * win32-i386-low.c (win32_arch_string): New.
15267 (win32_target_ops): Add win32_arch_string as arch_string member.
15268
ab39bf24
UW
152692007-02-22 Markus Deuling <deuling@de.ibm.com>
15270
15271 * spu-low.c (spu_arch_string): New.
15272 (spu_target_ops): Add spu_arch_string.
15273
61ff6e04
DJ
152742007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15275
15276 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15277 * configure.ac: Do not check for terminal.h.
15278 * configure, config.in: Regenerated.
15279
fb1e4ffc
DJ
152802007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * Makefile.in (OBS): Add $(XML_BUILTIN).
15283 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15284 (clean): Update.
15285 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15286 (arm-with-iwmmxt.c): New.
15287 * config.in, configure: Regenerate.
15288 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15289 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15290 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15291 (arm*-*-linux*): Add iWMMXt and regset support.
15292 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15293 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15294 (arm_store_wmmxregset, target_regsets): New.
15295 * server.c (get_features_xml): Take annex argument. Check builtin
15296 XML documents.
15297 (handle_query): Handle multiple annexes.
15298
0f48aa01
DJ
152992007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15300
15301 * remote-utils.c [USE_WIN32API] (read, write): Define.
15302 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15303 write.
15304
23181151
DJ
153052007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15306
15307 * linux-i386-low.c (the_low_target): Set arch_string.
15308 * linux-x86-64-low.c (the_low_target): Likewise.
15309 * linux-low.c (linux_arch_string): New.
15310 (linux_target_ops): Add it.
15311 * linux-low.h (struct linux_target_ops): Add arch_string.
15312 * server.c (write_qxfer_response): Use const void * for DATA.
15313 (get_features_xml): New.
15314 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15315 * target.h (struct target_ops): Add arch_string method.
15316
9d606399
DJ
153172007-01-03 Denis Pilat <denis.pilat@st.com>
15318 Daniel Jacobowitz <dan@codesourcery.com>
15319
15320 * linux-low.c (linux_kill): Handle being called with no threads.
15321 * win32-i386-low.c (win32_kill): Likewise.
15322 (get_child_debug_event): Clear current_process_handle.
15323
153242006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15325 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * remote-utils.c (remote_open): Check the type of specified
15328 serial port devices before opening them.
15329 * server.c (main): Kill the inferior if an error occurs during
15330 the first remote_open.
15331
a5e13d24
DJ
153322006-12-05 Markus Deuling <deuling@de.ibm.com>
15333
15334 * README: Update supported targets.
15335
186947f7
DJ
153362006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15337
15338 * Makefile.in (clean): Remove reg-mips64.c.
15339 (reg-mips64.c, reg-mips64.o): New rules.
15340 * configure.srv: Handle mips64. Include regset support for mips.
15341 * linux-mips-low.c (union mips_register): New.
15342 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15343 (mips_breakpoint, mips_breakpoint_at): Use int.
15344 (mips_collect_register, mips_supply_register)
15345 (mips_collect_register_32bit, mips_supply_register_32bit)
15346 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15347 (mips_store_fpregset, target_regsets): New.
15348 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15349
a13e2c95
UW
153502006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15351
15352 * configure.srv: Add target "spu*-*-*".
15353 * Makefile.in (clean): Remove reg-spu.c.
15354 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15355 * spu-low.c: New file.
15356
cb7283db
DJ
153572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15358
15359 * configure.ac: Correct td_thr_tls_get_addr test.
15360 * configure: Regenerated.
15361
89be2091
DJ
153622006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * linux-low.c (linux_wait_for_event): Reformat. Use the
15365 pass_signals array.
15366 * remote-utils.c (decode_address_to_semicolon): New.
15367 * server.c (pass_signals, handle_general_set): New.
15368 (handle_query): Mention QPassSignals for qSupported.
15369 (main): Call handle_general_set.
15370 * server.h (pass_signals, decode_address_to_semicolon): New.
15371
000ef4f0
DJ
153722006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15373
15374 * server.c (handle_query): Correct error handling for read_auxv.
15375
b7149293
UW
153762005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15377
15378 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15379 and srv_linux_thread_db to yes.
15380 * linux-s390-low.c (s390_fill_gregset): New function.
15381 (target_regsets): Define data structure.
15382
dae5f5cf
DJ
153832006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15384
15385 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15386 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15387 * config.in, configure: Regenerated.
15388 * inferiors.c (gdb_id_to_thread): New function.
15389 (gdb_id_to_thread_id): Use it.
15390 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15391 * linux-low.h (struct process_info): Add th member.
15392 (thread_db_get_tls_address): New prototype.
15393 * remote-utils.c (decode_address): Make non-static.
15394 * server.c (handle_query): Handle qGetTLSAddr.
15395 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15396 * target.h (struct target_ops): Add get_tls_address.
15397 * thread-db.c (maybe_attach_thread): Save the thread handle.
15398 (thread_db_get_tls_address): New.
15399
32ca6d61
DJ
154002006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15403 (linux_resume_one_process): Take a siginfo_t *. Update all
15404 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15405 (struct pending_signals): Add a siginfo_t.
15406 (linux_wait_for_process): Always set last_status.
15407 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15408 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15409 * linux-low.h (struct process_info): Add last_status.
15410
5ffff7c1
DJ
154112006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15412
15413 * remote-utils.c (try_rle): New function.
15414 (putpkt_binary): Use it.
15415
8695c747
DJ
154162006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15419 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15420 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15421 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15422 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15423 point registers.
15424
290fadea
RS
154252006-08-08 Richard Sandiford <richard@codesourcery.com>
15426
15427 * server.c (terminal_fd): New variable.
15428 (old_foreground_pgrp): Likewise.
15429 (restore_old_foreground_pgrp): New function.
15430 (start_inferior): Record the terminal file descriptor in terminal_fd
15431 and its original foreground group in old_foreground_pgrp. Register
15432 restore_old_foreground_pgrp with atexit().
15433
9f2e1e63
DJ
154342006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15435
15436 * server.c (handle_query): Correct qPart to qXfer.
15437
b80864fb
DJ
154382006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15439
15440 * configure.ac: Check for more headers which are missing on
15441 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15442 * configure.srv: Add Cygwin and mingw32.
15443 * remote-utils.c: Don't include headers unconditionally which
15444 are missing on mingw32. Include <winsock.h> for mingw32.
15445 (remote_open): Adjust for mingw32 support. Flush
15446 standard error after writing to it.
15447 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15448 (unblock_async_io, enable_async_io, disable_async_io)
15449 (readchar, getpkt): Update for Winsock support.
15450 (prepare_resume_reply): Expect a protocol signal number.
15451 * server.c: Disable <sys/wait.h> on mingw32.
15452 (start_inferior): Adjust for mingw32 support. Flush
15453 standard error after writing to it.
15454 (attach_inferior): Likewise. Use protocol signal
15455 numbers.
15456 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15457 and names.
15458 * win32-i386-low.c: New file.
15459 * Makefile.in (XM_CLIBS): Set.
15460 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15461 (win32-i386-low.o): New dependency rule.
15462 * linux-low.c (linux_wait): Use target signal numbers.
15463 * target.h (struct target_ops): Doc fix.
15464 * server.h (target_signal_to_name): New prototype.
15465 * gdbreplay.c: Don't include headers unconditionally which
15466 are missing on mingw32. Include <winsock.h> for mingw32.
15467 (remote_close, remote_open): Adjust for Winsock support.
15468 * configure, config.in: Regenerated.
15469
0876f84a
DJ
154702006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * server.c (decode_xfer_read, write_qxfer_response): New.
15473 (handle_query): Take a packet length argument. Handle
15474 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15475 the qSupported response.
15476 (main): Update call to handle_query.
15477
01f9e8fa
DJ
154782006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15481 (putpkt_binary): Renamed from putpkt and adjusted for binary
15482 data.
15483 (putpkt): New wrapper for putpkt_binary.
15484 (readchar): Don't mask off the high bit.
15485 (decode_X_packet): New function.
15486 * server.c (main): Call putpkt_binary if a handler sets the packet
15487 length. Save the length of the incoming packet. Handle 'X'.
15488 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15489
be2a5f71
DJ
154902006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15491
15492 * server.c (handle_query): Handle qSupported.
15493
ea025f5f
DJ
154942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * remote-utils.c (all_symbols_looked_up): New variable.
15497 (look_up_one_symbol): Check it.
15498 * server.h (look_up_one_symbol): New declaration.
15499 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15500
9308fc88
DJ
155012006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15504 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15505 (PTRACE_GET_THREAD_AREA): Define.
15506 (ps_get_thread_area): New function.
15507
52fb6437
NS
155082006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15509
15510 * configure.srv (m68k*-*-uclinux*): New target.
15511 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15512 (linux_resume_one_process): Remove extraneous cast.
15513 (linux_read_offsets): New.
15514 (linux_target_op): Add linux_read_offsets on mmuless systems.
15515 * server.c (handle_query): Add qOffsets logic.
15516 * target.h (struct target_ops): Add read_offsets.
15517
21b0f40c
DJ
155182006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15519
15520 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15521 (PTRACE_GET_THREAD_AREA): Define.
15522 (ps_get_thread_area): New function.
15523 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15524 (linux-x86-64-low.o): Update.
15525
0050a760
DJ
155262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15527
15528 * configure.ac: Remove checks for prfpregset_t.
15529 * gdb_proc_service.h: New file.
15530 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15531 new "gdb_proc_service.h".
15532 * proc-service.c: Likewise.
15533 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15534 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15535 * Makefile.in (gdb_proc_service_h): Updated.
15536 * configure, config.in: Regenerated.
15537
b92a518e
DJ
155382006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15539
15540 * remote-utils.c (prepare_resume_reply): Move declaration
15541 of gdb_id_from_wait to the top of the block.
15542
545587ee
DJ
155432006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15544
15545 * linux-low.c (regsets_store_inferior_registers): Read the regset
15546 from the target before filling it.
15547
9db87ebd
DJ
155482006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15549
15550 * server.c (attach_inferior): Return SIGTRAP for a successful
15551 attach.
15552
dd24457d
DJ
155532006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15554
15555 * Makefile.in (OBS): Add version.o.
15556 (STAGESTUFF): Delete.
15557 (version.o): Add dependencies.
15558 (version.c): Replace rule.
15559 (clean): Remove version.c.
15560 * server.c (gdbserver_version): New.
15561 (gdbserver_usage): Use printf.
15562 (main): Handle --version and --help.
15563 * server.h (version, host_name): Add declarations.
15564
6f0f660e
EZ
155652005-12-23 Eli Zaretskii <eliz@gnu.org>
15566
889bf7c5
PA
15567 * linux-arm-low.c:
15568 * linux-arm-low.c:
15569 * inferiors.c:
15570 * i387-fp.h:
15571 * i387-fp.c:
15572 * gdbreplay.c:
15573 * regcache.c:
15574 * proc-service.c:
15575 * mem-break.h:
15576 * mem-break.c:
15577 * linux-x86-64-low.c:
15578 * linux-sh-low.c:
15579 * linux-s390-low.c:
15580 * linux-ppc64-low.c:
15581 * linux-ppc-low.c:
15582 * linux-mips-low.c:
15583 * linux-m68k-low.c:
15584 * linux-m32r-low.c:
15585 * linux-low.h:
15586 * linux-low.c:
15587 * linux-ia64-low.c:
15588 * linux-i386-low.c:
15589 * linux-crisv32-low.c:
15590 * thread-db.c:
15591 * terminal.h:
15592 * target.h:
15593 * target.c:
15594 * server.h:
15595 * server.c:
15596 * remote-utils.c:
15597 * regcache.h:
15598 * utils.c:
15599 * Makefile.in:
15600 * configure.ac:
6f0f660e
EZ
15601 * gdbserver.1: Add (C) after Copyright. Update the FSF
15602 address.
15603
9d1fb177
DJ
156042005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15605
15606 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15607 (arm_breakpoint_at): Recognize both breakpoints.
15608 (the_low_target): Use the correct breakpoint instruction.
15609
011a70c2
DJ
156102005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15611
15612 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15613 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15614 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15615 (the_low_target): Update.
15616
7fb85e41
AS
156172005-10-25 Andreas Schwab <schwab@suse.de>
15618
15619 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15620
15621 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15622 (ia64_num_regs): Reduce to 462.
15623
3db0444b
DJ
156242005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * acinclude.m4: Correct quoting.
15627 * aclocal.m4: Regenerated.
15628
15629 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15630 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15631 (thread_db_init): Call thread_db_err_str.
15632 * configure.ac: Check for TD_VERSION.
15633 * config.in, configure: Regenerated.
15634
bee0189a
DJ
156352005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15636
15637 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15638
e9d25b98
DJ
156392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15640
15641 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15642 is not available. Define HAVE_PTRACE_GETREGS if it is.
15643 * config.in, configure: Regenerated.
15644 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15645 * linux-i386-low.c, linux-m68k-low.c: Update to use
15646 HAVE_PTRACE_GETREGS.
15647 * linux-low.c (regsets_fetch_inferior_registers)
15648 (regsets_store_inferior_registers): Only return 0 if we processed
15649 GENERAL_REGS.
15650 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15651 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15652
a06660f7
DJ
156532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15654
15655 * inferiors.c (struct thread_info): Add gdb_id.
15656 (add_thread): Add gdb_id argument.
15657 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15658 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15659 calls to add_thread.
15660 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15661 * server.c (handle_query): Use thread_to_gdb_id.
15662 (handle_v_cont, main): Use gdb_id_to_thread_id.
15663 * server.h (add_thread): Update prototype.
15664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15665 prototypes.
15666
5a1f5858
DJ
156672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15668
15669 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15670 left-padded registers.
15671 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15672 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15673
e122f1f5
SE
156742005-07-01 Steve Ellcey <sje@cup.hp.com>
15675
15676 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15677 * configure: Regenerate.
15678 * config.in: Regenerate.
15679 * server.h (NEED_DECLARATION_STRERROR):
15680 Replace with !HAVE_DECL_STRERROR.
15681
d592fa2f
DJ
156822005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15683
15684 * linux-low.c (linux_wait, linux_send_signal): Don't test
15685 an unsigned long variable for > 0 if it could be MAX_ULONG.
15686 * server.c (myresume): Likewise.
15687 * target.c (set_desired_inferior): Likewise.
15688
ccbd4912
MK
156892005-06-13 Mark Kettenis <kettenis@gnu.org>
15690
15691 * configure.ac: Simplify and improve check for socklen_t.
15692 * configure, config.in: Regenerate.
15693
f450004a
DJ
156942005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15695
15696 * acconfig.h: Remove.
15697 * configure.ac: Add a test for socklen_t. Use three-argument
15698 AC_DEFINE throughout.
15699 * config.in: Regenerated using autoheader 2.59.
15700 * configure: Regenerated.
15701
15702 * gdbreplay.c (socklen_t): Provide a default.
15703 (remote_open): Use socklen_t.
15704 * remote-utils.c (socklen_t): Provide a default.
15705 (remote_open): Use socklen_t.
15706 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15707 unsigned char.
15708
15709 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15710 char for buffers.
15711 * linux-low.c (linux_read_memory, linux_write_memory)
15712 (linux_read_auxv): Likewise.
15713 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15714 (check_mem_write): Likewise.
15715 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15716 Likewise.
15717 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15718 (registers_from_string, register_data): Likewise.
15719 * server.c (handle_query, main): Likewise.
15720 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15721 (decode_M_packet): Likewise.
15722 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15723 * target.h (struct target_ops): Update read_memory, write_memory,
15724 and read_auxv.
15725 (read_inferior_memory, write_inferior_memory): Update.
15726 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15727 to unsigned char *.
15728 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15729 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15730 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15731 linux-s390-low.c, linux-sh-low.c: Update for changes in
15732 read_inferior_memory and the_low_target->breakpoint.
15733
eee84df1
DJ
157342005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15737 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15738 * configure.srv: Add powerpc64-*-linux*.
15739 * linux-ppc64-low.c: New file.
15740
45b134e5
OF
157412005-05-23 Orjan Friberg <orjanf@axis.com>
15742
15743 * linux-cris-low.c: New file with support for CRIS.
15744 * linux-crisv32-low.c: Ditto for CRISv32.
15745 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15746 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15747 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15748 reg-crisv32.o, and reg-crisv32.c to make rules.
15749 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15750 recognized targets.
15751
48d93c75
UW
157522005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15753
15754 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15755 of sizeof (PTRACE_XFER_TYPE).
15756 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15757
e013ee27
OF
157582005-05-12 Orjan Friberg <orjanf@axis.com>
15759
889bf7c5 15760 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15761 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15762 pointers for hardware watchpoint support.
15763 * linux-low.h (struct linux_target_ops): Ditto.
15764 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15765 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15766 to linux_target_ops.
15767 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15768 reply packet.
15769 * server.c (main): Recognize 'Z' and 'z' packets.
15770
b0ded00b
UW
157712005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15772
15773 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15774 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15775 (the_low_target): Add new members.
15776
8643e2ad
DJ
157772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15778
15779 * proc-service.c (ps_lgetregs): Search all_processes instead of
15780 all_threads.
15781
fc620387
DJ
157822005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15783
15784 * server.c (start_inferior): Change return type to int.
15785 (attach_inferior): Change sigptr to int *.
15786 (handle_v_cont, handle_v_requests): Change signal to int *.
15787 (main): Change signal to int.
15788
157892005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15790
15791 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15792 * configure.srv: Add m32r*-*-linux*.
15793 * linux-m32r-low.c: New file.
15794
e0e76420
DJ
157952005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15796
15797 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15798
a1928bad
DJ
157992005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15800
15801 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15802 Take unsigned long arguments for PIDs.
15803 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15804 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15805 (wait_for_sigstop, linux_resume_one_process)
15806 (regsets_fetch_inferior_registers, linux_send_signal)
15807 (linux_read_auxv): Likewise. Update the types of variables holding
15808 PIDs. Update format string specifiers.
15809 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15810 * remote-utils.c (prepare_resume_reply): Likewise.
15811 * server.c (cont_thread, general_thread, step_thread)
15812 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15813 unsigned long.
15814 (handle_query): Update format specifiers.
15815 (handle_v_cont, main): Use strtoul for thread IDs.
15816 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15817 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15818 (general_thread, step_thread, thread_from_wait)
15819 (old_thread_from_wait): Update.
15820 * target.h (struct thread_resume): Use unsigned long for THREAD.
15821 (struct target_ops): Use unsigned long for arguments to attach and
15822 thread_alive.
15823
dcdb98d2
DJ
158242005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15825
15826 * acinclude.m4: Include bfd/bfd.m4 directly.
15827 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15828 <agriffis@toolchain.org>.
15829 * aclocal.m4, configure: Regenerated.
15830
bec39cab
AC
158312005-01-07 Andrew Cagney <cagney@gnu.org>
15832
15833 * configure.ac: Rename configure.in, require autoconf 2.59.
15834 * configure: Re-generate.
15835
434c4c77
DJ
158362004-12-08 Daniel Jacobowitz <dan@debian.org>
15837
15838 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15839 LIBS when finished.
15840 * aclocal.m4: Regenerated.
15841 * configure: Regenerated.
15842
db1d3e1b
AS
158432004-11-21 Andreas Schwab <schwab@suse.de>
15844
15845 * linux-m68k-low.c (m68k_num_gregs): Define.
15846 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15847 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15848 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15849 (m68k_breakpoint_at): New. Add to the_low_target.
15850
15851 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15852 srv_linux_thread_db to yes.
15853
43360365
JB
158542004-10-20 Joel Brobecker <brobecker@gnat.com>
15855
15856 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15857 (ARCH_SET_FS): Likewise.
15858 (ARCH_GET_FS): Likewise.
15859 (ARCH_GET_GS): Likewise.
15860
fd500816
DJ
158612004-10-16 Daniel Jacobowitz <dan@debian.org>
15862
15863 * linux-i386-low.c (ps_get_thread_area): New.
15864 * linux-x86-64-low.c (ps_get_thread_area): New.
15865 * linux-low.c: Include <sys/syscall.h>.
15866 (linux_kill_one_process): Don't kill the first thread here.
15867 (linux_kill): Kill the first thread here.
15868 (kill_lwp): New function.
15869 (send_sigstop, linux_send_signal): Use it.
15870 * proc-service.c: Clean up #ifdefs.
15871 (fpregset_info): Delete.
15872 (ps_lgetregs): Update and enable implementation.
15873 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15874 implementations.
15875 * remote-utils.c (struct sym_cache, symbol_cache): New.
15876 (input_interrupt): Print a clearer message.
15877 (async_io_enabled): New variable.
15878 (enable_async_io, disable_async_io): Use it. Update comments.
15879 (look_up_one_symbol): Use the symbol cache.
15880 * thread-db.c (thread_db_look_up_symbols): New function.
15881 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15882
f6de3c42
DJ
158832004-10-16 Daniel Jacobowitz <dan@debian.org>
15884
15885 * configure.in: Test for -rdynamic.
15886 * configure: Regenerated.
15887 * Makefile (INTERNAL_LDFLAGS): New.
15888 (gdbserver, gdbreplay): Use it.
15889
2c0fc042
AC
158902004-09-02 Andrew Cagney <cagney@gnu.org>
15891
15892 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15893
075b3282
DJ
158942004-03-23 Daniel Jacobowitz <drow@mvista.com>
15895
15896 * linux-low.c (linux_wait): Clear all_processes list also.
15897
fa6a77dc
DJ
158982004-03-12 Daniel Jacobowitz <drow@mvista.com>
15899
15900 * linux-low.c: Include <errno.h>. Remove extern declaration of
15901 errno.
15902
6d782a97
DJ
159032004-03-12 Daniel Jacobowitz <drow@mvista.com>
15904
15905 * gdbreplay.c, server.h, utils.c: Update copyright years.
15906
3a7fb99b
DJ
159072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15908
15909 * server.c (main): Print child status or termination signal from
15910 variable 'signal', not 'sig'.
15911
c3e735a6
DJ
159122004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15913
15914 * linux-low.c (linux_read_memory): Change return type to
15915 int. Check for and return error from ptrace().
15916 * target.c (read_inferior_memory): Change return type to int. Pass
15917 back return status from the_target->read_memory().
15918 * target.h (struct target_ops): Adapt *read_memory() prototype.
15919 Update comment.
15920 (read_inferior_memory): Adapt prototype.
15921 * server.c (main): Return an error packet if
15922 read_inferior_memory() returns an error.
15923
a59d1c82
DJ
159242004-03-04 Daniel Jacobowitz <drow@mvista.com>
15925
15926 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15927 Unify with other clean targets.
15928
dc3f8883
DJ
159292004-02-29 Daniel Jacobowitz <drow@mvista.com>
15930
15931 * server.c (handle_v_cont): Call set_desired_inferior.
15932
89a208da
DJ
159332004-02-29 Daniel Jacobowitz <drow@mvista.com>
15934
15935 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15936
62ea82f5
DJ
159372004-02-29 Daniel Jacobowitz <drow@mvista.com>
15938
15939 * linux-low.c (linux_wait): Unblock async I/O.
15940 (linux_resume): Block and enable async I/O.
15941 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15942 * server.h (block_async_io, unblock_async_io): Add prototypes.
15943
6910d122
DJ
159442004-02-29 Daniel Jacobowitz <drow@mvista.com>
15945
15946 * remote-utils.c (remote_open): Print a status notice after
15947 opening a TCP port.
15948 * server.c (attach_inferior): Print a status notice after
15949 attaching.
15950
159512004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15952
15953 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15954
c89dc5d4
DJ
159552004-02-26 Daniel Jacobowitz <drow@mvista.com>
15956
15957 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15958 error packet.
15959 * server.c, target.h: Update copyright years.
15960
4b8dad4a
RM
159612004-02-25 Roland McGrath <roland@redhat.com>
15962
15963 * target.h (struct target_ops): New member `read_auxv'.
15964 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15965 * linux-low.c (linux_read_auxv): New function.
15966 (linux_target_ops): Initialize `read_auxv' member to that.
15967
d7446758
JB
159682004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15969
15970 Committed by Jim Blandy <jimb@redhat.com>.
15971
15972 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15973 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15974 instead of GPR_SIZE to distiguish s390 and s390x targets.
15975
5544ad89
DJ
159762004-01-31 Daniel Jacobowitz <drow@mvista.com>
15977
15978 * linux-low.c: Update copyright year.
15979 (check_removed_breakpoint): Clear pending_is_breakpoint.
15980 (linux_set_resume_request, linux_queue_one_thread)
15981 (resume_status_pending_p): New functions.
15982 (linux_continue_one_thread): Use process->resume.
15983 (linux_resume): Only resume threads if there are no pending events.
15984 * linux-low.h (struct process_info): Add resume request
15985 pointer.
15986
2a68b70e
DJ
159872004-01-30 Daniel Jacobowitz <drow@mvista.com>
15988
15989 * regcache.c (new_register_cache): Clear the allocated register
15990 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15991
64386c31
DJ
159922003-10-13 Daniel Jacobowitz <drow@mvista.com>
15993
15994 * linux-low.c (linux_resume): Take a struct thread_resume *
15995 argument.
15996 (linux_wait): Update call.
15997 (resume_ptr): New static variable.
15998 (linux_continue_one_thread): Renamed from
15999 linux_continue_one_process. Use resume_ptr.
16000 (linux_resume): Use linux_continue_one_thread.
16001 * server.c (handle_v_cont, handle_v_requests): New functions.
16002 (myresume): New function.
16003 (main): Handle 'v' case.
16004 * target.h (struct thread_resume): New type.
16005 (struct target_ops): Change argument of "resume" to struct
16006 thread_resume *.
16007 (myresume): Delete macro.
16008
c938e9b0
L
160092003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16010
16011 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16012 (uninstall): Support DESTDIR.
16013
7f313d07
BC
16014Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16015
16016 * configure.srv: Add xscale*linux copy of arm*linux entry.
16017
3b2fc2ea
DJ
160182003-07-24 Daniel Jacobowitz <drow@mvista.com>
16019
16020 * linux-arm-low.c (arm_reinsert_addr): New function.
16021 (the_low_target): Add arm_reinsert_addr.
16022
1c0a559e
MK
160232003-07-08 Mark Kettenis <kettenis@gnu.org>
16024
16025 * mem-break.c: Remove whitespace at end of file.
16026
43d5792c
DJ
160272003-06-28 Daniel Jacobowitz <drow@mvista.com>
16028
16029 * configure.in: Check whether we need to prototype strerror.
16030 * server.h: Optionally prototype strerror.
16031 * gdbreplay.c (perror_with_name): Use strerror.
16032 * linux-low.c (linux_attach_lwp): Use strerror.
16033 * utils.c (perror_with_name): Use strerror.
16034 * config.in, configure: Regenerated.
16035
c8a86edf
DJ
160362003-06-28 Daniel Jacobowitz <drow@mvista.com>
16037
16038 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16039 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16040
73d37363
DJ
160412003-06-20 Daniel Jacobowitz <drow@mvista.com>
16042
16043 * Makefile.in (SFILES): Update.
16044 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16045 low-sun3.c: Remove files.
16046
6ad8ae5c
DJ
160472003-06-17 Daniel Jacobowitz <drow@mvista.com>
16048
16049 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16050 (linux_detach_one_process, linux_detach): New functions.
16051 (linux_target_ops): Add linux_detach.
16052 * server.c (main): Handle 'D' packet.
16053 * target.h (struct target_ops): Add "detach" member.
16054 (detach_inferior): Define.
16055
1581182a
MK
160562003-06-13 Mark Kettenis <kettenis@gnu.org>
16057
16058 From Kelley Cook <kelleycook@wideopenwest.com>:
16059 * configure.srv: Accept i[34567]86 variants.
16060
e5379b03
DJ
160612003-06-05 Daniel Jacobowitz <drow@mvista.com>
16062
16063 * linux-low.c (linux_wait_for_event): Correct comment typos.
16064 (linux_resume_one_process): Call check_removed_breakpoint.
16065 (linux_send_signal): New function.
16066 (linux_target_ops): Add linux_send_signal.
16067 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16068 of kill.
16069 * target.h (struct target_ops): Add send_signal.
16070
2ff29de4
JB
160712003-05-29 Jim Blandy <jimb@redhat.com>
16072
16073 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16074 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16075 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16076 away part of the register's value.
16077
254787d4
DJ
160782003-03-26 Daniel Jacobowitz <drow@mvista.com>
16079
16080 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16081 (linux_wait_for_event, linux_init_signals): Likewise.
16082
94e10508
DJ
160832003-03-17 Daniel Jacobowitz <drow@mvista.com>
16084
16085 * configure.in: Check for stdlib.h.
16086 * configure: Regenerated.
16087 * config.in: Regenerated.
16088
4c0711e0
DJ
160892003-01-04 Andreas Schwab <schwab@suse.de>
16090
16091 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16092
ef66e766
AC
160932003-01-02 Andrew Cagney <ac131313@redhat.com>
16094
16095 * Makefile.in: Remove obsolete code.
16096
a1358604
DJ
160972002-11-20 Daniel Jacobowitz <drow@mvista.com>
16098
16099 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16100 defined(PT_FPR0_HI).
16101
23ce3b1c
DJ
161022002-11-17 Stuart Hughes <seh@zee2.com>
16103
16104 * linux-arm-low.c (arm_num_regs): Increase.
16105 (arm_regmap): Include status register.
16106
161072002-11-17 Daniel Jacobowitz <drow@mvista.com>
16108
16109 * linux-low.c (register_addr): Remove incorrect -1 check.
16110
a9fa9f7d
DJ
161112002-08-29 Daniel Jacobowitz <drow@mvista.com>
16112
16113 * linux-low.c (linux_create_inferior): Call setpgid. Return
16114 the new PID.
16115 (unstopped_p, linux_signal_pid): Remove.
16116 (linux_target_ops): Remove linux_signal_pid.
16117 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16118 global instead of target method.
16119 * target.h (struct target_ops): Remove signal_pid. Update comment
16120 for create_inferior.
16121 * server.c (signal_pid): New variable.
16122 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16123 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16124 (attach_inferior): Set signal_pid.
16125
17574093
DJ
161262002-08-23 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16129
161302002-08-20 Jim Blandy <jimb@redhat.com>
16131
16132 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16133 default for this.
16134
161352002-08-01 Andrew Cagney <cagney@redhat.com>
16136
16137 * Makefile.in: Make chill references obsolete.
16138
161392002-07-24 Kevin Buettner <kevinb@redhat.com>
16140
16141 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16142 * configure: Regenerate.
16143 * config.in: Regenerate.
16144
161452002-07-09 David O'Brien <obrien@FreeBSD.org>
16146
16147 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16148 (perror_with_name, remote_close, remote_open, expect, play): Static.
16149
161502002-07-04 Michal Ludvig <mludvig@suse.cz>
16151
4b8dad4a 16152 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16153 byte offsets instead of an array of indexes.
16154 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16155
161562002-06-13 Daniel Jacobowitz <drow@mvista.com>
16157
16158 * regcache.c: Add comment.
16159
161602002-06-11 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * thread-db.c: New file.
16163 * proc-service.c: New file.
16164 * acinclude.m4: New file.
16165 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16166 proc-service.o, and thread-db.o.
16167 (linux-low.o): Add USE_THREAD_DB.
16168 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16169 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16170 * aclocal.m4: Regenerated.
16171 * config.in: Regenerated.
16172 * configure: Regenerated.
16173 * configure.in: Check for proc_service.h, sys/procfs.h,
16174 thread_db.h, and linux/elf.h headrs.
16175 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16176 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16177 Check for -lthread_db and thread support.
16178 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16179 PowerPC, and SuperH.
16180 * i387-fp.c: Constify arguments.
16181 * i387-fp.h: Likewise.
16182 * inferiors.c: (struct thread_info): Renamed from
16183 `struct inferior_info'. Remove PID member. Use generic inferior
16184 list header. All uses updated.
16185 (inferiors, signal_pid): Removed.
16186 (all_threads): New variable.
16187 (get_thread): Define.
16188 (add_inferior_to_list): New function.
16189 (for_each_inferior): New function.
16190 (change_inferior_id): New function.
16191 (add_inferior): Removed.
16192 (remove_inferior): New function.
16193 (add_thread): New function.
16194 (free_one_thread): New function.
16195 (remove_thread): New function.
16196 (clear_inferiors): Use for_each_inferior and free_one_thread.
16197 (find_inferior): New function.
16198 (find_inferior_id): New function.
16199 (inferior_target_data): Update argument type.
16200 (set_inferior_target_data): Likewise.
16201 (inferior_regcache_data): Likewise.
16202 (set_inferior_regcache_data): Likewise.
16203 * linux-low.c (linux_bp_reinsert): Remove.
16204 (all_processes, stopping_threads, using_thrads)
16205 (struct pending_signals, debug_threads, pid_of): New.
16206 (inferior_pid): Replace with macro.
16207 (struct inferior_linux_data): Remove.
16208 (get_stop_pc, add_process): New functions.
16209 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16210 Use add_process and add_thread.
16211 (linux_attach_lwp): New function, based on old linux_attach. Use
16212 add_process and add_thread. Set stop_expected for new threads.
16213 (linux_attach): New function.
16214 (linux_kill_one_process): New function.
16215 (linux_kill): Kill all LWPs.
16216 (linux_thread_alive): Use find_inferior_id.
16217 (check_removed_breakpoints, status_pending_p): New functions.
16218 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16219 Update. Use WNOHANG. Wait for cloned processes also. Update process
16220 struct for the found process.
16221 (linux_wait_for_event): New function.
16222 (linux_wait): Use it. Support LWPs.
16223 (send_sigstop, wait_for_sigstop, stop_all_processes)
16224 (linux_resume_one_process, linux_continue_one_process): New functions.
16225 (linux_resume): Support LWPs.
16226 (REGISTER_RAW_SIZE): Remove.
16227 (fetch_register): Use register_size instead. Call supply_register.
16228 (usr_store_inferior_registers): Likewise. Call collect_register.
16229 Fix recursive case.
16230 (regsets_fetch_inferior_registers): Improve error message.
16231 (regsets_store_inferior_registers): Add debugging.
16232 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16233 (unstopped_p, linux_signal_pid): New functions.
16234 (linux_target_ops): Add linux_signal_pid.
16235 (linux_init_signals): New function.
16236 (initialize_low): Call it. Initialize using_threads.
16237 * regcache.c (inferior_regcache_data): Add valid
16238 flag.
16239 (get_regcache): Fetch registers lazily. Add fetch argument
16240 and update all callers.
16241 (regcache_invalidate_one, regcache_invalidate): New
16242 functions.
16243 (new_register_cache): Renamed from create_register_cache.
16244 Return the new regcache.
16245 (free_register_cache): Change argument to a void *.
16246 (registers_to_string, registers_from_string): Call get_regcache
16247 with fetch flag set.
16248 (register_data): Make static. Pass fetch flag to get_regcache.
16249 (supply_register): Call get_regcache with fetch flag clear.
16250 (collect_register): Call get_regcache with fetch flag set.
16251 (collect_register_as_string): New function.
16252 * regcache.h: Update.
16253 * remote-utils.c (putpkt): Flush after debug output and use
16254 stderr.
16255 Handle input interrupts while waiting for an ACK.
16256 (input_interrupt): Use signal_pid method.
16257 (getpkt): Flush after debug output and use stderr.
16258 (outreg): Use collect_register_as_string.
16259 (new_thread_notify, dead_thread_notify): New functions.
16260 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16261 and general_thread.
16262 (look_up_one_symbol): Flush after debug output.
16263 * server.c (step_thread, server_waiting): New variables.
16264 (start_inferior): Don't use signal_pid. Update call to mywait.
16265 (attach_inferior): Update call to mywait.
16266 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16267 (main): Don't fetch/store registers explicitly. Use
16268 set_desired_inferior. Support proposed ``Hs'' packet. Update
16269 calls to mywait.
16270 * server.h: Update.
16271 (struct inferior_list, struct_inferior_list_entry): New.
16272 * target.c (set_desired_inferior): New.
16273 (write_inferior_memory): Constify.
16274 (mywait): New function.
16275 * target.h: Update.
16276 (struct target_ops): New signal_pid method.
16277 (mywait): Removed macro, added prototype.
16278
16279 * linux-low.h (regset_func): Removed.
16280 (regset_fill_func, regset_store_func): New.
16281 (enum regset_type): New.
16282 (struct regset_info): Add type field. Use new operation types.
16283 (struct linux_target_ops): stop_pc renamed to get_pc.
16284 Add decr_pc_after_break and breakpoint_at.
16285 (get_process, get_thread_proess, get_process_thread)
16286 (strut process_info, all_processes, linux_attach_lwp)
16287 (thread_db_init): New.
16288
16289 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16290 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16291 (the_low_target): Add new members.
16292 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16293 (i386_store_fpxregset): Constify.
16294 (target_regsets): Add new kind identifier.
16295 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16296 (i386_set_pc): Add debugging.
16297 (i386_breakpoint_at): New function.
16298 (the_low_target): Add new members.
16299 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16300 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16301 (mips_breakpoint_at): New.
16302 (the_low_target): Add new members.
16303 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16304 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16305 (the_low_target): Add new members.
16306 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16307 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16308 (the_low_target): Add new members.
16309 * linux-x86-64-low.c (target_regsets): Add new kind
16310 identifier.
16311
163122002-05-15 Daniel Jacobowitz <drow@mvista.com>
16313
16314 From Martin Pool <mbp@samba.org>:
16315 * server.c (gdbserver_usage): New function.
16316 (main): Call it.
16317
163182002-05-14 Daniel Jacobowitz <drow@mvista.com>
16319
16320 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16321 stop_at -> stop_pc.
16322
163232002-05-04 Andrew Cagney <ac131313@redhat.com>
16324
16325 * Makefile.in: Remove obsolete code.
16326
163272002-04-24 Michal Ludvig <mludvig@suse.cz>
16328
16329 * linux-low.c (regsets_fetch_inferior_registers),
16330 (regsets_store_inferior_registers): Removed cast to int from
16331 ptrace() calls.
16332 * regcache.h: Added declaration of struct inferior_info.
16333
163342002-04-20 Daniel Jacobowitz <drow@mvista.com>
16335
16336 * inferiors.c (struct inferior_info): Add regcache_data.
16337 (add_inferior): Call create_register_cache.
16338 (clear_inferiors): Call free_register_cache.
16339 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16340 * regcache.c (struct inferior_regcache_data): New.
16341 (registers): Remove.
16342 (get_regcache): New function.
16343 (create_register_cache, free_register_cache): New functions.
16344 (set_register_cache): Don't initialize the register cache here.
16345 (registers_to_string, registers_from_string, register_data): Call
16346 get_regcache.
16347 * regcache.h: Add prototypes.
16348 * server.h: Likewise.
16349
163502002-04-20 Daniel Jacobowitz <drow@mvista.com>
16351
16352 * mem-break.c: New file.
16353 * mem-break.h: New file.
16354 * Makefile.in: Add mem-break.o rule; update server.h
16355 dependencies.
16356 * inferiors.c (struct inferior_info): Add target_data
16357 member.
16358 (clear_inferiors): Free target_data member if set.
16359 (inferior_target_data, set_inferior_target_data): New functions.
16360 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16361 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16362 * linux-low.c (linux_bp_reinsert): New variable.
16363 (struct inferior_linux_data): New.
16364 (linux_create_inferior): Use set_inferior_target_data.
16365 (linux_attach): Likewise. Call add_inferior.
16366 (linux_wait_for_one_inferior): New function.
16367 (linux_wait): Call it.
16368 (linux_write_memory): Add const.
16369 (initialize_low): Call set_breakpoint_data.
16370 * linux-low.h (struct linux_target_ops): Add breakpoint
16371 handling members.
16372 * server.c (attach_inferior): Remove extra add_inferior
16373 call.
16374 * server.h: Include mem-break.h. Update inferior.c
16375 prototypes.
16376 * target.c (read_inferior_memory)
16377 (write_inferior_memory): New functions.
16378 * target.h (read_inferior_memory)
16379 (write_inferior_memory): Change macros to prototypes.
16380 (struct target_ops): Update comments. Add const to write_memory
16381 definition.
16382
163832002-04-11 Daniel Jacobowitz <drow@mvista.com>
16384
16385 * linux-low.c (usr_store_inferior_registers): Support
16386 registers which are allowed to fail to store.
16387 * linux-low.h (linux_target_ops): Likewise.
16388 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16389 (ppc_cannot_store_register): FPSCR may not be storable.
16390
163912002-04-09 Daniel Jacobowitz <drow@mvista.com>
16392
16393 * server.h: Include <string.h> if HAVE_STRING_H.
16394 * ChangeLog: Correct paths in last ChangeLog entry.
16395
163962002-04-09 Daniel Jacobowitz <drow@mvista.com>
16397
16398 * linux-low.h: Remove obsolete prototypes.
16399 (struct linux_target_ops): New.
16400 (extern the_low_target): New.
16401 * linux-low.c (num_regs, regmap): Remove declarations.
16402 (register_addr): Use the_low_target explicitly.
16403 (fetch_register): Likewise.
16404 (usr_fetch_inferior_registers): Likewise.
16405 (usr_store_inferior_registers): Likewise.
16406 * linux-arm-low.c (num_regs): Remove.
16407 (arm_num_regs): Define.
16408 (arm_regmap): Renamed from regmap, made static.
16409 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16410 made static.
16411 (arm_cannot_store_register): Renamed from cannot_store_register,
16412 made static.
16413 (the_low_target): New.
16414 * linux-i386-low.c (num_regs): Remove.
16415 (i386_num_regs): Define.
16416 (i386_regmap): Renamed from regmap, made static.
16417 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16418 made static.
16419 (i386_cannot_store_register): Renamed from cannot_store_register,
16420 made static.
16421 (the_low_target): New.
16422 * linux-ia64-low.c (num_regs): Remove.
16423 (ia64_num_regs): Define.
16424 (ia64_regmap): Renamed from regmap, made static.
16425 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16426 made static.
16427 (ia64_cannot_store_register): Renamed from cannot_store_register,
16428 made static.
16429 (the_low_target): New.
16430 * linux-m68k-low.c (num_regs): Remove.
16431 (m68k_num_regs): Define.
16432 (m68k_regmap): Renamed from regmap, made static.
16433 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16434 made static.
16435 (m68k_cannot_store_register): Renamed from cannot_store_register,
16436 made static.
16437 (the_low_target): New.
16438 * linux-mips-low.c (num_regs): Remove.
16439 (mips_num_regs): Define.
16440 (mips_regmap): Renamed from regmap, made static.
16441 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16442 made static.
16443 (mips_cannot_store_register): Renamed from cannot_store_register,
16444 made static.
16445 (the_low_target): New.
16446 * linux-ppc-low.c (num_regs): Remove.
16447 (ppc_num_regs): Define.
16448 (ppc_regmap): Renamed from regmap, made static.
16449 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16450 made static.
16451 (ppc_cannot_store_register): Renamed from cannot_store_register,
16452 made static.
16453 (the_low_target): New.
16454 * linux-s390-low.c (num_regs): Remove.
16455 (s390_num_regs): Define.
16456 (s390_regmap): Renamed from regmap, made static.
16457 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16458 made static.
16459 (s390_cannot_store_register): Renamed from cannot_store_register,
16460 made static.
16461 (the_low_target): New.
16462 * linux-sh-low.c (num_regs): Remove.
16463 (sh_num_regs): Define.
16464 (sh_regmap): Renamed from regmap, made static.
16465 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16466 made static.
16467 (sh_cannot_store_register): Renamed from cannot_store_register,
16468 made static.
16469 (the_low_target): New.
16470 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16471 (the_low_target): New.
16472
164732002-04-09 Daniel Jacobowitz <drow@mvista.com>
16474
16475 * Makefile.in: Add stamp-h target.
16476 * configure.in: Create stamp-h.
16477 * configure: Regenerated.
16478
164792002-04-09 Daniel Jacobowitz <drow@mvista.com>
16480
16481 * inferiors.c: New file.
16482 * target.c: New file.
16483 * target.h: New file.
16484 * Makefile.in: Add target.o and inferiors.o. Update
16485 dependencies.
16486 * linux-low.c (inferior_pid): New static variable,
16487 moved from server.c.
16488 (linux_create_inferior): Renamed from create_inferior.
16489 Call add_inferior. Return 0 on success instead of a PID.
16490 (linux_attach): Renamed from myattach.
16491 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16492 (linux_thread_alive): Renamed from mythread_alive.
16493 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16494 child dies.
16495 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16496 (regsets_store_inferior_registers): Correct error message.
16497 Add missing ``return 0''.
16498 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16499 (linux_store_registers): Renamed from store_inferior_registers.
16500 (linux_read_memory): Renamed from read_inferior_memory.
16501 (linux_write_memory): Renamed from write_inferior_memory.
16502 (linux_target_ops): New structure.
16503 (initialize_low): Call set_target_ops ().
16504 * remote-utils.c (unhexify): New function.
16505 (hexify): New function.
16506 (input_interrupt): Send signals to ``signal_pid''.
16507 * server.c (inferior_pid): Remove.
16508 (start_inferior): Update create_inferior call.
16509 (attach_inferior): Call add_inferior.
16510 (handle_query): New function.
16511 (main): Call handle_query for `q' packets.
16512 * server.h: Include "target.h". Remove obsolete prototypes.
16513 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16514
165152002-04-09 Daniel Jacobowitz <drow@mvista.com>
16516
16517 * Makefile.in: Add WARN_CFLAGS. Update configury
16518 dependencies.
16519 * configure.in: Check for <string.h>
16520 * configure: Regenerate.
16521 * config.in: Regenerate.
16522 * gdbreplay.c: Include needed system headers.
16523 (remote_open): Remove strchr prototype.
16524 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16525 * regcache.c (supply_register): Change buf argument to const void *.
16526 (supply_register_by_name): Likewise.
16527 (collect_register): Change buf argument to void *.
16528 (collect_register_by_name): Likewise.
16529 * regcache.h: Add missing prototypes.
16530 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16531 * server.c (handle_query): New function.
16532 (attached): New static variable, moved out of main.
16533 (main): Quiet longjmp clobber warnings.
16534 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16535 * utils.c (error): Remove NORETURN.
16536 (fatal): Likewise.
This page took 1.87304 seconds and 4 git commands to generate.