|
Bugzilla – Full Text Bug Listing |
| Summary: | gdb history seems almost entirely broken | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | ell1e <el> |
| Component: | Development | Assignee: | Tom de Vries <tdevries> |
| Status: | NEW --- | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | el, matz |
| Version: | Current | Flags: | matz:
needinfo?
(el) |
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
ell1e
2024-04-04 21:55:35 UTC
In the cases that stuff works unexpectedly, what does (gdb) show history filename say, and does the file in question there contain the expected things or not? Do note that the default filename for saving history is ".gdb_history" in the _current directory_. So, when you do your gdb session in various directories and don't overwrite the history filename you will be given the history from whatever happened to be the history the last time you were in that very directory. (You may want to do a global search for that filename and see if you indeed have various random incarnations of it) (Also, assigning to gdb maintainer). Saving history is a feature I haven't used before, but I've read the docs now to understand what it's supposed to do. I agree with Michael that it looks like at least part of the problems reported in comment 0 can be caused by using the default history file which resides in the current directory. Anyway, I've now enabled it in my .gdbinit, like so: ... $ cat ~/.gdbinit set history filename ~/.gdb_history set history save on ... and I'll test-drive it for a while. I've tried out the use case of opening two gdb sessions at the same time, and the resulting history file looks sane, so at first glance there doesn't seem to any truncating going on there. The reported "the history only has half the commands I used in the previous session" may just be the history size parameter, defaulting to 256 taking effect. |