Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #72618

Re: Getting sensible information from gdb

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Getting sensible information from gdb
Date Mon, 12 Oct 2015 08:00:55 -0700
Organization None to speak of
Lines 30
Message-ID <lnvbacb07s.fsf@kst-u.example.com> (permalink)
References <mvecqu$b25$1@speranza.aioe.org> <d80t0nFqg8oU1@mid.individual.net> <mvfgr5$j5f$1@speranza.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="29289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196QhPhuIyzuqTnkFJfdtWH"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock sha1:MbiVR4xd7Z0/BZ2eEen3Kj6wXmg= sha1:CC3fHSSjtp+tpN4zcDUW5ymZsCc=
Xref csiph.com comp.lang.c:72618

Show key headers only | View raw


"Morten W. Petersen" <morphex@gmail.com> writes:
> On 12.10.2015 06:59, Ian Collins wrote:
[...]
>> "#define CONST const"
>>
>> Why would you male const optional?  What is const is and what isn't isn't!
>
> Profiling.  What are the speed benefits of constants..  mostly
> out of curiosity.

"const" and "constant" are two very different things, even though
the keyword "const" is obviously derived from the English word
"constant".

The "const" keyword really means "read-only".  A "constant" is a
literal, such as 42, 1.23, or 'x'.  A "constant expression" is one
that can be evaluated at compile time.

For example, this:
    const int r = rand();
is perfectly valid and meaningful; r is const, but obviously not
constant.

[...]

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-11 21:21 +0200
  Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 14:47 -0700
    Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 00:07 +0200
      Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 16:15 -0700
        Re: Getting sensible information from gdb James Kuyper <jameskuyper@verizon.net> - 2015-10-11 21:02 -0400
          Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 18:55 -0700
            Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 04:04 +0200
              Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 19:37 -0700
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 05:16 +0200
            Re: Getting sensible information from gdb James Kuyper <jameskuyper@verizon.net> - 2015-10-12 00:01 -0400
              Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 06:06 +0200
                Re: Getting sensible information from gdb James Kuyper <jameskuyper@verizon.net> - 2015-10-12 00:48 -0400
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 07:08 +0200
          Re: Getting sensible information from gdb Keith Thompson <kst-u@mib.org> - 2015-10-11 18:56 -0700
    Re: Getting sensible information from gdb Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-11 18:14 -0400
      Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 00:20 +0200
        Re: Getting sensible information from gdb James Kuyper <jameskuyper@verizon.net> - 2015-10-11 21:07 -0400
          Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 03:59 +0200
            Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 23:21 -0700
              Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 23:32 -0700
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 08:42 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-12 17:13 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 23:50 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-13 01:39 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-13 03:04 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-13 14:13 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-13 16:26 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-13 17:16 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-13 18:27 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-14 00:17 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-14 02:26 +0200
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-14 03:59 +0200
                Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-14 13:04 +0100
                Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-15 12:48 +0200
              Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 08:41 +0200
      Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 16:18 -0700
        Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 01:22 +0200
          Re: Getting sensible information from gdb Geoff <geoff@invalid.invalid> - 2015-10-11 16:42 -0700
            Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 02:16 +0200
  Getting sensible information from gdb "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-11 18:59 -0700
    Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 04:09 +0200
      Re: Getting sensible information from gdb "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-11 19:28 -0700
        Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 04:59 +0200
          Re: Getting sensible information from gdb "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-12 07:10 -0700
            Re: Getting sensible information from gdb Rosario19 <Ros@invalid.invalid> - 2015-10-12 19:41 +0200
  Re: Getting sensible information from gdb Ian Collins <ian-news@hotmail.com> - 2015-10-12 17:59 +1300
    Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 07:36 +0200
      Re: Getting sensible information from gdb Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-11 22:59 -0700
        Re: Getting sensible information from gdb "Morten W. Petersen" <morphex@gmail.com> - 2015-10-12 08:27 +0200
          Re: Getting sensible information from gdb Johann Klammer <klammerj@NOSPAM.a1.net> - 2015-10-12 10:55 +0200
          Re: Getting sensible information from gdb Keith Thompson <kst-u@mib.org> - 2015-10-12 08:04 -0700
          Re: Getting sensible information from gdb Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-12 17:35 +0100
      Re: Getting sensible information from gdb Keith Thompson <kst-u@mib.org> - 2015-10-12 08:00 -0700
      Re: Getting sensible information from gdb James Kuyper <jameskuyper@verizon.net> - 2015-10-12 12:25 -0400

csiph-web