Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: Shell escape in the DJGPP port of GDB
       [not found] <37BDA912.4AA1190D@cygnus.com>
@ 1999-08-20 12:20 ` DJ Delorie
       [not found]   ` <37BDAD71.510A96A1@cygnus.com>
  0 siblings, 1 reply; 2+ messages in thread
From: DJ Delorie @ 1999-08-20 12:20 UTC (permalink / raw)
  To: fnasser; +Cc: Eliz, gdb-patches, shebs

DOS-based programs don't get a separate working directory per process;
the current working directory is a global resource.  Thus, if the
child process changes the directory for itself, it changes the
directory for gdb also.  Thus, the chdir() back to the original
directory is a safety for all dos-like environments.

In unix it should be completely unneeded, because unix itself isolates
such changes within the child process.
From dj@delorie.com Fri Aug 20 13:06:00 1999
From: DJ Delorie <dj@delorie.com>
To: fnasser@cygnus.com
Cc: Eliz@is.elta.co.il, gdb-patches@sourceware.cygnus.com, shebs@cygnus.com
Subject: Re: Shell escape in the DJGPP port of GDB
Date: Fri, 20 Aug 1999 13:06:00 -0000
Message-id: <199908202005.QAA26613@envy.delorie.com>
References: <37BDA912.4AA1190D@cygnus.com> <199908201917.PAA26278@envy.delorie.com> <37BDAD71.510A96A1@cygnus.com>
X-SW-Source: 1999-q3/msg00193.html
Content-length: 260

Oh, in that case, leaving it in for non-djgpp systems is OK as it only
sets the cwd to what gdb thinks the cwd is anyway.  It's safe (but
wasteful) to run it on the CAN_FORK side too, for example.  The ifdef
was probably just for performance on other systems.
From jtc@redback.com Fri Aug 20 16:38:00 1999
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: remote.c run-length encoding patch
Date: Fri, 20 Aug 1999 16:38:00 -0000
Message-id: <5mr9kyhvln.fsf@jtc.redbacknetworks.com>
X-SW-Source: 1999-q3/msg00194.html
Content-length: 4316

The Cisco remote protocol varient (notice that I didn't say mutant
remote protocol this time :-) uses two hex characters instead of a
ASCII encoding for the run length but is otherwise the same as the
standard protocol.

However, the code implementing the decoding is quite different for the
two encodings.  The standard encoding is expanded as the packet is
read, while the Cisco varient reads the entire packet and then expands
it in place (actually it expands it to another buffer, and the copies
that buffer into the first).  Unlike the code implementing the
standard encoding, the Cisco varient does not detect a packet that
would expand to larger than the buffer size, which could lead to
corruption within GDB.

In this patch, I decided to handle both encodings in the same manner.

        --jtc

1999-08-20  J.T. Conklin  <jtc@redback.com>

	* remote.c (read_frame): expand cisco run-length encoding variant
 	inline as is done for the standard encoding.
	(remote_cisco_expand): Removed.

Index: remote.c
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/remote.c,v
retrieving revision 1.1.1.12
diff -c -r1.1.1.12 remote.c
*** remote.c	1999/08/11 04:07:51	1.1.1.12
--- remote.c	1999/08/20 22:35:48
***************
*** 3530,3562 ****
  
  static int remote_cisco_mode;
  
- static void
- remote_cisco_expand (src, dest)
-      char *src;
-      char *dest;
- {
-   int i;
-   int repeat;
- 
-   do
-     {
-       if (*src == '*')
- 	{
- 	  repeat = (fromhex (src[1]) << 4) + fromhex (src[2]);
- 	  for (i = 0; i < repeat; i++)
- 	    {
- 	      *dest++ = *(src - 1);
- 	    }
- 	  src += 2;
- 	}
-       else
- 	{
- 	  *dest++ = *src;
- 	}
-     }
-   while (*src++);
- }
- 
  /* Come here after finding the start of the frame.  Collect the rest
     into BUF, verifying the checksum, length, and handling run-length
     compression.  Returns 0 on any error, 1 on success.  */
--- 3530,3535 ----
***************
*** 3597,3612 ****
  	    pktcsum |= fromhex (readchar (remote_timeout));
  
  	    if (csum == pktcsum)
