Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: Elena Zannoni <ezannoni@cygnus.com>, gdb@sourceware.cygnus.com
Subject: Re: Multiple personalities gdb?
Date: Thu, 20 Apr 2000 14:04:00 -0000	[thread overview]
Message-ID: <1000420210435.ZM14571@ocotillo.lan> (raw)
In-Reply-To: <14591.27151.916282.518234@kwikemart.cygnus.com>

On Apr 20,  4:35pm, Elena Zannoni wrote:

> I am wondering about these two constants:
> 
> gdb-stabs.h:41:#define	SECT_OFF_MAX	16	/* Count of possible values */
> 
> and 
> 
> symfile.h:64:#define MAX_SECTIONS 40

[...]

> Should MAX_SECTIONS == SECT_OFF_MAX ?

It seems reasonable.  (But see below.)

> 
> As I understand it, SECT_OFF_MAX is the maximum value that a section
> index can have. Souldn't it at least be increased? I have seen
> sections with indexes higher than 16.

I was the one who changed the value of MAX_SECTIONS recently.  40
seemed big enough for my purposes, but in my opinion, this data
structure should really be dynamically sized/resized.

Since you've been changing struct section_addr_info recently, maybe
you could change it a little bit more...  Maybe to something along the
following lines:

    struct section_addr_info {
      int num_sections;
      struct section_addr_info_sections
      {
	CORE_ADDR addr;
	char *name;
	int sectindex;
      } sections[1];
    };

Then when you need ``n'' sections, allocate as follows:

    struct section_addr_info saip;

    saip = xmalloc (sizeof (struct section_addr_info) 
	            + (n - 1) * sizeof (struct section_addr_info_sections));
    saip->num_sections = n;
    ...


  reply	other threads:[~2000-04-20 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-20 13:35 Elena Zannoni
2000-04-20 14:04 ` Kevin Buettner [this message]
2000-04-20 14:26   ` Elena Zannoni

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=1000420210435.ZM14571@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=ezannoni@cygnus.com \
    --cc=gdb@sourceware.cygnus.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