public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
* [Bug general/6561] New: second dwfl smashes first dwfl's sysroot
@ 2008-05-25 22:32 cagney at redhat dot com
  2008-06-11 19:36 ` [Bug general/6561] " cagney at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: cagney at redhat dot com @ 2008-05-25 22:32 UTC (permalink / raw)
  To: frysk-bugzilla

In the below, since the flags and callbacks are static, each call to dwflBegin
smashes the previous structure.

jlong
lib::dwfl::Dwfl::dwflBegin(jnixx::env env, jstring jsysroot) {
  jstringUTFChars sysroot = jsttringUTFChars(env, jsysroot);
  static char* flags;
  if (asprintf (&flags, ".debug:%s", sysroot) < 0)
    return (jlong) NULL;

  static Dwfl_Callbacks callbacks = {
    &::dwfl_frysk_proc_find_elf,
    &::dwfl_standard_find_debuginfo,
    NULL,
    &flags,
  };
  return (jlong) ::dwfl_begin(&callbacks);
}

-- 
           Summary: second dwfl smashes first dwfl's sysroot
           Product: frysk
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: frysk-bugzilla at sourceware dot org
        ReportedBy: cagney at redhat dot com
                CC: scox at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6561

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug general/6561] second dwfl smashes first dwfl's sysroot
  2008-05-25 22:32 [Bug general/6561] New: second dwfl smashes first dwfl's sysroot cagney at redhat dot com
@ 2008-06-11 19:36 ` cagney at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: cagney at redhat dot com @ 2008-06-11 19:36 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From cagney at redhat dot com  2008-06-11 19:35 -------
minecommit 4c67208accaec119dcda3f2ec795e8e98584a740
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Jun 3 16:32:15 2008 -0400

    Dynamically allocate/free the dwfl callback struct.
    
    The change to store a per-dwfl debug-info path in the dwfl callback
    struct wasn't accompanied by a change to allocate the callback struct
    dynamically.  Consequently each successive dwfl-begin call was
    overwriting the previous debug-info path.
    
    frysk-sys/lib/dwfl/ChangeLog
    2008-06-03  Andrew Cagney  <cagney@redhat.com>
    
        * Dwfl.java (callbackBegin, callbackEnd): New.
        (Dwfl(String), close()): Use.
        * cni/Dwfl.cxx: Update.
        * jni/Dwfl.cxx: Update.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=6561

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-11 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-25 22:32 [Bug general/6561] New: second dwfl smashes first dwfl's sysroot cagney at redhat dot com
2008-06-11 19:36 ` [Bug general/6561] " cagney at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).