Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org,
	Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Subject: Re: [RFA] windows-nat.c: Copy console information for new console
Date: Tue, 25 May 2010 21:01:00 -0000	[thread overview]
Message-ID: <20100525205241.GA5298@ednor.casa.cgf.cx> (raw)
In-Reply-To: <001901caf934$fd580460$f8080d20$@muller@ics-cnrs.unistra.fr>

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  <muller@ics.u-strasbg.fr>
>
>	* 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.

cgf


  reply	other threads:[~2010-05-25 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 22:37 Pierre Muller
2010-05-25 21:01 ` Christopher Faylor [this message]
2010-05-26  8:07   ` Pierre Muller
2010-05-26 17:20     ` Christopher Faylor
2010-05-27  7:14       ` Pierre Muller
2010-05-27 12:59         ` Pierre Muller
2010-05-27 15:43           ` Christopher Faylor
2010-05-28 15:28             ` Pierre Muller
2010-05-30 18:00               ` Christopher Faylor
2010-06-01  6:57                 ` [RFC] windows-nat.c: New oddity after copy console information for new console patch Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100525205241.GA5298@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox