From: Michal Ludvig <mludvig@suse.cz>
To: Andreas Schwab <schwab@suse.de>
Cc: gdb-patches@sources.redhat.com
Subject: [RFA] Re: x86-64-tdep.h cleanup
Date: Wed, 06 Mar 2002 08:46:00 -0000 [thread overview]
Message-ID: <3C8647D7.40302@suse.cz> (raw)
In-Reply-To: <je1yeygdg9.fsf@sykes.suse.de>
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
Andreas Schwab wrote:
> I think the registration of the Linux specific gdbarch functions should be
> moved to x86-64-linux-tdep.c.
It seems reasonable. Perhaps I can do it like in the attachment?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
[-- Attachment #2: x8664-02.diff --]
[-- Type: text/plain, Size: 2461 bytes --]
Index: x86-64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 x86-64-linux-tdep.c
*** x86-64-linux-tdep.c 2002/02/24 22:14:33 1.4
--- x86-64-linux-tdep.c 2002/03/06 16:34:55
*************** x86_64_linux_frame_saved_pc (struct fram
*** 134,136 ****
--- 134,144 ----
return x86_64_linux_sigtramp_saved_pc (frame);
return cfi_get_ra (frame);
}
+
+ /* Set Linux specific functions into gdbarch vector. */
+ void
+ linux_gdbarch_init (struct gdbarch *gdbarch)
+ {
+ set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
+ set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
+ }
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 x86-64-tdep.c
*** x86-64-tdep.c 2002/03/04 11:08:28 1.10
--- x86-64-tdep.c 2002/03/06 16:34:55
*************** int x86_64_register_raw_size_table[X86_6
*** 59,64 ****
--- 59,67 ----
4
};
+ /* Prototype of function from x86-64-linux-tdep.c. */
+ void linux_gdbarch_init (struct gdbarch *gdbarch);
+
/* Number of bytes of storage in the actual machine representation for
register REGNO. */
int
*************** i386_gdbarch_init (struct gdbarch_info i
*** 892,898 ****
set_gdbarch_frameless_function_invocation (gdbarch,
x86_64_frameless_function_invocation);
- set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, default_frame_address);
set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
--- 895,900 ----
*************** i386_gdbarch_init (struct gdbarch_info i
*** 966,973 ****
set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
- set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
-
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, x86_64_breakpoint_from_pc);
--- 968,973 ----
*************** i386_gdbarch_init (struct gdbarch_info i
*** 979,984 ****
--- 979,988 ----
/* Use dwarf2 debug frame informations. */
set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+
+ /* Set Linux specific functions. */
+ linux_gdbarch_init (gdbarch);
+
return gdbarch;
}
next prev parent reply other threads:[~2002-03-06 16:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-05 7:56 Michal Ludvig
2002-03-05 8:30 ` Kevin Buettner
2002-03-05 23:53 ` Andreas Jaeger
2002-03-06 2:00 ` Michal Ludvig
2002-03-06 9:30 ` Kevin Buettner
2002-03-07 5:30 ` [patch] " Michal Ludvig
2002-03-06 3:09 ` Andreas Schwab
2002-03-06 8:46 ` Michal Ludvig [this message]
2002-03-06 9:24 ` [RFA] " Andreas Schwab
2002-03-06 9:35 ` Kevin Buettner
2002-03-06 10:26 ` Andrew Cagney
2002-03-06 11:02 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C8647D7.40302@suse.cz \
--to=mludvig@suse.cz \
--cc=gdb-patches@sources.redhat.com \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox