public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Does GDB has 'quiet mode', and does GDB has APIs for writing log
@ 2015-03-30  7:33 Fei Ding
  2015-03-30  8:09 ` Fei Ding
  2015-03-30 14:39 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Fei Ding @ 2015-03-30  7:33 UTC (permalink / raw)
  To: gdb

Hi all:

I've modified GDB to support set breakpoints automatically according
to a file containing all the EIP/RIP address that will be checked (a
litter bit like `gdb -x file` command). But, the amount of breakpoints
is too large, at least 10000, so I do not want to get any output like
`Breakpoint 1, fun2 () at main.c:35` on my screen, I want GDB to be
quiet at this time. Does GDB has something like `quiet mode`? Or, can
I redirect these hints into a file?

And, I want to write log when GDB is in `quiet mode`, does GDB has any
APIs to support log?

Thanks!

BR.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does GDB has 'quiet mode', and does GDB has APIs for writing log
  2015-03-30  7:33 Does GDB has 'quiet mode', and does GDB has APIs for writing log Fei Ding
@ 2015-03-30  8:09 ` Fei Ding
  2015-03-30  9:57   ` Fei Ding
  2015-03-30 14:39 ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Fei Ding @ 2015-03-30  8:09 UTC (permalink / raw)
  To: gdb

And I found

https://sourceware.org/gdb/current/onlinedocs/gdb/Logging-Output.html#Logging-Output

is helpful, I will check this out first.

2015-03-30 15:33 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
> Hi all:
>
> I've modified GDB to support set breakpoints automatically according
> to a file containing all the EIP/RIP address that will be checked (a
> litter bit like `gdb -x file` command). But, the amount of breakpoints
> is too large, at least 10000, so I do not want to get any output like
> `Breakpoint 1, fun2 () at main.c:35` on my screen, I want GDB to be
> quiet at this time. Does GDB has something like `quiet mode`? Or, can
> I redirect these hints into a file?
>
> And, I want to write log when GDB is in `quiet mode`, does GDB has any
> APIs to support log?
>
> Thanks!
>
> BR.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does GDB has 'quiet mode', and does GDB has APIs for writing log
  2015-03-30  8:09 ` Fei Ding
@ 2015-03-30  9:57   ` Fei Ding
  2015-03-30 10:22     ` Fei Ding
  2015-03-30 14:44     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Fei Ding @ 2015-03-30  9:57 UTC (permalink / raw)
  To: gdb

I want to manually write log by myself, any APIs?

2015-03-30 16:09 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
> And I found
>
> https://sourceware.org/gdb/current/onlinedocs/gdb/Logging-Output.html#Logging-Output
>
> is helpful, I will check this out first.
>
> 2015-03-30 15:33 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
>> Hi all:
>>
>> I've modified GDB to support set breakpoints automatically according
>> to a file containing all the EIP/RIP address that will be checked (a
>> litter bit like `gdb -x file` command). But, the amount of breakpoints
>> is too large, at least 10000, so I do not want to get any output like
>> `Breakpoint 1, fun2 () at main.c:35` on my screen, I want GDB to be
>> quiet at this time. Does GDB has something like `quiet mode`? Or, can
>> I redirect these hints into a file?
>>
>> And, I want to write log when GDB is in `quiet mode`, does GDB has any
>> APIs to support log?
>>
>> Thanks!
>>
>> BR.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does GDB has 'quiet mode', and does GDB has APIs for writing log
  2015-03-30  9:57   ` Fei Ding
@ 2015-03-30 10:22     ` Fei Ding
  2015-03-30 14:44     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Fei Ding @ 2015-03-30 10:22 UTC (permalink / raw)
  To: gdb

The log's content and output file is up to me. For example I want to
log the message `breakpoint hit! EIP is 0x12345` into a file
`breakpoint.log` when a breakpoint is actually hit.

2015-03-30 17:57 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
> I want to manually write log by myself, any APIs?
>
> 2015-03-30 16:09 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
>> And I found
>>
>> https://sourceware.org/gdb/current/onlinedocs/gdb/Logging-Output.html#Logging-Output
>>
>> is helpful, I will check this out first.
>>
>> 2015-03-30 15:33 GMT+08:00 Fei Ding <fdingiit@gmail.com>:
>>> Hi all:
>>>
>>> I've modified GDB to support set breakpoints automatically according
>>> to a file containing all the EIP/RIP address that will be checked (a
>>> litter bit like `gdb -x file` command). But, the amount of breakpoints
>>> is too large, at least 10000, so I do not want to get any output like
>>> `Breakpoint 1, fun2 () at main.c:35` on my screen, I want GDB to be
>>> quiet at this time. Does GDB has something like `quiet mode`? Or, can
>>> I redirect these hints into a file?
>>>
>>> And, I want to write log when GDB is in `quiet mode`, does GDB has any
>>> APIs to support log?
>>>
>>> Thanks!
>>>
>>> BR.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does GDB has 'quiet mode', and does GDB has APIs for writing log
  2015-03-30  7:33 Does GDB has 'quiet mode', and does GDB has APIs for writing log Fei Ding
  2015-03-30  8:09 ` Fei Ding
@ 2015-03-30 14:39 ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-03-30 14:39 UTC (permalink / raw)
  To: Fei Ding; +Cc: gdb

> Date: Mon, 30 Mar 2015 15:33:26 +0800
> From: Fei Ding <fdingiit@gmail.com>
> 
> I've modified GDB to support set breakpoints automatically according
> to a file containing all the EIP/RIP address that will be checked (a
> litter bit like `gdb -x file` command). But, the amount of breakpoints
> is too large, at least 10000, so I do not want to get any output like
> `Breakpoint 1, fun2 () at main.c:35` on my screen, I want GDB to be
> quiet at this time. Does GDB has something like `quiet mode`? Or, can
> I redirect these hints into a file?

Is the "silent" command what you are looking for?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does GDB has 'quiet mode', and does GDB has APIs for writing log
  2015-03-30  9:57   ` Fei Ding
  2015-03-30 10:22     ` Fei Ding
@ 2015-03-30 14:44     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-03-30 14:44 UTC (permalink / raw)
  To: Fei Ding; +Cc: gdb

> Date: Mon, 30 Mar 2015 17:57:38 +0800
> From: Fei Ding <fdingiit@gmail.com>
> 
> I want to manually write log by myself, any APIs?

There are "printf" and "output" commands.  And if that's not enough,
you can write your extensions in Python or Guile.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-30 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30  7:33 Does GDB has 'quiet mode', and does GDB has APIs for writing log Fei Ding
2015-03-30  8:09 ` Fei Ding
2015-03-30  9:57   ` Fei Ding
2015-03-30 10:22     ` Fei Ding
2015-03-30 14:44     ` Eli Zaretskii
2015-03-30 14:39 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).