! 	      {
! 		if (remote_cisco_mode)	/* variant run-length-encoding */
! 		  {
! 		    char *tmp_buf = alloca (PBUFSIZ);
! 
! 		    remote_cisco_expand (buf, tmp_buf);
! 		    strcpy (buf, tmp_buf);
! 		  }
! 		return 1;
! 	      }
  
  	    if (remote_debug)
  	      {
--- 3570,3576 ----
  	    pktcsum |= fromhex (readchar (remote_timeout));
  
  	    if (csum == pktcsum)
!               return 1;
  
  	    if (remote_debug)
  	      {
***************
*** 3619,3645 ****
  	    return 0;
  	  }
  	case '*':		/* Run length encoding */
! 	  if (remote_cisco_mode == 0)	/* variant run-length-encoding */
! 	    {
! 	      csum += c;
! 	      c = readchar (remote_timeout);
! 	      csum += c;
! 	      c = c - ' ' + 3;	/* Compute repeat count */
! 
! 	      if (c > 0 && c < 255 && bp + c - 1 < buf + PBUFSIZ - 1)
! 		{
! 		  memset (bp, *(bp - 1), c);
! 		  bp += c;
! 		  continue;
! 		}
! 
! 	      *bp = '\0';
! 	      printf_filtered ("Repeat count %d too large for buffer: ", c);
! 	      puts_filtered (buf);
! 	      puts_filtered ("\n");
! 	      return 0;
! 	    }
! 	  /* else fall thru to treat like default */
  	default:
  	  if (bp < buf + PBUFSIZ - 1)
  	    {
--- 3583,3625 ----
  	    return 0;
  	  }
  	case '*':		/* Run length encoding */
!           {
! 	    int repeat;
!  	    csum += c;
! 
! 	    if (remote_cisco_mode == 0)
! 	      {
! 		c = readchar (remote_timeout);
! 		csum += c;
! 		repeat = c - ' ' + 3;	/* Compute repeat count */
! 	      }
! 	    else 
! 	      { 
! 		/* Cisco's run-length encoding variant uses two 
! 		   hex chars to represent the repeat count. */
! 
! 		c = readchar (remote_timeout);
! 		csum += c;
! 		repeat  = fromhex (c) << 4;
! 		c = readchar (remote_timeout);
! 		csum += c;
! 		repeat += fromhex (c);
! 	      }
! 
! 	    if (repeat > 0 && repeat <= 255 
!                 && bp + repeat - 1 < buf + PBUFSIZ - 1)
! 	      {
! 		memset (bp, *(bp - 1), repeat);
! 		bp += c;
! 		continue;
! 	      }
! 
! 	    *bp = '\0';
! 	    printf_filtered ("Repeat count %d too large for buffer: ", repeat);
! 	    puts_filtered (buf);
! 	    puts_filtered ("\n");
! 	    return 0;
! 	  }
  	default:
  	  if (bp < buf + PBUFSIZ - 1)
  	    {


-- 
J.T. Conklin
RedBack Networks
From jtc@redback.com Fri Aug 20 16:58:00 1999
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: patch to top.c: DEFAULT_PROMPT
Date: Fri, 20 Aug 1999 16:58:00 -0000
Message-id: <5m4shungx3.fsf@jtc.redbacknetworks.com>
X-SW-Source: 1999-q3/msg00195.html
Content-length: 1949

While browsing through top.c, I saw that the default prompt was set to
"(gdb)" if DEFAULT_PROMPT was not defined, otherwise to DEFAULT_PROMPT.
As this is done in different ways depending on async_p, it seems a bit
cleaner to me if DEFAULT_PROMPT is set to "(gdb)" if not overriden by
target/host config files --- similar to how GDBINIT_FILENAME is done
today.

        --jtc

1999-08-20  J.T. Conklin  <jtc@redback.com>

	* top.c (DEFAULT_PROMPT): Set to "(gdb)" if not already defined.
	(init_main): Always use DEFAULT_PROMPT.

Index: top.c
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/top.c,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 top.c
*** top.c	1999/08/11 04:08:18	1.1.1.10
--- top.c	1999/08/20 23:51:11
***************
*** 158,163 ****
--- 158,169 ----
  #define ISATTY(FP)	(isatty (fileno (FP)))
  #endif
  
+ /* Default command line prompt.  This is overriden in some configs. */
+ 
+ #ifndef DEFAULT_PROMPT
+ #define DEFAULT_PROMPT	"(gdb)"
+ #endif
+ 
  /* Initialization file name for gdb.  This is overridden in some configs.  */
  
  #ifndef	GDBINIT_FILENAME
***************
*** 3807,3817 ****
       we initialize the prompts differently. */
    if (!async_p)
      {
- #ifdef DEFAULT_PROMPT
        gdb_prompt_string = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
- #else
-       gdb_prompt_string = savestring ("(gdb) ", 6);
- #endif
      }
    else
      {
--- 3813,3819 ----
***************
*** 3819,3829 ****
           whatever the DEFAULT_PROMPT is. */
        the_prompts.top = 0;
        PREFIX (0) = "";
- #ifdef DEFAULT_PROMPT
        PROMPT (0) = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
- #else
-       PROMPT (0) = savestring ("(gdb) ", 6);
- #endif
        SUFFIX (0) = "";
        /* Set things up for annotation_level > 1, if the user ever decides
           to use it. */
--- 3821,3827 ----


-- 
J.T. Conklin
RedBack Networks
From msnyder@cygnus.com Fri Aug 20 17:01:00 1999
From: Michael Snyder <msnyder@cygnus.com>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: patch to top.c: DEFAULT_PROMPT
Date: Fri, 20 Aug 1999 17:01:00 -0000
Message-id: <37BDEC44.7585@cygnus.com>
References: <5m4shungx3.fsf@jtc.redbacknetworks.com>
X-SW-Source: 1999-q3/msg00196.html
Content-length: 439

J.T. Conklin wrote:
> 
> While browsing through top.c, I saw that the default prompt was set to
> "(gdb)" if DEFAULT_PROMPT was not defined, otherwise to DEFAULT_PROMPT.
> As this is done in different ways depending on async_p, it seems a bit
> cleaner to me if DEFAULT_PROMPT is set to "(gdb)" if not overriden by
> target/host config files --- similar to how GDBINIT_FILENAME is done
> today.

J.T., don't you have any work to do???
;-)
From jtc@redback.com Fri Aug 20 18:26:00 1999
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: patch to write_dollar_variable()
Date: Fri, 20 Aug 1999 18:26:00 -0000
Message-id: <5maerlncv8.fsf@jtc.redbacknetworks.com>
X-SW-Source: 1999-q3/msg00197.html
Content-length: 2185

As previously discussed on the gdb list, this patch is necessary.  At
least until symbol table handling is greatly improved... :-)

        --jtc


1999-08-20  J.T. Conklin  <jtc@redback.com>

	* parse.c (write_dollar_variable): If HPUXHPPA is not defined,
 	don't search for $ variables in the symbol table.  Worst case
 	symbol table lookup performance is extremely poor.  This causes
 	GDB scripts that use convenience variables to execute so slowly
	to be almost unusable.

Index: parse.c
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/parse.c,v
retrieving revision 1.1.1.8
diff -c -r1.1.1.8 parse.c
*** parse.c	1999/07/20 21:37:54	1.1.1.8
--- parse.c	1999/08/21 01:23:44
***************
*** 459,467 ****
  {
    /* Handle the tokens $digits; also $ (short for $0) and $$ (short for $$1)
       and $$digits (equivalent to $<-digits> if you could type that). */
! 
    struct symbol *sym = NULL;
    struct minimal_symbol *msym = NULL;
  
    int negate = 0;
    int i = 1;
--- 459,468 ----
  {
    /* Handle the tokens $digits; also $ (short for $0) and $$ (short for $$1)
       and $$digits (equivalent to $<-digits> if you could type that). */
! #if defined(HPUXHPPA)
    struct symbol *sym = NULL;
    struct minimal_symbol *msym = NULL;
+ #endif
  
    int negate = 0;
    int i = 1;
***************
*** 496,505 ****
--- 497,510 ----
    if (i >= 0)
      goto handle_register;
  
+ #if defined(HPUXHPPA)
    /* On HP-UX, certain system routines (millicode) have names beginning
       with $ or $$, e.g. $$dyncall, which handles inter-space procedure
       calls on PA-RISC. Check for those, first. */
  
+   /* This code is not enabled on non HP-UX systems, since worst case 
+      symbol table lookup performance is awful, to put it mildly. */
+ 
    sym = lookup_symbol (copy_name (str), (struct block *) NULL,
  		       VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL);
    if (sym)
***************
*** 518,523 ****
--- 523,529 ----
  			 builtin_type_int);
        return;
      }
+ #endif
  
    /* Any other names starting in $ are debugger internal variables.  */
  
-- 
J.T. Conklin
RedBack Networks
From ac131313@cygnus.com Fri Aug 20 18:41:00 1999
From: Andrew Cagney <ac131313@cygnus.com>
To: jtc@redback.com, Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: remote.c run-length encoding patch
Date: Fri, 20 Aug 1999 18:41:00 -0000
Message-id: <37BE0366.A512A504@cygnus.com>
References: <5mr9kyhvln.fsf@jtc.redbacknetworks.com>
X-SW-Source: 1999-q3/msg00198.html
Content-length: 1002

"J.T. Conklin" wrote:
> 
> The Cisco remote protocol varient (notice that I didn't say mutant
> remote protocol this time :-) uses two hex characters instead of a
> ASCII encoding for the run length but is otherwise the same as the
> standard protocol.
> 
> However, the code implementing the decoding is quite different for the
> two encodings.  The standard encoding is expanded as the packet is
> read, while the Cisco varient reads the entire packet and then expands
> it in place (actually it expands it to another buffer, and the copies
> that buffer into the first).  Unlike the code implementing the
> standard encoding, the Cisco varient does not detect a packet that
> would expand to larger than the buffer size, which could lead to
> corruption within GDB.

I've an alternate patch to this laying around here :-)

> In this patch, I decided to handle both encodings in the same manner.
> 
>         --jtc

Thanks.  Michael, can you confirm that the change works on a cisco
target?

	Andrew
From ac131313@cygnus.com Fri Aug 20 18:49:00 1999
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Kahlin <tlr@netinsight.se>
Cc: gdb-patches@sourceware.cygnus.com, "seved.torstendahl@netinsight.se" <seved.torstendahl@netinsight.se>, ace@netinsight.se, psim@ci.com.au
Subject: Re: psim bug
Date: Fri, 20 Aug 1999 18:49:00 -0000
Message-id: <37BE0593.3326917F@cygnus.com>
References: <37BD6FCA.C433AC4E@netinsight.se>
X-SW-Source: 1999-q3/msg00199.html
Content-length: 830

Daniel Kahlin wrote:
> 
> Hi,
> 
> BUG:
>   When loading sections using 'psim' they incorrectly get placed at their
>   respective VMA's instead of their LMA's.  This makes debugging of romable
>   code impossible, because crt0.S will break when it tries to copy the
>   .data section into ram.
> 
> FIX:
>   Always load sections to their LMA.
>   If the LMA and the VMA differ, mark the LMA area read-only, and
>   allocate the VMA area filling it with zeroes.

It may or may not be a bug.  It really depends on the emulation mode
being used.  Can you post the output from:

	.....-run -t dump-device-tree <program>

thanks,
	Andrew


PS: Please submit patches as text attachments and not as compressed tar
archives (no matter how big :-).  That way the reviewer can quickly
exmaine the change and determine if it is applicable.
From ac131313@cygnus.com Sat Aug 21 22:30:00 1999
From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: FYI, move ``enum lval_type'' to defs.h
Date: Sat, 21 Aug 1999 22:30:00 -0000
Message-id: <37BF89E8.DB24AF75@cygnus.com>
X-SW-Source: 1999-q3/msg00200.html
Content-length: 4418

FYI,

I've checked in the attached patch.  It moves the declaration of enum
lval_type to defs.h so that it is visible across all header files (yuck
:-).

Hopefully that was the last remaining incomplete enum declaration.

	enjoy,
		Andrew

Sun Aug 22 14:49:40 1999  Andrew Cagney  <cagney@b1.cygnus.com>

	* value.h (enum lval_type): Move declaration from here.
	* defs.h (enum lval_type): To here.
	* frame.h, gdbarch.h: Delete incomplete declaration of ``enum
 	lval_type''.
Index: defs.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/defs.h,v
retrieving revision 1.246
diff -p -r1.246 defs.h
*** defs.h	1999/08/11 01:46:26	1.246
--- defs.h	1999/08/22 05:23:59
*************** extern char *symtab_to_filename PARAMS (
*** 574,583 ****
  
  extern int read_relative_register_raw_bytes PARAMS ((int, char *));
  
! #if __STDC__
! enum lval_type;
  struct frame_info;
! #endif
  void default_get_saved_register PARAMS ((char *raw_buffer, int *optimized,
  					 CORE_ADDR *addrp,
  					 struct frame_info *frame, int regnum,
--- 574,602 ----
  
  extern int read_relative_register_raw_bytes PARAMS ((int, char *));
  
! /* Possible lvalue types.  Like enum language, this should be in
!    value.h, but needs to be here for the same reason. */
! 
! enum lval_type
!   {
!     /* Not an lval. */
!     not_lval,
!     /* In memory.  Could be a saved register.  */
!     lval_memory,
!     /* In a register.  */
!     lval_register,
!     /* In a gdb internal variable.  */
!     lval_internalvar,
!     /* Part of a gdb internal variable (structure field).  */
!     lval_internalvar_component,
!     /* In a register series in a frame not the current one, which may have been
!        partially saved or saved in different places (otherwise would be
!        lval_register or lval_memory).  */
!     lval_reg_frame_relative
!   };
! 
  struct frame_info;
! 
  void default_get_saved_register PARAMS ((char *raw_buffer, int *optimized,
  					 CORE_ADDR *addrp,
  					 struct frame_info *frame, int regnum,
Index: frame.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/frame.h,v
retrieving revision 1.41
diff -p -r1.41 frame.h
*** frame.h	1999/07/07 23:51:07	1.41
--- frame.h	1999/08/22 05:24:02
*************** extern void generic_fix_call_dummy PARAM
*** 247,257 ****
  					    int nargs, struct value ** args,
  					    struct type * type, int gcc_p));
  
- #ifdef __STDC__
- /* Some native compilers, even ones that are supposed to be ANSI and for which __STDC__
-    is true, complain about forward decls of enums. */
- enum lval_type;
  extern void generic_get_saved_register PARAMS ((char *, int *, CORE_ADDR *, struct frame_info *, int, enum lval_type *));
- #endif
  
  #endif /* !defined (FRAME_H)  */
--- 247,252 ----
Index: gdbarch.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbarch.h,v
retrieving revision 2.55
diff -p -r2.55 gdbarch.h
*** gdbarch.h	1999/08/08 07:19:45	2.55
--- gdbarch.h	1999/08/22 05:24:04
***************
*** 26,32 ****
  #ifdef __STDC__
  struct frame_info;
  struct value;
- enum lval_type;
  #endif
  
  
--- 26,31 ----
Index: value.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/value.h,v
retrieving revision 1.81
diff -p -r1.81 value.h
*** value.h	1999/07/07 23:52:08	1.81
--- value.h	1999/08/22 05:24:08
***************
*** 27,49 ****
   * be possible for a program lval value to survive over a call to the inferior
   * (ie to be put into the history list or an internal variable).
   */
- enum lval_type
-   {
-     /* Not an lval.  */
-     not_lval,
-     /* In memory.  Could be a saved register.  */
-     lval_memory,
-     /* In a register.  */
-     lval_register,
-     /* In a gdb internal variable.  */
-     lval_internalvar,
-     /* Part of a gdb internal variable (structure field).  */
-     lval_internalvar_component,
-     /* In a register series in a frame not the current one, which may have been
-        partially saved or saved in different places (otherwise would be
-        lval_register or lval_memory).  */
-     lval_reg_frame_relative
-   };
  
  struct value
    {
--- 27,32 ----



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

* Re: Shell escape in the DJGPP port of GDB
       [not found]         ` <199908202013.QAA26688@envy.delorie.com>
@ 1999-08-22  3:14           ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 1999-08-22  3:14 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: DJ Delorie, gdb-patches, Michael Snyder

> One more question: is it really necessary to put the  chdir() call under
> ifdef __DJGPP__ or is it just for saving time when it is not necessary?

Actually, I *did* have a reason for #ifdef'ing that call to chdir.
But it wasn't performance what I was thinking about.  My reason was
that on all DOS/Windows systems chdir doesn't change the current
drive.  So, if GDB called `system' when the current working directory
was "d:/foo/bar", and whatever program(s) that were run by `system'
changed to a directory "c:/usr/bin", then calling chdir won't return
you to "d:/foo/bar" without an additional system call which switches
to drive D: as well.  DJGPP's chdir does that automagically.

I didn't want this problem to be swept under the carpet when (and if)
the source is compiled with anything other than DJGPP.  If I left
chdir there for non-DJGPP environments, they would only see the bug in
the rare cases that the drive is changed during `system', which makes
the bug much less visible and harder to debug.

Of course, if DJGPP is the only environment that is supposed to use
this branch of code, then the #ifdef can be safely removed.
From ac131313@cygnus.com Mon Aug 23 03:15:00 1999
From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: For review: build libgdb.a and then build gdb
Date: Mon, 23 Aug 1999 03:15:00 -0000
Message-id: <37C11D42.62D71737@cygnus.com>
X-SW-Source: 1999-q3/msg00202.html
Content-length: 4127

Hello,

The attached patch changes the final GDB build into a two stage process
- build a library and then link GDB against that.  The final objective
is to simplify the task of integrating things like insight.

At the same time I flushed a few remaining references to the old libgdb.

	Andrew

Mon Aug 23 19:36:17 1999  Andrew Cagney  <cagney@b1.cygnus.com>

        * Makefile.in (libgdb.a): New target.
        (gdb$(EXEEXT)): Add dependency on libgdb.a.
        (libgdb-files, LIBGDB_OBS, libgdb, LIBGDBDEPS, LIBGDBFILES):
Delete.
Index: Makefile.in
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/Makefile.in,v
retrieving revision 1.687
diff -p -r1.687 Makefile.in
*** Makefile.in	1999/08/16 20:42:54	1.687
--- Makefile.in	1999/08/23 10:05:16
*************** COMMON_OBS = version.o blockframe.o brea
*** 606,615 ****
  	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
  	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
  
! OBS = $(COMMON_OBS) $(ANNOTATE_OBS) main.o
  
- LIBGDB_OBS = 
- 
  TSOBS = inflow.o
  
  NTSOBS = standalone.o
--- 606,613 ----
  	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
  	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
  
! OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
  
  TSOBS = inflow.o
  
  NTSOBS = standalone.o
*************** init.c: $(OBS) $(TSOBS)
*** 747,774 ****
  .PRECIOUS: init.c
  
  # Removing the old gdb first works better if it is running, at least on SunOS.
! gdb$(EXEEXT): $(OBS) $(BUILD_TUI) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
  	rm -f gdb$(EXEEXT)
! 	$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \
! 	  init.o $(OBS) $(TSOBS) $(TUI_LIBRARY) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
  
  nlm:	force
  	rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
- 
- libgdb:	libgdb-files $(LIBGDB_OBS)
  
! # libproc is not listed here because all-libproc is a dependency of all-gui,
! # not all-gdb, and thus might be built after us.
! LIBGDBDEPS=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
! # libproc needs to be before libiberty for alloca.
! LIBGDBFILES=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) ../libproc/libproc.a \
!   $(ADD_DEPS) $(CDEPS) init.o
! 
! libgdb-files: $(LIBGDBDEPS) Makefile.in
! 	-rm -f libgdb-files
! 	for i in $(LIBGDBFILES); do\
! 		echo $$i >> libgdb-files;\
! 	done
  
  saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  	#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
--- 745,766 ----
  .PRECIOUS: init.c
  
  # Removing the old gdb first works better if it is running, at least on SunOS.
! gdb$(EXEEXT): libgdb.a $(ADD_DEPS) $(CDEPS)
  	rm -f gdb$(EXEEXT)
! 	$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) main.o libgdb.a $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
  
  nlm:	force
  	rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
  
! # Create a library of the gdb object files and build GDB by linking
! # against that.
! #
! # init.o is very important.  It pulls in the rest of GDB.
! LIBGDB_OBS= $(OBS) $(TSOBS) $(ADD_FILES) init.o
! libgdb.a: $(LIBGDB_OBS)
! 	-rm -f libgdb.a
! 	$(AR) q libgdb.a $(LIBGDB_OBS)
! 	$(RANLIB) libgdb.a
  
  saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  	#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
*************** clean mostlyclean:
*** 858,864 ****
  	@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do 
  	rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
  	rm -f init.c version.c
! 	rm -f gdb$(EXEEXT) core make.log libgdb-files
  	rm -f gdb[0-9]$(EXEEXT)
  
  # This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
--- 850,856 ----
  	@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do 
  	rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
  	rm -f init.c version.c
! 	rm -f gdb$(EXEEXT) core make.log
  	rm -f gdb[0-9]$(EXEEXT)
  
  # This used to depend on c-exp.tab.c m2-exp.tab.c TAGS



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

end of thread, other threads:[~1999-08-22  3:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <37BDA912.4AA1190D@cygnus.com>
1999-08-20 12:20 ` Shell escape in the DJGPP port of GDB DJ Delorie
     [not found]   ` <37BDAD71.510A96A1@cygnus.com>
     [not found]     ` <199908202005.QAA26613@envy.delorie.com>
     [not found]       ` <37BDB5E2.4318@cygnus.com>
     [not found]         ` <199908202013.QAA26688@envy.delorie.com>
1999-08-22  3:14           ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox