Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: your turn :-)
Date: Sun, 05 Sep 2004 00:14:00 -0000	[thread overview]
Message-ID: <20040905001449.GB1216@gnat.com> (raw)
In-Reply-To: <413A5649.8070205@gnu.org>

> oops, this should be deleted.  An earlier change modified set_reg_offset 
> to ignore NULL pointers.
> 
> >    -  this_cache = xrealloc (this_cache, SIZEOF_FRAME_SAVED_REGS);
> >    -  memset (this_cache, '\0', SIZEOF_FRAME_SAVED_REGS);
> 
> 
> >    +  this_cache->saved_regs = xrealloc (this_cache->saved_regs,
> >    +                                     SIZEOF_FRAME_SAVED_REGS);
> >    +  memset (this_cache->saved_regs, '\0', SIZEOF_FRAME_SAVED_REGS);

Of course, this was OB - vious!

> >What should heuristic_proc_desc do if the cache given is NULL.
> >Create a temporary one while scaning the function, and then
> >trash it?
> 
> No, the code should survive a NULL this_cache.

OK.

> >Another question that's troubling me: I can't see how mips_frame_cache
> >structs are deallocated. I am guessing that this happens when the
> >obstack is reset, but then that would mean that we leak the save_regs
> >array. ???
> 
> Right.  The deallocate occures each time the frame cache is flushed and 
> that occures over and over.

I was confused by the saved_regs array re-allocation above. I thought
that was what you meant when I saw that code, so I was confused. Now,
with these lines gone, I see the code allocating this array and it
becomes obvious too. I shouldn't be doing things in a hurry...

Thanks,
-- 
Joel


      reply	other threads:[~2004-09-05  0:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04  0:12 Andrew Cagney
2004-09-04 19:07 ` Joel Brobecker
2004-09-04 23:30   ` Joel Brobecker
2004-09-04 23:58   ` Andrew Cagney
2004-09-05  0:14     ` Joel Brobecker [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=20040905001449.GB1216@gnat.com \
    --to=brobecker@gnat.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@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