Deleted Added
full compact
trgt_powerpc.c (161589) trgt_powerpc.c (163440)
1/*-
2 * Copyright (c) 2006 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c 161589 2006-08-24 21:53:49Z marcel $");
28__FBSDID("$FreeBSD: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c 163440 2006-10-16 20:07:23Z jhb $");
29
30#include <sys/types.h>
31#include <machine/pcb.h>
32#include <machine/frame.h>
33#include <err.h>
34#include <kvm.h>
35#include <string.h>
36

--- 6 unchanged lines hidden (view full) ---

43#include <ppc-tdep.h>
44
45#include "kgdb.h"
46
47void
48kgdb_trgt_fetch_registers(int regno __unused)
49{
50 struct kthr *kt;
29
30#include <sys/types.h>
31#include <machine/pcb.h>
32#include <machine/frame.h>
33#include <err.h>
34#include <kvm.h>
35#include <string.h>
36

--- 6 unchanged lines hidden (view full) ---

43#include <ppc-tdep.h>
44
45#include "kgdb.h"
46
47void
48kgdb_trgt_fetch_registers(int regno __unused)
49{
50 struct kthr *kt;
51 struct pcb pcb;
51 struct pcb pcb;
52 struct gdbarch_tdep *tdep;
53 int i;
54
55 tdep = gdbarch_tdep (current_gdbarch);
56
57 kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid));
58 if (kt == NULL)
59 return;

--- 4 unchanged lines hidden (view full) ---

64
65 /*
66 * r14-r31 are saved in the pcb
67 */
68 for (i = 14; i <= 31; i++) {
69 supply_register(tdep->ppc_gp0_regnum + i,
70 (char *)&pcb.pcb_context[i]);
71 }
52 struct gdbarch_tdep *tdep;
53 int i;
54
55 tdep = gdbarch_tdep (current_gdbarch);
56
57 kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid));
58 if (kt == NULL)
59 return;

--- 4 unchanged lines hidden (view full) ---

64
65 /*
66 * r14-r31 are saved in the pcb
67 */
68 for (i = 14; i <= 31; i++) {
69 supply_register(tdep->ppc_gp0_regnum + i,
70 (char *)&pcb.pcb_context[i]);
71 }
72
72
73 /* r1 is saved in the sp field */
74 supply_register(tdep->ppc_gp0_regnum + 1, (char *)&pcb.pcb_sp);
75
76 supply_register(tdep->ppc_lr_regnum, (char *)&pcb.pcb_lr);
77 supply_register(tdep->ppc_cr_regnum, (char *)&pcb.pcb_cr);
78}
79
80void

--- 105 unchanged lines hidden ---
73 /* r1 is saved in the sp field */
74 supply_register(tdep->ppc_gp0_regnum + 1, (char *)&pcb.pcb_sp);
75
76 supply_register(tdep->ppc_lr_regnum, (char *)&pcb.pcb_lr);
77 supply_register(tdep->ppc_cr_regnum, (char *)&pcb.pcb_cr);
78}
79
80void

--- 105 unchanged lines hidden ---