Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb@sources.redhat.com
Subject: Re: corelow and threads question
Date: Wed, 10 Jun 2009 20:38:00 -0000	[thread overview]
Message-ID: <h0p5k1$20e$1@ger.gmane.org> (raw)
In-Reply-To: <200906101747.20527.pedro@codesourcery.com>

Thanks for replying.

Ok, then I think what you wanted to commit works for me (I 
am talking about: 
http://sourceware.org/ml/gdb-patches/2009-06/msg00112.html).

As for extra thread info, I guess if we have 
"core_pid_to_str" to be a thing of architecture, then extra 
thread info from core fits there too.


But I am still not happy about having to expand gdbarch 
whenever I have something specific to my architecture for a 
particular stratum - maybe it does belong there but the 
target stack mechanism seems attractive for using in 
"fine-tuning" existing targets ("strata").  This will really 
lead us to having target_ops functions per each predefined 
strata in gdbarch (i.e. customization for core, for process, 
for thread...)


I was playing (in my head) with idea of defining new 
"gdbarch_stratum" that would be used on top of other 
strata... for example, having one gdbarch_stratum per 
defined stratum (i.e. gdbarch_stratum+file_stratum - to 
allow gdbarch customize file_stratum, gdbarch_stratum + 
core_stratum for customizing core stuff, etc...); we would 
have to "spread" stratums in "strata" enum and insert 
gdbarch_ versions above correspoinding strata... that way I 
could really customize each of the strata for my 
architecture only by overriding corresponding _ops functions 
without having to add new function to gdbarch interface and 
regenerating gdbarch files.

Something like this (just an illustration):

enum strata
   {
     dumm_stratum = 0,
     gdbarch_stratum = 1,
     file_stratum = 2,
     core_stratum = 4,
     process_stratum = 6,
     thread_stratum = 8,
     record_stratum = 10
   };


Then I would be able to "inject" my:

...
   nto_core_ops.to_stratum = gdbarch_stratum + core_stratum;

/* But NO add_target(&nto_core_ops); */
...

Then, somewhere in core_open:


/* insert gdbarch specific core stratum just above 
core_stratum */
if (gdbarch_has_stratum (gdbarch_stratum + core_stratum))
     push_target (gdbarch_stratum (gdbarch_stratum + 
core_stratum));



Thanks,


-- 
Aleksandar Ristovski
QNX Software Systems


      reply	other threads:[~2009-06-10 20:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05 18:55 Aleksandar Ristovski
2009-06-05 19:03 ` Daniel Jacobowitz
2009-06-05 19:20   ` Aleksandar Ristovski
2009-06-05 19:24 ` Pedro Alves
2009-06-05 19:41   ` Aleksandar Ristovski
2009-06-06  0:01     ` Pedro Alves
2009-06-06  0:27     ` Pedro Alves
2009-06-09 16:10       ` Aleksandar Ristovski
2009-06-10 16:49         ` Pedro Alves
2009-06-10 20:38           ` Aleksandar Ristovski [this message]

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='h0p5k1$20e$1@ger.gmane.org' \
    --to=aristovski@qnx.com \
    --cc=gdb@sources.redhat.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