Из-за большого числа зарегистрированных пользователей максимальное количество персональных проектов ограничено до 3. Для снятия ограничений на количество проектов заполните форму присоединения к Openelbrus.

Skip to content
Snippets Groups Projects
Commit 3d87245c authored by Hannes Domani's avatar Hannes Domani
Browse files

Handle void results as unformatted prints

When printing void results without any format letter, they are output
as expected:
(gdb) p $abcd
$1 = void
(gdb) p (void)10
$2 = void

But if any format letter (besides s) is used, it always outputs zero:
(gdb) p/x $abcd
$3 = 0x0
(gdb) p/x (void)10
$4 = 0x0

So this adds void results to the types handled like unformatted prints.

gdb/ChangeLog:

2020-10-09  Hannes Domani  <ssbssa@yahoo.de>

	PR exp/26714
	* printcmd.c (print_formatted): Handle void results as
	unformatted prints.

gdb/testsuite/ChangeLog:

2020-10-09  Hannes Domani  <ssbssa@yahoo.de>

	PR exp/26714
	* gdb.base/printcmds.exp: Add tests for void results.
parent bbb826f5
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment