bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)


From: Testing Purposes
Subject: Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)
Date: Tue, 8 Dec 2020 02:22:07 -0500

On Tue, Dec 8, 2020 at 1:35 AM Eastern Time, Koichi Murase wrote:


> Because the information on the literal format used in the source code
> is lost in the executable `bash', you need to explicitly specify the
> format `0xMMmm' (i.e. %04x) to gdb like this:
>
> (gdb) printf "%04x\n", (int) rl_readline_version
> 0x0801
>
> --
> Koichi
>


I like your answer, Koichi.  You explained the full, "hidden" story behind
the output — and now it all makes sense.

For those who would like a single one-liner without using gdb in
interactive mode, you can simply run this command line:

gdb bash -batch -ex 'printf "%04x\n", (int) rl_readline_version'

In my case, since I'm using Bash 5.1, it generates this output:

0801

Which means that my brand-new build of Bash 5.1 is correctly using Readline
8.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]