Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2002-07-16  Ulrich Drepper  <drepper@redhat.com>

	* locales/th_TH: Change tel_dom_fmt.
	Patch by Theppitak Karoonboonyanan <thep@links.nectec.or.th>.
  • Loading branch information
Ulrich Drepper committed Jul 16, 2002
1 parent 8a98912 commit 547a7a8
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 17 deletions.
12 changes: 12 additions & 0 deletions linuxthreads_db/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2002-07-16 Ulrich Drepper <drepper@redhat.com>

* td_thr_clear_event.c: Yet more changes to help with TLS-enabled
libpthread.
* td_thr_event_enable.c: Likewise.
* td_thr_event_getmsg.c: Likewise.
* td_thr_set_event.c: Likewise.
* td_thr_setfpregs.c: Likewise.
* td_thr_setgregs.c: Likewise.
* td_thr_tsd.c: Likewise.
* td_thr_validate.c: Likewise.

2002-07-15 Ulrich Drepper <drepper@redhat.com>

* td_ta_thr_iter.c: Some more changes to enable using TLS-enabled
Expand Down
7 changes: 6 additions & 1 deletion linuxthreads_db/td_thr_clear_event.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Disable specific event for thread.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand Down Expand Up @@ -33,6 +33,11 @@ td_thr_clear_event (th, event)

LOG ("td_thr_clear_event");

/* If the thread descriptor has not yet been constructed do not do
anything. */
if (th->th_unique == NULL)
return TD_OK;

/* Write the new value into the thread data structure. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
Expand Down
15 changes: 8 additions & 7 deletions linuxthreads_db/td_thr_event_enable.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Enable event process-wide.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand Down Expand Up @@ -31,12 +31,13 @@ td_thr_event_enable (th, onoff)
LOG ("td_thr_event_enable");

/* Write the new value into the thread data structure. */
if (th->th_unique != NULL)
if (ps_pdwrite (th->th_ta_p->ph,
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct, p_report_events)),
&onoff, sizeof (int)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
if (th->th_unique != NULL)
if (ps_pdwrite (th->th_ta_p->ph,
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_report_events)),
&onoff, sizeof (int)) != PS_OK)
return TD_ERR; /* XXX Other error value? */

return TD_OK;
}
7 changes: 6 additions & 1 deletion linuxthreads_db/td_thr_event_getmsg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Retrieve event.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand Down Expand Up @@ -31,6 +31,11 @@ td_thr_event_getmsg (const td_thrhandle_t *th, td_event_msg_t *msg)

LOG ("td_thr_event_getmsg");

/* If the thread descriptor has not yet been created there cannot be
any event. */
if (th->th_unique == NULL)
return TD_NOMSG;

/* Read the even structure from the target. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
Expand Down
7 changes: 6 additions & 1 deletion linuxthreads_db/td_thr_set_event.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Enable specific event for thread.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand Down Expand Up @@ -33,6 +33,11 @@ td_thr_set_event (th, event)

LOG ("td_thr_set_event");

/* What shall we do if no thread descriptor exists but the user
wants to set an event? */
if (th->th_unique == NULL)
return TD_NOTALLOC;

/* Write the new value into the thread data structure. */
if (ps_pdread (th->th_ta_p->ph,
((char *) th->th_unique
Expand Down
7 changes: 4 additions & 3 deletions linuxthreads_db/td_thr_setfpregs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Set a thread's floating-point register set.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand All @@ -24,12 +24,13 @@
td_err_e
td_thr_setfpregs (const td_thrhandle_t *th, const prfpregset_t *fpregs)
{
struct _pthread_descr_struct pds;
struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 };

LOG ("td_thr_setfpregs");

/* We have to get the state and the PID for this thread. */
if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
if (th->th_unique != NULL
&& ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
return TD_ERR;

Expand Down
7 changes: 4 additions & 3 deletions linuxthreads_db/td_thr_setgregs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Set a thread's general register set.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
Expand All @@ -24,12 +24,13 @@
td_err_e
td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs)
{
struct _pthread_descr_struct pds;
struct _pthread_descr_struct pds = { .p_terminated = 0, .p_pid = 0 };

LOG ("td_thr_setgregs");

/* We have to get the state and the PID for this thread. */
if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
if (th->th_unique != NULL
&& ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
return TD_ERR;

Expand Down
5 changes: 5 additions & 0 deletions linuxthreads_db/td_thr_tsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ td_thr_tsd (const td_thrhandle_t *th, const thread_key_t tk, void **data)

LOG ("td_thr_tsd");

/* If there is no thread descriptor there cannot be any thread
specific data. */
if (th->th_unique == NULL)
return TD_BADKEY;

/* Get the thread descriptor. */
if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
sizeof (struct _pthread_descr_struct)) != PS_OK)
Expand Down
5 changes: 5 additions & 0 deletions linuxthreads_db/td_thr_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ td_thr_validate (const td_thrhandle_t *th)

LOG ("td_thr_validate");

/* A special case: if the program just starts up the handle is
NULL. */
if (th->th_unique == NULL)
return TD_OK;

/* Now get all descriptors, one after the other. */
for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
{
Expand Down
5 changes: 5 additions & 0 deletions localedata/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2002-07-16 Ulrich Drepper <drepper@redhat.com>

* locales/th_TH: Change tel_dom_fmt.
Patch by Theppitak Karoonboonyanan <thep@links.nectec.or.th>.

2002-07-11 Ulrich Drepper <drepper@redhat.com>

* charmaps/ISO-8859-11: New file.
Expand Down
2 changes: 1 addition & 1 deletion localedata/locales/th_TH
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ END LC_PAPER
LC_TELEPHONE
tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
<U006C>"
tel_dom_fmt "<U0028><U0025><U0041><U0029><U0025><U006C>"
tel_dom_fmt "<U0030><U002D><U0025><U0061><U0025><U006C>"
int_select "<U0030><U0030><U0031>"
int_prefix "<U0036><U0036>"
END LC_TELEPHONE
Expand Down

0 comments on commit 547a7a8

Please sign in to comment.