Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [rfc] [17/17] Get rid of current_gdbarch in go32-nat.c
Date: Tue, 23 Oct 2007 10:31:00 -0000	[thread overview]
Message-ID: <471DCAAB.7080603@de.ibm.com> (raw)
In-Reply-To: <u640yuchm.fsf@gnu.org>

H Eli,

Eli Zaretskii schrieb:
>>
>>> Sorry for asking this so late, but could you please explain the
>>> reason(s) why these changes are a good idea, i.e. what potential
>>> problem(s) are they trying to solve?  If I tell you that the go32
>>> (a.k.a. DJGPP) native build of GDB supports only a single
>>> architecture, would those reason(s) still hold?
please see my explanation below.

> Thanks for the pointer.  Unfortunately, it does not answer my question
> above.  Perhaps the earlier thread (to which it refers without stating
> a URL) does, in which case I'd like to read that earlier thread.
You're right. This is the original posting from august this year:
http://sourceware.org/ml/gdb-patches/2007-08/msg00034.html

> 
>> What I'll try to achieve is to get rid of the global variable current_gdbarch to have a real per-frame architecture. 
> Yes, but why?  It looks like getting rid of current_gdbarch is needed
> to support the situation where multiple architectures are supported in
> the same session (or maybe even in the same executable?).  That is why
> I asked the second question above: the DJGPP native build of GDB
> supports only a single architecture, and will ever support only that
> single architecture.  So the question is: is there any particular
> reason to get rid of current_gdbarch in go32-nat.c?

current_gdbarch will disappear somewhen and GDB will work on a per-frame architecture base. There should
be no need to have some global variables for keeping track of current architecture, etc anymore (which is for my opinion
very fault-prone anyway). 

There is not only an advantage with our "combined binaries" which consist of two different architectures in one binary.
At the end one should be able to build GDB with all (nearly all ?!?) targets enabled and then debug all kinds of supported
binaries without the need to recompile or even restart it. This is a cool feature ;-) Whereas I cannot imagine a scenario
where GDB debugs for example an x86 binary and a PowerPC binary in one session.

Thats the reason to replace current_gdbarch piece by piece by appropriate other methods like get_frame_arch or get_regcache_arch
or (what is still under discussion) via a gdbarch pointer in struct objfiles. 

I'm not familiar with the particularities of DJGPP but I hope I was able to answer your question. 


-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com


  reply	other threads:[~2007-10-23 10:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  8:56 Markus Deuling
2007-10-12 10:56 ` Eli Zaretskii
2007-10-22  7:44   ` Markus Deuling
2007-10-22 20:25     ` Eli Zaretskii
2007-10-23 10:31       ` Markus Deuling [this message]
2007-10-23 21:15         ` Eli Zaretskii
2007-10-23 21:55           ` Daniel Jacobowitz
2007-10-24  4:08             ` Eli Zaretskii
2007-10-24 11:48               ` Daniel Jacobowitz
2007-10-24 19:24                 ` Eli Zaretskii
2007-10-24 13:39             ` Ulrich Weigand

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=471DCAAB.7080603@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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