This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,v2] Make language setting tests more robust


On 02/06/2017 08:54 AM, Luis Machado wrote:
On 02/02/2017 06:36 PM, Pedro Alves wrote:
On 02/01/2017 08:21 PM, Luis Machado wrote:

One case of the warning being displayed happens when one has debug
information
for glibc, which may cause GDB to identify the frame as having an "asm"
language. Therefore setting it to something else will get GDB's
attention.

This patch addresses the problem by creating a function in
lib/gdb.exp to
set the language. That function will also handle potential warnings
and check
to make sure the language was properly selected.

Sorry to be a naysayer, but I'm not sure about this.  :-(  I recall
fixing bugs
related to gdb printing that warning when it really should not, or
causing
regressions locally due to breaking that logic, with the testsuite
helping
notice them.  I worry that this would be hiding such bugs going forward.
Can you name the tests that where you saw the problem you mention?
Many of the tests
you're touching are changing the language after starting gdb with no
binary
loaded, even.  Those definitely should not ever warn.  There are a few
even that
have "no prompt when changing language"-like messages.

Sounds reasonable. I think i was slightly surprised that the message is
not coming from the command that sets the language
(set_language_command), but from some frame manipulation function that
gets called as part of determining the current language of the frame.

Nevermind. I think the message is actually being printed from execute_command (), after the "set language" gets executed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]