[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
- Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Testing Purposes, 2020/12/07
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Clark Wang, 2020/12/07
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Andreas Schwab, 2020/12/08
- Re: [EXT] Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Greg Wooledge, 2020/12/08
- Re: [EXT] Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Andreas Schwab, 2020/12/08
- Re: [EXT] Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), L A Walsh, 2020/12/09
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Testing Purposes, 2020/12/08
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Lawrence Velázquez, 2020/12/08
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Testing Purposes, 2020/12/08
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Chet Ramey, 2020/12/08
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Testing Purposes, 2020/12/09
- Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?), Chet Ramey, 2020/12/09