symbol table loading

From: Terry R. Friedrichsen (terry_at_uplift.sunquest.com)
Date: Fri Jan 05 2001 - 13:59:25 GMT


Rod wrote:

> Looks like the symbol table reading code needs updating to ignore
> the bogus filenames for stripped libs. As a workaround, you can always
> just load symbols for your code. E.g. create a ~/.upsinit file with
>
> load foo
> load libfoo*
>
> See help -> init file. But then ups will know nothing about code not loaded,
> so you couldn't put a breakpoint in the C lib for instance.

I'll try to get a chance to look at the symbol table code to see if I can
discern what's happening ...

In the meantime, with the restriction noted, thanks for the tip on the
.upsinit file.  I've expanded the idea somewhat, so as to be able to
create project-specific .upsinit files, with the following patch.  This
looks for .upsinit in the current directory before looking for one in
the home directory, so you can set up specific .upsinit files for each
of your development projects.

Terry R. Friedrichsen

terry_at_venus.sunquest.com



*** tdr.c.dist  Fri Aug 25 14:51:25 2000
--- tdr.c       Fri Jan  5 06:38:46 2001
***************
*** 2563,2572 ****
  
    if (!home)
      return(0);
!   filename = malloc(strlen(home) + strlen("/.upsinit") + 1);
!   sprintf(filename, "%s/.upsinit", home);
!   if ((fp = fopen(filename, "r")) == NULL)
!     return(0);
    Replay_copy_fp = Replay_fp;
    Replay_fp = fp;
    Replay_copy_file_name = Replay_file_name;
--- 2563,2579 ----
  
    if (!home)
      return(0);
! 
!   /* look for a project-specific ups initialization file first */
!   filename = "./.upsinit";
!   if ((fp = fopen(filename, "r")) == NULL) {
!     filename = malloc(strlen(home) + strlen("/.upsinit") + 1);
!     sprintf(filename, "%s/.upsinit", home);
!     if ((fp = fopen(filename, "r")) == NULL) {
!       free((void *)filename);
!       return(0);
!     }
!   }
    Replay_copy_fp = Replay_fp;
    Replay_fp = fp;
    Replay_copy_file_name = Replay_file_name;


This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:33 GMT