public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Paul Schlie <schlie@comcast.net>
To: "insight@sources.redhat.com" <insight@sources.redhat.com>,
	Keith Seitz <keiths@redhat.com>
Subject: [patch] updates gdbtk to use lbasename() do to shared lib header tweaks.
Date: Thu, 26 May 2005 23:09:00 -0000	[thread overview]
Message-ID: <BEBBCF77.A49F%schlie@comcast.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

(patch enclosed as an attachment, so don't know if it's visible on boards)

-paul-



[-- Attachment #2: gdbtk.patch --]
[-- Type: text/plain, Size: 3152 bytes --]

2005-05-26  Paul Schlie   <schlie@comcast.net>

        * gdb/gdbtk/generic/gdbtk-bp.c, gdb/gdbtk/generic/gdbtk-cmds.c
        update to use lbasename() in lieu of basename() as the remaining
        of binutils and gdb sources do to avoid the link time error:
        "_basename_cannot_be_used_without_a_prototype" otherwise resulting
        for targets which may not support the basename() function call.


Index: gdb/gdbtk/generic/gdbtk-bp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-bp.c,v
retrieving revision 1.24
diff -c -3 -p -r1.24 gdbtk-bp.c
*** gdb/gdbtk/generic/gdbtk-bp.c        2 Jul 2004 22:00:56 -0000       1.24
--- gdb/gdbtk/generic/gdbtk-bp.c        26 May 2005 22:31:04 -0000
*************** gdb_set_bp (ClientData clientData, Tcl_I
*** 535,541 ****
    b->thread = thread;
  
    /* FIXME: this won't work for duplicate basenames! */
!   xasprintf (&buf, "%s:%d", basename (Tcl_GetStringFromObj (objv[1], NULL)),
             line);
    b->addr_string = xstrdup (buf);
    free(buf);
--- 535,541 ----
    b->thread = thread;
  
    /* FIXME: this won't work for duplicate basenames! */
!   xasprintf (&buf, "%s:%d", lbasename (Tcl_GetStringFromObj (objv[1], NULL)),
             line);
    b->addr_string = xstrdup (buf);
    free(buf);
Index: gdb/gdbtk/generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.88
diff -c -3 -p -r1.88 gdbtk-cmds.c
*** gdb/gdbtk/generic/gdbtk-cmds.c      17 Feb 2005 07:15:50 -0000      1.88
--- gdb/gdbtk/generic/gdbtk-cmds.c      26 May 2005 22:31:07 -0000
*************** gdb_listfiles (ClientData clientData, Tc
*** 1145,1153 ****
        if (psymtab->filename)
        {
          if (!len || !strncmp (pathname, psymtab->filename, len)
!             || !strcmp (psymtab->filename, basename (psymtab->filename)))
            {
!             files[numfiles++] = basename (psymtab->filename);
            }
        }
      }
--- 1145,1153 ----
        if (psymtab->filename)
        {
          if (!len || !strncmp (pathname, psymtab->filename, len)
!             || !strcmp (psymtab->filename, lbasename (psymtab->filename)))
            {
!             files[numfiles++] = lbasename (psymtab->filename);
            }
        }
      }
*************** gdb_listfiles (ClientData clientData, Tc
*** 1162,1170 ****
        if (symtab->filename && symtab->linetable && symtab->linetable->nitems)
        {
          if (!len || !strncmp (pathname, symtab->filename, len)
!             || !strcmp (symtab->filename, basename (symtab->filename)))
            {
!             files[numfiles++] = basename (symtab->filename);
            }
        }
      }
--- 1162,1170 ----
        if (symtab->filename && symtab->linetable && symtab->linetable->nitems)
        {
          if (!len || !strncmp (pathname, symtab->filename, len)
!             || !strcmp (symtab->filename, lbasename (symtab->filename)))
            {
!             files[numfiles++] = lbasename (symtab->filename);
            }
        }
      }

             reply	other threads:[~2005-05-26 23:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26 23:09 Paul Schlie [this message]
2005-05-27  1:31 ` Keith Seitz
2005-05-27  4:48   ` Paul Schlie
2005-05-27  6:07     ` Keith Seitz

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=BEBBCF77.A49F%schlie@comcast.net \
    --to=schlie@comcast.net \
    --cc=insight@sources.redhat.com \
    --cc=keiths@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).