]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/target.cc
gdbserver: LoongArch: Add orig_a0 processing
[thirdparty/binutils-gdb.git] / gdbserver / target.cc
CommitLineData
ce3a066d 1/* Target operations for the remote server for GDB.
4a94e368 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
ce3a066d
DJ
3
4 Contributed by MontaVista Software.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
a9762ec7 10 the Free Software Foundation; either version 3 of the License, or
ce3a066d
DJ
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
a9762ec7 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
ce3a066d
DJ
20
21#include "server.h"
c144c7a0 22#include "tracepoint.h"
d59b55f0 23#include "gdbsupport/byte-vector.h"
ea06bbaa 24#include "hostio.h"
c9b7b804
TBA
25#include <fcntl.h>
26#include <unistd.h>
27#include <sys/types.h>
28#include <sys/stat.h>
ce3a066d 29
5b6d1e4f 30process_stratum_target *the_target;
ce3a066d 31
7f8acede
PA
32/* See target.h. */
33
34bool
f557a88a 35set_desired_thread ()
0d62e5e8 36{
c12a5089
SC
37 client_state &cs = get_client_state ();
38 thread_info *found = find_thread_ptid (cs.general_thread);
0d62e5e8 39
7f8acede
PA
40 if (found == nullptr)
41 {
42 process_info *proc = find_process_pid (cs.general_thread.pid ());
43 if (proc == nullptr)
44 {
45 threads_debug_printf
46 ("did not find thread nor process for general_thread %s",
47 cs.general_thread.to_string ().c_str ());
48 }
49 else
50 {
51 threads_debug_printf
52 ("did not find thread for general_thread %s, but found process",
53 cs.general_thread.to_string ().c_str ());
54 }
55 switch_to_process (proc);
56 }
57 else
58 switch_to_thread (found);
59
f0db101d 60 return (current_thread != NULL);
0d62e5e8
DJ
61}
62
7f8acede
PA
63/* See target.h. */
64
65bool
66set_desired_process ()
67{
68 client_state &cs = get_client_state ();
69
70 process_info *proc = find_process_pid (cs.general_thread.pid ());
71 if (proc == nullptr)
72 {
73 threads_debug_printf
74 ("did not find process for general_thread %s",
75 cs.general_thread.to_string ().c_str ());
76 }
77 switch_to_process (proc);
78
79 return proc != nullptr;
80}
81
c3e735a6 82int
f450004a 83read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
611cb4a5 84{
366e3746
PA
85 /* At the time of writing, GDB only sends write packets with LEN==0,
86 not read packets (see comment in target_write_memory), but it
87 doesn't hurt to prevent problems if it ever does, or we're
88 connected to some client other than GDB that does. */
89 if (len == 0)
90 return 0;
91
92 int res = the_target->read_memory (memaddr, myaddr, len);
611cb4a5 93 check_mem_read (memaddr, myaddr, len);
c3e735a6 94 return res;
611cb4a5
DJ
95}
96
721ec300
GB
97/* See target/target.h. */
98
99int
100target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
101{
102 return read_inferior_memory (memaddr, myaddr, len);
103}
104
105/* See target/target.h. */
106
107int
108target_read_uint32 (CORE_ADDR memaddr, uint32_t *result)
109{
110 return read_inferior_memory (memaddr, (gdb_byte *) result, sizeof (*result));
111}
112
4196ab2a
TT
113/* See target/target.h. */
114
611cb4a5 115int
4196ab2a
TT
116target_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
117 ssize_t len)
0d62e5e8 118{
366e3746
PA
119 /* GDB may send X packets with LEN==0, for probing packet support.
120 If we let such a request go through, then buffer.data() below may
121 return NULL, which may confuse target implementations. Handle it
122 here to avoid lower levels having to care about this case. */
123 if (len == 0)
124 return 0;
125
c6778d00
TT
126 /* Make a copy of the data because check_mem_write may need to
127 update it. */
d59b55f0 128 gdb::byte_vector buffer (myaddr, myaddr + len);
c6778d00 129 check_mem_write (memaddr, buffer.data (), myaddr, len);
52405d85 130 return the_target->write_memory (memaddr, buffer.data (), len);
0d62e5e8
DJ
131}
132
95954743 133ptid_t
b60cea74
TT
134mywait (ptid_t ptid, struct target_waitstatus *ourstatus,
135 target_wait_flags options, int connected_wait)
611cb4a5 136{
95954743 137 ptid_t ret;
0d62e5e8
DJ
138
139 if (connected_wait)
140 server_waiting = 1;
141
f2b9e3df 142 ret = target_wait (ptid, ourstatus, options);
bd99dc85 143
4210d83e
PA
144 /* We don't expose _LOADED events to gdbserver core. See the
145 `dlls_changed' global. */
183be222
SM
146 if (ourstatus->kind () == TARGET_WAITKIND_LOADED)
147 ourstatus->set_stopped (GDB_SIGNAL_0);
4210d83e 148
1a3d890b
PA
149 /* If GDB is connected through TCP/serial, then GDBserver will most
150 probably be running on its own terminal/console, so it's nice to
151 print there why is GDBserver exiting. If however, GDB is
152 connected through stdio, then there's no need to spam the GDB
153 console with this -- the user will already see the exit through
154 regular GDB output, in that same terminal. */
155 if (!remote_connection_is_stdio ())
156 {
183be222 157 if (ourstatus->kind () == TARGET_WAITKIND_EXITED)
1a3d890b 158 fprintf (stderr,
183be222
SM
159 "\nChild exited with status %d\n", ourstatus->exit_status ());
160 else if (ourstatus->kind () == TARGET_WAITKIND_SIGNALLED)
1a3d890b 161 fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n",
183be222
SM
162 gdb_signal_to_host (ourstatus->sig ()),
163 gdb_signal_to_name (ourstatus->sig ()));
1a3d890b 164 }
0d62e5e8
DJ
165
166 if (connected_wait)
167 server_waiting = 0;
168
169 return ret;
611cb4a5
DJ
170}
171
f8c1d06b
GB
172/* See target/target.h. */
173
174void
03f4463b 175target_stop_and_wait (ptid_t ptid)
f8c1d06b
GB
176{
177 struct target_waitstatus status;
3e6ec53a 178 bool was_non_stop = non_stop;
17e16485 179 struct thread_resume resume_info;
f8c1d06b 180
17e16485
YQ
181 resume_info.thread = ptid;
182 resume_info.kind = resume_stop;
183 resume_info.sig = GDB_SIGNAL_0;
52405d85 184 the_target->resume (&resume_info, 1);
f8c1d06b 185
3e6ec53a 186 non_stop = true;
f8c1d06b
GB
187 mywait (ptid, &status, 0, 0);
188 non_stop = was_non_stop;
189}
190
191/* See target/target.h. */
192
f2b9e3df 193ptid_t
b60cea74
TT
194target_wait (ptid_t ptid, struct target_waitstatus *status,
195 target_wait_flags options)
f2b9e3df 196{
52405d85 197 return the_target->wait (ptid, status, options);
f2b9e3df
SDJ
198}
199
200/* See target/target.h. */
201
bc1e6c81
SDJ
202void
203target_mourn_inferior (ptid_t ptid)
204{
52405d85 205 the_target->mourn (find_process_pid (ptid.pid ()));
bc1e6c81
SDJ
206}
207
208/* See target/target.h. */
209
f8c1d06b 210void
03f4463b 211target_continue_no_signal (ptid_t ptid)
f8c1d06b
GB
212{
213 struct thread_resume resume_info;
214
215 resume_info.thread = ptid;
216 resume_info.kind = resume_continue;
217 resume_info.sig = GDB_SIGNAL_0;
52405d85 218 the_target->resume (&resume_info, 1);
f8c1d06b
GB
219}
220
049a8570
SDJ
221/* See target/target.h. */
222
223void
224target_continue (ptid_t ptid, enum gdb_signal signal)
225{
226 struct thread_resume resume_info;
227
228 resume_info.thread = ptid;
229 resume_info.kind = resume_continue;
230 resume_info.sig = gdb_signal_to_host (signal);
52405d85 231 the_target->resume (&resume_info, 1);
049a8570
SDJ
232}
233
1fb77080
SDJ
234/* See target/target.h. */
235
236int
237target_supports_multi_process (void)
238{
52405d85 239 return the_target->supports_multi_process ();
1fb77080
SDJ
240}
241
ce3a066d 242void
5b6d1e4f 243set_target_ops (process_stratum_target *target)
ce3a066d 244{
478f9adf 245 the_target = target;
ce3a066d 246}
95954743
PA
247
248/* Convert pid to printable format. */
249
61d7f128 250std::string
95954743
PA
251target_pid_to_str (ptid_t ptid)
252{
d7e15655 253 if (ptid == minus_one_ptid)
61d7f128 254 return string_printf("<all threads>");
d7e15655 255 else if (ptid == null_ptid)
61d7f128 256 return string_printf("<null thread>");
cc6bcb54 257 else if (ptid.tid () != 0)
61d7f128
SM
258 return string_printf("Thread %d.0x%s",
259 ptid.pid (),
260 phex_nz (ptid.tid (), sizeof (ULONGEST)));
e38504b3 261 else if (ptid.lwp () != 0)
61d7f128
SM
262 return string_printf("LWP %d.%ld",
263 ptid.pid (), ptid.lwp ());
95954743 264 else
61d7f128
SM
265 return string_printf("Process %d",
266 ptid.pid ());
95954743 267}
8336d594 268
7255706c 269int
a780ef4f 270kill_inferior (process_info *proc)
7255706c 271{
a780ef4f 272 gdb_agent_about_to_close (proc->pid);
7255706c 273
52405d85 274 return the_target->kill (proc);
7255706c 275}
70b90b91 276
223ffa71
TT
277/* Define it. */
278
e671cd59
PA
279target_terminal_state target_terminal::m_terminal_state
280 = target_terminal_state::is_ours;
223ffa71 281
2090129c
SDJ
282/* See target/target.h. */
283
284void
223ffa71 285target_terminal::init ()
2090129c
SDJ
286{
287 /* Placeholder needed because of fork_inferior. Not necessary on
288 GDBserver. */
289}
290
291/* See target/target.h. */
292
293void
223ffa71 294target_terminal::inferior ()
2090129c
SDJ
295{
296 /* Placeholder needed because of fork_inferior. Not necessary on
297 GDBserver. */
298}
299
300/* See target/target.h. */
301
302void
223ffa71 303target_terminal::ours ()
2090129c
SDJ
304{
305 /* Placeholder needed because of fork_inferior. Not necessary on
306 GDBserver. */
307}
223ffa71
TT
308
309/* See target/target.h. */
310
311void
312target_terminal::ours_for_output (void)
313{
314 /* Placeholder. */
315}
316
317/* See target/target.h. */
318
319void
320target_terminal::info (const char *arg, int from_tty)
321{
322 /* Placeholder. */
323}
6dee9afb
TBA
324
325/* Default implementations of target ops.
326 See target.h for definitions. */
327
328void
52405d85 329process_stratum_target::post_create_inferior ()
6dee9afb
TBA
330{
331 /* Nop. */
332}
79b44087 333
2a31c7aa 334void
52405d85 335process_stratum_target::look_up_symbols ()
2a31c7aa
TBA
336{
337 /* Nop. */
338}
eac215cc
TBA
339
340bool
52405d85 341process_stratum_target::supports_read_auxv ()
eac215cc
TBA
342{
343 return false;
344}
345
346int
52405d85
TBA
347process_stratum_target::read_auxv (CORE_ADDR offset, unsigned char *myaddr,
348 unsigned int len)
eac215cc
TBA
349{
350 gdb_assert_not_reached ("target op read_auxv not supported");
351}
a2b2297a
TBA
352
353bool
52405d85 354process_stratum_target::supports_z_point_type (char z_type)
a2b2297a
TBA
355{
356 return false;
357}
7e0bde70
TBA
358
359int
52405d85
TBA
360process_stratum_target::insert_point (enum raw_bkpt_type type,
361 CORE_ADDR addr,
362 int size, raw_breakpoint *bp)
7e0bde70
TBA
363{
364 return 1;
365}
366
367int
52405d85
TBA
368process_stratum_target::remove_point (enum raw_bkpt_type type,
369 CORE_ADDR addr,
370 int size, raw_breakpoint *bp)
7e0bde70
TBA
371{
372 return 1;
373}
84320c4e
TBA
374
375bool
52405d85 376process_stratum_target::stopped_by_sw_breakpoint ()
84320c4e
TBA
377{
378 return false;
379}
380
381bool
52405d85 382process_stratum_target::supports_stopped_by_sw_breakpoint ()
84320c4e
TBA
383{
384 return false;
385}
93fe88b2
TBA
386
387bool
52405d85 388process_stratum_target::stopped_by_hw_breakpoint ()
93fe88b2
TBA
389{
390 return false;
391}
392
393bool
52405d85 394process_stratum_target::supports_stopped_by_hw_breakpoint ()
93fe88b2
TBA
395{
396 return false;
397}
22aa6223
TBA
398
399bool
52405d85 400process_stratum_target::supports_hardware_single_step ()
22aa6223
TBA
401{
402 return false;
403}
6eeb5c55
TBA
404
405bool
52405d85 406process_stratum_target::stopped_by_watchpoint ()
6eeb5c55
TBA
407{
408 return false;
409}
410
411CORE_ADDR
52405d85 412process_stratum_target::stopped_data_address ()
6eeb5c55
TBA
413{
414 return 0;
415}
5203ae1e
TBA
416
417bool
52405d85 418process_stratum_target::supports_read_offsets ()
5203ae1e
TBA
419{
420 return false;
421}
422
546b77fe
LM
423bool
424process_stratum_target::supports_memory_tagging ()
425{
426 return false;
427}
428
429bool
430process_stratum_target::fetch_memtags (CORE_ADDR address, size_t len,
431 gdb::byte_vector &tags, int type)
432{
433 gdb_assert_not_reached ("target op fetch_memtags not supported");
434}
435
436bool
437process_stratum_target::store_memtags (CORE_ADDR address, size_t len,
438 const gdb::byte_vector &tags, int type)
439{
440 gdb_assert_not_reached ("target op store_memtags not supported");
441}
442
5203ae1e 443int
52405d85 444process_stratum_target::read_offsets (CORE_ADDR *text, CORE_ADDR *data)
5203ae1e
TBA
445{
446 gdb_assert_not_reached ("target op read_offsets not supported");
447}
6e3fd7e9
TBA
448
449bool
52405d85 450process_stratum_target::supports_get_tls_address ()
6e3fd7e9
TBA
451{
452 return false;
453}
454
455int
52405d85
TBA
456process_stratum_target::get_tls_address (thread_info *thread,
457 CORE_ADDR offset,
458 CORE_ADDR load_module,
459 CORE_ADDR *address)
6e3fd7e9
TBA
460{
461 gdb_assert_not_reached ("target op get_tls_address not supported");
462}
ea06bbaa 463
2d0795ee 464bool
52405d85 465process_stratum_target::supports_qxfer_osdata ()
2d0795ee
TBA
466{
467 return false;
468}
469
470int
52405d85
TBA
471process_stratum_target::qxfer_osdata (const char *annex,
472 unsigned char *readbuf,
473 unsigned const char *writebuf,
474 CORE_ADDR offset, int len)
2d0795ee
TBA
475{
476 gdb_assert_not_reached ("target op qxfer_osdata not supported");
477}
d7abedf7
TBA
478
479bool
52405d85 480process_stratum_target::supports_qxfer_siginfo ()
d7abedf7
TBA
481{
482 return false;
483}
484
485int
52405d85
TBA
486process_stratum_target::qxfer_siginfo (const char *annex,
487 unsigned char *readbuf,
488 unsigned const char *writebuf,
489 CORE_ADDR offset, int len)
d7abedf7
TBA
490{
491 gdb_assert_not_reached ("target op qxfer_siginfo not supported");
492}
0dc587d4
TBA
493
494bool
52405d85 495process_stratum_target::supports_non_stop ()
0dc587d4
TBA
496{
497 return false;
498}
499
500bool
52405d85 501process_stratum_target::async (bool enable)
0dc587d4
TBA
502{
503 return false;
504}
505
506int
52405d85 507process_stratum_target::start_non_stop (bool enable)
0dc587d4
TBA
508{
509 if (enable)
510 return -1;
511 else
512 return 0;
513}
652aef77
TBA
514
515bool
52405d85 516process_stratum_target::supports_multi_process ()
652aef77
TBA
517{
518 return false;
519}
9690a72a
TBA
520
521bool
52405d85 522process_stratum_target::supports_fork_events ()
9690a72a
TBA
523{
524 return false;
525}
526
527bool
52405d85 528process_stratum_target::supports_vfork_events ()
9690a72a
TBA
529{
530 return false;
531}
532
533bool
52405d85 534process_stratum_target::supports_exec_events ()
9690a72a
TBA
535{
536 return false;
537}
fb00dfce
TBA
538
539void
52405d85 540process_stratum_target::handle_new_gdb_connection ()
fb00dfce
TBA
541{
542 /* Nop. */
543}
55cf3021
TBA
544
545int
52405d85 546process_stratum_target::handle_monitor_command (char *mon)
55cf3021
TBA
547{
548 return 0;
549}
95a45fc1
TBA
550
551int
52405d85 552process_stratum_target::core_of_thread (ptid_t ptid)
95a45fc1
TBA
553{
554 return -1;
555}
9da41fda
TBA
556
557bool
52405d85 558process_stratum_target::supports_read_loadmap ()
9da41fda
TBA
559{
560 return false;
561}
562
563int
52405d85
TBA
564process_stratum_target::read_loadmap (const char *annex,
565 CORE_ADDR offset,
566 unsigned char *myaddr,
567 unsigned int len)
9da41fda
TBA
568{
569 gdb_assert_not_reached ("target op read_loadmap not supported");
570}
0df28b1b
TBA
571
572void
b315b67d
SM
573process_stratum_target::process_qsupported
574 (gdb::array_view<const char * const> features)
0df28b1b
TBA
575{
576 /* Nop. */
577}
290732bf
TBA
578
579bool
52405d85 580process_stratum_target::supports_tracepoints ()
290732bf
TBA
581{
582 return false;
583}
770d8f6a
TBA
584
585CORE_ADDR
52405d85 586process_stratum_target::read_pc (regcache *regcache)
770d8f6a
TBA
587{
588 gdb_assert_not_reached ("process_target::read_pc: Unable to find PC");
589}
590
591void
52405d85 592process_stratum_target::write_pc (regcache *regcache, CORE_ADDR pc)
770d8f6a
TBA
593{
594 gdb_assert_not_reached ("process_target::write_pc: Unable to update PC");
595}
68119632
TBA
596
597bool
52405d85 598process_stratum_target::supports_thread_stopped ()
68119632
TBA
599{
600 return false;
601}
602
603bool
52405d85 604process_stratum_target::thread_stopped (thread_info *thread)
68119632
TBA
605{
606 gdb_assert_not_reached ("target op thread_stopped not supported");
607}
4e2e869c
TBA
608
609bool
52405d85 610process_stratum_target::supports_get_tib_address ()
4e2e869c
TBA
611{
612 return false;
613}
614
615int
52405d85 616process_stratum_target::get_tib_address (ptid_t ptid, CORE_ADDR *address)
4e2e869c
TBA
617{
618 gdb_assert_not_reached ("target op get_tib_address not supported");
619}
29e8dc09
TBA
620
621void
52405d85 622process_stratum_target::pause_all (bool freeze)
29e8dc09
TBA
623{
624 /* Nop. */
625}
626
627void
52405d85 628process_stratum_target::unpause_all (bool unfreeze)
29e8dc09
TBA
629{
630 /* Nop. */
631}
5c9eb2f2
TBA
632
633void
52405d85 634process_stratum_target::stabilize_threads ()
5c9eb2f2
TBA
635{
636 /* Nop. */
637}
c23c9391
TBA
638
639bool
52405d85 640process_stratum_target::supports_fast_tracepoints ()
c23c9391
TBA
641{
642 return false;
643}
644
645int
52405d85 646process_stratum_target::install_fast_tracepoint_jump_pad
c23c9391
TBA
647 (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
648 CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
649 CORE_ADDR *trampoline, ULONGEST *trampoline_size,
650 unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
651 CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
652 char *err)
653{
654 gdb_assert_not_reached ("target op install_fast_tracepoint_jump_pad "
655 "not supported");
656}
657
658int
52405d85 659process_stratum_target::get_min_fast_tracepoint_insn_len ()
c23c9391
TBA
660{
661 return 0;
662}
345dafad
TBA
663
664struct emit_ops *
52405d85 665process_stratum_target::emit_ops ()
345dafad
TBA
666{
667 return nullptr;
668}
c756403b
TBA
669
670bool
52405d85 671process_stratum_target::supports_disable_randomization ()
c756403b
TBA
672{
673 return false;
674}
974387bb
TBA
675
676bool
52405d85 677process_stratum_target::supports_qxfer_libraries_svr4 ()
974387bb
TBA
678{
679 return false;
680}
681
682int
52405d85
TBA
683process_stratum_target::qxfer_libraries_svr4 (const char *annex,
684 unsigned char *readbuf,
685 unsigned const char *writebuf,
686 CORE_ADDR offset, int len)
974387bb
TBA
687{
688 gdb_assert_not_reached ("target op qxfer_libraries_svr4 not supported");
689}
c0245cb9
TBA
690
691bool
52405d85 692process_stratum_target::supports_agent ()
c0245cb9
TBA
693{
694 return false;
695}
79597bdd
TBA
696
697btrace_target_info *
696c0d5e
MM
698process_stratum_target::enable_btrace (thread_info *tp,
699 const btrace_config *conf)
79597bdd
TBA
700{
701 error (_("Target does not support branch tracing."));
702}
703
704int
52405d85 705process_stratum_target::disable_btrace (btrace_target_info *tinfo)
79597bdd
TBA
706{
707 error (_("Target does not support branch tracing."));
708}
709
710int
52405d85 711process_stratum_target::read_btrace (btrace_target_info *tinfo,
79597bdd
TBA
712 buffer *buffer,
713 enum btrace_read_type type)
714{
715 error (_("Target does not support branch tracing."));
716}
717
718int
52405d85
TBA
719process_stratum_target::read_btrace_conf (const btrace_target_info *tinfo,
720 buffer *buffer)
79597bdd
TBA
721{
722 error (_("Target does not support branch tracing."));
723}
2526e0cd
TBA
724
725bool
52405d85 726process_stratum_target::supports_range_stepping ()
2526e0cd
TBA
727{
728 return false;
729}
8247b823
TBA
730
731bool
52405d85 732process_stratum_target::supports_pid_to_exec_file ()
8247b823
TBA
733{
734 return false;
735}
736
04977957 737const char *
52405d85 738process_stratum_target::pid_to_exec_file (int pid)
8247b823
TBA
739{
740 gdb_assert_not_reached ("target op pid_to_exec_file not supported");
741}
c9b7b804
TBA
742
743bool
52405d85 744process_stratum_target::supports_multifs ()
c9b7b804
TBA
745{
746 return false;
747}
748
749int
52405d85
TBA
750process_stratum_target::multifs_open (int pid, const char *filename,
751 int flags, mode_t mode)
c9b7b804
TBA
752{
753 return open (filename, flags, mode);
754}
755
756int
52405d85 757process_stratum_target::multifs_unlink (int pid, const char *filename)
c9b7b804
TBA
758{
759 return unlink (filename);
760}
761
762ssize_t
52405d85
TBA
763process_stratum_target::multifs_readlink (int pid, const char *filename,
764 char *buf, size_t bufsiz)
c9b7b804
TBA
765{
766 return readlink (filename, buf, bufsiz);
767}
d367006f
TBA
768
769int
52405d85 770process_stratum_target::breakpoint_kind_from_pc (CORE_ADDR *pcptr)
d367006f
TBA
771{
772 /* The default behavior is to use the size of a breakpoint as the
773 kind. */
774 int size = 0;
775 sw_breakpoint_from_kind (0, &size);
776 return size;
777}
778
779int
52405d85 780process_stratum_target::breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
d367006f
TBA
781{
782 return breakpoint_kind_from_pc (pcptr);
783}
7f63b89b
TBA
784
785const char *
52405d85 786process_stratum_target::thread_name (ptid_t thread)
7f63b89b
TBA
787{
788 return nullptr;
789}
790
791bool
52405d85
TBA
792process_stratum_target::thread_handle (ptid_t ptid, gdb_byte **handle,
793 int *handle_len)
7f63b89b
TBA
794{
795 return false;
796}
5303a34f 797
7b961964
SM
798thread_info *
799process_stratum_target::thread_pending_parent (thread_info *thread)
800{
801 return nullptr;
802}
803
df5ad102
SM
804thread_info *
805process_stratum_target::thread_pending_child (thread_info *thread)
806{
807 return nullptr;
808}
809
5303a34f 810bool
52405d85 811process_stratum_target::supports_software_single_step ()
5303a34f
TBA
812{
813 return false;
814}
bc8d3ae4
TBA
815
816bool
52405d85 817process_stratum_target::supports_catch_syscall ()
bc8d3ae4
TBA
818{
819 return false;
820}
d633e831
TBA
821
822int
52405d85 823process_stratum_target::get_ipa_tdesc_idx ()
d633e831
TBA
824{
825 return 0;
826}