This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add support for VxWorks (v3)


> I haven't really looked at the code yet, but, the question
> I think should be answered most importantly, is: do you
> really need partitions at all?

Unfortunately, you do. The most common case is when you are debugging
in system mode.  This essentially means debugging the entire system,
and therefore multiple partitions. Another use case is is when
debugging a task that runs some code provided by a shared partition.
It's a little bit like shared libraries on traditional OSes.  In that
case, you're effectively debugging over several partitions at the same
time.

I should also repeat that the partition-switching implementation has
been stubbed out (meaning not contributed yet). The reason for that
is that it makes some assumptions about how core GDB accesses its
objfiles. I was under quite a bit of pressure when I implemented this,
and the good news is that it's localized, and never broke in the years
since I wrote the code. I'm keeping my fingers crossed.  But what it
does is rebuild GDB's objfile list at each partition switch. This
allows us to give the user the same visibility rules as the code
running loaded in that partition.

I have some ideas of how I would like to integrate that concept
in GDB. There are two issues: (1) we need one list of objfiles
per partition - that should be relatively easy to deal with;
(2) we have some partitions that are a little special: (2a)
the "kernel" partition, which is a partition accessible from
all other partitions; (2b) shared partitions, which can be
accessible from other partitions, provided that the shared
partition is in the "link path" of the client partition (it's
an ordered list of shared partitions). I think we can deal with
the "kernel" partition as being an implicit shared partition -
that would be dealt with at the target level.  But we will need
to teach the objfile walking about link paths (not very hard,
I expect).

If cell or any other target could benefit from partitions as well,
I'd be happy to start designing this part sooner rather than later.
I sent an RFC about that many months ago, and got no reply, so
I just assumed little interest.  But it would be nice to design
this part with someone else - so far, it's been pretty much me.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]