Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Files
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
443
Issues
443
List
Boards
Labels
Service Desk
Milestones
Merge Requests
30
Merge Requests
30
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
Files
Commits
daa61318
Commit
daa61318
authored
Jan 14, 2000
by
Darin Adler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made it stop in the debugger for a g_warning, but not abort if the
debugger is not running.
parent
b7c12944
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
8 deletions
+78
-8
ChangeLog-20000414
ChangeLog-20000414
+10
-0
src/nautilus-main.c
src/nautilus-main.c
+34
-4
src/ntl-main.c
src/ntl-main.c
+34
-4
No files found.
ChangeLog-20000414
View file @
daa61318
2000-01-14 Darin Adler <darin@eazel.com>
Fixed our handling of warnings and criticals.
* src/ntl-main.c: Added new functions that stop in the debugger
when you hit a g_warning or a critical error, only if the
environment variable NAUTILUS_DEBUG is set. This is better than
the way the old code made everything fatal, since it doesn't do
anything if the debugger isn't running.
2000-01-14 Darin Adler <darin@eazel.com>
Turned on gradients for backgrounds.
...
...
src/nautilus-main.c
View file @
daa61318
...
...
@@ -34,7 +34,36 @@
#include <libnautilus/nautilus-lib-self-check-functions.h>
#include <libnautilus/nautilus-self-checks.h>
int
main
(
int
argc
,
char
*
argv
[])
/* Raise a SIGINT signal to get the attention of the debugger.
When not running under the debugger, we don't want to stop,
so we ignore the signal for just the moment that we raise it.
*/
static
void
stop_in_debugger
(
void
)
{
void
(
*
saved_handler
)
(
int
);
saved_handler
=
signal
(
SIGINT
,
SIG_IGN
);
raise
(
SIGINT
);
signal
(
SIGINT
,
saved_handler
);
}
/* Stop in the debugger after running the default log handler.
This makes certain kinds of messages stop in the debugger
without making them fatal.
*/
static
void
nautilus_stop_after_default_log_handler
(
const
char
*
domain
,
GLogLevelFlags
level
,
const
char
*
message
,
gpointer
data
)
{
g_log_default_handler
(
domain
,
level
,
message
,
data
);
stop_in_debugger
();
}
int
main
(
int
argc
,
char
*
argv
[])
{
poptContext
ctx
;
CORBA_Environment
ev
;
...
...
@@ -51,10 +80,11 @@ int main(int argc, char *argv[])
#endif
{
NULL
,
'\0'
,
0
,
NULL
,
0
,
NULL
,
NULL
}
};
/* Make criticals and warnings
into errors
if NAUTILUS_DEBUG is set. */
/* Make criticals and warnings
stop in the debugger
if NAUTILUS_DEBUG is set. */
if
(
getenv
(
"NAUTILUS_DEBUG"
)
!=
NULL
)
g_log_set_always_fatal
(
G_LOG_FATAL_MASK
|
G_LOG_LEVEL_CRITICAL
|
G_LOG_LEVEL_WARNING
);
g_log_set_handler
(
NULL
,
G_LOG_LEVEL_CRITICAL
|
G_LOG_LEVEL_WARNING
,
nautilus_stop_after_default_log_handler
,
NULL
);
/* Initialize the services that we use. */
CORBA_exception_init
(
&
ev
);
...
...
src/ntl-main.c
View file @
daa61318
...
...
@@ -34,7 +34,36 @@
#include <libnautilus/nautilus-lib-self-check-functions.h>
#include <libnautilus/nautilus-self-checks.h>
int
main
(
int
argc
,
char
*
argv
[])
/* Raise a SIGINT signal to get the attention of the debugger.
When not running under the debugger, we don't want to stop,
so we ignore the signal for just the moment that we raise it.
*/
static
void
stop_in_debugger
(
void
)
{
void
(
*
saved_handler
)
(
int
);
saved_handler
=
signal
(
SIGINT
,
SIG_IGN
);
raise
(
SIGINT
);
signal
(
SIGINT
,
saved_handler
);
}
/* Stop in the debugger after running the default log handler.
This makes certain kinds of messages stop in the debugger
without making them fatal.
*/
static
void
nautilus_stop_after_default_log_handler
(
const
char
*
domain
,
GLogLevelFlags
level
,
const
char
*
message
,
gpointer
data
)
{
g_log_default_handler
(
domain
,
level
,
message
,
data
);
stop_in_debugger
();
}
int
main
(
int
argc
,
char
*
argv
[])
{
poptContext
ctx
;
CORBA_Environment
ev
;
...
...
@@ -51,10 +80,11 @@ int main(int argc, char *argv[])
#endif
{
NULL
,
'\0'
,
0
,
NULL
,
0
,
NULL
,
NULL
}
};
/* Make criticals and warnings
into errors
if NAUTILUS_DEBUG is set. */
/* Make criticals and warnings
stop in the debugger
if NAUTILUS_DEBUG is set. */
if
(
getenv
(
"NAUTILUS_DEBUG"
)
!=
NULL
)
g_log_set_always_fatal
(
G_LOG_FATAL_MASK
|
G_LOG_LEVEL_CRITICAL
|
G_LOG_LEVEL_WARNING
);
g_log_set_handler
(
NULL
,
G_LOG_LEVEL_CRITICAL
|
G_LOG_LEVEL_WARNING
,
nautilus_stop_after_default_log_handler
,
NULL
);
/* Initialize the services that we use. */
CORBA_exception_init
(
&
ev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment