This is the mail archive of the 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: [RFA] windows-nat.c: Copy console information for new console

On Sat, May 22, 2010 at 12:28:51AM +0200, Pierre Muller wrote:
>  Using 
>(gdb) set new-console on
>on Windows native is nice for some features but is
>also terribly annoying sometimes.
>  Especially on nice big displays, because
>the newly created console is 25 lines times 80 columns 
>by default which is really not much when you usually work on
>60 or more lines.
>  This patch copies the values of the current console
>(if it exists) and uses the same parameters to start
>the new-console. I copied both the window and the buffer
>size (having a long buffer allows to see history of output...).
>  I did, on purpose not set the same position for the new
>console, which results in a usual shift to the left and down
>avoid a complete overlap of the windows.
>  This make using new-console much easier to use.
>A possible extension would be to be able to 
>specify these parameters with something like
>(gdb) set w32 console lines 45
>  There is apparently no way to specify the
>font. This might lead to windows size that are not optimal
>for the buffer size used, and it is calculated on the current 
>console font which might not be the default font. But I don't know
>how to find out what the default font is.
>  I tested this patch on Windows XP and on
>Windows 2008 64-bit run mingw64 GDB.
>Pierre Muller
>Pascal language support maintainer for GDB
>2010-05-21  Pierre Muller  <>
>	* windows-nat.c (GetConsoleFontSize, GetCurrentConsoleFont):
>	New macros.
>	(windows_create_inferior): Copy current console information
>	into SI structure if on a console if new-console is on.
>	(bad_GetCurrentConsoleFont, bad_GetConsoleFontSize): New functions.
>	(_initialize_loadable): Initialize GetConsoleFontSize and
>	GetCurrentConsoleFont.

I don't mind the concept but this function is becoming pretty big so I
would appreciate it if you would move all of the logic into a function.
Maybe call it "set_console_info()" and pass it &flags, &si.


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