Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Add one "const" keyword
Date: Thu, 12 Sep 2002 16:51:00 -0000	[thread overview]
Message-ID: <20020912235127.GM1105@gnat.com> (raw)

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

This is a preliminary cleanup before I (re)submit a new architecture
field (see http://sources.redhat.com/ml/gdb-patches/2002-09/msg00215.html)

2002-09-12  Joel Brobecker  <brobecker@gnat.com>

        * value.h (find_function_in_inferior): Add const keyword to
        one of the parameters. Allows us to invoke this function with
        a const char *.
        * valops.c (find_function_in_inferior): Likewise.

Tested on Linux. Ok to apply?

Thanks,
-- 
Joel

[-- Attachment #2: const.diff --]
[-- Type: text/plain, Size: 1607 bytes --]

Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.33
diff -c -3 -p -r1.33 value.h
*** value.h	1 Aug 2002 17:18:33 -0000	1.33
--- value.h	12 Sep 2002 23:46:46 -0000
*************** extern struct value *value_literal_compl
*** 558,564 ****
  extern void find_rt_vbase_offset (struct type *, struct type *, char *, int,
  				  int *, int *);
  
! extern struct value *find_function_in_inferior (char *);
  
  extern struct value *value_allocate_space_in_inferior (int);
  
--- 558,564 ----
  extern void find_rt_vbase_offset (struct type *, struct type *, char *, int,
  				  int *, int *);
  
! extern struct value *find_function_in_inferior (const char *);
  
  extern struct value *value_allocate_space_in_inferior (int);
  
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.69
diff -c -3 -p -r1.69 valops.c
*** valops.c	21 Aug 2002 17:24:31 -0000	1.69
--- valops.c	12 Sep 2002 23:46:48 -0000
*************** int unwind_on_signal_p = 0;
*** 95,101 ****
  /* Find the address of function name NAME in the inferior.  */
  
  struct value *
! find_function_in_inferior (char *name)
  {
    register struct symbol *sym;
    sym = lookup_symbol (name, 0, VAR_NAMESPACE, 0, NULL);
--- 95,101 ----
  /* Find the address of function name NAME in the inferior.  */
  
  struct value *
! find_function_in_inferior (const char *name)
  {
    register struct symbol *sym;
    sym = lookup_symbol (name, 0, VAR_NAMESPACE, 0, NULL);

             reply	other threads:[~2002-09-12 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 16:51 Joel Brobecker [this message]
2002-09-12 17:13 ` Andrew Cagney
2002-09-12 17:28   ` Joel Brobecker
2002-09-12 17:43     ` Andrew Cagney

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=20020912235127.GM1105@gnat.com \
    --to=brobecker@gnat.com \
    --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